autoconf2.64_2.64+dfsg.orig/0000755000175000017500000000000011233220606014232 5ustar smcvsmcvautoconf2.64_2.64+dfsg.orig/configure.ac0000644000175000017500000001527211232574542016541 0ustar smcvsmcv# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # Copyright (C) 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003, # 2004, 2005, 2006, 2007, 2008, 2009 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 3 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, see . # We need AC_CONFIG_TESTDIR, AC_PROG_SED, AC_PROG_GREP. AC_PREREQ([2.60]) AC_INIT([GNU Autoconf], m4_esyscmd([build-aux/git-version-gen .tarball-version]), [bug-autoconf@gnu.org]) AC_CONFIG_SRCDIR([ChangeLog]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([1.10 dist-bzip2 readme-alpha no-texinfo.tex std-options]) # 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 # # Also, some implementations of /bin/sh (e.g., Solaris 8) are soooo slow # that they are unusable on large scripts like our testsuite. # So before using `/bin/sh -n' to check our scripts, we first check # that `/bin/sh -n' is known to not have these problems. AC_CACHE_CHECK([whether /bin/sh -n is known to work], [ac_cv_sh_n_works], [if ( unset BASH_VERSION ZSH_VERSION /bin/sh -c ' test -n "${BASH_VERSION+set}" || # Bash test -n "${KSH_VERSION+set}" || # pdksh test -n "${ZSH_VERSION+set}" || # zsh test -n "${.sh.version}" # ksh93; put this last since its syntax is dodgy ' ) 2>/dev/null then ac_cv_sh_n_works=yes else ac_cv_sh_n_works=no fi ]) AC_SUBST([ac_cv_sh_n_works]) AC_MSG_CHECKING([for characters that cannot appear in file names]) AC_CACHE_VAL([ac_cv_unsupported_fs_chars], [ac_cv_unsupported_fs_chars= for c in '\\' \" '<' '>' '*' '?' '|' do touch "conftest.t${c}t" 2>/dev/null test -f "conftest.t${c}t" && rm -f "conftest.t${c}t" && continue # $c cannot be used in a file name. ac_cv_unsupported_fs_chars=$ac_cv_unsupported_fs_chars$c done ]) if test -n "$ac_cv_unsupported_fs_chars"; then AC_MSG_RESULT([$ac_cv_unsupported_fs_chars]) else AC_MSG_RESULT([none]) fi AC_SUBST([ac_cv_unsupported_fs_chars]) AC_CACHE_CHECK([whether directories can have trailing spaces], [ac_cv_dir_trailing_space], [rm -rf 'conftest.d ' && mkdir 'conftest.d ' && touch 'conftest.d /tfile' 2>/dev/null stat=$? rm -rf 'conftest.d ' case $stat$? in #( 00) ac_cv_dir_trailing_space=yes ;; #( *) ac_cv_dir_trailing_space=no ;; esac ]) AC_SUBST([ac_cv_dir_trailing_space]) # Initialize the test suite. AC_CONFIG_TESTDIR([tests]) AC_CONFIG_FILES([tests/Makefile tests/atlocal]) AC_PATH_PROG([EXPR], [expr]) ## ---- ## ## M4. ## ## ---- ## # We use an absolute name 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 # on it and get that path embedded in the installed autoconf and # autoheader scripts. AC_PROG_GNU_M4 ## ----------- ## ## Man pages. ## ## ----------- ## AC_CONFIG_FILES([man/Makefile]) AM_MISSING_PROG([HELP2MAN], [help2man]) ## ------ ## ## Perl. ## ## ------ ## # We use an absolute name 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 ## ------------ ## ## Grep & sed. ## ## ------------ ## AC_PROG_GREP AC_PROG_EGREP AC_PROG_SED ## ----- ## ## Make. ## ## ----- ## AC_PROG_MAKE_CASE_SENSITIVE ## ------------ ## ## Conclusion. ## ## ------------ ## dnl Allow maintainer rules under GNU make even in VPATH builds. This does dnl not work in autoconf 2.61 or earlier, but we don't want to require dnl unreleased autoconf during bootstrap, hence the version test. dnl TODO remove the version check once we depend on autoconf 2.62. dnl Meanwhile, we must use a shell variable so that we bypass automake's dnl attempts to remove the sole copy of GNUmakefile in a non-VPATH build dnl during 'make distclean'. dnl TODO avoid the shell variable once automake is fixed. GNUmakefile=GNUmakefile m4_if(m4_version_compare([2.61a.100], m4_defn([m4_PACKAGE_VERSION])), [1], [], [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [], [GNUmakefile=$GNUmakefile])]) 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 echo ])dnl autoconf2.64_2.64+dfsg.orig/Makefile.am0000644000175000017500000000612011173335201016266 0ustar smcvsmcv# Make Autoconf. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, # 2009 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 3 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, see . # bin/ must be run first, as it builds executables needed for tests. # autom4te uses autotest.m4f to generate `testsuite', so build tests last. # Rules in man/ use scripts from both bin/ and tests/, so *it* goes last. SUBDIRS = bin . lib doc tests man ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \ BUGS COPYINGv3 \ GNUmakefile maint.mk cfg.mk \ build-aux/gendocs.sh \ build-aux/git-version-gen \ build-aux/announce-gen build-aux/gnupload \ .prev-version .version ## --------- ## ## INSTALL. ## ## --------- ## AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split if MAKE_CASE_SENSITIVE pkgdata_DATA = $(srcdir)/INSTALL MAINTAINERCLEANFILES = $(srcdir)/INSTALL $(srcdir)/INSTALL: $(top_srcdir)/doc/install.texi $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) --plaintext -o $@ \ $(top_srcdir)/doc/install.texi endif # Version string management. There are two files to be aware of: # .tarball-version - present only in a distribution tarball, and not in # a checked-out repository. Created with contents that were learned at # the last time autoconf was run, and used by git-version-gen. Must not # be present in either $(srcdir) or $(builddir) for git-version-gen to # give accurate answers during normal development with a checked out tree, # but must be present in a tarball when there is no version control system. # Therefore, it cannot be used in any dependencies. GNUmakefile has # hooks to force a reconfigure at distribution time to get the value # correct, without penalizing normal development with extra reconfigures. # .version - present in a checked-out repository and in a distribution # tarball. At least as current as the most recent .tarball-version # creation. Usable in dependencies, particularly for files that don't # want to depend on config.h but do want to track version changes. BUILT_SOURCES = $(top_srcdir)/.version $(top_srcdir)/.version: echo $(VERSION) > $@-t && mv $@-t $@ # Arrange so that .tarball-version appears only in distribution tarballs, # never in a checked-out repository. dist-hook: echo $(VERSION) > $(distdir)/.tarball-version # Arrange to remove the symlink to GNUmakefile in VPATH builds. # TODO remove this once automake vs. AC_CONFIG_LINKS issue is fixed. distclean-local: if test x"$(VPATH)" != x ; then rm -f GNUmakefile ; fi autoconf2.64_2.64+dfsg.orig/maint.mk0000644000175000017500000004745311173335023015713 0ustar smcvsmcv# -*-Makefile-*- # This Makefile fragment tries to be general-purpose enough to be # used by at least coreutils, idutils, CPPI, Bison, and Autoconf. ## Copyright (C) 2001-2009 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 3 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, see . # This is reported not to work with make-3.79.1 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) ME := maint.mk # Do not save the original name or timestamp in the .tar.gz file. # Use --rsyncable if available. gzip_rsyncable := \ $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable) GZIP_ENV = '--no-name --best $(gzip_rsyncable)' GIT = git VC = $(GIT) VC-tag = git tag -s -m '$(VERSION)' VC_LIST = $(srcdir)/build-aux/vc-list-files -C $(srcdir) VC_LIST_EXCEPT = \ $(VC_LIST) | if test -f $(srcdir)/.x-$@; then \ grep -vEf $(srcdir)/.x-$@; \ else \ grep -v ChangeLog; \ fi ifeq ($(origin prev_version_file), undefined) prev_version_file = $(srcdir)/.prev-version endif PREV_VERSION := $(shell cat $(prev_version_file)) VERSION_REGEXP = $(subst .,\.,$(VERSION)) this-vc-tag = v$(VERSION) this-vc-tag-regexp = v$(VERSION_REGEXP) my_distdir = $(PACKAGE)-$(VERSION) # Old releases are stored here. # Used for diffs. 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. ## ## --------------- ## # Collect the names of rules starting with `sc_'. syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \ $(srcdir)/$(ME)) .PHONY: $(syntax-check-rules) local-checks-available = \ po-check copyright-check writable-files m4-check author_mark_check \ changelog-check patch-check strftime-check $(syntax-check-rules) \ makefile_path_separator_check \ makefile-check check-AUTHORS .PHONY: $(local-checks-available) local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available)) syntax-check: $(local-check) # @shopt -s nullglob; \ # grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \ # $$(find -type f -name '*.[chly]') /dev/null && \ # { echo '$(ME): found conditional include' 1>&2; \ # exit 1; } || : # grep -nE '^# *include <(string|stdlib)\.h>' \ # $(srcdir)/{lib,src}/*.[chly] /dev/null && \ # { echo '$(ME): FIXME' 1>&2; \ # exit 1; } || : # FIXME: don't allow `#include .strings\.h' anywhere sc_cast_of_argument_to_free: @shopt -s nullglob; \ grep -nE '\&2; \ exit 1; } || : sc_cast_of_x_alloc_return_value: @shopt -s nullglob; \ grep -nE --exclude=$(srcdir)/lib/regex.c \ '\*\) *x(m|c|re)alloc\>' \ $(srcdir)/{lib,src}/*.[chly] /dev/null && \ { echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \ exit 1; } || : sc_cast_of_alloca_return_value: @shopt -s nullglob; \ grep -nE '\*\) *alloca\>' \ $(srcdir)/src/*.[chly] /dev/null && \ { echo '$(ME): don'\''t cast alloca return value' 1>&2; \ exit 1; } || : sc_space_tab: @grep -n '[ ] ' $$($(VC_LIST_EXCEPT)) && \ { echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \ 1>&2; exit 1; } || : # Don't use *scanf or the old ato* functions in `real' code. # They provide no error checking mechanism. # Instead, use strto* functions. sc_prohibit_atoi_atof: @grep -nE '\<([fs]?scanf|ato([filq]|ll))\>' $$($(VC_LIST_EXCEPT)) && \ { echo '$(ME): do not use *scan''f, ato''f, ato''i, ato''l, ato''ll, ato''q, or ss''canf' \ 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 -nF 'error (EXIT_SUCCESS,' \ $$(find -type f -name '*.[chly]') /dev/null && \ { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \ exit 1; } || : sc_file_system: @grep -ni 'file''system' $$($(VC_LIST_EXCEPT)) \ | grep -v 'File''system Hierarchy Standard' && \ { echo '$(ME): found use of "file''system";' \ 'rewrite to use "file system"' 1>&2; \ exit 1; } || : sc_no_have_config_h: @grep -n '^# *if.*HAVE''_CONFIG_H' $$($(VC_LIST_EXCEPT)) && \ { echo '$(ME): found use of HAVE''_CONFIG_H; remove' \ 1>&2; exit 1; } || : # Nearly all .c files must include . sc_require_config_h: @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ grep -L '^# *include ' \ $$($(VC_LIST_EXCEPT) | grep '\.c$$') \ | grep . && \ { echo '$(ME): the above files do not include ' \ 1>&2; exit 1; } || :; \ else :; \ fi # To use this "command" macro, you must first define two shell variables: # h: the header, enclosed in <> or "" # re: a regular expression that matches IFF something provided by $h is used. define _header_without_use h_esc=`echo "$$h"|sed 's/\./\\./'`; \ if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ files=$$(grep -l '^# *include '"$$h_esc" \ $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \ grep -LE "$$re" $$files | grep . && \ { echo "$(ME): the above files include $$h but don't use it" \ 1>&2; exit 1; } || :; \ else :; \ fi endef # Prohibit the inclusion of assert.h without an actual use of assert. sc_prohibit_assert_without_use: @h='' re='\' \ $$($(VC_LIST_EXCEPT)) && \ { echo '$(ME): do not use HAVE''_FCNTL_H or O''_NDELAY' \ 1>&2; exit 1; } || : # 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 -n '^[^12 ]' $$(find $(srcdir) -maxdepth 2 -name ChangeLog) && \ { echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \ exit 1; } || : # Ensure that dd's definition of LONGEST_SYMBOL stays in sync # with the strings from the two affected variables. dd_c = $(srcdir)/src/dd.c sc_dd_max_sym_length: ifneq ($(wildcard $(dd_c)),) @len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\ sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \ |sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \ | wc --max-line-length); \ max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \ |tr -d '"' | wc --max-line-length); \ if test "$$len" = "$$max"; then :; else \ echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \ exit 1; \ fi endif # Many m4 macros names once began with `jm_'. # On 2004-04-13, they were all changed to start with gl_ instead. # Make sure that none are inadvertently reintroduced. sc_prohibit_jm_in_m4: @grep -nE 'jm_[A-Z]' \ $$($(VC_LIST) m4 |grep '\.m4$$') && \ { echo '$(ME): do not use jm_ in m4 macro names' \ 1>&2; exit 1; } || : sc_root_tests: @t1=sc-root.expected; t2=sc-root.actual; \ grep -nl '^PRIV_CHECK_ARG=require-root' \ $$($(VC_LIST) tests) |sed s/tests/./ |sort > $$t1; \ sed -n 's, cd \([^ ]*\) .*MAKE..check TESTS=\(.*\),./\1/\2,p' \ $(srcdir)/tests/Makefile.am |sort > $$t2; \ diff -u $$t1 $$t2 || diff=1; \ rm -f $$t1 $$t2; \ test "$$diff" \ && { echo 'tests/Makefile.am: missing check-root action'>&2; \ exit 1; } || : # Files in src/ should not include directly any of # the headers already included via system.h. sc_system_h_headers: @if test -f $(srcdir)/src/system.h; then \ pat=$$( \ sed -n '/^# *include /s///p' $(srcdir)/src/system.h /dev/null \ | grep -Ev 'sys/(param|file)\.h' \ | sed 's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \ ) && \ grep -nE -f "$pat" \ $$($(VC_LIST) src | \ grep -Ev '((copy|system)\.h|parse-gram\.c)$$') \ && { echo '$(ME): the above are already included via system.h'\ 1>&2; exit 1; } || :; \ fi sc_sun_os_names: @grep -nEi \ 'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \ $$($(VC_LIST_EXCEPT)) && \ { echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \ exit 1; } || : sc_the_the: @grep -ni '\' $$($(VC_LIST_EXCEPT)) && \ { echo '$(ME): found use of "the ''the";' 1>&2; \ exit 1; } || : sc_tight_scope: test ! -d src || $(MAKE) -C src $@ sc_trailing_blank: @grep -n '[ ]$$' $$($(VC_LIST_EXCEPT)) && \ { echo '$(ME): found trailing blank(s)' \ 1>&2; exit 1; } || : # Match lines like the following, but where there is only one space # between the options and the description: # -D, --all-repeated[=delimit-method] print all duplicate lines\n longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)? sc_two_space_separator_in_usage: @grep -nE '^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \ $$($(VC_LIST_EXCEPT)) && \ { echo "$(ME): help2man requires at least two spaces between"; \ echo "$(ME): an option and its description"; \ 1>&2; exit 1; } || : # 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 -nE \ '\&2; \ exit 1; } || : # Avoid useless parentheses like those in this example: # #if defined (SYMBOL) || defined (SYM2) sc_useless_cpp_parens: @grep -n '^# *if .*defined *(' $$($(VC_LIST_EXCEPT)) && \ { echo '$(ME): found useless parentheses in cpp directive' \ 1>&2; exit 1; } || : # Ensure that the c99-to-c89 patch applies cleanly. patch-check: if test -f src/c99-to-c89.diff; then \ rm -rf src-c89 $@.1 $@.2 && \ cp -a src src-c89 && \ (cd src-c89; patch -V never --fuzz=0) < src/c99-to-c89.diff \ > $@.1 2>&1 && \ { grep -v '^patching file ' $@.1 > $@.2 || :; } && \ test -s $@.2 && \ rm -rf src-c89 $@.1 $@.2; \ fi # 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 check-AUTHORS: test ! -d src || $(MAKE) -C src $@ # 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 -nE '@[A-Z_0-9]+@' `find $(srcdir) -name Makefile.am` \ && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || : news-date-check: NEWS today=`date +%Y-%m-%d`; \ if head NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \ >/dev/null; then \ :; \ else \ echo "version or today's date is not in NEWS" 1>&2; \ exit 1; \ fi changelog-check: if head ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$' \ >/dev/null; then \ :; \ else \ echo "$(VERSION) not in ChangeLog" 1>&2; \ exit 1; \ fi m4-check: @shopt -s nullglob; \ grep 'AC_DEFUN([^[]' m4/*.m4 /dev/null \ && { echo '$(ME): quote the first arg to AC_DEFUN' 1>&2; \ exit 1; } || : # Verify that all source files using _() are listed in po/POTFILES.in. # FIXME: don't hard-code file names below; use a more general mechanism. po-check: if test -f po/POTFILES.in; then \ grep -E -v '^(#|$$)' po/POTFILES.in \ | grep -v '^src/false\.c$$' | sort > $@-1; \ files=; \ for file in $$($(VC_LIST_EXCEPT)) lib/*.[ch]; do \ case $$file in \ djgpp/* | man/*) continue;; \ */c99-to-c89.diff) continue;; \ esac; \ case $$file in \ *.[ch]) \ base=`expr " $$file" : ' \(.*\)\..'`; \ { test -f $$base.l || test -f $$base.y; } && continue;; \ esac; \ files="$$files $$file"; \ done; \ grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \ | sort -u > $@-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: @shopt -s nullglob; \ grep -n '^# *define AUTHORS "[^"]* and ' src/*.c /dev/null \ | grep -v ' N_ (' && \ { echo '$(ME): 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 = '$(ME): Do not use `:'\'' above; use @PATH_SEPARATOR@ instead' makefile_path_separator_check: @grep -n '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 'enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' $(v_etc_file) \ >/dev/null \ || { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \ exit 1; }; \ fi vc-diff-check: (CDPATH=; cd $(srcdir) && $(VC) diff) > vc-diffs || : if test -s vc-diffs; then \ cat vc-diffs; \ echo "Some files are locally modified:" 1>&2; \ exit 1; \ else \ rm vc-diffs; \ fi cvs-check: vc-diff-check maintainer-distcheck: $(MAKE) distcheck $(MAKE) -C tests $(AM_MAKEFLAGS) maintainer-check $(MAKE) my-distcheck # Don't make a distribution if checks fail. # Also, make sure the NEWS file is up-to-date. vc-dist: $(local-check) cvs-check maintainer-distcheck $(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. Also, check for shadowing problems with -Wshadow, # and for pointer arithmetic problems with -Wpointer-arith. # These CFLAGS are pretty strict. If you build this target, you probably # have to have a recent version of gcc and glibc headers. TMPDIR ?= /tmp t=$(TMPDIR)/$(PACKAGE)/test my-distcheck: $(local-check) $(release_archive_dir)/$(prev-tgz) -rm -rf $(t) mkdir -p $(t) GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz cd $(t)/$(distdir) \ && ./configure --disable-nls \ && $(MAKE) CFLAGS='-Werror -Wall -Wformat -Wshadow -Wpointer-arith' \ 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 "========================" prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz rel-files = $(DIST_ARCHIVES) announcement: NEWS ChangeLog $(rel-files) @$(announce_gen) \ --release-type=$(RELEASE_TYPE) \ --package=$(PACKAGE) \ --prev=$(PREV_VERSION) \ --curr=$(VERSION) \ --gpg-key-id=$(gpg_key_ID) \ --news=$(srcdir)/NEWS \ --bootstrap-tools=automake \ $(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 emit_upload_commands: @echo ===================================== @echo ===================================== @echo "$(srcdir)/build-aux/gnupload $(GNUPLOADFLAGS) \\" @echo " --to $(gnu_rel_host):$(PACKAGE) \\" @echo " $(rel-files)" @echo '# send the /tmp/announcement e-mail' @echo ===================================== @echo ===================================== .PHONY: alpha beta major alpha beta major: news-date-check changelog-check $(local-check) test $@ = major \ && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \ || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\ || : $(MAKE) vc-dist $(MAKE) $(xd-delta) $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir) ln $(rel-files) $(release_archive_dir) chmod a-w $(rel-files) $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@ echo $(VERSION) > $(prev_version_file) $(VC) commit -m \ '$(prev_version_file): Record previous version: $(VERSION).' \ $(prev_version_file) autoconf2.64_2.64+dfsg.orig/ChangeLog.00000644000175000017500000003121711204770547016162 0ustar smcvsmcvMon 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 (C) 1992 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 3 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, see . autoconf2.64_2.64+dfsg.orig/THANKS0000644000175000017500000004457011227003710015155 0ustar smcvsmcvGNU Autoconf THANKS file GNU Autoconf was originally written by David J. MacKenzie. It would not be what it is today without the invaluable help of these people, who have reported problems, suggested improvements, or submitted actual code. Please help us keep this list complete and free from errors. Also see the AUTHORS file for the list of people with contributions significant enough to warrant copyright assignment. Aaron Crane aaronc@pobox.com Aaron M. Ucko amu@alum.mit.edu Aaron W. LaFramboise aaronenvelope277@aaronwl.com Adam J. Richter adam@yggdrasil.com Aharon Robbins arnold@gnu.org Akim Demaille akim@freefriends.org Akinori Musha knu@iDaemons.org Alain Knaff Alain.Knaff@imag.fr Albert Chin-A-Young china@thewrittenword.com Alec Wolman wolman@cs.washington.edu Alex Unleashed unledev@gmail.com Alexander Kurz alexander.kurz@qsc.de Alexander Mai ? Alexandre Duret-Lutz duret_g@epita.fr Alexandre Julliard ? Alexandre Oliva oliva@lsd.ic.unicamp.br Alfred G. de Wijn dwijn@iluvatar.eu.org Allan Caffee allan.caffee@gmail.com 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 Andreas Waechter andreasw@watson.ibm.com Andrej Borsenkow borsenkow.msk@sni.de Andrew Belov ? Andrew Church achurch@achurch.org Andrey Simonenko simon@comsys.ntu-kpi.kiev.ua Andris Pavenis andris.pavenis@iki.fi Anthony N. Frasso afrasso@yahoo.com Art Haas ahaas@neosoft.com Arto C. Nirkko ? Artur Frysiak wiget@pld.org.pl Assar Westerlund assar@sics.se Axel Thimm Axel.Thimm@physik.fu-berlin.de Ben Elliston bje@redhat.com Ben Pfaff pfaffben@debian.org Bill Moseley moseley@hank.org Bill Northcott w.northcott@unsw.edu.au Bill Sommerfeld sommerfeld@apollo.hp.com BJ Terry bjterry@gmail.com Bob Friesenhahn bfriesen@simple.dallas.tx.us Bob Proulx bob@proulx.com Bob Rossi bob_rossi@cox.net Bob Wilson bwilson@tensilica.com Brad Walker me@bradmwalker.com Braden McDaniel braden@endoframe.com Bram Moolenaar bram@vim.org Brian Gough bjg@network-theory.co.uk Bruce Dugan bld0401@gmail.com Bruce Korb bkorb@gnu.org Bruce Lilly ? Bruno Haible haible@ilog.fr Björn Lindqvist bjourne@gmail.com Carl Edman cedman@princeton.edu Carlos Velasco carlosev@newipnet.com Chad R. Larson chad@anasazi.com Charles 'Buck' Krasic krasic@cs.ubc.ca Chikama Masaki masaki.chikama@gmail.com Chris P. Ross cross@uu.net Chris Pickett chris.pickett@mail.mcgill.ca Chris Provenzano proven@cygnus.com Chris Torek torek@bsdi.com Christian Cornelssen ccorn@cs.tu-berlin.de Christian Krackowizer ckrackowiz@std.schuler-ag.com Christian Krone krischan@sql.de Christian Rössel christian.roessel@gmx.de Christopher Hulbert cchgroupmail@gmail.com Christopher Lee chrislee@ri.cmu.edu Clinton Roy clinton.roy@gmail.com Cort Dougan cort@cs.nmt.edu D'Arcy A MacIsaac ? Dalibor Topic robilad@kaffe.org Dan Manthey dan_manthey@partech.com Daniel Carroll dan@mesastate.edu Daniel Jacobowitz drow@mvista.com Daniel Reed ? Daniele Arena daniele@ripe.net Dave Adams adams@hpesdwa.fc.hp.com Dave Erickson retrorandomaccess@hotmail.com Dave Love fx@gnu.org David Byron dbyron@hheld.com David Carter david@carter.net David Cournapeau david@ar.media.kyoto-u.ac.jp David Fang fang@csl.cornell.edu David J. MacKenzie djm@uunet.uu.net David M. Lloyd dmlloyd@tds.net David Morgan dmorgan@symark.com David Relson relson@osagesoftware.com Dennis J. Linse ? 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 Dries Kimpe ? Edouard Bechetoille ebecheto@ens-lyon.fr Elbert Pol elbert.pol@gmail.com Eli Zaretskii eliz@gnu.org Elias Pipping pipping@macports.org Enrique Robledo Arnuncio enrique.robledo@wanadoo.es Erez Zadok ezk@cs.columbia.edu Eric Backus ericb@lsid.hp.com Eric Blake ebb9@byu.net Eric Lemings lemings@roguewave.com Eric Mumpower nocturne@mit.edu Eric Paire ? Eric Sunshine sunshine@sunshineco.com Ezra Peisach epeisach@zif.mit.edu Fedor Sergeev ? Felix Lee flee@cygnus.com Franceseco Romani fromani@gmail.com Frank Denis j@jedi.claranet.fr François Pinard pinard@iro.umontreal.ca Fred Kreek Fred.Kreek@kadaster.nl Frederik Fouvry fouvry@CoLi.Uni-SB.DE 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 Gideon Go gideon.go@gmail.com 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 Greg Schafer gschafer@zip.com.au Gregorio Guidi ? Gregory Giannoni sand@narguile.org Guido Draheim Guido.Draheim@gmx.de Guido Flohr gufl0000@stud.uni-sb.de Guido van Rossum ? Guillermo Gomez gomez@mi.uni-erlangen.de H. Merijn Brand h.m.brand@hccnet.nl H. Peter Anvin ? H.J. Lu hjl@gnu.org Hallvard B Furuseth h.b.furuseth@usit.uio.no Hans Aberg haberg@math.su.se Hans Olsson Hans.Olsson@dna.lth.se Hans Ulrich Niedermann hun@n-dimensional.de Harlan Stenn stenn@whimsy.udel.edu Henk Krus h.krus@cyclone.nl Howard Chu hyc@highlandsun.com Ian Lance Taylor ian@cygnus.com Ian Macdonald iamacdo@telkomsa.net Ian Redfern Ian.Redfern@logicacmg.com Ilya Bobir ilya.bobir@gmail.com Ilya Zakharevich ilya@Math.Berkeley.EDU Ineiev ineiev@yahoo.co.uk Iohannes m zmoelnig zmoelnig@iem.at J C Fitzgerald v7022@wave.co.nz Jaap Haitsma jaap@haitsma.org James A. Lupo lupoja@feynman.ml.wpafb.af.mil Jan Madzik jmadzik@gmail.com Jason Molenda jsm@cygnus.com Jeff Garzik jgarzik@pobox.com Jeff Painter ? Jeff Squyres jsquyres@cisco.com Jeffrey A Law law@cygnus.com Jeffrey J. Barteet ? Jennis Pruett ? Jens Petersen petersen@redhat.com Jens Schmidt jens.schmidt35@arcor.de Jeremy Yallop jeremy@yallop.org Jerker Bäck jerker.back@home.se Jim Blandy jimb@wookumz.gnu.ai.mit.edu Jim Meyering meyering@ascend.com Jiro Takabatake jiro@din.or.jp Jochen Friedrich jochen@scram.de Joel E. Denny jdenny@ces.clemson.edu Joey Mingrone joey@mingrone.org Johan Danielsson joda@pdc.kth.se John Calcote john.calcote@gmail.com John David Anglin dave@hiauly1.hia.nrc.ca John Fortin fortinj@attglobal.net John Interrante interran@uluru.stanford.edu John R. Cary cary@txcorp.com John W. Eaton jwe@bevo.che.wisc.edu Jonathan Kamens jik@kamens.brookline.ma.us Josef Tran josef@timetrackertechnology.com Joseph S. Myers jsm28@cam.ac.uk Jules Colding colding@42tools.com Julian Onions j.onions@nexor.co.uk Julien Danjou acid@debian.org Julio Garvia ? Justace Clutter ? Jörn Rennecke amylaar@cygnus.co.uk Karl Berry karl@cs.umb.edu Karl Heuer kwzh@gnu.org Karsten Hopp karsten@redhat.com Kate Hedstrom ? Kathryn Hargreaves kathryn@deas.harvard.edu Kaveh R. Ghazi ghazi@caip.rutgers.edu Keith Bostic bostic@abyssinian.sleepycat.com Keith Marshall keith.marshall@total.com 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 Kristian Kvilekval kris@cs.ucsb.edu 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 Laurence Darbe ldarby@tuffmail.com Leo Moisio leo.moisio@gmail.com Loulou Pouchet loulou@lrde.epita.fr Ludovic Courtes ? Magnus Therning therning@gforge.natlab.research.philips.com Manu manubee@wanadoo.fr Marc Espie Marc.Espie@liafa.jussieu.fr Marcus Brinkmann ? Marcus Daniels marcus@sysc.pdx.edu Marcus Thiessel marcus@xemacs.org Mark Cave-Ayland ? Mark D. Baushke ? Mark D. Roth ? 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 Costabel costabel@wanadoo.fr Martin Frydl martin@systinet.com Martin Koeppe mkoeppe@gmx.de Martin Mokrejs mmokrejs@natur.cuni.cz Martin Wilck martin@tropos.de Martyn Johnson Martyn.Johnson@cl.cam.ac.uk Matěj Týč matej.tyc@gmail.com Matteo Frigo ? Matthew D. Langston langston@SLAC.Stanford.EDU Matthew Mueller donut@azstarnet.com Matthew Woehlke mw_triad@users.sourceforge.net Matthias Andree matthias.andree@gmx.de Michael Elizabeth Chastain chastain@cygnus.com Michael Jenning ? Michael Matz matz@kde.org Michael Schoene mrs@mlc.de Michael Wardle ? Mike Frysinger vapier@gentoo.org Mike Hopkirk hops@sco.com Mike Stump mrs@wrs.com Mikulas Patocka ? Miles Bader miles@gnu.ai.mit.edu Mo DeJong mdejong@cygnus.com Momchil Velkov velco@fadata.bg Monty Taylor mordred@inaugust.com Morten Eriksen mortene@sim.no Motoyuki Kasahara m-kasahr@sra.co.jp Nathanael Nerode neroden@gcc.gnu.org Nelson H. F. Beebe beebe@math.utah.edu Nicolas Joly njoly@pasteur.fr Nicolás Lichtmaier jnl@synapsis-sa.com.ar Nishio Futoshi fut_nis@d3.dion.ne.jp Noah Elliott elliott@hera.llnl.gov Noah Friedman friedman@gnu.ai.mit.edu Noah Misch noah@cs.caltech.edu Norman Gray ? Olaf Lenz olenz@fias.uni-frankfurt.de Ole Holm Nielsen Ole.H.Nielsen@fysik.dtu.dk Oliver Kiddle opk@zsh.org Olly Betts olly@survex.com Ossama Othman ossama@debian.org Pallav Gupta pallavgupta@gmail.com Paolo Bonzini bonzini@gnu.org Patrick Tullmann tullmann@cs.utah.edu Patrick Welche prlw1@newn.cam.ac.uk Paul Berrevoets paul@swi.com Paul D. Smith psmith@gnu.org Paul Eggert eggert@cs.ucla.edu Paul Gampe paulg@apnic.net Paul Jarc prj@po.cwru.edu Paul Martinolich martinol@datasync.com Paul Pogonyshev ? Paul Townsend ? Pavel Roskin pavel_roskin@geocities.com Per Øyvind Karlsen peroyvind@mandriva.org Peter Breitenlohner peb@mppmu.mpg.de Peter Eisentraut peter_e@gmx.net Peter Hendrickson pdh@wiredyne.com Peter O'Gorman peter@pogma.com Peter Palfrader weasel@debian.org Peter Simons simons@cryp.to Peter Stephenson pws@csr.com Philipp Thomas kthomas@gwdg.de Philippe De Muyter ? Pierre pierre42d@9online.fr 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 Menzel menzel@ls6.cs.uni-dortmund.de Ralf S. Engelschall rse@engelschall.com Ralf Wildenhues Ralf.Wildenhues@gmx.de Reuben Thomas rrt@sc3d.org 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 Roger Leigh rleigh@whinlatter.ukfsn.org Roland McGrath roland@gnu.org Rolf Ebert rolf.ebert.gcc@gmx.de Rolf Vandevaart Rolf.Vandevaart@sun.com Romain Lenglet romain.lenglet@laposte.net Ruediger Kuhlmann info@ruediger-kuhlmann.de Ruslan Babayev ruslan@babayev.com Russ Allbery rra@stanford.edu Russ Boylan ross@biostat.ucsf.edu Ryuji Abe raeva@t3.rim.or.jp Sam Sexton Sam.Sexton@reuters.com Sam Sirlin sam@kalessin.jpl.nasa.gov Sam Varshavchik mrsam@courier-mta.com Sander Niemeijer niemeijer@science-and-technology.nl Scott Bambrough scottb@corelcomputer.com Scott Stanton stanton@scriptics.com Sebastian Freundt hroptatyr@gna.org Sergey Poznyakoff ? Simon Josefsson jas@extundo.com Simon Leinen simon@lia.di.epfl.ch Slava Sysoltsev Viatcheslav.Sysoltsev@h-d-gmbh.de Stefan Seefeld stefan@codesourcery.com Stefan `Sec' Zehl ? Stepan Kasal kasal@ucw.cz Stéphane Chazelas Stephane_Chazelas@yahoo.fr Stephen Gildea filtered@against.spam Stephen Rasku srasku@mail.tantalus-systems.com Stephen P. Schaefer sschaefer@acm.org Steve Chamberlain sac@cygnus.com Steve Huston shuston@riverace.com Steve Robbins steve@nyongwa.montreal.qc.ca Steven G. Johnson stevenj@alum.mit.edu Steven R. Loomis srl@icu-project.org Stu Grossman grossman@cygnus.com Sumit Pandya sumit@elitecore.com Syd Polk spolk@cygnus.com T.E. Dickey dickey@clark.net Ted Bullock tbullock@canada.com Theodore Ts'o tytso@mit.edu Thien-Thi Nguyen ttn@gnu.org Thomas Winder tom@vlsivie.tuwien.ac.at Tim Freeman tim@fungible.com Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu Tim Rice tim@multitalents.net Tim Van Holder tim.van.holder@pandora.be Tom Browder tom.browder@gmail.com Tom Epperly tepperly@llnl.gov Tom Lane tgl@sss.pgh.pa.us Tom Purcell Tom.Purcell@wang.com Tom Tromey tromey@cygnus.com Tom Yu tlyu@mit.edu Tomohiro Suzuki ? Tony Leneis tony@plaza.ds.adp.com Toshio Kuratomi ? Uwe Seimet us@orbacus.com Vance Shipley vances@motivity.ca Viktor Dukhovni viktor@anaheim.esm.com Ville Karaila karaila@iki.fi Vincent Lefèvre vincent@vinc17.org Vincent Torri vtorri at univ-evry.fr Vladimir Volovich vvv@vsu.ru Volker Borchert bt@teknon.de Wayne Chapeskie waynec@spinnaker.com Werner Lemberg wl@gnu.org Wilfredo Sanchez wsanchez@apple.com William Pursell bill.pursell@gmail.com Wolfgang Mueller Wolfgang.Mueller@cui.unige.ch Yury Puhalsky pooh@cryptopro.ru Zack Weinberg zack@codesourcery.com ? Seanster@Seanster.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 coding: utf-8 End: Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 3 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, see . autoconf2.64_2.64+dfsg.orig/AUTHORS0000644000175000017500000001621011207476641015317 0ustar smcvsmcvAuthors of GNU Autoconf. Autoconf was originally written by David MacKenzie, with help from Franç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. Other maintainers have included Akim Demaille, Jim Meyering, Alexandre Oliva, and Tom Tromey, with plenty of contributions from Lars J. Aas, Mo DeJong, Steven G. Johnson, Matthew D. Langston, Pavel Roskin. Today, the primary maintainers are Paul Eggert and Eric Blake, with help from Ralf Wildenhues, Stepan Kasal, and Benoit Sigoure. Many other people have contributed, as listed in the THANKS file. The following contributors have warranted legal paper exchanges with the Free Software Foundation for their contributions to GNU Autoconf. This list results from searching for AUTOCONF in the file /gd/gnuorg/copyright.list on the fencepost.gnu.org machine. David J. MacKenzie djm@gnu.org 1991-07-09 James L. Avera ? 1993-10-04 Roland McGrath roland@gnu.org 1994-06-24 Noah Friedman friedman@gnu.org 1994-07-15 Francois Pinard pinard@iro.umontreal.ca 1997-02-02 Thomas E. Dickey dickey@clark.net 1998-01-11 Matthew D. Langston langston@slac.stanford.edu 1998-09-29 Mark Elbrecht snowball3@usa.net 1999-01-11 Akim Demaille akim@gnu.org 1999-02-02 Pavel Roskin pavel_roskin@geocities.com 1999-02-24 Alexandre Oliva oliva@dcc.unicamp.br 1999-03-26 Thomas Tanner tanner@ffii.org 1999-06-23 Gary V. Vaughan gary@gnu.org 2000-01-10 Joseph Samuel Myers jsm28@cam.ac.uk 2000-03-13 Lars J. Aas larsa@sim.no 2000-07-07 Morten Eriksen mortene@sim.no 2000-07-07 Martin Wilck martin@tropos.de 2000-07-12 Paul Eggert eggert@twinsun.com 2000-10-13 Alexandre Duret-Lutz duret_g@epita.fr 2001-02-12 Tim Van Holder tim.van.holder@pandora.be 2001-02-13 Christian Marquardt marq@gfz-potsdam.de 2001-02-19 Derek R. Price dprice@collab.net 2001-03-12 Markus Kuhn Markus.Kuhn@cl.cam.ac.uk 2001-07-07 Erik Lindahl erik@theophys.kth.se 2001-08-22 Hans-Peter Nilsson hp@bitrange.com 2001-10-24 Paul Wagland paul@wagland.net 2001-10-30 Paolo Bonzini bonzini@gnu.org 2001-11-08 Nishio Futoshi fut_nis@d3.dion.ne.jp 2002-01-23 Federico G. Schwindt fgsch@openbsd.org 2002-05-21 Mark D. Roth roth@feep.net 2002-05-28 Greg McGary greg@mcgary.org 2002-06-05 Charles Stephen Wilson cwilson@ece.gatech.edu 2002-07-25 Robert Bernstein rocky@panix.com 2002-08-20 Assar Westerlund assar@kth.se 2002-09-13 Scott Bambrough sbambrough@storm.ca 2002-09-24 Richard Dawe rich@phekda.freeserve.co.uk 2003-01-23 Andreas Buening andreas.buening@nexgo.de 2003-02-18 Raja R. Harinath harinath@acm.org 2003-02-25 Ilya Zakharevich ilya@Math.Berkeley.EDU 2003-03-11 Kaveh Ghazi ghazi@caip.rutgers.edu 2003-03-15 Felix Lee felix.1@canids.net 2003-03-31 Nathanael Nerode neroden@twcny.rr.com 2003-04-04 Gavin Puche user42@zip.com.au 2003-04-10 Steven Glenn Johnson stevenj@alum.mit.edu 2003-07-26 Bernardo Innocenti bernie@codewiz.org 2003-07-31 Albert Marsden Chin-A-Young china@thewrittenword.com 2003-08-02 Ralf Corsepius corsepiu@faw.uni-ulm.de 2003-09-03 Scott Remnant scott@netsplit.com 2003-10-04 Daniel Jacobowitz dan@debian.org 2003-10-17 Kevin Fleming kpfleming@backtobasicsmgmt.com 2003-11-17 John David Anglin dave.anglin@nrc-cnrc.gc.ca 2004-01-21 Eric Sunshine sunshine@sunshineco.com 2004-01-25 Ralf Wildenhues Ralf.Wildenhues@gmx.de 2004-02-12 Noah Jeffrey Misch noah@cs.caltech.edu 2004-07-05 Thorsten Glaser tg@66h.42h.de 2004-10-11 Peter O'Gorman peter@pogma.com 2004-11-14 Toshio Ernie Kuratomi toshio@tiki-lounge.com 2004-11-17 Roger Leigh rleigh@whinlatter.ukfsn.org 2004-12-09 Ian Lance Taylor ian@airs.com 2004-12-22 Daniel Manthey dan_manthey@partech.com 2005-02-14 Gregorio Guidi greg_g@gentoo.org 2005-03-03 Bruno Haible bruno@clisp.org 2005-06-12 Toby Oliver Hilary White tow21@cam.ac.uk 2005-10-18 Eric Benjamin Blake ebb9@byu.net 2006-01-18 Romain Lenglet romain.lenglet@laposte.net 2006-02-10 Markus Duft markus.duft@salomon.at 2006-08-03 Robert Schiele rschiele@gmail.com 2006-09-12 Joel Edward Denny jdenny@clemson.edu 2006-09-15 Helge Deller deller@gmx.de 2007-02-01 Benoit Sigoure tsuna@lrde.epita.fr 2007-04-20 Bob Proulx bob@proulx.com 2007-06-25 Bruce Korb bkorb@gnu.org 2008-05-06 Benjamin Pfaff blp@gnu.org 2008-09-29 ======================================================================== Local Variables: mode: text coding: utf-8 End: Copyright (C) 1996, 2000, 2001, 2005, 2007, 2008 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 3 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, see . autoconf2.64_2.64+dfsg.orig/Makefile.in0000644000175000017500000006432611233217356016322 0ustar smcvsmcv# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # Make Autoconf. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, # 2009 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 3 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, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS THANKS TODO build-aux/config.guess \ build-aux/config.sub build-aux/elisp-comp build-aux/install-sh \ build-aux/mdate-sh build-aux/missing build-aux/texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.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 config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkgdatadir)" DATA = $(pkgdata_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags 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)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # bin/ must be run first, as it builds executables needed for tests. # autom4te uses autotest.m4f to generate `testsuite', so build tests last. # Rules in man/ use scripts from both bin/ and tests/, so *it* goes last. SUBDIRS = bin . lib doc tests man ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \ BUGS COPYINGv3 \ GNUmakefile maint.mk cfg.mk \ build-aux/gendocs.sh \ build-aux/git-version-gen \ build-aux/announce-gen build-aux/gnupload \ .prev-version .version AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split @MAKE_CASE_SENSITIVE_TRUE@pkgdata_DATA = $(srcdir)/INSTALL @MAKE_CASE_SENSITIVE_TRUE@MAINTAINERCLEANFILES = $(srcdir)/INSTALL # Version string management. There are two files to be aware of: # .tarball-version - present only in a distribution tarball, and not in # a checked-out repository. Created with contents that were learned at # the last time autoconf was run, and used by git-version-gen. Must not # be present in either $(srcdir) or $(builddir) for git-version-gen to # give accurate answers during normal development with a checked out tree, # but must be present in a tarball when there is no version control system. # Therefore, it cannot be used in any dependencies. GNUmakefile has # hooks to force a reconfigure at distribution time to get the value # correct, without penalizing normal development with extra reconfigures. # .version - present in a checked-out repository and in a distribution # tarball. At least as current as the most recent .tarball-version # creation. Usable in dependencies, particularly for files that don't # want to depend on config.h but do want to track version changes. BUILT_SOURCES = $(top_srcdir)/.version all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: 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) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files # 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): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || 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 $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | 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 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | 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 | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.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) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__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 ../.. && umask 077 && mkdir "$$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 \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -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-local \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgdataDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: 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-pkgdataDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-local \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pkgdataDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am uninstall-pkgdataDATA @MAKE_CASE_SENSITIVE_TRUE@$(srcdir)/INSTALL: $(top_srcdir)/doc/install.texi @MAKE_CASE_SENSITIVE_TRUE@ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) --plaintext -o $@ \ @MAKE_CASE_SENSITIVE_TRUE@ $(top_srcdir)/doc/install.texi $(top_srcdir)/.version: echo $(VERSION) > $@-t && mv $@-t $@ # Arrange so that .tarball-version appears only in distribution tarballs, # never in a checked-out repository. dist-hook: echo $(VERSION) > $(distdir)/.tarball-version # Arrange to remove the symlink to GNUmakefile in VPATH builds. # TODO remove this once automake vs. AC_CONFIG_LINKS issue is fixed. distclean-local: if test x"$(VPATH)" != x ; then rm -f GNUmakefile ; 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.64_2.64+dfsg.orig/ChangeLog.10000644000175000017500000020626211204770547016167 0ustar smcvsmcvThu 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 (C) 1992, 1993, 1994 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 3 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, see . autoconf2.64_2.64+dfsg.orig/NEWS0000644000175000017500000021615711233215474014754 0ustar smcvsmcvGNU Autoconf NEWS - User visible changes. * Major changes in Autoconf 2.64 (2009-07-26) [stable] Released by Eric Blake, based on git versions 2.63b.*. ** Autoconf now requires GNU M4 1.4.6 or later. Earlier versions of M4 have a bug in regular expression handling that interferes with some of the speedups provided since Autoconf 2.63. GNU M4 1.4.13 or later is recommended. ** AS_IF and AS_CASE have been taught to avoid syntax errors even when given arguments that expand to just whitespace. ** The following documented autoconf macros are new: AC_ERLANG_SUBST_ERTS_VER ** The autoheader tool now understands m4 macro arguments passed to AC_DEFINE and AC_DEFINE_UNQUOTED. ** Ensure AT_CHECK can support commands that include a # given with proper m4 quoting. For shell comments, this is a new feature; for non-shell comments, this fixes a regression introduced in 2.63b. Additionally, AT_CHECK correctly supplies shell escapes for metacharacters occurring in m4 macro expansions within the expected stdout and stderr parameters. ** The macro AT_CHECK now understands the concept of hard failure. If a test exits with an unexpected status 99, cleanup actions for the test are inhibited and the test is treated as a failure regardless of AT_XFAIL_IF. It also understands the new directives ignore-nolog, stdout-nolog, and stderr-nolog. ** The following documented autotest macros are new: AT_CHECK_UNQUOTED AT_FAIL_IF AT_SKIP_IF ** The following documented m4sugar macros are new: m4_argn m4_copy_force m4_default_nblank m4_default_nblank_quoted m4_ifblank m4_ifnblank m4_rename_force ** The autoconf testsuite now exercises all Erlang macros. * Major changes in Autoconf 2.63b (2009-03-31) [beta] Released by Eric Blake, based on git versions 2.63.*. ** The manual is now shipped under the terms of the GNU FDL 1.3. ** AC_REQUIRE now detects the case of an outer macro which first expands then later indirectly requires the same inner macro. Previously, this case led to silent out-of-order expansion (bug present since 2.50); it now issues a syntax warning, and duplicates the expansion of the inner macro to guarantee dependencies have been met. See the manual for advice on how to refactor macros in order to avoid the bug in earlier autoconf versions and avoid increased script size in the current version. ** AC_DEFUN_ONCE has improved semantics. Previously, a macro declared with AC_DEFUN_ONCE warned on a second invocation; and out-of-order expansion was still possible. Now, dependencies are guaranteed, and subsequent invocations are a silent no-op. This makes AC_DEFUN_ONCE an ideal macro for silencing AC_REQUIRE warnings. ** The following macros are now defined with AC_DEFUN_ONCE. This means a subtle change in semantics; previously, an AC_DEFUN macro could expand one of these macros multiple times or surround the macro inside shell conditional text to bypass the effects of these macros, but now the macro will expand exactly once, and prior to the start of any enclosing AC_DEFUN macro: AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET AC_HEADER_ASSERT AC_PROG_INSTALL AC_PROG_MKDIR_P AC_USE_SYSTEM_EXTENSIONS ** AC_LANG_ERLANG works once again (regression introduced in 2.61a). ** AC_HEADER_ASSERT is fixed so that './configure --enable-assert' no longer mistakenly disables assertions. ** AC_INIT now takes an optional fifth parameter that can be used to set AC_PACKAGE_URL, a URL for the package's home page; the URL is used in `configure --help' and is also available via AC_DEFINE. ** Autotest testsuites accept an option --jobs[=N] for parallel testing. This feature is still in testing, and may not work on every platform, help in improving it would be appreciated. ** Autotest testsuites do not attempt to write startup error messages to the log file before that is opened (regression introduced in 2.63). ** Configure scripts now use shell functions. This feature leads to smaller configure files and faster execution. ** Present But Cannot Be Compiled: Autoconf will now proceed with the compiler's result if a header is present but cannot be compiled. The warning is still printed, and you should really fix it by providing a fourth parameter to AC_CHECK_HEADER/AC_CHECK_HEADERS. ** Autoreconf added aclocal to the set of programs affected by the `autoreconf -I dir' option. ** The following documented m4sugar macros are new: m4_chomp m4_chomp_all m4_cleardivert m4_curry m4_default_quoted m4_esyscmd_s m4_map_args m4_map_args_pair m4_map_args_sep m4_map_args_w m4_set_map m4_set_map_sep m4_stack_foreach m4_stack_foreach_lifo m4_stack_foreach_sep m4_stack_foreach_sep_lifo ** The following m4sugar macros are documented now, but in some cases with slightly different semantics than what the previous undocumented version had: m4_copy m4_dumpdefs m4_rename m4_version_prereq ** The m4sugar macro m4_expand has been taught to handle unterminated comments and shell case statements. As a result, it is used internally in more places, such as AC_DEFINE and AT_CHECK. Most uses of AC_DEFINE and AT_CHECK should not behave any differently; however, it may be necessary to add double-quoting around unbalanced `(' where single-quoting used to be sufficient. ** The following documented m4sh macros are new: AS_INIT_GENERATED AS_LINENO_PREPARE AS_ME_PREPARE AS_SET_STATUS AS_VAR_APPEND AS_VAR_ARITH AS_VAR_COPY ** The following m4sh macros are documented now, but in some cases with slightly different semantics than what the previous undocumented version had: AS_ECHO AS_ECHO_N AS_ESCAPE AS_EXIT AS_LITERAL_IF AS_UNSET AS_VAR_IF AS_VAR_POPDEF AS_VAR_PUSHDEF AS_VAR_SET AS_VAR_SET_IF AS_VAR_TEST_SET AS_VERSION_COMPARE ** The m4sh macros AS_IF and AS_CASE can now be used in shell lists. The responsibility for supplying a trailing newline now belongs to the call site, but since most users did not add dnl, this generally results in fewer empty lines in configure. * Major changes in Autoconf 2.63 (2008-09-09) [stable] Released by Eric Blake, based on git versions 2.62.*. ** AC_C_BIGENDIAN does not mistakenly report "universal" for some bigendian hosts, a regression introduced with universal binary support in 2.62. ** AC_PATH_X now includes /lib64 and /usr/lib64 in its list of default library directories. ** AC_USE_SYSTEM_EXTENSIONS no longer conflicts with an external AC_DEFINE([__EXTENSIONS__]). This fixes a regression introduced in 2.62 when using macros such as AC_AIX that were made obsolete in favor of the more portable AC_USE_SYSTEM_EXTENSIONS. ** AC_CHECK_TARGET_TOOLS is usable in the non-cross-compile case. ** Newly obsolete macros The following macro has been marked obsolete, since current porting targets can safely assume C89 semantics that signal handlers return void. We have no current plans to remove the macro. AC_TYPE_SIGNAL ** The macros m4_map and m4_map_sep now ignore any list elements consisting of just empty quotes, and m4_map_sep now expands its separator. This fixes a regression in 2.62 when these macros were first documented, for the sake of clients expecting the semantics that these macros had prior to that time. The new macros m4_mapall and m4_mapall_sep, along with extra quoting of the separator, can be used to get the semantics that m4_map_sep had in 2.62. ** Clients of m4_expand, such as AS_HELP_STRING and AT_SETUP, can now handle properly quoted but otherwise unbalanced parentheses (for some macros, this fixes a regression in 2.62). ** Two new quadrigraphs have been introduced: @{:@ for (, and @:}@ for ), allowing the output of unbalanced parentheses in more contexts. ** The following m4sugar macros are new: m4_cleardivert m4_joinall m4_mapall m4_mapall_sep m4_reverse m4_set_add m4_set_add_all m4_set_contains m4_set_contents m4_set_delete m4_set_difference m4_set_dump m4_set_empty m4_set_foreach m4_set_intersection m4_set_list m4_set_listc m4_set_remove m4_set_size m4_set_union ** The following m4sugar macros now accept multiple arguments, as is the case with underlying m4: m4_defn m4_popdef m4_undefine ** The following m4sugar macros now guarantee linear scaling; they previously had linear scaling with m4 1.6 but quadratic scaling when using m4 1.4.x. All macros built on top of these also gain the scaling improvements. m4_bmatch m4_bpatsubsts m4_case m4_cond m4_do m4_dquote_elt m4_foreach m4_join m4_list_cmp m4_map m4_map_sep m4_max m4_min m4_shiftn ** AT_KEYWORDS once again performs expansion on its argument, such that AT_KEYWORDS([m4_if([$1], [], [default])]) no longer complains about the possibly unexpanded m4_if [regression introduced in 2.62]. ** Config header templates `#undef UNDEFINED /* comment */' do not lead to nested comments any more; regression introduced in 2.62. * Major changes in Autoconf 2.62 (2008-04-05) [stable] Released by Eric Blake, based on git versions 2.61a.*. ** Many optimizations have been applied to make overall execution faster. ** Autotest now makes use of shell functions. ** config.status now uses awk instead of sed also for config headers. - As a side effect, AC_DEFINE and AC_DEFINE_UNQUOTED now handle multi-line values, i.e., backslash-newline combinations are handled correctly. Further, for config headers, the total size of values is not limited by the POSIX length limit of text lines any more, only each single line. ** New config variable `top_build_prefix'. ** New Autoconf macros: AC_AUTOCONF_VERSION AC_OPENMP AC_PATH_PROGS_FEATURE_CHECK ** AC_C_BIGENDIAN now supports universal binaries a la Mac OS X. ** AC_C_RESTRICT now prefers to #define 'restrict' to a variant spelling like '__restrict' if the variant spelling is available, as this is more likely to work when mixing C and C++ code. ** AC_CHECK_ALIGNOF's type argument T is now documented better: it must be a string of tokens such that "T y;" is a valid member declaration in a struct. ** AC_CHECK_SIZEOF now accepts objects as well as types: the general rule is that sizeof (X) works, then AC_CHECK_SIZEOF (X) should work. ** AC_CHECK_TYPE and AC_CHECK_TYPES now work on any C type-name; formerly, they did not work for function types. In C++, they now work on any type-id that can be the operand of sizeof; this is similar to C, except it excludes anonymous struct and union types. Formerly, some (but not all) C++ types involving anonymous struct and union were accepted, though this was not documented. ** AC_CONFIG_LINKS now prefers to link against files in the build tree if found, and it works to link against a file of the same name in the source tree, even if both trees coincide. ** AC_INIT no longer alters $@; regression introduced in 2.60. ** AC_USE_SYSTEM_EXTENSIONS now defines _ALL_SOURCE for Interix platforms. ** AS_HELP_STRING no longer underquotes its first argument; it also handles the case where the first argument contains single-quoted commas. For example, "AS_HELP_STRING([-a, [--arg[=foo]]], [bar])" produces: " -a, --arg[=foo] bar" Additionally, the macro now takes two additional arguments, indent-column and wrap-column; these should not normally be needed, but can be used to fine-tune how the output text is wrapped. ** AC_PROG_INSTALL now requires an install program that can install multiple files into a target directory. ** The command 'autoconf -' now correctly processes a file from stdin. ** 'autoreconf -m' now honors $MAKE. ** For all of the directory arguments for 'configure', such as '--prefix' or '--bindir', trailing slashes are stripped. As an example, if tab completion in the user's shell appends trailing slashes, the command './configure --prefix=/usr/' will still result in an expanded libdir value of /usr/lib, not /usr//lib. ** `configure --help=recursive' now works in read-only trees and from unconfigured build trees. ** If precious variables differ only in whitespace, then the cache consistency check warns instead of fails, and reuses the old value. ** AT_BANNER is now documented. ** AT_SETUP now handles macro expansions properly when calculating line length. ** Autotest now determines $srcdir correctly. ** Testsuites built by autotest now accept a -C/--directory=DIR option to adjust the working directory prior to creating files. ** Autoconf now requires GNU M4 1.4.5 or later. Earlier versions of M4 have a bug in macro tracing that interferes with the interaction between Autoconf and Automake. GNU M4 1.4.11 or later is recommended. The configure search for a working M4 is improved. ** For portability with the eventual M4 2.0, macros should no longer use anything larger than $9 to refer to arguments. ** Documentation for m4sugar is improved. - The following macros were previously available as undocumented interfaces; the macros are now documented as stable interfaces. __oline__ m4_assert m4_bmatch m4_bpatsubsts m4_car m4_case m4_cdr m4_default m4_divert_once m4_divert_pop m4_divert_push m4_divert_text m4_do m4_errprintn m4_fatal m4_flatten m4_ifndef m4_ifset m4_ifval m4_ifvaln m4_location m4_n m4_shiftn m4_strip m4_warn - The following macros were previously available as undocumented interfaces, but had bug fixes or semantic changes as part of this release. Packages that relied on the undocumented behavior should be analyzed to make sure they will still work with the new documented behavior. m4_cmp m4_list_cmp m4_join m4_map m4_map_sep m4_sign m4_text_box m4_text_wrap m4_version_compare - The m4_wrap macro used to have unspecified order, but now guarantees FIFO order. m4_wrap_lifo was added to guarantee LIFO order. - Packages using the undocumented m4sugar macro m4_PACKAGE_VERSION should consider using the new AC_AUTOCONF_VERSION instead. - m4sugar macros that are not documented in the manual are still deemed experimental, and should not be used outside of Autoconf. ** The m4sugar macros m4_append and m4_append_uniq, first documented in 2.60, have been fixed to treat both the string and the separator arguments consistently with regards to quoting. Prior to this fix, m4_append_uniq could mistakenly duplicate entries if the expansion of the separator resulted in a different string (for example, if it contained quotes, a comma, or a macro name). However, it means that programs previously using m4_append([name], [string], [[, ]]) are now using a four-character separator instead of the intended comma and space. If you need portability to earlier versions of Autoconf, you can insert the following snippet after AC_INIT but before any other macro expansions, to enforce the new semantics: m4_pushdef([m4_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) Additionally, m4_append_uniq now takes optional parameters that can be used to take action depending on whether anything was appended, and warns if a non-empty separator occurs within the string being appended, since that can lead to duplicates. ** The following m4sugar macros are new: m4_append_uniq_w m4_apply m4_combine m4_cond m4_count m4_dquote_elt m4_echo m4_expand m4_ignore m4_make_list m4_max m4_min m4_newline m4_shift2 m4_shift3 m4_unquote m4_wrap_lifo ** Warnings are now generated by default when an installer invokes 'configure' with an unknown --enable-* or --with-* option. These warnings can be disabled with the new AC_DISABLE_OPTION_CHECKING macro, or by invoking 'configure' with --disable-option-checking. ** Existing obsolete macros The documentation for the following macros is adjusted to make it more clear that they have previously been marked obsolete, as their functionality can be accomplished by other macros. We have no current plans to remove them from Autoconf. AC_ENABLE AC_STRUCT_ST_BLKSIZE AC_STRUCT_ST_RDEV AC_WITH ** Newly obsolete macros The following macros have been marked obsolete, as they only perform a subset of AC_USE_SYSTEM_EXTENSIONS. We have no current plans to remove them. AC_AIX AC_GNU_SOURCE AC_ISC_POSIX AC_MINIX ** AC_C_LONG_DOUBLE is obsolescent. The documentation now says that AC_C_LONG_DOUBLE is obsolescent: it tests for problems that are so old that it is no longer of practical importance on current systems. New programs need not use AC_C_LONG_DOUBLE. We have no current plans to remove it. ** AC_DIAGNOSE, AC_WARNING, and AC_FATAL are obsolescent. The documentation now favors the use of M4sugar macros m4_warn and m4_fatal, since the naming makes it more obvious that the diagnostics are associated with M4 expansion (ie. when running `autoconf'), and offers less confusion with the AC_MSG_ERROR, AC_MSG_FAILURE, and AC_MSG_WARN macros which manage diagnostics when running `configure'. We have no current plans to remove these macros. * Major changes in Autoconf 2.61a (2006-12-11) ** AC_FUNC_FSEEKO was broken in 2.61; it didn't make fseeko and ftello visible on many platforms. This has been fixed. ** AC_FUNC_SETVBUF_REVERSED is now obsolete. It is still defined for backward compatibility but it does nothing. The macro was already obsolescent, as the last systems to have the problem were those based on SVR2, which became obsolete in 1987. The macro had bugs on some modern systems and could no longer be maintained reliably due to lack of ancient systems to test it on. ** config.status now uses awk instead of sed for most substitutions, for speed. - As a side effect multi-line values of substituted variables no longer have a small limit in total size, though for portability each line should not exceed the POSIX length limit for text lines. - It is now documented that Makefile.in should not contain overlapping variable occurrences, e.g., @VAR1@VAR2@. Autoconf's behavior was always iffy in such cases, and the awk implementation has changed the behavior. ** Many uses of 'echo' have been rewritten so that Autoconf-generated scripts have fewer problems with strings or file names containing embedded special characters such as backslash or leading "-". This was implemented by using `printf '%s\n' "$foo"' instead of `echo "$foo"' when printf works. Due to the implementation technique used, Autoconf-generated scripts now run considerably more slowly on ancient implementations lacking printf. However, this should not be a problem, since Autoconf-generated scripts in practice invariably find a more-modern shell these days. * Major changes in Autoconf 2.61 (2006-11-17) ** New macros AC_C_FLEXIBLE_ARRAY_MEMBER, AC_C_VARARRAYS. ** AC_ARG_ENABLE and AC_ARG_WITH now allow '.' in feature and package names. * Major changes in Autoconf 2.60b (2006-10-22) ** BIN_SH Autoconf-generated shell scripts no longer export BIN_SH, due to configuration hassles with this. Installers who need BIN_SH in their environment should set it before invoking 'configure' and 'make'. As far as we know, this affects only Unixware installations. ** Obsolescent macros The documentation now says that the following macros are obsolescent, as they are superseded by Gnulib: AC_FUNC_FNMATCH AC_FUNC_FNMATCH_GNU AC_FUNC_GETLOADVG AC_REPLACE_FNMATCH New programs should use the Gnulib counterparts of these macros. We have no current plans to remove them from Autoconf. ** AC_COMPUTE_INT no longer caches or reports results. ** AC_CHECK_DECL now also works with aggregate objects. ** AC_USE_SYSTEM_EXTENSIONS now defines _TANDEM_SOURCE for NonStop platforms. ** GNU M4 1.4.7 or later is now recommended. ** m4_mkstemp New M4sugar macro, which is more secure than the POSIX M4 maketemp. ** m4_maketemp Now an alias for m4_mkstemp. * Major changes in Autoconf 2.60a (2006-08-25) ** GNU M4 1.4.6 or later is now recommended. ** The check for C99 now tests for varargs macros, as documented. It also tests that the preprocessor supports 64-bit integers. ** Autoconf now uses constructs like "#ifdef HAVE_STDLIB_H" rather than "#if HAVE_STDLIB_H", so that it now works with "gcc -Wundef -Werror". ** The functionality of the undocumented _AC_COMPUTE_INT is now provided by a public and documented macro, AC_COMPUTE_INT. The parameters to the two macros are different, so autoupdate will not change the old private name to the new one. _AC_COMPUTE_INT may be removed in a future release. ** AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT now require that long long types be at least 64 bits wide, as C99 and tradition requires. Formerly, they accepted implementations of any width. * Major changes in Autoconf 2.60 Released 2006-06-23, by Ralf Wildenhues. ** Autoconf no longer depends on whether m4wrap is FIFO (as Posix requires) or LIFO (as in GNU M4 1.4.x). GNU M4 2.0 is expected to conform to Posix here, so m4wrap/m4_wrap users should no longer depend on LIFO behavior. ** Provide a way to turn off warnings about the changed directory variables. * Major changes in Autoconf 2.59d Released 2006-06-05, by Ralf Wildenhues. ** GNU make now recommended for VPATH builds INSTALL now suggests VPATH builds (e.g., "sh ../srcdir/configure") only if you use GNU make. In practice, other 'make' implementations have too many subtle incompatibilities in their support for VPATH. Many packages (including Autoconf itself) are portable to other 'make' implementations, but some packages are not, and recommending GNU make keeps the installation instructions simpler. ** Even more safety checks for the new Directory variables: Warn about suspicious `${datarootdir}' found in config files output. ** AC_TRY_COMMAND, AC_TRY_EVAL, ac_config_guess, ac_config_sub, ac_configure These never-documented macros and variables have been marked with comments saying that they may be removed in a future release, because their use can lead to unintended code being executed. If you need functionality that only these macros or variables currently supply, please write bug-autoconf@gnu.org. ** AC_SUBST, AC_DEFINE Literal arguments to these are passed to m4_pattern_allow now. ** AC_PROG_CC_STDC Passing 'ac_cv_prog_cc_stdc=no' to 'configure' now sets ac_cv_prog_cc_c99 and ac_cv_prog_cc_c89 to 'no' as well, for backward compatibility with obsolete K&R tests in the Automake test suite. ** AC_PROG_CXX_C_O New macro. ** AC_PROG_MKDIR_P New macro. ** AS_MKDIR_P Now more robust with special characters in file names, or when multiple processes create the same directory at the same time. ** Obsolescent macros The documentation now says that the following macros are obsolescent: they test for problems that are so old that they are no longer of practical importance on current systems. AC_C_BACKSLASH_A AC_FUNC_MEMCMP AC_HEADER_DIRENT AC_C_CONST AC_FUNC_SELECT_ARGTYPES AC_HEADER_STAT AC_C_PROTOTYPES AC_FUNC_SETPGRP AC_HEADER_STDC AC_C_STRINGIZE AC_FUNC_SETVBUF_REVERSED AC_HEADER_SYS_WAIT AC_C_VOLATILE AC_FUNC_STAT AC_HEADER_TIME AC_FUNC_CLOSEDIR_VOID AC_FUNC_STRFTIME AC_ISC_POSIX AC_FUNC_GETPGRP AC_FUNC_UTIME_NULL AC_PROG_GCC_TRADITIONAL AC_FUNC_LSTAT AC_FUNC_VPRINTF AC_STRUCT_TM New programs need not use these macros. We have no current plans to remove them. ** autoreconf For compatibility with future Libtool 2.0, autoreconf will invoke libtoolize with the option `--ltdl' now, if LT_CONFIG_LTDL_DIR is used. * Major changes in Autoconf 2.59c Released 2006-04-12, by Ralf Wildenhues. ** The configure command now redirects standard input from /dev/null, to help avoid problems with subsidiary commands that might mistakenly read standard input. AS_ORIGINAL_STDIN_FD points to the original standard input before this redirection, if you really want configure to read from standard input. ** Directory variables adjusted to recent changes in the GNU Coding Standards. The following directory variables are new: datarootdir read-only architecture-independent data root [PREFIX/share] localedir locale-specific message catalogs [DATAROOTDIR/locale] docdir documentation root [DATAROOTDIR/doc/PACKAGE] htmldir html documentation [DOCDIR] dvidir dvi documentation [DOCDIR] pdfdir pdf documentation [DOCDIR] psdir ps documentation [DOCDIR] The following variables have new default values: datadir read-only architecture-independent data [DATAROOTDIR] infodir info documentation [DATAROOTDIR/info] mandir man documentation [DATAROOTDIR/man] This means that if you use any of `@datadir@', `@infodir@', or `@mandir@' in a file, you will have to ensure `${datarootdir}' is defined in this file. As a temporary measure, if any of those are found but no mention of `datarootdir', the substitutions will be replaced with values that do not contain `${datarootdir}', and a warning will be issued. ** @top_builddir@ is now a dir name: it is always nonempty and doesn't have a trailing slash. Similar change will be made to ac_top_builddir in a future release; the old style value, which matches (../)*, is (and will continue to be) available as ac_top_build_prefix. ** AC_C_TYPEOF New macro to check for support of 'typeof' syntax a la GNU C. ** AC_CHECK_DECLS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_HEADERS_ONCE New "once-only" variants of commonly-used macros, to make 'configure' smaller and faster in common cases. ** AC_FUNC_STRTOLD New macro to check for strtold with C99 semantics. ** AC_HEADER_ASSERT New macro that lets builder disable assertions at 'configure'-time. ** AC_PATH_X Now checks for X11/Xlib.h and XrmInitialize (X proper) rather than X11/Intrinsic.h and XtMalloc (Xt). ** AC_PRESERVE_HELP_ORDER New macro that causes `configure' to display help strings for AC_ARG_ENABLE and AC_ARG_WITH arguments in one region, in the order defined. The default behavior is to group options of each classes separately. ** AC_PROG_CC, AC_PROG_CXX No longer automatically arrange to declare the 'exit' function of C, when a C++ compiler is used. Standard Autoconf macros no longer use 'exit', so this is no longer an issue for them. If you use C++, and want to call 'exit', you'll have to arrange for its declaration yourself. But we now suggest you return from 'main' instead. ** AC_PROG_CC_C89, AC_PROG_CC_C99 New macros for ISO C99 support. AC_PROG_CC_C89 and AC_PROG_CC_C99 check for ANSI C89 and ISO C99 support respectively. ** AC_PROG_CC_STDC Has been unobsoleted, and will check if the compiler supports ISO C99, falling back to ANSI C89 if not. ac_cv_prog_cc_stdc is retained for backwards compatibility, assuming the value of ac_cv_prog_cc_c99 or ac_cv_prog_cc_c89 (whichever is valid, in that order). ** AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE New macros for checking commonly-used members of struct dirent. ** AC_SUBST The substituted value can now contain newlines. ** AC_SUBST_FILE The substitution now occurs only when @variable@ is on a line by itself, optionally surrounded by spaces and tabs. The whole line is replaced. ** AC_TYPE_LONG_DOUBLE, AC_TYPE_LONG_DOUBLE_WIDER New macros to check for long double, and whether it is wider than double. The old macro AC_C_TYPE_LONG_DOUBLE has been marked as obsolete; applications should switch to the new macro. ** AC_TYPE_INT8_T, AC_TYPE_INT16_T, AC_TYPE_INT32_T, AC_TYPE_INT64_T, AC_TYPE_INTMAX_T, AC_TYPE_INTPTR_T, AC_TYPE_LONG_LONG_INT, AC_TYPE_SSIZE_T, AC_TYPE_UINT8_T, AC_TYPE_UINT16_T, AC_TYPE_UINT32_T, AC_TYPE_UINT64_T, AC_TYPE_UINTMAX_T, AC_TYPE_UINTPTR_T, AC_TYPE_UNSIGNED_LONG_LONG_INT New macros to check for C99 and POSIX types. ** AC_USE_SYSTEM_EXTENSIONS New macro to enable extensions to Posix. ** AH_HEADER New macro which is defined to the name of the first declared config header or undefined if no config headers have been declared yet. ** AS_HELP_STRING The macro correctly handles quadrigraphs now. ** AS_BOURNE_COMPATIBLE, AS_SHELL_SANITIZE, AS_CASE These macros are new or published now. ** AT_COPYRIGHT New macro for copyright notices in testsuite files. ** ALLOCA, LIBOBJS, LTLIBOBJS Object names added to these variables are now prefixed with `${LIBOBJDIR}', as in `${LIBOBJDIR}alloca.o'. LIBOBJDIR is meant to be defined from `Makefile.in' in case the object files lie in a different directory. The LIBOBJDIR feature is experimental. ** autoreconf Supports --no-recursive now. ** New macros to support Erlang/OTP. New macros for configuring paths to Erlang tools and libraries: AC_ERLANG_PATH_ERLC, AC_ERLANG_NEED_ERLC, AC_ERLANG_PATH_ERL, AC_ERLANG_NEED_ERL, AC_ERLANG_CHECK_LIB, AC_ERLANG_SUBST_ROOT_DIR, AC_ERLANG_SUBST_LIB_DIR. New macros for configuring installation of Erlang libraries: AC_ERLANG_SUBST_INSTALL_LIB_DIR, AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR. ** The manual now mentions Gnulib more prominently. ** New macros to support Objective C. AC_PROG_OBJC, AC_PROG_OBJCPP. * Major changes in Autoconf 2.59b Released 2004-08-20, by Paul Eggert. ** AC_CHECK_ALIGNOF New macro that computes the default alignment of a type. ** AC_CHECK_TOOL, AC_PATH_TOOL, AC_CHECK_TOOLS When cross-compiling, these macros will give a warning if the tool is not prefixed. In the future, unprefixed cross tools will not be detected; please consult the info documentation for information about the reason of this change. ** AC_CHECK_TARGET_TOOL, AC_PATH_TARGET_TOOL, AC_CHECK_TARGET_TOOLS New macros that detect programs whose name is prefixed with the target type, if the build type and target type are different. ** AC_REQUIRE_AUX_FILE New trace macro that declares expected auxiliary files. ** AC_PROG_GREP New macro that tests for a grep program that accepts as a long a line as possible. ** AC_PROG_EGREP, AC_PROG_FGREP These macros now require AC_PROG_GREP, and try EGREP="$GREP -E" and FGREP="$GREP -F" respectively if possible, or else run a path search for a program that accepts as long a line as possible. ** AC_PROG_SED New macro that tests for a sed program that truncates as few characters as possible. * Major changes in Autoconf 2.59 Released 2003-11-04, by Akim Demaille ** ac_abs_builddir etc. Absolute file names 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_PROGRAM 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 moved to http://bugs.gnu.org/cgi-bin/gnatsweb.pl?database=autoconf (It is no longer available, though.) ** 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 file systems. - 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 name for 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. ** File names 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 name 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 file names it outputs. Instead, you can set the shell variables `gen_files' and `gen_config' to the list of file names 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, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Local Variables: mode: outline End: autoconf2.64_2.64+dfsg.orig/doc/0000755000175000017500000000000012427214025015003 5ustar smcvsmcvautoconf2.64_2.64+dfsg.orig/doc/stamp-vti0000755000175000017500000000013311233217441016651 0ustar smcvsmcv@set UPDATED 26 July 2009 @set UPDATED-MONTH July 2009 @set EDITION 2.64 @set VERSION 2.64 autoconf2.64_2.64+dfsg.orig/doc/Makefile.am0000644000175000017500000000236711157462020017046 0ustar smcvsmcv# Make Autoconf documentation. # Copyright (C) 2000, 2001, 2002, 2003, 2007, 2008, 2009 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 3 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, see . AM_MAKEINFOFLAGS = --no-split TEXI2HTML_FLAGS = -split_chapter TEXINFO_TEX = ../build-aux/texinfo.tex info_TEXINFOS = autoconf.texi standards.texi autoconf_TEXINFOS = fdl.texi install.texi standards_TEXINFOS = fdl.texi gnu-oids.texi make-stds.texi EXTRA_DIST = gendocs_template # 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 autoconf2.64_2.64+dfsg.orig/doc/fdl.texi0000644000175000017500000005601511233202134016442 0ustar smcvsmcv@c The GNU Free Documentation License. @center Version 1.3, 3 November 2008 @c This file is intended to be included within another document, @c hence no sectioning command or @node. @display Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. @uref{http://fsf.org/} 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. The ``publisher'' means any person or entity that distributes copies of the Document to the public. 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 in 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 Warranty 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 under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. @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. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. @item RELICENSING ``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A ``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the site means any set of copyrightable works thus published on the MMC site. ``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. ``Incorporate'' means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is ``eligible for relicensing'' if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. @end enumerate @page @heading 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.3 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@dots{}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.64_2.64+dfsg.orig/doc/standards.info0000644000175000017500000066327011233216140017653 0ustar smcvsmcvThis is standards.info, produced by makeinfo version 4.13 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 June 7, 2009. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3 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 June 7, 2009. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3 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:: Mentioning non-free software or documentation. * GNU Free Documentation License:: Copying and sharing this manual. * Index::  File: standards.info, Node: Preface, Next: Legal Issues, Prev: Top, Up: Top 1 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 June 7, 2009. 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 web server in many different formats, including the Texinfo source, PDF, HTML, DVI, plain text, and more, at: `http://www.gnu.org/prep/standards/'. 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 need 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. `http://www.gnu.org/software/hello/hello.html'.  File: standards.info, Node: Legal Issues, Next: Design Advice, Prev: Preface, Up: Top 2 Keeping Free Software Free **************************** This 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.  File: standards.info, Node: Reading Non-Free Code, Next: Contributions, Up: Legal Issues 2.1 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 memory 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 2.2 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 sent 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. It is also available online for your perusal: `http://www.gnu.org/prep/maintain/'.  File: standards.info, Node: Trademarks, Prev: Contributions, Up: Legal Issues 2.3 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 name "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 3 General Program Design ************************ This chapter discusses some of the issues you should take into account when designing your program. * Menu: * Source Language:: Which languages 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 3.1 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 (`http://www.gnu.org/software/guile/'), which implements the language Scheme (an especially clean and simple dialect of Lisp). Guile also includes bindings for GTK+/GNOME, making it practical to write modern GUI functionality within 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 3.2 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 3.3 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 3.4 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 3.5 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 4 Program Behavior for All Programs *********************************** This 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: * Non-GNU Standards:: We consider standards such as POSIX; we don't "obey" them. * 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. * OID Allocations:: Table of OID slots for GNU. * Memory Usage:: When and how to care about memory needs. * File Usage:: Which files to use, and where.  File: standards.info, Node: Non-GNU Standards, Next: Semantics, Up: Program Behavior 4.1 Non-GNU Standards ===================== The GNU Project regards standards published by other organizations as suggestions, not orders. We consider those standards, but we do not "obey" them. In developing a GNU program, you should implement an outside standard's specifications when that makes the GNU system better overall in an objective sense. When it doesn't, you shouldn't. In most cases, following published standards is convenient for users--it means that their programs or scripts will work more portably. For instance, GCC implements nearly all the features of Standard C as specified by that standard. C program developers would be unhappy if it did not. And GNU utilities mostly follow specifications of POSIX.2; shell script writers and users would be unhappy if our programs were incompatible. But we do not follow either of these specifications rigidly, and there are specific points on which we decided not to follow them, so as to make the GNU system better for users. For instance, Standard C says that nearly all extensions to C are prohibited. How silly! GCC implements many extensions, some of which were later adopted as part of the standard. If you want these constructs to give an error message as "required" by the standard, you must specify `--pedantic', which was implemented only so that we can say "GCC is a 100% implementation of the standard," not because there is any reason to actually use it. POSIX.2 specifies that `df' and `du' must output sizes by default in units of 512 bytes. What users want is units of 1k, so that is what we do by default. If you want the ridiculous behavior "required" by POSIX, you must set the environment variable `POSIXLY_CORRECT' (which was originally going to be named `POSIX_ME_HARDER'). GNU utilities also depart from the letter of the POSIX.2 specification when they support long-named command-line options, and intermixing options with ordinary arguments. This minor incompatibility with POSIX is never a problem in practice, and it is very useful. In particular, don't reject a new feature, or remove an old one, merely because a standard says it is "forbidden" or "deprecated."  File: standards.info, Node: Semantics, Next: Libraries, Prev: Non-GNU Standards, Up: Program Behavior 4.2 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 4.3 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 4.4 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 4.5 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 4.6 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 4.7 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 idiosyncrasies 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 `http://example.org/p.cgi/--help' in a browser should output the same information as invoking `p.cgi --help' from the command line. * Menu: * --version:: The standard output for --version. * --help:: The standard output for --help.  File: standards.info, Node: --version, Next: --help, Up: Command-Line Interfaces 4.7.1 `--version' ----------------- The standard `--version' 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 line stating the license, preferably using one of abbrevations below, and a brief statement that the program is free software, and that users are free to copy and change it. Also mention that there is no warranty, to the extent permitted by law. See recommended wording below. 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 hello 2.3 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 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. (The rules are different for copyright notices in source files; *note Copyright Notices: (maintain)Copyright Notices.) 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. Finally, here is the table of our suggested license abbreviations. Any abbreviation can be followed by `vVERSION[+]', meaning that particular version, or later versions with the `+', as shown above. In the case of exceptions for extra permissions with the GPL, we use `/' for a separator; the version number can follow the license abbreviation as usual, as in the examples below. GPL GNU General Public License, `http://www.gnu.org/licenses/gpl.html'. LGPL GNU Lesser General Public License, `http://www.gnu.org/licenses/lgpl.html'. GPL/Guile GNU GPL with the exception for Guile; for example, GPLv3+/Guile means the GNU GPL version 3 or later, with the extra exception for Guile. GPL/Ada GNU GPL with the exception for Ada. Apache The Apache Software Foundation license, `http://www.apache.org/licenses'. Artistic The Artistic license used for Perl, `http://www.perlfoundation.org/legal'. Expat The Expat license, `http://www.jclark.com/xml/copying.txt'. MPL The Mozilla Public License, `http://www.mozilla.org/MPL/'. OBSD The original (4-clause) BSD license, incompatible with the GNU GPL `http://www.xfree86.org/3.3.6/COPYRIGHT2.html#6'. PHP The license used for PHP, `http://www.php.net/license/'. public domain The non-license that is being in the public domain, `http://www.gnu.org/licenses/license-list.html#PublicDomain'. Python The license for Python, `http://www.python.org/2.0.1/license.html'. RBSD The revised (3-clause) BSD, compatible with the GNU GPL, `http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5'. X11 The simple non-copyleft license used for most versions of the X Window system, `http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3'. Zlib The license for Zlib, `http://www.gzip.org/zlib/zlib_license.html'. More information about these licenses and many more are on the GNU licensing web pages, `http://www.gnu.org/licenses/license-list.html'.  File: standards.info, Node: --help, Prev: --version, Up: Command-Line Interfaces 4.7.2 `--help' -------------- The standard `--help' 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, please place lines giving the email address for bug reports, the package's home page (normally , and the general page for help using GNU programs. The format should be like this: Report bugs to: MAILING-ADDRESS PKG home page: General help using GNU software: It is ok to mention other appropriate mailing lists and web pages.  File: standards.info, Node: Option Table, Next: OID Allocations, Prev: Command-Line Interfaces, Up: Program Behavior 4.8 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 `gawk', `info', `make', `mt', `sed', and `tar'. `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' Used in `uname'. `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. 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' `-r' in `touch'. `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. 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 non-privileged 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: OID Allocations, Next: Memory Usage, Prev: Option Table, Up: Program Behavior 4.9 OID Allocations =================== The OID (object identifier) 1.3.6.1.4.1.11591 has been assigned to the GNU Project (thanks to Werner Koch). These are used for SNMP, LDAP, X.509 certificates, and so on. The web site `http://www.alvestrand.no/objectid' has a (voluntary) listing of many OID assignments. If you need a new slot for your GNU package, write . Here is a list of arcs currently assigned: 1.3.6.1.4.1.11591 GNU 1.3.6.1.4.1.11591.1 GNU Radius 1.3.6.1.4.1.11591.2 GnuPG 1.3.6.1.4.1.11591.2.1 notation 1.3.6.1.4.1.11591.2.1.1 pkaAddress 1.3.6.1.4.1.11591.3 GNU Radar 1.3.6.1.4.1.11591.4 GNU GSS 1.3.6.1.4.1.11591.5 GNU Mailutils 1.3.6.1.4.1.11591.5 GNU Shishi 1.3.6.1.4.1.11591.12 digestAlgorithm 1.3.6.1.4.1.11591.12.2 TIGER/192 1.3.6.1.4.1.11591.13 encryptionAlgorithm 1.3.6.1.4.1.11591.13.2 Serpent 1.3.6.1.4.1.11591.13.2.1 Serpent-128-ECB 1.3.6.1.4.1.11591.13.2.2 Serpent-128-CBC 1.3.6.1.4.1.11591.13.2.3 Serpent-128-OFB 1.3.6.1.4.1.11591.13.2.4 Serpent-128-CFB 1.3.6.1.4.1.11591.13.2.21 Serpent-192-ECB 1.3.6.1.4.1.11591.13.2.22 Serpent-192-CBC 1.3.6.1.4.1.11591.13.2.23 Serpent-192-OFB 1.3.6.1.4.1.11591.13.2.24 Serpent-192-CFB 1.3.6.1.4.1.11591.13.2.41 Serpent-256-ECB 1.3.6.1.4.1.11591.13.2.42 Serpent-256-CBC 1.3.6.1.4.1.11591.13.2.43 Serpent-256-OFB 1.3.6.1.4.1.11591.13.2.44 Serpent-256-CFB 1.3.6.1.4.1.11591.14 CRC algorithms 1.3.6.1.4.1.11591.14.1 CRC 32  File: standards.info, Node: Memory Usage, Next: File Usage, Prev: OID Allocations, Up: Program Behavior 4.10 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 memory 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 memory all at once. If your program creates complicated data structures, just make them in memory and give a fatal error if `malloc' returns zero.  File: standards.info, Node: File Usage, Prev: Memory Usage, Up: Program Behavior 4.11 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 5 Making The Best Use of C ************************** This 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 among different operating systems. * CPU Portability:: Supporting the range of CPU types. * System Functions:: Portability and ``standard'' library functions. * Internationalization:: Techniques for internationalization. * Character Set:: Use ASCII by default. * Quote Characters:: Use `...' in the C locale. * Mmap:: How you can safely use `mmap'.  File: standards.info, Node: Formatting, Next: Comments, Up: Writing C 5.1 Formatting Your Source Code =============================== It is important to put the open-brace that starts the body of a C function in column one, so that they will start a defun. Several tools look for open-braces in column one to find the beginnings of C functions. These tools will not work on code not formatted that way. Avoid putting open-brace, open-parenthesis or open-bracket in column one when they are inside a function, so that they won't start a defun. The open-brace that starts a `struct' body can go in column one if you find it useful to treat that definition as a defun. It is also important for function definitions to start the name of the function in column one. This helps people to search for function definitions, and may also help certain tools recognize them. Thus, using Standard C syntax, the format is this: static char * concat (char *s1, char *s2) { ... } or, if you want to use traditional C syntax, format the definition like this: static char * concat (s1, s2) /* Name starts in column one here */ char *s1, *s2; { /* Open brace in column one here */ ... } 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 5.2 Commenting Your Work ======================== Every program should start with a comment saying briefly what it is for. Example: `fmt - filter for simple filling of text'. This comment should be at the top of the source file containing the `main' function of the program. Also, please write a brief comment at the start of each source file, with the file name and a line or two about the overall purpose of the file. 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 5.3 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 to 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 (assignments inside `while'-conditions are ok). 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 5.4 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 if 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 5.5 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, VMS, MVS, and older Macintosh systems, 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 "win", 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 5.6 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. 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); Instead, use `unsigned char' as follows. (The `unsigned' is for portability to unusual systems where `char' is signed and where there is integer overflow checking.) int c; while ((c = getchar ()) != EOF) { unsigned char u = c; write (file_descriptor, &u, 1); } It used to be ok to not worry about the difference between pointers and integers when passing arguments to functions. However, on most modern 64-bit machines pointers are wider than `int'. Conversely, integer types like `long long int' and `off_t' are wider than pointers on most modern 32-bit machines. Hence it's often better nowadays to use prototypes to define functions whose argument types are not trivial. In particular, if functions accept varying argument counts or types they should be declared using prototypes containing `...' and defined using `stdarg.h'. For an example of this, please see the Gnulib (http://www.gnu.org/software/gnulib/) error module, which declares and defines the following function: /* Print a message with `fprintf (stderr, FORMAT, ...)'; if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ void error (int status, int errnum, const char *format, ...); A simple way to use the Gnulib error module is to obtain the two source files `error.c' and `error.h' from the Gnulib library source code repository at `http://git.savannah.gnu.org/gitweb/?p=gnulib.git'. Here's a sample use: #include "error.h" #include #include char *program_name = "myprogram"; FILE * xfopen (char const *name) { FILE *fp = fopen (name, "r"); if (! fp) error (1, errno, "cannot read %s", name); return fp; } 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 5.7 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: Character Set, Prev: System Functions, Up: Writing C 5.8 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, `coreutils' for the GNU core 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 ("%s is full", capacity > 5000000 ? "disk" : "floppy disk"); If you apply gettext to all strings, like this, printf (gettext ("%s is full"), capacity > 5000000 ? gettext ("disk") : gettext ("floppy disk")); the translator will hardly know that "disk" and "floppy disk" are meant to be substituted in the other string. Worse, in some languages (like French) the construction will not work: the translation of the word "full" depends on the gender of the first part of the sentence; it happens to be not the same for "disk" as for "floppy disk". Complete sentences can be translated without problems: printf (capacity > 5000000 ? gettext ("disk is full") : gettext ("floppy disk is full")); 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 straightforwardly 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"); Another example is this one: printf ("%d file%s processed", nfiles, nfiles != 1 ? "s" : ""); The problem with this 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, with gettext being applied to the two strings independently: printf ((nfiles != 1 ? gettext ("%d files processed") : gettext ("%d file processed")), nfiles); But this still doesn't work for languages like Polish, which has three plural forms: one for nfiles == 1, one for nfiles == 2, 3, 4, 22, 23, 24, ... and one for the rest. The GNU `ngettext' function solves this problem: printf (ngettext ("%d files processed", "%d file processed", nfiles), nfiles);  File: standards.info, Node: Character Set, Next: Quote Characters, Prev: Internationalization, Up: Writing C 5.9 Character Set ================= Sticking to the ASCII character set (plain text, 7-bit characters) is preferred in GNU source code comments, text documents, and other contexts, unless there is good reason to do something else because of the application domain. For example, if source code deals with the French Revolutionary calendar, it is OK if its literal strings contain accented characters in month names like "Flore'al". Also, it is OK to use non-ASCII characters to represent proper names of contributors in change logs (*note Change Logs::). If you need to use non-ASCII characters, you should normally stick with one encoding, as one cannot in general mix encodings reliably.  File: standards.info, Node: Quote Characters, Next: Mmap, Prev: Character Set, Up: Writing C 5.10 Quote Characters ===================== In the C locale, GNU programs should stick to plain ASCII for quotation characters in messages to users: preferably 0x60 (``') for left quotes and 0x27 (`'') for right quotes. It is ok, but not required, to use locale-specific quotes in other locales. The Gnulib (http://www.gnu.org/software/gnulib/) `quote' and `quotearg' modules provide a reasonably straightforward way to support locale-specific quote characters, as well as taking care of other issues, such as quoting a filename that itself contains a quote character. See the Gnulib documentation for usage details. In any case, the documentation for your program should clearly specify how it does quoting, if different than the preferred method of ``' and `''. This is especially important if the output of your program is ever likely to be parsed by another program. Quotation characters are a difficult area in the computing world at this time: there are no true left or right quote characters in Latin1; the ``' character we use was standardized there as a grave accent. Moreover, Latin1 is still not universally usable. Unicode contains the unambiguous quote characters required, and its common encoding UTF-8 is upward compatible with Latin1. However, Unicode and UTF-8 are not universally well-supported, either. This may change over the next few years, and then we will revisit this.  File: standards.info, Node: Mmap, Prev: Quote Characters, Up: Writing C 5.11 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 6 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 6.1 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. Make sure your manual is clear to a reader who knows nothing about the topic and reads it straight through. This means covering basic topics at the beginning, and advanced topics only later. This also means defining every specialized term when it is first used. Programmers tend to carry over the structure of the program as the structure for its documentation. But this structure is not necessarily good for explaining how to use the program; it may be irrelevant and confusing for a user. Instead, the right way to structure documentation is according to the concepts and questions that a user will have in mind when reading it. This principle applies at every level, from the lowest (ordering sentences in a paragraph) to the highest (ordering of chapter topics within the manual). Sometimes this structure of ideas matches the structure of the implementation of the software being documented--but often they are different. An important part of learning to write good documentation is to learn to notice when you have unthinkingly structured the documentation like the implementation, stop yourself, and look for 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. Please do not write `()' after a function name just to indicate it is a function. `foo ()' is not a function, it is a function call with no arguments.  File: standards.info, Node: Doc Strings and Manuals, Next: Manual Structure Details, Prev: GNU Manuals, Up: Documentation 6.2 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 redundancy 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 6.3 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 for in a man page). 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 6.4 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 6.5 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 6.6 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 `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.  File: standards.info, Node: NEWS File, Next: Change Logs, Prev: Printed Manuals, Up: Documentation 6.7 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 6.8 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 6.8.1 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 6.8.2 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 6.8.3 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 6.8.4 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 6.8.5 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 6.9 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. Be sure that man pages include a copyright statement and free license. The simple all-permissive license is appropriate for simple man pages (*note License Notices for Other Files: (maintain)License Notices for Other Files.). For long man pages, with enough explanation and documentation that they can be considered true manuals, use the GFDL (*note License for Manuals::). Finally, the GNU help2man program (`http://www.gnu.org/software/help2man/') is one way to automate generation of a man page, in this case from `--help' output. This is sufficient in many cases.  File: standards.info, Node: Reading other Manuals, Prev: Man Pages, Up: Documentation 6.10 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 7 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 of GNU packages should work. * Makefile Conventions:: Makefile conventions. * Releases:: Making releases  File: standards.info, Node: Configuration, Next: Makefile Conventions, Up: Managing Releases 7.1 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. The description here is the specification of the interface for the `configure' script in GNU packages. Many packages implement it using GNU Autoconf (*note Introduction: (autoconf)Top.) and/or GNU Automake (*note Introduction: (automake)Top.), but you do not have to use these tools. You can implement it any way you like; for instance, by making `configure' be a wrapper around a completely different configuration system. Another way for the `configure' script to operate 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. In addition, the `configure' script should take options corresponding to most of the standard directory variables (*note Directory Variables::). Here is the list: --prefix --exec-prefix --bindir --sbindir --libexecdir --sysconfdir --sharedstatedir --localstatedir --libdir --includedir --oldincludedir --datarootdir --datadir --infodir --localedir --mandir --docdir --htmldir --dvidir --pdfdir --psdir 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' (http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD) 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' (http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD). Other options are permitted to specify in more detail the software or hardware present on the machine, to include or exclude optional parts of the package, or to adjust the name of some tools or arguments to them: `--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. `VARIABLE=VALUE' Set the value of the variable VARIABLE to VALUE. This is used to override the default values of commands or arguments in the build process. For example, the user could issue `configure CFLAGS=-g CXXFLAGS=-g' to build with debugging information and without the default optimization. Specifying variables as arguments to `configure', like this: ./configure CC=gcc is preferable to setting them in environment variables: CC=gcc ./configure as it helps to recreate the same configuration later with `config.status'. All `configure' scripts should accept all of the "detail" options and the variable settings, 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 7.2 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. For more information on portable Makefiles, see POSIX and *note Portable Make Programming: (autoconf)Portable Make. * Menu: * Makefile Basics:: General conventions for Makefiles. * Utilities in Makefiles:: Utilities to be used in Makefiles. * Command Variables:: Variables for specifying commands. * DESTDIR:: Supporting staged installs. * 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 7.2.1 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 7.2.2 Utilities in Makefiles ---------------------------- Write the Makefile commands (and any shell scripts, such as `configure') to run under `sh' (both the traditional Bourne shell and the POSIX shell), not `csh'. Don't use any special features of `ksh' or `bash', or POSIX features not widely supported in traditional Bourne `sh'. The `configure' script and the Makefile rules for building and installation should not use any utilities directly except these: awk cat cmp cp diff echo egrep expr false grep install-info ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch tr true Compression programs such as `gzip' can be used in the `dist' rule. Generally, stick to the widely-supported (usually POSIX-specified) options and features of these programs. For example, don't use `mkdir -p', convenient as it may be, because a few systems don't support it at all and with others, it is not safe for parallel execution. For a list of known incompatibilities, see *note Portable Shell Programming: (autoconf)Portable Shell. It is a good idea to avoid creating symbolic links in makefiles, since a few file 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: DESTDIR, Prev: Utilities in Makefiles, Up: Makefile Conventions 7.2.3 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 non-executables respectively. Minimal use of these variables is as follows: $(INSTALL_PROGRAM) foo $(bindir)/foo $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a However, it is preferable to support a `DESTDIR' prefix on the target files, as explained in the next section. It is acceptable, but not required, to install multiple files in one command, with the final argument being a directory, as in: $(INSTALL_PROGRAM) foo bar baz $(bindir)  File: standards.info, Node: DESTDIR, Next: Directory Variables, Prev: Command Variables, Up: Makefile Conventions 7.2.4 `DESTDIR': support for staged installs -------------------------------------------- `DESTDIR' is a variable prepended to each installed target file, like this: $(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo $(INSTALL_DATA) libfoo.a $(DESTDIR)$(libdir)/libfoo.a The `DESTDIR' variable is specified by the user on the `make' command line as an absolute file name. For example: make DESTDIR=/tmp/stage install `DESTDIR' should be supported only in the `install*' and `uninstall*' targets, as those are the only targets where it is useful. If your installation step would normally install `/usr/local/bin/foo' and `/usr/local/lib/libfoo.a', then an installation invoked as in the example above would install `/tmp/stage/usr/local/bin/foo' and `/tmp/stage/usr/local/lib/libfoo.a' instead. Prepending the variable `DESTDIR' to each target in this way provides for "staged installs", where the installed files are not placed directly into their expected location but are instead copied into a temporary location (`DESTDIR'). However, installed files maintain their relative directory structure and any embedded file names will not be modified. You should not set the value of `DESTDIR' in your `Makefile' at all; then the files are installed into their expected locations by default. Also, specifying `DESTDIR' should not change the operation of the software in any way, so its value should not be included in any file contents. `DESTDIR' support is commonly used in package creation. It is also helpful to users who want to understand what a given package will install where, and to allow users who don't normally have permissions to install into protected areas to build and install before gaining those permissions. Finally, it can be useful with tools such as `stow', where code is installed in one place but made to appear to be installed somewhere else using symbolic links or special mount operations. So, we strongly recommend GNU packages support `DESTDIR', though it is not an absolute requirement.  File: standards.info, Node: Directory Variables, Next: Standard Targets, Prev: DESTDIR, Up: Makefile Conventions 7.2.5 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 and the values they should have in GNU packages are described below. They are based on a standard file system layout; variants of it are used in GNU/Linux and other modern operating systems. Installers are expected to override these values when calling `make' (e.g., `make prefix=/usr install' or `configure' (e.g., `configure --prefix=/usr'). GNU packages should not try to guess which value should be appropriate for these variables on the system they are being installed onto: use the default settings specified here so that all GNU packages behave identically, allowing the installer to achieve any desired layout. These first 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@'.) The definition of `libexecdir' is the same for all packages, so you should install your data in a subdirectory thereof. Most packages install their data under `$(libexecdir)/PACKAGE-NAME/', possibly within additional subdirectories thereof, such as `$(libexecdir)/PACKAGE-NAME/MACHINE/VERSION'. 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'. (If you are using Autoconf, write it as `@datarootdir@'.) `datadir''s default value is based on this variable; so are `infodir', `mandir', and others. `datadir' The directory for installing idiosyncratic 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 program-specific files without altering the location for Info files, man pages, etc. This should normally be `/usr/local/share', but write it as `$(datarootdir)'. (If you are using Autoconf, write it as `@datadir@'.) The definition of `datadir' is the same for all packages, so you should install your data in a subdirectory thereof. Most packages install their data under `$(datadir)/PACKAGE-NAME/'. `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. `docdir' The directory for installing documentation files (other than Info) for this package. By default, it should be `/usr/local/share/doc/YOURPKG', but it should be written as `$(datarootdir)/doc/YOURPKG'. (If you are using Autoconf, write it as `@docdir@'.) The YOURPKG subdirectory, which may include a version number, prevents collisions among files with common names, such as `README'. `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@'.) `infodir' is separate from `docdir' for compatibility with existing practice. `htmldir' `dvidir' `pdfdir' `psdir' Directories for installing documentation files in the particular format. They should all be set to `$(docdir)' by default. (If you are using Autoconf, write them as `@htmldir@', `@dvidir@', etc.) Packages which supply several translations of their documentation should install them in `$(htmldir)/'LL, `$(pdfdir)/'LL, etc. where LL is a locale abbreviation such as `en' or `pt_BR'. `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@'.) This directory usually has a subdirectory per locale. 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 Autoconf, 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. At times, not all of these variables may be implemented in the current release of Autoconf and/or Automake; but as of Autoconf 2.60, we believe all of them are. When any are missing, the descriptions here serve as specifications for what Autoconf will implement. As a programmer, you can either use a development version of Autoconf or avoid using these variables until a stable release is made which supports them.  File: standards.info, Node: Standard Targets, Next: Install Command Categories, Prev: Directory Variables, Up: Makefile Conventions 7.2.6 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 (and other documentation format) 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::. `install-html' `install-dvi' `install-pdf' `install-ps' These targets install documentation in formats other than Info; they're intended to be called explicitly by the person installing the package, if that format is desired. GNU prefers Info files, so these must be installed by the `install' target. When you have many documentation files to install, we recommend that you avoid collisions and clutter by arranging for these targets to install in subdirectories of the appropriate installation directory, such as `htmldir'. As one example, if your package has multiple manuals, and you wish to install HTML documentation with many files (such as the "split" mode output by `makeinfo --html'), you'll certainly want to use subdirectories, or two nodes with the same name in different manuals will overwrite each other. Please make these `install-FORMAT' targets invoke the commands for the FORMAT target, for example, by making FORMAT a dependency. `uninstall' Delete all the installed files--the copies that the `install' and `install-*' targets create. 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 in the current directory that are normally created by building the program. Also delete files in other directories if they are created by this makefile. However, 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. There is no need to delete parent directories that were created with `mkdir -p', since they could have existed anyway. Delete `.dvi' files here if they are not part of the distribution. `distclean' Delete all files in the current directory (or created by this makefile) 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. However, there is no need to delete parent directories that were created with `mkdir -p', since they could have existed anyway. `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 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. Also, there is no need to delete parent directories that were created with `mkdir -p', since they could have existed anyway. These are the only exceptions; `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' `html' `pdf' `ps' Generate documentation files in the given format. These targets should always exist, but any or all can be a no-op if the given output format cannot be generated. These targets should not be dependencies of the `all' target; the user must manually invoke them. Here's an example rule for generating DVI files from Texinfo: 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. Here's another example, this one for generating HTML from Texinfo: html: foo.html foo.html: foo.texi chap1.texi chap2.texi $(TEXI2HTML) $(srcdir)/foo.texi Again, you would define the variable `TEXI2HTML' in the Makefile; for example, it might run `makeinfo --no-split --html' (`makeinfo' is part of the Texinfo distribution). `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'. It is ok to support other free compression formats as well, such as `bzip2' and `lzma'. 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 7.2.7 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 (the `-s' option to `make' is needed to silence messages about entering subdirectories): make -s -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 ~ /^(normal-install|post-install)[ \t]*$/ {on = 0} on {print $0} $0 ~ /^pre-install[ \t]*$/ {on = 1}  File: standards.info, Node: Releases, Prev: Makefile Conventions, Up: Managing Releases 7.3 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.LESSER'. 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: GNU Free Documentation License, Prev: Managing Releases, Up: Top 8 References to Non-Free Software and Documentation *************************************************** A GNU program should not recommend, promote, or grant legitimacy to the use of any non-free program. Proprietary software is a social and ethical problem, and our aim is to put an end to that problem. 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, or to give the public the idea that their existence is ethical. The GNU definition of free software is found on the GNU web site at `http://www.gnu.org/philosophy/free-sw.html', and the definition of free documentation is found at `http://www.gnu.org/philosophy/free-doc.html'. The terms "free" and "non-free", used in this document, refer to those definitions. A list of important licenses and whether they qualify as free is in `http://www.gnu.org/licenses/license-list.html'. If it is not clear whether a license qualifies as free, 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 likely 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 for your program among the users of Foobar, if the existence of Foobar is not generally known among people who might want to use your program.) 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 some non-free Java libraries. To recommend or promote such a program is to promote the other programs it needs. This is why we are careful about listing Java programs in the Free Software Directory: we don't want to promote the non-free Java libraries. We hope this particular problem with Java will be gone by and by, as we replace the remaining non-free standard Java libraries with free software, but the general principle will remain the same: don't recommend, promote or legitimize programs that depend on non-free software to run. Some free programs strongly encourage the use of non-free software. A typical example is `mplayer'. It is free software in itself, and the free code can handle some kinds of files. However, `mplayer' recommends use of non-free codecs for other kinds of files, and users that install `mplayer' are very likely to install those codecs along with it. To recommend `mplayer' is, in effect, to promote use of the non-free codecs. Thus, you should not recommend programs that strongly encourage the use of non-free software. This is why we do not list `mplayer' in the Free Software Directory. 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 encouraging it is a priority; to recommend use of documentation that we are not allowed to include undermines 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 are non-free. This is because we don't include such things in the GNU system even they are free--they are outside the scope of what a software distribution needs to include. Referring to a web site that describes or recommends a non-free program is promoting that program, so please do not make links (or mention by name) web sites that contain such material. This policy is relevant particularly for the web pages for a GNU package. Following links from nearly any web site can lead eventually to non-free software; this is inherent in the nature of the web. So it makes no sense to criticize a site for having such links. As long as the site does not itself recommend a non-free program, there is no need to consider the question of the sites that it links to for other reasons. Thus, for example, you should not refer to AT&T's web site if that recommends AT&T's non-free software packages; you should not refer to a site that links to AT&T's site presenting it as a place to get some non-free program, because that link recommends and legitimizes the non-free program. However, that a site contains a link to AT&T's web site for some other purpose (such as long-distance telephone service) is not an objection against it.  File: standards.info, Node: GNU Free Documentation License, Next: Index, Prev: References, Up: Top Appendix A GNU Free Documentation License ***************************************** Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. `http://fsf.org/' 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. The "publisher" means any person or entity that distributes copies of the Document to the public. 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 in 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 Warranty 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 under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 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. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. 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.3 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: GNU Free Documentation License, Up: Top Index ***** [index] * Menu: * #endif, commenting: Comments. (line 60) * --help output: --help. (line 6) * --version output: --version. (line 6) * -Wall compiler option: Syntactic Conventions. (line 10) * accepting contributions: Contributions. (line 6) * address for bug reports: --help. (line 11) * ANSI C standard: Standard C. (line 6) * arbitrary limits on data: Semantics. (line 6) * ASCII characters: Character Set. (line 6) * autoconf: System Portability. (line 23) * avoiding proprietary code: Reading Non-Free Code. (line 6) * behavior, dependent on program's name: User Interfaces. (line 6) * binary packages: Install Command Categories. (line 80) * bindir: Directory Variables. (line 54) * braces, in C source: Formatting. (line 6) * bug reports: --help. (line 11) * canonical name of a program: --version. (line 12) * casting pointers to integers: CPU Portability. (line 89) * CGI programs, standard options for: Command-Line Interfaces. (line 31) * change logs: Change Logs. (line 6) * change logs, conditional changes: Conditional Changes. (line 6) * change logs, style: Style of Change Logs. (line 6) * character set: Character Set. (line 6) * command-line arguments, decoding: Semantics. (line 46) * command-line interface: Command-Line Interfaces. (line 6) * commenting: Comments. (line 6) * compatibility with C and POSIX standards: Compatibility. (line 6) * compiler warnings: Syntactic Conventions. (line 10) * conditional changes, and change logs: Conditional Changes. (line 6) * conditionals, comments for: Comments. (line 60) * configure: Configuration. (line 6) * control-L: Formatting. (line 118) * conventions for makefiles: Makefile Conventions. (line 6) * corba: Graphical Interfaces. (line 16) * credits for manuals: Manual Credits. (line 6) * data types, and portability: CPU Portability. (line 6) * declaration for system functions: System Functions. (line 21) * DESTDIR: DESTDIR. (line 6) * documentation: Documentation. (line 6) * doschk: Names. (line 38) * downloading this manual: Preface. (line 17) * encodings: Character Set. (line 6) * error messages: Semantics. (line 19) * error messages, formatting: Errors. (line 6) * exec_prefix: Directory Variables. (line 36) * expressions, splitting: Formatting. (line 81) * FDL, GNU Free Documentation License: GNU Free Documentation License. (line 6) * file usage: File Usage. (line 6) * file-name limitations: Names. (line 38) * formatting error messages: Errors. (line 6) * formatting source code: Formatting. (line 6) * formfeed: Formatting. (line 118) * function argument, declaring: Syntactic Conventions. (line 6) * function prototypes: Standard C. (line 17) * getopt: Command-Line Interfaces. (line 6) * gettext: Internationalization. (line 6) * gnome: Graphical Interfaces. (line 16) * GNOME and Guile: Source Language. (line 38) * graphical user interface: Graphical Interfaces. (line 6) * grave accent: Quote Characters. (line 6) * gtk+: Graphical Interfaces. (line 6) * Guile: Source Language. (line 38) * implicit int: Syntactic Conventions. (line 6) * impossible conditions: Semantics. (line 70) * installations, staged: DESTDIR. (line 6) * internationalization: Internationalization. (line 6) * LDAP: OID Allocations. (line 6) * left quote: Quote Characters. (line 6) * legal aspects: Legal Issues. (line 6) * legal papers: Contributions. (line 6) * libexecdir: Directory Variables. (line 67) * libraries: Libraries. (line 6) * library functions, and portability: System Functions. (line 6) * license for manuals: License for Manuals. (line 6) * lint: Syntactic Conventions. (line 109) * locale-specific quote characters: Quote Characters. (line 6) * long option names: Option Table. (line 6) * long-named options: Command-Line Interfaces. (line 12) * makefile, conventions for: Makefile Conventions. (line 6) * malloc return value: Semantics. (line 25) * man pages: Man Pages. (line 6) * manual structure: Manual Structure Details. (line 6) * memory allocation failure: Semantics. (line 25) * memory usage: Memory Usage. (line 6) * message text, and internationalization: Internationalization. (line 29) * mmap: Mmap. (line 6) * multiple variables in a line: Syntactic Conventions. (line 35) * names of variables, functions, and files: Names. (line 6) * NEWS file: NEWS File. (line 6) * non-ASCII characters: Character Set. (line 6) * non-POSIX systems, and portability: System Portability. (line 32) * non-standard extensions: Using Extensions. (line 6) * NUL characters: Semantics. (line 11) * OID allocations for GNU: OID Allocations. (line 6) * open brace: Formatting. (line 6) * optional features, configure-time: Configuration. (line 100) * options for compatibility: Compatibility. (line 14) * options, standard command-line: Command-Line Interfaces. (line 31) * output device and program's behavior: User Interfaces. (line 13) * packaging: Releases. (line 6) * PATH_INFO, specifying standard options as: Command-Line Interfaces. (line 31) * portability, and data types: CPU Portability. (line 6) * portability, and library functions: System Functions. (line 6) * portability, between system types: System Portability. (line 6) * POSIX compatibility: Compatibility. (line 6) * POSIXLY_CORRECT, environment variable: Compatibility. (line 21) * post-installation commands: Install Command Categories. (line 6) * pre-installation commands: Install Command Categories. (line 6) * prefix: Directory Variables. (line 26) * program configuration: Configuration. (line 6) * program design: Design Advice. (line 6) * program name and its behavior: User Interfaces. (line 6) * program's canonical name: --version. (line 12) * programming languages: Source Language. (line 6) * proprietary programs: Reading Non-Free Code. (line 6) * quote characters: Quote Characters. (line 6) * README file: Releases. (line 21) * references to non-free material: References. (line 6) * releasing: Managing Releases. (line 6) * sbindir: Directory Variables. (line 60) * signal handling: Semantics. (line 59) * SNMP: OID Allocations. (line 6) * spaces before open-paren: Formatting. (line 75) * staged installs: DESTDIR. (line 6) * standard command-line options: Command-Line Interfaces. (line 31) * standards for makefiles: Makefile Conventions. (line 6) * string library functions: System Functions. (line 55) * syntactic conventions: Syntactic Conventions. (line 6) * table of long options: Option Table. (line 6) * temporary files: Semantics. (line 84) * temporary variables: Syntactic Conventions. (line 23) * texinfo.tex, in a distribution: Releases. (line 70) * TMPDIR environment variable: Semantics. (line 84) * trademarks: Trademarks. (line 6) * where to obtain standards.texi: Preface. (line 17) * X.509: OID Allocations. (line 6)  Tag Table: Node: Top805 Node: Preface2072 Node: Legal Issues4186 Node: Reading Non-Free Code4656 Node: Contributions6386 Node: Trademarks8624 Node: Design Advice10259 Node: Source Language10851 Node: Compatibility12977 Node: Using Extensions14605 Node: Standard C16181 Node: Conditional Compilation18584 Node: Program Behavior19982 Node: Non-GNU Standards21098 Node: Semantics23379 Node: Libraries28098 Node: Errors29343 Node: User Interfaces31836 Node: Graphical Interfaces33441 Node: Command-Line Interfaces34477 Node: --version36509 Node: --help42410 Node: Option Table43283 Node: OID Allocations58238 Node: Memory Usage59999 Node: File Usage61035 Node: Writing C61785 Node: Formatting62757 Node: Comments67046 Node: Syntactic Conventions70598 Node: Names74060 Node: System Portability76272 Node: CPU Portability79163 Node: System Functions83064 Node: Internationalization88261 Node: Character Set92255 Node: Quote Characters93068 Node: Mmap94588 Node: Documentation95296 Node: GNU Manuals96402 Node: Doc Strings and Manuals102140 Node: Manual Structure Details103693 Node: License for Manuals105111 Node: Manual Credits106085 Node: Printed Manuals106478 Node: NEWS File107164 Node: Change Logs107842 Node: Change Log Concepts108596 Node: Style of Change Logs110685 Node: Simple Changes113185 Node: Conditional Changes114627 Node: Indicating the Part Changed116049 Node: Man Pages116576 Node: Reading other Manuals118782 Node: Managing Releases119573 Node: Configuration120354 Node: Makefile Conventions128975 Node: Makefile Basics129974 Node: Utilities in Makefiles133148 Node: Command Variables135646 Node: DESTDIR138892 Node: Directory Variables141066 Node: Standard Targets155559 Ref: Standard Targets-Footnote-1169172 Node: Install Command Categories169272 Node: Releases173805 Node: References177735 Node: GNU Free Documentation License183582 Node: Index208749  End Tag Table autoconf2.64_2.64+dfsg.orig/doc/standards.texi0000644000175000017500000042646411233203257017700 0ustar smcvsmcv\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 June 7, 2009 @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 @copying The GNU coding standards, last updated @value{lastupdate}. Copyright @copyright{} 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.3 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:: Mentioning non-free software or documentation. * GNU Free Documentation License:: Copying and sharing 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 web server in many different formats, including the Texinfo source, PDF, HTML, DVI, plain text, and more, at: @uref{http://www.gnu.org/prep/standards/}. 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 need 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. @uref{http://www.gnu.org/software/hello/hello.html}. @node Legal Issues @chapter Keeping Free Software Free @cindex legal aspects This 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 memory 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 sent 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. It is also available online for your perusal: @uref{http://www.gnu.org/prep/maintain/}. @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 name ``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 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 languages 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 languages 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 @cindex GNOME and Guile The standard extensibility interpreter for GNU software is Guile (@uref{http://www.gnu.org/@/software/@/guile/}), which implements the language Scheme (an especially clean and simple dialect of Lisp). Guile also includes bindings for GTK+/GNOME, making it practical to write modern GUI functionality within 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 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 * Non-GNU Standards:: We consider standards such as POSIX; we don't "obey" them. * 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. * OID Allocations:: Table of OID slots for GNU. * Memory Usage:: When and how to care about memory needs. * File Usage:: Which files to use, and where. @end menu @node Non-GNU Standards @section Non-GNU Standards The GNU Project regards standards published by other organizations as suggestions, not orders. We consider those standards, but we do not ``obey'' them. In developing a GNU program, you should implement an outside standard's specifications when that makes the GNU system better overall in an objective sense. When it doesn't, you shouldn't. In most cases, following published standards is convenient for users---it means that their programs or scripts will work more portably. For instance, GCC implements nearly all the features of Standard C as specified by that standard. C program developers would be unhappy if it did not. And GNU utilities mostly follow specifications of POSIX.2; shell script writers and users would be unhappy if our programs were incompatible. But we do not follow either of these specifications rigidly, and there are specific points on which we decided not to follow them, so as to make the GNU system better for users. For instance, Standard C says that nearly all extensions to C are prohibited. How silly! GCC implements many extensions, some of which were later adopted as part of the standard. If you want these constructs to give an error message as ``required'' by the standard, you must specify @samp{--pedantic}, which was implemented only so that we can say ``GCC is a 100% implementation of the standard,'' not because there is any reason to actually use it. POSIX.2 specifies that @samp{df} and @samp{du} must output sizes by default in units of 512 bytes. What users want is units of 1k, so that is what we do by default. If you want the ridiculous behavior ``required'' by POSIX, you must set the environment variable @samp{POSIXLY_CORRECT} (which was originally going to be named @samp{POSIX_ME_HARDER}). GNU utilities also depart from the letter of the POSIX.2 specification when they support long-named command-line options, and intermixing options with ordinary arguments. This minor incompatibility with POSIX is never a problem in practice, and it is very useful. In particular, don't reject a new feature, or remove an old one, merely because a standard says it is ``forbidden'' or ``deprecated.'' @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 idiosyncrasies 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 invoking @samp{p.cgi --help} from the command line. @menu * --version:: The standard output for --version. * --help:: The standard output for --help. @end menu @node --version @subsection @option{--version} @cindex @samp{--version} output The standard @code{--version} 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 @emph{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 line stating the license, preferably using one of abbrevations below, and a brief statement that the program is free software, and that users are free to copy and change it. Also mention that there is no warranty, to the extent permitted by law. See recommended wording below. 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 hello 2.3 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. @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. (The rules are different for copyright notices in source files; @pxref{Copyright Notices,,,maintain,Information for GNU Maintainers}.) 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. Finally, here is the table of our suggested license abbreviations. Any abbreviation can be followed by @samp{v@var{version}[+]}, meaning that particular version, or later versions with the @samp{+}, as shown above. In the case of exceptions for extra permissions with the GPL, we use @samp{/} for a separator; the version number can follow the license abbreviation as usual, as in the examples below. @table @asis @item GPL GNU General Public License, @url{http://www.gnu.org/@/licenses/@/gpl.html}. @item LGPL GNU Lesser General Public License, @url{http://www.gnu.org/@/licenses/@/lgpl.html}. @item GPL/Guile GNU GPL with the exception for Guile; for example, GPLv3+/Guile means the GNU GPL version 3 or later, with the extra exception for Guile. @item GPL/Ada GNU GPL with the exception for Ada. @item Apache The Apache Software Foundation license, @url{http://www.apache.org/@/licenses}. @item Artistic The Artistic license used for Perl, @url{http://www.perlfoundation.org/@/legal}. @item Expat The Expat license, @url{http://www.jclark.com/@/xml/@/copying.txt}. @item MPL The Mozilla Public License, @url{http://www.mozilla.org/@/MPL/}. @item OBSD The original (4-clause) BSD license, incompatible with the GNU GPL @url{http://www.xfree86.org/@/3.3.6/@/COPYRIGHT2.html#6}. @item PHP The license used for PHP, @url{http://www.php.net/@/license/}. @item public domain The non-license that is being in the public domain, @url{http://www.gnu.org/@/licenses/@/license-list.html#PublicDomain}. @item Python The license for Python, @url{http://www.python.org/@/2.0.1/@/license.html}. @item RBSD The revised (3-clause) BSD, compatible with the GNU GPL, @url{http://www.xfree86.org/@/3.3.6/@/COPYRIGHT2.html#5}. @item X11 The simple non-copyleft license used for most versions of the X Window system, @url{http://www.xfree86.org/@/3.3.6/@/COPYRIGHT2.html#3}. @item Zlib The license for Zlib, @url{http://www.gzip.org/@/zlib/@/zlib_license.html}. @end table More information about these licenses and many more are on the GNU licensing web pages, @url{http://www.gnu.org/@/licenses/@/license-list.html}. @node --help @subsection @option{--help} @cindex @samp{--help} output The standard @code{--help} 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, please place lines giving the email address for bug reports, the package's home page (normally @indicateurl{http://www.gnu.org/software/@var{pkg}}, and the general page for help using GNU programs. The format should be like this: @example Report bugs to: @var{mailing-address} @var{pkg} home page: General help using GNU software: @end example It is ok to mention other appropriate mailing lists and web pages. @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 @code{make}. @item assume-old @samp{-o} in @code{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 @code{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 @code{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 @code{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{gawk}, @code{info}, @code{make}, @code{mt}, @code{sed}, and @code{tar}. @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 @code{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 @code{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 @code{make}. @item just-print @samp{-n} in @code{make}. @item keep-going @samp{-k} in @code{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 @code{make}. @item login Used in @code{su}. @item machine Used in @code{uname}. @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 @code{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 @code{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 @code{make}. @item no-builtin-rules @samp{-r} in @code{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 @code{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 @code{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 @code{make}. @item print-directory @samp{-w} in @code{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 @code{make}. @item quiet Used in many programs to inhibit the usual output. 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 @code{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 @samp{-r} in @code{touch}. @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. 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 non-privileged 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 @code{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 @code{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 @code{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 OID Allocations @section OID Allocations @cindex OID allocations for GNU @cindex SNMP @cindex LDAP @cindex X.509 The OID (object identifier) 1.3.6.1.4.1.11591 has been assigned to the GNU Project (thanks to Werner Koch). These are used for SNMP, LDAP, X.509 certificates, and so on. The web site @url{http://www.alvestrand.no/objectid} has a (voluntary) listing of many OID assignments. If you need a new slot for your GNU package, write @email{maintainers@@gnu.org}. Here is a list of arcs currently assigned: @example @include gnu-oids.texi @end example @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 memory 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 memory all at once. If your program creates complicated data structures, just make them in memory 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 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 among different operating systems. * CPU Portability:: Supporting the range of CPU types. * System Functions:: Portability and ``standard'' library functions. * Internationalization:: Techniques for internationalization. * Character Set:: Use ASCII by default. * Quote Characters:: Use `...' in the C locale. * 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 one, so that they will start a defun. Several tools look for open-braces in column one to find the beginnings of C functions. These tools will not work on code not formatted that way. Avoid putting open-brace, open-parenthesis or open-bracket in column one when they are inside a function, so that they won't start a defun. The open-brace that starts a @code{struct} body can go in column one if you find it useful to treat that definition as a defun. It is also important for function definitions to start the name of the function in column one. This helps people to search for function definitions, and may also help certain tools recognize them. Thus, using Standard C syntax, the format is this: @example static char * concat (char *s1, char *s2) @{ @dots{} @} @end example @noindent or, if you want to use traditional C syntax, format the definition like this: @example static char * concat (s1, s2) /* Name starts in column one here */ char *s1, *s2; @{ /* Open brace in column one here */ @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}. This comment should be at the top of the source file containing the @samp{main} function of the program. Also, please write a brief comment at the start of each source file, with the file name and a line or two about the overall purpose of the file. 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 to 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 (assignments inside @code{while}-conditions are ok). 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 if 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, VMS, MVS, and older Macintosh systems, 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 ``win'', 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. 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 @noindent Instead, use @code{unsigned char} as follows. (The @code{unsigned} is for portability to unusual systems where @code{char} is signed and where there is integer overflow checking.) @example int c; while ((c = getchar ()) != EOF) @{ unsigned char u = c; write (file_descriptor, &u, 1); @} @end example It used to be ok to not worry about the difference between pointers and integers when passing arguments to functions. However, on most modern 64-bit machines pointers are wider than @code{int}. Conversely, integer types like @code{long long int} and @code{off_t} are wider than pointers on most modern 32-bit machines. Hence it's often better nowadays to use prototypes to define functions whose argument types are not trivial. In particular, if functions accept varying argument counts or types they should be declared using prototypes containing @samp{...} and defined using @file{stdarg.h}. For an example of this, please see the @uref{http://www.gnu.org/software/gnulib/, Gnulib} error module, which declares and defines the following function: @example /* Print a message with `fprintf (stderr, FORMAT, ...)'; if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ void error (int status, int errnum, const char *format, ...); @end example A simple way to use the Gnulib error module is to obtain the two source files @file{error.c} and @file{error.h} from the Gnulib library source code repository at @uref{http://git.savannah.gnu.org/@/gitweb/@/?p=gnulib.git}. Here's a sample use: @example #include "error.h" #include #include char *program_name = "myprogram"; FILE * xfopen (char const *name) @{ FILE *fp = fopen (name, "r"); if (! fp) error (1, errno, "cannot read %s", name); return fp; @} @end example @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{coreutils} for the GNU core 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: @smallexample printf ("%s is full", capacity > 5000000 ? "disk" : "floppy disk"); @end smallexample If you apply gettext to all strings, like this, @smallexample printf (gettext ("%s is full"), capacity > 5000000 ? gettext ("disk") : gettext ("floppy disk")); @end smallexample @noindent the translator will hardly know that "disk" and "floppy disk" are meant to be substituted in the other string. Worse, in some languages (like French) the construction will not work: the translation of the word "full" depends on the gender of the first part of the sentence; it happens to be not the same for "disk" as for "floppy disk". Complete sentences can be translated without problems: @example printf (capacity > 5000000 ? gettext ("disk is full") : gettext ("floppy disk is full")); @end example 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 straightforwardly 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 Another example is this one: @example printf ("%d file%s processed", nfiles, nfiles != 1 ? "s" : ""); @end example @noindent The problem with this 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, with gettext being applied to the two strings independently: @example printf ((nfiles != 1 ? gettext ("%d files processed") : gettext ("%d file processed")), nfiles); @end example @noindent But this still doesn't work for languages like Polish, which has three plural forms: one for nfiles == 1, one for nfiles == 2, 3, 4, 22, 23, 24, ... and one for the rest. The GNU @code{ngettext} function solves this problem: @example printf (ngettext ("%d files processed", "%d file processed", nfiles), nfiles); @end example @node Character Set @section Character Set @cindex character set @cindex encodings @cindex ASCII characters @cindex non-ASCII characters Sticking to the ASCII character set (plain text, 7-bit characters) is preferred in GNU source code comments, text documents, and other contexts, unless there is good reason to do something else because of the application domain. For example, if source code deals with the French Revolutionary calendar, it is OK if its literal strings contain accented characters in month names like ``Flor@'eal''. Also, it is OK to use non-ASCII characters to represent proper names of contributors in change logs (@pxref{Change Logs}). If you need to use non-ASCII characters, you should normally stick with one encoding, as one cannot in general mix encodings reliably. @node Quote Characters @section Quote Characters @cindex quote characters @cindex locale-specific quote characters @cindex left quote @cindex grave accent In the C locale, GNU programs should stick to plain ASCII for quotation characters in messages to users: preferably 0x60 (@samp{`}) for left quotes and 0x27 (@samp{'}) for right quotes. It is ok, but not required, to use locale-specific quotes in other locales. The @uref{http://www.gnu.org/software/gnulib/, Gnulib} @code{quote} and @code{quotearg} modules provide a reasonably straightforward way to support locale-specific quote characters, as well as taking care of other issues, such as quoting a filename that itself contains a quote character. See the Gnulib documentation for usage details. In any case, the documentation for your program should clearly specify how it does quoting, if different than the preferred method of @samp{`} and @samp{'}. This is especially important if the output of your program is ever likely to be parsed by another program. Quotation characters are a difficult area in the computing world at this time: there are no true left or right quote characters in Latin1; the @samp{`} character we use was standardized there as a grave accent. Moreover, Latin1 is still not universally usable. Unicode contains the unambiguous quote characters required, and its common encoding UTF-8 is upward compatible with Latin1. However, Unicode and UTF-8 are not universally well-supported, either. This may change over the next few years, and then we will revisit this. @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. Make sure your manual is clear to a reader who knows nothing about the topic and reads it straight through. This means covering basic topics at the beginning, and advanced topics only later. This also means defining every specialized term when it is first used. Programmers tend to carry over the structure of the program as the structure for its documentation. But this structure is not necessarily good for explaining how to use the program; it may be irrelevant and confusing for a user. Instead, the right way to structure documentation is according to the concepts and questions that a user will have in mind when reading it. This principle applies at every level, from the lowest (ordering sentences in a paragraph) to the highest (ordering of chapter topics within the manual). Sometimes this structure of ideas matches the structure of the implementation of the software being documented---but often they are different. An important part of learning to write good documentation is to learn to notice when you have unthinkingly structured the documentation like the implementation, stop yourself, and look for 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, GNU Texinfo}, and see @ref{Indexing Commands, , Defining the Entries of an Index, texinfo, GNU Texinfo}. 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. Please do not write @samp{()} after a function name just to indicate it is a function. @code{foo ()} is not a function, it is a function call with no arguments. @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 redundancy 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 for in a man page). 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. Be sure that man pages include a copyright statement and free license. The simple all-permissive license is appropriate for simple man pages (@pxref{License Notices for Other Files,,,maintain,Information for GNU Maintainers}). For long man pages, with enough explanation and documentation that they can be considered true manuals, use the GFDL (@pxref{License for Manuals}). Finally, the GNU help2man program (@uref{http://www.gnu.org/software/help2man/}) is one way to automate generation of a man page, in this case from @option{--help} output. This is sufficient in many cases. @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 of GNU packages 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. The description here is the specification of the interface for the @code{configure} script in GNU packages. Many packages implement it using GNU Autoconf (@pxref{Top,, Introduction, autoconf, Autoconf}) and/or GNU Automake (@pxref{Top,, Introduction, automake, Automake}), but you do not have to use these tools. You can implement it any way you like; for instance, by making @code{configure} be a wrapper around a completely different configuration system. Another way for the @code{configure} script to operate 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. In addition, the @samp{configure} script should take options corresponding to most of the standard directory variables (@pxref{Directory Variables}). Here is the list: @example --prefix --exec-prefix --bindir --sbindir --libexecdir --sysconfdir --sharedstatedir --localstatedir --libdir --includedir --oldincludedir --datarootdir --datadir --infodir --localedir --mandir --docdir --htmldir --dvidir --pdfdir --psdir @end example 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{http://git.savannah.gnu.org/@/gitweb/@/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD, @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{http://git.savannah.gnu.org/@/gitweb/@/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD, @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, to include or exclude optional parts of the package, or to adjust the name of some tools or arguments to them: @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. @item @var{variable}=@var{value} Set the value of the variable @var{variable} to @var{value}. This is used to override the default values of commands or arguments in the build process. For example, the user could issue @samp{configure CFLAGS=-g CXXFLAGS=-g} to build with debugging information and without the default optimization. Specifying variables as arguments to @code{configure}, like this: @example ./configure CC=gcc @end example is preferable to setting them in environment variables: @example CC=gcc ./configure @end example as it helps to recreate the same configuration later with @file{config.status}. @end table All @code{configure} scripts should accept all of the ``detail'' options and the variable settings, 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.LESSER}. 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, promote, or grant legitimacy to the use of any non-free program. Proprietary software is a social and ethical problem, and our aim is to put an end to that problem. 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, or to give the public the idea that their existence is ethical. The GNU definition of free software is found on the GNU web site at @url{http://www.gnu.org/@/philosophy/@/free-sw.html}, and the definition of free documentation is found at @url{http://www.gnu.org/@/philosophy/@/free-doc.html}. The terms ``free'' and ``non-free'', used in this document, refer to those definitions. A list of important licenses and whether they qualify as free is in @url{http://www.gnu.org/@/licenses/@/license-list.html}. If it is not clear whether a license qualifies as free, 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 likely 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 for your program among the users of Foobar, if the existence of Foobar is not generally known among people who might want to use your program.) 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 some non-free Java libraries. To recommend or promote such a program is to promote the other programs it needs. This is why we are careful about listing Java programs in the Free Software Directory: we don't want to promote the non-free Java libraries. We hope this particular problem with Java will be gone by and by, as we replace the remaining non-free standard Java libraries with free software, but the general principle will remain the same: don't recommend, promote or legitimize programs that depend on non-free software to run. Some free programs strongly encourage the use of non-free software. A typical example is @command{mplayer}. It is free software in itself, and the free code can handle some kinds of files. However, @command{mplayer} recommends use of non-free codecs for other kinds of files, and users that install @command{mplayer} are very likely to install those codecs along with it. To recommend @command{mplayer} is, in effect, to promote use of the non-free codecs. Thus, you should not recommend programs that strongly encourage the use of non-free software. This is why we do not list @command{mplayer} in the Free Software Directory. 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 encouraging it is a priority; to recommend use of documentation that we are not allowed to include undermines 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 are non-free. This is because we don't include such things in the GNU system even they are free---they are outside the scope of what a software distribution needs to include. Referring to a web site that describes or recommends a non-free program is promoting that program, so please do not make links (or mention by name) web sites that contain such material. This policy is relevant particularly for the web pages for a GNU package. Following links from nearly any web site can lead eventually to non-free software; this is inherent in the nature of the web. So it makes no sense to criticize a site for having such links. As long as the site does not itself recommend a non-free program, there is no need to consider the question of the sites that it links to for other reasons. Thus, for example, you should not refer to AT&T's web site if that recommends AT&T's non-free software packages; you should not refer to a site that links to AT&T's site presenting it as a place to get some non-free program, because that link recommends and legitimizes the non-free program. However, that a site contains a link to AT&T's web site for some other purpose (such as long-distance telephone service) is not an objection against it. @node GNU Free Documentation License @appendix GNU Free Documentation License @cindex FDL, GNU Free Documentation License @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.64_2.64+dfsg.orig/doc/Makefile.in0000644000175000017500000005336111233217354017062 0ustar smcvsmcv# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # Make Autoconf documentation. # Copyright (C) 2000, 2001, 2002, 2003, 2007, 2008, 2009 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 3 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, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 DIST_COMMON = $(autoconf_TEXINFOS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/stamp-vti \ $(srcdir)/version.texi $(standards_TEXINFOS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = INFO_DEPS = $(srcdir)/autoconf.info $(srcdir)/standards.info am__TEXINFO_TEX_DIR = $(srcdir)/../build-aux 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 TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__installdirs = "$(DESTDIR)$(infodir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_MAKEINFOFLAGS = --no-split TEXI2HTML_FLAGS = -split_chapter TEXINFO_TEX = ../build-aux/texinfo.tex info_TEXINFOS = autoconf.texi standards.texi autoconf_TEXINFOS = fdl.texi install.texi standards_TEXINFOS = fdl.texi gnu-oids.texi make-stds.texi EXTRA_DIST = gendocs_template # 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 all: all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: 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 $(am__aclocal_m4_deps): .texi.info: restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ 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; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$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: rm -rf $(@:.html=.htp) if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $(@:.html=.htp) $<; \ then \ rm -rf $@; \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ else \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ exit 1; \ fi $(srcdir)/autoconf.info: autoconf.texi $(srcdir)/version.texi $(autoconf_TEXINFOS) autoconf.dvi: autoconf.texi $(srcdir)/version.texi $(autoconf_TEXINFOS) autoconf.pdf: autoconf.texi $(srcdir)/version.texi $(autoconf_TEXINFOS) autoconf.html: autoconf.texi $(srcdir)/version.texi $(autoconf_TEXINFOS) $(srcdir)/version.texi: $(srcdir)/stamp-vti $(srcdir)/stamp-vti: autoconf.texi $(top_srcdir)/configure @(dir=.; test -f ./autoconf.texi || dir=$(srcdir); \ set `$(SHELL) $(top_srcdir)/build-aux/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 $(srcdir)/version.texi \ || (echo "Updating $(srcdir)/version.texi"; \ cp vti.tmp $(srcdir)/version.texi) -@rm -f vti.tmp @cp $(srcdir)/version.texi $@ mostlyclean-vti: -rm -f vti.tmp maintainer-clean-vti: -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi $(srcdir)/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: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && \ (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'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ 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 test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && 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 uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ 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 standards.aux standards.cp standards.cps \ standards.fn standards.ky standards.log standards.pg \ standards.tmp standards.toc standards.tp standards.tps \ standards.vr clean-aminfo: -test -z "autoconf.dvi autoconf.pdf autoconf.ps autoconf.html standards.dvi \ standards.pdf standards.ps standards.html" \ || rm -rf autoconf.dvi autoconf.pdf autoconf.ps autoconf.html 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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: for dir in "$(DESTDIR)$(infodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-aminfo clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html: html-am html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ if test -d "$$d$$p"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d$$p"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ 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 \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; 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)'; test -n "$(infodir)" || list=; \ 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: install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done 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-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo 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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am 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-dvi-am uninstall-html-am \ uninstall-info-am uninstall-pdf-am uninstall-ps-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.64_2.64+dfsg.orig/doc/make-stds.texi0000644000175000017500000013246511233202134017571 0ustar smcvsmcv@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, @c 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @c @c Permission is granted to copy, distribute and/or modify this document @c under the terms of the GNU Free Documentation License, Version 1.3 @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. For more information on portable Makefiles, see @sc{posix} and @ref{Portable Make, Portable Make Programming,, autoconf, Autoconf}. @menu * Makefile Basics:: General conventions for Makefiles. * Utilities in Makefiles:: Utilities to be used in Makefiles. * Command Variables:: Variables for specifying commands. * DESTDIR:: Supporting staged installs. * 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 under @code{sh} (both the traditional Bourne shell and the @sc{posix} shell), not @code{csh}. Don't use any special features of @code{ksh} or @code{bash}, or @sc{posix} features not widely supported in traditional Bourne @code{sh}. 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 awk cat cmp cp diff echo egrep expr false grep install-info ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch tr true @end example Compression programs such as @code{gzip} can be used in the @code{dist} rule. Generally, stick to the widely-supported (usually @sc{posix}-specified) options and features of these programs. For example, don't use @samp{mkdir -p}, convenient as it may be, because a few systems don't support it at all and with others, it is not safe for parallel execution. For a list of known incompatibilities, see @ref{Portable Shell, Portable Shell Programming,, autoconf, Autoconf}. It is a good idea to avoid creating symbolic links in makefiles, since a few file 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 non-executables respectively. Minimal use of these variables is as follows: @example $(INSTALL_PROGRAM) foo $(bindir)/foo $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a @end example However, it is preferable to support a @code{DESTDIR} prefix on the target files, as explained in the next section. It is acceptable, but not required, to install multiple files in one command, with the final argument being a directory, as in: @example $(INSTALL_PROGRAM) foo bar baz $(bindir) @end example @node DESTDIR @section @code{DESTDIR}: support for staged installs @vindex DESTDIR @cindex staged installs @cindex installations, staged @code{DESTDIR} is a variable prepended to each installed target file, like this: @example $(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo $(INSTALL_DATA) libfoo.a $(DESTDIR)$(libdir)/libfoo.a @end example The @code{DESTDIR} variable is specified by the user on the @code{make} command line as an absolute file name. For example: @example make DESTDIR=/tmp/stage install @end example @noindent @code{DESTDIR} should be supported only in the @code{install*} and @code{uninstall*} targets, as those are the only targets where it is useful. If your installation step would normally install @file{/usr/local/bin/foo} and @file{/usr/local/lib/libfoo.a}, then an installation invoked as in the example above would install @file{/tmp/stage/usr/local/bin/foo} and @file{/tmp/stage/usr/local/lib/libfoo.a} instead. Prepending the variable @code{DESTDIR} to each target in this way provides for @dfn{staged installs}, where the installed files are not placed directly into their expected location but are instead copied into a temporary location (@code{DESTDIR}). However, installed files maintain their relative directory structure and any embedded file names will not be modified. You should not set the value of @code{DESTDIR} in your @file{Makefile} at all; then the files are installed into their expected locations by default. Also, specifying @code{DESTDIR} should not change the operation of the software in any way, so its value should not be included in any file contents. @code{DESTDIR} support is commonly used in package creation. It is also helpful to users who want to understand what a given package will install where, and to allow users who don't normally have permissions to install into protected areas to build and install before gaining those permissions. Finally, it can be useful with tools such as @code{stow}, where code is installed in one place but made to appear to be installed somewhere else using symbolic links or special mount operations. So, we strongly recommend GNU packages support @code{DESTDIR}, though it is not an absolute requirement. @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 and the values they should have in GNU packages are described below. They are based on a standard file system layout; variants of it are used in GNU/Linux and other modern operating systems. Installers are expected to override these values when calling @command{make} (e.g., @kbd{make prefix=/usr install} or @command{configure} (e.g., @kbd{configure --prefix=/usr}). GNU packages should not try to guess which value should be appropriate for these variables on the system they are being installed onto: use the default settings specified here so that all GNU packages behave identically, allowing the installer to achieve any desired layout. These first 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@@}.) The definition of @samp{libexecdir} is the same for all packages, so you should install your data in a subdirectory thereof. Most packages install their data under @file{$(libexecdir)/@var{package-name}/}, possibly within additional subdirectories thereof, such as @file{$(libexecdir)/@var{package-name}/@var{machine}/@var{version}}. @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}. (If you are using Autoconf, write it as @samp{@@datarootdir@@}.) @samp{datadir}'s default value is based on this variable; so are @samp{infodir}, @samp{mandir}, and others. @item datadir The directory for installing idiosyncratic 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 program-specific files without altering the location for Info files, man pages, etc. This should normally be @file{/usr/local/share}, but write it as @file{$(datarootdir)}. (If you are using Autoconf, write it as @samp{@@datadir@@}.) The definition of @samp{datadir} is the same for all packages, so you should install your data in a subdirectory thereof. Most packages install their data under @file{$(datadir)/@var{package-name}/}. @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 docdir The directory for installing documentation files (other than Info) for this package. By default, it should be @file{/usr/local/share/doc/@var{yourpkg}}, but it should be written as @file{$(datarootdir)/doc/@var{yourpkg}}. (If you are using Autoconf, write it as @samp{@@docdir@@}.) The @var{yourpkg} subdirectory, which may include a version number, prevents collisions among files with common names, such as @file{README}. @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@@}.) @code{infodir} is separate from @code{docdir} for compatibility with existing practice. @item htmldir @itemx dvidir @itemx pdfdir @itemx psdir Directories for installing documentation files in the particular format. They should all be set to @code{$(docdir)} by default. (If you are using Autoconf, write them as @samp{@@htmldir@@}, @samp{@@dvidir@@}, etc.) Packages which supply several translations of their documentation should install them in @samp{$(htmldir)/}@var{ll}, @samp{$(pdfdir)/}@var{ll}, etc. where @var{ll} is a locale abbreviation such as @samp{en} or @samp{pt_BR}. @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@@}.) This directory usually has a subdirectory per locale. @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 Autoconf, 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. At times, not all of these variables may be implemented in the current release of Autoconf and/or Automake; but as of Autoconf@tie{}2.60, we believe all of them are. When any are missing, the descriptions here serve as specifications for what Autoconf will implement. As a programmer, you can either use a development version of Autoconf or avoid using these variables until a stable release is made which supports them. @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 (and other documentation format) 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 bug-make@gnu.org. @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 install-html @itemx install-dvi @itemx install-pdf @itemx install-ps These targets install documentation in formats other than Info; they're intended to be called explicitly by the person installing the package, if that format is desired. GNU prefers Info files, so these must be installed by the @code{install} target. When you have many documentation files to install, we recommend that you avoid collisions and clutter by arranging for these targets to install in subdirectories of the appropriate installation directory, such as @code{htmldir}. As one example, if your package has multiple manuals, and you wish to install HTML documentation with many files (such as the ``split'' mode output by @code{makeinfo --html}), you'll certainly want to use subdirectories, or two nodes with the same name in different manuals will overwrite each other. Please make these @code{install-@var{format}} targets invoke the commands for the @var{format} target, for example, by making @var{format} a dependency. @item uninstall Delete all the installed files---the copies that the @samp{install} and @samp{install-*} targets create. 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 in the current directory that are normally created by building the program. Also delete files in other directories if they are created by this makefile. However, 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. There is no need to delete parent directories that were created with @samp{mkdir -p}, since they could have existed anyway. Delete @file{.dvi} files here if they are not part of the distribution. @item distclean Delete all files in the current directory (or created by this makefile) 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. However, there is no need to delete parent directories that were created with @samp{mkdir -p}, since they could have existed anyway. @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 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. Also, there is no need to delete parent directories that were created with @samp{mkdir -p}, since they could have existed anyway. These are the only exceptions; @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 @itemx html @itemx pdf @itemx ps Generate documentation files in the given format. These targets should always exist, but any or all can be a no-op if the given output format cannot be generated. These targets should not be dependencies of the @code{all} target; the user must manually invoke them. Here's an example rule for generating DVI files from Texinfo: @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. Here's another example, this one for generating HTML from Texinfo: @smallexample html: foo.html foo.html: foo.texi chap1.texi chap2.texi $(TEXI2HTML) $(srcdir)/foo.texi @end smallexample @noindent Again, you would define the variable @code{TEXI2HTML} in the Makefile; for example, it might run @code{makeinfo --no-split --html} (@command{makeinfo} is part of the Texinfo distribution). @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}. It is ok to support other free compression formats as well, such as @code{bzip2} and @code{lzma}. 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 (the @option{-s} option to @command{make} is needed to silence messages about entering subdirectories): @smallexample make -s -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 ~ /^(normal-install|post-install)[ \t]*$/ @{on = 0@} on @{print $0@} $0 ~ /^pre-install[ \t]*$/ @{on = 1@} @end smallexample autoconf2.64_2.64+dfsg.orig/doc/gendocs_template0000644000175000017500000000720511233202134020237 0ustar smcvsmcv %%TITLE%% - GNU Project - Free Software Foundation (FSF)

%%TITLE%%

Free Software Foundation
last updated %%DATE%%

This manual (%%PACKAGE%%) is available in the following formats:

You can buy printed copies of some manuals (among other items) from the Free Software Foundation; this helps support FSF activities.

(This page generated by the %%SCRIPTNAME%% script.)

autoconf2.64_2.64+dfsg.orig/doc/install.texi0000644000175000017500000004154011233214333017344 0ustar smcvsmcv@c This file is included by autoconf.texi and is used to produce @c the INSTALL file. @ifclear autoconf @firstparagraphindent insert @unnumbered Installation Instructions Copyright @copyright{} 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. @end ifclear @node Basic Installation @section Basic Installation Briefly, the shell commands @samp{./configure; make; make install} should configure, build, and install this package. The following more-detailed instructions are generic; see the @file{README} file for instructions specific to this package. @ifclear autoconf Some packages provide this @file{INSTALL} file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. @end ifclear More recommendations for @acronym{GNU} packages can be found in @ref{Makefile Conventions, , Makefile Conventions, standards, @acronym{GNU} Coding Standards}. 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 @command{autoconf}. You need @file{configure.ac} if you want to change it or regenerate @file{configure} using a newer version of @command{autoconf}. The simplest way to compile this package is: @enumerate @item @command{cd} to the directory containing the package's source code and type @samp{./configure} to configure the package for your system. Running @command{configure} might take a while. 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, generally using the just-built uninstalled binaries. @item Type @samp{make install} to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the @samp{make install} phase executed with root privileges. @item Optionally, type @samp{make installcheck} to repeat any self-tests, but this time using the binaries in their final installed location. @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. @item Often, you can also type @samp{make uninstall} to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the @acronym{GNU} Coding Standards. @item Some packages, particularly those that use Automake, provide @samp{make distcheck}, which can by used by developers to test that all other targets like @samp{make install} and @samp{make uninstall} work correctly. This target is generally not run by end users. @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=c99 CFLAGS=-g 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 can use @acronym{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{..}. This is known as a @dfn{VPATH} build. With a non-@acronym{GNU} @command{make}, it is safer 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. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types---known as @dfn{fat} or @dfn{universal} binaries---by specifying multiple @option{-arch} options to the compiler but only a single @option{-arch} option to the preprocessor. Like this: @example ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" @end example This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the @command{lipo} tool if you have problems. @node Installation Names @section Installation Names By default, @samp{make install} installs the package's commands under @file{/usr/local/bin}, include files under @file{/usr/local/include}, etc. You can specify an installation prefix other than @file{/usr/local} by giving @command{configure} the option @option{--prefix=@var{prefix}}, where @var{prefix} must be an absolute path. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option @option{--exec-prefix=@var{prefix}} to @command{configure}, the package uses @var{prefix} as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like @option{--bindir=@var{dir}} 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. In general, the default for these options is expressed in terms of @samp{$@{prefix@}}, so that specifying just @option{--prefix} will affect all of the other directory specifications. The most portable way to affect installation locations is to pass the correct locations to @command{configure}; however, many packages provide one or both of the following shortcuts of passing variable assignments to the @samp{make install} command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, @samp{make install prefix=/path/to/alternate} will choose an alternate location, as well as influencing all other directory configuration variables that were expressed in terms of @samp{$@{prefix@}} (or, put another way, all directories specified during @command{configure} but not in terms of the common prefix must each be overridden at install time for the entire installation to be relocated). The approach of makefile variable overrides for each directory variable is required by the @acronym{GNU} Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use @acronym{GNU} Libtool. The second method involves providing the @samp{DESTDIR} variable. For example, @samp{make install DESTDIR=/path/to/alternate} will prepend @samp{/path/to/alternate} before all installation paths. The approach of @samp{DESTDIR} overrides is not required by the @acronym{GNU} Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of @samp{$@{prefix@}} at @command{configure} time. For packages which support @samp{DESTDIR}, the variable should remain undefined during @command{configure} and @samp{make all}, and only be specified during @samp{make install}. @node Optional Features @section Optional Features 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}}. 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. Some packages offer the ability to configure how verbose the execution of @command{make} will be. For these packages, running @samp{./configure --enable-silent-rules} sets the default to minimal output, which can be overridden with @code{make V=1}; while running @samp{./configure --disable-silent-rules} sets the default to verbose, which can be overridden with @code{make V=0}. @node Particular Systems @section Particular systems On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: @example ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" @end example @noindent and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a.@: Tru64, some versions of the default C compiler cannot parse its @code{} header file. The option @option{-nodtk} can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try @example ./configure CC="cc" @end example @noindent and if that doesn't work, try @example ./configure CC="cc -nodtk" @end example On Solaris, don't put @code{/usr/ucb} early in your @env{PATH}. This directory contains several dysfunctional programs; working variants of these programs are available in @code{/usr/bin}. So, if you need @code{/usr/ucb} in your @env{PATH}, put it @emph{after} @code{/usr/bin}. On Haiku, software installed for all users goes in @file{/boot/common}, not @file{/usr/local}. It is recommended to use the following options: @example ./configure --prefix=/boot/common @end example @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 @option{--target=@var{type}} 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 causes the specified @command{gcc} to be used as the C compiler (unless it is overridden in the site shell script). @noindent Unfortunately, this technique does not work for @env{CONFIG_SHELL} due to an Autoconf bug. Until the bug is fixed you can use this workaround: @example CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash @end example @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 all of the options to @command{configure}, and exit. @item --help=short @itemx --help=recursive Print a summary of the options unique to this package's @command{configure}, and exit. The @code{short} variant lists options used only in the top level, while the @code{recursive} variant lists options also present in any nested packages. @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. @item --prefix=@var{dir} Use @var{dir} as the installation prefix. @ref{Installation Names} for more details, including other options available for fine-tuning the installation locations. @item --no-create @itemx -n Run the configure checks, but stop before creating any output files. @end table @noindent @command{configure} also accepts some other, not widely useful, options. Run @samp{configure --help} for more details. @c Local Variables: @c fill-column: 72 @c ispell-local-dictionary: "american" @c indent-tabs-mode: nil @c whitespace-check-buffer-indent: nil @c End: autoconf2.64_2.64+dfsg.orig/doc/gnu-oids.texi0000644000175000017500000000333611233202134017420 0ustar smcvsmcv@c This table of OID's is included in the GNU Coding Standards. @c @c Copyright 2008, 2009 Free Software Foundation, Inc. @c @c Copying and distribution of this file, with or without modification, @c are permitted in any medium without royalty provided the copyright @c notice and this notice are preserved. @c @c When adding new OIDs, please add them also to @c http://www.alvestrand.no/objectid/ (except it gets an internal @c server error, so never mind) @c (Our page is http://www.alvestrand.no/objectid/1.3.6.1.4.1.11591.html.) 1.3.6.1.4.1.11591 GNU 1.3.6.1.4.1.11591.1 GNU Radius 1.3.6.1.4.1.11591.2 GnuPG 1.3.6.1.4.1.11591.2.1 notation 1.3.6.1.4.1.11591.2.1.1 pkaAddress 1.3.6.1.4.1.11591.3 GNU Radar 1.3.6.1.4.1.11591.4 GNU GSS @c Added 2008-10-24 on request from Sergey Poznyakoff 1.3.6.1.4.1.11591.5 GNU Mailutils @c Added 2009-03-03 on request from Simon Josefsson 1.3.6.1.4.1.11591.5 GNU Shishi 1.3.6.1.4.1.11591.12 digestAlgorithm 1.3.6.1.4.1.11591.12.2 TIGER/192 1.3.6.1.4.1.11591.13 encryptionAlgorithm 1.3.6.1.4.1.11591.13.2 Serpent 1.3.6.1.4.1.11591.13.2.1 Serpent-128-ECB 1.3.6.1.4.1.11591.13.2.2 Serpent-128-CBC 1.3.6.1.4.1.11591.13.2.3 Serpent-128-OFB 1.3.6.1.4.1.11591.13.2.4 Serpent-128-CFB 1.3.6.1.4.1.11591.13.2.21 Serpent-192-ECB 1.3.6.1.4.1.11591.13.2.22 Serpent-192-CBC 1.3.6.1.4.1.11591.13.2.23 Serpent-192-OFB 1.3.6.1.4.1.11591.13.2.24 Serpent-192-CFB 1.3.6.1.4.1.11591.13.2.41 Serpent-256-ECB 1.3.6.1.4.1.11591.13.2.42 Serpent-256-CBC 1.3.6.1.4.1.11591.13.2.43 Serpent-256-OFB 1.3.6.1.4.1.11591.13.2.44 Serpent-256-CFB 1.3.6.1.4.1.11591.14 CRC algorithms 1.3.6.1.4.1.11591.14.1 CRC 32 autoconf2.64_2.64+dfsg.orig/doc/version.texi0000755000175000017500000000013311233217133017360 0ustar smcvsmcv@set UPDATED 26 July 2009 @set UPDATED-MONTH July 2009 @set EDITION 2.64 @set VERSION 2.64 autoconf2.64_2.64+dfsg.orig/COPYING0000644000175000017500000004310310776002617015301 0ustar smcvsmcv GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser General Public License instead of this License. autoconf2.64_2.64+dfsg.orig/COPYINGv30000644000175000017500000010451310776002617015555 0ustar smcvsmcv GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state 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 3 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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 Lesser General Public License instead of this License. But first, please read . autoconf2.64_2.64+dfsg.orig/tests/0000755000175000017500000000000011233220603015371 5ustar smcvsmcvautoconf2.64_2.64+dfsg.orig/tests/acfortran.at0000444000175000017500000000110511232571665017711 0ustar smcvsmcv# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 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_F77_NAME_MANGLING]) AT_CHECK_AU_MACRO([AC_LANG_FORTRAN77]) autoconf2.64_2.64+dfsg.orig/tests/torture.at0000644000175000017500000011446711174407707017460 0ustar smcvsmcv# -*- Autotest -*- # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, # 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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 ## ------------------------------- ## ## parameterized AC_CONFIG_FILES. ## ## ------------------------------- ## AT_SETUP([Parameterized AC_CONFIG_FILES]) AT_CONFIGURE_AC([[ files="foo bar" AC_CONFIG_FILES([$files])]]) AT_CHECK_AUTOCONF([], [], [], [ignore]) touch foo.in bar.in config.hin AT_CHECK_CONFIGURE AT_CLEANUP ## ------------ ## ## AC_ARG_VAR. ## ## ------------ ## # AT_CHECK_AC_ARG_VAR(FIRST-VALUE, SECOND-VALUE, [STATUS = 1]) # ------------------------------------------------------------ # Check that AC_ARG_VAR caches the latest values, diagnoses # inconsistencies, and arms config.status. Check that recheck # returns STATUS, save configure output in files 'stdout' and 'stderr' # for further inspection. m4_define([AT_CHECK_AC_ARG_VAR], [rm -f config.cache # Initial value. m4_ifval([$1], [precious='m4_bpatsubst([$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], [m4_default([$3], [1])], [stdout], [stderr]) ])# 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]) # Change a precious variable that contains braces AT_CHECK_AC_ARG_VAR([apple of my {eye}], [orange of my eye]) # Change a precious variable that contains all kinds of fun AT_CHECK_AC_ARG_VAR(['p r ec"iou$], [orange of my eye]) dnl restore font-lock: " # Warn (but do not fail) about a whitespace-only change AT_CHECK_AC_ARG_VAR([ apple of my eye ], [apple of my eye], [0], ["has whitespace changes"]) mv stdout configure-output AT_CHECK([grep "ignoring whitespace changes" stderr], [], [ignore]) AT_CHECK([grep "precious: apple" configure-output], [], [ignore]) AT_CLEANUP ## ---------------------------------------------- ## ## AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS. ## ## ---------------------------------------------- ## AT_SETUP([[AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS]]) AT_DATA([configure.ac], [[AC_INIT AC_PROG_FGREP rm -f -r 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, [cp input command]);; var-command) AC_CONFIG_COMMANDS(var-command, [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 # AT_CHECK_CONFIG_CREATION_NOWRITE(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_NOWRITE], [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... # Skip check if user can rename files into a read-only directory (when # run by root or on w32). touch t chmod a-w . mv t t1 >/dev/null 2>&1 \ || AT_CHECK([./config.status var-$1 /dev/full], [1], [ignore], [ignore]) fi # Create a header AT_CHECK_CONFIG_CREATION_NOWRITE(header) # Create a header on stdout AT_CHECK([./config.status --header=-:input /dev/full], [1], [ignore], [ignore]) fi # Execute a command AT_CHECK_CONFIG_CREATION_NOWRITE(command) # Create a link AT_CHECK_CONFIG_CREATION_NOWRITE(link) # Check that no use of `ac_write_fail' escaped into config.status AT_CHECK([grep ac_write_fail config.status], [1]) # Check that --file and --header accept funny file names AT_DATA([fgrep.in], [[FGREP="@FGREP@" ]]) ./config.status --file=fgrep:fgrep.in . ./fgrep x= export x for file in \ 'with funny '\'' $x & #! name' \ 'file with funny \ '\'' \'\'' $ & #!*? name' \ 'with funny \ '\'' \'\'' " | b & * ? name ' # "restore font-lock do # The function func_sanitize_file_name comes from tools.at file=`func_sanitize_file_name "$file"` cat >"$file.in" <<'END' @configure_input@ END AT_CHECK([./config.status "--file=$file:$file.in"], [0], [ignore]) AT_CHECK([$FGREP "$file" "$file"], [0], [ignore]) AT_CHECK([./config.status "--header=$file:$file.in"], [0], [ignore]) # Run the same test a 2nd time to see that config.status does not recreate # the header (regression test) AT_CHECK_UNQUOTED([./config.status "--header=$file:$file.in"], [0], [config.status: creating $file config.status: $file is unchanged ]) AT_CHECK_UNQUOTED([grep ' & ' "$file"], [], [/* $file. Generated from $file.in by configure. */ ]) AT_CHECK([$FGREP "$file" "$file"], [0], [ignore]) done AT_CLEANUP ## ---------------------------------------- ## ## Macro calls in AC_CONFIG_COMMANDS tags. ## ## ---------------------------------------- ## AT_SETUP([Macro calls in AC_CONFIG_COMMANDS tags]) AT_DATA_M4SUGAR([configure.ac], [[AC_INIT AC_CONFIG_COMMANDS([m4_if(1,1,mytag)]) AC_OUTPUT ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE 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, # (ii) correctly passes them to `config.status', which we check by # running `config.status --recheck', and (iii) correctly passes them # to sub-configure scripts. AT_SETUP([configure invocation]) mkdir sub AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_SUBDIRS([sub]) echo "result=$one$enable_two$with_three" AC_OUTPUT ]]) AT_DATA([sub/configure.ac], [[AC_INIT echo "result=$one$enable_two$with_three" AC_OUTPUT ]]) echo fake install-sh script >install-sh AT_CHECK_AUTOCONF cd sub AT_CHECK_AUTOCONF cd .. AT_CHECK_CONFIGURE([one=one --enable-two=two --with-three=three | sed -n -e 's/^result=//p'], 0, [m4_do([onetwothree ], [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, [m4_do(["'$ " ' $ "'$ ], ["'$ " ' $ "'$ ])]) AT_CHECK([./config.status --recheck | sed -n 's/^result=//p'], 0, ["'$ " ' $ "'$ ]) dnl restore font-lock: " 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_KEYWORDS([AC@&t@_DEFINE]) 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) # backslash-newline combinations AC_DEFINE([multiline], [line1\ line2\ line3 \ line4]) AC_DEFINE([multiline_args(ARG1, ARG2)], [ARG2 \ ARG1]) AC_CONFIG_FILES(defs) # underquoted # AC_DEFINE([paste(a,b)], [a##b]) # 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 #define aaa(a, aa) aa a #define aaab #define aaac(a, aa) aa a #undef multiline # undef multiline_args #define paste(a,b) a##b /* an ugly one: */ #define str(define) \ #define #define stringify(arg) str(arg) #undef aaa /* with comments */ #undef not_substed /* with comments */ ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_DATA([expout], [[/* config.h. Generated from config.hin 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 #define aaa AAA #define aaab #define aaac(a, aa) aa a #define multiline line1\ line2\ line3 \ line4 # define multiline_args(ARG1, ARG2) ARG2 \ ARG1 #define paste(a,b) a##b /* an ugly one: */ #define str(define) \ #define #define stringify(arg) str(arg) #define aaa AAA /* #undef not_substed */ ]]) 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=\"\" -DPACKAGE_URL=\"\" -Dfoo=toto -Dbar=tata -Dbaz=titi -Dfubar=tutu -Da=A -Daaa=AAA -Daa=AA -Dmultiline=line1line2line3\ line4 -Dmultiline_args\(ARG1,\ ARG2\)=ARG2\ ARG1 -Dpaste\(a,b\)=a\#\#b ]]) # 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 and AC_SUBST_FILE 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)@ @[f]AT_Count@ ])]) i=1 while test $i != 101; do echo "content of file $i" > file_$i AS_VAR_ARITH([i], [$i + 1]) done # ------------ # # 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_DUMMY_VAR($1)", AC_DESCRIPTION) AC_SUBST(AC_DUMMY_VAR($1)) AC_SUBST_FILE([f]$1) f$1=file_$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_PROG_AWK AC_OUTPUT ]])# configure.ac AT_CHECK_AUTOCONF AT_CHECK_AUTOHEADER # Check both awk and the result of AC_PROG_AWK for awk_arg in FOO= AWK=awk; do AT_CHECK_CONFIGURE([$awk_arg]) # 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 home page for this package. */ #define PACKAGE_URL "" /* 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_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 content of file AT_Count ])]) AT_CHECK([cat dummy], 0, expout) done AT_CLEANUP ## ------------------------------- ## ## Substitute a 2000-byte string. ## ## ------------------------------- ## # Solaris 9 /usr/ucb/sed that rejects commands longer than 4000 bytes. HP/UX # sed dumps core around 8 KiB. However, POSIX says that sed need not # handle lines longer than 2048 bytes (including the trailing newline). # So we'll just test a 2000-byte value, and for awk, we test a line with # almost 1000 words, and one variable with 5 lines of 2000 bytes each: # multi-line values should allow to get around the limitations. AT_SETUP([Substitute a 2000-byte string]) AT_DATA([Foo.in], [@foo@ ]) AT_DATA([Bar.in], [@bar@ ]) AT_DATA([Baz.in], [@baz@ ]) AT_DATA([configure.ac], [[AC_INIT AC_SUBST([foo], ]m4_for([n], 1, 100,, ....................)[) AC_SUBST([bar], "]m4_for([n], 1, 100,, @ @ @ @ @ @ @ @ @ @@)[") baz="]m4_for([m], 1, 100,, ... ... ... ... ....)[ " baz=$baz$baz$baz$baz$baz AC_SUBST([baz]) AC_PROG_AWK AC_CONFIG_FILES([Foo Bar Baz]) AC_OUTPUT ]]) cp "$abs_top_srcdir/build-aux/install-sh" . AT_CHECK_AUTOCONF # Check both awk and the result of AC_PROG_AWK for awk_arg in Foo= AWK=awk; do AT_CHECK_CONFIGURE([$awk_arg]) AT_CHECK([cat Foo], 0, m4_for([n], 1, 100,, ....................) ) AT_CHECK([cat Bar], 0, m4_for([n], 1, 100,, @ @ @ @ @ @ @ @ @ @@) ) AT_DATA([stdout], [m4_for([n], 1, 5,, m4_for([m], 1, 100,, ... ... ... ... ....) )]) AT_CHECK([cat Baz], 0, [stdout]) done AT_CLEANUP ## ------------------------------ ## ## Define to a 2000-byte string. ## ## ------------------------------ ## AT_SETUP([Define to a 2000-byte string]) AT_KEYWORDS([AC@&t@_DEFINE AC@&t@_DEFINE_UNQUOTED]) AT_CONFIGURE_AC( [[ AC_DEFINE_UNQUOTED([foo], ]m4_for([n], 1, 100,, ....................)[, [desc]) AC_DEFINE([fooq], ]m4_for([n], 1, 100,, ....................)[, [desc]) ]]) AT_CHECK_AUTOCONF AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE AT_CHECK_DEFINES([@%:@define foo m4_for([n], 1, 100,, ....................) @%:@define fooq m4_for([n], 1, 100,, ....................) ]) AT_CLEANUP ## ------------------------------------------ ## ## Substitute and define special characters. ## ## ------------------------------------------ ## # Use characters special to the shell, sed, awk, and M4. AT_SETUP([Substitute and define special characters]) AT_KEYWORDS([AC@&t@_DEFINE AC@&t@_DEFINE_UNQUOTED]) AT_DATA([Foo.in], [@foo@ @bar@@notsubsted@@baz@ stray @ and more@@@baz@ abc@bar@baz@baz abc@bar@@baz@baz abc@bar@@baz@baz@ abc@bar @baz@baz abc@bar @baz@baz@ abc@bar @baz@@baz@ @file@ @file@ X@file@ @file@X ]) AT_DATA([File], [@foo@@bar@ ]) AT_DATA([Zardoz.in], [@zardoz@ ]) AT_CONFIGURE_AC( [[foo="AS@&t@_ESCAPE([[X*'[]+ ", & &`\($foo \& \\& \\\& \\\\& \ \\ \\\ !]])" #" bar="@foo@ @baz@" baz=bla ( for i in 0 1 2 3; do for j in 0 1 2 3 4 5 6 7; do for k in 0 1 2 3 4 5 6 7; do case $i$j$k in #( 000 | 015 | 377) ;; # MinGW awk dislikes 0xFF, and the test does # the wrong thing for CR on MinGW. #( *) printf \\$i$j$k's' ;; # The 's' works around a Solaris 8 /bin/bash bug. esac done done done printf \\n ) >allowed-chars zardoz=`cat allowed-chars` AC_SUBST([foo]) AC_SUBST([bar]) AC_SUBST([baz]) AC_SUBST([zardoz]) file=File AC_SUBST_FILE([file]) AC_DEFINE([fooq], [[X*'[]+ ", & &`\($foo !]], [Awful value.]) AC_DEFINE([barq], [[%!_!# X]], [Value that is used as special delimiter.]) AC_DEFINE_UNQUOTED([foo], [[X*'[]+ ", & &\`\\(\$foo !]], [Awful value.]) AC_DEFINE_UNQUOTED([bar], [[%!_!# X]], [Value that is used as special delimiter.]) AC_DEFINE_UNQUOTED([unq1], [$baz], [unquoted, test 1]) AC_DEFINE_UNQUOTED([unq2], [\$baz], [unquoted, test 2]) AC_DEFINE_UNQUOTED([unq3], ["$baz"], [unquoted, test 3]) AC_DEFINE_UNQUOTED([unq4], [${baz+set}], [unquoted, test 4]) AC_DEFINE_UNQUOTED([unq5], ["${baz+`echo "a b"`}"], [unquoted, test 5]) AC_DEFINE_UNQUOTED([unq6], [`echo hi`], [unquoted, test 6]) AC_DEFINE_UNQUOTED([unq7], ['\"'], [unquoted, test 7]) AC_PROG_AWK AC_CONFIG_FILES([Foo Zardoz])]]) AT_CHECK_AUTOCONF AT_CHECK_AUTOHEADER # Check both awk and the result of AC_PROG_AWK for awk_arg in FOO= AWK=awk; do AT_CHECK_CONFIGURE([$awk_arg]) AT_CHECK([cat Foo], 0, [[X*'[]+ ", & &`\($foo \& \\& \\\& \\\\& \ \\ \\\ ! @foo@ @baz@@notsubsted@bla stray @ and more@@bla abc@foo@ @baz@baz@baz abc@foo@ @baz@blabaz abc@foo@ @baz@blabaz@ abc@bar blabaz abc@bar blabaz@ abc@bar blabla @foo@@bar@ @foo@@bar@ X@file@ @file@X ]]) AT_CHECK([cmp allowed-chars Zardoz]) AT_CHECK_DEFINES([[#define bar %!_!# X #define barq %!_!# X #define foo X*'[]+ ", & &`\($foo ! #define fooq X*'[]+ ", & &`\($foo ! #define unq1 bla #define unq2 $baz #define unq3 "bla" #define unq4 set #define unq5 "a b" #define unq6 hi #define unq7 '\"' ]]) done AT_CLEANUP ## ---------------------- ## ## Substitute a newline. ## ## ---------------------- ## AT_SETUP([Substitute a newline]) AT_DATA([Foo.in], [@foo@ @bar@ ]) AT_DATA([configure.ac], [[AC_INIT foo='one two' bar='%!_!# '' x' AC_SUBST([foo]) AC_SUBST([bar]) AC_CONFIG_FILES([Foo]) AC_PROG_AWK AC_OUTPUT ]]) cp "$abs_top_srcdir/build-aux/install-sh" . echo 'one two %!_!# '' x' >expout AT_CHECK_AUTOCONF # Check both awk and the result of AC_PROG_AWK for awk_arg in FOO= AWK=awk; do AT_CHECK_CONFIGURE([$awk_arg]) AT_CHECK([cat Foo], 0, [expout]) done AT_CLEANUP ## ------------------ ## ## Define a newline. ## ## ------------------ ## AT_SETUP([Define a newline]) AT_KEYWORDS([AC@&t@_DEFINE AC@&t@_DEFINE_UNQUOTED]) AT_CONFIGURE_AC([[AC_DEFINE([foo], [one two], [This spans two lines.]) ]]) AT_CHECK_AUTOCONF([], [], [], [stderr]) dnl Older versions of m4 report error at line 5 (end of macro); dnl newer versions report it at line 4 (start of macro). AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [], [[warning: AC_DEFINE: `one two' is not a valid preprocessor define value ]]) AT_CHECK_AUTOHEADER([], [], [], [stderr]) AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [], [[warning: AC_DEFINE: `one two' is not a valid preprocessor define value ]]) AT_CHECK_CONFIGURE AT_CHECK_DEFINES([[#define foo one ]]) AT_CONFIGURE_AC([[AC_DEFINE_UNQUOTED([foo], [one two], [This spans two lines.]) ]]) AT_CHECK_AUTOCONF([], [], [], [stderr]) AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [], [[warning: AC_DEFINE_UNQUOTED: `one two' is not a valid preprocessor define value ]]) AT_CHECK_AUTOHEADER([], [], [], [stderr]) AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [], [[warning: AC_DEFINE_UNQUOTED: `one two' is not a valid preprocessor define value ]]) AT_CHECK_CONFIGURE AT_CHECK_DEFINES([[#define foo one ]]) AT_CLEANUP ## ------------------------------------ ## ## AC_SUBST: variable name validation. ## ## ------------------------------------ ## AT_SETUP([AC_SUBST: variable name validation]) AT_CONFIGURE_AC([[AC_SUBST(, []) AC_CONFIG_FILES([Makefile]) ]]) AT_DATA([Makefile.in], [[ ]]) mv -f configure.ac configure.tmpl # Invalid names. for var in ['' ab\~ ab\( ab[] ab\' ab\" ab\\\\]; do sed ["s/AC_SUBST(/&[$var]/"] configure.ac AT_CHECK_AUTOCONF([], [1], [], [ignore]) done # Valid names. for var in ab a4 'a@@&t@\&t@b'; do sed ["s/AC_SUBST(/&[$var]/"] configure.ac AT_CHECK_AUTOCONF AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE done AT_CLEANUP ## ------------------------ ## ## datarootdir workaround. ## ## ------------------------ ## AT_SETUP([datarootdir workaround]) AT_DATA([Foo.in], [@datadir@ @docdir@ @infodir@ @localedir@ @mandir@ ]) AT_DATA([Bar.in], [@mydatadir@ ]) AT_DATA([configure.ac], [[AC_INIT d@&t@nl The following line silences the warnings, if uncommented: d@&t@nl AC_DEFUN([AC_DATAROOTDIR_CHECKED]) # This substitution is wrong and bogus! Don't use it in your own code! # Read `info Autoconf "Defining Directories"'! AC_SUBST([mydatadir], [${datadir}/my]) AC_CONFIG_FILES([Foo Bar]) AC_OUTPUT ]]) cp "$abs_top_srcdir/build-aux/install-sh" . AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([], [], [], [config.status: WARNING: 'Foo.in' seems to ignore the --datarootdir setting config.status: WARNING: Bar contains a reference to the variable `datarootdir' which seems to be undefined. Please make sure it is defined. ]) AT_CHECK([grep datarootdir Foo], 1, []) rm configure sed '/AC_DEFUN/s/^d@&t@nl //' configure.ac >t mv t configure.ac AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_CLEANUP ## -------- ## ## srcdir. ## ## -------- ## AT_SETUP([srcdir]) rm -f -r at-dir mkdir at-dir : >at-dir/bar.in : >foo.in AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_FILES([foo at-dir/bar]) # Use quotes in the INIT-COMMANDS to accommodate a value of $srcdir # containing e.g., spaces or shell meta-characters. # Use *single* quotes because the context is an unquoted here-doc. AC_CONFIG_COMMANDS([report], [test -f "$srcdir/configure.ac" || AC_MSG_ERROR([cannot find $srcdir/configure.ac])], [srcdir='$srcdir']) AC_OUTPUT rm -f -r foo at-dir/bar ]]) AT_CHECK_AUTOCONF # In place. AT_CHECK([./configure], [], [ignore]) # Relative name. AT_CHECK([cd at-dir && ../configure], [], [ignore]) # Absolute name. 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 ## ------------------------------------- ## ## AC_CONFIG_LINKS and identical files. ## ## ------------------------------------- ## AT_SETUP([AC_CONFIG_LINKS and identical files]) AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_LINKS([src/s:src/s]) test "$srcdir" != '.' && AC_CONFIG_LINKS([src/t:src/t]) AC_OUTPUT ]]) mkdir src build echo file1 > src/s echo file2 > src/t AT_CHECK_AUTOCONF cd build AT_CHECK([../configure && ../configure], 0, [ignore]) AT_CHECK([cat src/s src/t], 0, [file1 file2 ]) cd .. AT_CHECK([./configure && ./configure], 0, [ignore], [stderr]) AT_CHECK([grep src/t stderr], 1) AT_CHECK([cat src/s src/t], 0, [file1 file2 ]) AT_CHECK(["`pwd`"/configure && "`pwd`"/configure], 0, [ignore], [ignore]) AT_CHECK([cat src/s src/t], 0, [file1 file2 ]) AT_CLEANUP AT_BANNER([autoreconf.]) ## ---------------------------- ## ## 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 '[^0-9]1.[01234][^0-9]' stdout && exit 77]], [1], [ignore]) # Set CONFIG_SITE to a nonexistent file, so that there are # no worries about nonstandard values for 'prefix'. CONFIG_SITE=no-such-file export CONFIG_SITE # 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. chmod a-w inner/innermost inner . AT_CHECK([{ ./configure --help=recursive; chmod u+w .; } | grep INNER], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod u+w . inner inner/innermost # 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. AT_CHECK([cd builddir && ../configure --prefix /bad --prefix /good INNER=bad INNER=good], 0, [ignore]) AT_CHECK([cat builddir/inner/innermost/config], 0, [INNER=good srcdir=../../../inner/innermost top_srcdir=../../../inner prefix=/good ]) # Make sure --prefix is properly quoted AT_CHECK([cd builddir && ../configure --prefix "/a b c$ 'd"], 0, [ignore]) AT_CHECK([cat builddir/inner/innermost/config], 0, [INNER=inner srcdir=../../../inner/innermost top_srcdir=../../../inner prefix=/a b c$ 'd ]) # Make sure --silent is properly passed... AT_CHECK([cd builddir && ../configure --silent], 0, []) # ...but not stored in config.status. AT_CHECK([cd builddir && ./config.status --recheck], 0, [stdout]) AT_CHECK([grep 'creating \./config.status' stdout], 0, [ignore]) # Make sure we can run autoreconf on a subdirectory rm -f configure configure.in AT_CHECK([autoreconf inner], [], [], [ignore]) # Make sure we can pass a configure.ac name AT_CHECK([cd inner && autoreconf configure.in], [], [], [ignore]) AT_CHECK([autoreconf inner/configure.in], [], [], [ignore]) 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 inner2]) AC_OUTPUT ]]) # The contents of `inner/', and `inner/innermost/'. AS_MKDIR_P([inner/innermost]) AS_MKDIR_P([inner2]) AT_DATA([inner/configure.in], [[AC_INIT(GNU Inner, 1.0) AC_ARG_VAR([INNER], [an inner variable]) AC_CONFIG_SUBDIRS(innermost) AC_OUTPUT ]]) AT_DATA([inner/innermost/configure.in], [[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]) if test -n "$innermost_error"; then AC_MSG_FAILURE([error in $PACKAGE_NAME]) fi AC_OUTPUT ]]) AT_DATA([inner2/configure.in], [[AC_INIT(GNU Inner 2, 1.0) AC_ARG_VAR([INNER2], [an inner2 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]) AT_CHECK([test -f inner2/configure]) # Running the outer configure recursively should provide the innermost # help strings. chmod a-w inner/innermost inner AT_CHECK([{ ./configure --help=recursive; chmod u+w .; } | grep " INNER "], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod a-w . AT_CHECK([{ ./configure --help=recursive; chmod u+w .; } | grep " INNER2 "], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod a-w . AT_CHECK([{ ./configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod a-w . AT_CHECK([{ /bin/sh ./configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod a-w . AT_CHECK([PATH=.$PATH_SEPARATOR$PATH; export PATH; { /bin/sh configure --help=recursive; chmod +w .; } | grep " INNERMOST "], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod a-w . AT_CHECK([PATH=.$PATH_SEPARATOR$PATH; export PATH; { configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod u+w inner inner/innermost # 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 ]]) # Ensure we point to the right config.log file for errors. AT_CHECK_CONFIGURE([innermost_error=:], [1], [], [stderr]) AT_CHECK([grep 'inner/innermost' stderr], [], [ignore]) cd inner AT_CHECK_CONFIGURE([innermost_error=:], [1], [], [stderr]) AT_CHECK([grep 'innermost' stderr], [], [ignore]) cd .. # The same, but from a builddir. AS_MKDIR_P([builddir]) chmod a-w builddir inner/innermost inner AT_CHECK([cd builddir && { ../configure --help=recursive; chmod u+w .; } | grep " INNER "], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod a-w builddir AT_CHECK([cd builddir && { ../configure --help=recursive; chmod u+w .; } | grep " INNER2 "], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod a-w builddir AT_CHECK([cd builddir && { ../configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod a-w builddir AT_CHECK([cd builddir && { /bin/sh ../configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod a-w builddir # Not all shells search $PATH for scripts. if (cd builddir && PATH=`pwd`/..$PATH_SEPARATOR$PATH /bin/sh configure --help) >/dev/null 2>&1; then AT_CHECK([cd builddir && PATH=`pwd`/..$PATH_SEPARATOR$PATH /bin/sh configure --help=recursive | grep " INNERMOST "], 0, [ignore]) fi AT_CHECK([PATH=`pwd`$PATH_SEPARATOR$PATH; export PATH; cd builddir && { configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], 0, [ignore], [stderr], [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod u+w builddir inner inner/innermost 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 ## -------------------------------- ## ## Non-Autoconf AC_CONFIG_SUBDIRS. ## ## -------------------------------- ## AT_SETUP([Non-Autoconf AC_CONFIG_SUBDIRS]) AT_KEYWORDS([autoreconf]) # We use aclocal (via autoreconf). AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore]) AT_DATA([install-sh], []) AT_DATA([configure.in], [[AC_INIT(GNU Outer, 1.0) AC_CONFIG_SUBDIRS([inner]) AC_OUTPUT ]]) AS_MKDIR_P([inner]) AT_DATA([inner/configure], [[#! /bin/sh case "$*" in *--help*) echo 'No Autoconf here, folks!' ;; *) echo got_it >myfile ;; esac exit 0 ]]) chmod +x inner/configure AT_CHECK([autoreconf -Wall -v], 0, [ignore], [ignore]) # Running the outer configure recursively should provide the innermost # help strings. AT_CHECK([./configure --help=recursive | grep "folks"], 0, [ignore]) # Running the outer configure should trigger the inner. AT_CHECK([./configure], 0, [ignore]) AT_CHECK([test -f inner/myfile], 0) AT_CLEANUP ## ----------------- ## ## Empty directory. ## ## ----------------- ## AT_SETUP([Empty directory]) AT_KEYWORDS([autoreconf]) # We use aclocal (via autoreconf). AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore]) # The test group directory is not necessarily _empty_, but it does not contain # files meaningful to `autoreconf'. AT_CHECK([autoreconf -Wall -v], 1, [ignore], [ignore]) AT_CLEANUP ## ------------------------------ ## ## Unusual Automake input files. ## ## ------------------------------ ## # This parallels gnumake.test in Automake. AT_SETUP([Unusual Automake input files]) AT_KEYWORDS([autoreconf]) # We use aclocal and automake via autoreconf. AT_CHECK([automake --version || exit 77], [], [ignore], [ignore]) AT_DATA([configure.in], [[AC_INIT(GNU foo, 1.0) AM_INIT_AUTOMAKE AC_CONFIG_FILES([HeeHee]) AC_OUTPUT ]]) AT_DATA([HeeHee.am], [[# Humans do no worse than `GNUmakefile.am'. AUTOMAKE_OPTIONS = foreign 1.8 ]]) AT_CHECK([autoreconf -Wall -v -i], 0, [ignore], [stderr], [AT_CHECK([grep 'require.*1\.8' stderr && exit 77], [1])]) AT_CHECK([test -f HeeHee.in]) AT_CLEANUP autoconf2.64_2.64+dfsg.orig/tests/mktests.sh0000755000175000017500000001466311104205263017436 0ustar smcvsmcv#! /bin/sh # Build some of the Autoconf test files. # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # If we fail, clean up, but touch the output files. We probably failed # because we used some non-portable tool. as_me=`echo "$0" | sed 's|.*[\\/]||'` trap 'echo "'"$as_me"': failed." >&2 rm -f acdefuns audefuns requires *.tat trap "" 0 exit 1' \ 0 1 2 15 # If ever something goes wrong, fail, so that the trap is 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. LANGUAGE=C; export LANGUAGE LANG=C; export LANG LC_ALL=C export LC_ALL # requires # -------- # Get the list of macros that are required: there is little interest # in testing them since they will be run by the guy who requires them. sed -n 's/dnl.*//;s/.*AC_REQUIRE(\[*\([a-zA-Z0-9_]*\).*$/\1/p' $src | sort -u >requires # exclude_list # ------------ # Macros which must not be checked at all (not with AT_CHECK_MACRO nor # AT_CHECK_AU_MACRO). exclude_list=' # Not a macro name at all. /^$/ {next} # Not macros, just mapping from old variable name to a new one. /^ac_cv_prog_(gcc|gxx|g77)$/ {next} ' # ac_exclude_list # --------------- # We try to test all the Autoconf macros with AT_CHECK_MACRO to check # for syntax problems, etc. Not every macros can be run without # arguments, and some are already tested elsewhere. AC_EXCLUDE_LIST # filters out the macros we don't want to test. ac_exclude_list=' # Internal macros are used elsewhere. /^_?_AC_/ {next} # Used in many places. /^AC_.*_IFELSE$/ {next} /^AC_LANG/ {next} /^AC_RUN_LOG$/ {next} /^AC_TRY/ {next} # Need an argument. /^AC_(CANONICALIZE|PREFIX_PROGRAM|PREREQ)$/ {next} /^AC_(SEARCH_LIBS|REPLACE_FUNCS)$/ {next} /^AC_(CACHE_CHECK|COMPUTE)_INT$/ {next} /^AC_ARG_VAR$/ {next} /^AC_REQUIRE_SHELL_FN$/ {next} # Performed in the semantics tests. /^AC_CHECK_(ALIGNOF|DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|(TARGET_)?TOOL|TYPE)S?$/ {next} /^AC_PATH_PROGS_FEATURE_CHECK$/ {next} # Fail when the source does not exist. /^AC_CONFIG/ {next} # AU defined to nothing. /^AC_(CYGWIN|CYGWIN32|EMXOS2|MING32|EXEEXT|OBJEXT)$/ {next} # Produce "= val" because $1, the variable used to store the result, # is empty. /^AC_(F77|FC)_FUNC$/ {next} /^AC_FC_SRCEXT$/ {next} /^AC_PATH_((TARGET_)?TOOL|PROG)S?$/ {next} # Requires the current language to be Fortran, not C. /^AC_FC_FREEFORM$/ {next} # Is a number. /^AC_FD_CC$/ {next} # Obsolete, but needs to be AC_DEFUNed. /^AC_FOREACH$/ {next} # Require a file that is not shipped with Autoconf. But it should. /^AC_FUNC_(GETLOADAVG|FNMATCH_GNU)$/ {next} /^AC_REPLACE_FNMATCH$/ {next} # Obsolete, checked in semantics. /^AC_FUNC_WAIT3$/ {next} /^AC_FUNC_SETVBUF_REVERSED$/ {next} /^AC_SYS_RESTARTABLE_SYSCALLS$/ {next} # Not intended to be invoked at the top level. /^AC_INCLUDES_DEFAULT$/ {next} # AC_INIT includes all the AC_INIT macros. # There is an infinite m4 recursion if AC_INIT is used twice. /^AC_INIT/ {next} # Checked in semantics. /^AC_(PROG_CC|C_CONST|C_VOLATILE)$/ {next} /^AC_PATH_XTRA$/ {next} # Requires a working C++ compiler, which is not a given. /^AC_PROG_CXX_C_O$/ {next} # Already tested by AT_CHECK_MACRO. /^AC_OUTPUT$/ {next} ' # ac_exclude_script # ----------------- # Build a single awk script out of the above. ac_exclude_script="$exclude_list $ac_exclude_list {print}" # au_exclude_list # --------------- # Check all AU_DEFUN'ed macros with AT_CHECK_AU_MACRO, except these. au_exclude_list=' # Empty. /^AC_(C_CROSS|PROG_CC_STDC)$/ {next} # Use AC_REQUIRE. /^AC_(CYGWIN|MINGW32|EMXOS2)$/ {next} # Already in configure.ac. /^AC_(INIT|OUTPUT)$/ {next} # AC_LANG_SAVE needs user interaction to be removed. # AC_LANG_RESTORE cannot be used alone. /^AC_LANG_(SAVE|RESTORE)$/ {next} # Need arguments and are tested elsewhere. /^AC_(LINK_FILES|PREREQ)$/ {next} ' # au_exclude_script # ----------------- # Build a single awk script out of the above. au_exclude_script="$exclude_list $au_exclude_list {print}" ## ------------------------- ## ## 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. sed -n -e 's/^AC_DEFUN(\[*\([a-zA-Z0-9_]*\).*$/\1/p' \ -e 's/^AC_DEFUN_ONCE(\[*\([a-zA-Z0-9_]*\).*$/\1/p' $file | awk "$ac_exclude_script" | sort -u >acdefuns # Get the list of macros which are defined in Autoupdate level. sed -n 's/^AU_DEFUN(\[*\([a-zA-Z][a-zA-Z0-9_]*\).*$/\1/p' $file | awk "$au_exclude_script" | sort -u >audefuns # Filter out required macros. { sed 's/^ *//' <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 else rm -f ac$base.tat ac$base.at touch ac$base.at fi # Help people not to update these files by hand. chmod a-w ac$base.at done rm -f acdefuns audefuns requires trap '' 0 exit 0 # [1] En franc,ais dans le texte. autoconf2.64_2.64+dfsg.orig/tests/mktests.stamp0000644000175000017500000000000011232571660020132 0ustar smcvsmcvautoconf2.64_2.64+dfsg.orig/tests/local.at0000644000175000017500000003573011232222221017016 0ustar smcvsmcv# M4 macros used in building Autoconf test suites. -*- Autotest -*- # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, # 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. m4_version_prereq([2.57]) # Used in many tests. m4_pattern_allow([^AS_EXIT$]) m4_pattern_allow([^m4_(define|shift)$]) # Programs this package provides AT_TESTED([autom4te autoconf autoheader autoupdate autoreconf ifnames]) ## ---------------- ## ## Utility macros. ## ## ---------------- ## # AT_CMP(FILE-1, FILE-2) # ---------------------- # Check FILE-1 and FILE-2 for equality, like `cmp FILE-1 FILE-2'. m4_define([AT_CMP], [m4_ifval([$2],, [m4_fatal([AT_CMP takes two arguments.])])[]dnl AT_CHECK([$at_diff "$1" "$2"]) ])# AT_CMP ## ---------------- ## ## Testing syntax. ## ## ---------------- ## # AT_CHECK_SHELL_SYNTAX(PROGRAM) # ------------------------------ # If the shell handles `-n' well, use it to check the syntax of PROGRAM; # otherwise, do nothing. m4_define([AT_CHECK_SHELL_SYNTAX], [AT_SKIP_IF([test "$ac_cv_sh_n_works" != yes]) AT_CHECK([/bin/sh -n $1])]) m4_define([AT_CHECK_PERL_SYNTAX], [AT_CHECK([autom4te_perllibdir=$abs_top_srcdir/lib $PERL -c "$abs_top_builddir"/bin/$1], 0, [], [ignore])]) ## ------------------ ## ## Testing autom4te. ## ## ------------------ ## # AT_CHECK_M4(COMMAND, [EXIT-STATUS = 0], STDOUT, STDERR) # ------------------------------------------------------- # If stderr is specified, normalize the observed stderr. # This (using GNU M4 1.4.6) # # /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 this (GNU M4 1.4.11) # # /usr/local/bin/m4:script.4s:1: include: cannot open `foo': No such file or directory # autom4te: /usr/local/bin/m4 failed with exit status: 1 # # or this (GNU M4 1.4 installed as gm4) # # script.4s:1: /usr/local/bin/gm4: Cannot open foo: No such file or directory # autom4te: /usr/local/bin/gm4 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: # # (m4): ?(file): ?(line): # or (file): ?(line): ?(m4): # to m4:(file):(line): # # and # m4:(file):(line): Cannot open foo: # or m4:(file):(line): include: cannot open `foo': # to m4:(file):(line): cannot open `foo': # # and # autom4te: [^ ]m4 # or autom4te: [^ ]m4.exe # to autom4te: m4 # # Moreover, DJGPP error messages include the error code in brackets; # remove the error code during normalization. # m4_define([AT_CHECK_M4], [AT_CHECK([$1], [$2], [$3], m4_case([$4], [], [], [ignore], [ignore], [stderr])) m4_case([$4], [], [], [ignore], [], [AT_CHECK([[sed 's/^[^:]*m4[.ex]*: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/ s/^\([^:]*:\) *\([0-9][0-9]*:\)[^:]*m4[.ex]*: /m4:\1\2 / s/: C\(annot open \)\([^`:]*\):/: c\1`\2'\'':/ s/: include:\( cannot open\)/:\1/ s/^autom4te: [^ ]*m4[.ex]* /autom4te: m4 / s/ (E[A-Z]*)$// ' stderr >&2]], [0], [], [$4])]) ]) # AT_CHECK_AUTOM4TE(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR) # ----------------------------------------------------------- m4_define([AT_CHECK_AUTOM4TE], [AT_CHECK_M4([autom4te $1], [$2], [$3], [$4])]) ## ----------------- ## ## Testing M4sugar. ## ## ----------------- ## # AT_DATA_M4SUGAR(FILE-NAME, CONTENTS) # ------------------------------------ # Escape the invalid tokens with @&t@. m4_define([AT_DATA_M4SUGAR], [AT_DATA([$1], [m4_bpatsubst([$2], [\(@.\)\(.@\)\|\(m4\)\(_\)\|\(d\)\(nl\)], [\1\3\5@&t@\2\4\6])])]) # AT_CHECK_M4SUGAR(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR) # ---------------------------------------------------------- m4_define([AT_CHECK_M4SUGAR], [AT_KEYWORDS([m4sugar]) AT_CHECK_AUTOM4TE([--language=m4sugar script.4s -o script $1], [$2], [$3], [$4])]) ## -------------- ## ## Testing M4sh. ## ## -------------- ## # AT_DATA_M4SH(FILE-NAME, CONTENTS) # --------------------------------- # Escape the invalid tokens with @&t@. m4_define([AT_DATA_M4SH], [AT_DATA([$1], [m4_bpatsubst([$2], [\(@.\)\(.@\)\|\(m4\|AS\)\(_\)\|\(d\)\(nl\)], [\1\3\5@&t@\2\4\6])])]) # 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(FILE-NAME, CONTENTS) # ------------------------------------- # Escape the invalid tokens with @&t@. m4_define([AT_DATA_AUTOCONF], [AT_DATA([$1], [m4_bpatsubst([$2], [\(@.\)\(.@\)\|\(m4\|AS\|AC\)\(_\)\|\(d\)\(nl\)], [\1\3\5@&t@\2\4\6])])]) # AT_CONFIGURE_AC(BODY) # --------------------- # Create a full configure.ac running BODY, with a config header set up, # AC_OUTPUT, and environment checking hooks. m4_define([AT_CONFIGURE_AC], [AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_HEADERS(config.h:config.hin) AC_STATE_SAVE(before)] $1 [AC_OUTPUT AC_STATE_SAVE(after) ]]) cp "$abs_top_srcdir/build-aux/install-sh" \ "$abs_top_srcdir/build-aux/config.guess" \ "$abs_top_srcdir/build-aux/config.sub" . cp "$abs_top_srcdir/tests/statesave.m4" aclocal.m4 ])# AT_CONFIGURE_AC # AT_CHECK_AUTOCONF(ARGS, [EXIT-STATUS = 0], STDOUT, STDERR) # ---------------------------------------------------------- # We always use "--force", to prevent problems with timestamps if the testsuite # were running too fast. m4_define([AT_CHECK_AUTOCONF], [AT_CHECK_M4([autoconf --force $1], [$2], [$3], [$4]) if test -s configure && test "$ac_cv_sh_n_works" = yes; then AT_CHECK_SHELL_SYNTAX([configure]) fi ]) # 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_CAPTURE_FILE([config.log])[]dnl AT_CHECK([./configure $1], [$2], m4_default([$3], [ignore]), [$4])]) # AT_CHECK_ENV # ------------ # Check that the full configure run remained in its variable name space, # and cleaned up tmp files. # # 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. # # Some tests might exit prematurely when they find a problem, in # which case `env-after' is probably missing. Don't check it then. # # Here are the variables `configure' may modify during execution: # - ^as_ # M4sh's shell name space. # - ^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. # - (host|build|target)(_(alias|cpu|vendor|os))? # Set by AC_CANONICAL_(HOST|BUILD|TARGET). # - cross_compiling # Set by AC_INIT. # - interpval # Set by AC_SYS_INTERPRETER. # - CONFIG_STATUS and DEFS # Set by AC_OUTPUT. # - AC_SUBST'ed variables # (FIXME: Generate a list of these automatically.) # - _|@|.[*#?$].|argv|ARGC|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS # Some variables some shells use and change. # `.[*#?$].' catches `$#' etc. which are displayed like this: # | '!'=18186 # | '#'=0 # | '$'=6908 # m4_define([AT_CHECK_ENV], [m4_divert_once([PREPARE_TESTS], [_AT_CHECK_ENV])dnl AT_CHECK([at_check_env])]) m4_define([_AT_CHECK_ENV], [AS_FUNCTION_DESCRIBE([at_check_env], [], [Compare the directory and environment state both before and after a run, and return non-zero status if they differ inappropriately.]) at_check_env () { # Compare directory listings. test -f state-ls.before || AS_ERROR([state-ls.before not present]) test -f state-ls.after \ && { $at_diff state-ls.before state-ls.after || return 1; } # Compare variable space dumps. if test -f state-env.before && test -f state-env.after; then for act_file in state-env.before state-env.after do $EGREP -v '^(m4_join([|], [a[cs]_.*], [(exec_)?prefix|DEFS|CONFIG_STATUS], [CC|CFLAGS|CPP|GCC|CXX|CXXFLAGS|CXXCPP|GXX|F77|FFLAGS|FLIBS|G77], [ERL|ERLC|ERLCFLAGS|ERLANG_PATH_ERL|ERLANG_ROOT_DIR|ERLANG_LIB_DIR], [ERLANG_LIB_DIR_.*|ERLANG_LIB_VER_.*|ERLANG_INSTALL_LIB_DIR], [ERLANG_INSTALL_LIB_DIR_.*|ERLANG_ERTS_VER|OBJC|OBJCPP|OBJCFLAGS], [OPENMP_CFLAGS], [LIBS|LIB@&t@OBJS|LTLIBOBJS|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)], [FC(_DUMMY_MAIN|FLAGS|LIBS|FLAGS_f)?], [ALLOCA|GETLOADAVG_LIBS|KMEM_GROUP|NEED_SETGID|POW_LIB], [AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|MKDIR_P|RANLIB|SET_MAKE|YACC], [GREP|[EF]GREP|SED], [[_@]|.[*#?$].], [argv|ARGC|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \ $act_file 2>/dev/null | # There may be variables spread on several lines; remove latter lines. $GREP '^m4_defn([m4_re_word])=' >clean-$act_file done $at_diff clean-state-env.before clean-state-env.after fi } [#]at_check_env]) # AT_CONFIG_CMP(VAR-FILE-A, VAR-FILE-B) # ------------------------------------- # Check the outcomes of two configure runs for equality by comparing dumps of # their shell variables. VAR-FILE-A and VAR-FILE-B are two `set'-style shell # variable space dumps. # # We permit variance between runs in the following shell variables: # - ^as_ # M4sh's shell name space. # - ^ac_, excluding ^ac_cv_ # Autoconf's private shell name space. # - PPID [bash, zsh] # - RANDOM [zsh] # - SECONDS [zsh] # - '$' [zsh] # # Furthermore, it is okay for a non-cache variable initialized to empty in one # run to be unset in another run. This happens when, for example, cache update # code tries a number of values in LIBS and eventually restores LIBS to its # original value. If LIBS was previously unset, it will have become set and # empty. (OTOH, cache variables indicate the result of the test even if they # are empty, so we have to be strict about them.) # # Lines that do not look like `foo=bar' are probably latter lines of # multiline values; trim them. # m4_define([AT_CONFIG_CMP], [for act_file in $1 $2 do $SED '/^ac_cv_/ b /^m4_defn([m4_re_word])=./ !d /^[[^=]]*='\'''\''$/ d /^a[[cs]]_/ d /^PPID=/ d /^RANDOM=/ d /^SECONDS=/ d /'\'\\\$\''=/ d ' $act_file >at_config_vars-$act_file done AT_CMP([at_config_vars-$1], [at_config_vars-$2])[]dnl ])# AT_CONFIG_CMP # 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. # # We run `configure' twice, both times with a cache, and compare # the environment after each run to detect inconsistencies. # # 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 for at_run in r1 r2 do AT_CHECK_CONFIGURE([-C]) cp -f state-env.after state-env.$at_run cp -f config.h config-h.$at_run AT_CHECK_ENV done AT_CMP([config-h.r1], [config-h.r2]) AT_CONFIG_CMP([state-env.r1], [state-env.r2]) $3 AT_CLEANUP[]dnl ])# AT_CHECK_MACRO # AT_CHECK_MACRO_CROSS(MACRO, [MACRO-USE], [ADDITIONAL-CMDS], # [AUTOCONF-FLAGS = -W obsolete]) # ----------------------------------------------------------- # Like the previous one, but creates two checks: for native # compile and for cross-compile. m4_define([AT_CHECK_MACRO_CROSS], [AT_CHECK_MACRO($@) AT_CHECK_MACRO([$1 (cross compile)], [AT_KEYWORDS([cross]) # Exercise the code used when cross-compiling. cross_compiling=yes ac_tool_warned=yes m4_default([$2], [$1])], [$3], [$4]) ]) # 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([], 0, [], ignore) AT_CHECK([grep '^$1$' configure.ac], 1) 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.64_2.64+dfsg.orig/tests/suite.at0000644000175000017500000000442611232214405017060 0ustar smcvsmcv# Validation suite for Autoconf -*- Autotest -*- # Copyright (C) 2000, 2001, 2003, 2004, 2005 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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]) # Autotest. m4_include([autotest.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]) m4_include([erlang.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]) # Autoscan test m4_include([autoscan.at]) autoconf2.64_2.64+dfsg.orig/tests/statesave.m40000644000175000017500000000311111204770547017645 0ustar smcvsmcv# statesave.m4 serial 2 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, # 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # AC_STATE_SAVE(FILE) # ------------------- # Save the shell variables and directory listing. AT_CHECK_ENV uses these to # confirm that no test modifies variables outside the Autoconf namespace or # leaves temporary files. AT_CONFIG_CMP uses the variable dumps to confirm # that tests have the same side effects regardless of caching. # # The sed script duplicates uniq functionality (thanks to 'info sed # uniq' for the recipe), in order to avoid a MacOS 10.5 bug where # readdir can list a file multiple times in a rapidly changing # directory, while avoiding yet another fork. m4_defun([AC_STATE_SAVE], [(set) 2>&1 | sort >state-env.$1 ls | sed '/^at-/d;/^state-/d;/^config\./d h :b $b N /^\(.*\)\n\1$/ { g bb } $b P D' >state-ls.$1 ])# AC_STATE_SAVE autoconf2.64_2.64+dfsg.orig/tests/Makefile.am0000644000175000017500000001541111232214435017434 0ustar smcvsmcv## Make Autoconf tests. # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, # 2009 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 3 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, see . # We don't actually distribute the built testsuite or package.m4, since one # only needs m4 to build them, and m4 is required to install Autoconf. # But if you are borrowing from this file for setting up autotest in your # project, remember to distribute both testsuite and package.m4. EXTRA_DIST = $(TESTSUITE_AT) local.at mktests.sh \ atlocal.in wrapper.as statesave.m4 # Running the uninstalled scripts. Build them upon `all', for the manpages. noinst_SCRIPTS = $(wrappers) DISTCLEANFILES = atconfig atlocal $(TESTSUITE) MAINTAINERCLEANFILES = Makefile.in # Import the dependencies on Autotest and M4sh. include ../lib/freeze.mk ## ------------ ## ## package.m4. ## ## ------------ ## # The `:;' works around a redirected compound command bash exit status bug. package.m4: Makefile :;{ \ 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)])' && \ echo 'm4_define([AT_PACKAGE_URL], [$(PACKAGE_URL)])'; \ } > $@-t mv $@-t $@ ## ---------- ## ## Wrappers. ## ## ---------- ## wrappers = autoconf autoheader autom4te autoreconf autoscan autoupdate ifnames CLEANFILES = wrapper.in $(wrappers) package.m4 wrapper.in: $(srcdir)/wrapper.as $(m4sh_m4f_dependencies) $(MY_AUTOM4TE) --language=M4sh $(srcdir)/wrapper.as -o $@ edit = sed \ -e 's|@wrap_program[@]|$@|g' \ -e 's|@abs_top_srcdir[@]|@abs_top_srcdir@|g' \ -e 's|@abs_top_builddir[@]|@abs_top_builddir@|g' \ -e "s|@configure_input[@]|Generated from $$input.|g" $(wrappers): wrapper.in rm -f $@ $@.tmp input=wrapper.in; \ $(edit) wrapper.in >$@.tmp chmod +x $@.tmp chmod a-w $@.tmp mv -f $@.tmp $@ ## ------------ ## ## Test suite. ## ## ------------ ## TESTSUITE_GENERATED_AT = \ $(srcdir)/aclang.at \ $(srcdir)/acc.at \ $(srcdir)/acfortran.at \ $(srcdir)/acgeneral.at \ $(srcdir)/acstatus.at \ $(srcdir)/acautoheader.at \ $(srcdir)/acautoupdate.at \ $(srcdir)/acspecific.at \ $(srcdir)/acfunctions.at \ $(srcdir)/acheaders.at \ $(srcdir)/actypes.at \ $(srcdir)/aclibs.at \ $(srcdir)/acprograms.at TESTSUITE_HAND_AT = \ suite.at \ m4sugar.at m4sh.at autotest.at \ base.at tools.at torture.at \ compile.at c.at erlang.at fortran.at \ semantics.at \ autoscan.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 = $(MY_AUTOM4TE) --language=autotest $(TESTSUITE): package.m4 \ local.at \ $(TESTSUITE_AT) \ $(autotest_m4f_dependencies) cd $(top_builddir)/lib/autotest && $(MAKE) $(AM_MAKEFLAGS) autotest.m4f $(AUTOTEST) -I . -I $(srcdir) suite.at -o $@.tmp mv $@.tmp $@ atconfig: $(top_builddir)/config.status cd $(top_builddir) && ./config.status tests/$@ # Avoid a race condition that would make parallel "distclean" fail. # The rule in clean-local tests for existence of $(TESTSUITE), and # if found, attempts to run it. But the distclean-generic rule may # be running in parallel, and it removes $(DISTCLEANFILES) which # includes $(TESTSUITE). This is the Automake rule, plus our # dependency, and we silence the warning from 'automake -Wall' by # hiding the dependency behind a variable. # TODO - fix this if newer automake accomodates the dependency. distclean_generic = distclean-generic $(distclean_generic): clean-local clean-local: test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean rm -f *.tmp rm -f -r autom4te.cache check-local: atconfig atlocal $(TESTSUITE) $(SHELL) $(TESTSUITE) $(TESTSUITEFLAGS) # Run the test suite on the *installed* tree. installcheck-local: atconfig atlocal $(TESTSUITE) $(SHELL) $(TESTSUITE) AUTOTEST_PATH="$(bindir)" $(TESTSUITEFLAGS) ## ------------------ ## ## Maintainer rules. ## ## ------------------ ## MAINTAINERCLEANFILES += $(TESTSUITE_GENERATED_AT) ## Producing the test files. # The files which contain macros we check for syntax. Use $(top_srcdir) # for the benefit of non-GNU make. Fix the names in the rule below # where we `cd' to $srcdir. 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.stamp ## Recover from the removal of $@ @if test -f $@; then :; else \ rm -f mktests.stamp; \ $(MAKE) $(AM_MAKEFLAGS) mktests.stamp; \ fi mktests.stamp : mktests.sh $(AUTOCONF_FILES) @rm -f mktests.tmp @touch mktests.tmp cd $(srcdir) && ./mktests.sh \ `echo " "$(AUTOCONF_FILES) | sed 's, [^ ]*/, ../lib/autoconf/,g'` @mv -f mktests.tmp $@ ## Distribute the stamp file, since we distribute the generated files. EXTRA_DIST += mktests.stamp CLEANFILES += mktests.tmp MAINTAINERCLEANFILES += mktests.stamp ## maintainer-check ## # These cannot be run in parallel. maintainer-check: $(MAKE) $(AM_MAKEFLAGS) maintainer-check-posix $(MAKE) $(AM_MAKEFLAGS) maintainer-check-c++ # The hairy heredoc is more robust than using echo. CLEANFILES += expr expr: :;{ \ echo '#! $(SHELL)'; \ echo 'result=`$(EXPR) "$$@"`'; \ echo 'estatus=$$?'; \ echo 'cat < $@-t chmod +x $@-t mv $@-t $@ # Try the test suite with more severe environments. maintainer-check-posix: expr POSIXLY_CORRECT=yes $(MAKE) $(AM_MAKEFLAGS) check rm expr # Try using G++ as a C compiler. maintainer-check-c++: CC=g++ $(MAKE) $(AM_MAKEFLAGS) check autoconf2.64_2.64+dfsg.orig/tests/acfunctions.at0000444000175000017500000000244011232571663020247 0ustar smcvsmcv# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. AT_BANNER([Testing autoconf/functions macros.]) # Modern macros. AT_CHECK_MACRO([AC_CHECK_FUNCS_ONCE]) 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_LSTAT]) 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_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_STRTOLD]) AT_CHECK_MACRO([AC_FUNC_UTIME_NULL]) AT_CHECK_MACRO([AC_FUNC_VPRINTF]) # Obsolete macros. autoconf2.64_2.64+dfsg.orig/tests/acspecific.at0000444000175000017500000000144011232571663020023 0ustar smcvsmcv# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. AT_BANNER([Testing autoconf/specific macros.]) # Modern macros. 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_AIX]) 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_ISC_POSIX]) AT_CHECK_AU_MACRO([AC_MINIX]) AT_CHECK_AU_MACRO([AC_SCO_INTL]) AT_CHECK_AU_MACRO([AC_XENIX_DIR]) autoconf2.64_2.64+dfsg.orig/tests/atlocal.in0000644000175000017500000000301411226701354017347 0ustar smcvsmcv# -*- shell-script -*- # @configure_input@ # Configurable variable values for Autoconf test suite. # Copyright (C) 2000, 2001, 2005, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. PERL='@PERL@' GREP='@GREP@' EGREP='@EGREP@' SED='@SED@' # We need to know if sh -n is ok. ac_cv_sh_n_works='@ac_cv_sh_n_works@' # Check whether the underlying system can manage some unusual # symbols in file names. if test -z '@ac_cv_unsupported_fs_chars@'; then func_sanitize_file_name () { echo "$@"; } else func_sanitize_file_name () { echo "$@" | tr -d '@ac_cv_unsupported_fs_chars@'; } fi # Can we create directories with trailing whitespaces in their name? ac_cv_dir_trailing_space='@ac_cv_dir_trailing_space@' if test "$ac_cv_dir_trailing_space" = yes; then func_sanitize_dir_name () { echo "$@"; } else func_sanitize_dir_name () { echo "$@" | sed 's/ *$//'; } fi autoconf2.64_2.64+dfsg.orig/tests/acheaders.at0000444000175000017500000000126011232571666017654 0ustar smcvsmcv# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. AT_BANNER([Testing autoconf/headers macros.]) # Modern macros. AT_CHECK_MACRO([AC_CHECK_HEADERS_ONCE]) AT_CHECK_MACRO([AC_HEADER_ASSERT]) AT_CHECK_MACRO([AC_HEADER_MAJOR]) AT_CHECK_MACRO([AC_HEADER_RESOLV]) 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.64_2.64+dfsg.orig/tests/aclibs.at0000444000175000017500000000052511232571666017175 0ustar smcvsmcv# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. AT_BANNER([Testing autoconf/libs macros.]) # Modern macros. # Obsolete macros. AT_CHECK_AU_MACRO([AC_HAVE_LIBRARY]) autoconf2.64_2.64+dfsg.orig/tests/m4sugar.at0000644000175000017500000012172011233153352017312 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([M4sugar.]) # Copyright (C) 2000, 2001, 2002, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # AT_CHECK_M4SUGAR_TEXT(CODE, STDOUT, STDERR) # ------------------------------------------- # Check that m4sugar CODE expands to STDOUT and emits STDERR. m4_define([AT_CHECK_M4SUGAR_TEXT], [ AT_DATA_M4SUGAR([script.4s], [[m4_init m4_divert_push(0)[]dnl ]$1[[]dnl m4_divert_pop(0) ]]) AT_CHECK_M4SUGAR([-o-],, [$2], [$3]) ])# AT_CHECK_M4SUGAR_TEXT ## ------------------ ## ## m4_stack_foreach. ## ## ------------------ ## AT_SETUP([m4@&t@_stack]) AT_KEYWORDS([m4@&t@_stack_foreach m4@&t@_stack_foreach_lifo]) AT_KEYWORDS([m4@&t@_stack_foreach_sep m4@&t@_stack_foreach_sep_lifo]) AT_KEYWORDS([m4@&t@_copy m4@&t@_n]) # Test the semantics of macros to walk stacked macro definitions. AT_CHECK_M4SUGAR_TEXT([[dnl m4_pushdef([abc], [def])dnl m4_pushdef([abc], [ghi])dnl m4_pushdef([abc], [jkl])dnl m4_stack_foreach([abc], [m4_n]) abc m4_stack_foreach_lifo([abc], [m4_n]) m4_stack_foreach([abc], [m4_n]) m4_copy([abc], [foo])dnl m4_stack_foreach([foo], [m4_n]) m4_stack_foreach_lifo([foo], [m4_n]) m4_stack_foreach_sep([abc], [ m4_index([abcdefghijkl],], [)]) m4_define([colon], [:])m4_define([lt], [<])m4_define([gt], [>])dnl m4_stack_foreach_sep_lifo([abc], [lt], [gt], [colon]) m4_pushdef([xyz], [123])dnl m4_pushdef([xyz], [456])dnl m4_define([doit], [[$1](m4_stack_foreach_sep([xyz], [m4_dquote(], [)], [,])) ])dnl m4_stack_foreach([abc], [doit])]], [[def ghi jkl jkl jkl ghi def def ghi jkl def ghi jkl jkl ghi def 3 6 9 :: def([123],[456]) ghi([123],[456]) jkl([123],[456]) ]]) AT_CLEANUP ## --------- ## ## m4_defn. ## ## --------- ## AT_SETUP([m4@&t@_defn]) AT_KEYWORDS([m4@&t@_popdef m4@&t@_undefine m4@&t@_copy m4@&t@_rename m4@&t@_copy_force m4@&t@_rename_force]) # Ensure that m4sugar dies when dereferencing undefined macros, whether # this is provided by m4 natively or faked by wrappers in m4sugar. AT_DATA_M4SUGAR([script.4s], [[m4_define([good]) m4_defn([good], [oops]) ]]) AT_CHECK_M4SUGAR([-o-], 1, [], [stderr]) AT_CHECK([grep good stderr], [1]) AT_CHECK([grep 'm4@&t@_defn: undefined.*oops' stderr], [0], [ignore]) AT_DATA_M4SUGAR([script.4s], [[m4_define([good]) m4_popdef([good], [oops]) ]]) AT_CHECK_M4SUGAR([-o-], 1, [], [stderr]) AT_CHECK([grep good stderr], [1]) AT_CHECK([grep 'm4@&t@_popdef: undefined.*oops' stderr], [0], [ignore]) AT_DATA_M4SUGAR([script.4s], [[m4_define([good]) m4_undefine([good], [oops]) ]]) AT_CHECK_M4SUGAR([-o-], 1, [], [stderr]) AT_CHECK([grep good stderr], [1]) AT_CHECK([grep 'm4@&t@_undefine: undefined.*oops' stderr], [0], [ignore]) # Cannot rename an undefined macro. AT_DATA_M4SUGAR([script.4s], [[m4_rename([oops], [good]) ]]) AT_CHECK_M4SUGAR([-o-], 1, [], [stderr]) AT_CHECK([grep 'm4@&t@_undefine: undefined.*oops' stderr], [0], [ignore]) # Check that pushdef stacks can be renamed. AT_CHECK_M4SUGAR_TEXT([[m4_pushdef([a], [1])dnl m4_pushdef([a], [2])dnl m4_pushdef([a], m4_defn([m4_divnum]))dnl a b c m4_rename([a], [b])dnl a b c m4_copy([b], [c])dnl a b c m4_popdef([b], [c])dnl a b c m4_popdef([b], [c])dnl a b c m4_popdef([b], [c])dnl a b c dnl m4_copy is intentionally a no-op on undefined source m4_copy([oops], [dummy])m4_ifdef([dummy], [[oops]])dnl dnl allow forceful overwrites m4_define([d], [4])m4_define([e], [5])m4_define([f], [6])dnl m4_copy_force([d], [e])dnl m4_rename_force([d], [f])dnl d e f m4_popdef([e], [f])dnl d e f ]], [[0 b c a 0 c a 0 0 a 2 2 a 1 1 a b c d 4 4 d e f ]]) AT_CLEANUP ## ------------ ## ## m4_dumpdef. ## ## ------------ ## AT_SETUP([m4@&t@_dumpdef]) AT_KEYWORDS([m4@&t@_dumpdefs]) # Ensure that m4sugar dies when dereferencing undefined macros. AT_DATA_M4SUGAR([script.4s], [[m4_define([good], [yep]) m4_dumpdef([good], [oops]) ]]) AT_CHECK_M4SUGAR([-o-], 1, [], [stderr]) AT_CHECK([grep '^good: \[[yep\]]$' stderr], [0], [ignore]) AT_CHECK([grep 'm4@&t@_dumpdef: undefined.*oops' stderr], [0], [ignore]) # Check that pushdef stacks can be dumped. AT_CHECK_M4SUGAR_TEXT([[m4_divert_push([KILL]) m4_pushdef([a], [1]) m4_pushdef([a], [2]) m4_dumpdef([a]) m4_dumpdefs([oops], [a]) m4_divert_pop([KILL])dnl ]], [], [[a: [2] a: [2] a: [1] ]]) # Check behavior when dumping builtins. Unfortunately, when using M4 1.4.x # (or more precisely, when __m4_version__ is undefined), builtins get # flattened to an empty string. It takes M4 1.6 to work around this. AT_DATA_M4SUGAR([script.4s], [[m4_ifdef([__m4_version__], [_m4_undefine([__m4_version__])]) m4_init m4_dumpdef([m4_define]) ]]) AT_CHECK_M4SUGAR([-o-], [0], [], [[m4_define: [] ]]) AT_DATA_M4SUGAR([script.4s], [[m4_init m4_ifdef([__m4_version__], [m4_dumpdef([m4_define])], [m4_errprintn([m4_define: ])]) ]]) AT_CHECK_M4SUGAR([-o-], [0], [], [[m4_define: ]]) AT_CLEANUP ## --------- ## ## 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([0])dnl m4_warn([obsolete], [obsolete])dnl cross_warning[]dnl m4_warn([syntax], [syntax])dnl ]]) AT_CHECK_M4SUGAR([-o-], 0, [], [script.4s:7: warning: syntax ]) AT_CHECK_M4SUGAR([-o- -Wall -f], 0, [], [script.4s:5: warning: obsolete script.4s:6: warning: cross script.4s:2: cross_warning is expanded from... script.4s:6: the top level script.4s:7: warning: syntax ]) AT_CHECK_M4SUGAR([-o- -Wnone,cross -f], 0, [], [script.4s:6: warning: cross script.4s:2: cross_warning is expanded from... script.4s:6: the top level ]) AT_CHECK_M4SUGAR([-o- -Wnone,cross,error -f], 1, [], [[script.4s:6: warning: cross script.4s:2: cross_warning is expanded from... script.4s:6: the top level ]]) AT_CLEANUP ## ----------------- ## ## m4_divert_stack. ## ## ----------------- ## AT_SETUP([m4@&t@_divert_stack]) AT_KEYWORDS([m4@&t@_divert m4@&t@_divert_push m4@&t@_divert_pop m4@&t@_undivert m4@&t@_cleardivert m4@&t@_divert_text]) AT_CHECK_M4SUGAR_TEXT([[1.m4_divert_stack m4_divert_push([10])2.m4_divert_stack m4_divert_text([20], [3.m4_divert_stack])dnl m4_divert([30])4.m4_divert_stack m4_divert_pop([30])dnl 5.m4_undivert([20], [30]) m4_pattern_allow([^m4_divert])dnl ]], [[1.script.4s:2: m4@&t@_divert_push: 0 script.4s:1: m4@&t@_divert: KILL 5.3.script.4s:5: m4@&t@_divert_push: 20 script.4s:4: m4@&t@_divert_push: 10 script.4s:2: m4@&t@_divert_push: 0 script.4s:1: m4@&t@_divert: KILL 4.script.4s:6: m4@&t@_divert: 30 script.4s:2: m4@&t@_divert_push: 0 script.4s:1: m4@&t@_divert: KILL 2.script.4s:4: m4@&t@_divert_push: 10 script.4s:2: m4@&t@_divert_push: 0 script.4s:1: m4@&t@_divert: KILL ]]) AT_CHECK_M4SUGAR_TEXT([[dnl m4_divert_text([3], [three])dnl m4_divert_text([4], [four])dnl m4_divert_text([1], [one])dnl m4_divert_text([2], [two])dnl m4_cleardivert([2], [3])dnl ]], [[one four ]]) AT_DATA_M4SUGAR([script.4s], [[m4_divert_pop ]]) AT_CHECK_M4SUGAR([-o-], [1], [], [[script.4s:1: error: too many m4@&t@_divert_pop script.4s:1: the top level autom4te: m4 failed with exit status: 1 ]]) AT_DATA_M4SUGAR([script.4s], [[m4_init m4_divert_push([1]) m4_divert_pop([2]) ]]) AT_CHECK_M4SUGAR([-o-], [1], [], [[script.4s:3: error: m4@&t@_divert_pop(2): diversion mismatch: script.4s:2: m4@&t@_divert_push: 1 script.4s:1: m4@&t@_divert: KILL script.4s:3: the top level autom4te: m4 failed with exit status: 1 ]]) AT_DATA_M4SUGAR([script.4s], [[m4_divert([1]) m4_init m4_divert_push([2]) ]]) AT_CHECK_M4SUGAR([-o-], [1], [], [[script.4s:2: error: m4@&t@_init: unbalanced m4@&t@_divert_push: script.4s:3: m4@&t@_divert_push: 2 script.4s:2: m4@&t@_divert: KILL script.4s:2: the top level autom4te: m4 failed with exit status: 1 ]]) AT_CLEANUP ## -------------------- ## ## m4_expansion_stack. ## ## -------------------- ## AT_SETUP([m4@&t@_expansion_stack]) AT_CHECK_M4SUGAR_TEXT([[1.m4_expansion_stack m4_defun([a], [b])dnl m4_define([c], [d])dnl m4_defun([d], [2.m4_expansion_stack])dnl m4_defun([b], [c])dnl a 3.m4_ifdef([_m4_expansion_stack], [m4_expansion_stack]) ]], [[1.script.4s:3: the top level 2.script.4s:6: d is expanded from... script.4s:7: b is expanded from... script.4s:4: a is expanded from... script.4s:8: the top level 3. ]]) AT_CLEANUP ## --------------------------- ## ## m4_require: error message. ## ## --------------------------- ## AT_SETUP([m4@&t@_require: error message]) AT_KEYWORDS([m4@&t@_require]) AT_DATA_M4SUGAR([script.4s], [[m4_defun([foo], [FOO]) m4_require([foo]) ]]) AT_CHECK_M4SUGAR([], 1, [], [[script.4s:2: error: m4@&t@_require(foo): cannot be used outside of an m4_defun'd macro script.4s:2: the top level autom4te: m4 failed with exit status: 1 ]]) AT_CLEANUP ## ----------------------------------- ## ## m4_require: circular dependencies. ## ## ----------------------------------- ## AT_SETUP([m4@&t@_require: circular dependencies]) AT_KEYWORDS([m4@&t@_require]) 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([0])dnl baz ]]) AT_CHECK_M4SUGAR([], 1, [], [[script.4s:9: error: m4@&t@_require: circular dependency of foo script.4s:3: bar is expanded from... script.4s:1: foo is expanded from... script.4s:5: baz is expanded from... script.4s:9: the top level autom4te: m4 failed with exit status: 1 ]]) AT_CLEANUP ## ---------------------- ## ## m4_require: one-shot. ## ## ---------------------- ## AT_SETUP([m4@&t@_require: one-shot initialization]) AT_KEYWORDS([m4@&t@_require]) AT_KEYWORDS([m4@&t@_defun_init m4@&t@_copy m4@&t@_defun_once]) dnl check out m4_defun_init, m4_copy, and odd macro names AT_CHECK_M4SUGAR_TEXT([[ m4_defun_init([a], [[init a ]], [[common a]])dnl m4_defun([b], [[b]m4_require([a])])dnl m4_defun([c], [[c]m4_require([a])])dnl b c a m4_defun_init([-], [hello, ], [m4_if([$#], [0], [world], [[$1]])])dnl m4_copy([-], [.])dnl m4_indir([.]) m4_indir([.], [goodbye]) m4_indir([-], [again]) ]], [[ init a common a b c common a hello, world goodbye hello, again ]]) dnl Check m4_defun_once behavior AT_CHECK_M4SUGAR_TEXT([[ m4_defun_once([a], [[a]])dnl m4_defun([b], [[b]m4_require([a])])dnl m4_defun([c], [[c]a[]m4_require([b])])dnl c a m4_defun_once([d], [[d]m4_require([a])])dnl d m4_defun_once([e], [[e]])dnl m4_defun([f], [[f]m4_require([e])e])dnl f ]], [[ a b c d e f ]]) AT_CLEANUP ## -------------------- ## ## m4_require: nested. ## ## -------------------- ## AT_SETUP([m4@&t@_require: nested]) AT_KEYWORDS([m4@&t@_require m4@&t@_defun]) dnl From the m4sugar.m4 discourse: Require chains, top level AT_CHECK_M4SUGAR_TEXT([[dnl m4_defun([a], [[a]])dnl aka TEST2a m4_defun([b], [[b]m4_require([a])])dnl aka TEST3 m4_defun([c], [[c]m4_require([b])])dnl aka TEST2b m4_defun([d], [[d]m4_require([a])m4_require([c])])dnl aka TEST1 pre d d post ]], [[pre a b c d d post ]]) dnl From the m4sugar.m4 discourse: Require chains, nested AT_CHECK_M4SUGAR_TEXT([[dnl m4_defun([a], [[a]])dnl aka TEST2a m4_defun([b], [[b]m4_require([a])])dnl aka TEST3 m4_defun([c], [[c]m4_require([b])])dnl aka TEST2b m4_defun([d], [[d]m4_require([a])m4_require([c])])dnl aka TEST1 m4_defun([wrap], [pre d d post])dnl wrap ]], [[a b c pre d d post ]]) dnl Direct invocation, nested requires, top level AT_CHECK_M4SUGAR_TEXT([[dnl m4_defun([a], [[a]])dnl m4_defun([b], [[b]m4_require([a])])dnl m4_defun([c], [[c]m4_require([b])])dnl pre a c a c post ]], [[pre a b c a c post ]]) dnl Direct invocation, nested requires, nested defun. This is an example dnl of expansion before requirement, such that b occurs before its dnl prerequisite a. This indicates a bug in the macros (but not in dnl autoconf), so we should be emitting a warning. AT_CHECK_M4SUGAR_TEXT([[dnl m4_defun([a], [[a]])dnl m4_defun([b], [[b]m4_require([a])])dnl m4_defun([c], [[c]m4_require([b])])dnl dnl the extra macro layer works around line number differences in older m4 m4_define([foo], [m4_defun([outer], [pre a c a c post])])foo[]dnl outer ]], [[a b pre a c a c post ]], [[script.4s:15: warning: m4@&t@_require: `a' was expanded before it was required script.4s:5: b is expanded from... script.4s:6: c is expanded from... script.4s:14: outer is expanded from... script.4s:15: the top level ]]) dnl Direct invocation, expand-before-require but no nested require. As this dnl is common in real life, but does not result in out-of-order expansion, dnl we silently permit this. AT_CHECK_M4SUGAR_TEXT([[dnl m4_defun([a], [[a]])dnl m4_defun([b], [[b]m4_require([a])])dnl m4_defun([c], [[c]])dnl m4_defun([d], [[d]m4_require([c])])dnl pre1 a b a b post1 m4_defun([outer], [pre2 c d c d post2])dnl outer m4_defun([e], [[e]])dnl m4_defun([f], [[f]m4_require([e])])dnl m4_defun([g], [[g] e f])dnl m4_defun([h], [[h]m4_require([g])])dnl h m4_defun([i], [[i]])dnl m4_defun([j], [[j] i])dnl m4_defun([k], [[k]m4_require([i])])dnl m4_defun([l], [[l]m4_require([k])])dnl m4_defun([m], [[m]m4_require([j])m4_require([l])])dnl m ]], [[pre1 a b a b post1 pre2 c d c d post2 g e f h j i k l m ]]) AT_CLEANUP ## ------------------------------------------------- ## ## m4_ifval, m4_ifblank, m4_ifset, m4_default, etc. ## ## ------------------------------------------------- ## AT_SETUP([m4sugar shorthand conditionals]) AT_KEYWORDS([m4@&t@_ifval m4@&t@_ifblank m4@&t@_ifnblank m4@&t@_ifset m4@&t@_default m4@&t@_default_quoted m4@&t@_default_nblank m4@&t@_default_nblank_quoted]) AT_CHECK_M4SUGAR_TEXT([[m4_define([active], [ACTIVE])m4_define([empty]) m4_ifval([active], [yes], [no]) m4_ifval([empty], [yes], [no]) m4_ifval([ ], [yes], [no]) m4_ifval([], [yes], [no]) m4_ifblank([active], [yes], [no]) m4_ifblank([empty], [yes], [no]) m4_ifblank([ ], [yes], [no]) m4_ifblank([], [yes], [no]) m4_ifnblank([active], [yes], [no]) m4_ifnblank([empty], [yes], [no]) m4_ifnblank([ ], [yes], [no]) m4_ifnblank([], [yes], [no]) m4_ifset([active], [yes], [no]) m4_ifset([empty], [yes], [no]) m4_ifset([ ], [yes], [no]) m4_ifset([], [yes], [no]) --- m4_define([demo1], [m4_default([$1], [$2])])dnl m4_define([demo2], [m4_default_quoted([$1], [$2])])dnl m4_define([demo3], [m4_default_nblank([$1], [$2])])dnl m4_define([demo4], [m4_default_nblank_quoted([$1], [$2])])dnl demo1([active], [default]) demo1([], [active]) demo1([empty], [text]) -demo1([ ], [active])- demo2([active], [default]) demo2([], [active]) demo2([empty], [text]) -demo2([ ], [active])- demo3([active], [default]) demo3([], [active]) demo3([empty], [text]) -demo3([ ], [active])- demo4([active], [default]) demo4([], [active]) demo4([empty], [text]) -demo4([ ], [active])- ]], [[ yes yes yes no no no yes yes yes yes no no yes no no no --- ACTIVE ACTIVE - - active active empty - - ACTIVE ACTIVE -ACTIVE- active active empty -active- ]]) AT_CLEANUP ## --------- ## ## m4_cond. ## ## --------- ## AT_SETUP([m4@&t@_cond]) AT_CHECK_M4SUGAR_TEXT([[m4_define([side], [m4_errprintn([$1])$1]) m4_cond([side(1)], [1], [a], [side(1)], [1], [b], [side(1)], [2], [c]) m4_cond([side(2)], [1], [a], [side(2)], [1], [b], [side(2)], [2], [c], [side(2)]) m4_cond([side(3)], [1], [a], [side(3)], [1], [b], [side(3)], [2], [c], [side(3)]) m4_cond([a,a], [a,a], [yes], [no]) m4_cond([[a,a]], [a,a], [yes]) m4_cond([a,a], [a,b], [yes], [no]) m4_cond([a,a], [a,b], [yes]) m4_cond([m4_eval([0xa])]) m4_define([ab], [AB])dnl m4_cond([a])b m4_cond([1], [1], [a])b m4_cond([1], [2], [3], [a])b ]], [[ a c 3 yes yes no 10 AB AB AB ]], [[1 2 2 2 3 3 3 3 ]]) AT_CLEANUP ## ---------- ## ## m4 lists. ## ## ---------- ## AT_SETUP([m4 lists]) AT_KEYWORDS([m4@&t@_car m4@&t@_cdr m4@&t@_argn _m4@&t_cdr]) AT_CHECK_M4SUGAR_TEXT([[dnl m4_define([a], [A])m4_define([b], [B])m4_define([c], [C]) m4_argn([1], [a], [b], [c]) m4_argn([2], [a], [b], [c]) m4_argn([3], [a], [b], [c]) m4_argn([4], [a], [b], [c]) m4_car([a], [b], [c]) m4_cdr([a], [b], [c]) m4_cdr([a], [b]) m4_cdr([a]) _m4_cdr([a], [b], [c]) _m4_cdr([a], [b]) _m4_cdr([a]) m4_if(m4_cdr([], []), [[]], [good], [bad]) m4_if(m4_cdr([]), [], [good], [bad]) ]], [[ a b c a [b],[c] [b] , [b],[c] , [b] good good ]]) AT_DATA_M4SUGAR([script.4s], [[m4_init m4_argn([0], [a], [b], [c]) ]]) AT_CHECK_M4SUGAR([-o-], [1], [], [[script.4s:2: error: assert failed: 0 < 0 script.4s:2: the top level autom4te: m4 failed with exit status: 1 ]]) AT_CLEANUP ## ---------- ## ## m4_split. ## ## ---------- ## AT_SETUP([m4@&t@_split]) AT_CHECK_M4SUGAR_TEXT( [[m4_define([active], [ACT, IVE])m4_define([bd], [oops]) m4_split m4_split([[]]) m4_split([ ]) m4_split([active]) m4_split([ active active ])end m4_split([ ], [ ]) m4_split([active], [ ]) m4_split([ active active ], [ ])end m4_split([abcde], [bd]) m4_split([abcde], [[bd]]) m4_split([foo=`` bar='']) m4_split([foo='' bar=``]) dnl these next two are from the manual; keep this in sync if the internal dnl quoting strings in m4_split are changed m4_define([a], [A])m4_define([b], [B])m4_define([c], [C])dnl m4_split([a )}>=- b -=<{( c]) m4_split([a )}@&t@>=- b -=<@&t@{( c]) ]], [[ [[]] [], [] [active] [], [active], [active], []end [], [] [active] [], [active active], []end [abcde] [a], [c], [e] [foo=``], [bar=''] [foo=''], [bar=``] [a], [], [B], [], [c] [a], [)}>=@&t@-], [b], [-@&t@=<{(], [c] ]]) AT_CLEANUP ## ------- ## ## m4_do. ## ## ------- ## AT_SETUP([m4@&t@_do]) AT_CHECK_M4SUGAR_TEXT( [[m4_define([ab], [1])m4_define([bc], [2])m4_define([abc], [3])dnl m4_define([AB], [4])m4_define([BC], [5])m4_define([ABC], [6])dnl m4_do m4_do([a]) m4_do([a], [b])c m4_unquote(m4_join([], [a], [b]))c m4_define([a], [A])m4_define([b], [B])m4_define([c], [C])dnl m4_do([a], [b])c m4_unquote(m4_join([], [a], [b]))c ]], [[ a abc 3 ABC 3 ]]) AT_CLEANUP ## ----------- ## ## m4_append. ## ## ----------- ## AT_SETUP([m4@&t@_append]) AT_KEYWORDS([m4@&t@_append_uniq m4@&t@_append_uniq_w]) AT_CHECK_M4SUGAR_TEXT( [[m4_define([active], [ACTIVE])dnl m4_append([sentence], [This is an])dnl m4_append([sentence], [ active ])dnl m4_append([sentence], [symbol.])dnl sentence m4_undefine([active])dnl sentence m4_define([active], [ACTIVE])dnl m4_append([hooks], [m4_define([act1], [act2])])dnl m4_append([hooks], [m4_define([act2], [active])])dnl m4_undefine([active])dnl act1 hooks act1 dnl Test for bug fixed in 2.62 when separator is active. m4_define([a], [A])dnl m4_append_uniq([foo], [-], [a])dnl m4_append_uniq([foo], [-], [a])dnl m4_append_uniq([bar], [-], [a])dnl m4_append_uniq([bar], [~], [a])dnl m4_append_uniq([bar], [-], [a])dnl m4_defn([foo]) m4_defn([bar]) foo bar m4_append_uniq([blah], [one], [, ], [new], [existing]) m4_append_uniq([blah], [two], [, ], [new], [existing]) m4_append_uniq([blah], [two], [, ], [new], [existing]) m4_append_uniq([blah], [three], [, ], [new], [existing]) m4_append([blah], [two], [, ])dnl blah m4_dquote(blah) m4_append([list], [one], [[, ]])dnl m4_append([list], [two], [[, ]])dnl m4_append([list], [three], [[, ]])dnl list m4_dquote(list) m4_append_uniq_w([numbers], [1 1 2])dnl m4_append_uniq_w([numbers], [ 2 3 ])dnl numbers ]], [[This is an ACTIVE symbol. This is an active symbol. act1 active - -a~ - -A~ new new existing new one, two, three, two [one],[two],[three],[two] one, two, three [one, two, three] 1 2 3 ]]) AT_DATA_M4SUGAR([script.4s], [[m4_init[]dnl m4_append_uniq([str], [a], [ ]) m4_append_uniq([str], [a b], [ ]) m4_divert([0])dnl str ]]) AT_CHECK_M4SUGAR([-o-], 0, [[a a b ]], [[script.4s:3: warning: m4@&t@_append_uniq: `a b' contains ` ' ]]) AT_CLEANUP ## --------- ## ## m4_join. ## ## --------- ## AT_SETUP([m4@&t@_join]) AT_KEYWORDS([m4@&t@_joinall]) AT_CHECK_M4SUGAR_TEXT( [[m4_define([active], [ACTIVE]) m4_join m4_join([|]) m4_join([, ], [one], [two]) m4_dquote(m4_join([, ], [one], [two])) m4_join([|], [active], [active]) m4_join([|], ,,,[one]) m4_join([|], [one],,,) m4_join([], ,,,[two]) m4_join([], [two],,,) m4_join([ active ], [one], , [two]) m4_join([], [one], [two]) m4_joinall([-], [one], [], [two]) m4_joinall([-], [], [], [three], [], []) m4_joinall([], [one], [], [two]) m4_joinall m4_joinall([-]) m4_joinall([-], [one]) ]], [[ one, two [one, two] active|active one one two two one active two onetwo one--two --three-- onetwo one ]]) AT_CLEANUP ## ----------- ## ## m4_expand. ## ## ----------- ## AT_SETUP([m4@&t@_expand]) AT_CHECK_M4SUGAR_TEXT( [[m4_define([active], [ACTIVE])dnl m4_expand([#active active]) m4_expand([[active]]) dnl properly quoted case statements m4_expand([case a in @%:@( *) echo active, ;; esac case b in *[)] echo active, ;; esac]) dnl unbalanced underquoted `)', but we manage anyway (gasp!) m4_expand([case c in #( *) echo active, ;; esac case d in *) echo active, ;; esac]) dnl unterminated comment/dnl m4_expand([active # active]) m4_expand([a dnl]) m4_expand([a -dnl]) ]], [[#active ACTIVE active case a in #( *) echo ACTIVE, ;; esac case b in *) echo ACTIVE, ;; esac case c in #( *) echo ACTIVE, ;; esac case d in *) echo ACTIVE, ;; esac ACTIVE # active a a - ]]) 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 and $ are not swallowed. This can easily happen because of # m4-listification. AT_DATA_M4SUGAR([script.4s], [[m4_init[]m4_divert([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]]) m4_define([xfff], [oops]) m4_text_wrap([Some $1 $2 $3 $4 embedded dollars.], [ $* ], [ $@ ], [0xfff & 20]) ]]) AT_DATA([expout], [[/* Short string */ /* Much longer string */ --short Short doc. --too-wide Short doc. --too-wide Super long documentation. First, second , third, [,quoted] $@ Some $1 $2 $3 $* $4 embedded $* dollars. ]]) AT_CHECK_M4SUGAR([-o-], 0, [expout]) AT_CLEANUP ## -------------------- ## ## m4_version_compare. ## ## -------------------- ## AT_SETUP([m4@&t@_version_compare]) AT_KEYWORDS([m4@&t@_list_cmp]) AT_CHECK_M4SUGAR_TEXT( [[m4_version_compare([1.1], [2.0]) m4_version_compare([2.0b], [2.0a]) m4_version_compare([2.0z], [2.0y]) m4_version_compare([1.1.1], [1.1.1a]) m4_version_compare([1.2], [1.1.1a]) m4_version_compare([1.0], [1]) m4_version_compare([1.0a], [1.0a]) m4_version_compare([1.1a], [1.1a.1]) m4_version_compare([1.10], [1.1a]) m4_version_compare([1-1a], [1,1A]) m4_define([a], [oops])dnl m4_version_compare([1.1a], [1.1A]) m4_version_compare([1z], [1aa]) m4_version_compare([2.61a], [2.61a-248-dc51]) m4_version_compare([2.61b], [2.61a-248-dc51]) m4_version_compare([08], [09]) m4_version_compare([010], [8]) dnl Test that side effects to m4_list_cmp occur exactly once m4_list_cmp([[0], [0], [0]m4_errprintn([hi])], [[0], [0], [0]m4_errprintn([hi])]) m4_list_cmp([[0], [0], [0]m4_errprintn([hi])], [[0], [0], [0]m4_errprintn([bye])]) ]], [[-1 1 1 -1 1 0 0 -1 1 0 0 -1 -1 1 -1 1 0 0 ]], [[hi hi hi bye ]]) AT_CLEANUP ## ------------------------------ ## ## Standard regular expressions. ## ## ------------------------------ ## AT_SETUP([Standard regular expressions]) # AT_CHECK_M4RE(RE-NAME, TEXT, INTENT = `ok' | `') # ------------------------------------------------ # Check whether RE-NAME (a macro whose definition is a regular expression) # matches TEXT. INTENT = `ok' if the match should succeed or else empty. m4_define([AT_CHECK_M4RE], [AT_CHECK_M4SUGAR_TEXT( [[m4_bregexp([$2], ^m4_defn([$1])$, [ok]) ]], [$3 ])]) AT_CHECK_M4RE([m4_re_word], [ab9_c], [ok]) AT_CHECK_M4RE([m4_re_word], [_9abc], [ok]) AT_CHECK_M4RE([m4_re_word], [9ab_c]) AT_CHECK_M4RE([m4_re_string], [ab9_c], [ok]) AT_CHECK_M4RE([m4_re_string], [_9abc], [ok]) AT_CHECK_M4RE([m4_re_string], [9ab_c], [ok]) AT_CHECK_M4RE([m4_re_string], [9a@_c]) AT_CLEANUP ## ----------- ## ## m4_bmatch. ## ## ----------- ## AT_SETUP([m4@&t@_bmatch]) AT_CHECK_M4SUGAR_TEXT( [[m4_bmatch([abc], [default\]) m4_bmatch([abc], [^a], [yes]) m4_bmatch([abc], [^a], [yes], [no]) m4_bmatch([abc], [^.a], [yes]) m4_bmatch([abc], [^.a], [yes], [no\]) m4_bmatch([abc], [a], [1], [b], [2]) m4_bmatch([abc], [A], [1], [b], [2]) m4_define([ab], [AB])dnl m4_bmatch([$*], [a])b m4_bmatch([$*], [\*], [a])b m4_bmatch([$*], [1], [2], [a])b ]], [[default\ yes yes no\ 1 2 AB AB AB ]]) AT_CLEANUP ## --------------- ## ## m4_bpatsubsts. ## ## --------------- ## AT_SETUP([m4@&t@_bpatsubsts]) AT_CHECK_M4SUGAR_TEXT( [[m4_bpatsubsts([11], [^..$]) m4_bpatsubsts([11], [\(.\)1], [\12]) m4_bpatsubsts([11], [^..$], [], [1], [2]) m4_bpatsubsts([11], [\(.\)1], [\12], [1], [3]) m4_define([a], [oops])m4_define([c], [oops])dnl m4_define([AB], [good])m4_define([bc], [good])dnl m4_bpatsubsts([abc], [a], [A], [b], [B], [c]) m4_bpatsubsts([ab], [a])c m4_bpatsubsts([ab], [c], [C], [a])c m4_bpatsubsts([$1$*$@], [\$\*], [$#]) ]], [[11 21 22 23 good good good $1$#$@ ]]) AT_CLEANUP ## -------------- ## ## m4_esyscmd_s. ## ## -------------- ## AT_SETUP([m4@&t@_esyscmd_s]) AT_KEYWORDS([m4@&t@_chomp m4@&t@_chomp_all]) AT_CHECK_M4SUGAR_TEXT( [[m4_define([world], [WORLD])dnl m4_chomp([abc]) m4_chomp([world ]) m4_esyscmd_s([echo hello world]) m4_esyscmd_s([echo '[goodbye, cruel world ]']) ]], [[abc world hello WORLD goodbye, cruel world ]]) AT_CLEANUP ## ---------- ## ## M4 Loops. ## ## ---------- ## AT_SETUP([M4 loops]) AT_KEYWORDS([m4@&t@_for m4@&t@_foreach m4@&t@_foreach_w m4@&t@_map_args_w]) AT_CHECK_M4SUGAR_TEXT([[dnl m4_define([myvar], [outer value])dnl m4_for([myvar], 1, 3, 1, [ myvar]) m4_for([myvar], 1, 3, , [ myvar]) m4_for([myvar], 3, 1,-1, [ myvar]) m4_for([myvar], 3, 1, , [ myvar]) m4_for([myvar], 1, 3, 2, [ myvar]) m4_for([myvar], 3, 1,-2, [ myvar]) m4_for([myvar],-1,-3,-2, [ myvar]) m4_for([myvar],-3,-1, 2, [ myvar]) dnl Make sure we recalculate the bounds correctly: m4_for([myvar], 1, 3, 3, [ myvar]) m4_for([myvar], 1, 6, 3, [ myvar]) m4_for([myvar],22,-7,-5, [ myvar]) m4_for([myvar],-2,-7,-4, [ myvar]) m4_for([myvar],-7,-2, 4, [ myvar]) dnl Make sure we are not exposed to division truncation: m4_for([myvar], 2, 5, 2, [ myvar]) m4_for([myvar],-5,-2, 2, [ myvar]) m4_for([myvar], 5, 2,-2, [ myvar]) m4_for([myvar],-2,-5,-2, [ myvar]) dnl Make sure we do not divide by zero: m4_for([myvar], 1, 1, , [ myvar]) m4_for([myvar], 1, 1,+2, [ myvar]) m4_for([myvar], 1, 1,-2, [ myvar]) dnl Make sure we do not loop endlessly m4_for([myval], 1, 1, 0, [ myval]) dnl Make sure to properly parenthesize m4_for([myvar], 3-5, -2+8, , [ myvar]) m4_for([myvar], -2+8, 3-5, , [ myvar]) m4_for([myvar], 8, 16, 3 * 2, [ myvar]) m4_for([myvar], 8, 16, -3 * -2, [ myvar]) m4_for([myvar], [2<<2], [2<<3], [-3 * (-2)], [ myvar]) dnl Modifying var does not affect the number of iterations m4_for([myvar], 1, 5, , [ myvar[]m4_define([myvar], 5)]) dnl Make sure we can do nameless iteration m4_for(, 1, 10, , -) dnl foreach tests m4_foreach([myvar], [[a], [b, c], [d], [e ],[f]], [ myvar|]) m4_foreach_w([myvar], [a b c, d,e f g], [ myvar|]) myvar m4_map_args_w([a b c, d,e f g], [ ], [|]) m4_map_args_w([a b], [\1], [/]) m4_define([dashes], [--])dnl m4_map_args_w([a b c], [/], [\1], [dashes]) dnl only one side effect expansion, prior to visiting list elements m4_foreach([i], [[1], [2], [3]m4_errprintn([hi])], [m4_errprintn(i)])dnl dnl shifting forms an important part of loops m4_shift3:m4_shift3(1,2,3):m4_shift3(1,2,3,4) m4_shiftn(3,1,2,3):m4_shiftn(3,1,2,3,4) ]], [[ 1 2 3 1 2 3 3 2 1 3 2 1 1 3 3 1 -1 -3 -3 -1 1 1 4 22 17 12 7 2 -3 -2 -6 -7 -3 2 4 -5 -3 5 3 -2 -4 1 1 1 1 -2 -1 0 1 2 3 4 5 6 6 5 4 3 2 1 0 -1 -2 8 14 8 14 8 14 1 2 3 4 5 ---------- a| b, c| d| e | f| a| b| c,| d,e| f| g| outer value a| b| c,| d,e| f| g| \1a/\1b/ /a\1--/b\1--/c\1 ::4 :4 ]], [[hi 1 2 3 ]]) dnl bounds checking in m4_for AT_DATA_M4SUGAR([script.4s], [[m4_init m4_divert([0])dnl m4_for([myvar], 1, 3,-1, [ myvar]) ]]) AT_CHECK_M4SUGAR([], 1, [], [[script.4s:3: error: assert failed: -1 > 0 script.4s:3: the top level autom4te: m4 failed with exit status: 1 ]]) AT_DATA_M4SUGAR([script.4s], [[m4_init m4_divert([0])dnl m4_for([myvar], 1, 2, 0, [ myvar]) ]]) AT_CHECK_M4SUGAR([], 1, [], [[script.4s:3: error: assert failed: 0 > 0 script.4s:3: the top level autom4te: m4 failed with exit status: 1 ]]) AT_DATA_M4SUGAR([script.4s], [[m4_init m4_divert([0])dnl m4_for([myvar], 2, 1, 0, [ myvar]) ]]) AT_CHECK_M4SUGAR([], 1, [], [[script.4s:3: error: assert failed: 0 < 0 script.4s:3: the top level autom4te: m4 failed with exit status: 1 ]]) dnl m4_shiftn also does bounds checking AT_DATA_M4SUGAR([script.4s], [[m4_init m4_divert([0])dnl m4_shiftn(3,1,2) ]]) AT_CHECK_M4SUGAR([], 1, [], [[script.4s:3: error: assert failed: 0 < 3 && 3 < 3 script.4s:3: the top level autom4te: m4 failed with exit status: 1 ]]) AT_CLEANUP ## --------------------- ## ## m4_map{,all}{,_sep}. ## ## --------------------- ## AT_SETUP([m4@&t@_map]) AT_KEYWORDS([m4@&t@_apply m4@&t@_map_sep m4@&t@_mapall m4@&t@_mapall_sep]) AT_KEYWORDS([m4@&t@_count]) AT_CHECK_M4SUGAR_TEXT([[dnl m4_map([m4_count], []) m4_map([ m4_count], [[], [[1]], [[1], [2]]]) m4_mapall([ m4_count], [[], [[1]], [[1], [2]]]) m4_map_sep([m4_eval], [,], [[[1+2]], [[10], [16]]]) m4_count(m4_map_sep([m4_echo], [,], [[], [[1]], [[2]]])) m4_count(m4_mapall_sep([m4_echo], [,], [[], [[1]], [[2]]])) m4_map_sep([m4_eval], [[,]], [[[1+2]], [[10], [16]]]) m4_count(m4_map_sep([m4_echo], [[,]], [[], [[1]], [[2]]])) m4_count(m4_mapall_sep([m4_echo], [[,]], [[], [[1]], [[2]]])) m4_map([-], [[]]) m4_mapall([-], [[]]) m4_map_sep([-], [:], [[]]) m4_mapall_sep([-], [:], [[]]) m4_define([a], [m4_if([$#], [0], [oops], [$1], [a], [pass], [oops])])dnl m4_define([a1], [oops])dnl m4_define([pass1], [oops])dnl m4_map([a], [[[a]]])1 m4_map([m4_unquote([a])], [m4_dquote([a])]) dnl only one side effect expansion, prior to visiting list elements m4_map([m4_errprintn], [[[1]], [[2]], [[3]]m4_errprintn([hi])])dnl m4_map_sep([m4_errprintn], [], [[[1]], [[2]], [[3]]m4_errprintn([hi])])dnl m4_mapall([m4_errprintn], [[[1]], [[2]], [[3]]m4_errprintn([hi])])dnl m4_mapall_sep([m4_errprintn], [], [[[1]], [[2]], [[3]]m4_errprintn([hi])])dnl ]], [[ 1 2 0 1 2 3,a 2 3 3,a 1 1 - - pass1 pass ]], [[hi 1 2 3 hi 1 2 3 hi 1 2 3 hi 1 2 3 ]]) AT_CLEANUP ## --------------------------------------- ## ## m4_map_args{,_sep,_pair} and m4_curry. ## ## --------------------------------------- ## AT_SETUP([m4@&t@_map_args and m4@&t@_curry]) AT_KEYWORDS([m4@&t@_map_args_sep m4@&t@_map_args_pair m4@&t@_reverse m4@&t@_map]) dnl First, make sure we can curry in isolation. AT_CHECK_M4SUGAR_TEXT( [[m4_curry([m4_echo])([1]) m4_curry([m4_curry], [m4_reverse], [1])([2])([3]) m4_define([add], [m4_eval(([$1]) + ([$2]))])dnl m4_define([add_one], [m4_curry([add], [1])])dnl add_one()([4]) ]], [[1 3, 2, 1 5 ]]) dnl Now, check that we can map a list of arguments. AT_CHECK_M4SUGAR_TEXT([[m4_define([active], [ACTIVE])dnl m4_map_args([ m4_echo]) m4_map_args([ m4_echo], [plain], [active]) m4_map_args([m4_unquote], [plain], [active]) m4_map_args_pair([, m4_reverse], []) m4_map_args_pair([, m4_reverse], [], [1]) m4_map_args_pair([, m4_reverse], [], [1], [2]) m4_map_args_pair([, m4_reverse], [], [1], [2], [3]) m4_map_args_pair([, m4_reverse], [], [1], [2], [3], [4]) m4_map_args_pair([, m4_reverse], [, m4_dquote], [1]) m4_map_args_pair([, m4_reverse], [, m4_dquote], [1], [2]) m4_map_args_pair([, m4_reverse], [, m4_dquote], [1], [2], [3]) m4_map_args_pair([, m4_reverse], [, m4_dquote], [1], [2], [3], [4]) m4_map_args_sep([<], [>], [:], [1], [2], [3]) m4_map_args_sep([m4_echo(], [)], [ ], [plain], [active]) ]], [[ plain active plainACTIVE , 1 , 2, 1 , 2, 1, 3 , 2, 1, 4, 3 , [1] , 2, 1 , 2, 1, [3] , 2, 1, 4, 3 <1>:<2>:<3> plain active ]]) dnl Finally, put the two concepts together, to show the real power of the API. AT_CHECK_M4SUGAR_TEXT( [[m4_define([add], [m4_eval(([$1]) + ([$2]))])dnl m4_define([list], [[-1], [0], [1]])dnl dnl list_add_n(value, arg...) dnl add VALUE to each ARG and output the resulting list m4_define([list_add_n], [m4_shift(m4_map_args([,m4_curry([add], [$1])], m4_shift($@)))]) list_add_n([1], list) list_add_n([2], list) ]], [[ 0,1,2 1,2,3 ]]) AT_CLEANUP ## ------------ ## ## m4_combine. ## ## ------------ ## AT_SETUP([m4@&t@_combine]) AT_CHECK_M4SUGAR_TEXT([[m4_define([a], [oops])dnl m4_combine([, ], [[a], [b], [c]], [-], [1], [2], [3]) m4_combine([, ], [[a], [b]], [-]) m4_combine([, ], [[a], [b]], [-], []) m4_combine([, ], [], [-], [a], [b]) m4_combine([, ], [[]], [-], [a], [b]) m4_combine([ a ], [[-], [+]], [a], [-], [+]) m4_combine([$* ], [[$1], [$2]], [$#], [$@]) ]], [[a-1, a-2, a-3, b-1, b-2, b-3, c-1, c-2, c-3 a-, b- -a, -b -a- a -a+ a +a- a +a+ $1$#$@$* $2$#$@ ]], []) AT_CLEANUP ## -------------- ## ## m4_{max,min}. ## ## -------------- ## AT_SETUP([m4@&t@_max and m4@&t@_min]) AT_DATA_M4SUGAR([script.4s], [[m4_max ]]) AT_CHECK_M4SUGAR([], 1, [], [[script.4s:1: error: too few arguments to m4@&t@_max script.4s:1: the top level autom4te: m4 failed with exit status: 1 ]]) AT_DATA_M4SUGAR([script.4s], [[m4_min ]]) AT_CHECK_M4SUGAR([], 1, [], [[script.4s:1: error: too few arguments to m4@&t@_min script.4s:1: the top level autom4te: m4 failed with exit status: 1 ]]) AT_CHECK_M4SUGAR_TEXT([[dnl m4_min(0) m4_min(0xa) m4_min(0, 0) m4_min(0, 1) m4_min(1, 0) m4_min(0+1, 1+1) m4_min(0+1, 1+0) m4_min(0, 1, 2) m4_min(2, 1, 0) m4_min(1m4_for([i], 2, 100, , [,i])) m4_min(m4_for([i], 100, 2, , [i,])1) ---- m4_max(0) m4_max(0xa) m4_max(0, 0) m4_max(0, 1) m4_max(1, 0) m4_max(1+0, 1+1) m4_max(1+0, 1+0) m4_max(0, 1, 2) m4_max(2, 1, 0) m4_max(1m4_for([i], 2, 100, , [,i])) m4_max(m4_for([i], 100, 2, , [i,])1) ]], [[0 10 0 0 0 1 1 0 0 1 1 ---- 0 10 0 1 1 2 1 2 2 100 100 ]], []) AT_CLEANUP ## ----------- ## ## Recursion. ## ## ----------- ## AT_SETUP([recursion]) AT_KEYWORDS([m4@&t@_foreach m4@&t@_foreach_w m4@&t@_case m4@&t@_cond m4@&t@_bpatsubsts m4@&t@_shiftn m4@&t@_do m4@&t@_dquote_elt m4@&t@_reverse m4@&t@_map m4@&t@_join m4@&t@_joinall m4@&t@_list_cmp m4@&t@_max m4@&t@_min m4@&t@_bmatch m4@&t@_map_args m4@&t@_map_args_pair]) dnl This test completes in a reasonable time if m4_foreach is linear, dnl but thrashes if it is quadratic. If we are testing with m4 1.4.x, dnl only the slower foreach.m4 implementation will work. But if we dnl are testing with m4 1.6, we can rerun the test with __m4_version__ dnl undefined to exercise the alternate code path. AT_DATA_M4SUGAR([script.4s], [[m4_init m4_divert_push(0)[]dnl m4_len(m4_foreach_w([j], m4_do(m4_for([i], [1], [10000], [], [,i ])), [j ])) m4_shiftn(9998m4_for([i], [1], [10000], [], [,i])) m4_len(m4_join([--],, m4_dquote_elt(m4_for([i], [1], [10000], [], [,i])),)) m4_len(m4_joinall([--], m4_map([, m4_echo], m4_dquote([1]m4_for([i], [2], [10000], [], [,i]))))) m4_max(m4_min([1]m4_for([i], [2], [10000], [], [,i]))m4_for([i], [2], [10000], [], [,i])) m4_case([10000]m4_for([i], [1], [10000], [], [,i]),[end]) m4_list_cmp(m4_dquote(1m4_for([i], [2], [10000], [], [,i])), m4_dquote(m4_reverse(10000m4_for([i], [9999], [1], [], [,i])), [0])) m4_list_cmp([0], [0m4_for([i], [1], [10000], [], [,0])]) m4_list_cmp([0m4_for([i], [1], [10000], [], [,0])], [0]) m4_for([i], [1], [10000], [], [m4_define(i)])dnl m4_undefine(1m4_for([i], [2], [10000], [], [,i]))dnl m4_bpatsubsts([a1]m4_for([i], [1], [10000], [], [,i]), [a2], [A]) m4_bmatch([9997]m4_for([i], [1], [10000], [], [,^i$])) m4_define([up], [m4_define([$1], m4_incr($1))$1])m4_define([j], 0)dnl m4_cond(m4_for([i], [1], [10000], [], [[up([j])], [9990], i,]) [oops]) j m4_count(m4_map_args_pair([,m4_quote], []m4_map_args([,m4_echo]m4_for([i], [1], [10000], [], [,i])))) m4_divert_pop(0) ]]) AT_CHECK_M4SUGAR([-o-], [0], [[48894 9999,10000 78896 58894 10000 end 0 0 0 A ^9998$ 9990 9990 5001 ]]) AT_DATA_M4SUGAR([script.4s], [[m4_ifdef([__m4_version__], [m4_undefine([__m4_version__])], [m4_divert_push(0)48894 9999,10000 78896 58894 10000 end 0 0 0 A ^9998$ 9990 9990 5001 m4_exit([0])]) m4_init m4_divert_push(0)[]dnl m4_len(m4_foreach_w([j], m4_do(m4_for([i], [1], [10000], [], [,i ])), [j ])) m4_shiftn(9998m4_for([i], [1], [10000], [], [,i])) m4_len(m4_join([--],, m4_dquote_elt(m4_for([i], [1], [10000], [], [,i])),)) m4_len(m4_joinall([--], m4_map([, m4_echo], m4_dquote([1]m4_for([i], [2], [10000], [], [,i]))))) m4_max(m4_min([1]m4_for([i], [2], [10000], [], [,i]))m4_for([i], [2], [10000], [], [,i])) m4_case([10000]m4_for([i], [1], [10000], [], [,i]),[end]) m4_list_cmp(m4_dquote(1m4_for([i], [2], [10000], [], [,i])), m4_dquote(m4_reverse(10000m4_for([i], [9999], [1], [], [,i])), [0])) m4_list_cmp([0], [0m4_for([i], [1], [10000], [], [,0])]) m4_list_cmp([0m4_for([i], [1], [10000], [], [,0])], [0]) m4_for([i], [1], [10000], [], [m4_define(i)])dnl m4_undefine(1m4_for([i], [2], [10000], [], [,i]))dnl m4_bpatsubsts([a1]m4_for([i], [1], [10000], [], [,i]), [a2], [A]) m4_bmatch([9997]m4_for([i], [1], [10000], [], [,^i$])) m4_define([up], [m4_define([$1], m4_incr($1))$1])m4_define([j], 0)dnl m4_cond(m4_for([i], [1], [10000], [], [[up([j])], [9990], i,]) [oops]) j m4_count(m4_map_args_pair([,m4_quote], []m4_map_args([,m4_echo]m4_for([i], [1], [10000], [], [,i])))) m4_divert_pop(0) ]]) AT_CHECK_M4SUGAR([-o-], [0], [[48894 9999,10000 78896 58894 10000 end 0 0 0 A ^9998$ 9990 9990 5001 ]]) AT_CLEANUP ## ---------- ## ## m4_set_*. ## ## ---------- ## AT_SETUP([m4@&t@_set]) AT_KEYWORDS([m4@&t@_set_add m4@&t@_set_add_all m4@&t@_set_contains m4@&t@_set_contents m4@&t@_set_delete m4@&t@_set_difference m4@&t@_set_dump m4@&t@_set_empty m4@&t@_set_foreach m4@&t@_set_intersection m4@&t@_set_list m4@&t@_set_listc m4@&t@_set_map m4@&t@_set_remove m4@&t@_set_size m4@&t@_set_union]) # Simple tests AT_CHECK_M4SUGAR_TEXT([[m4_set_contains([a], [1], [yes], [no]) m4_set_add([a], [1], [added], [dup]) m4_set_contains([a], [1], [yes], [no]) m4_set_add([a], [1], [added], [dup]) m4_set_contents([a]) m4_set_remove([a], [1], [removed], [missing]) m4_set_contains([a], [1], [yes], [no]) m4_set_remove([a], [1], [removed], [missing]) m4_set_add([a], [2], [added], [dup]) m4_set_empty([a], [yes], [no]) m4_set_delete([a]) m4_set_empty([a], [yes], [no]) m4_set_add_all([c], [1], [2], [3]) m4_set_add_all([a]m4_set_listc([c])) m4_set_contents([c], [-]) m4_set_dump([a], [-]) m4_set_contents([a]) m4_set_add_all([a], [1], [2], [3])m4_set_add_all([b], [3], [], [4]) m4_set_difference([a], [b]) m4_set_difference([b], [a]) m4_set_intersection([a], [b]) m4_set_union([a], [b]) m4_define([printodd], [m4_if(m4_eval([$1 & 1]), [1], [:$1])])dnl m4_set_map([a], [printodd]) m4_set_foreach([a], [i], [m4_if(m4_eval(i & 1), [1], [m4_set_remove([a], i)])]) m4_set_list([a]) m4_set_add([a], []) m4_set_list([a]) m4_set_remove([a], [2]) m4_dquote(m4_set_list([a])) m4_set_listc([a]) m4_set_size([a]) m4_set_delete([a]) m4_dquote(m4_set_list([a])) m4_indir([m4_dquote]m4_set_listc([a])) m4_set_listc([a]) m4_set_size([a]) ]], [[no added yes dup 1 removed no missing added no yes 1-2-3 3-2-1 ,1,2 ,,4 ,3 ,1,2,3,,4 :1:3 2 2, [] , 1 [] 0 ]]) # Stress tests - check for unusual names/values AT_CHECK_M4SUGAR_TEXT([[m4_define([a], [oops])dnl m4_set_add([a], [a])dnl m4_set_remove([a], [oops], [yes], [no]) m4_set_add([a,b], [c])dnl m4_set_add([a,b], [$*[]])dnl m4_set_add_all([a], [b,c])dnl m4_set_size([a]) m4_count(m4_set_contents([a], [,])) m4_count(m4_set_list([a], [,])) m4_set_dump([a], [,]) m4_set_contents([a,b], [,]) m4_set_list([a,b]) m4_set_foreach([$*[]], [$*[]], [oops]) m4_set_add([$*[]], [])dnl m4_set_remove([$*[]], [a], [yes], [no]) m4_set_add([$*[]], [a])dnl m4_set_foreach([$*[]], [$*[]], [-m4_defn([$*[]])m4_indir([$*[]])-]) m4_set_remove([$*[]], [], [yes], [no]) m4_set_add([c], [,])dnl m4_set_foreach([a,b], [set], [:m4_set_listc(_m4_defn([set])):]) ]],[[no 2 1 2 b,c,a c,$*[] c,$*[] no ---aoops- yes :,,::,a: ]]) # Stress tests - check for linear scaling (won't necessarily fail if # quadratic, but hopefully users will complain if it appears to hang) AT_CHECK_M4SUGAR_TEXT([[dnl m4_for([i], [1], [10000], [], [m4_set_add([a], i)])dnl m4_set_add_all([b]m4_for([i], [1], [10000], [], [,i]))dnl m4_set_remove([a], [1])dnl m4_set_remove([b], [10000])dnl m4_set_add_all([a]m4_for([i], [1], [10000], [], [,i]))dnl m4_for([i], [1], [10000], [], [m4_set_add([b], i)])dnl m4_len(m4_set_contents([a])) m4_len(m4_set_foreach([b], [b], [m4_if(m4_eval(b & 1), [1], [m4_set_remove([b], b, [-])])])) m4_set_size([b]) m4_define([prune3x], [m4_if(m4_eval([$1 % 3]), [0], [m4_set_remove([a], [$1], [-])])])dnl m4_len(m4_set_map([a], [prune3x])) m4_count(m4_shift(m4_set_intersection([a], [b]))) ]], [[38894 5000 5000 3333 3334 ]]) AT_CLEANUP autoconf2.64_2.64+dfsg.orig/tests/Makefile.in0000644000175000017500000004622611233217355017462 0ustar smcvsmcv# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, # 2009 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 3 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, see . # Freeze M4 files. # Copyright (C) 2002, 2004, 2006, 2007, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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.am \ $(srcdir)/Makefile.in $(srcdir)/atlocal.in subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = atlocal CONFIG_CLEAN_VPATH_FILES = SCRIPTS = $(noinst_SCRIPTS) 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # We don't actually distribute the built testsuite or package.m4, since one # only needs m4 to build them, and m4 is required to install Autoconf. # But if you are borrowing from this file for setting up autotest in your # project, remember to distribute both testsuite and package.m4. EXTRA_DIST = $(TESTSUITE_AT) local.at mktests.sh atlocal.in wrapper.as \ statesave.m4 mktests.stamp # Running the uninstalled scripts. Build them upon `all', for the manpages. noinst_SCRIPTS = $(wrappers) DISTCLEANFILES = atconfig atlocal $(TESTSUITE) MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE_GENERATED_AT) \ mktests.stamp SUFFIXES = .m4 .m4f AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg # Do not use AUTOM4TE here, since maint.mk (my-distcheck) # checks if we are independent of Autoconf by defining AUTOM4TE (and # others) to `false'. Autoconf provides autom4te, so that doesn't # apply to us. MY_AUTOM4TE = \ autom4te_perllibdir='$(top_srcdir)'/lib \ AUTOM4TE_CFG='$(AUTOM4TE_CFG)' $(top_builddir)/bin/autom4te \ -B '$(top_builddir)'/lib -B '$(top_srcdir)'/lib # keep ` ' # 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 = $(top_builddir)/bin/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/erlang.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/' wrappers = autoconf autoheader autom4te autoreconf autoscan autoupdate ifnames # The hairy heredoc is more robust than using echo. CLEANFILES = wrapper.in $(wrappers) package.m4 mktests.tmp expr edit = sed \ -e 's|@wrap_program[@]|$@|g' \ -e 's|@abs_top_srcdir[@]|@abs_top_srcdir@|g' \ -e 's|@abs_top_builddir[@]|@abs_top_builddir@|g' \ -e "s|@configure_input[@]|Generated from $$input.|g" TESTSUITE_GENERATED_AT = \ $(srcdir)/aclang.at \ $(srcdir)/acc.at \ $(srcdir)/acfortran.at \ $(srcdir)/acgeneral.at \ $(srcdir)/acstatus.at \ $(srcdir)/acautoheader.at \ $(srcdir)/acautoupdate.at \ $(srcdir)/acspecific.at \ $(srcdir)/acfunctions.at \ $(srcdir)/acheaders.at \ $(srcdir)/actypes.at \ $(srcdir)/aclibs.at \ $(srcdir)/acprograms.at TESTSUITE_HAND_AT = \ suite.at \ m4sugar.at m4sh.at autotest.at \ base.at tools.at torture.at \ compile.at c.at erlang.at fortran.at \ semantics.at \ autoscan.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 = $(MY_AUTOM4TE) --language=autotest # Avoid a race condition that would make parallel "distclean" fail. # The rule in clean-local tests for existence of $(TESTSUITE), and # if found, attempts to run it. But the distclean-generic rule may # be running in parallel, and it removes $(DISTCLEANFILES) which # includes $(TESTSUITE). This is the Automake rule, plus our # dependency, and we silence the warning from 'automake -Wall' by # hiding the dependency behind a variable. # TODO - fix this if newer automake accomodates the dependency. distclean_generic = distclean-generic # The files which contain macros we check for syntax. Use $(top_srcdir) # for the benefit of non-GNU make. Fix the names in the rule below # where we `cd' to $srcdir. 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 all: all-am .SUFFIXES: .SUFFIXES: .m4 .m4f $(srcdir)/Makefile.in: $(srcdir)/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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: 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 $(am__aclocal_m4_deps): atlocal: $(top_builddir)/config.status $(srcdir)/atlocal.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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 $(SCRIPTS) 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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: .MAKE: check-am install-am install-strip .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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am 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 $(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 an 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. # The `:;' works around a redirected compound command bash exit status bug. package.m4: Makefile :;{ \ 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)])' && \ echo 'm4_define([AT_PACKAGE_URL], [$(PACKAGE_URL)])'; \ } > $@-t mv $@-t $@ wrapper.in: $(srcdir)/wrapper.as $(m4sh_m4f_dependencies) $(MY_AUTOM4TE) --language=M4sh $(srcdir)/wrapper.as -o $@ $(wrappers): wrapper.in rm -f $@ $@.tmp input=wrapper.in; \ $(edit) wrapper.in >$@.tmp chmod +x $@.tmp chmod a-w $@.tmp mv -f $@.tmp $@ $(TESTSUITE): package.m4 \ local.at \ $(TESTSUITE_AT) \ $(autotest_m4f_dependencies) cd $(top_builddir)/lib/autotest && $(MAKE) $(AM_MAKEFLAGS) autotest.m4f $(AUTOTEST) -I . -I $(srcdir) suite.at -o $@.tmp mv $@.tmp $@ atconfig: $(top_builddir)/config.status cd $(top_builddir) && ./config.status tests/$@ $(distclean_generic): clean-local clean-local: test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean rm -f *.tmp rm -f -r autom4te.cache check-local: atconfig atlocal $(TESTSUITE) $(SHELL) $(TESTSUITE) $(TESTSUITEFLAGS) # Run the test suite on the *installed* tree. installcheck-local: atconfig atlocal $(TESTSUITE) $(SHELL) $(TESTSUITE) AUTOTEST_PATH="$(bindir)" $(TESTSUITEFLAGS) $(TESTSUITE_GENERATED_AT): mktests.stamp @if test -f $@; then :; else \ rm -f mktests.stamp; \ $(MAKE) $(AM_MAKEFLAGS) mktests.stamp; \ fi mktests.stamp : mktests.sh $(AUTOCONF_FILES) @rm -f mktests.tmp @touch mktests.tmp cd $(srcdir) && ./mktests.sh \ `echo " "$(AUTOCONF_FILES) | sed 's, [^ ]*/, ../lib/autoconf/,g'` @mv -f mktests.tmp $@ # These cannot be run in parallel. maintainer-check: $(MAKE) $(AM_MAKEFLAGS) maintainer-check-posix $(MAKE) $(AM_MAKEFLAGS) maintainer-check-c++ expr: :;{ \ echo '#! $(SHELL)'; \ echo 'result=`$(EXPR) "$$@"`'; \ echo 'estatus=$$?'; \ echo 'cat < $@-t chmod +x $@-t mv $@-t $@ # Try the test suite with more severe environments. maintainer-check-posix: expr POSIXLY_CORRECT=yes $(MAKE) $(AM_MAKEFLAGS) check rm expr # Try using G++ as a C compiler. maintainer-check-c++: CC=g++ $(MAKE) $(AM_MAKEFLAGS) 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.64_2.64+dfsg.orig/tests/wrapper.as0000644000175000017500000000305710776002620017413 0ustar smcvsmcvAS_INIT[]dnl -*- shell-script -*- # wrapper.as -- running `@wrap_program@' as if it were installed. # @configure_input@ # Copyright (C) 2003, 2004, 2007 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. testdir='@abs_top_builddir@/tests' PATH=$testdir$PATH_SEPARATOR$PATH AUTOCONF=autoconf AUTOHEADER=autoheader AUTOM4TE=autom4te AUTOM4TE_CFG='@abs_top_builddir@/lib/autom4te.cfg' autom4te_perllibdir='@abs_top_srcdir@/lib' export AUTOCONF AUTOHEADER AUTOM4TE AUTOM4TE_CFG autom4te_perllibdir case '@wrap_program@' in ifnames) # Does not have lib files. exec '@abs_top_builddir@/bin/@wrap_program@' ${1+"$@"} ;; *) # We might need files from the build tree (frozen files), in # addition of src files. exec '@abs_top_builddir@/bin/@wrap_program@' \ -B '@abs_top_builddir@'/lib \ -B '@abs_top_srcdir@'/lib ${1+"$@"} esac exit 1 autoconf2.64_2.64+dfsg.orig/tests/acautoupdate.at0000444000175000017500000000000011232571662020377 0ustar smcvsmcvautoconf2.64_2.64+dfsg.orig/tests/autoscan.at0000644000175000017500000000236010776002620017545 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([Autoscan.]) # Copyright (C) 2005 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. AT_SETUP([autoscan]) AT_DATA([Makefile.am], [[SUBDIRS = subpkg ]]) AT_DATA([configure.ac], [[AC_INIT AC_PREREQ(2.59) AM_INIT_AUTOMAKE(foreign) AC_CONFIG_SUBDIRS(subpkg) AC_CONFIG_FILES(Makefile) AC_OUTPUT ]]) mkdir subpkg AT_DATA([subpkg/Makefile.am], []) AT_DATA([subpkg/configure.ac], [[AC_INIT AM_INIT_AUTOMAKE(foreign) AC_CONFIG_FILES(Makefile) AC_OUTPUT ]]) AT_CHECK([autoscan]) AT_CHECK([grep subpkg/Makefile configure.scan], [1], [], [ignore]) AT_CLEANUP autoconf2.64_2.64+dfsg.orig/tests/semantics.at0000644000175000017500000004141611104726447017731 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([Semantics.]) # Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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' (= `$ac_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' (= `$ac_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 (none needed) # ---------------------------- AT_CHECK_MACRO([AC_SEARCH_LIBS (none needed)], [ 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: AT_CHECK_MACRO([AC_CHECK_DECLS], [[AC_CHECK_DECLS([yes, no, myenum, mystruct, myfunc, mymacro1, mymacro2],,, [[int yes = 1; enum { myenum }; struct { int x[20]; } mystruct; extern int myfunc(); #define mymacro1(arg) arg #define mymacro2]])]], [AT_CHECK_DEFINES( [#define HAVE_DECL_MYENUM 1 #define HAVE_DECL_MYFUNC 1 #define HAVE_DECL_MYMACRO1 1 #define HAVE_DECL_MYMACRO2 1 #define HAVE_DECL_MYSTRUCT 1 #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], [], [${LIBOBJDIR}autoconf_ftnirp$U.o ]) AT_CLEANUP # AC_CHECK_HEADERS # ---------------- # Check that it performs the correct actions: # Must define HAVE_STDIO_H, but not HAVE_AUTOCONF_IO_H. AT_SETUP([AC_CHECK_HEADERS]) AT_DATA([autoconf_io.h], [blah blah ]) AT_CONFIGURE_AC([AC_CHECK_HEADERS(stdio.h autoconf_io.h)]) AT_CHECK_AUTOCONF([-W obsolete]) AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE([CPPFLAGS=-I.], [0], [ignore], [configure: WARNING: autoconf_io.h: present but cannot be compiled configure: WARNING: autoconf_io.h: check for missing prerequisite headers? configure: WARNING: autoconf_io.h: see the Autoconf documentation configure: WARNING: autoconf_io.h: section "Present But Cannot Be Compiled" configure: WARNING: autoconf_io.h: proceeding with the compiler's result ]) AT_CHECK_ENV AT_CHECK_DEFINES( [/* #undef HAVE_AUTOCONF_IO_H */ #define HAVE_STDIO_H 1 ]) AT_CLEANUP # AC_CHECK_HEADERS_OLD # -------------------- # Check that it performs the correct actions: # Must not check prerequisites, hence define header2.h AT_SETUP([AC_CHECK_HEADERS (preprocessor test)]) AT_DATA([header1.h], [typedef int foo; ]) AT_DATA([header2.h], [typedef foo bar; ]) AT_CONFIGURE_AC([AC_CHECK_HEADERS(header2.h, [], [], -)]) AT_CHECK_AUTOCONF([-W obsolete]) AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE([CPPFLAGS=-I.]) AT_CHECK_ENV AT_CHECK_DEFINES( [#define HAVE_HEADER2_H 1 ]) AT_CLEANUP # 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 (compiler test)]) AT_DATA([header1.h], [typedef int foo; ]) AT_DATA([header2.h], [typedef foo bar; ]) AT_DATA([header3.h], [typedef bar wow; ]) AT_CONFIGURE_AC( [AC_CHECK_HEADERS(header2.h header3.h, [], [], [[@%:@include "header1.h"]])]) AT_CHECK_AUTOCONF([-W obsolete]) AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE([CPPFLAGS=-I.]) AT_CHECK_ENV AT_CHECK_DEFINES( [#define HAVE_HEADER2_H 1 /* #undef HAVE_HEADER3_H */ ]) AT_CLEANUP # 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.substruct],,, [struct sub { int x; }; struct yes_s { int yes; struct sub substruct; };])]], [AT_CHECK_DEFINES( [/* #undef HAVE_STRUCT_YES_S_NO */ #define HAVE_STRUCT_YES_S_SUBSTRUCT 1 #define HAVE_STRUCT_YES_S_YES 1 ])]) # AC_CHECK_ALIGNOF # ---------------- AT_CHECK_MACRO_CROSS([AC_CHECK_ALIGNOF], [[AC_CHECK_ALIGNOF(char) AC_CHECK_ALIGNOF(charchar, [[#include #include typedef char charchar[2];]]) AC_CHECK_ALIGNOF(charcharchar) ]], [AT_CHECK_DEFINES( [#define ALIGNOF_CHAR 1 #define ALIGNOF_CHARCHAR 1 #define ALIGNOF_CHARCHARCHAR 0 ])]) # AC_CHECK_ALIGNOF struct # ----------------------- AT_CHECK_MACRO_CROSS([AC_CHECK_ALIGNOF struct], [[AC_CHECK_ALIGNOF([struct { char c; }]) AC_CHECK_ALIGNOF([struct nosuchstruct]) ]], [AT_CHECK([[grep "#define ALIGNOF_STRUCT___CHAR_C___ [^0]" config.h]], 0, ignore) AT_CHECK([[grep "#define ALIGNOF_STRUCT_NOSUCHSTRUCT 0" config.h]], 0, ignore) ]) # AC_CHECK_SIZEOF # --------------- AT_CHECK_MACRO_CROSS([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 struct # ---------------------- AT_CHECK_MACRO_CROSS([AC_CHECK_SIZEOF struct], [[AC_C_CONST AC_CHECK_SIZEOF([struct x], [], [struct x { char c; int x; };]) AC_CHECK_SIZEOF([const struct x], [], [struct x { const char *p; int x; };]) AC_CHECK_SIZEOF([struct nosuchstruct]) ]], [AT_CHECK([[grep "#define SIZEOF_STRUCT_X [^0]" config.h]], 0, ignore) AT_CHECK([[grep "#define SIZEOF_CONST_STRUCT_X [^0]" config.h]], 0, ignore) AT_CHECK([[grep "#define SIZEOF_STRUCT_NOSUCHSTRUCT 0" config.h]], 0, ignore) ]) # 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 int) 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 ## ---------------- ## ## 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], [ac_endian=universal]) echo $ac_endian > at-endian ]]) rm -f config.hin # So that next run of autoheader is quiet. _AT_CHECK_AC_MACRO( [[# Force cross compiling. cross_compiling=yes ac_tool_warned=yes AC_C_BIGENDIAN( [ac_endian=big], [ac_endian=little], [ac_endian=unknown], [ac_endian=universal]) 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 create a config.h template # containing "WORDS_BIGENDIAN". AT_CONFIGURE_AC([[AC_C_BIGENDIAN]]) # --force is necessary, the computer might be too fast. AT_CHECK_AUTOHEADER([--force]) AT_CHECK([grep WORDS_BIGENDIAN config.hin], [], [ignore]) AT_CLEANUP # ------------------------------ # # 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 # ----------------------------- # # AC_PATH_PROGS_FEATURE_CHECK. # # ----------------------------- # AT_SETUP([AC_PATH_PROGS_FEATURE_CHECK]) # This test doesn't work if `pwd` contains white space case `pwd` in *\ * | *\ *) AT_CHECK([exit 77]) ;; esac 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 # Find first candidate and stop search AC_PATH_PROGS_FEATURE_CHECK(TOOL1, [tool better], [$ac_path_TOOL1 && ac_cv_path_TOOL1=$ac_path_TOOL1 ac_path_TOOL1_found=:], fail=:, $path) test -z "$TOOL1" || fail=: test "$ac_cv_path_TOOL1" = "$pwd/path/1/tool" || fail=: # Keep searching each candidate AC_PATH_PROGS_FEATURE_CHECK(TOOL2, [tool better], [$ac_path_TOOL2 && ac_cv_path_TOOL2=$ac_path_TOOL2], fail=:, $path) test "$ac_cv_path_TOOL2" = "$pwd/path/6/better" || fail=: # Only accept better candidate AC_PATH_PROGS_FEATURE_CHECK(TOOL3, [tool better], [case "$ac_path_TOOL3" in #( *better) ac_cv_path_TOOL3=$ac_path_TOOL3;; esac], fail=:, $path) test "$ac_cv_path_TOOL3" = "$pwd/path/6/better" || fail=: # When a tool is not found, and no action is given for not-found, # the variable is left empty. AC_PATH_PROGS_FEATURE_CHECK(TOOL4, missing, [ac_cv_path_TOOL4=$ac_path_TOOL4], [], $path) test -z "$ac_cv_path_TOOL4" || fail=: # Test action when tool is not found AC_PATH_PROGS_FEATURE_CHECK(TOOL5, missing, [], [ac_cv_path_TOOL5='not found'], $path) test "$ac_cv_path_TOOL5" = "not found" || fail=: # Test that pre-set tool bypasses feature test TOOL6=$pwd/path/6/better AC_PATH_PROGS_FEATURE_CHECK(TOOL6, tool, fail=:, fail=:, $path) test "$ac_cv_path_TOOL6" = "$pwd/path/6/better" || fail=: # A blank pre-set does not bypass feature test TOOL7= AC_PATH_PROGS_FEATURE_CHECK(TOOL7, [tool better], [$ac_path_TOOL7 && ac_cv_path_TOOL7=$ac_path_TOOL7 ac_path_TOOL7_found=:], fail=:, $path) test -z "$TOOL7" || fail=: test "$ac_cv_path_TOOL7" = "$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 ## -------------- ## ## 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_SETVBUF_REVERSED], , ,[-W no-obsolete]) AT_CHECK_MACRO([AC_FUNC_WAIT3], , ,[-W no-obsolete]) autoconf2.64_2.64+dfsg.orig/tests/base.at0000644000175000017500000001676611214171727016664 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([Autoconf base layer.]) # Copyright (C) 2000, 2001, 2003, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. ## ------------------------------- ## ## AC_REQUIRE: topological sort.. ## ## ------------------------------- ## # Check that dependencies are always properly honored. AT_SETUP([AC_REQUIRE: topological sort]) AT_KEYWORDS([m4@&t@_require]) 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: error message. ## ## --------------------------- ## # Check that the message mentions AC_DEFUN, not m4_defun. AT_SETUP([AC_REQUIRE: error message]) AT_KEYWORDS([m4@&t@_require]) AT_DATA([configure.ac], [[AC_REQUIRE([AC_PROG_CC]) ]]) AT_CHECK_AUTOCONF([], [1], [], [[configure.ac:1: error: AC_REQUIRE(AC_PROG_CC): cannot be used outside of an AC_DEFUN'd macro configure.ac:1: the top level autom4te: m4 failed with exit status: 1 ]]) AT_CLEANUP ## ----------------------------------------------- ## ## AC_REQUIRE and AC_DEFUN_ONCE: Require, expand. ## ## ----------------------------------------------- ## AT_SETUP([AC_REQUIRE & AC_DEFUN_ONCE: [Require, expand]]) AT_KEYWORDS([m4@&t@_require m4@&t@_require_once]) 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, []) AT_CHECK_CONFIGURE AT_CLEANUP ## ----------------------------------------------- ## ## AC_REQUIRE and AC_DEFUN_ONCE: Expand, require. ## ## ----------------------------------------------- ## AT_SETUP([AC_REQUIRE & AC_DEFUN_ONCE: [Expand, require]]) AT_KEYWORDS([m4@&t@_require m4@&t@_require_once]) 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, []) AT_CHECK_CONFIGURE AT_CLEANUP ## ------------------------- ## ## AC_REQUIRE & AC_PROVIDE. ## ## ------------------------- ## AT_SETUP([AC_REQUIRE & AC_PROVIDE]) AT_KEYWORDS([m4@&t@_require]) 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. # Also make sure we warn about cache id's not named with `_cv_'. AT_SETUP([AC_CACHE_CHECK]) AT_DATA([configure.ac], [[AC_INIT # m4_define([ac_nothing], [ac_cv_absolutely_nothing]) AC_CACHE_CHECK([for nothing], [ac_nothing], [ac_nothing=found]) ]]) AT_CHECK_AUTOCONF([], [], [], [stderr]) AT_CHECK([grep 'must contain _cv_ to be cached' stderr], [], [ignore]) # Do not warn about defines: sed 's/^# //' configure.ac > t mv -f t configure.ac AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([-q]) sed '/m4_define/d; s/ac_nothing/ac_cv_nothing/' configure.ac > t mv -f t configure.ac AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([-q]) AT_CLEANUP ## ---------------- ## ## AC_COMPUTE_INT. ## ## ---------------- ## # Make sure AC_COMPUTE_INT fails properly. AT_SETUP([AC_COMPUTE_INT]) AT_DATA([configure.ac], [[AC_INIT AC_COMPUTE_INT([invalid_expression], [**0**], [], [invalid_expression=failed]) test "$invalid_expression" = failed || AC_MSG_ERROR([**0** evaluated to $invalid_expression instead of failing]) ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE 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 ## ------------ ## ## Input/Output ## ## ------------ ## AT_SETUP([Input/Output]) AT_DATA([configure.ac], [[AC_INIT cat <&AS@&t@_ORIGINAL_STDIN_FD >&AS@&t@_MESSAGE_FD ]]) AT_CHECK_AUTOCONF AT_CHECK([echo Hello | CONFIG_SITE=/dev/null ./configure | grep -v 'configure: loading site script '],, [Hello ]) AT_CHECK([echo Hello | CONFIG_SITE=/dev/null ./configure --silent]) AT_CLEANUP ## ------------------- ## ## configure arguments ## ## ------------------- ## AT_SETUP([configure arguments]) AT_DATA([configure.ac], [[AC_INIT echo "$@" ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([FOO=bar --enable-baz --without-zork --silent], [0], [stdout], [ignore]) AT_CHECK([grep 'FOO=bar --enable-baz --without-zork --silent' stdout], [0], [ignore], [ignore]) dnl check that syntax error is detected AT_CHECK_CONFIGURE([=], [1], [], [ignore], [ignore]) AT_CHECK_CONFIGURE([1=2], [1], [], [ignore], [ignore]) AT_CLEANUP ## --------------------- ## ## configure directories ## ## --------------------- ## AT_SETUP([configure directories]) AT_DATA([foo.in], [[prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ ]]) AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_FILES([foo]) AC_OUTPUT ]]) AT_CHECK_AUTOCONF dnl check that relative paths are rejected AT_CHECK_CONFIGURE([--libdir=.], [1], [ignore], [stderr]) AT_CHECK([grep 'expected an absolute directory name for --libdir: \.' stderr], [0], [ignore]) dnl check that extra slashes are stripped, and that defaults are not expanded AT_CHECK_CONFIGURE([--prefix=/usr//]) AT_CHECK([cat foo], [0], [[prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib ]]) AT_CLEANUP autoconf2.64_2.64+dfsg.orig/tests/compile.at0000644000175000017500000001361611232214405017360 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([Low level compiling/preprocessing macros.]) # Copyright (C) 2000, 2001, 2003, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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([Erlang]) # Erlang C++ C C AC_LANG_PUSH([Fortran 77]) # F77 Erlang C++ C C AC_LANG_POP([Fortran 77]) # Erlang C++ C C AC_LANG_POP([Erlang]) # 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 cpp cpp erl f erl cpp cpp 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([], [return 0])], [], [AC_MSG_ERROR([saw `return 0' as a failure])]) AC_RUN_IFELSE([AC_LANG_PROGRAM([], [return 2])], [AC_MSG_ERROR([saw `return 2' as a success])], [estatus=$? test $estatus != 2 && AC_MSG_ERROR([did not get as 2 exit status: $estatus])]) # The old stinky one. AC_TRY_RUN([int main () { return 3; }], [AC_MSG_ERROR([saw `return 3' as a success])], [estatus=$? test $estatus != 3 && AC_MSG_ERROR([did not get 3 as exit status: $estatus])]) ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([-q]) AT_CLEANUP ## -------------------------- ## ## Order of `rm' and actions. ## ## -------------------------- ## AT_SETUP([Order of user actions and cleanup]) AT_DATA([configure.ac], [[AC_INIT AC_PROG_CC AC_PREPROC_IFELSE([AC_LANG_PROGRAM([int ok;], [])], [test -f conftest.err || AS_EXIT([1])], [AS_EXIT([1])]) AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#define 12 34], [])], [AS_EXIT([1])], [test -f conftest.err || AS_EXIT([1])]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int ok;], [])], [test -f conftest.$ac_objext || AS_EXIT([1])], [AS_EXIT([1])]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int bad bad;], [])], [AS_EXIT([1])], [test -f conftest.err || AS_EXIT([1])]) AC_LINK_IFELSE([AC_LANG_PROGRAM([int ok;], [])], [test -f conftest$ac_exeext || AS_EXIT([1])], [AS_EXIT([1])]) AC_LINK_IFELSE([AC_LANG_PROGRAM([int bad bad;], [])], [AS_EXIT([1])], [test -f conftest.err || AS_EXIT([1])]) AC_RUN_IFELSE([AC_LANG_PROGRAM([int ok;], [])], [./conftest$ac_exeext || AS_EXIT([1])], [AS_EXIT([1])]) d@&t@nl conftest.err not generated by AC_RUN_IFELSE? AC_RUN_IFELSE([AC_LANG_PROGRAM([int bad bad;], [])], [AS_EXIT([1])], []) ]]) 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])])]) ## -------------------- ## ## Multiple languages. ## ## -------------------- ## AT_SETUP([Multiple languages]) # This test should be skipped if the C compiler is a C++ compiler. AT_DATA([configure.ac], [[AC_INIT AC_PROG_CC AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #ifdef __cplusplus choke me #endif ]])], [], AS_EXIT([77])) ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE # This test should be skipped on systems without a C++ compiler. AT_DATA([configure.ac], [[AC_INIT AC_PROG_CXX AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #ifndef __cplusplus choke me #endif ]])], [], AS_EXIT([77])) AC_LANG_POP([C++]) ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_DATA([configure.ac], [[AC_INIT AC_PROG_CC AC_PROG_CXX AC_LANG_PUSH([C]) AC_MSG_CHECKING([a simple C program that is not valid C++]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([enum a { A, B, C }; enum a f(enum a in) { return in++; }], [])], [AC_MSG_RESULT([ok])], [AC_MSG_RESULT([failed]) AC_MSG_ERROR([could not compile test program])]) AC_LANG_POP([C]) AC_LANG_PUSH([C++]) AC_MSG_CHECKING([a simple C++ program that is not valid C]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([class A {};], [])], [AC_MSG_RESULT([ok])], [AC_MSG_RESULT([failed]) AC_MSG_ERROR([could not compile test program])]) AC_CHECK_HEADER([cstring]) AC_LANG_POP([C++]) ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([-q]) AT_CLEANUP autoconf2.64_2.64+dfsg.orig/tests/acc.at0000444000175000017500000000173311232571665016467 0ustar smcvsmcv# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 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_FLEXIBLE_ARRAY_MEMBER]) AT_CHECK_MACRO([AC_C_INLINE]) AT_CHECK_MACRO([AC_C_PROTOTYPES]) AT_CHECK_MACRO([AC_C_RESTRICT]) AT_CHECK_MACRO([AC_C_STRINGIZE]) AT_CHECK_MACRO([AC_C_TYPEOF]) AT_CHECK_MACRO([AC_C_VARARRAYS]) AT_CHECK_MACRO([AC_OPENMP]) AT_CHECK_MACRO([AC_PROG_CC_C89]) AT_CHECK_MACRO([AC_PROG_CC_C99]) AT_CHECK_MACRO([AC_PROG_CC_C_O]) AT_CHECK_MACRO([AC_PROG_CC_STDC]) 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]) AT_CHECK_AU_MACRO([AC_LANG_OBJC]) autoconf2.64_2.64+dfsg.orig/tests/acprograms.at0000444000175000017500000000133611232571667020100 0ustar smcvsmcv# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 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_MKDIR_P]) AT_CHECK_MACRO([AC_PROG_RANLIB]) AT_CHECK_MACRO([AC_PROG_SED]) 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.64_2.64+dfsg.orig/tests/actypes.at0000444000175000017500000000245711232571667017417 0ustar smcvsmcv# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. AT_BANNER([Testing autoconf/types macros.]) # Modern macros. AT_CHECK_MACRO([AC_STRUCT_DIRENT_D_INO]) AT_CHECK_MACRO([AC_STRUCT_DIRENT_D_TYPE]) AT_CHECK_MACRO([AC_STRUCT_ST_BLOCKS]) AT_CHECK_MACRO([AC_STRUCT_TIMEZONE]) AT_CHECK_MACRO([AC_TYPE_INT16_T]) AT_CHECK_MACRO([AC_TYPE_INT32_T]) AT_CHECK_MACRO([AC_TYPE_INT64_T]) AT_CHECK_MACRO([AC_TYPE_INT8_T]) AT_CHECK_MACRO([AC_TYPE_INTMAX_T]) AT_CHECK_MACRO([AC_TYPE_INTPTR_T]) AT_CHECK_MACRO([AC_TYPE_LONG_DOUBLE]) AT_CHECK_MACRO([AC_TYPE_LONG_DOUBLE_WIDER]) AT_CHECK_MACRO([AC_TYPE_MODE_T]) AT_CHECK_MACRO([AC_TYPE_OFF_T]) AT_CHECK_MACRO([AC_TYPE_SSIZE_T]) AT_CHECK_MACRO([AC_TYPE_UINT16_T]) AT_CHECK_MACRO([AC_TYPE_UINT32_T]) AT_CHECK_MACRO([AC_TYPE_UINT64_T]) AT_CHECK_MACRO([AC_TYPE_UINT8_T]) AT_CHECK_MACRO([AC_TYPE_UINTMAX_T]) AT_CHECK_MACRO([AC_TYPE_UINTPTR_T]) # Obsolete macros. AT_CHECK_AU_MACRO([AC_C_LONG_DOUBLE]) 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([AC_TYPE_SIGNAL]) AT_CHECK_AU_MACRO([AM_TYPE_PTRDIFF_T]) autoconf2.64_2.64+dfsg.orig/tests/autotest.at0000644000175000017500000013635111232053734017610 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([Autotest.]) # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # AT_DATA_AUTOTEST(FILE-NAME, CONTENTS) # ------------------------------------- # Escape the invalid tokens with @&t@. m4_define([AT_DATA_AUTOTEST], [AT_DATA([$1], [m4_bpatsubst([$2], [\(@.\)\(.@\)\|\(m4\|AS\|AT\)\(_\)\|\(d\)\(nl\)], [\1\3\5@&t@\2\4\6])])]) # AT_CHECK_AT_PREP(NAME, SUITE-CODE, [STATUS = 0], [STDOUT], [STDERR], # [DIR = .]) # -------------------------------------------------------------------- # Create a new testsuite named NAME that runs a minimal Autotest test suite, # SUITE-CODE. Do not use `testsuite' for NAME, or the log file it generates # will overwrite the log that the Autoconf test produces when managing # this test case. STATUS, STDOUT, and STDERR pass directly to the AT_CHECK # that compiles the testsuite. DIR can specify a particular subdirectory # where the testsuite should live. m4_define([AT_CHECK_AT_PREP], [AT_KEYWORDS([autotest])dnl dnl overquote AT_dir, to make it easier to use m4_pushdef([AT_dir], m4_ifval([$6], [[[$6]]], [.]))dnl dnl AT_CAPTURE_FILE([$1.log])dnl dnl AT_DATA_AUTOTEST(AT_dir[/package.m4], [[m4_define([AT_PACKAGE_NAME], [GNU Nonsense]) m4_define([AT_PACKAGE_TARNAME], [nonsense]) m4_define([AT_PACKAGE_VERSION], [1.0]) m4_define([AT_PACKAGE_STRING], [GNU Nonsense 1.0]) m4_define([AT_PACKAGE_BUGREPORT], [bug-autoconf@gnu.org]) ]]) dnl AT_DATA_AUTOTEST(AT_dir[/$1.at], [$2]) m4_ifval([$6], [(cd AT_dir]) AT_CHECK_AUTOM4TE([--language=autotest -o $1 $1.at], [$3], [$4], [$5]) m4_ifval([$6], [)]) m4_popdef([AT_dir])dnl ]) # AT_CHECK_AT_PREP # AT_CHECK_AT(TITLE, SUITE-CODE, [XFAIL-CONDITION], [STATUS = 0], # [STDOUT = ignore], STDERR, [PRE-TEST-CODE], # [POST-TEST-CODE], [SUITE-ARGS]) # --------------------------------------------------------------- # Create a new test named TITLE that runs a minimal Autotest test suite, # SUITE-CODE with additional SUITE-ARGS, once without and once with # '-v -x' added. Call AT_XFAIL_IF with XFAIL-CONDITION. Pass STDERR # directly to the AT_CHECK that calls the minimal test suite, STDOUT to # the AT_CHECK without '-v -x'; ignore stdout for the latter. # Run PRE-TEST-CODE at the top level after the micro-suite is created, but # before it is run, and POST-TEST-CODE after the micro-suite has been run. m4_define([AT_CHECK_AT], [AT_SETUP([$1]) AT_XFAIL_IF([$3]) AT_CHECK_AT_PREP([micro-suite], [$2]) $7 AT_CHECK([$CONFIG_SHELL ./micro-suite $9], m4_default([$4], 0), m4_default([$5], [ignore]), [$6]) AT_CHECK([$CONFIG_SHELL ./micro-suite -v -x $9], m4_default([$4], 0), [ignore], [$6]) $8 AT_CLEANUP ])# AT_CHECK_AT # AT_CHECK_AT_TEST(TITLE, SUITE-SNIPPET, ...) # ----------------------------------------------------------------------- # Wrapper for AT_CHECK_AT that surrounds SUITE-SNIPPET with a boilerplate # AT_INIT, AT_SETUP, and AT_CLEANUP and passes other arguments verbatim. m4_define([AT_CHECK_AT_TEST], [AT_CHECK_AT([$1], [[ AT_INIT([artificial test suite]) AT_SETUP([my only test]) $2 AT_CLEANUP ]], m4_shift2($@))]) # AT_CHECK_AT_TEST # AT_CHECK_AT_SYNTAX(TITLE, SUITE, MESSAGE) # ----------------------------------------- # Create a test named TITLE that tries compiling SUITE with syntax # errors with autotest. Expect a failed compilation, and grep for # MESSAGE occuring within the error output. m4_define([AT_CHECK_AT_SYNTAX], [AT_SETUP([$1]) AT_CHECK_AT_PREP([micro-suite], [$2], [1], [], [stderr]) AT_CHECK([grep '$3' stderr], [0], [ignore]) AT_CLEANUP ])# AT_CHECK_AT_SYNTAX # AT_NO_CMDSUBST # -------------- m4_define([AT_NO_CMDSUBST], [if (eval 'foo=$(echo bar) && test "$foo" = bar') >/dev/null 2>&1; then ]dnl [false; else :; fi]) # AT_CHECK_EGREP(PATTERN, STATUS, COUNT) # -------------------------------------- # Run grep -E, counting how many times PATTERN occurs in the file 'stdout', # and expecting exit STATUS and output COUNT. m4_define([AT_CHECK_EGREP], [AT_CHECK([$EGREP -c '$1' stdout], [$2], [$3 ], [ignore]) ]) ## ------------------ ## ## Empty test suite. ## ## ------------------ ## # This is not a sensible thing to do, but the user should not get an unhelpful # error message. AT_CHECK_AT([Empty test suite], [[AT_INIT([empty test suite]) ]]) AT_CHECK_AT([Banner-only test suite], [[AT_INIT([empty test suite]) AT_BANNER([banner]) ]]) # Next level of emptiness. AT_CHECK_AT_TEST([Empty test], []) # And finally, an empty check should not cause a syntax error. AT_CHECK_AT_TEST([Empty check], [AT_CHECK]) # Check for sensible error messages for common bugs. AT_CHECK_AT_SYNTAX([AT@&t@_SETUP without AT@&t@_INIT], [[AT_SETUP([only test]) AT_CHECK([:]) AT_CLEANUP ]], [AT@&t@_SETUP: missing AT@&t@_INIT detected]) AT_CHECK_AT_SYNTAX([AT@&t@_BANNER without AT@&t@_INIT], [[AT_BANNER([just a banner]) ]], [AT@&t@_BANNER: missing AT@&t@_INIT detected]) AT_CHECK_AT_SYNTAX([AT@&t@_CLEANUP without AT@&t@_INIT], [[AT_CLEANUP ]], [AT@&t@_CLEANUP: missing AT@&t@_INIT detected]) AT_CHECK_AT_SYNTAX([Missing AT@&t@_CLEANUP], [[AT_INIT([incomplete test suite]) AT_SETUP([only test]) AT_CHECK([:]) ]], [missing AT@&t@_CLEANUP detected]) AT_CHECK_AT_SYNTAX([AT@&t@_FAIL_IF without AT@&t@_SETUP], [[AT_INIT([incomplete test suite]) AT_FAIL_IF([:]) ]], [AT@&t@_FAIL_IF: missing AT@&t@_SETUP detected]) AT_CHECK_AT_SYNTAX([AT@&t@_SKIP_IF without AT@&t@_SETUP], [[AT_INIT([incomplete test suite]) AT_SKIP_IF([:]) ]], [AT@&t@_SKIP_IF: missing AT@&t@_SETUP detected]) AT_CHECK_AT_SYNTAX([AT@&t@_CHECK without AT@&t@_SETUP], [[AT_INIT([incomplete test suite]) AT_CHECK([:]) ]], [AT@&t@_CHECK: missing AT@&t@_SETUP detected]) AT_CHECK_AT_SYNTAX([AT@&t@_DATA without AT@&t@_SETUP], [[AT_INIT([incomplete test suite]) AT_DATA([file]) ]], [AT@&t@_DATA: missing AT@&t@_SETUP detected]) AT_CHECK_AT_SYNTAX([AT@&t@_XFAIL_IF without AT@&t@_SETUP], [[AT_INIT([incomplete test suite]) AT_XFAIL_IF([:]) ]], [AT@&t@_XFAIL_IF: missing AT@&t@_SETUP detected]) AT_CHECK_AT_SYNTAX([AT@&t@_KEYWORDS without AT@&t@_SETUP], [[AT_INIT([incomplete test suite]) AT_KEYWORDS([keyword]) ]], [AT@&t@_KEYWORDS: missing AT@&t@_SETUP detected]) AT_CHECK_AT_SYNTAX([AT@&t@_CLEANUP without AT@&t@_SETUP], [[AT_INIT([incomplete test suite]) AT_CLEANUP ]], [AT@&t@_CLEANUP: missing AT@&t@_SETUP detected]) AT_CHECK_AT_SYNTAX([AT@&t@_BANNER inside AT@&t@_SETUP], [[AT_INIT([incomplete test suite]) AT_SETUP([only test]) AT_BANNER([banner]) AT_CHECK([:]) AT_CLEANUP ]], [AT@&t@_BANNER: nested AT@&t@_SETUP detected]) AT_CHECK_AT_SYNTAX([AT@&t@_SETUP inside AT@&t@_SETUP], [[AT_INIT([incomplete test suite]) AT_SETUP([only test]) AT_SETUP([nested test]) AT_CHECK([:]) AT_CLEANUP AT_CHECK([:]) AT_CLEANUP ]], [AT@&t@_SETUP: nested AT@&t@_SETUP detected]) AT_CHECK_AT_SYNTAX([Multiple AT@&t@_INIT], [[AT_INIT([[suite, take one]]) AT_INIT([repeat]) ]], [AT@&t@_INIT: invoked multiple times]) # Check for tested programs. autoconf should only appear once. AT_CHECK_AT([Tested programs], [[AT_INIT([programs test suite]) AT_TESTED([autoconf autom4te]) AT_TESTED([autoconf]) ]], [], [], [], [], [], [AT_CHECK([[sed -n 's|.*/\([^ /]* --version\)|\1|p' micro-suite.log]], [], [[autoconf --version autom4te --version ]])]) AT_CHECK_AT([Startup error messages], [[AT_INIT([[suite]]) AT_SETUP([only test]) AT_CHECK([:]) AT_CLEANUP ]], [], [], [], [], [], [AT_CHECK([sed -n '/exec AS_MESSAGE_LOG_FD/q; />&AS_MESSAGE_LOG_FD/p' < micro-suite])]) ## ----------------- ## ## Status handling. ## ## ----------------- ## AT_CHECK_AT_TEST([Truth], [AT_CHECK([:], 0, [], [])]) AT_CHECK_AT_TEST([Fallacy], [AT_CHECK([false], [], [], [])], [], [1], [], [ignore], [], [AT_CHECK([grep failed micro-suite.log], [], [ignore])]) AT_CHECK_AT_TEST([Skip], [AT_CHECK([echo output; echo irrelevant >&2; exit 77], 0, [mismatch], [])], [], [], [], [], [], [AT_CHECK([grep skipped micro-suite.log], [], [ignore])]) AT_CHECK_AT_TEST([Hard fail], [AT_CHECK([exit 99]) AT_CLEANUP AT_SETUP([another test]) AT_XFAIL_IF([:]) AT_CHECK([exit 99])], [], [1], [], [ignore], [], [AT_CHECK([grep '2 failed unexpectedly' micro-suite.log], [], [ignore]) AT_CHECK([grep ok micro-suite.log], [1])]) AT_CHECK_AT_TEST([AT@&t@_FAIL_IF], [AT_FAIL_IF([:]) AT_CLEANUP AT_SETUP AT_FAIL_IF([false]) AT_CLEANUP AT_SETUP AT_FAIL_IF([test x = y]) AT_CLEANUP AT_SETUP AT_FAIL_IF([bah]) AT_CLEANUP AT_SETUP AT_FAIL_IF([test x = x]) AT_CLEANUP AT_SETUP AT_FAIL_IF([test $foo = x])], [], [1], [stdout], [ignore], [], [AT_CHECK([grep '1 5 failed' stdout], [], [ignore], [ignore])]) AT_CHECK_AT_TEST([AT@&t@_SKIP_IF], [AT_SKIP_IF([:]) AT_CLEANUP AT_SETUP AT_SKIP_IF([false]) AT_CLEANUP AT_SETUP AT_SKIP_IF([test x = y]) AT_CLEANUP AT_SETUP AT_SKIP_IF([bah]) AT_CLEANUP AT_SETUP AT_SKIP_IF([test x = x]) AT_CLEANUP AT_SETUP AT_SKIP_IF([test $foo = x])], [], [], [], [], [], [AT_CHECK([grep '2.*skipped' micro-suite.log], [], [ignore], [ignore])]) AT_CHECK_AT_TEST([Syntax error], [AT_CHECK([:]) AT_CLEANUP AT_SETUP([syntax]) AT_CHECK([if]) AT_CLEANUP AT_SETUP([another test]) AT_CHECK([:])], [], [0], [], [], [], [dnl Until we can find a way to avoid catastrophic failure (ash) or dnl lack of failure (zsh), skip the rest of this test on such shells. echo 'if' > syntax AT_CHECK([${CONFIG_SHELL-$SHELL} -c 'case `. ./syntax; echo $?` in 0|"") exit 77;; esac'], [0], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite], [1], [ignore], [stderr]) AT_CHECK([grep "unable to parse test group: 2" stderr], [0], [ignore])], [1 3]) AT_CHECK_AT_TEST([errexit], [AT_CHECK([false]) AT_CLEANUP AT_SETUP([test that should not be run]) AT_CHECK([:])], [], [1], [stdout], [stderr], [], [AT_CHECK([test -f micro-suite.log], [1]) touch micro-suite.log # shut up AT_CAPTURE_FILE. AT_CHECK([grep "should not be run" stdout], [1]) AT_CHECK([grep "1 .* inhibited subsequent" stderr], [], [ignore])], [--errexit]) AT_CHECK_AT_TEST([unquoted output], [m4_define([backtick], [`]) a=a AT_CHECK_UNQUOTED([echo 'a"b backtick`'], [], [${a}"`echo 'b '`\`\backtick]m4_newline)], [], [], [], [], [AT_KEYWORDS([AT@&t@_CHECK_UNQUOTED])]) AT_CHECK_AT([Logging], [[AT_INIT([artificial test suite]) dnl intentionally write failing tests, to see what gets logged AT_SETUP([one]) AT_CHECK([echo magicstring01], [1], [ignore]) AT_CLEANUP AT_SETUP([two]) AT_CHECK([echo magicstring02 >&2], [1], [], [ignore]) AT_CLEANUP AT_SETUP([three]) AT_CHECK([echo magicstring03], [1], [ignore-nolog]) AT_CLEANUP AT_SETUP([four]) AT_CHECK([echo magicstring04 >&2], [1], [], [ignore-nolog]) AT_CLEANUP AT_SETUP([five]) AT_CHECK([echo magicstring05], [1], [stdout]) AT_CLEANUP AT_SETUP([six]) AT_CHECK([echo magicstring06 >&2], [1], [], [stderr]) AT_CLEANUP AT_SETUP([seven]) AT_CHECK([echo magicstring07], [1], [stdout-nolog]) AT_CLEANUP AT_SETUP([eight]) AT_CHECK([echo magicstring08 >&2], [1], [], [stderr-nolog]) AT_CLEANUP AT_SETUP([nine]) echo magicstring09 > expout AT_CHECK([echo magicstring09], [1], [expout]) AT_CLEANUP AT_SETUP([ten]) echo magicstring10 > experr AT_CHECK([echo magicstring10 >&2], [1], [], [experr]) AT_CLEANUP ]], [], [1], [], [ignore], [], [AT_CHECK([$CONFIG_SHELL ./micro-suite], [1], [ignore-nolog], [ignore-nolog]) AT_CHECK([grep '^magicstring' micro-suite.log], [], [[magicstring01 magicstring02 magicstring05 magicstring06 ]])]) AT_CHECK_AT([Binary output], [[AT_INIT([artificial test suite]) AT_SETUP([pass: no trailing newline]) AT_CHECK([printf short], [0], [stdout-nolog]) AT_CHECK([cat stdout], [0], [[short]]) AT_CLEANUP AT_SETUP([pass: non-printing characters]) AT_CHECK([printf '\1\n' >&2], [0], [], [stderr-nolog]) printf '\1\n' > expout AT_CHECK([cat stderr], [0], [expout]) AT_CLEANUP AT_SETUP([pass: long lines]) # 5000 bytes in str str=.......... str=$str$str$str$str$str$str$str$str$str$str str=$str$str$str$str$str$str$str$str$str$str str=$str$str$str$str$str AT_CHECK_UNQUOTED([echo $str], [0], [[$str]m4_newline]) AT_CLEANUP AT_SETUP([fail: no trailing newline]) AT_CHECK([printf short], [0], [stdout-nolog]) AT_CHECK([cat stdout], [0], [[long]]) AT_CLEANUP AT_SETUP([fail: non-printing characters]) AT_CHECK([printf '\1\n' >&2], [0], [], [stderr-nolog]) printf '\2\n' > expout AT_CHECK([cat stderr], [0], [expout]) AT_CLEANUP AT_SETUP([fail: long lines]) # 5000 bytes in str str=.......... str=$str$str$str$str$str$str$str$str$str$str str=$str$str$str$str$str$str$str$str$str$str str=$str$str$str$str$str AT_CHECK_UNQUOTED([echo x$str], [0], [[${str}x]m4_newline]) AT_CLEANUP ]], [], [0], [], [], [], [AT_CHECK([$CONFIG_SHELL ./micro-suite 4], [1], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite 5], [1], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite 6], [1], [ignore], [ignore])], [1-3]) AT_CHECK_AT_TEST([Cleanup], [AT_CHECK([test ! -f cleanup.success && test ! -f cleanup.failure]) AT_CHECK_UNQUOTED([exit $value], [ignore], [$output], [], [touch cleanup.failure], [touch cleanup.success])], [], [], [], [], [AT_KEYWORDS([AT@&t@_CHECK_UNQUOTED]) output=; export output], [AT_CHECK([test -d micro-suite.dir/1]) AT_CHECK([test -f micro-suite.dir/1/cleanup.success]) AT_CHECK([test ! -f micro-suite.dir/1/cleanup.failure]) AT_CHECK([$CONFIG_SHELL ./micro-suite -d value=1], [], [ignore]) AT_CHECK([test -f micro-suite.dir/1/cleanup.success]) AT_CHECK([test ! -f micro-suite.dir/1/cleanup.failure]) AT_CHECK([$CONFIG_SHELL ./micro-suite -d value=1 output=mismatch], [1], [ignore], [ignore]) AT_CHECK([test ! -f micro-suite.dir/1/cleanup.success]) AT_CHECK([test -f micro-suite.dir/1/cleanup.failure]) AT_CHECK([$CONFIG_SHELL ./micro-suite -d value=77], [], [ignore]) AT_CHECK([test ! -f micro-suite.dir/1/cleanup.success]) AT_CHECK([test ! -f micro-suite.dir/1/cleanup.failure]) AT_CHECK([$CONFIG_SHELL ./micro-suite -d value=99], [1], [ignore], [ignore]) AT_CHECK([test ! -f micro-suite.dir/1/cleanup.success]) AT_CHECK([test ! -f micro-suite.dir/1/cleanup.failure]) ], [-d value=0]) ## ----------------------------------------------------- ## ## Newlines and command substitutions in test commands. ## ## ----------------------------------------------------- ## AT_CHECK_AT_TEST([Literal multiline command], [AT_CHECK([echo Auto' 'conf], 0, [Auto conf ], [])]) AT_CHECK_AT_TEST([Multiline parameter expansion], [FOO='one two' AT_CHECK([echo "$FOO"], 0, [one two ], [])]) AT_CHECK_AT_TEST([Backquote command substitution], [AT_CHECK([echo `echo hi`], 0, [hi ], [])]) AT_CHECK_AT_TEST([Multiline backquote command substitution], [AT_DATA([myfile],[foo bar ]) AT_CHECK([echo "`cat myfile`"], 0, [foo bar ], [])]) AT_CHECK_AT_TEST([Parenthetical command substitution], [AT_CHECK([echo $(echo hi)], 0, [hi ], [])], [AT_NO_CMDSUBST]) AT_CHECK_AT_TEST([Multiline parenthetical command substitution], [AT_DATA([myfile],[foo bar ]) AT_CHECK([echo "$(cat myfile)"], 0, [foo bar ], [])], [AT_NO_CMDSUBST]) AT_CHECK_AT_TEST([Shell comment in command], [my_echo=echo AT_CHECK([$my_echo one [#] two], [], [one ])]) ## ------------------------- ## ## ${...} in test commands. ## ## ------------------------- ## # If this invalid parameter expansion capsizes the test suite, the entire # AT_SETUP ... AT_CLEANUP subshell will exit, and the commands it runs will # appear to have succeeded. Therefore, we verify a failing test case. AT_CHECK_AT_TEST([Invalid brace-enclosed parameter expansion], [AT_CHECK([echo '${=invalid}'], 0, [wrong])], [false], 1, ignore, ignore) ## ---------------------------- ## ## M4 macros in test commands. ## ## ---------------------------- ## AT_CHECK_AT_TEST([Multiline command from M4 expansion], [m4_define([GNU], ['foo bar']) AT_CHECK([echo GNU], 0, [foo bar ], [])]) AT_CHECK_AT_TEST([Double-M4-quoted command], [m4_define([GNU], ['foo bar']) AT_CHECK([[echo GNU]], 0, [[GNU ]], [])]) AT_CHECK_AT_TEST([Metacharacters in command from M4 expansion], [m4_define([GNU], [\"`]) AT_CHECK([echo '\"`' [GNU] 'GNU'], 0, [GNU [G][NU] [\"` ]], [])]) ## -------------------------------------- ## ## Backslash- in test commands. ## ## -------------------------------------- ## AT_CHECK_AT_TEST([BS-newline in command], [AT_CHECK([echo Auto"\ "conf], 0, [Autoconf ], [])]) AT_CHECK_AT_TEST([^BS-newline in command], [AT_CHECK([\ echo GNU], 0, [GNU ], [])]) AT_CHECK_AT_TEST([BSx641-newline in command], [AT_CHECK([printf '%s\n' Auto"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ "conf], 0, [Auto\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\conf ], [])]) AT_CHECK_AT_TEST([BS-BS-newline in command], [AT_CHECK([printf '%s\n' Auto"\\ "conf], 0, [Auto\ conf ], [])]) # A `^BS-BS-newline in command' test will run a command named `\'. No, thanks. AT_CHECK_AT_TEST([BSx640-newline in command], [AT_CHECK([printf '%s\n' Auto"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ "conf], 0, [Auto\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ conf ], [])]) # This command has both escaped and unescaped newlines. AT_CHECK_AT_TEST([Newline-CODE-BS-newline in command], [AT_CHECK([printf '%s\n' Auto' 'co\ nf], 0, [Auto conf ], [])]) AT_CHECK_AT_TEST([Single-quote-BS-newline in command], [AT_CHECK([printf '%s\n' Auto'\ 'conf], 0, [Auto\ conf ], [])]) AT_CHECK_AT_TEST([Single-quote-newline-BS-newline in command], [AT_CHECK([printf '%s\n' Auto' \ 'conf], 0, [Auto \ conf ], [])]) ## ----------------- ## ## Input from stdin. ## ## ----------------- ## AT_SETUP([Input from stdin]) AT_CHECK_AT_PREP([micro-suite], [[AT_INIT AT_SETUP([please enter hello]) AT_CHECK([cat], [], [hello ]) AT_CLEANUP ]]) AT_CHECK([echo hello | $CONFIG_SHELL ./micro-suite], [], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite @], [@:>@]) AT_CHECK_AT_TITLE_CHAR([Quoted pound], [[#]], [#]) AT_CHECK_AT_TITLE_CHAR([Pound], [#]) AT_CHECK_AT_TITLE_CHAR([Quoted comma], [[,]], [,]) AT_CHECK_AT_TITLE_CHAR([Comma], [,]) dnl this test also hits quadrigraphs for () AT_CHECK_AT_TITLE_CHAR([Parentheses], [(@{:@)@:}@], [(())]) AT_CHECK_AT_TITLE_CHAR([Left paren], [[(]], [(]) AT_CHECK_AT_TITLE_CHAR([Right paren], [[)]], [)]) AT_CHECK_AT_TITLE_CHAR([Quoted Macro], [[macro_name]], [macro_name]) AT_CHECK_AT_TITLE_CHAR([Macro], [macro_name], [macro_expanded]) AT_CHECK_AT_TITLE_CHAR([Macro with backquote], [macro_backquote], [`]) AT_CHECK_AT_TITLE_CHAR([Macro with single-quote], [macro_single_quote], [']) AT_CHECK_AT_TITLE_CHAR([Macro with double-quote], [macro_double_quote], ["]) dnl restore font-lock: " AT_CHECK_AT_TITLE_CHAR([Macro with backslash], [macro_backslash], [\]) AT_CHECK_AT_TITLE_CHAR([Macro echoing macro], [macro_echo([macro_name])], [macro_expanded]) AT_CHECK_AT_TITLE_CHAR([Macro echoing single-quote], [macro_echo(['])], [']) AT_CHECK_AT_TITLE_CHAR([Long test title], [0123456789012345678901234567890123]) AT_CHECK_AT_TITLE_CHAR([Longer test title], [01234567890123456789012345678901234], [], [], [54]) ## ----------------------- ## ## Long test source lines. ## ## ----------------------- ## # Create a test file that has more than 99 words in a line, for Solaris awk. # While at that, try out the limit of 2000 bytes in a text file line. AT_CHECK_AT_TEST([Long test source lines], [m4_for([nnn], [1], [999], [], [: ]) AT_CHECK([:]) ], [], [], [], [ignore], [], [AT_CHECK([$CONFIG_SHELL ./micro-suite -k skipalltests], [], [ignore], [ignore]) ]) ## ----------------- ## ## Debugging a test. ## ## ----------------- ## AT_CHECK_AT_TEST([Debugging a successful test], [AT_CHECK([:])], [], [], [], [ignore], [], [# Without options, when all tests pass, no test directory should exist. AT_CHECK([test -d micro-suite.dir/1 && exit 42 $CONFIG_SHELL ./micro-suite -d 1], [], [ignore], [ignore]) # Running with -d should leave a reproducible test group. # Also, running the test script from the test group locks the # directory from removal on some platforms; the script should still be # able to run even if rmdir fails. AT_CHECK([(cd micro-suite.dir/1 && ./run)], [], [ignore], [ignore]) # Running a debugging script implies -d. AT_CHECK([(cd micro-suite.dir/1 && ./run)], [], [ignore], [ignore]) ]) AT_CHECK_AT_TEST([Debugging script and environment], [AT_CHECK([test "$MY_VAR" = pass || exit 42])], [], [1], [], [ignore], [], [ # Changing environment outside of debugging script is not preserved. AT_CHECK([(cd micro-suite.dir/1 && MY_VAR=pass ./run)], [0], [ignore], [ignore]) AT_CHECK([(cd micro-suite.dir/1 && ./run)], [1], [ignore], [ignore]) # Changing environment as argument to debugging script is preserved. AT_CHECK([(cd micro-suite.dir/1; ./run MY_VAR=pass)], [0], [ignore], [ignore]) AT_CHECK([(cd micro-suite.dir/1; ./run)], [0], [ignore], [ignore]) ]) # The run script must still be valid when shell metacharacters are passed # in via an environment option. AT_CHECK_AT_TEST([Debugging a failed test], [AT_CHECK([test "$MY_VAR" = "one space" || exit 42])], [], [1], [], [ignore], [], [ AT_CHECK([(cd micro-suite.dir/1 && ./run MY_VAR='two spaces')], [1], [ignore], [ignore]) AT_CHECK([(cd micro-suite.dir/1 && ./run MY_VAR='one space')], [0], [ignore], [ignore]) ]) # Setting default variable values via atlocal. AT_CHECK_AT_TEST([Using atlocal], [AT_CHECK([test "x$MY_VAR" = "xodd; 'string" || exit 42])], [], [1], [ignore], [ignore], [], [ dnl check that command line can set variable AT_CHECK([$CONFIG_SHELL ./micro-suite MY_VAR="odd; 'string"], [0], [ignore]) dnl check that command line overrides environment AT_CHECK([MY_VAR="odd; 'string" $CONFIG_SHELL ./micro-suite MY_VAR=unset], [1], [ignore], [ignore]) dnl check that atlocal can give it a default AT_CHECK([cat <atlocal MY_VAR="odd; 'string" export MY_VAR dnl Also populate enough of atlocal to do what atconfig normally does. at_testdir=. abs_builddir='`pwd`' at_srcdir=. abs_srcdir='`pwd`' at_top_srcdir=. abs_top_srcdir='`pwd`' at_top_build_prefix= abs_top_builddir='`pwd`' EOF ]) AT_CHECK([$CONFIG_SHELL ./micro-suite], [0], [ignore]) dnl check that atlocal overrides environment AT_CHECK([MY_VAR=unset $CONFIG_SHELL ./micro-suite], [0], [ignore]) dnl check that command line overrides atlocal AT_CHECK([$CONFIG_SHELL ./micro-suite MY_VAR=], [1], [ignore], [ignore]) dnl check that syntax error is detected AT_CHECK([$CONFIG_SHELL ./micro-suite =], [1], [], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite 1=2], [1], [], [ignore], [ignore]) ]) # Controlling where the testsuite is run. AT_CHECK_AT_TEST([Choosing where testsuite is run], [AT_CHECK([:])], [], [], [], [], [], [ dnl AT_CHECK_AT_TEST tests the default of running in `.'. AT_CHECK([$CONFIG_SHELL ./micro-suite --clean]) AT_CHECK([test -f micro-suite.log], [1]) AT_CHECK([test -d micro-suite.dir], [1]) AT_CHECK([mkdir sub1 sub2]) dnl check specifying a different relative path to run in. AT_CHECK([$CONFIG_SHELL ./micro-suite -C sub1], [0], [ignore], []) AT_CHECK([test -f micro-suite.log], [1]) AT_CHECK([test -f sub1/micro-suite.log], [0]) AT_CHECK([test -d micro-suite.dir], [1]) AT_CHECK([test -d sub1/micro-suite.dir], [0]) AT_CHECK([$CONFIG_SHELL ./micro-suite -C sub1 --clean]) AT_CHECK([test -f sub1/micro-suite.log], [1]) AT_CHECK([test -d sub1/micro-suite.dir], [1]) dnl check specifying an absolute path to run in. AT_CHECK([$CONFIG_SHELL ./micro-suite --directory="`pwd`/sub2"], [0], [ignore], []) AT_CHECK([test -f micro-suite.log], [1]) AT_CHECK([test -f sub2/micro-suite.log], [0]) AT_CHECK([$CONFIG_SHELL ./micro-suite --clean --directory="`pwd`/sub2"]) AT_CHECK([test -f sub2/micro-suite.log], [1]) AT_CHECK([test -f sub2/micro-suite.dir], [1]) dnl check for failure detection with bad, missing, or empty directory. AT_CHECK([$CONFIG_SHELL ./micro-suite -C nonesuch || exit 1], [1], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite -C ''], [1], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite -C - || exit 1], [1], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite -C], [1], [ignore], [ignore]) dnl check that --help overrides bad directory selection. AT_CHECK([$CONFIG_SHELL ./micro-suite -C nonesuch --help], [0], [ignore], []) ]) ## -------- ## ## Banners. ## ## -------- ## AT_SETUP([Banners]) AT_CHECK_AT_PREP([b], [[AT_INIT AT_SETUP(zero)# 1 AT_CHECK(:) AT_CLEANUP AT_BANNER([first]) AT_SETUP(one a)# 2 AT_CHECK(:) AT_CLEANUP AT_SETUP(one b)# 3 AT_CHECK(:) AT_CLEANUP AT_BANNER() AT_SETUP(two)# 4 AT_CHECK(:) AT_CLEANUP AT_BANNER([second]) AT_SETUP(three a)# 5 AT_CHECK(:) AT_CLEANUP AT_SETUP(three b)# 6 AT_CHECK(:) AT_CLEANUP ]]) # AT_CHECK_BANNERS(TESTSUITE-OPTIONS, PATTERN1, COUNT1, PATTERN2, COUNT2) m4_define([AT_CHECK_BANNERS], [AT_CHECK([$CONFIG_SHELL ./b $1], [], [stdout]) AT_CHECK_EGREP([$2], m4_if([$3], [0], [1], [0]), [$3]) AT_CHECK_EGREP([$4], m4_if([$5], [0], [1], [0]), [$5]) ]) AT_CHECK_BANNERS([], [first], [1], [second], [1]) AT_CHECK_BANNERS([-k zero], [first], [0], [second], [0]) AT_CHECK_BANNERS([1], [first], [0], [second], [0]) AT_CHECK_BANNERS([-2], [first], [1], [second], [0]) AT_CHECK_BANNERS([-3], [first], [1], [second], [0]) AT_CHECK_BANNERS([-k one], [first], [1], [second], [0]) AT_CHECK_BANNERS([3-4], [first], [1], [second], [0]) AT_CHECK_BANNERS([3-5], [first], [1], [second], [1]) AT_CHECK_BANNERS([4-5], [first], [0], [second], [1]) AT_CHECK_BANNERS([3-], [first], [1], [second], [1]) AT_CHECK_BANNERS([-k a], [first], [1], [second], [1]) AT_CHECK_BANNERS([4], [first], [0], [second], [0]) AT_CHECK_BANNERS([4-], [first], [0], [second], [1]) AT_CHECK_BANNERS([-k two], [first], [0], [second], [0]) AT_CHECK_BANNERS([1 4], [first], [0], [second], [0]) AT_CHECK_BANNERS([-k three], [first], [0], [second], [1]) AT_CHECK_BANNERS([5], [first], [0], [second], [0]) AT_CHECK_BANNERS([5-], [first], [0], [second], [1]) AT_CLEANUP ## --------- ## ## Keywords. ## ## --------- ## AT_SETUP([Keywords and ranges]) AT_CHECK_AT_PREP([k], [[AT_INIT AT_SETUP(none) # 01 AT_CHECK(:) AT_CLEANUP AT_SETUP(first) # 02 AT_KEYWORDS(key1) AT_CHECK(:) AT_CLEANUP AT_SETUP(second) # 03 AT_KEYWORDS(key2) AT_CHECK(:) AT_CLEANUP AT_SETUP(both) # 04 AT_KEYWORDS([key1 key2]) AT_KEYWORDS([m4_echo([Key1])]) AT_CHECK(:) AT_CLEANUP AT_SETUP(test5) # 05 AT_CHECK(:) AT_CLEANUP AT_SETUP(test6) # 06 AT_CHECK(:) AT_CLEANUP AT_SETUP(test7) # 07 AT_CHECK(:) AT_CLEANUP AT_SETUP(test8) # 08 AT_CHECK(:) AT_CLEANUP AT_SETUP(test9) # 09 AT_CHECK(:) AT_CLEANUP AT_SETUP(test10) # 10 AT_CHECK(:) AT_CLEANUP ]]) dnl check that AT_KEYWORDS does not duplicate words AT_CHECK([grep -i 'key1.*key1' k], [1]) dnl check that -k requires an argument AT_CHECK([$CONFIG_SHELL ./k -k], [1], [], [ignore]) # AT_CHECK_KEYS(TESTSUITE-OPTIONS, PATTERN1, COUNT1, PATTERN2, COUNT2) m4_define([AT_CHECK_KEYS], [AT_CHECK([$CONFIG_SHELL ./k $1], 0, [stdout]) AT_CHECK_EGREP([$2], 0, [$3]) AT_CHECK_EGREP([$4], 1, [$5]) ]) AT_CHECK_KEYS([-k key1], [first|both], [2], [none|second], [0]) AT_CHECK_KEYS([-k key2], [second|both], [2], [none|first], [0]) AT_CHECK_KEYS([-k key1,key2], [both], [1], [none|first|second], [0]) AT_CHECK_KEYS([-k key1 -k key2], [first|second|both], [3], [none], [0]) AT_CHECK_KEYS([-k '!key1'], [none|second], [2], [first|both], [0]) AT_CHECK_KEYS([-k '!key2'], [none|first], [2], [second|both], [0]) AT_CHECK_KEYS([-k '!key1,key2'], [second], [1], [none|first|both], [0]) AT_CHECK_KEYS([-k 'key1,!key2'], [first], [1], [none|second|both], [0]) AT_CHECK_KEYS([-k '!key1,!key2'], [none], [1], [first|second|both], [0]) AT_CHECK_KEYS([-k '!key1' -k KEY2], [none|second|both], [3], [first], [0]) AT_CHECK_KEYS([-k key1 -k '!key2'], [none|first|both], [3], [second], [0]) AT_CHECK_KEYS([-k '!KEY1' -k '!key2'], [none|first|second], [3], [both], [0]) AT_CHECK_KEYS([-k none], [none], [1], [first|second|both], [0]) AT_CHECK_KEYS([-k key1,both], [both], [1], [none|first|second], [0]) AT_CHECK_KEYS([-k key1 -k both], [first|both], [2], [none|second], [0]) AT_CHECK_KEYS([-k none,first], [successful], [1], [none|first|second|both], [0]) AT_CHECK_KEYS([-k none,first,second,both], [successful], [1], [none|first|second|both], [0]) AT_CHECK_KEYS([-k !none,first], [first], [1], [none|second|both], [0]) AT_CHECK_KEYS([-k '.*eco.*'], [second], [1], [none|first|both], [0]) AT_CHECK_KEYS([-k 'ECO'], [successful], [1], [none|first|second|both], [0]) AT_CHECK_KEYS([-k '.*eco'], [successful], [1], [none|first|second|both], [0]) AT_CHECK_KEYS([-k 'eco.*'], [successful], [1], [none|first|second|both], [0]) AT_CHECK_KEYS([-k 'fir.*'], [first], [1], [none|second|both], [0]) AT_CHECK_KEYS([1-2], [none|first], [2], [second|both], [0]) AT_CHECK_KEYS([01-002 08], [none|first], [2], [second|both], [0]) AT_CHECK_KEYS([1-3 2-1], [none|first|second], [3], [both], [0]) AT_CHECK_KEYS([-3], [none|first|second], [3], [both], [0]) AT_CHECK_KEYS([4-], [both], [1], [none|first|second], [0]) AT_CHECK_KEYS([010], [test10], [1], [none|first|second|both], [0]) AT_CHECK_KEYS([-k second 4-], [second|both], [2], [none|first], [0]) AT_CHECK([$CONFIG_SHELL ./k 0], [1], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./k 0-], [1], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./k -0], [1], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./k 11], [1], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./k 11-], [1], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./k 1-011], [1], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./k -k nonexistent], [0], [ignore]) AT_CHECK_KEYS([--list -k nonexistent], [KEYWORDS], [1], [first|second|both], [0]) AT_CHECK_KEYS([--list 1], [none], [1], [first|second|both], [0]) AT_CHECK_KEYS([--list 01], [none], [1], [first|second|both], [0]) AT_CHECK_KEYS([--list -k none -k first], [none|first], [2], [second|both], [0]) AT_CLEANUP ## ----------------- ## ## Keyword wrapping. ## ## ----------------- ## AT_SETUP([Keyword wrapping]) AT_CHECK_AT_PREP([k], [[AT_INIT AT_SETUP([test]) AT_KEYWORDS([a1 b1 c1 d1 e1 f1 g1 h1 i1 j1 k1 l1 m1 n1 o1 p1 q1 r1 s1 t1]) AT_KEYWORDS([u1 v1 w1 x1 y1 z1]) AT_KEYWORDS([a b c d e f g h i j k l m n o p q r s t u v w x y z]) AT_CLEANUP AT_SETUP([test with long keywords]) AT_KEYWORDS( [this-is-a-long-keyword-that-cannot-be-wrapped-so-we-exceed-the-length-limit-here]) # surrounded by short ones AT_KEYWORDS([s]) AT_KEYWORDS( [another-very-long-keyword-that-hits-the-line-length-limit-bla-bla-bla-bla]) AT_KEYWORDS([t]) AT_CLEANUP ]]) AT_CHECK_KEYS([-l], [.{80}], [1], [.{87}], [0]) AT_CLEANUP m4_define([AT_SKIP_PARALLEL_TESTS], [# Per BUGS, we have not yet figured out how to run parallel tests cleanly # under dash and some ksh variants. For now, only run this test under # limited conditions; help is appreciated in widening this test base. AT_SKIP_IF([${CONFIG_SHELL-$SHELL} -c 'test -z "${BASH_VERSION+set}]]dnl [[${ZSH_VERSION+set}${TEST_PARALLEL_AUTOTEST+set}"']) # The parallel scheduler requires mkfifo and job control to work. AT_CHECK([mkfifo fifo || exit 77]) AT_CHECK([${CONFIG_SHELL-$SHELL} -c '(set -m && set +m) || exit 77'], [], [], [ignore]) ]) ## ----------------------- ## ## parallel test execution ## ## ----------------------- ## AT_SETUP([parallel test execution]) # This test tries to ensure that -j runs tests in parallel. # Such a test is inherently racy, because there are no real-time # guarantees about scheduling delays. So we try to minimize # the chance to lose the race. # The time needed for a micro-suite consisting of NTESTS tests each # sleeping for a second is estimated by # startup + ntests * (serial_overhead + 1 / njobs) # # in absence of major scheduling delays. This leads to side conditions: # - NTESTS should be high, so the STARTUP time is small compared to the # test run time, and scheduling delays can even out; it should not be # too high, to not slow down the testsuite unnecessarily, # - the number of concurrent jobs NJOBS should not be too low, so the # race is not lost so easily; it should not be too high, to avoid fork # failures on tightly limited systems. 4 seems a good compromise # here, considering that Autotest spawns several other processes. # - STARTUP is assumed to be the same for parallel and serial runs, so # the latter can estimate the former. # - To avoid unportable output from time measurement commands, spawn # both a parallel and a serial testsuite run; check that the former # completes before the latter has completed a fraction SERIAL_NTESTS # of the tests (the serial run is executed in a subdirectory), plus # some additional time to allow for compensation of SERIAL_OVERHEAD. # - when adding this time to the serial test execution, an initial delay # SERIAL_DELAY of the serial test helps to avoid unreliable scheduling # due to the startup burst of the suites. dnl total number of tests. m4_define([AT_PARALLEL_NTESTS], [16]) dnl number of jobs to run in parallel. m4_define([AT_PARALLEL_NJOBS], [4]) dnl number of tests to run serially, as comparison. m4_define([AT_PARALLEL_SERIAL_NTESTS], m4_eval(AT_PARALLEL_NTESTS / AT_PARALLEL_NJOBS)) dnl initial delay of serial run, to compensate for SERIAL_OVERHEAD. dnl This corresponds to 0.67 s of overhead per test. m4_define([AT_PARALLEL_SERIAL_DELAY], m4_eval((AT_PARALLEL_NTESTS - AT_PARALLEL_SERIAL_NTESTS + 1) * 2 / 3)) AT_CHECK_AT_PREP([micro-suite], [[AT_INIT([suite to test parallel execution]) m4_for([count], [1], ]]AT_PARALLEL_NTESTS[[, [], [AT_SETUP([test number count]) AT_CHECK([sleep 1]) AT_CLEANUP ]) ]]) # Even if parallel jobs are not supported, the command line must work. AT_CHECK([$CONFIG_SHELL ./micro-suite --help | grep " --jobs"], [0], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite -j2foo], [1], [], [stderr]) AT_CHECK([grep 'non-numeric argument' stderr], [], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite --jobs=foo], [1], [], [stderr]) AT_CHECK([grep 'non-numeric argument' stderr], [], [ignore]) AT_SKIP_PARALLEL_TESTS # Ensure that all tests run, and lines are not split. AT_CHECK([$CONFIG_SHELL ./micro-suite -j[]AT_PARALLEL_NJOBS], [], [stdout]) AT_CHECK([grep -c '^.\{53\}ok' stdout], [], [AT_PARALLEL_NTESTS ]) # Running one test with -j should produce correctly formatted output: AT_CHECK([$CONFIG_SHELL ./micro-suite -j 3], [], [stdout]) AT_CHECK([grep -c '^.\{53\}ok' stdout], [], [1 ]) # Specifying more jobs than tests should not hang: AT_CHECK([$CONFIG_SHELL ./micro-suite -j3 3], [], [stdout]) AT_CHECK([grep -c '^.\{53\}ok' stdout], [], [1 ]) # Not even with zero tests: AT_CHECK([$CONFIG_SHELL ./micro-suite -j -k nomatch], [], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite -j3 -k nomatch], [], [ignore]) mkdir serial # Unfortunately, the return value of wait is unreliable, # so we check that kill fails. AT_CHECK([$CONFIG_SHELL ./micro-suite --jobs=[]AT_PARALLEL_NJOBS & ]dnl [sleep AT_PARALLEL_SERIAL_DELAY && ]dnl [cd serial && $CONFIG_SHELL ../micro-suite -AT_PARALLEL_SERIAL_NTESTS >/dev/null && ]dnl [{ kill $! && exit 1; :; }], [], [stdout], [ignore]) AT_CHECK([grep -c '^.\{53\}ok' stdout], [], [AT_PARALLEL_NTESTS ]) AT_CHECK([grep 'AT_PARALLEL_NTESTS tests' stdout], [], [ignore]) AT_CLEANUP AT_CHECK_AT_TEST([parallel truth], [AT_CHECK([:], 0, [], [])], [], [], [], [], [AT_SKIP_PARALLEL_TESTS], [], [-j]) AT_CHECK_AT_TEST([parallel fallacy], [AT_CHECK([false], [], [], [])], [], [1], [], [ignore], [AT_SKIP_PARALLEL_TESTS], [AT_CHECK([grep failed micro-suite.log], [], [ignore])], [-j]) AT_CHECK_AT_TEST([parallel skip], [AT_CHECK([echo output; echo irrelevant >&2; exit 77], 0, [mismatch], [])], [], [], [], [], [AT_SKIP_PARALLEL_TESTS], [AT_CHECK([grep skipped micro-suite.log], [], [ignore])], [-j]) AT_CHECK_AT_TEST([parallel syntax error], [AT_CHECK([:]) AT_CLEANUP AT_SETUP([syntax]) AT_CHECK([if]) AT_CLEANUP AT_SETUP([another test]) AT_CHECK([:])], [], [0], [], [], [AT_SKIP_PARALLEL_TESTS], [dnl Until we can find a way to avoid catastrophic failure (ash) or dnl lack of failure (zsh), skip the rest of this test on such shells. echo 'if' > syntax AT_CHECK([${CONFIG_SHELL-$SHELL} -c 'case `. ./syntax; echo $?` in 0|"") exit 77;; esac'], [0], [ignore], [ignore]) AT_CHECK([$CONFIG_SHELL ./micro-suite -j], [1], [ignore], [stderr]) AT_CHECK([grep "unable to parse test group: 2" stderr], [0], [ignore])], [-j2 1 3]) AT_CHECK_AT_TEST([parallel errexit], [AT_CHECK([false]) AT_CLEANUP AT_SETUP([barrier test]) AT_CHECK([sleep 4]) AT_CLEANUP AT_SETUP([test that should not be run]) AT_CHECK([:])], [], [1], [stdout], [stderr], [AT_SKIP_PARALLEL_TESTS], [AT_CHECK([test -f micro-suite.log], [1]) touch micro-suite.log # shut up AT_CAPTURE_FILE. AT_CHECK([grep "should not be run" stdout], [1]) AT_CHECK([grep "[[12]] .* inhibited subsequent" stderr], [], [ignore])], [-j2 --errexit]) AT_SETUP([parallel autotest and signal handling]) AT_SKIP_PARALLEL_TESTS # Goals: # (1) interrupt `./testsuite -jN' # (2) interrupt `make check TESTSUITEFLAGS=-jN' # (3) no trailing verbose/trace output # (4) exit status should be 128+signal AT_DATA([atlocal], [[suite_pid=$$ export suite_pid ]]) AT_CHECK_AT_PREP([micro-suite], [[AT_INIT([suite to test parallel execution]) AT_SETUP([test number 1]) AT_CHECK([sleep 2]) AT_CLEANUP AT_SETUP([test number 2]) AT_CHECK([sleep 1]) AT_CLEANUP AT_SETUP([test number 3]) AT_CHECK([sleep 1]) AT_CLEANUP AT_SETUP([killer test]) AT_CHECK([kill -$signal $suite_pid]) AT_CLEANUP m4_for([count], [5], [7], [], [AT_SETUP([test number count]) AT_CHECK([sleep 1]) AT_CLEANUP ]) ]]) AT_DATA([Makefile.in], [[@SET_MAKE@ SHELL = @SHELL@ TESTSUITE = ./micro-suite check: $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) .PHONY: check ]]) AT_CHECK([$CONFIG_SHELL $abs_top_builddir/config.status --file=Makefile:Makefile.in], [], [ignore]) # Test INT and TERM. for signal in 2 15; do export signal AS_VAR_ARITH([expected_status], [128 + $signal]) # Sequential case. AT_CHECK([$CONFIG_SHELL ./micro-suite], [$expected_status], [ignore], [stderr]) # Both stderr and the log should contain the notification about the signal. AT_CHECK([grep 'bailing out' stderr], [], [ignore]) AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore]) # There should be no junk job status output. AT_CHECK([[grep '[iI]nterrupt[ ]' stderr]], [1]) # Parallel case. AT_CHECK([$CONFIG_SHELL ./micro-suite --jobs=3], [$expected_status], [ignore], [stderr]) AT_CHECK([grep 'bailing out' stderr], [], [ignore]) AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore]) # We'd like to check this here, too, but some shells do not allow to # turn off job control. # AT_CHECK([[grep '[iI]nterrupt[ ]' stderr]], [1]) # Ditto with `make' in the loop. : ${MAKE=make} unset MAKEFLAGS # Need to eliminate outer TESTSUITEFLAGS here. # Need to normalize exit status here: some make implementations # exit 1 (BSD make), some exit 2 (GNU make). AT_CHECK([$MAKE check TESTSUITEFLAGS=; ]dnl [case $? in 1|2) exit 1;; *) exit $?;; esac], [1], [ignore], [stderr]) AT_CHECK([grep 'bailing out' stderr], [], [ignore]) AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore]) # Ditto, parallel case. AT_CHECK([$MAKE check TESTSUITEFLAGS=--jobs=3; ]dnl [case $? in 1|2) exit 1;; *) exit $?;; esac], [1], [ignore], [stderr]) AT_CHECK([grep 'bailing out' stderr], [], [ignore]) AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore]) done # Test PIPE. # The most important part here is that things should not hang, nor # get out of hand. OTOH, if the shell sets the default handler to # ignore PIPE (pdksh, dash), there is little we can do about having the # test run; it's only the output that won't be there. So all we check # for is that, if test 7 didn't run serially, then it shouldn't be # run in the parallel case either; the intermediate tests serve as # parallel barrier. # Note that stderr may contain "Broken pipe" errors. AT_CHECK([($CONFIG_SHELL ./micro-suite -d -3 5-; echo $? >status) | sed 5q], [], [stdout], [stderr]) AT_CHECK([grep '5.*ok' stdout], [1]) # Apparently some shells don't get around to creating 'status' any more. # And ksh93 on FreeBSD uses 256 + 13 instead of 128 + 13 AT_CHECK([test ! -s status || grep 141 status || grep 269 status], [], [ignore]) AT_CHECK([if test -f micro-suite.dir/7/micro-suite.log; then ]dnl [ echo "shell ignores SIGPIPE" > sigpipe-stamp ]dnl [else :; fi]) AT_CHECK([$CONFIG_SHELL ./micro-suite -d -3 5- --jobs=2 | sed 5q], [], [stdout], [ignore]) AT_CHECK([grep '5.*ok' stdout], [1]) AT_CHECK([test -s sigpipe-stamp || test ! -f micro-suite.dir/7/micro-suite.log], [0]) AT_CLEANUP ## ------------------- ## ## srcdir propagation. ## ## ------------------- ## AT_SETUP([srcdir propagation]) mkdir pkg vpath-outside vpath-abs mkdir pkg/t pkg/vpath-inside AT_DATA([pkg/a]) AT_DATA([pkg/t/b]) AT_DATA([pkg/configure.ac], [[AC_INIT AC_CONFIG_TESTDIR([t]) AC_OUTPUT ]]) cp "$abs_top_srcdir/build-aux/install-sh" pkg cd pkg AT_CHECK_AUTOCONF cd .. AT_CHECK_AT_PREP([suite], [[AT_INIT([suite to check srcdir]) AT_SETUP([my only test]) AT_CHECK([test -f "$top_srcdir"/a && test -f "$srcdir"/b]) AT_CLEANUP ]], [], [], [], [pkg/t]) # Build directory totally outside source directory. cd vpath-outside AT_CHECK([../pkg/configure], [0], [ignore]) cd t AT_CHECK([../../pkg/t/suite], [0], [ignore]) cd ../.. # Build directory totally outside source directory (absolute). my_srcdir=`pwd`/pkg cd vpath-abs AT_CHECK(["$my_srcdir"/configure], [0], [ignore]) cd t AT_CHECK(["$my_srcdir"/t/suite], [0], [ignore]) cd ../.. # Build directory as subdirectory of source directory. cd pkg/vpath-inside AT_CHECK([../configure], [0], [ignore]) cd t AT_CHECK([../../t/suite], [0], [ignore]) cd ../../.. # Build directory as parent of source directory. AT_CHECK([pkg/configure], [0], [ignore]) cd t AT_CHECK([../pkg/t/suite], [0], [ignore]) cd .. # Build directory as source directory. cd pkg AT_CHECK_CONFIGURE cd t AT_CHECK([./suite], [0], [ignore]) cd ../.. AT_CLEANUP ## ------------------------------ ## ## whitespace in absolute testdir ## ## ------------------------------ ## AT_SETUP([whitespace in absolute testdir]) dir='dir with whitespace' mkdir "$dir" cd "$dir" wd=`pwd` AT_DATA([a]) AT_CHECK_AT_PREP([suite], [[AT_INIT([suite to check srcdir]) AT_SETUP([my only test]) AT_CHECK([test -f "$top_srcdir"/a]) AT_CLEANUP ]]) AT_CHECK([top_srcdir=$wd ./suite], [0], [ignore]) AT_CHECK([top_srcdir=$wd ./suite -d], [0], [ignore]) AT_CHECK([cd suite.dir/1 && ./run top_srcdir="$wd"], [0], [ignore], [ignore]) AT_CLEANUP ## ------------------ ## ## unusual file names ## ## ------------------ ## AT_SETUP([unusual file names]) AT_DATA_AUTOTEST([d@&t@nl.at], [[AT_SETUP([test one]) m4_pattern_allow([^dnl$]) AT_CHECK([test "]m4_dquote(AT_LINE)[" = dn[]l.at:3]) AT_CLEANUP ]]) mkdir sub AT_DATA_AUTOTEST([sub/"two spaces".at], [[AT_SETUP([test two]) AT_CHECK([test "]m4_dquote(AT_LINE)[" = "two spaces.at:2"]) AT_CLEANUP ]]) AT_CHECK_AT_PREP([suite], [[AT_INIT([suite to check included file names]) m4_include([d][nl.at]) m4_include([sub/two spaces.at]) ]]) AT_CHECK([$CONFIG_SHELL ./suite], [0], [stdout]) AT_CHECK([grep 'two spaces' suite.log], [1]) AT_CLEANUP autoconf2.64_2.64+dfsg.orig/tests/aclang.at0000444000175000017500000000056511232571664017167 0ustar smcvsmcv# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 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. autoconf2.64_2.64+dfsg.orig/tests/acautoheader.at0000444000175000017500000000000011232571662020345 0ustar smcvsmcvautoconf2.64_2.64+dfsg.orig/tests/erlang.at0000644000175000017500000001037211232215665017205 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([Erlang low level compiling and utility macros.]) # Copyright (C) 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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. ## ----------------- ## ## Erlang Compiler. ## ## ----------------- ## AT_CHECK_MACRO([Erlang], [[AC_ERLANG_PATH_ERL([not found]) AC_ERLANG_PATH_ERLC([not found]) if test "$ERL" = "not found" || test "$ERLC" = "not found"; then exit 77; fi AC_LANG([Erlang]) ## Can't compile, but can run an Erlang module: AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [halt(0)])], [AC_MSG_RESULT([ok]) AC_MSG_ERROR([compiling Erlang program should fail])], [AC_MSG_RESULT([failed])]) AC_RUN_IFELSE([AC_LANG_PROGRAM([], [halt(0)])], [AC_MSG_RESULT([ok])], [AC_MSG_RESULT([failed]) AC_MSG_ERROR([could not run test program])]) ]], [AT_KEYWORDS([Erlang])]) ## ---------------------- ## ## Erlang lib detection. ## ## ---------------------- ## AT_CHECK_MACRO([AC_ERLANG_CHECK_LIB], [[AC_ERLANG_PATH_ERL([not found]) AC_ERLANG_PATH_ERLC([not found]) if test "$ERL" = "not found" || test "$ERLC" = "not found"; then exit 77; fi AC_ERLANG_CHECK_LIB([stdlib], [AC_MSG_RESULT([ok])], [AC_MSG_RESULT([failed])]) ## Test that the lib path detection really detected a directory: if test "$ERLANG_LIB_DIR_stdlib" != "not found" \ && test ! -d "$ERLANG_LIB_DIR_stdlib"; then AC_MSG_ERROR([incorrect ERLANG_LIB_DIR_stdlib variable]) fi ]], [AT_KEYWORDS([Erlang])]) ## --------------------------- ## ## Erlang root dir detection. ## ## --------------------------- ## AT_CHECK_MACRO([AC_ERLANG_SUBST_ROOT_DIR], [[AC_ERLANG_PATH_ERL([not found]) AC_ERLANG_PATH_ERLC([not found]) if test "$ERL" = "not found" || test "$ERLC" = "not found"; then exit 77; fi AC_ERLANG_SUBST_ROOT_DIR ## Test that the root path detection really detected a directory: if test ! -d "$ERLANG_ROOT_DIR"; then AC_MSG_ERROR([incorrect ERLANG_ROOT_DIR variable]) fi ]], [AT_KEYWORDS([Erlang])]) ## -------------------------- ## ## Erlang lib dir detection. ## ## -------------------------- ## AT_CHECK_MACRO([AC_ERLANG_SUBST_LIB_DIR], [[AC_ERLANG_PATH_ERL([not found]) AC_ERLANG_PATH_ERLC([not found]) if test "$ERL" = "not found" || test "$ERLC" = "not found"; then exit 77; fi AC_ERLANG_SUBST_LIB_DIR ## Test that the lib path detection really detected a directory: if test ! -d "$ERLANG_LIB_DIR"; then AC_MSG_ERROR([incorrect ERLANG_LIB_DIR variable]) fi ]], [AT_KEYWORDS([Erlang])]) ## ----------------------------------- ## ## Erlang install base dir detection. ## ## ----------------------------------- ## AT_CHECK_MACRO([AC_ERLANG_SUBST_INSTALL_LIB_DIR], [AT_KEYWORDS([Erlang])]) ## ---------------------------------- ## ## Erlang install lib dir detection. ## ## ---------------------------------- ## AT_CHECK_MACRO([AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR], [[AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR([test_blah], [1.24-b]) ## Test that the generated directory name is well-formed: if test `echo "$ERLANG_INSTALL_LIB_DIR_test_blah" | sed -e 's/^.*\///'` != "test_blah-1.24-b"; then AC_MSG_ERROR([incorrect ERLANG_INSTALL_LIB_DIR_test_blah variable]) fi ]], [AT_KEYWORDS([Erlang])]) ## -------------------------- ## ## Erlang version detection. ## ## -------------------------- ## AT_CHECK_MACRO([AC_ERLANG_SUBST_ERTS_VER], [[AC_ERLANG_PATH_ERL([not found]) AC_ERLANG_PATH_ERLC([not found]) if test "$ERL" = "not found" || test "$ERLC" = "not found"; then exit 77; fi AC_ERLANG_SUBST_ERTS_VER ]], [AT_KEYWORDS([Erlang])]) autoconf2.64_2.64+dfsg.orig/tests/acgeneral.at0000444000175000017500000000201311232571661017646 0ustar smcvsmcv# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 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_CHECK_DECLS_ONCE]) AT_CHECK_MACRO([AC_EGREP_CPP]) AT_CHECK_MACRO([AC_EGREP_HEADER]) AT_CHECK_MACRO([AC_LIBOBJ]) AT_CHECK_MACRO([AC_LIBSOURCES]) AT_CHECK_MACRO([AC_PREFIX_DEFAULT]) AT_CHECK_MACRO([AC_PRESERVE_HELP_ORDER]) # 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_FOREACH]) AT_CHECK_AU_MACRO([AC_MSG_RESULT_UNQUOTED]) 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.64_2.64+dfsg.orig/tests/acstatus.at0000444000175000017500000000053211232571661017560 0ustar smcvsmcv# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. AT_BANNER([Testing autoconf/status macros.]) # Modern macros. # Obsolete macros. AT_CHECK_AU_MACRO([AC_OUTPUT_COMMANDS]) autoconf2.64_2.64+dfsg.orig/tests/tools.at0000644000175000017500000006360711233153352017101 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([Executables (autoheader, autoupdate...).]) # Copyright (C) 2000, 2001, 2003, 2004, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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]) AT_CHECK([test "$ac_cv_sh_n_works" = yes || exit 77]) # Specify the absolute name of the tool, as some shells don't honor PATH when # running `sh PROG'. AT_CHECK_SHELL_SYNTAX(["$abs_top_builddir/bin/autoconf"]) AT_CHECK_SHELL_SYNTAX(["$abs_top_builddir/tests/autoconf"]) AT_CHECK_SHELL_SYNTAX(["$abs_top_builddir/tests/testsuite"]) # These are not built, they are in the src tree. AT_CHECK_SHELL_SYNTAX(["$abs_top_srcdir/build-aux/install-sh"]) AT_CHECK_SHELL_SYNTAX(["$abs_top_srcdir/build-aux/missing"]) AT_CLEANUP ## ---------------------------- ## ## Syntax of the Perl scripts. ## ## ---------------------------- ## AT_SETUP([Syntax of the Perl scripts]) 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 # autom4te --force # ---------------- AT_SETUP([autom4te --force]) AT_DATA([file.m4], [[right ]]) AT_CHECK_AUTOM4TE([-o file file.m4]) # Create a file whose time stamp is in the future. # (next year)-01-01 00:01 UTC should always be in the future, # even on slow machines. echo BAD >file this_year=`TZ=UTC0 date +%Y` AS_VAR_ARITH([next_year], [$this_year + 1]) TZ=UTC0 touch -t ${next_year}01010001 file AT_CHECK_AUTOM4TE([--force -o file file.m4]) AT_CHECK([cat file], 0, [[right ]]) AT_CLEANUP # autom4te and file names containing whitespace # --------------------------------------------- AT_SETUP([autom4te and whitespace in file names]) x= export x rm -f a b for funny in \ 'with funny '\'' $x & #! name' \ 'with funny \ '\'' \'\'' " b * ? name ' # "restore font-lock do funny=`func_sanitize_file_name "$funny"` file=" file $funny" outfile="$file out " dir=`func_sanitize_dir_name " dir $funny"` cachedir=" cache$dir" TMPDIR=" tmp$dir" export TMPDIR # skip if we cannot create such a file or directory AT_CHECK([mkdir "$dir" "$cachedir" "$TMPDIR" && touch "$file" || exit 77]) cat >"$file" <<'END' [m4@&t@_init[]m4@&t@_include(foo.m4) m4@&t@_divert(0)d@&t@nl FOO] END cat >"$dir"/foo.m4 <<'END' [m4@&t@_define([FOO], [bar])] END AT_CHECK_AUTOM4TE([-C "$cachedir" -B "$dir" --language=m4sugar -o "$outfile" "$file"]) AT_CHECK([cat "$outfile"], [], [[bar ]]) rm -rf "$outfile" "$cachedir" AT_CHECK_AUTOM4TE([-C "$cachedir" -I "$dir" --language=m4sugar -o "$outfile" "$file"]) AT_CHECK([cat "$outfile"], [], [[bar ]]) # This exercises a slightly different code path and will catch an open with # trailing whitespace: cat >"$file" <<'END' [m4@&t@_init[]m4@&t@_include(foo.m4) m4@&t@_pattern_forbid([^bar$]) m4@&t@_divert(0)d@&t@nl FOO] END rm -rf "$outfile" "$cachedir" AT_CHECK_AUTOM4TE([-C "$cachedir" -I "$dir" --language=m4sugar -o "$outfile" "$file"], [1], [], [stderr]) AT_CHECK([grep 'possibly undefined macro' stderr], [], [ignore]) cat >"$file" <<'END' [m4@&t@_init[]m4@&t@_include(foo.m4) m4@&t@_divert(0)d@&t@nl] END rm -rf "$file.m4f" AT_CHECK_AUTOM4TE([-C "$cachedir" -I "$dir" --language=m4sugar --freeze -o "$file.m4f" "$file"]) AT_CHECK([test -s "$file.m4f"]) # Check --reload-state AT_CHECK_AUTOM4TE([-C "$cachedir" --language=m4sugar -o "$outfile" "$file.m4f" /dev/null]) test ! -f b done AT_CLEANUP # autom4te --trace and unusual macro names # ---------------------------------------- AT_SETUP([autom4te --trace and unusual macro names]) AT_DATA([file.m4], [[ ]]) AT_CHECK_AUTOM4TE([-t 'TR A CE' -t 'TR(A)CE' file.m4]) AT_CLEANUP AT_SETUP([autom4te --trace and whitespace]) dnl line numbering differs between m4 1.4.6 and 1.4.13 if we don't dnl go through a single line wrapper AT_DATA_M4SUGAR([file.m4], [[m4_define([foo], [m4_echo([ a b c ], [\ d\ ])]) foo ]]) AT_CHECK_AUTOM4TE([--language=m4sugar -t 'm4@&t@_echo' file.m4], [0], [[file.m4:5:m4@&t@_echo: a b c :d ]]) 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])) ]]) # 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 ]]) # 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], []. ]]) # ${sep}@. AT_CHECK_AUTOCONF([-t TRACE2:'${)===(}@'], 0, [[[] [] [@bar])===([@baz] [baz] [])===([baz] [ACTIVE])===([baz] [active] [active])===([])===([ACTIVE] ]]) # Arguments spanning multiple lines. AT_DATA([configure.ac], [[m4_define([TRACE], []) TRACE(foo bar, bar foo) ]]) AT_CHECK_AUTOCONF([-t TRACE:'$%'], 0, [[foo bar: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] ]]) dnl This test needs autom4te's cache, in spite of any ~/.autom4te.cfg. AT_DATA([.autom4te.cfg], [[ begin-language: "Autoconf" args: --cache=autom4te.cache end-language: "Autoconf" begin-language: "Autoconf-without-aclocal-m4" args: --cache=autom4te.cache end-language: "Autoconf-without-aclocal-m4" ]]) AT_CHECK_AUTOCONF([], 1, [], [[configure.ac:2: error: possibly undefined macro: m4@&t@_foo If this token and others are legitimate, please use m4@&t@_pattern_allow. See the Autoconf documentation. configure.ac:3: error: possibly undefined macro: _m4@&t@_bar configure.ac:4: error: possibly undefined macro: AS@&t@_FOO configure.ac:5: error: possibly undefined macro: _AS@&t@_BAR configure.ac:6: error: possibly undefined macro: d@&t@nl ]]) # Second run should succeed and yield no output. AT_CHECK([autoconf]) 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_CHECK_AUTOCONF([], 1, [], [[configure.ac:1: error: possibly undefined macro: AS@&t@_INIT If this token and others are legitimate, please use m4@&t@_pattern_allow. See the Autoconf documentation. configure.ac:7: error: possibly undefined macro: AS@&t@_ALLOWED_NOT configure.ac:10: error: possibly undefined macro: FORBIDDEN configure.ac:14: error: possibly undefined macro: AS@&t@_THIS_IS_INVALID configure.ac:14: error: possibly undefined macro: _AS@&t@_THIS_IS_INVALID_TOO ]]) AT_CLEANUP # autoconf: automatically allowed tokens # -------------------------------------- AT_SETUP([autoconf: automatically allowed tokens]) AT_DATA_M4SH([configure.ac], [[AC_INIT m4_pattern_forbid([^FB_]) AC_DEFINE([FB_ONE]) AC_SUBST([FB_TWO]) AC_OUTPUT ]]) AT_CHECK_AUTOCONF AT_CLEANUP # autoconf: do not forbid the empty token # --------------------------------------- AT_SETUP([autoconf: the empty token]) AT_DATA_M4SH([configure.ac], [[m4_init[]m4_pattern_allow([^foo$]) m4_divert([0])dnl line that begins with a space ]]) AT_CHECK_AUTOCONF AT_CLEANUP # autoconf: subdirectories # ------------------------ AT_SETUP([autoconf: subdirectories]) AT_DATA([configure.ac], [[AC_INIT AC_PROG_MKDIR_P AC_CONFIG_FILES(sub/foo) AC_OUTPUT ]]) mkdir sub AT_DATA([sub/foo.in], [[@MKDIR_P@ ]]) AT_DATA([install-sh]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_CHECK([[grep '^[^/].*/mkdir -p' sub/foo]], 1) AT_CLEANUP # autoconf: input from stdin # -------------------------- AT_SETUP([autoconf: input from stdin]) # Past Autoconf versions failed to read from stdin when other, non-frozen input # files were present. AT_DATA([aclocal.m4]) AT_CHECK([echo 'AC_INIT(X, 1.0, bug-autoconf@gnu.org)' | autoconf -t AC_INIT -], 0, [stdin:1:AC_INIT:X:1.0:bug-autoconf@gnu.org ]) AT_CHECK([echo 'AC_INIT(X, 2.0, bug-autoconf@gnu.org)' | autoconf -t AC_INIT -], 0, [stdin:1:AC_INIT:X:2.0:bug-autoconf@gnu.org ]) AT_CLEANUP # autoconf: AC_AUTOCONF_VERSION # -------------------------------------- AT_SETUP([autoconf: AC_AUTOCONF_VERSION]) AT_DATA([configure.ac], [[AC_INIT version m4@&t@_defn([AC_AUTOCONF_VERSION]) version AC_OUTPUT ]]) AT_CHECK_AUTOCONF AT_CHECK([[grep 'version ]]AT_PACKAGE_VERSION[[ version' configure]], 0, [ignore]) 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 home page for this package. */ #undef PACKAGE_URL /* 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 home page for this package. */ #undef PACKAGE_URL /* 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 # autoheader should see through m4 macros, just like autoconf # http://lists.gnu.org/archive/html/bug-autoconf/2009-06/msg00000.html AT_SETUP([autoheader and macros]) AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_HEADER([config.h]) m4_define([PETER], [SIMSALABIM]) m4_define([PAUL], [OPENSESAME]) AC_DEFINE([PETER], [10], [Peter's public info]) AC_DEFINE_UNQUOTED([PAUL], [`expr 4 + 6`], [Paul's public info]) AC_OUTPUT ]]) AT_CHECK_AUTOCONF AT_CHECK_AUTOHEADER AT_CHECK([grep -c SIMSALABIM configure config.h.in], [0], [[configure:1 config.h.in:1 ]]) AT_CHECK([grep -c OPENSESAME configure config.h.in], [0], [[configure:1 config.h.in:1 ]]) AT_CHECK([grep -c PETER configure config.h.in], [1], [[configure:0 config.h.in:0 ]]) AT_CHECK([grep -c PAUL configure config.h.in], [1], [[configure:0 config.h.in:0 ]]) 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 # 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([], 0, [], ignore) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_CHECK([cat src1], 0, [dst1 ]) AT_CHECK([cat src2], 0, [dst2 ]) AT_CLEANUP # 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 # autoupdating AU_ALIAS # --------------------- AT_SETUP([autoupdating AU_ALIAS]) AT_DATA([configure.ac], [[AC_INIT AC_DEFUN([FOO], [$#]) AU_ALIAS([BAZ],[FOO]) test "FOO:FOO():FOO(x) BAZ:BAZ():BAZ(x)" = "0:1:1 0:1:1" || exit 1 AC_PROG_CC AC_STDC_HEADERS AC_OUTPUT ]]) # Checking `autoupdate'. AT_CHECK_AUTOUPDATE AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_CHECK([grep 'AC_HEADER_STDC[(]' configure.ac], 1, [ignore], [ignore]) AT_CHECK([grep 'AC_HEADER_STDC' configure.ac], 0, [ignore], [ignore]) AT_CLEANUP # autoupdating OLD to NEW # ----------------------- # The example taken from the code comments. AT_SETUP([autoupdating OLD to NEW]) AT_DATA([aclocal.m4], [[AU_DEFUN([OLD], [NEW([$1, $2], m4@&t@_eval([$1 + $2]))]) AC_DEFUN([NEW], [echo "sum($1) = $2"]) ]]) AT_DATA([configure.ac], [[AC_INIT OLD(1, 2) NEW([0, 0], [0]) ]]) # Checking `autoupdate'. AT_CHECK_AUTOUPDATE AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_CHECK([[grep 'NEW(\[1, 2], *\[3])' configure.ac]], 0, [ignore], [ignore]) AT_CHECK([[grep 'NEW(\[0, 0], *\[0])' configure.ac]], 0, [ignore], [ignore]) AT_CLEANUP # autoupdating AC_HELP_STRING # --------------------------- AT_SETUP([autoupdating AC_HELP_STRING]) AT_DATA([configure.ac], [[AC_INIT AC_ARG_ENABLE([foo], [AC_HELP_STRING([--enable-foo], [foo bar])], [:], [:]) ]]) # Checking `autoupdate'. AT_CHECK_AUTOUPDATE([], [], [], [ignore]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([], [], [], [ignore]) AT_CHECK([[grep '\[--enable-foo], *\[foo bar]' configure.ac]], 0, [ignore], [ignore]) AT_CLEANUP # autoupdating with m4sugar # ------------------------- AT_SETUP([autoupdating with m4sugar]) AT_DATA([aclocal.m4], [[AU_DEFUN([OLD], [m4@&t@_pushdef([foo], [bar])dn@&t@l echo "foo $1 foo" m4@&t@_popdef([foo])dn@&t@l ]) ]]) touch foo.in AT_DATA([configure.ac], [[AC_PREREQ(2.54) m4_define([gnumeric_version_epoch], [1]) AC_INIT OLD([ bla bla ]) AC_FOREACH([name], [n1 n2], [echo name ]) AC_CHECKING([for feature]) AC_MSG_RESULT_UNQUOTED([`echo done`]) AC_OUTPUT([foo]) ]]) # Checking `autoupdate'. AT_CHECK_AUTOUPDATE([], [], [], [ignore]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([], [], [], [ignore]) AT_CLEANUP # autoupdating AC_LANG_SAVE # ------------------------- AT_SETUP([autoupdating AC_LANG_SAVE]) AT_DATA([configure.ac], [[AC_INIT AC_LANG_SAVE AC_LANG_RESTORE AC_LANG_SAVE AC_LANG_RESTORE ]]) # Checking `autoupdate'. AT_CHECK_AUTOUPDATE([], [], [], [ignore]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([], [], [], [ignore]) AT_CLEANUP # autoupdating AC_FOREACH # ----------------------- AT_SETUP([autoupdating AC_FOREACH]) AT_DATA([aclocal.m4], [[AU_DEFUN([OLD], [AC_FOREACH([myvar], [4 5 6], [' myvar'])]) ]]) AT_DATA([configure.ac], [[AC_INIT echo AC_FOREACH([myvar], [1 2 3], [' myvar'])OLD ]]) # Checking `autoupdate'. AT_CHECK_AUTOUPDATE AT_CHECK([[grep 'echo 1 2 3 4 5 6' configure.ac]], 1, [ignore], [ignore]) AT_CHECK([[grep 'm4@&t@_foreach_w' configure.ac]], 0, [ignore], [ignore]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([], [0], [stdout]) AT_CHECK([[grep ' 1 2 3 4 5 6' stdout]], 0, [ignore], [ignore]) AT_CLEANUP # autoupdating with aclocal and m4_include # ---------------------------------------- AT_SETUP([autoupdating with aclocal and m4@&t@_include]) # We use aclocal. AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore]) mkdir m4 aclocal AT_DATA([configure.in], [[AC_INIT(x,0) AC_UNCHANGED_MACRO AC_OLD_MACRO AC_OUTPUT ]]) AT_DATA([m4/stuff.m4], [[AU_ALIAS([AC_OLD_MACRO], [AC_NEW_MACRO]) AC_DEFUN([AC_NEW_MACRO], [echo hi]) AC_DEFUN([AC_UNCHANGED_MACRO], [echo one]) ]]) cp m4/stuff.m4 aclocal/stuff.m4 AT_CHECK([aclocal -I aclocal], [0], [ignore], [ignore]) # Checking `autoupdate'. AT_CHECK_AUTOUPDATE AT_CHECK([aclocal -I m4], [0], [ignore], [ignore]) AT_CHECK_AUTOUPDATE AT_CLEANUP # Keeping autom4te.cfg complete # ----------------------------- AT_SETUP([autom4te preselections]) : ${sleep='sleep 1'} # Command to force different time stamps. # If this test should run on FAT file systems and older w32, # then setting $sleep correctly needs to be revisited. # We use aclocal and automake. AT_CHECK([automake --version || exit 77], [], [ignore], [ignore]) AT_CHECK([test ! -f $HOME/.autom4te.cfg || exit 77], [], [ignore], [ignore]) AT_DATA([configure.in], [[AC_INIT(GNU foo, 1.0) AM_INIT_AUTOMAKE AC_CONFIG_FILES([Makefile]) AC_OUTPUT ]]) AT_DATA([Makefile.am], [[AUTOMAKE_OPTIONS = foreign ]]) $sleep # `aclocal.m4' should be strictly younger than its inputs # If Autoconf is too old, or the user has turned caching off, skip: AT_CHECK([aclocal || { ret=$?; test $ret -eq 63 && ret=77; exit $ret; }], [], [], [ignore]) AT_CHECK([test -d autom4te.cache || exit 77]) AT_CHECK([autoconf]) # If this test fails due to missing entries in lib/autom4te.in, then # comparing the old and new requests is a good place to start debugging: cp autom4te.cache/requests old-requests echo newer >newer $sleep # if `configure' is regenerated, we want it to be strictly newer, # to catch the error consistently. AT_CHECK([aclocal], [], [], [ignore]) AT_CHECK([automake --no-force --add-missing], [], [], [ignore]) AT_CHECK([autoconf]) AT_CHECK([test "`find configure -newer newer`" = "" || { diff old-requests autom4te.cache/requests; exit 1; }]) AT_CLEANUP # autom4te cache locking # ---------------------- AT_SETUP([autom4te cache locking]) # Cannot use AT_CHECK here, autotest internals could be messed up. (echo AC_INIT; sleep 2; echo) \ | (autom4te --language=autoconf -o configure -; echo $? >&2 ) 2>errlog & AT_CHECK([echo AC_INIT | autom4te --language=autoconf -o configure -]) wait # Ignore additional output from shell verbose or xtrace mode. AT_CHECK([grep 'cannot rename' errlog], [1]) AT_CHECK([grep '^0$' errlog], [], [ignore]) AT_CHECK_CONFIGURE AT_CLEANUP # autotools and file names containing whitespace # --------------------------------------------- AT_SETUP([autotools and whitespace in file names]) # We use aclocal. AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore]) x= export x rm -f a b for funny in \ 'with funny '\'' $x & #! name ' \ 'with funny \ '\'' \'\'' " b * ? name ' do funny=`func_sanitize_file_name "$funny"` file=" file $funny" dir=`func_sanitize_dir_name " dir $funny"` TMPDIR=" tmp$dir" export TMPDIR cat >"$file.in" <<'END' [AC_INIT(x,0) m4@&t@_include([foo.m4]) AC_CONFIG_HEADERS([config.h:config.hin]) AC_MACRO AC_OUTPUT] END # skip if we cannot create such a file or directory AT_CHECK([mkdir "$dir" "$TMPDIR" && test -f "$file.in" || exit 77]) cat >"$dir"/foo.m4 <<'END' [AC_DEFUN([AC_MACRO], [echo hi])] END AT_CHECK_AUTOHEADER([-B "$dir" "$file.in"]) AT_CHECK_AUTOHEADER([--force -I "$dir" "$file.in"]) AT_CHECK_AUTOUPDATE([-B "$dir" "$file.in"]) AT_CHECK_AUTOUPDATE([--force -I "$dir" "$file.in"]) AT_CHECK_AUTOUPDATE([-B "$dir" - < "$file.in"], [], [ignore]) AT_CHECK_AUTOCONF([-B "$dir" -o "$file" "$file.in"]) AT_CHECK_AUTOCONF([-I "$dir" -o "$file" "$file.in"]) # In autoconf, these exercise a slightly different code path: AT_CHECK_AUTOCONF([--prepend-include="$dir" -o "$file" "$file.in"]) AT_CHECK_AUTOCONF([--include="$dir" -o "$file" "$file.in"]) AT_CHECK([autoscan -B "$dir"], [], [], [ignore]) AT_CHECK([autoscan --force -I "$dir"], [], [], [ignore]) # autoreconf requires a sane input file name. Also, disable aclocal. mv -f "$file.in" configure.in AT_DATA([aclocal.m4]) AT_CHECK([autoreconf -B "$dir"]) AT_CHECK([autoreconf --force -I "$dir"]) cat >"$file.c" <<'END' #if FOO #endif END AT_CHECK([ifnames "$file.c"], [], [ignore]) test ! -f b done AT_CLEANUP autoconf2.64_2.64+dfsg.orig/tests/foreign.at0000644000175000017500000000543111053011075017354 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([Compatibility with other tools.]) # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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 # State that we explicitly want auxiliary files here, so libtoolize # won't pollute files outside the test directory. AC_CONFIG_AUX_DIR(.) AC_PROG_LIBTOOL ]]) # Some libtoolize complain if you don't have an aclocal.m4. AT_CHECK([touch aclocal.m4]) 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 autoconf2.64_2.64+dfsg.orig/tests/c.at0000644000175000017500000001650011157462020016151 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([C low level compiling/preprocessing macros.]) # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 # 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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 ]]) ## -------------------------- ## ## 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', `typeof', and `volatile'. AT_CHECK_MACRO([C keywords], [[AC_PROG_CC AC_C_CONST AC_C_TYPEOF AC_C_VOLATILE case $GCC,$ac_cv_c_const,$ac_cv_c_typeof,$ac_cv_c_volatile in yes,*no*) AC_MSG_ERROR([failed to detect `const', `typeof', 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" # 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 ## ------------------------------ ## ## AC_PROG_CPP without warnings. ## ## ------------------------------ ## AT_SETUP([AC_PROG_CPP without warnings]) # Ignore if /lib/cpp doesn't work AT_CHECK([[echo '#include ' | /lib/cpp || exit 77]], [], [ignore], [ignore]) # A cpp which exit status is meaningless. AT_DATA([mycpp], [[#! /bin/sh /lib/cpp "$@" exit 0 ]]) chmod +x mycpp _AT_CHECK_AC_MACRO( [[CPP=./mycpp AC_PROG_CPP test "x$ac_c_preproc_warn_flag" != xyes && AC_MSG_ERROR([failed to detect preprocessor warning option]) # 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 ## -------------------- ## ## AC_PROG_CPP via CC. ## ## -------------------- ## # It's Ok for strict preprocessors to produce warnings. AT_SETUP([AC_PROG_CPP via CC]) # Ignore if /lib/cpp doesn't work AT_CHECK([[echo '#include ' | /lib/cpp || exit 77]], [], [ignore], [ignore]) AT_DATA([mycc], [[#! /bin/sh echo "Annoying copyright message" >&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 ## ------------------------------------ ## ## AC_NO_EXECUTABLES (working linker). ## ## ------------------------------------ ## AT_CHECK_MACRO([AC_NO_EXECUTABLES (working linker)], [AC_NO_EXECUTABLES AC_PROG_CC ]) ## ----------------------------------- ## ## AC_NO_EXECUTABLES (broken linker). ## ## ----------------------------------- ## AT_CHECK_MACRO([AC_NO_EXECUTABLES (broken linker)], [LDFLAGS=-lnosuchlibrary AC_NO_EXECUTABLES AC_PROG_CC ]) ## -------------------------- ## ## AC_USE_SYSTEM_EXTENSIONS. ## ## -------------------------- ## AT_SETUP([AC_USE_SYSTEM_EXTENSIONS]) # Some existing configure.ac mixed AC_AIX (now an alias for # AC_USE_SYSTEM_EXTENSIONS) and AC_DEFINE([__EXTENSIONS__]), which # broke autoheader in 2.62. Test that this is supported. _AT_CHECK_AC_MACRO( [[AC_AIX AC_DEFINE([__EXTENSIONS__], [1], [Manually defined for Solaris]) ]]) _AT_CHECK_AC_MACRO( [[AC_USE_SYSTEM_EXTENSIONS AC_DEFINE([__EXTENSIONS__], [1], [Manually defined for Solaris]) ]]) AT_CLEANUP ## ----------------------- ## ## AC_C_RESTRICT and C++. ## ## ----------------------- ## AT_SETUP([AC_C_RESTRICT and C++]) # In some compiler suites, the left hand doesn't know about everything # the right hand does; or the user mixes the C compiler from one suite # with the C++ compiler from another. In this case, Sun WorkShop CC # not like the _Restrict accepted by cc. AT_DATA([configure.ac], [[AC_INIT AC_PROG_CC AC_PROG_CXX AC_C_RESTRICT AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT ]]) AT_DATA([Makefile.in], [[CC = @CC@ CXX = @CXX@ CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ CPPFLAGS = -I. @CPPFLAGS@ OBJEXT = @OBJEXT@ all: foo.$(OBJEXT) bar.$(OBJEXT) cpp-works: $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c cpp-works.cpp foo.$(OBJEXT): foo.c $(CC) $(CPPFLAGS) $(CFLAGS) -c foo.c bar.$(OBJEXT): bar.cpp $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c bar.cpp ]]) AT_DATA([foo.c], [[#include int foo (int * restrict i1, int * restrict i2) { return i1[0] + i2[0]; } ]]) cp foo.c bar.cpp AT_DATA([cpp-works.cpp], [[// This file is just to test whether we have a working C++ compiler at all class foo { int x; }; class foo foobar; ]]) AT_CHECK([autoconf]) AT_CHECK([autoheader]) AT_CHECK([./configure], [], [ignore], [ignore]) AT_CHECK([${MAKE-make} cpp-works || exit 77], [], [ignore], [ignore]) AT_CHECK([${MAKE-make}], [], [ignore], [ignore]) AT_CLEANUP autoconf2.64_2.64+dfsg.orig/tests/fortran.at0000644000175000017500000000427611053525613017414 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([Fortran low level compiling/preprocessing macros.]) # Copyright (C) 2000, 2001, 2003, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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.64_2.64+dfsg.orig/tests/m4sh.at0000644000175000017500000010733111225355622016612 0ustar smcvsmcv# -*- Autotest -*- AT_BANNER([M4sh.]) # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, # 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. ## ---------------- ## ## LINENO support. ## ## ---------------- ## AT_SETUP([LINENO]) AT_KEYWORDS([m4sh]) # 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(FILE-NAME, # UNSET-LINENO = true | false, COUNTER, COUNTER-RE) # ---------------------------------------------------------------- # Produce the FILE-NAME 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 m4@&t@_divert_text([0], [ if $2; then AS@&t@_UNSET([LINENO]) fi ]) AS@&t@_LINENO_PREPARE echo "Line: $3" grep 'Line: .*$4' "$[0]" >/dev/null || AS@&t@_ERROR([cannot find original script]) exit 0 ]]) # If occurrences of $LINENO or __@&t@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 ## ---------------------- ## ## LINENO stack support. ## ## ---------------------- ## AT_SETUP([LINENO stack]) AT_KEYWORDS([m4sh]) AT_DATA_M4SH([script.as], [[AS_INIT AS_LINENO_PUSH([9999]) test $as_lineno = 9999 || AS_ERROR([bad as_lineno at depth 1]) AS_LINENO_PUSH([8888]) test $as_lineno = 9999 || AS_ERROR([bad as_lineno at depth 2]) AS_LINENO_POP test $as_lineno = 9999 || AS_ERROR([bad as_lineno at depth 1]) AS_LINENO_POP test x${as_lineno+set} = xset && AS_ERROR([as_lineno set at depth 0]) AS_EXIT([0]) ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script]) AT_CLEANUP ## ------------- ## ## AS_BASENAME. ## ## ------------- ## # Strip path from file. AT_SETUP([AS@&t@_BASENAME]) AT_KEYWORDS([m4sh]) 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([$CONFIG_SHELL ./script]) AT_CLEANUP ## ------------ ## ## AS_DIRNAME. ## ## ------------ ## # Strip filename component. AT_SETUP([AS@&t@_DIRNAME]) AT_KEYWORDS([m4sh]) 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 -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([$CONFIG_SHELL ./script]) AT_CLEANUP ## --------- ## ## AS_ECHO. ## ## --------- ## # Print literal strings, with/without newline. AT_SETUP([AS@&t@_ECHO and AS@&t@_ECHO_N]) AT_KEYWORDS([m4sh]) AT_DATA_M4SH([script.as], [[AS_INIT m4_define([ECHO_TEST], [echo=`AS_ECHO(['$1'])` test "X$echo" = 'X$1' || echo "AS@&t@_ECHO('"'$1'"') outputs '$echo'" >&2 echo=`AS_ECHO_N(['$1'])` test "X$echo" = 'X$1' || echo "AS@&t@_ECHO_N('"'$1'"') outputs '$echo'" >&2]) ECHO_TEST([-]) ECHO_TEST([--]) ECHO_TEST([---...---]) ECHO_TEST([ ]) ECHO_TEST([-e]) ECHO_TEST([-E]) ECHO_TEST([-n]) ECHO_TEST([-n -n]) ECHO_TEST([-e -n]) ECHO_TEST([ab\ncd]) ECHO_TEST([abcd\c]) ECHO_TEST([\a\b\c\f\n\r\t\v\"\]) ECHO_TEST([ab cd e]) ECHO_TEST([ ]) ECHO_TEST([ \c]) AS_EXIT(0) ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script]) AT_CLEANUP ## --------- ## ## AS_EXIT. ## ## --------- ## # Exit scripts with given status. AT_SETUP([AS@&t@_EXIT]) AT_KEYWORDS([m4sh AS@&t@_SET_STATUS]) AT_DATA_M4SH([script.as], [[AS_INIT test x${1} = xa && AS_EXIT test x${1} = xb && AS_EXIT([${2}]) test x${1} = xc && { AS_SET_STATUS([${2}]); AS_EXIT; } test x${1} = xd && trap 's=$?; echo $s; AS_EXIT([$s])' 0 test x${2} = xe && set -e test $[#] -gt 0 || AS_EXIT AS_SET_STATUS([3]) dnl Solaris /bin/sh 'set -e' doesn't react to failed function calls test x${2} = xe \ && { echo 'skipping rest of test: set -e support is lousy'; exit 77; } AS_SET_STATUS([4]) ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [1]) AT_CHECK([$CONFIG_SHELL ./script ''], [4]) AT_CHECK([$CONFIG_SHELL ./script a], [0]) AT_CHECK([$CONFIG_SHELL ./script b], [0]) AT_CHECK([$CONFIG_SHELL ./script b 0], [0]) AT_CHECK([$CONFIG_SHELL ./script b 2], [2]) AT_CHECK([$CONFIG_SHELL ./script c 0], [0]) AT_CHECK([$CONFIG_SHELL ./script c 2], [2]) AT_CHECK([$CONFIG_SHELL ./script d], [4], [[4 ]]) dnl If we got to this point without a FAIL, then AS_EXIT at least works. dnl The rest of this test relies on semi-decent 'set -e' support, even dnl though m4sh in general should not try to rely on it because of dnl portability nightmares on what constructs are considered errors across dnl various shells; therefore, an overall SKIP result is desirable on dnl broken shells like Solaris /bin/sh. AT_CHECK([$CONFIG_SHELL ./script '' e], [3]) AT_CHECK([$CONFIG_SHELL ./script d e], [3], [stdout]) dnl NetBSD sh fails to output on stderr here. AT_CHECK([grep 3 stdout || exit 77], [], [ignore]) AT_CLEANUP ## ------------ ## ## AS_MKDIR_P. ## ## ------------ ## # Build nested dirs. AT_SETUP([AS@&t@_MKDIR_P]) AT_KEYWORDS([m4sh]) 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([$CONFIG_SHELL ./script]) AT_CLEANUP ## -------------------- ## ## AS_VERSION_COMPARE. ## ## -------------------- ## # Three-way version comparison. AT_SETUP([AS@&t@_VERSION_COMPARE]) AT_KEYWORDS([m4sh]) AT_DATA_M4SH([script.as], [[AS_INIT m4_define([VERSION_COMPARE_TEST], [AS_VERSION_COMPARE([$1], [$3], [result='<'], [result='='], [result='>']) test "X$result" = "X$2" || AS_ERROR([version $1 $result $3; should be $1 $2 $3]) m4_if([$1], <, [AS_VERSION_COMPARE([$3], [$1], [result='<'], [result='='], [result='>']) test "X$result" = "X>" || AS_ERROR([version $3 $result $1; should be $3 > $1])])]) VERSION_COMPARE_TEST([], =, []) VERSION_COMPARE_TEST([1.0], =, [1.0]) VERSION_COMPARE_TEST([alpha-1.0], =, [alpha-1.0]) # These tests are taken from libc/string/tst-svc.expect. tst_svc_expect=' 000 001 00 00a 01 01a 0 0a 2.8 2.8-0.4 20 21 22 212 CP037 CP345 CP1257 foo foo-0.4 foo-0.4a foo-0.4b foo-0.5 foo-0.10.5 foo-3.01 foo-3.0 foo-3.0.0 foo-3.0.1 foo-3.2 foo-3.10 foo00 foo0 ' test1='' for test2 in $tst_svc_expect; do VERSION_COMPARE_TEST([$test1], <, [$test2]) test1=$test2 done AS_EXIT(0) ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script]) AT_CLEANUP ## ------- ## ## as_me. ## ## ------- ## AT_SETUP([as_me]) AT_KEYWORDS([m4sh]) AT_DATA_M4SH([script.as], [[AS_INIT AS_ME_PREPARE test "$as_me" = script || AS_ECHO([["incorrect value of \$as_me: $as_me"]]) ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./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_KEYWORDS([m4sh]) 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([$CONFIG_SHELL ./script]) AT_CLEANUP ## ------------------- ## ## Functions Support. ## ## ------------------- ## # Hypothesis: the shell we are running, after having checked for # $LINENO support, supports functions. AT_SETUP([Functions Support]) AT_KEYWORDS([m4sh]) 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([$CONFIG_SHELL ./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_KEYWORDS([m4sh]) 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([$CONFIG_SHELL ./script]) AT_CLEANUP ## --------------------------- ## ## Nested AS_REQUIRE_SHELL_FN ## ## --------------------------- ## # Hypothesis: M4sh expands nested AS_REQUIRE_SHELL_FN # separately. AT_SETUP([Nested AS@&t@_REQUIRE_SHELL_FN]) AT_KEYWORDS([m4sh]) AT_DATA_M4SH([script.as], [[dnl m4_define([INIT], [oops])dnl AS_INIT m4_defun([TEST_FUNC2_BODY], [ : ]) m4_defun([TEST_FUNC1_BODY], [ AS_REQUIRE_SHELL_FN([test_func2], [], [TEST_FUNC2_BODY]) : ]) AS_REQUIRE_SHELL_FN([test_func1], [], [TEST_FUNC1_BODY]) test_func2 ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script]) AT_CLEANUP ## ------------------- ## ## Nested AS_REQUIRE. ## ## ------------------- ## # Hypothesis: M4sh expands the requirements of AS_REQUIRE in the # requested diversion, even if other AS_REQUIREs are interleaved. AT_SETUP([Nested AS@&t@_REQUIRE]) AT_KEYWORDS([m4sh]) AT_DATA_M4SH([script.as], [[dnl AS_INIT m4_defun([in_fn_diversion], still_in_m4sh_init_fn=yes) m4_defun([not_in_fn_diversion], still_in_m4sh_init_fn=no) m4_defun([NESTED], [nested_require_in_fn_diversion=$still_in_m4sh_init_fn]) m4_defun([OUTER], [AS_REQUIRE([NESTED])dnl outer_require_in_fn_diversion=$still_in_m4sh_init_fn]) m4_defun([test_init], [ AS_REQUIRE([in_fn_diversion], , [M4SH-INIT-FN]) AS_REQUIRE([OUTER], , [M4SH-INIT-FN]) AS_REQUIRE([not_in_fn_diversion], , [M4SH-INIT-FN]) ]) test_init if test $outer_require_in_fn_diversion != yes; then AS_EXIT([1]); fi if test $nested_require_in_fn_diversion != no; then AS_EXIT([1]); fi ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script]) AT_CLEANUP ## ------------------------------------ ## ## AS_REQUIRE_SHELL_FN and m4_require. ## ## ------------------------------------ ## # Hypothesis: M4sh expands the requirements of AS_REQUIRE_SHELL_FN # in M4SH-INIT-FN. This changed after Autoconf 2.63. AT_SETUP([AS@&t@_REQUIRE_SHELL_FN and m4@&t@_require]) AT_KEYWORDS([m4sh]) AT_DATA_M4SH([script.as], [[dnl AS_INIT m4_defun([in_m4_sh_init], still_in_m4sh_init=yes) m4_defun([not_in_m4_sh_init], still_in_m4sh_init=no) m4_defun([error_if_emitted_in_m4sh_init], [ if test x$still_in_m4sh_init = xyes; then AS_ERROR([requirement emitted in M4SH-INIT]) fi ]) m4_defun([TEST_FUNC_BODY], [ m4_require([error_if_emitted_in_m4sh_init]) : echo in shell function, with parameter = [$]1 ]) m4_defun([test_init], [ AS_REQUIRE([in_m4_sh_init], , [M4SH-INIT-FN]) AS_REQUIRE_SHELL_FN([test_func], [], [TEST_FUNC_BODY]) AS_REQUIRE([not_in_m4_sh_init]) ]) test_init test_func parameter1 ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script]) AT_CLEANUP ## -------------- ## ## AS_HELP_STRING ## ## -------------- ## AT_SETUP([AS@&t@_HELP_STRING]) AT_KEYWORDS([m4sh m4@&t@_text_wrap m4@&t@_expand]) AT_DATA_M4SH([script.as], [[AS_INIT 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.])" echo "AS_HELP_STRING([--fooT=barT], [foo bar])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@], [foo bar])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@123456789], [foo bar])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@1234567890], [foo bar])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@12345678901], [foo bar])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@123456789012], [foo bar])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@1234567890123], [foo bar])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@], [some other text which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@123456789], [some other text which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@1234567890], [some other text which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@12345678901], [some other text which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@123456789012], [some other text which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@1234567890123], [some other text which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@], [some other @<][:@ex@:][>@ which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@123456789], [some other @<][:@ex@:][>@ which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@1234567890], [some other @<][:@ex@:][>@ which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@12345678901], [some other @<][:@ex@:][>@ which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@123456789012], [some other @<][:@ex@:][>@ which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([--foo@<][:@=bar@:][>@1234567890123], [some other @<][:@ex@:][>@ which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([[--foo[=bar]]], [some other t[]t which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([[--foo[=bar]123456789]], [some other t[]t which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([[--foo[=bar]1234567890]], [some other t[]t which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([[--foo[=bar]12345678901]], [some other t[]t which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([[--foo[=bar]123456789012]], [some other t[]t which should wrap at our default of 80 characters.])" echo "AS_HELP_STRING([[--foo[=bar]1234567890123]], [some other t[]t which should wrap at our default of 80 characters.])" m4_define([mac], [MACRO])dnl echo "AS_HELP_STRING([--mac], [mac])" echo "AS_HELP_STRING([--o1, --o2], [two options, one description])" echo "AS_HELP_STRING([[[--o3, --o4]]], [comma inside literal quoting])" echo "AS_HELP_STRING([--tune1], [check out the tuned formatting], [ ])" echo "AS_HELP_STRING([--tune2], [check out the tuned formatting], [12])" echo "AS_HELP_STRING([--tune3], [check out the tuned formatting], [], [40])" echo "AS_HELP_STRING([--tune4], [check out the tuned formatting], [12], [40])" ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [0], [[ --an-option some text --another-much-longer-option some other text which should wrap at our default of 80 characters. --fooT=barT foo bar --foo[=bar] foo bar --foo[=bar]123456789 foo bar --foo[=bar]1234567890 foo bar --foo[=bar]12345678901 foo bar --foo[=bar]123456789012 foo bar --foo[=bar]1234567890123 foo bar --foo[=bar] some other text which should wrap at our default of 80 characters. --foo[=bar]123456789 some other text which should wrap at our default of 80 characters. --foo[=bar]1234567890 some other text which should wrap at our default of 80 characters. --foo[=bar]12345678901 some other text which should wrap at our default of 80 characters. --foo[=bar]123456789012 some other text which should wrap at our default of 80 characters. --foo[=bar]1234567890123 some other text which should wrap at our default of 80 characters. --foo[=bar] some other [ex] which should wrap at our default of 80 characters. --foo[=bar]123456789 some other [ex] which should wrap at our default of 80 characters. --foo[=bar]1234567890 some other [ex] which should wrap at our default of 80 characters. --foo[=bar]12345678901 some other [ex] which should wrap at our default of 80 characters. --foo[=bar]123456789012 some other [ex] which should wrap at our default of 80 characters. --foo[=bar]1234567890123 some other [ex] which should wrap at our default of 80 characters. --foo[=bar] some other t[]t which should wrap at our default of 80 characters. --foo[=bar]123456789 some other t[]t which should wrap at our default of 80 characters. --foo[=bar]1234567890 some other t[]t which should wrap at our default of 80 characters. --foo[=bar]12345678901 some other t[]t which should wrap at our default of 80 characters. --foo[=bar]123456789012 some other t[]t which should wrap at our default of 80 characters. --foo[=bar]1234567890123 some other t[]t which should wrap at our default of 80 characters. --MACRO mac --o1, --o2 two options, one description [--o3, --o4] comma inside literal quoting --tune1 check out the tuned formatting --tune2 check out the tuned formatting --tune3 check out the tuned formatting --tune4 check out the tuned formatting ]]) AT_CLEANUP ## ------------------- ## ## AS_IF and AS_CASE. ## ## ------------------- ## AT_SETUP([AS@&t@_IF and AS@&t@_CASE]) AT_KEYWORDS([m4sh m4@&t@_map_args_pair]) AT_DATA_M4SH([script.as], [[dnl AS_INIT # Syntax checks: cope with empty arguments. AS_IF([:], [], [echo wrong]) AS_IF([:], [echo one], [echo wrong]) AS_IF([false], [echo wrong], [echo two]) AS_IF([false], [echo wrong]) # n-ary version AS_IF([false], [echo wrong], [:], [echo three]) AS_IF([false], [echo wrong], [:], [echo four], [echo wrong]) AS_IF([false], [echo wrong], [false], [echo wrong]) AS_IF([false], [echo wrong], [false], [echo wrong], [echo five]) AS_IF([false], [echo wrong], [false], [echo wrong], [:], [echo six], [echo wrong]) AS_CASE([foo]) AS_CASE([foo], [echo seven]) AS_CASE([foo], [foo], [echo eight], [echo wrong]) AS_CASE([foo], [foo], [echo nine], [*], [echo wrong]) AS_CASE([foo], [bar], [echo wrong], [foo], [echo ten], [*], [echo wrong]) # check for nesting, lists, and side effects, and quoting robustness empty= AS_IF([AS_IF([$empty], [echo eleven])]) && AS_CASE([foo]) && echo twelve rm -f file AS_IF([touch file; false]) && echo thirteen test -f file && echo fourteen rm -f file AS_CASE([`touch file; false`]) && test -f file && echo fifteen dnl The next line is badly underquoted; don't intentionally copy this style. AS_CASE([foo], [foo], m4_do(AS_CASE([bar], [bar], [echo sixteen]))) dnl Handle blank arguments. AS_IF([false], [:], [ ]) && AS_CASE([foo], [foo], [] ) && echo seventeen m4_define([empty])AS_IF([:], [empty] ) && AS_CASE([foo], [foo], [empty]) && echo eighteen dnl We can't handle AS_IF([false], [:], [empty]) unless m4_expand is dnl taught how to handle m4_require. The user is responsible for dnl avoiding the syntax error in that case. # check that require works correctly m4_for([n], 1, 9, [], [m4_defun([FOO]n, [foo]n[=]n)dnl m4_defun([BAR]n, [m4_require([FOO]]n[)dnl bar]n[=]n)[]dnl ]) AS_IF([:], [BAR1]) echo "foo1=$foo1 bar1=$bar1" AS_IF([:], [], [BAR2]) echo "foo2=$foo2 bar2=$bar2" AS_IF([false], [BAR3]) echo "foo3=$foo3 bar3=$bar3" AS_IF([false], [], [BAR4]) echo "foo4=$foo4 bar4=$bar4" AS_CASE([x], [x], [BAR5]) echo "foo5=$foo5 bar5=$bar5" AS_CASE([x], [y], [BAR6]) echo "foo6=$foo6 bar6=$bar6" AS_CASE([x], [x], [:], [BAR7]) echo "foo7=$foo7 bar7=$bar7" AS_CASE([x], [y], [:], [BAR8]) echo "foo8=$foo8 bar8=$bar8" AS_CASE([x], [y], [:], [x], [BAR9]) echo "foo9=$foo9 bar9=$bar9" ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [0], [[one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen foo1=1 bar1=1 foo2=2 bar2= foo3=3 bar3= foo4=4 bar4=4 foo5=5 bar5=5 foo6=6 bar6= foo7=7 bar7= foo8=8 bar8=8 foo9=9 bar9=9 ]]) dnl stress test for large number of conditionals dnl too large, and we start tickling shell bugs m4_pushdef([limit], [1000])dnl AT_DATA_M4SH([script.as], [[dnl AS_INIT AS_IF(m4_shift(m4_for([i], [1], ]limit[, [], [, test $[1] = i, echo i]))) AS_IF(m4_shift(m4_for([i], [1], ]limit[, [], [, test $[1] = i, echo i])), [echo default]) AS_CASE([$[1]]m4_for([i], [1], ]limit[, [], [, i, echo i])) AS_CASE([$[1]]m4_for([i], [1], ]limit[, [], [, i, echo i]), [echo default]) ]]) dnl Add --force so autom4te doesn't think `script' is still up to date. AT_CHECK_M4SH([--force]) AT_CHECK([$CONFIG_SHELL ./script 1], [0], [[1 1 1 1 ]]) AT_CHECK([$CONFIG_SHELL ./script limit], [0], [limit limit limit limit ]) AT_CHECK([$CONFIG_SHELL ./script default], [0], [[default default ]]) m4_popdef([limit]) AT_CLEANUP ## -------- ## ## AS_FOR. ## ## -------- ## AT_SETUP([AS@&t@_FOR]) AT_KEYWORDS([m4sh]) AT_DATA_M4SH([script.as], [[dnl AS_INIT # Simple checks. AS_FOR([m4var], [shvar], [a], [echo "m4var $shvar"]) AS_FOR([m4var], [shvar], [b c], [echo "m4var $shvar"]) list='d e' AS_FOR([m4var], [shvar], [$list], [echo "m4var $shvar"]) AS_FOR([m4var], [shvar], ["$list"], [echo "m4var $shvar"]) AS_FOR([m4var], [shvar], ['$list'], [echo "m4var $shvar"]) AS_FOR([m4var], [shvar], [\'], [echo "m4var $shvar"]) # Syntax checks: cope with empty/blank arguments. set f g AS_FOR([], [shvar], [], [echo "m4_defn([]) $shvar"]) rm -f file AS_FOR([], [shvar], [`touch file`]) test -f file || exit 1 AS_FOR([], [shvar], [], [ ]) m4_define([empty])AS_FOR([], [shvar], [], [empty]) # Check that break works. while : do AS_FOR([m4var], [shvar], [h i], [echo "m4var"; break 2]) exit 1 done while : do AS_FOR([m4var], [shvar], [j], [echo "m4var"; break 2]) exit 1 done ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [0], [[a a b b c c d d e e d e d e $list $list ' ' f f g g h j ]]) AT_CLEANUP ## --------------- ## ## AS_LITERAL_IF. ## ## --------------- ## AT_SETUP([AS@&t@_LITERAL_IF]) AT_KEYWORDS([m4sh]) AT_DATA_M4SH([script.as], [[dnl AS_INIT echo AS_LITERAL_IF([lit], [ok], [ERR]) 1 echo AS_LITERAL_IF([l$it], [ERR], [ok]) 2 echo AS_LITERAL_IF([l``it], [ERR], [ok]) 3 m4_define([mac], [lit]) echo AS_LITERAL_IF([mac], [ok], [ERR]) 4 echo AS_LITERAL_IF([mac($, ``)], [ok], [ERR]) 5 m4_define([mac], [l$it]) echo AS_LITERAL_IF([mac], [ERR], [ok]) 6 m4_define([mac], [l`it]) echo AS_LITERAL_IF([mac], [ERR], [ok]) 7 ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [], [[ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ]]) AT_CLEANUP ## ---------- ## ## AS_VAR_*. ## ## ---------- ## AT_SETUP([AS@&t@_VAR basics]) AT_KEYWORDS([m4sh AS@&t@_VAR_COPY AS@&t@_VAR_SET AS@&t@_VAR_GET]) AT_KEYWORDS([AS@&t@_VAR_TEST_SET AS@&t@_VAR_SET_IF AS@&t@_VAR_IF]) AT_KEYWORDS([AS@&t@_VAR_PUSHDEF AS@&t@_VAR_POPDEF]) AT_DATA_M4SH([script.as], [[dnl AS_INIT m4_define([with], [WITH]) # Literals. dnl AS_VAR_SET_IF also covers AS_VAR_TEST_SET AS_VAR_SET_IF([foo], [echo oops]) && echo ok AS_VAR_SET([foo], ['\a "weird" `value` with; $fun '\''characters ']) # 'font-lock AS_VAR_COPY([bar], [foo]) AS_ECHO(["$bar-"]) AS_ECHO(["AS_VAR_GET([foo])-"]) AS_VAR_SET_IF([foo], [echo ok], [echo oops]) AS_VAR_IF([foo], [string], [echo oops]) && echo ok AS_VAR_PUSHDEF([tmp], [foo]) AS_VAR_IF([tmp], ['\a "weird" `value` with; $fun '\''characters '], [echo ok], [echo oops]) # 'font-lock AS_VAR_POPDEF([tmp]) m4_ifdef([tmp], [echo oops]) # Indirects via shell vars. echo '====' num=1 AS_VAR_SET_IF([foo$num], [echo oops]) && echo ok AS_VAR_SET([foo$num], ['\a "weird" `value` with; $fun '\''characters ']) # 'font-lock AS_VAR_COPY([bar], [foo$num]) num=2 AS_VAR_COPY([foo$num], [bar]) AS_ECHO(["$foo2-"]) AS_ECHO(["AS_VAR_GET([foo$num])-"]) AS_VAR_SET_IF([foo$num], [echo ok], [echo oops]) AS_VAR_IF([foo$num], [string], [echo oops]) && echo ok AS_VAR_PUSHDEF([tmp], [foo$num]) AS_VAR_IF([tmp], ['\a "weird" `value` with; $fun '\''characters '], [echo ok], [echo oops]) # 'font-lock AS_VAR_POPDEF([tmp]) m4_ifdef([tmp], [echo oops]) # Indirects via command substitution. echo '====' AS_VAR_SET_IF([`echo foo3`], [echo oops]) && echo ok AS_VAR_SET([`echo foo3`], ['\a "weird" `value` with; $fun '\''characters ']) # 'font-lock AS_VAR_COPY([bar], [`echo foo3`]) num=2 AS_VAR_COPY([`echo foo4`], [bar]) AS_ECHO(["$foo4-"]) AS_ECHO(["AS_VAR_GET([`echo foo4`])-"]) AS_VAR_SET_IF([`echo foo4`], [echo ok], [echo oops]) AS_VAR_IF([`echo foo4`], [string], [echo oops]) && echo ok AS_VAR_PUSHDEF([tmp], [`echo foo4`]) AS_VAR_IF([tmp], ['\a "weird" `value` with; $fun '\''characters '], [echo ok], [echo oops]) # 'font-lock AS_VAR_POPDEF([tmp]) m4_ifdef([tmp], [echo oops]) : ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [], [[ok \a "weird" `value` WITH; $fun 'characters - \a "weird" `value` WITH; $fun 'characters - ok ok ok ==== ok \a "weird" `value` WITH; $fun 'characters - \a "weird" `value` WITH; $fun 'characters- ok ok ok ==== ok \a "weird" `value` WITH; $fun 'characters - \a "weird" `value` WITH; $fun 'characters- ok ok ok ]]) AT_CLEANUP ## --------------- ## ## AS_VAR_APPEND. ## ## --------------- ## AT_SETUP([AS@&t@_VAR_APPEND]) AT_KEYWORDS([m4sh AS@&t@_VAR]) AT_DATA_M4SH([script.as], [[dnl AS_INIT # Literals. AS_VAR_APPEND([foo], ["hello, "]) AS_VAR_APPEND([foo], [world]) echo "$foo" # Indirects via shell vars. num=1 AS_VAR_APPEND([foo$num], ['hello, ']) AS_VAR_APPEND([foo$num], [`echo "world"`]) echo "$foo1" # Indirects via command substitution. h=hello w=', world' AS_VAR_APPEND([`echo foo2`], [${h}]) AS_VAR_APPEND([`echo foo2`], ["$w"]) echo "$foo2" ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [], [[hello, world hello, world hello, world ]]) AT_CLEANUP ## -------------- ## ## AS_VAR_ARITH. ## ## -------------- ## AT_SETUP([AS@&t@_VAR_ARITH]) AT_KEYWORDS([m4sh AS@&t@_VAR]) AT_DATA_M4SH([script.as], [[dnl AS_INIT # Literals. AS_VAR_ARITH([foo], [1 + 1]) echo "$foo" # Indirects via shell vars. num=1 AS_VAR_ARITH([foo$num], [\( 2 + 3 \) \* 4]) echo "$foo1" # Indirects via command substitution. AS_VAR_ARITH([`echo foo2`], [0 + -2 + $foo1 / 2]) echo "$foo2" ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [], [[2 20 8 ]]) AT_CLEANUP ## ----------------- ## ## AS_INIT cleanup. ## ## ----------------- ## AT_SETUP([AS@&t@_INIT cleanup]) AT_KEYWORDS([m4sh m4@&t@_wrap m4@&t@_wrap_lifo]) AT_DATA_M4SH([script.as], [[dnl dnl Registered before AS_INIT's cleanups m4_wrap([echo cleanup 1 ]) m4_pushdef([_AS_SHELL_FN_SPY])dnl neutralize the spy, we don't care about it AS_INIT dnl Registered after AS_INIT's cleanups, thus goes to KILL diversion m4_wrap([echo cleanup 2 dnl However, nested wraps and diversions can still be used dnl Also, test wrapping text that looks like parameter reference m4_wrap([echo cleanup 3 m4_divert_text([M4SH-INIT], [m4_define([foo], [$1])dnl echo prep foo([4]) ])])]) dnl Registered before AS_INIT's cleanups m4_wrap_lifo([echo cleanup 5 ]) echo body ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [], [[prep 4 body cleanup 5 cleanup 1 ]]) AT_CLEANUP ## ------------------- ## ## AS_INIT_GENERATED. ## ## ------------------- ## AT_SETUP([AS@&t@_INIT_GENERATED]) AT_KEYWORDS([AS@&t@_MESSAGE AS@&t@_MESSAGE_LOG_FD]) dnl First run, no logging, tests shell selection AT_DATA_M4SH([script.as], [[dnl AS_INIT AS_INIT_GENERATED([child], [echo hello from child]) cat >>child <<\EOF AS_ECHO(["SHELL=$SHELL"]) EOF echo hello from parent AS_ECHO(["SHELL=$SHELL"]) ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [0], [stdout]) AT_CHECK([grep 'SHELL=.' stdout], [0], [ignore]) sed s/parent/child/ expout AT_CHECK([./child], [0], [expout]) SHELL=/bogus export SHELL cp stdout expout mv child child.bak AT_CHECK([$CONFIG_SHELL ./script], [0], [expout]) AT_CHECK([cmp child child.bak]) AT_CHECK([grep 'SHELL=.' stdout], [0], [ignore]) sed s/parent/child/ expout AT_CHECK([./child], [0], [expout]) dnl Second run, with logging from parent and child, tests fd handling AT_DATA_M4SH([script.as], [[dnl AS_INIT child=${1-child} m4_define([AS_MESSAGE_LOG_FD], [5]) exec AS_MESSAGE_LOG_FD>log AS_INIT_GENERATED([$child], [echo hello1 from $child]) || AS_EXIT([1]) cat >>$child <<\EOF m4_pushdef([AS_MESSAGE_LOG_FD]) AS_MESSAGE([hello2 from ${child}child]) m4_popdef([AS_MESSAGE_LOG_FD]) exec AS_MESSAGE_LOG_FD>>log AS_MESSAGE([hello3 from child]) EOF AS_MESSAGE([hello from parent]) dnl close log in parent before spawning child, for mingw exec AS_MESSAGE_LOG_FD>&- ./$child ]]) rm -f script AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [0], [[script: hello from parent hello1 from child child: hello2 from child child: hello3 from child ]]) AT_CHECK([[sed 's,:[0-9][0-9]*:,:0:,' log]], [0], [[script:0: hello from parent child:0: hello3 from child ]]) # Force write error creating a file on stdout if test -w /dev/full && test -c /dev/full; then AT_CHECK([$CONFIG_SHELL ./script /dev/full], [1], [ignore], [ignore]) fi AT_CLEANUP ## --------------- ## ## AS_MESSAGE_FD. ## ## --------------- ## AT_SETUP([AS@&t@_MESSAGE_FD]) AT_KEYWORDS([AS@&t@_MESSAGE AS@&t@_MESSAGE_LOG_FD AS@&t_ORIGINAL_STDIN_FD]) AT_KEYWORDS([AS@&t@_LINENO_PUSH]) AT_DATA_M4SH([script.as], [[dnl AS_INIT m4_define([AS_ORIGINAL_STDIN_FD], [5]) m4_define([AS_MESSAGE_LOG_FD], [6]) m4_define([AS_MESSAGE_FD], [7]) exec AS_ORIGINAL_STDIN_FD<&0 log if test $[#] -gt 0; then exec AS_MESSAGE_FD>/dev/null else exec AS_MESSAGE_FD>&1 fi AS_LINENO_PUSH([100]) cat # tests that stdin is neutralized AS_MESSAGE([hello world]) cat <&AS_ORIGINAL_STDIN_FD ]]) AT_CHECK_M4SH AT_CHECK([echo goodbye | $CONFIG_SHELL ./script], [0], [[script: hello world goodbye ]]) AT_CHECK([cat log], [0], [[script:100: hello world ]]) rm log AT_CHECK([echo goodbye | $CONFIG_SHELL ./script silent], [0], [[goodbye ]]) AT_CHECK([cat log], [0], [[script:100: hello world ]]) AT_CLEANUP ## --------------- ## ## _AS_CLEAN_DIR. ## ## --------------- ## AT_SETUP([_AS@&t@_CLEAN_DIR]) dnl ensure that we can erase all files in a directory. Note that dnl _AS_CLEAN_DIR needs three globs to catch all these files. AT_DATA_M4SH([script.as], [[dnl AS_INIT # Unwritable subdirectories are common during 'make distcheck'. mkdir sub sub/unwritable || AS_ERROR([failed to mkdir]) touch sub/unwritable/file || AS_ERROR([failed to touch]) chmod a-wx sub/unwritable || AS_ERROR([failed to chmod]) # Cygwin 1.5 can't touch 'sub/...', so make that file optional. touch sub/a sub/aa sub/aaa sub/.a sub/..a sub/.aa \ || AS_ERROR([failed to touch]) touch sub/... 2>/dev/null _AS_CLEAN_DIR([sub]) || AS_ERROR([failed to clean]) # rmdir instead of 'rm -fr' here proves that we emptied sub. rmdir sub || AS_ERROR([failed to rmdir]) ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script]) AT_CLEANUP ## -------- ## ## ECHO_C. ## ## -------- ## AT_SETUP([ECHO_C]) AT_DATA_M4SH([script.as], [[dnl AS_INIT _AS_PREPARE foo=`echo foobar` echo "$foo" ]]) AT_CHECK_M4SH AT_CHECK([$CONFIG_SHELL ./script], [], [foobar ]) AT_CLEANUP autoconf2.64_2.64+dfsg.orig/.version0000644000175000017500000000000511233217112015711 0ustar smcvsmcv2.64 autoconf2.64_2.64+dfsg.orig/TODO0000644000175000017500000005605511204770547014751 0ustar smcvsmcv-*- 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. ** --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. Have a way to specify different default flags to try; see this thread for more information: . * 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? ** 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], $@)! Fixed in M4 1.6, but we can't rely on it yet. ** m4 loops As of 2.63, m4_for has a fixed iteration count for speed in the common usage case. But it used to allow the user to alter iteration count by reassigning the iterator, allowing a break-like functionality (or even infloops). Does this need a new (but maybe slower) macro? Should we also provide something like m4_while([TEST], [EXPR])? Maybe an m4_break() that works inside a looping construct? http://lists.gnu.org/archive/html/autoconf-patches/2008-08/msg00121.html * 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 ------------------------------------------------------------------------------ * 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: ** 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 ------------------------------------------------------------------------------ * Provide a way to create a config.h *and* set the DEFS variable from within the same configure script. ------------------------------------------------------------------------------ In config.status comment, put the host/target/build types, if used. ------------------------------------------------------------------------------ It would be nice if I could (in the Makefile.in files) set the relative name of 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" ------------------------------------------------------------------------------ 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 files, 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 names 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_CHECK_PROGS(AR_FOR_TARGET, [$target-ar, $prefix/$target/bin/ar], $target-ar) AC_CHECK_PROGS(RANLIB_FOR_TARGET, $target-ranlib, $target-ranlib) [$target-ranlib, $prefix/$target/bin/ranlib], $target-ranlib) AC_CHECK_PROGS(GCC_FOR_TARGET, $target-gcc, $target-gcc) [$target-gcc, $prefix/$target/bin/gcc], $target-gcc) fi From: nennker@cs.tu-berlin.DE (Axel Nennker) (also look in the autoconf mailing list archives for the proposed CHECK_TARGET_TOOL macro from Natanael Nerode, a gcc configury guru). ------------------------------------------------------------------------------ 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 file system layouts, e.g. SVR4, Linux. Of course, this can be done locally with config.site. ------------------------------------------------------------------------------ I wonder if it is possible to get the name of 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 ------------------------------------------------------------------------------ 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, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. autoconf2.64_2.64+dfsg.orig/man/0000755000175000017500000000000011233220605015004 5ustar smcvsmcvautoconf2.64_2.64+dfsg.orig/man/autoheader.x0000644000175000017500000000007507043564516017340 0ustar smcvsmcv[name] autoheader \- Create a template header for configure autoconf2.64_2.64+dfsg.orig/man/autom4te.x0000644000175000017500000000007307327232432016751 0ustar smcvsmcv[name] autom4te \- Generate files and scripts thanks to M4 autoconf2.64_2.64+dfsg.orig/man/Makefile.am0000644000175000017500000000453710775461234017070 0ustar smcvsmcv# Make Autoconf man pages. # Copyright (C) 2001, 2004-2008 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 3 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, see . dist_man_MANS = \ $(srcdir)/autoconf.1 \ $(srcdir)/autoheader.1 \ $(srcdir)/autom4te.1 \ $(srcdir)/autoreconf.1 \ $(srcdir)/autoscan.1 \ $(srcdir)/autoupdate.1 \ $(srcdir)/ifnames.1 \ $(srcdir)/config.guess.1 \ $(srcdir)/config.sub.1 EXTRA_DIST = $(dist_man_MANS:.1=.x) common.x MAINTAINERCLEANFILES = $(dist_man_MANS) # Depend on .version to get version number changes. common_dep = $(top_srcdir)/.version $(srcdir)/common.x binsrcdir = $(top_srcdir)/bin $(srcdir)/autoconf.1: $(common_dep) $(binsrcdir)/autoconf.as $(srcdir)/autoheader.1: $(common_dep) $(binsrcdir)/autoheader.in $(srcdir)/autom4te.1: $(common_dep) $(binsrcdir)/autom4te.in $(srcdir)/autoreconf.1: $(common_dep) $(binsrcdir)/autoreconf.in $(srcdir)/autoscan.1: $(common_dep) $(binsrcdir)/autoscan.in $(srcdir)/autoupdate.1: $(common_dep) $(binsrcdir)/autoupdate.in $(srcdir)/ifnames.1: $(common_dep) $(binsrcdir)/ifnames.in # Independent from this package. $(srcdir)/config.guess.1: $(top_srcdir)/build-aux/config.guess $(srcdir)/config.sub.1: $(top_srcdir)/build-aux/config.sub remove_time_stamp = 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/' MOSTLYCLEANFILES = $(srcdir)/*.t SUFFIXES = .x .1 .x.1: @echo "Updating man page $@" PATH="$(top_builddir)/tests$(PATH_SEPARATOR)$(top_srcdir)/build-aux$(PATH_SEPARATOR)$$PATH"; \ export PATH; \ $(HELP2MAN) \ --include=$*.x \ --include=$(srcdir)/common.x \ --source='$(PACKAGE_STRING)' \ --output=$@.t `echo '$*' | sed 's,.*/,,'` if sed $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \ sed $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \ touch $@; \ else \ mv $@.t $@; \ fi rm -f $@*.t autoconf2.64_2.64+dfsg.orig/man/ifnames.x0000644000175000017500000000010007043564516016626 0ustar smcvsmcv[name] ifnames \- Extract CPP conditionals from a set of files autoconf2.64_2.64+dfsg.orig/man/autoupdate.10000644000175000017500000000365511233217162017256 0ustar smcvsmcv.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH AUTOUPDATE "1" "July 2009" "GNU Autoconf 2.64" "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 each 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 . GNU Autoconf home page: . General help using GNU software: . .SH COPYRIGHT Copyright \(co 2009 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .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.64_2.64+dfsg.orig/man/autoconf.x0000644000175000017500000000006307043564516017032 0ustar smcvsmcv[name] autoconf \- Generate configuration scripts autoconf2.64_2.64+dfsg.orig/man/Makefile.in0000644000175000017500000003477111233217355017075 0ustar smcvsmcv# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # Make Autoconf man pages. # Copyright (C) 2001, 2004-2008 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 3 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, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_man_MANS = \ $(srcdir)/autoconf.1 \ $(srcdir)/autoheader.1 \ $(srcdir)/autom4te.1 \ $(srcdir)/autoreconf.1 \ $(srcdir)/autoscan.1 \ $(srcdir)/autoupdate.1 \ $(srcdir)/ifnames.1 \ $(srcdir)/config.guess.1 \ $(srcdir)/config.sub.1 EXTRA_DIST = $(dist_man_MANS:.1=.x) common.x MAINTAINERCLEANFILES = $(dist_man_MANS) # Depend on .version to get version number changes. common_dep = $(top_srcdir)/.version $(srcdir)/common.x binsrcdir = $(top_srcdir)/bin remove_time_stamp = 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/' MOSTLYCLEANFILES = $(srcdir)/*.t SUFFIXES = .x .1 all: all-am .SUFFIXES: .SUFFIXES: .x .1 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu man/Makefile .PRECIOUS: 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 $(am__aclocal_m4_deps): install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-man uninstall-man1 $(srcdir)/autoconf.1: $(common_dep) $(binsrcdir)/autoconf.as $(srcdir)/autoheader.1: $(common_dep) $(binsrcdir)/autoheader.in $(srcdir)/autom4te.1: $(common_dep) $(binsrcdir)/autom4te.in $(srcdir)/autoreconf.1: $(common_dep) $(binsrcdir)/autoreconf.in $(srcdir)/autoscan.1: $(common_dep) $(binsrcdir)/autoscan.in $(srcdir)/autoupdate.1: $(common_dep) $(binsrcdir)/autoupdate.in $(srcdir)/ifnames.1: $(common_dep) $(binsrcdir)/ifnames.in # Independent from this package. $(srcdir)/config.guess.1: $(top_srcdir)/build-aux/config.guess $(srcdir)/config.sub.1: $(top_srcdir)/build-aux/config.sub .x.1: @echo "Updating man page $@" PATH="$(top_builddir)/tests$(PATH_SEPARATOR)$(top_srcdir)/build-aux$(PATH_SEPARATOR)$$PATH"; \ export PATH; \ $(HELP2MAN) \ --include=$*.x \ --include=$(srcdir)/common.x \ --source='$(PACKAGE_STRING)' \ --output=$@.t `echo '$*' | sed 's,.*/,,'` if sed $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \ sed $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \ touch $@; \ else \ mv $@.t $@; \ fi rm -f $@*.t # 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.64_2.64+dfsg.orig/man/autoreconf.x0000644000175000017500000000007207043564516017361 0ustar smcvsmcv[name] autoreconf \- Update generated configuration files autoconf2.64_2.64+dfsg.orig/man/autoreconf.10000644000175000017500000000661011233217153017242 0ustar smcvsmcv.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH AUTORECONF "1" "July 2009" "GNU Autoconf 2.64" "User Commands" .SH NAME autoreconf \- Update generated configuration files .SH SYNOPSIS .B autoreconf [\fIOPTION\fR]... [\fIDIRECTORY\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 specified DIRECTORIES and their subdirectories (defaulting to `.'). .PP By default, it only remakes those files that are older than their sources. If you install new versions of the GNU Build System, you can make `autoreconf' remake 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\-\-no\-recursive\fR don't rebuild sub\-packages .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 (default in gnu and gnits modes) .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, M4, and MAKE are honored. .SH AUTHOR Written by David J. MacKenzie and Akim Demaille. .SH "REPORTING BUGS" Report bugs to . GNU Autoconf home page: . General help using GNU software: . .SH COPYRIGHT Copyright \(co 2009 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .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.64_2.64+dfsg.orig/man/config.guess.10000644000175000017500000000375611233216176017503 0ustar smcvsmcv.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH CONFIG.GUESS "1" "July 2009" "GNU Autoconf 2.64" "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, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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.64_2.64+dfsg.orig/man/autoheader.10000644000175000017500000000504011233217144017212 0ustar smcvsmcv.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH AUTOHEADER "1" "July 2009" "GNU Autoconf 2.64" "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 (default in gnu and gnits modes) .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 . GNU Autoconf home page: . General help using GNU software: . .SH COPYRIGHT Copyright \(co 2009 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .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.64_2.64+dfsg.orig/man/autom4te.10000644000175000017500000001074311233217154016642 0ustar smcvsmcv.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH AUTOM4TE "1" "July 2009" "GNU Autoconf 2.64" "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 (default in gnu and gnits modes) .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 variables `M4' and `WARNINGS' are 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:FORMAT] 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 .SS "FORMAT defaults to `$f:$l:$n:$%', and can use the following escapes:" .TP $$ literal $ .TP $f file where macro was called .TP $l line where macro was called .TP $d nesting depth of macro call .TP $n name of the macro .TP $NUM argument NUM, unquoted and with newlines .TP $SEP@ all arguments, with newlines, quoted, and separated by SEP .TP $SEP* all arguments, with newlines, unquoted, and separated by SEP .TP $SEP% all arguments, without newlines, unquoted, and separated by SEP .PP SEP can be empty for the default (comma for @ and *, colon for %), a single character for that character, or {STRING} to use a string. .SH AUTHOR Written by Akim Demaille. .SH "REPORTING BUGS" Report bugs to . GNU Autoconf home page: . General help using GNU software: . .SH COPYRIGHT Copyright \(co 2009 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .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.64_2.64+dfsg.orig/man/autoupdate.x0000644000175000017500000000010007043564516017357 0ustar smcvsmcv[name] autoupdate \- Update a configure.in to a newer Autoconf autoconf2.64_2.64+dfsg.orig/man/config.sub.10000644000175000017500000000224511233216200017122 0ustar smcvsmcv.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH CONFIG.SUB "1" "July 2009" "GNU Autoconf 2.64" "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 \&../build\-aux/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, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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.64_2.64+dfsg.orig/man/autoconf.10000644000175000017500000000544511233217145016721 0ustar smcvsmcv.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH AUTOCONF "1" "July 2009" "GNU Autoconf 2.64" "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 variables `M4' and `WARNINGS' are 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:FORMAT] 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. FORMAT defaults to `$f:$l:$n:$%'; see `autom4te \fB\-\-help\fR' for information about FORMAT. .SH AUTHOR Written by David J. MacKenzie and Akim Demaille. .SH "REPORTING BUGS" Report bugs to . GNU Autoconf home page: . General help using GNU software: . .SH COPYRIGHT Copyright \(co 2009 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .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.64_2.64+dfsg.orig/man/common.x0000644000175000017500000000031107213461463016474 0ustar smcvsmcv[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.64_2.64+dfsg.orig/man/autoscan.x0000644000175000017500000000007007043564516017027 0ustar smcvsmcv[name] autoscan \- Generate a preliminary configure.in autoconf2.64_2.64+dfsg.orig/man/config.sub.x0000644000175000017500000000012207230620434017233 0ustar smcvsmcv--no-info [name] config.sub \- validate and canonicalize a configuration triplet autoconf2.64_2.64+dfsg.orig/man/config.guess.x0000644000175000017500000000165207230620434017601 0ustar smcvsmcv--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.64_2.64+dfsg.orig/man/autoscan.10000644000175000017500000000367011233217162016715 0ustar smcvsmcv.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH AUTOSCAN "1" "July 2009" "GNU Autoconf 2.64" "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 . GNU Autoconf home page: . General help using GNU software: . .SH COPYRIGHT Copyright \(co 2009 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .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.64_2.64+dfsg.orig/man/ifnames.10000644000175000017500000000325211233217164016520 0ustar smcvsmcv.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH IFNAMES "1" "July 2009" "GNU Autoconf 2.64" "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 . GNU Autoconf home page: . General help using GNU software: . .SH COPYRIGHT Copyright \(co 2009 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .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.64_2.64+dfsg.orig/.prev-version0000644000175000017500000000000611164405515016675 0ustar smcvsmcv2.63b autoconf2.64_2.64+dfsg.orig/BUGS0000644000175000017500000000315411204770547014734 0ustar smcvsmcv-*- outline -*- This file lists the bugs you must be aware of. Be sure to check this file before using Autoconf, and especially git versions of Autoconf. Copyright (C) 2000-2002, 2006-2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Autoconf must not be used in production if there are ``Serious'' bugs, and use with caution an Autoconf with ``Important bugs''. * Status /*------------------------------------. | New features need further testing. | `------------------------------------*/ * Now that configure depends on shell functions, it is possible that configure scripts may fail to run on old platforms that lack a shell with proper function support. * Autotest parallel testsuite support is still a work in progress. There are known issues in job handling under dash and some ksh variants, where a parallel testsuite can hang or cause a 100% processor load. In the current release, the overall autoconf testsuite only exercises parallel autotest under bash and zsh, or if you have defined TEST_PARALLEL_AUTOTEST in the environment. Meanwhile, Cygwin has known problems with named fifos that cause failures when attempting parallel tests in an autotest suite. It is possible that other difficulties will be encountered, whether with shell or platform limitations; help is appreciated in improving parallel testsuite support. autoconf2.64_2.64+dfsg.orig/aclocal.m40000644000175000017500000006112111233217336016101 0ustar smcvsmcv# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, [m4_warning([this file was generated for autoconf 2.64. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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. # 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. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 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. # 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` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # 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. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 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. # serial 16 # 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. # 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.62])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi 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 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])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) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # 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([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _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 AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # 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_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 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. # serial 2 # 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, 2004, 2005, # 2006 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. # serial 10 # AM_PATH_LISPDIR # --------------- AC_DEFUN([AM_PATH_LISPDIR], [AC_PREREQ([2.60])dnl # 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_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])], [ 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\),${datarootdir}/\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]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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. # serial 6 # 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 AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # 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 ]) # Copyright (C) 2003, 2004, 2005, 2006 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 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. # serial 4 # _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], [m4_foreach_w([_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. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # 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. # serial 5 # 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 # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # 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)]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_STRIP # --------------------- # 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="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 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. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/m4.m4]) m4_include([m4/make-case.m4]) autoconf2.64_2.64+dfsg.orig/configure0000755000175000017500000036456711233217344016173 0ustar smcvsmcv#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.64 for GNU Autoconf 2.64. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 IFS=$as_save_IFS ;; 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" exec 7<&0 &1 # 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GNU Autoconf' PACKAGE_TARNAME='autoconf' PACKAGE_VERSION='2.64' PACKAGE_STRING='GNU Autoconf 2.64' PACKAGE_BUGREPORT='bug-autoconf@gnu.org' PACKAGE_URL='http://www.gnu.org/software/autoconf/' ac_unique_file="ChangeLog" ac_subst_vars='LTLIBOBJS LIBOBJS MAKE_CASE_SENSITIVE_FALSE MAKE_CASE_SENSITIVE_TRUE SED EGREP GREP lispdir EMACSLOADPATH EMACS TEST_EMACS PERL HELP2MAN M4_DEBUGFILE M4_GNU M4 EXPR ac_cv_dir_trailing_space ac_cv_unsupported_fs_chars ac_cv_sh_n_works am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_lispdir ' ac_precious_vars='build_alias host_alias target_alias M4 EMACS EMACSLOADPATH' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # 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. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= 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 case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -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) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$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 ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=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 ;; -*) as_fn_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. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_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'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" 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 $as_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 ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # 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 the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | 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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # 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.64 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 \`..'] 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] --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] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/autoconf] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _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.64:";; 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: M4 Location of GNU M4 1.4.6 or later. Defaults to the first program of `m4', `gm4', or `gnum4' on PATH that meets Autoconf needs. 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 . GNU Autoconf home page: . General help using GNU software: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested 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 else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF GNU Autoconf configure 2.64 generated by GNU Autoconf 2.64 Copyright (C) 2009 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 fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## cat >config.log <<_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.64, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { 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` /usr/bin/hostinfo = `(/usr/bin/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=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&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_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append 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 as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; 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: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 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, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r 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_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > 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 cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_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 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_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 $ac_precious_vars; 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_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_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 # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_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. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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 build-aux "$srcdir"/build-aux; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.11' # 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. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir 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. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$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' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # 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". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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 $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi 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.64' 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"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # 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 # # Also, some implementations of /bin/sh (e.g., Solaris 8) are soooo slow # that they are unusable on large scripts like our testsuite. # So before using `/bin/sh -n' to check our scripts, we first check # that `/bin/sh -n' is known to not have these problems. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /bin/sh -n is known to work" >&5 $as_echo_n "checking whether /bin/sh -n is known to work... " >&6; } if test "${ac_cv_sh_n_works+set}" = set; then : $as_echo_n "(cached) " >&6 else if ( unset BASH_VERSION ZSH_VERSION /bin/sh -c ' test -n "${BASH_VERSION+set}" || # Bash test -n "${KSH_VERSION+set}" || # pdksh test -n "${ZSH_VERSION+set}" || # zsh test -n "${.sh.version}" # ksh93; put this last since its syntax is dodgy ' ) 2>/dev/null then ac_cv_sh_n_works=yes else ac_cv_sh_n_works=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sh_n_works" >&5 $as_echo "$ac_cv_sh_n_works" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for characters that cannot appear in file names" >&5 $as_echo_n "checking for characters that cannot appear in file names... " >&6; } if test "${ac_cv_unsupported_fs_chars+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_unsupported_fs_chars= for c in '\\' \" '<' '>' '*' '?' '|' do touch "conftest.t${c}t" 2>/dev/null test -f "conftest.t${c}t" && rm -f "conftest.t${c}t" && continue # $c cannot be used in a file name. ac_cv_unsupported_fs_chars=$ac_cv_unsupported_fs_chars$c done fi if test -n "$ac_cv_unsupported_fs_chars"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_unsupported_fs_chars" >&5 $as_echo "$ac_cv_unsupported_fs_chars" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether directories can have trailing spaces" >&5 $as_echo_n "checking whether directories can have trailing spaces... " >&6; } if test "${ac_cv_dir_trailing_space+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -rf 'conftest.d ' && mkdir 'conftest.d ' && touch 'conftest.d /tfile' 2>/dev/null stat=$? rm -rf 'conftest.d ' case $stat$? in #( 00) ac_cv_dir_trailing_space=yes ;; #( *) ac_cv_dir_trailing_space=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dir_trailing_space" >&5 $as_echo "$ac_cv_dir_trailing_space" >&6; } # Initialize the test suite. ac_config_commands="$ac_config_commands tests/atconfig" ac_config_files="$ac_config_files tests/Makefile tests/atlocal" # Extract the first word of "expr", so it can be a program name with args. set dummy expr; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_EXPR+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi EXPR=$ac_cv_path_EXPR if test -n "$EXPR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5 $as_echo "$EXPR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ## ---- ## ## M4. ## ## ---- ## # We use an absolute name 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 # on it and get that path embedded in the installed autoconf and # autoheader scripts. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU M4 that supports accurate traces" >&5 $as_echo_n "checking for GNU M4 that supports accurate traces... " >&6; } if test "${ac_cv_path_M4+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f conftest.m4f ac_had_posixly_correct=${POSIXLY_CORRECT:+yes} { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} if test -z "$M4"; then ac_path_M4_found=false # Loop through the user's path and test for each of PROGNAME-LIST 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_prog in m4 gm4 gnum4; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_M4="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_M4" && $as_test_x "$ac_path_M4"; } || continue # Root out GNU M4 1.4.5, as well as non-GNU m4 that ignore -t, -F. ac_snippet=change'quote(<,>)in''dir(,mac,bug)' ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl test -z "`$ac_path_M4 -F conftest.m4f &1`" \ && test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \ && test -f conftest.m4f \ && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=: rm -f conftest.m4f $ac_path_M4_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_M4"; then as_fn_error "no acceptable m4 could be found in \$PATH. GNU M4 1.4.6 or later is required; 1.4.13 is recommended" "$LINENO" 5 fi else ac_cv_path_M4=$M4 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_M4" >&5 $as_echo "$ac_cv_path_M4" >&6; } M4=$ac_cv_path_M4 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_cv_path_M4 accepts --gnu" >&5 $as_echo_n "checking whether $ac_cv_path_M4 accepts --gnu... " >&6; } if test "${ac_cv_prog_gnu_m4_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else case `$M4 --help < /dev/null 2>&1` in *--gnu*) ac_cv_prog_gnu_m4_gnu=yes ;; *) ac_cv_prog_gnu_m4_gnu=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_m4_gnu" >&5 $as_echo "$ac_cv_prog_gnu_m4_gnu" >&6; } if test "$ac_cv_prog_gnu_m4_gnu" = yes; then M4_GNU=--gnu else M4_GNU= fi if test x$ac_had_posixly_correct = xyes; then POSIXLY_CORRECT=: if test $ac_cv_prog_gnu_m4_gnu = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The version of M4 that was found does not support -g." >&5 $as_echo "$as_me: WARNING: The version of M4 that was found does not support -g." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using it with POSIXLY_CORRECT set may cause problems." >&5 $as_echo "$as_me: WARNING: Using it with POSIXLY_CORRECT set may cause problems." >&2;} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how m4 supports trace files" >&5 $as_echo_n "checking how m4 supports trace files... " >&6; } if test "${ac_cv_prog_gnu_m4_debugfile+set}" = set; then : $as_echo_n "(cached) " >&6 else case `$M4 --help < /dev/null 2>&1` in *debugfile*) ac_cv_prog_gnu_m4_debugfile=--debugfile ;; *) ac_cv_prog_gnu_m4_debugfile=--error-output ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_m4_debugfile" >&5 $as_echo "$ac_cv_prog_gnu_m4_debugfile" >&6; } M4_DEBUGFILE=$ac_cv_prog_gnu_m4_debugfile ## ----------- ## ## Man pages. ## ## ----------- ## ac_config_files="$ac_config_files man/Makefile" HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"} ## ------ ## ## Perl. ## ## ------ ## # We use an absolute name 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PERL+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$PERL" = no; then as_fn_error "perl is not found" "$LINENO" 5 fi $PERL -e 'require 5.005_03;' || { as_fn_error "Perl 5.005_03 or better is required" "$LINENO" 5 } ## ------- ## ## 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_TEST_EMACS+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_TEST_EMACS="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi TEST_EMACS=$ac_cv_prog_TEST_EMACS if test -n "$TEST_EMACS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_EMACS" >&5 $as_echo "$TEST_EMACS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $TEST_EMACS is sufficiently recent" >&5 $as_echo_n "checking whether $TEST_EMACS is sufficiently recent... " >&6; } if test "${ac_cv_prog_emacs_ok+set}" = set; then : $as_echo_n "(cached) " >&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 { { $as_echo "$as_me:${as_lineno-$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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : ac_cv_prog_emacs_ok=yes else ac_cv_prog_emacs_ok=no fi rm -f conftest.el conftest.elc fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_emacs_ok" >&5 $as_echo "$ac_cv_prog_emacs_ok" >&6; } if test $ac_cv_prog_emacs_ok = no; then : TEST_EMACS=no fi fi EMACS=$TEST_EMACS # 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= 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_EMACS+set}" = set; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_EMACS="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi EMACS=$ac_cv_prog_EMACS if test -n "$EMACS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS" >&5 $as_echo "$EMACS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$EMACS" && break done test -n "$EMACS" || EMACS="no" # Check whether --with-lispdir was given. if test "${with_lispdir+set}" = set; then : withval=$with_lispdir; lispdir="$withval" { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 $as_echo_n "checking where .elc files should go... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lispdir" >&5 $as_echo "$lispdir" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 $as_echo_n "checking where .elc files should go... " >&6; } if test "${am_cv_lispdir+set}" = set; then : $as_echo_n "(cached) " >&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. { { $as_echo "$as_me:${as_lineno-$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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 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\),${datarootdir}/\1,;p;q;}' \ conftest.out` rm conftest.out fi fi test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_lispdir" >&5 $as_echo "$am_cv_lispdir" >&6; } lispdir="$am_cv_lispdir" fi ## ------------ ## ## Grep & sed. ## ## ------------ ## { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST 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_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed ## ----- ## ## Make. ## ## ----- ## { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} is case sensitive" >&5 $as_echo_n "checking whether ${MAKE-make} is case sensitive... " >&6; } if { as_var=ac_cv_prog_make_${ac_make}_case; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else echo all: >conftest.make if ${MAKE-make} -f conftest.make ALL >/dev/null 2>&1; then ac_res=no else ac_res=yes fi eval ac_cv_prog_make_${ac_make}_case=$ac_res rm -f conftest.make fi eval ac_res=\$ac_cv_prog_make_${ac_make}_case { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \$ac_cv_prog_make_${ac_make}_case = yes; then MAKE_CASE_SENSITIVE_TRUE= MAKE_CASE_SENSITIVE_FALSE='#' else MAKE_CASE_SENSITIVE_TRUE='#' MAKE_CASE_SENSITIVE_FALSE= fi ## ------------ ## ## Conclusion. ## ## ------------ ## GNUmakefile=GNUmakefile ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile" 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, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end 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" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 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}' # 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 branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` 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_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAKE_CASE_SENSITIVE_TRUE}" && test -z "${MAKE_CASE_SENSITIVE_FALSE}"; then as_fn_error "conditional \"MAKE_CASE_SENSITIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $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} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 IFS=$as_save_IFS ;; 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by GNU Autoconf $as_me 2.64, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent 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 links: $config_links Configuration commands: $config_commands Report bugs to . GNU Autoconf home page: . General help using GNU software: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ GNU Autoconf config.status 2.64 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. 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 ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; 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 || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # GNUmakefile=$GNUmakefile _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "lib/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/emacs/Makefile" ;; "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;; "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" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 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_LINKS+set}" = set || CONFIG_LINKS=$config_links 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 against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # 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 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES :L $CONFIG_LINKS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # 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. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :L) # # CONFIG_LINK # if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then : else # Prefer the file from the source tree if names are identical. if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then ac_source=$srcdir/$ac_source fi { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then as_fn_error "$ac_source: file not found" "$LINENO" 5 fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. case $srcdir in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "tests/atconfig":C) cat >tests/atconfig </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 || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # Report the state of this version of Autoconf if this is a beta. autoconf2.64_2.64+dfsg.orig/.tarball-version0000644000175000017500000000000511233220606017332 0ustar smcvsmcv2.64 autoconf2.64_2.64+dfsg.orig/README0000644000175000017500000000570311233215532015121 0ustar smcvsmcv-*- 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 should install GNU M4 (version 1.4.6 or later is required; 1.4.13 or later is recommended) 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.). You can get GNU M4 here: ftp://ftp.gnu.org/gnu/m4/ 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 and INSTALL. Mail suggestions to autoconf@gnu.org, report bugs to bug-autoconf@gnu.org, and submit patches to autoconf-patches@gnu.org. All changes can be tracked at the read-only autoconf-commit@gnu.org. Always include the Autoconf version number, which you can get by running `autoconf --version'. Archives of bug-autoconf@gnu.org can be found in , and similarly for the other mailing lists. Licensing Autoconf is released under the General Public License (GPL). Additionally, Autoconf includes a licensing exception in some of its source files; see the respective copyright notices for how your project is impacted by including scripts generated by Autoconf. This version of Autoconf uses GPLv2+ plus the above-mentioned exceptions for its installed executables, as described in COPYING. Meanwhile, several source files within the Autoconf project are under GPLv3+, as described in COPYINGv3; these files are used for building and installing Autoconf, but are not present in the installed programs. The entire Autoconf project will move to GPLv3+ when the exception statements have been reformulated in terms of the Additional Permissions as described in section 7 of GPLv3. For more licensing information, see . ----- Copyright (C) 1992, 1993, 1994, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. autoconf2.64_2.64+dfsg.orig/ChangeLog0000644000175000017500000261656411233217223016031 0ustar smcvsmcv2009-07-26 Eric Blake Release Version 2.64. * NEWS: Mention the release. * README: This release is stable. * HACKING (release): Use dist-xz, not dist-lzma. Document some optional features in INSTALL. * doc/install.texi (Basic Installation): Mention that INSTALL is generic, and that not all packages implement all features. Mention 'make distcheck' for maintainers, and 'make installcheck' for users. Mention the GNU Coding Standards. (Installation Names): Mention DESTDIR vs. 'make prefix= install' as ways to alter the configuration, with caveats of each. Move --program-prefix discussion... (Optional Features): ...here. Mention --enable-silent-rules and use of make V=0. Basic improvements to INSTALL. * doc/install.texi (Basic Installation): Use better markup. (Multiple Architectures): Introduce the term VPATH. (Installation Names): Mention that --prefix must be absolute. * doc/autoconf.texi (Preset Output Variables) (Installation Directory Variables): Consistently refer to GNU Coding Standards. Update some upstream files. * build-aux/config.guess: Resynchronize from upstream. * build-aux/config.sub: Likewise. * build-aux/texinfo.tex: Likewise. * build-aux/vc-list-files: Likewise. * doc/standards.texi: Likewise. 2009-07-25 Eric Blake Recognize new m4sugar keywords. * lib/emacs/autoconf-mode.el (autoconf-current-defun): Recognize m4_define_default, m4_defun_init, m4_defun_once. (autoconf-font-lock-keywords): Likewise. Require m4 1.4.6, and fix testsuite to support this version. * m4/m4.m4 (AC_PROG_GNU_M4): Reject m4 1.4.5, now that we use regexp it can't handle. * NEWS: Mention minimum version bump. * README: Likewise. * README-hacking: Likewise. * doc/autoconf.texi (Introduction, Why GNU M4): Likewise. * tests/tools.at (autom4te --trace and whitespace): Update test so still work with older m4 line numbers. * tests/m4sugar.at (m4@&t@_require: nested): Likewise. Reported by Ralf Wildenhues. 2009-07-25 Bruno Haible Clarify autom4te debugging tips. * doc/autoconf.texi (Debugging via autom4te): Fix example from previous commit, and add clarification. 2009-07-25 Eric Blake Document some autom4te debugging tips. * doc/autoconf.texi (Debugging via autom4te): New node. Suggested by Bruno Haible. Fix font-lock. * configure.ac (ac_cv_unsupported_fs_chars): Make editing easier. Let autoheader see through m4 macros in AC_DEFINE. * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Expand macro before tracing its name. * lib/autoconf/autoheader.m4 (AH_VERBATIM, AH_TEMPLATE): Likewise, for using the macro in a template file. * tests/tools.at (autoheader and macros): New test. * NEWS: Mention this. Reported by Bruno Haible. Improve NEWS wording. * NEWS: Use more accurate statement. Suggestedy by Ralf Wildenhues. 2009-07-24 Eric Blake Fix AS_EXIT for FreeBSD sh. * lib/m4sugar/m4sh.m4 (AS_EXIT): Always supply an argument to the shell function, since $? is not reliable on function entry. (_AS_EXIT_PREPARE): Simplify to assume argument. Reported by Ralf Wildenhues. 2009-07-23 Eric Blake Run more tests under Solaris. * tests/local.at (AT_CHECK_AUTOCONF): Don't skip entire test group when passing over syntax checks. 2009-07-23 Romain Lenglet Clean up temporary files generated by Erlang macros. * lib/autoconf/erlang.m4 (AC_ERLANG_CHECK_LIB) (AC_ERLANG_SUBST_ROOT_DIR, AC_ERLANG_SUBST_LIB_DIR) (AC_ERLANG_SUBST_ERTS_VER): Delete conftest.out; renamed erlang_cv_* cache variables into ac_cv_erlang_*. * lib/autoconf/general.m4 (AC_RUN_IFELSE): Delete conftest.beam files generated by Erlang compiler. * tests/local.at (AT_CHECK_ENV): Ignore variables defined by Erlang macros. * tests/erlang.at (AT_SETUP_ERLANG): Delete; replace all uses by AT_CHECK_MACRO. * tests/Makefile.am (AUTOCONF_FILES): Revert previous addition of generated Erlang tests; they are all hand-tested. Add autotests for Erlang macros. * tests/erlang.at: Added tests for all macros in erlang.m4. * tests/Makefile.am (TESTSUITE_HAND_AT, AUTOCONF_FILES): Added erlang.at. * tests/suite.at: Likewise. * tests/compile.at (AC_LANG, AC_LANG_PUSH & AC_LANG_POP): Added test for extension of Erlang files. (Multiple languages): Use correct m4 quoting. * NEWS: Mention this. 2009-07-22 Eric Blake Fix test of autom4te from stdin. * tests/tools.at (autom4te cache locking): Make stdin request explicit, so that --force is properly used. 2009-07-16 Eric Blake Don't hide leading space in autom4te --trace output. * bin/autom4te.in (handle_traces): Don't flatten leading and trailing space, since tracing spacing bugs can be useful. * tests/tools.at (autom4te --trace and whitespace): New test. 2009-07-13 Eric Blake Document that $srcdir can be used during configure. * doc/autoconf.texi (Preset Output Variables): Add a paragraph. * THANKS: Update. Reported by Monty Taylor. 2009-07-13 Eric Blake Disable asynchronous job notification for parallel tests. * lib/autotest/general.m4 (AT_INIT) : Turn off notify mode, since zsh leaves it on after 'emulate sh'. * doc/autoconf.texi (Limitations of Builtins) : Document that job control options are not portable. Guarantee that exit status trumps output matching. * doc/autoconf.texi (Writing Testsuites) : Document this better. * tests/autotest.at (Skip, parallel skip): Enhance tests. Fix nits in recent patches. * configure.ac (ac_cv_dir_trailing_space): Avoid $status, for zsh. * doc/autoconf.texi (Writing Testsuites) : Tweak wording. (Introduction): Recommend m4 1.4.13. * README: Likewise. * m4/m4.m4 (AC_PROG_GNU_M4): Likewise. Use long option --gnu rather than -g. 2009-07-13 Paolo Bonzini Introduce AT_SKIP_IF and AT_FAIL_IF * NEWS: Mention AT_SKIP_IF and AT_FAIL_IF. * doc/autoconf.texi (Autotest): Document them. * lib/autotest/general.m4 (_AT_LINE_ESCAPED, AT_SKIP_IF, AT_FAIL_IF, _AT_CHECK_EXIT): New. (AT_CHECK): Use _AT_LINE_ESCAPED. * tests/autotest.at: Add tests for AT_SKIP_IF and AT_FAIL_IF. Use AT_SKIP_IF. * tests/local.at: Use AT_SKIP_IF. 2009-07-13 Paolo Bonzini Use m4 -g when available. * m4/m4.m4: Unset POSIXLY_CORRECT during first test. Test for -g. Warn user if he has POSIXLY_CORRECT set but -g is not supported. * bin/Makefile.am: Substitute @M4_GNU@ into generated files. * bin/autom4te.in: Pass @M4_GNU@ to m4. 2009-07-13 Eric Blake Fix previous patch. * lib/autotest/general.m4 (at_fn_check_prepare_notrace): Use proper m4 quoting. (_AT_DECIDE_TRACEABLE): Likewise. 2009-07-13 Paolo Bonzini * lib/autotest/general.m4 (at_fn_check_prepare_notrace): Use $at_trace_echo. Add new REASON argument. (at_fn_check_prepare_trace): Do not call at_fn_check_prepare_notrace. Use $at_check_filter_trace. (at_fn_check_prepare_dynamic): Use at_fn_check_prepare_notrace. (at_traceon): Initialize to ':'. (at_traceoff): Remove, use 'set +x' instead throughout. (at_check_filter_trace, at_trace_echo): New shell variables. Initialize them if tracing is requested. (_AT_DECIDE_TRACEABLE): Adjust call to at_fn_check_prepare_notrace. 2009-07-12 Paolo Bonzini Move atlocal feature tests to configure * configure.ac: Test for unsupported characters in files and directories here... * tests/atlocal.in: ... and not here. 2009-07-09 Eric Blake Fix test typo. * tests/m4sh.at (AS@&t@_INIT_GENERATED): Close fd, rather than creating file named -. Fix testsuite under dash. * tests/m4sh.at (LINENO stack, AS@&t@_BASENAME, AS@&t@_DIRNAME) (AS@&t@_ECHO and AS@&t@_ECHO_N, AS@&t@_EXIT, AS@&t@_MKDIR_P) (AS@&t@_VERSION_COMPARE, as_me, Negated classes in globbing) (Functions Support, Functions and return Support) (Nested AS@&t@_REQUIRE_SHELL_FN, Nested AS@&t@_REQUIRE) (AS@&t@_REQUIRE_SHELL_FN and m4@&t@_require, AS@&t@_HELP_STRING) (AS@&t@_IF and AS@&t@_CASE, AS@&t@_FOR, AS@&t@_LITERAL_IF) (AS@&t@_VAR basics, AS@&t@_VAR_APPEND, AS@&t@_VAR_ARITH) (AS@&t@_INIT cleanup, AS@&t@_INIT_GENERATED, AS@&t@_MESSAGE_FD) (_AS@&t@_CLEAN_DIR, ECHO_C): Allow testing different CONFIG_SHELL options during the testsuite run. Reported by Ralf Wildenhues. 2009-07-09 Ralf Wildenhues Ignore messages on stderr when testing for the zsh issue. * tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Ignore stderr. 2009-07-07 Eric Blake Skip parallel tests when zsh 'set -m' fails. * tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Skip test if set -m is not supported. Reported by Ralf Wildenhues. Make parallel testsuite more portable. * lib/autotest/general.m4 (AT_INIT) : Avoid <>; instead open write descriptor in each group and read descriptor in main driver. * tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Relax condition. 2009-07-03 Eric Blake Avoid syntax error in ash. * lib/autotest/general.m4 (AT_INIT) : Avoid syntax errors on shells that don't recognize <>. * tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Also skip parallel tests for this reason. Skip based on the shell to be tested, not the shell driving the testsuite. (parallel syntax error): Rearrange similar to previous patch. (parallel test execution): Defer skip until after serial tests. 2009-07-02 Eric Blake Skip test on shells that can't catch syntax failure. * tests/autotest.at (Syntax error): Skip test if shell aborts on syntax error (AIX ksh88) or doesn't detect it (zsh). * doc/autoconf.texi (Limitations of Builtins) <.>: Mention these limitations. Reported by Ralf Wildenhues. 2009-06-30 Jan Madzik (tiny change) Ralf Wildenhues Avoid AIX 6.1 ksh88 ECHO_C command substitution bug. * lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE): Ensure more than one character is output with `\c'; reset echo output state if buggy ksh was detected, and set ECHO_T instead of ECHO_C. * doc/autoconf.texi (Limitations of Builtins): Document it. * tests/m4sh.at (ECHO_C): New test. * THANKS: Update. 2009-06-27 William Pursell (tiny change) Fix grammaro in documenation. * doc/autoconf.texi (Guidelines): Fix grammaro. 2009-06-17 Eric Blake Fix AC_CHECK_HEADER infloop for gcc. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW) (_AC_CHECK_HEADER_OLD): Give up on AU_DEFUN, and manually warn about obsoletion, to avoid infinite loop in gcc. Reported by Ralf Wildenhues. 2009-06-15 Eric Blake Add m4_copy_force, m4_rename_force. * lib/m4sugar/m4sugar.m4 (m4_copy_force, m4_rename_force): New macros. * tests/m4sugar.at (m4@&t@_defn): Test them. * doc/autoconf.texi (Redefined M4 Macros) : Document them. * NEWS: Likewise. Suggested by Ralf Wildenhues. Reinstate _AC_CHECK_HEADER_OLD for gcc. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW) (_AC_CHECK_HEADER_OLD): Provide autoupdate versions, since gcc and others used these undocumented macros. Reported by Ralf Wildenhues. 2009-06-12 Ralf Wildenhues Fix concurrent autom4te.cache directory creation race. * bin/autom4te.in: Do not error out if another `autom4te' instance created the cache directory before we could. 2009-06-11 Steven G. Johnson and Eric Blake Create a file in test program when detecting cross-compilation. * lib/autoconf/lang.m4 (_AC_LANG_IO_PROGRAM): New macro, returns program that creates a file. (_AC_COMPILER_EXEEXT,_AC_COMPILER_EXEEXT_WORKS): Call new macro and document why it's needed to robustly detect cross-compiling. (AC_LANG_DEFINE): Copy implementation across similar languages. * lib/autoconf/c.m4 (_AC_LANG_IO_PROGRAM(C)): Implement new macro. * lib/autoconf/fortran.m4 (_AC_LANG_IO_PROGRAM(Fortran 77)): Likewise. * lib/autoconf/erlang.m4 (_AC_LANG_IO_PROGRAM(Erlang)): Likewise. 2009-06-11 Eric Blake Simplify AC_LANG(Fortran). * lib/autoconf/fortran.m4 (AC_LANG(Fortran)): Borrow from Fortran 77, which requires reordering portions of the file. (AC_LANG_PROGRAM(Fortran), AC_LANG_CALL(Fortran)): Now defined automatically. Clarify m4_copy semantics. * doc/autoconf.texi (Redefined M4 Macros) : Update documentation. * tests/m4sugar.at (m4@&t@_defn): Enhance test. 2009-06-06 Eric Blake Improve documentation on trap pitfalls. * doc/autoconf.texi (Limitations of Builtins) : Mention new Posix 2008 requirement on trap, and dash bug in implementing it. Mention various shell bugs with traps defined inside subshells. Mention older bash limitation with single-command exit trap. : Mention another 'set -e' limitation. Reported by Jens Schmidt. 2009-06-06 Jim Meyering Improve testsuite --help * lib/autotest/general.m4: Correct the example in ./testsuite --help. Improve wording. 2009-06-06 Eric Blake Document fallback behavior of AC_PROG_LEX. * doc/autoconf.texi (Particular Programs) : Mention why fallback is :, and that a --version check must be used to determine whether flex was found. Reported by Patrick Welche. 2009-05-28 Jim Meyering Fix syntax errors in autoconf.texi. * doc/autoconf.texi (Erlang Libraries): @-escape curly braces in example code. 2009-05-28 Romain Lenglet New AC_ERLANG_SUBST_ERTS_VER macro. * lib/autoconf/erlang.m4: Add macro AC_ERLANG_SUBST_ERTS_VER. * doc/autoconf.texi (Erlang Libraries): Document AC_ERLANG_SUBST_ERTS_VER. * NEWS: Likewise. * AUTHORS: Update Romain Lenglet's email address. * THANKS: Update. Suggested by Ruslan Babayev. 2009-05-26 Eric Blake Sanitize more problematic environment variables. * doc/autoconf.texi (Environment Variable Index): Add more entries, particularly for precious variables and known culprit variables. Needed to avoid overfull vbox. (Special Shell Variables) : Add variables known to cause misbehavior. * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Unset variables known to cause problems. * THANKS: Update. Based on reports from Ilya Bobir and Joey Mingrone. 2009-05-21 Ralf Wildenhues Document VPATH = $(variable) issue in VPATH chapter. * doc/autoconf.texi (Variables listed in VPATH): New node. (Top, VPATH and Make): Adjust menus. (Build Directories): Refer to it. Prompted by report from Bruno Haible. 2009-05-19 Eric Blake Update uses of all-permissive license. * ChangeLog: Relicense under GPL. * ChangeLog.0: Likewise. * ChangeLog.1: Likewise. * ChangeLog.2: Likewise. * THANKS: Likewise. * m4/m4.m4: Use latest wording of FSF all-permissive license. * m4/make-case.m4: Likewise. * doc/install.texi: Likewise. * tests/statesave.m4: Relicense to match rest of testsuite; this file does not need all-permissive license since it is not designed for reuse by other packages. * BUGS: Relicense under all-permissive license. * HACKING: Likewise. * NEWS: Likewise. * README: Likewise. * README-alpha: Likewise. * README-hacking: Likewise. * TODO: Likewise. Update some upstream files. * build-aux/config.guess: Resynchronize from upstream. * build-aux/gnupload: Likewise. * build-aux/vc-list-files: Likewise. * build-aux/texinfo.tex: Likewise. * doc/gendocs_template: Likewise. Don't mention undocumented interface in NEWS. * NEWS: Correct earlier entry about AS_FOR. 2009-05-17 Ralf Wildenhues New manual section `Parallel Make'. * doc/autoconf.texi (Parallel Make): New node, document NetBSD `make -jN' quirks. (Top, Portable Make): Adjust menus. 2009-05-14 Ralf Wildenhues testsuite: skip `Multiple languages' test without C++ compiler. * tests/compile.at (Multiple languages): Skip test on systems without a C++ compiler. Report by Jim Meyering. 2009-05-13 Eric Blake Document zsh bug with empty commands. * doc/autoconf.texi (Special Shell Variables) : Add mention of more problems with $?. 2009-05-11 Patrick Welche (tiny change) Also try X11R7 when looking for X11 files, for NetBSD. * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Also try directories with X11R7 in the name. 2009-05-01 Ralf Wildenhues Limit stderr logging for C compiler version. * lib/autoconf/general.m4 (_AC_RUN_LOG_LIMIT, _AC_DO_LIMIT): New internal macros, equivalent to _AC_RUN_LOG and _AC_DO, but with an optional additional argument to limit the number of lines of stderr output logged, defaulting to 10. * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Use _AC_DO_LIMIT for capturing compiler version output. Also test -qversion, for the IBM xlc compiler. * lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise. * THANKS: Update. Report by Christian Rössel and John R. Cary against Libtool. 2009-04-24 Eric Blake Fix quoting of m4 macros in AT_CHECK. * lib/autotest/general.m4 (AT_CHECK): Expand prior to adding escapes, to avoid shell syntax errors caused by late macro expansion. * NEWS: Document this change. * tests/autotest.at (Metacharacters in command from M4 expansion): New test. manual: Use consistent spelling of here-document. * doc/autoconf.texi (Defining Symbols, Programming in M4sh) (Common Shell Constructs, Macro Names, Writing Testsuites): Fix spelling. Reported by Ralf Wildenhues. Make AT_CHECK_UNQUOTED more like AC_DEFINE_UNQUOTED. * lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Keep older, undocumented semantics, where unbalanced " cannot be used in the stdout/stderr argument. (AT_CHECK_UNQUOTED): Treat " in stdout/stderr as a literal, since the text is used in double-quoted context. * tests/autotest.at (unquoted output): New test. * doc/autoconf.texi (Writing Testsuites) : Mention which shell expansions are handled. Rename AT_CHECK_NOESCAPE to AT_CHECK_UNQUOTED. * lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Deprecate, in favor of new spelling... (AT_CHECK_UNQUOTED): ...for consistency with AC_DEFINE_UNQUOTED. * doc/autoconf.texi (Writing Testsuites) : Document the rename. * NEWS: Likewise. * tests/autotest.at (Binary output, Cleanup): Adjust tests. * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Likewise. Reported by Ralf Wildenhues. 2009-04-22 Ralf Wildenhues New test to ensure autom4te cache file locking works. * tests/tools.at (autom4te cache locking): New test. Report by Eric Blake. 2009-04-22 Paolo Bonzini manual: another grammar improvement. * doc/autoconf.texi (Fortran Compiler): Avoid dependency on pronunciation of `FCFLAGS_f90'. 2009-04-23 Eric Blake Change FOO placeholder to use @var{text} instead. * doc/autoconf.texi (Configuration Actions): Rename AC_CONFIG_FOOS to AC_CONFIG_@var{ITEMS}. * doc/autoconf.texi (config.status Invocation): Likewise. (AC_FOO_IFELSE vs AC_TRY_FOO): Rename node... (AC_ACT_IFELSE vs AC_TRY_ACT): ...to this. 2009-04-22 Eric Blake Add m4_argn. * lib/m4sugar/m4sugar.m4 (m4_argn): New macro. * NEWS: Document it. * doc/autoconf.texi (Looping constructs) : Likewise. : Improve documentation. * tests/m4sugar.at (m4 lists): New test. 2009-04-22 Ralf Wildenhues Improve description of AC_PROG_CC_C89 and AC_PROG_CC_C99. * doc/autoconf.texi (C Compiler): Document that AC_PROG_CC_C89 and AC_PROG_CC_C99 prefer extended over strict conformance modes. Report by Vincent Lefèvre. 2009-04-21 Ralf Wildenhues Revert bogus change in last commit. * doc/autoconf.texi (Initialization Macros): Revert change. Spotted by Eric Blake. manual: fix trivial grammar errors. * doc/autoconf.texi (Fortran Compiler, Initialization Macros) (Limitations of Usual Tools, Pretty Help Strings) (config.status Invocation): Fix `a' vs. `an' errors. Report by Eric Blake. 2009-04-21 Eric Blake Shuffle maintainer-specific rules. * Makefile.am (maintainer-check-tests): Delete. (autom4te-update): Move... * cfg.mk (autom4te-update): ...here. (fetch): Depend on autom4te-update. Split... (gnulib-update): ...into new rule. Import move-if-change from gnulib. * maint.mk (maintainer-distcheck): Absorb former maintainer-check rule. * build-aux/move-if-change: New file, undistributed. * .gitattributes: Handle new upstream file. * .gitignore: Ignore maintainer cruft. * HACKING: Update maintainer instructions. * build-aux/config.guess: Update from upstream. * build-aux/config.sub: Likewise. * build-aux/gendocs.sh: Likewise. * build-aux/texinfo.tex: Likewise. * doc/gendocs_template: Likewise. * doc/standards.texi: Likewise. 2009-04-19 Ralf Wildenhues Sync autom4te perl modules from Automake. * lib/Autom4te/Channels.pm: Sync from Automake. * lib/Autom4te/FileUtils.pm: Likewise. * lib/Autom4te/XFile.pm: Likewise. Adjust channel definitions for new Automake `ordered' flag. * lib/Autom4te/ChannelDefs.pm (Autom4te::ChannelDefs): Set `ordered' flag to zero for channels `fatal', `automake', and `verb'. This has currently no effect on actual semantics but avoids a consistency check needed for Automake's usage of the Channels.pm code. manual: clarify m4_if synopsis. * doc/autoconf.texi (Redefined M4 Macros): Rewrite synopsis of m4_if in the presence of more than three arguments. Improve and clarify `config.status' usage documentation. * doc/autoconf.texi (config.status Invocation): Fix markup in synopsis. Use `tag' instead of `file' notation for the non-option arguments, to be consistent with the documentation of the AC_CONFIG_* macros. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise, use `tag' notation for non-option arguments. Report by John Calcote. 2009-04-15 Eric Blake Test that autotest handles binary output. * tests/autotest.at (Binary output): New test. Suggested by Ralf Wildenhues. Add stdout-nolog and ignore-nolog to AT_CHECK. * lib/autotest/general.m4 (AT_DIFF_STDERR(stderr-nolog)) (AT_DIFF_STDERR(ignore-nolog), AT_DIFF_STDOUT(stdout-nolog)) (AT_DIFF_STDOUT(ignore-nolog)): New macros. * tests/autotest.at (Logging): New test. * doc/autoconf.texi (Writing Testsuites) : Document the new logging actions. * NEWS: Likewise. Reported by Ralf Wildenhues. Teach AT_CHECK about hard failures. * lib/autotest/general.m4 (AT_INIT) : Handle hard failures. * doc/autoconf.texi (Writing Testsuites) : Document AT_CHECK_NOESCAPE and exit status 99. * NEWS: Likewise. * tests/autotest.at (Hard fail, Cleanup): New tests. 2009-04-14 Eric Blake Fix yesterday's regression in AS_IF. * lib/m4sugar/m4sh.m4 (_AS_IF_ELSE): Don't corrupt $? in else branch; it is up to the user to avoid syntax errors. * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Adjust test. 2009-04-14 Ralf Wildenhues Add traces for AM_SILENT_RULES. * lib/autom4te.in (Automake-preselections): Trace AM_SILENT_RULES. 2009-04-13 Eric Blake Improve documentation related to expanded-before-required. * doc/autoconf.texi (Expanded Before Required): Add a case study. (Running the Compiler) : Remind users that running a compile test will AC_REQUIRE the compiler check. (Macro Definitions) : Contrast AC_DEFUN and m4_define. (C Compiler) : Mention the fact that only first invocation of this macro checks for $EXEEXT, and that many other macros use it via AC_REQUIRE. Reported by Andreas Schwab. Mention latest rules about make and set -e. * doc/autoconf.texi (Failure in Make Rules): Posix is now clear that make must use set -e. (Limitations of Builtins) : Clarify more about set -e behavior. Improve documentation about if exit status. * doc/autoconf.texi (Limitations of Builtins) : Mention that exit status bugs don't affect modern targets. Reported by Andreas Schwab. Add cross-reference to new macros. * doc/autoconf.texi (Text processing Macros) : Reference the new m4_ifblank. Suggested by Mike Frysinger. Make AS_IF, AS_CASE, and AS_FOR more robust to blank arguments. * lib/m4sugar/m4sh.m4 (_AS_CASE, _AS_CASE_DEFAULT, AS_FOR, _AS_IF) (_AS_IF_ELSE, AS_IF): Avoid syntax error on blank argument, including a macro with an empty expansion. * NEWS: Mention this. * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE, AS@&t@_FOR): Update tests. Reported by Mike Frysinger. Add m4_blank and friends. * lib/m4sugar/m4sugar.m4 (m4_blank, m4_nblank, m4_default_nblank) (m4_default_nblank_quoted): New macros. * NEWS: Document them. * doc/autoconf.texi (Conditional constructs): Likewise. * tests/m4sugar.at (m4sugar shorthand conditionals): New test. Suggested by Mike Frysinger. 2009-04-13 Eric Blake Finish upgrade to GFDL 1.3. * doc/autoconf.texi (copying): Use correct license; comment change was missed on 2008-11-04. 2009-04-10 Eric Blake Test parallel handling of syntax error. * tests/autotest.at (parallel syntax error): New test. Suggested by Ralf Wildenhues. 2009-04-10 Ralf Wildenhues Document awk and config.status line length limitations. * doc/autoconf.texi (Configuration Actions): The input to config.status should have reasonable line length. (Limitations of Usual Tools): Document IRIX, HP-UX awk input line length limit. Report by Bruno Haible. Skip `Multiple languages' test if CC is a C++ compiler. * tests/compile.at (Multiple languages): Before starting the test proper, build and run a configure script that tests the C compiler only, and skips the test if this is found to be a C++ compiler. Report by Eric Blake. Note that AC_DEFUN is needed for aclocal. * doc/autoconf.texi (Coding Style): Public third-party macros should be AC_DEFUN'ed. Report by John Calcote. 2009-04-10 Eric Blake Add undocumented _AS_CLEAN_DIR. * lib/m4sugar/m4sh.m4 (_AS_CLEAN_DIR): New macro; fixes m4 quoting in previous patch. * lib/autotest/general.m4 (AT_INIT) : Use new macro. * tests/m4sh.at (_AS@&t@_CLEAN_DIR): New test. Reported by Ralf Wildenhues. 2009-04-09 Eric Blake Avoid problems caused by deleting in-use directory. * lib/autotest/general.m4 (AT_INIT) : Only remove the contents of $at_group_dir, not the directory itself. Fix regression in empty test. * lib/autotest/general.m4 (AT_SETUP): Prep AT_ingroup for fallback use in empty test. Fixes regression introduced 2009-04-06. (_AT_CHECK): Undo fallback when a test is not empty. (AT_CLEANUP): Expand AT_ingroup before deleting. 2009-04-09 Paolo Bonzini Make a less conservative cross-compilation guess for AC_FUNC_UTIME_NULL. * lib/autoconf/functions.m4 (AC_FUNC_UTIME_NULL): Assume not crosscompiling to an obsolete system. 2009-04-08 Ralf Wildenhues Automake relies on the undocumented `_AC_COMPILER_EXEEXT' macro. * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT): Document that Automake relies on this macro. 2009-04-06 Eric Blake Reduce testsuite size. * tests/statesave.m4: New file. * tests/Makefile.am (EXTRA_DIST): Distribute it. * tests/local.at (AT_CONFIGURE_AC): Reuse file, rather than repeating inline definition of AC_STATE_SAVE. (AT_CHECK_ENV): Factor code... (_AT_CHECK_ENV): ...into shell function. * tests/m4sh.at (AT_DATA_LINENO): Avoid churn in testsuite. Handle shell comments in AT_CHECK. * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Handle # in test correctly. Latent bug in handling shell comment was first fixed 2008-11-20, but regressed two patches later. * tests/autotest.at (Shell comment in command): New test. * NEWS: Document the fix. Hard fail any test with syntax errors. * lib/autotest/general.m4 (AT_INIT) : Guarantee test failure on syntax error, rather than inheriting status from previous test. * tests/autotest.at (Syntax error): New test. 2009-03-31 Eric Blake Beta Release Version 2.63b. * NEWS: Mention the release. * README: Clarify that this is a beta release. * build-aux/texinfo.tex: Synchronize from upstream. * .x-sc_trailing_blank: Exempt more upstream files. 2009-03-30 Eric Blake Fix testsuite failures under zsh. * tests/local.at (AT_CHECK_ENV): Exempt $argv and $ARGC, which are set by zsh -c 'emulate sh'. Reported by Ralf Wildenhues. For now, skip parallel tests under less-tested shells. * tests/autotest.at (AT_CHECK_AT): Add pre-test argument. (Tested programs, Startup error messages, AT_CHECK_AT_TITLE) (Fallacy, Skip, errexit, Long test source lines) (Debugging a successful test, Debugging script and environment) (Debugging a failed test, Using atlocal) (Choosing where testsuite is run): Adjust callers. (AT_SKIP_PARALLEL_TESTS): New macro, to skip parallel tests except under zsh, bash, or when TEST_PARALLEL_AUTOTEST is defined. Makes it easier to avoid testsuite hangs for users with dash or other less-tested shell. (parallel test execution, parallel truth, parallel fallacy) (parallel skip, parallel errexit) (parallel autotest and signal handling): Use it. * BUGS: Mention this. 2009-03-24 Andris Pavenis (tiny change) Fix awk substitution of carriage returns on DJGPP. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix typo in generation of ac_cs_awk_cr. * THANKS: Update. 2009-03-24 Aaron W. LaFramboise (tiny change) Work around cygwin bash igncr mode. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fall back to bash carriage returns if ac_cr lost \r from ``. * THANKS: Update. Suggested by Eric Blake. 2009-03-24 Eric Blake Fix underquoted example in manual. * doc/autoconf.texi (Common Shell Constructs) : Properly m4-quote #. * THANKS: Update spelling. Reported by Matěj Týč. 2009-03-18 Eric Blake Manual: mention more expr pitfalls. * doc/autoconf.texi (Limitations of Usual Tools) : Mention HP-UX limitation, and $ ambiguity. * THANKS: Update. Reported by Jens Schmidt, in http://bugs.debian.org/466990. 2009-03-17 Jim Meyering Manual: fix a typo. * lib/m4sugar/m4sh.m4: s/are/is/ => "there is no indirection" 2009-03-17 Eric Blake Use test consistently in examples. * doc/autoconf.texi (Subdirectories, Caching Results) (Common Shell Constructs, Prerequisite Macros, Coding Style) (Changed Results, Particular Programs, Defining Symbols): Protect against arbitrary user strings. (Multiple Cases): Mention why $fstype does not need protection. Reported by Reuben Thomas. Improve confusing section names. * doc/autoconf.texi (Specifying Names): Rename node... (Specifying Target Triplets): ...to this. (Generic Programs): Adjust references. * doc/install.texi (System Type): Touch up formatting. * THANKS: Update. Reported by Tim Freeman, in http://bugs.debian.org/312873. Remove historical inaccuracy. * doc/autoconf.texi (Portable Shell): Don't perpetuate myth about #!/bin/sh needing a space. Reported by Reuben Thomas. Recommend AS_HELP_STRING more prominently. * doc/autoconf.texi (External Software): Reduce mention of hand-written help strings. Reported by Reuben Thomas. 2009-03-16 Eric Blake Fix 'make pdf'. * doc/autoconf.texi (Balancing Parentheses): Fix usage of @itemize. Reported by Ralf Wildenhues, fix suggested by Karl Berry. 2009-03-14 Eric Blake Resync upstream files. * GNUmakefile: Run 'make fetch'. * build-aux/announce-gen: Likewise. * build-aux/config.guess: Likewise. * build-aux/config.sub: Likewise. * build-aux/gnupload: Likewise. * build-aux/texinfo.tex: Likewise. * build-aux/vc-list-files: Likewise. * doc/gnu-oids.texi: Likewise. * doc/standards.texi: Likewise. 2009-03-09 Ralf Wildenhues New test for SunStudio `restrict' handling. * tests/c.at (AC_C_RESTRICT and C++): New test. Prompted by bug report from Rolf Vandevaart. 2009-03-08 Ralf Wildenhues Manual: testsuite depends on package.m4. * doc/autoconf.texi (Making testsuite Scripts): In the example makefile snippet, $(TESTSUITE) depends on $(srcdir)/package.m4. 2009-03-02 Allan Caffee (tiny change) Fix a typo in comment for AS_LITERAL_IF. * lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Update a comment that fell out of date when this function was moved/renamed in 59ecd766. * THANKS: Update. 2009-03-02 Eric Blake Improve wording for AS_ESCAPE. * doc/autoconf.texi (Common Shell Constructs) : Touch up documentation. * lib/m4sugar/m4sh.m4 (_AS_ESCAPE): Fix comment typos. Reported by Ralf Wildenhues. 2009-02-24 Eric Blake Use pkgdatadir consistently. * bin/Makefile.am (edit): Substitute pkgdatadir, not datadir. * lib/Makefile.am (edit): Likewise. * lib/autom4te.in (Autoconf-without-aclocal-m4, Autotest, M4sh) (M4sugar): Use @pkgdatadir@, not @datadir@. * bin/autoheader.in ($datadir): Likewise. * bin/autom4te.in ($datadir): Likewise. * bin/autoreconf.in ($datadir): Likewise. * bin/autoscan.in ($datadir): Likewise. * bin/autoupdate.in ($datadir): Likewise. * bin/ifnames.in ($datadir): Likewise. * doc/autoconf.texi (Installation Directory Variables): Update example to be consistent; focus on $(bindir) as an autoconf variable, and mention that $(pkgdatadir) comes from automake. Reported by Reuben Thomas. 2009-02-19 Eric Blake Use m4_translit more efficiently in AS_ESCAPE. * lib/m4sugar/m4sh.m4 (_AS_ESCAPE): Alter API to take first byte of set separately from rest. (AS_ESCAPE, _AS_QUOTE_MODERN, AS_TR_SH, AS_VAR_GET): Adjust callers. * lib/autoconf/autoheader.m4 (AH_VERBATIM): Avoid duplicate characters in translit request. * doc/autoconf.texi (Common Shell Constructs) : Document the macro. * NEWS: Likewise. Mention recently documented macros. * NEWS: Update list of new documentation. 2009-02-14 Ralf Wildenhues Add index for config.site. * doc/autoconf.texi (Site Defaults): Add index for config.site. * THANKS: Update. Report by Stephen P. Schaefer. 2009-02-12 Eric Blake Fix m4_set speed regression introduced 2008-12-18. * lib/m4sugar/m4sugar.m4 (_m4_stack_reverse): Alter API to avoid creating larger argument on each iteration. (m4_stack_foreach_sep, m4_stack_foreach_sep_lifo) (_m4_set_contents_2): Adjust all four-argument callers. 2009-02-05 Eric Blake Mention new AC_DEFUN_ONCE clients. * NEWS: Mention recent semantic changes. Reported by Ralf Wildenhues. 2009-02-03 Eric Blake Use AC_DEFUN_ONCE for some one-shot AC_PROG macros. * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Switch to AC_DEFUN_ONCE, since this is a one-shot macro. (AC_PROG_INSTALL): Likewise. 2009-02-03 Eric Blake Mention that packagers should not pre-set CFLAGS. * doc/autoconf.texi (Preset Output Variables) : Copy advice given by automake on handling variables reserved by GNU Coding Standards. Reported by Karl Berry. Document lib64 in config.site. * doc/autoconf.texi (Site Defaults): Fix typo in FHS sample file. Mention use of lib64. * THANKS: Update. Reported by Tom Browder, with help from Peter Breitenlohner. 2009-01-28 Eric Blake Use AC_DEFUN_ONCE for uncontroversial one-shot macros. * lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Switch to AC_DEFUN_ONCE, since this is a one-shot macro. * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Likewise. * lib/autoconf/general.m4 (AC_CANONICAL_BUILD) (AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise. 2009-01-28 Eric Blake Reduce blank lines in AC_DEFUN_ONCE macros. * lib/m4sugar/m4sugar.m4 (m4_defun_once): Avoid redundant blank line when a defun_once macro is required. (_m4_defun_once): New helper macro, for less memory use. * tests/m4sugar.at (m4@&t@_require: nested): Adjust test. Silence another false positive expand-before-require. * lib/m4sugar/m4sugar.m4 (_m4_defun_pro_outer) (_m4_defun_epi_outer, _m4_require_call, m4_provide): Track name that caused a diversion change, not just diversion number. (m4_require): Factor... (_m4_require_check): ...into new macro, which also checks whether diversion that performed the expansion has been collected. * tests/m4sugar.at (m4@&t@_require: nested): Enhance test. Reported by Ralf Wildenhues. 2009-01-28 Eric Blake Fix AC_C_RESTRICT for Sun Studio 12 C++. * lib/autoconf/c.m4 (AC_C_RESTRICT): Newer Sun Studio C provides __restrict__ rather than _Restrict, which still trips up Sun Studio 12 C++. * THANKS: Update. Reported by Rolf Vandevaart. 2009-01-28 Eric Blake Fix years in copyright notices. * lib/m4sugar/m4sugar.m4 (m4_copyright_condense): New macro, undocumented for now. * lib/m4sugar/Makefile.am (version.m4): Add m4_PACKAGE_YEAR, m4_PACKAGE_URL. (RELEASE_YEAR): New macro, copied from bin/Makefile.am. * lib/autoconf/general.m4 (_AC_COPYRIGHT_YEARS): New macro. (AC_COPYRIGHT): Add undocumented third parameter. (_AC_INIT_COPYRIGHT): Avoid need to bump copyright years. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise. * lib/autotest/general.m4 (AT_INIT): Likewise. * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Likewise. (AT_COPYRIGHT): Add undocumented third parameter. * tests/local.at (AT_COPYRIGHT): Don't add an extra copyright parameter; the generic copyright given by autotest is sufficient since we are the package that owns autotest. 2009-01-27 Eric Blake Use URLs in --help output, part 3: testsuite. * doc/autoconf.texi (Writing Testsuites): Mention autotest namespace. (Writing Testsuites) : Mention mandatory macros. (Making testsuite Scripts): Document AT_PACKAGE_URL. * tests/Makefile.am (package.m4): Follow our own advice. * lib/autotest/general.m4 (AT_INIT): Give the user a hint about package.m4. Enhance --help output. (_AT_COPYRIGHT_YEARS): New macro, to make copyright bump easier. Use URLs in --help output, part 2: configure. * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Bump copyright date. (_AC_INIT_PACKAGE): Support optional URL parameter, mapped to AC_PACKAGE_URL. (_AC_INIT_DEFAULTS, _AC_INIT_PREPARE): Substitute it. (_AC_INIT_HELP): Use it in './configure --help' output. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise, for './config.status --help'. Bump copyright date. * doc/autoconf.texi (Initializing configure) : Document new parameter. * NEWS: Likewise. * tests/tools.at (autoheader): Adjust test. * tests/torture.at (@%:@define header templates) (Torturing config.status): Likewise. Use URLs in --help output, part 1: autoconf executables. * bin/autoconf.as (usage): Make output consistent with recent change in gnulib version-etc module. * bin/autoheader.in ($help): Likewise. * bin/autom4te.in ($help): Likewise. * bin/autoreconf.in ($help): Likewise. * bin/autoscan.in ($help): Likewise. * bin/autoupdate.in ($help): Likewise. * bin/ifnames.in ($help): Likewise. 2009-01-27 Peter Breitenlohner (tiny change) Quote traced macros passed from autom4te to M4. * bin/autom4te (handle_m4): Apply shell_quote to macro names. * tests/tools.at (autom4te --trace and unusual macro names): New test. * THANKS: Update. 2009-01-26 Eric Blake Improve AC_DEFUN_ONCE semantics. * lib/m4sugar/m4sugar.m4 (m4_defun_once): Rewrite to be no-op, rather than warning, on second use, and make sure first use never occurs out of order. * tests/m4sugar.at (m4@&t@_require: one-shot initialization): Enhance test. * tests/base.at (AC_REQUIRE & AC_DEFUN_ONCE: [Require, expand], (AC_REQUIRE & AC_DEFUN_ONCE: [Expand, require]): Adjust tests. * NEWS: Document this. * doc/autoconf.texi (Macro Definitions) : Mention AC_DEFUN_ONCE. (Prerequisite Macros) : Likewise. (Expanded Before Required): Likewise. (One-Shot Macros) : Document new semantics. Reported by Bruno Haible, with suggestion by Paolo Bonzini. 2009-01-24 Eric Blake Fix typos in recent patches. * lib/m4sugar/m4sugar.m4: Improve m4_defun comments. * doc/autoconf.texi (Expanded Before Required): Fix typos. Reported by Ralf Wildenhues. Revert change to AC_DIR_HEADER. * lib/autoconf/headers.m4 (AC_DIR_HEADER): Explicitly expanding AC_HEADER_DIRENT no longer triggers a warning, and helps the user who decides they don't need the obsolete AC_FUNC_CLOSEDIR_VOID. Reported by Paolo Bonzini. 2009-01-22 Eric Blake Silence a false positive expand-before-require case. * lib/m4sugar/m4sugar.m4 (m4_provide): Track the diversion in which a macro was provided. (m4_require): Compare diversion numbers, rather than m4_require nesting, when determining direct requires. * tests/m4sugar.at (m4@&t@_require: nested): Test it. Reported by Ralf Wildenhues, affecting Libtool. 2009-01-21 Eric Blake Fix out-of-order expansion with expand-before-require. * lib/m4sugar/m4sugar.m4 (m4_require): Redundantly expand a required macro when issuing expand-before-require warning. * doc/autoconf.texi (Prerequisite Macros): Adjust documentation. (Expanded Before Required): New node. * tests/m4sugar.at (m4@&t@_require: nested): Adjust test. * NEWS: Mention this fix. Suggested by Bruno Haible. Warn if macro is provided before indirectly required. * lib/m4sugar/m4sugar.m4 (m4_provide): Track the set of all macros provided since last outermost defun. (_m4_defun_pro_outer): Empty the set. (_m4_require_call): Distinguish between direct and indirect requires, and remove required macros from the set. (m4_require): Check the set, in order to warn. * tests/m4sugar.at (m4@&t@_require: nested): Remove xfail, and add test case for direct requires. 2009-01-20 Eric Blake Clean up some bugs caught by preliminary dependency validation. * lib/autoconf/headers.m4 (AC_DIR_HEADER): Don't invoke AC_HEADER_DIRENT, since AC_FUNC_CLOSEDIR_VOID requires it. * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL) (_AS_SHELL_SANITIZE): Fix quoting bugs. 2009-01-19 Eric Blake Improve AC_REQUIRE documentation. * doc/autoconf.texi (Macro Definitions) : Add @defmac, and mention interaction with AC_REQUIRE. (Prerequisite Macros) : Give more detail on user ordering constraint bug, and how to fix it. * tests/m4sugar.at (m4@&t@_require: nested): New test. Speed up m4_require. * lib/m4sugar/m4sugar.m4 (_m4_divert_dump): Change semantics to always be defined, as either empty or a number. (_m4_defun_pro_outer, _m4_defun_epi_outer): Treat _m4_divert_dump as a stack, rather than a one-shot macro. (_m4_require_call): Expect third argument to be pre-expanded. (m4_divert_require, m4_require): Adjust clients accordingly. * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Likewise. 2009-01-17 Eric Blake Avoid underfull hbox. * doc/autoconf.texi (Installation Directory Variables): Reword to fit on line. 2009-01-14 Ralf Wildenhues Ignore `set -e'-related failure of NetBSD sh. * tests/m4sh.at (AS@&t@_EXIT): Skip test if (NetBSD) shell fails to finish EXIT trap after set -e. 2009-01-06 Eric Blake Maintainer cleanups. * cfg.mk (web-manual): Use new feature of gendocs. (fetch): Fetch gendocs. * Makefile.am (EXTRA_DIST): Distribute new file. * doc/Makefile.am (EXTRA_DIST): Likewise. * .gitattributes: Ignore whitespace in upstream files. * HACKING (Other web updates): Update Free Software Directory instructions. (Upload): No longer mention xdelta. * maint.mk (xd-delta): Likewise. * build-aux/gendocs.sh: New upstream file. * doc/gendocs_template: Likewise. * build-aux/announce-gen: Resync from upstream. * build-aux/config.guess: Likewise. * build-aux/config.sub: Likewise. * build-aux/gnupload: Likewise. * build-aux/texinfo.tex: Likewise. 2008-12-30 Eric Blake Make it easier to track diversion bugs. * lib/m4sugar/m4sugar.m4 (_m4_divert_raw, _m4_undivert): New internal macros, which are easier to trace than m4_builtin. (m4_cleardivert, m4_divert, m4_divert_push, m4_divert_pop) (m4_undivert): Use them. (_m4_require_call): Likewise. Use fewer macros. * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Fix typo. 2008-12-26 Bruno Haible Improve multiarch detection. * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Make detection of options indicating a universal build more reliable. 2008-12-28 William Pursell (tiny change) Use AS_CASE in documented example. * doc/autoconf.texi (Using the System Type): Use AS_CASE in example instead of raw case. 2008-12-23 Eric Blake Make m4_dumpdef more useful with M4 1.6. * lib/m4sugar/m4sugar.m4 (_m4_dumpdef): New macro. (m4_init): Install it for new enough m4. * tests/m4sugar.at (m4@&t@_dumpdef): Enhance test. * doc/autoconf.texi (Redefined M4 Macros) : Mention lack of sorting. 2008-12-24 Bruno Haible Improve INSTALL for HP-UX. * doc/install.texi (Particular Systems): For HP-UX, also recommend -D_XOPEN_SOURCE=500. Needed for the declaration of mbstate_t on HP-UX 11.11. 2008-12-22 Bruno Haible Improve INSTALL for Haiku. * doc/install.texi (Particular Systems): Add a recommendation which prefix to use on Haiku. 2008-12-19 Eric Blake Fix typo in previous commit. * doc/autoconf.texi (Set manipulation Macros) : Fix typo. Document some recently added macros. * lib/m4sugar/m4sugar.m4 (m4_map_args_w): Add optional sep parameter. * doc/autoconf.texi (Looping constructs) : Document new macros. (Set manipulation Macros) : Likewise. * tests/m4sugar.at (m4@&t@_stack, M4 loops): Enhance tests. * NEWS: Document new macros. 2008-12-18 Eric Blake Fix separator in m4_stack_foreach_sep. * lib/m4sugar/m4sugar.m4 (_m4_stack_reverse): Separate separator from prefix. * tests/m4sugar.at (m4@&t@_stack): Enhance test. 2008-12-18 Eric Blake Mention limitation of M4 1.4.x on builtin tokens. * doc/autoconf.texi (Redefined M4 Macros) : Document ramification of M4 1.4.x's inability to pass builtin tokens through text macros. (Evaluation Macros) : Likewise. * tests/m4sugar.at (m4@&t@_defn): Enhance test. * NEWS: Mention subtle change in m4_dumpdef semantics. Document m4_version_prereq. * doc/autoconf.texi (Number processing Macros) : Add documentation. * NEWS: Mention it. Reported by Bruno Haible. 2008-12-10 Jim Meyering AC_HEADER_ASSERT: don't say assertions are disabled when they're not * lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Do not make configure report "checking whether to enable assertions... no", when they are in fact enabled. This is solely a bug in the output of configure. In spite of saying "no", NDEBUG was not defined in that case. Also, as noted by Eric Blake, leave assertions enabled upon --enable-assert=INVALID. 2008-12-09 Eric Blake Fix m4_location inside m4_wrap with m4 1.4.5. * lib/m4sugar/m4sugar.m4 (m4_undefine): Redefine m4_location inside wrapped text if older m4 is detected. Reported by William Pursell. 2008-12-08 William Pursell (tiny change) and Eric Blake Fix AC_HEADER_ASSERT w.r.t. --enable-assert. * lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Honor --enable-assert, rather than treating it as a synonym for --disable-assert. * NEWS: Document the fix. 2008-12-06 William Pursell (tiny change) Fix AC_HEADER_ASSERT to honor --enable-assert, rather than treat --enable-assert and --disable-assert equivalently. * lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Check value of $enableval. 2008-12-05 William Pursell (tiny change) Fix some typos and grammatical errors in documentation. * doc/autoconf.texi: Clean up some bad use of English. 2008-12-03 Eric Blake Improve AC_STATE_SAVE. * tests/local.at (AC_STATE_SAVE): Avoid ls -1, and use one less process by hoisting the uniqueness check into sed. * doc/autoconf.texi (Limitations of Usual Tools) : Mention MacOS bug. 2008-12-02 Eric Blake Avoid MacOS readdir bug in testsuite. * tests/local.at (AC_STATE_SAVE): Avoid spurious failures due to duplicated ls entries. * THANKS: Update. Reported by Bruce Dugan and others. 2008-11-29 Ralf Wildenhues * lib/autotest/general.m4 (AT_JOB_FIFO_FD): Hide zsh 4.3.4 error messages about `set -m'. 2008-11-27 Ralf Wildenhues Fix a couple of test failures with dash. * tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Normalize exit status of `cd'. * tests/m4sh.at (AS_MESSAGE_LOG_FD): Remove script before regeneration, to avoid timing effects. 2008-11-25 Eric Blake Add m4_cleardivert. * lib/m4sugar/m4sugar.m4 (m4_cleardivert): New macro. * lib/autotest/general.m4 (AT_INIT): Use it. * lib/autoconf/general.m4 (_AC_INIT_NOTICE): Likewise. * tests/m4sugar.at (m4@&t@_divert_stack): Test it. * doc/autoconf.texi (Diversion support) : Document it. * NEWS: Likewise. Suggested by Paolo Bonzini. Add safety check for m4_expand vs. diversions. * lib/m4sugar/m4sugar.m4 (m4_expand): Make more robust against diverted text. * doc/autoconf.texi (Evaluation Macros) : Document new safety check. 2008-11-24 Eric Blake Fix typo in AS_MESSAGE_LOG_FD patch. * lib/m4sugar/m4sh.m4 (AS_ERROR): Check correct condition. 2008-11-23 Ralf Wildenhues More reliable signal handling in Autotest. * lib/autotest/general.m4 (Driver loop): Rewrite signal handler. Start parallel jobs in their own process group, enabling job control in the shell if possible, for better signal handling. Deal with INT, TERM, and HUP in the testsuite driver. In the parallel driver, propagate TSTP to jobs either as TSTP or as STOP (to avoid fork bombs with ksh). Inside the job processes, add PIPE handler to write back the job token, so the master process does not hang. Disable the parallel driver if job control is not provided or if trap does not understand signal names. * tests/autotest.at (parallel autotest and signals): New test, exercises INT, TERM, and PIPE, serial and parallel, with and without `make' in the loop. Kudos to Richard Stevens for writing APUE. 2008-11-22 Eric Blake Fix testsuite failure on Solaris. * tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Normalize failure status to 1. 2008-11-21 Eric Blake Clean up AS_MESSAGE_LOG_FD usage. * lib/m4sugar/m4sh.m4 (AS_MESSAGE_FD, AS_MESSAGE_LOG_FD) (AS_ORIGINAL_STDIN_FD): Provide default M4sh values. (_AS_ECHO_LOG, AS_MESSAGE, _AS_ERROR_PREPARE, AS_ERROR): Simplify usage. (AS_INIT_GENERATED): Don't shuffle an unchanged AS_MESSAGE_FD. * tests/m4sh.at (AS@&t@_INIT_GENERATED): Update test. (AS@&t@_MESSAGE_FD): New test. * doc/autoconf.texi (Initialization Macros) : Give more details about fd manipulation. (File Descriptor Macros): Describe M4sh defaults for the fds. 2008-11-21 Eric Blake Use shell function for AS_ERROR. * lib/m4sugar/m4sh.m4 (_AS_ERROR_PREPARE): New macro, defining a new shell function. (AS_ERROR): Use it. (_AS_LINENO_PREPARE): Break circular dependency. (AS_PREPARE, _AS_PREPARE): Initialize for child scripts. 2008-11-21 Eric Blake Fix typos in recent testsuite improvements. * lib/autotest/general.m4 (AT_INIT) : Fix typo. * NEWS: Clarify the potential impact to users. * tests/autotest.at (AT_DATA_AUTOTEST): New macro, patterned after AT_DATA_M4SUGAR. (AT_CHECK_AT_PREP, AT_CHECK_AT_TITLE): Use it. (unusual file names): Test that the recent echo fix does not regress. Fix quoting bug that made the test a no-op. Reported by Paolo Bonzini and Ralf Wildenhues. 2008-11-21 Eric Blake Use modern m4sh constructs in autoconf. * bin/autoconf.as (exit_missing_arg, getopt): Use AS_ERROR, rather than AS_EXIT. Change the semantics of AS_EXIT without argument. * lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE): When defaulting, use $? even if it is 0. (AS_ERROR): Guarantee non-zero status. * bin/autoconf.as (exit_missing_arg, getopt): Revert prior change; we want non-zero status. * tests/m4sh.at (AS@&t@_EXIT): Update test accordingly. * doc/autoconf.texi (Common Shell Constructs) : Update the documentation. : Don't overly restrict implementation. (Printing Messages) : Describe better default. Suggestions by Paolo Bonzini and Ralf Wildenhues. 2008-11-21 Eric Blake Add @anchors within Builtins and Usual Tools lists. * doc/autoconf.texi (Limitations of Builtins) (Limitatations of Usual Tools): Add anchors for tools called out by name. Adjust callers to narrow in on tool of interest. Move case statement style discussion to m4 quoting section. * doc/autoconf.texi (Limitations of Builtins): Move comparison of quoting styles... (Balancing Parentheses): ...to this new node. Suggested by Ralf Wildenhues. 2008-11-20 Eric Blake Factor more common code out of AT_CHECK into shell function. * lib/autotest/general.m4 (_AT_CHECK): Avoid echo bug if AT_LINE starts with -. Move preparations... (AT_INIT) : ...into these new shell functions. : Inline into only caller. (_AT_DECIDE_TRACEABLE): Use them to condense testsuite size. 2008-11-20 Eric Blake Handle version numbers as decimal, even if they start with 0. * lib/m4sugar/m4sugar.m4 (_m4_version_unletter): Avoid interpreting leading zeros as octal. 2008-11-20 Eric Blake Speed up AT_CHECK. * lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand third and fourth arguments once. (_AT_CHECK): Don't re-expand expected output. Rearrange code for fewer scans of arguments. (AT_CHECK): Update caller. (AT_INIT) : Drop parameter. * tests/m4sugar.at (m4@&t@_split): Protect test with quadrigraphs. Fix XFAIL related to AT_CHECK. * lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand first argument once. (_AT_CHECK): Don't re-expand commands. * tests/autotest.at (Multiline command from M4 expansion): Remove XFAIL. * tests/tools.at (autoupdating AU_ALIAS): Quote unbalanced paren. * NEWS: Document the fallout. 2008-11-20 Eric Blake Reduce forks in AC_DEFINE. * lib/autoconf/general.m4 (_AC_DEFINE_Q_PRINT): New macro. (_AC_DEFINE_Q): Use it to avoid forks for all AC_DEFINE and most AC_DEFINE_UNQUOTED. * lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Properly quote #. * tests/torture.at (Substitute and define special characters): (Define to a 2000-byte string): Enhance tests to cover AC_DEFINE_UNQUOTED. (@%:@define header templates): Enhance test to cover #. 2008-11-20 Eric Blake Improve m4_expand robustness, part 2. * lib/m4sugar/m4sugar.m4 (m4_expand): Support unterminated comments, by wrapping old implementation... (_m4_expand): ...as this, and renaming old core... (_m4_expand_): ...to this. (m4_text_box): Use lighter-weight _m4_expand. * lib/m4sugar/m4sh.m4 (_AS_DETECT_EXPAND) (_AS_DETECT_BETTER_SHELL, AS_FUNCTION_DESCRIBE): Likewise. * lib/autotest/general.m4 (AT_KEYWORDS): Likewise. * tests/m4sugar.at (m4@&t@_expand): Enhance test. * tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Likewise. * doc/autoconf.texi (Evaluation Macros) : Mention new functionality. Improve m4_expand robustness, part 1. * lib/m4sugar/m4sugar.m4 (_m4_expand): Tolerate unquoted unbalanced `)'. * tests/m4sugar.at (m4@&t@_expand): New test. 2008-11-20 Eric Blake Add m4_chomp, m4_esyscmd_s. * lib/m4sugar/m4sugar.m4 (m4_esyscmd_e, m4_chomp, m4_chomp_all): New macros. * doc/autoconf.texi (Redefined M4 Macros) : Document them. (Text processing Macros) : Likewise. * NEWS: Likewise. * tests/m4sugar.at (m4@&t@_esyscmd_s): New test. Remove _m4_index. * lib/m4sugar/m4sugar.m4 (_m4_index): Delete; it is more efficient to make callers guarantee a match. (m4_init): Adjust caller. * lib/autoconf/status.m4 (_AC_CONFIG_COMPUTE_DEST): Likewise. * lib/autoconf/general.m4 (_AC_DEFINE_Q): Likewise. Describe different hacks for balancing ')' in case statements. * doc/autoconf.texi (Limitations of Builtins) : Add an exposition on various quoting styles. 2008-11-20 Eric Blake Speed up _AS_QUOTE. * lib/m4sugar/m4sh.m4 (_AS_QUOTE_IFELSE): Inline into... (_AS_QUOTE): ...here, delete unused second paramenter, and factor choice into... (_AS_QUOTE_MODERN, _AS_QUOTE_OLD): ...new helpers. 2008-11-20 Alfred G. de Wijn (tiny change) For consistency, make temporary variable match language name. * lib/autoconf/fortran.m4 (_AC_PROG_FC_G, _AC_PROG_FC_V_OUTPUT): Match the save/test variables' names to the FFLAGS/FCFLAGS being saved. * THANKS: Update. 2008-11-19 Eric Blake Improve testsuite generation. * tests/local.at (AT_DATA_M4SUGAR, AT_DATA_M4SH) (AT_DATA_AUTOCONF): Escape all quadrigraphs, not just @&t@. Use fewer macros. 2008-11-18 Eric Blake Use fn for shell functions, func for autoconf CHECK_FUNCS. * lib/autoconf/functions.m4 (AC_CHECK_FUNC): Abbreviate shell function names. * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE) (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE) (AC_CHECK_DECL, AC_COMPUTE_INT): Likewise. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL) (_AC_CHECK_HEADER_COMPILE, _AC_CHECK_HEADER_PREPROC): Likewise. * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, _AC_TYPE_INT) (_AC_TYPE_UNSIGNED_INT, AC_CHECK_MEMBER): Likewise. * lib/autotest/general.m4 (AT_INIT): Likewise. * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK, _AS_EXIT_PREPARE) (AS_EXIT, AS_SET_STATUS, _AS_UNSET_PREPARE, _AS_MKDIR_P) (_AS_MKDIR_P_PREPARE, _AS_VAR_APPEND_PREPARE, AS_VAR_APPEND) (_AS_VAR_ARITH_PREPARE, AS_VAR_ARITH): Likewise. * doc/autoconf.texi (Shell Functions): Likewise. 2008-11-18 Eric Blake Alter default value of AS_EXIT. * lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE): Let as_func_exit parameter be optional. (AS_EXIT): Use it to make better default. (_AS_DETECT_BETTER_SHELL): Use new default. * bin/autoconf.as (exit_missing_arg, getopt): Likewise. * lib/autoconf/status.m4 (AC_OUTPUT): Likewise. * tests/m4sh.at (AS@&t@_EXIT): Update test. * doc/autoconf.texi (Common Shell Constructs) : Mention new default behavior. (Limitations of Builtins) : Adjust to use new default. * NEWS: Mention the semantic change. Suggested by Ralf Wildenhues. Update example to match actual Tru64 behavior. * doc/autoconf.texi (Limitations of Builtins) : Correct the example. Reported by Ralf Wildenhues. Add AS_SET_STATUS, make AS_EXIT more efficient. * lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE, AS_SET_STATUS): New macros. (AS_EXIT): Rewrite to avoid forks. (_AS_SHELL_SANITIZE): Avoid AS_EXIT prior to shell functions. (AS_PREPARE, _AS_PREPARE): Add new preparation. * doc/autoconf.texi (Common Shell Constructs) : Document. * NEWS: Mention new macro. * tests/m4sh.at (AS@&t@_EXIT): New test. (BASENAME_TEST): Sort. Document Tru64 bug with 'set -e'. * doc/autoconf.texi (Limitations of Builtins) : Mention a bug in mixing 'set -e' with 'trap .. 0'. Reported by Ralf Wildenhues. Document a Solaris /bin/sh bug with 'set -e'. * doc/autoconf.texi (Shell Functions): Mention the bug. 2008-11-17 Eric Blake Detect empty list in AS_FOR. * lib/m4sugar/m4sh.m4 (AS_FOR): Handle iteration over $@ properly. * tests/m4sh.at (AS@&t@_FOR): Enhance test to catch it. Reported by Paolo Bonzini. 2008-11-16 Ralf Wildenhues Use a different workaround for an automake quirk. * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove. (distclean_generic): New helper variable, to fool automake. ($(distclean_generic)): Depend on clean-local, to prevent the race in the two rules with accessing and removing $(TESTSUITE). Report by Eric Blake. * lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE): Simplify, avoid unbalanced parentheses from last change. Spotted by Eric Blake, fix suggested by Paolo Bonzini. Fix exit status of expr version of as_func_arith. * lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE): Count an exit status of 1 of expr also as success, to avoid failure if the computation result is zero. Fixes test failures with IRIX sh, where the expr variant of as_func_arith is used. Do not use read-only variable $status. * tests/compile.at (AC_RUN_IFELSE): Use $estatus instead of $status, for zsh. 2008-11-15 Eric Blake Use the new AS_FOR function. * lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Use new abstraction for cleaner code. * lib/autoconf/headers.m4 (AC_CHECK_HEADERS): Likewise. Add AS_FOR, undocumented for now. * lib/m4sugar/m4sh.m4 (AS_FOR): New macro. * tests/m4sh.at (AS@&t@_FOR): New test. Suggested by Paolo Bonzini. 2008-11-13 Eric Blake Optimize single-argument loop. * lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Avoid forks when loop only has one argument. * lib/autoconf/headers.m4 (AC_CHECK_HEADERS): Likewise. 2008-11-13 Eric Blake Fix AS_ESCAPE usage bugs. * lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_PREPARE) (_AS_VAR_ARITH_PREPARE): Expand macros prior to adding shell escapes. (AS_TR_SH, AS_VAR_GET): Use _AS_ESCAPE for speed. * doc/autoconf.texi (Polymorphic Variables) : Document caveat due to conditional AS_ESCAPE. * tests/m4sh.at (AS@&t@_VAR basics): Enhance test. 2008-11-12 Eric Blake Whitespace reduction in configure. * lib/autoconf/autoheader.m4 (AH_VERBATIM): Avoid empty lines. * lib/autoconf/general.m4 (_AC_INIT_PREPARE, AC_CHECK_FILES): Likewise. (_AC_DEFINE_Q): Restore empty line, since some clients in the wild depend on it. 2008-11-12 Eric Blake Make M4sh, not autoconf, guarantee sane $SHELL. * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Move setting of SHELL... * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): ...to here. * doc/autoconf.texi (Initialization Macros): Document the effect on SHELL. * tests/m4sh.at (AS@&t@_INIT_GENERATED): New test. Reported by Ralf Wildenhues. 2008-11-12 Ralf Wildenhues Wrap keywords in `testsuite --list' output. * lib/autotest/general.m4 (AT_INIT): Rewrite --list awk script, avoid lint warnings from gawk, wrap keyword lists to stay below 80 characters per line if possible. * tests/autotest.at (Keyword wrapping): New test. * tests/local.at (AT_COPYRIGHT): Bump copyright years. * doc/autoconf.texi (Conditional constructs, Macro Names): Fix typos. 2008-11-10 Eric Blake Work around <=m4-1.4.9 bug in m4_format. * lib/m4sugar/m4sugar.m4 (_m4_index): New internal macro. (m4_init): Only use it in older m4. * lib/autoconf/general.m4 (_AC_DEFINE_Q): Use it to avoid m4_format bug in older m4. * lib/autoconf/status.m4 (_AC_CONFIG_COMPUTE_DEST): Likewise. Reported by Bob Proulx. 2008-11-10 Eric Blake Match upstream standards.texi. * doc/standards.texi: Resync from upstream. * doc/fdl-1.3.texi: Rename... * doc/fdl.texi: ...to this. * doc/Makefile.am (autoconf_TEXINFOS, standards_TEXINFOS): Update users. * doc/autoconf.texi (GNU Free Documentation License): Likewise. * cfg.mk (fetch): Likewise. Yet more FDL 1.3 fallout. * NEWS: Mention manual license change. 2008-11-10 Eric Blake Avoid some regex uses. * lib/autoconf/general.m4 (_AC_DEFINE_Q): Use m4_format rather than m4_bpatsubst to grab string prefix. * lib/autoconf/status.m4 (_AC_CONFIG_REGISTER) (_AC_CONFIG_REGISTER_DEST, AC_CONFIG_SUBDIRS): Likewise. (_AC_FILE_DEPENDENCY_TRACE_COLON): Use m4_translit instead of m4_bpatsubst to change bytes. (_AC_CONFIG_DEPENDENCY_DEFAULT): Use m4_index rather than m4_bmatch to find byte. (_AC_CONFIG_COMPUTE_DEST): New helper macro. Use more efficient macros in AC_CONFIG_SUBDIRS. * lib/autoconf/status.m4 (_AC_CONFIG_FOOS, AC_CONFIG_SUBDIRS): Use m4_map_args_w. (_AC_OUTPUT_FILE): Use m4_map_args_sep and m4_map_args. (_AC_OUTPUT_FILE_ADJUST_DIR): New helper macro. Use more efficient macros in AC_CHECK_FILES and AC_CHECK_DECLS. * lib/autoconf/general.m4 (AC_CHECK_FILES): Use m4_map_args_w, and avoid typo. (AC_CHECK_DECLS, AC_CHECK_DECLS_ONCE): Use m4_map_args_sep. (_AC_CHECK_FILES, _AC_CHECK_DECLS, _AC_CHECK_DECL_ONCE): New helper macros. (AC_LIBSOURCES): Use m4_map_args. Use more efficient macros in AC_CHECK_TYPES. * lib/autoconf/types.m4 (AC_CHECK_TYPES, AC_CHECK_MEMBERS): Use m4_map_args_sep. (_AC_CHECK_TYPES, _AC_CHECK_MEMBERS): New helper macros. Use more efficient macros in AC_CHECK_HEADERS. * lib/autoconf/headers.m4 (AH_CHECK_HEADERS) (AH_CHECK_HEADERS_DIRENT): Rename... (_AH_CHECK_HEADER, _AH_CHECK_HEADER_DIRENT): ...and take only one argument, rather than a list. (AC_CHECK_HEADERS, AC_CHECK_HEADERS_ONCE): Adjust callers to use m4_map_args_w. (AC_HEADER_DIRENT): Adjust caller to use m4_map_args. (_AC_CHECK_HEADER_ONCE): New helper macro. Use more efficient macros in AC_CHECK_FUNCS. * lib/autoconf/functions.m4 (_AH_CHECK_FUNCS): Rename... (_AH_CHECK_FUNC): ...and take only one argument, rather than a list. (AC_CHECK_FUNCS, AC_CHECK_FUNCS_ONCE): Adjust callers to use m4_map_args_w. (_AC_CHECK_FUNC_ONCE): New helper macro. (AC_REPLACE_FUNCS): Use m4_map_args_w. Use more efficient macro in AT_INIT. * lib/autotest/general.m4 (AT_INIT): Use m4_map_args. 2008-11-10 Eric Blake More FDL 1.3 fallout. * cfg.mk (fetch): Add gnu-oids.texi, drop fdl.texi. * doc/Makefile.am (standards_TEXINFOS): Reflect upstream dependency changes. * doc/fdl.texi: Delete. * doc/gnu-oids.texi: New upstream file. * doc/standards.texi: Resync from upstream. * doc/make-stds.texi: Likewise. * build-aux/announce-gen: Likewise. * build-aux/texinfo.tex: Likewise. 2008-11-10 Clinton Roy (tiny change) Pass autoreconf -I to aclocal -I * bin/autoreconf.in (parse_args): Pass --include to aclocal. * doc/autoconf.texi (autoreconf Invocation): Updates for above. * NEWS: Document it. * THANKS: Update. 2008-11-10 Eric Blake Try 'print -r --' as a non-forking variant of 'printf %s\\n'. * lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Cater to Solaris ksh. * doc/autoconf.texi (Limitations of Builtins) : Document the print workaround. Idea by Paolo Bonzini. 2008-11-10 Eric Blake Provide a section on all tools allowed in GNU Coding Standards. * doc/autoconf.texi (Limitations of Builtins) : Sort. : Add section. (Limitations of Usual Tools) : Make table entry consistent. Add sections. 2008-11-09 Paolo Bonzini Balance parentheses in _AC_CACHE_DUMP. * lib/autoconf/general.m4 (_AC_CACHE_DUMP): Balance parentheses without introducing \). 2008-11-07 Eric Blake Further doc updates for AC_CHECK_HEADER change. * doc/autoconf.texi (Generic Headers) : Mention new default, and make it more obvious that using [-] is generally broken. 2008-11-07 Eric Blake * ChangeLog: Enforce UTF-8 encoding. 2008-11-06 Eric Blake Skip preprocessor check in AC_CHECK_HEADERS_ONCE. * lib/autoconf/headers.m4 (_AC_HEADERS_EXPANSION): Provide fourth argument to speed up check. 2008-11-06 Eric Blake Speed up AC_CHECK_TYPE. * lib/autoconf/types.m4 (AC_CHECK_TYPE): Factor out $@, and avoid regex when enough arguments are present. 2008-11-06 Paolo Bonzini Remove three forks per _AC_RUN_LOG_STDERR in the common case. * lib/autoconf/general.m4 (_AC_RUN_LOG_STDERR): Avoid grep/rm/cat sequence when the program's stderr was empty, while providing a conftest.err file even in that case. (_AC_CACHE_DUMP): Fix mismatched parenthesis. 2008-11-06 Paolo Bonzini Change `present but cannot be compiled' behavior to use compiler result. * NEWS: Document it. * doc/autoconf.texi (Present But Cannot Be Compiled): Document it. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Implement it and adjust warning. * tests/semantics.at (AC_CHECK_HEADERS): Test new semantics. 2008-11-05 Eric Blake Add m4_map_args_w. * lib/m4sugar/m4sugar.m4 (m4_map_args_w): New macro, undocumented for now. (_m4_split): Allow user control over separator. (m4_split): Adjust caller. (m4_foreach_w, m4_append_uniq_w, _m4_text_wrap): Rewrite to use m4_map_args_w. * tests/m4sugar.at (m4@&t@_append): Augment test keywords. (M4 loops): Test new interface. Use m4_set_map_sep in more places. * lib/m4sugar/m4sugar.m4 (m4_set_difference, m4_set_intersection) (m4_set_union): Use m4_set_map_sep rather than m4_set_foreach. * doc/autoconf.texi (Set manipulation Macros) : Enhance documentation. : Mention faster alternative. (Looping constructs) : Likewise. Unify m4_set_foreach and m4_set_map. * lib/m4sugar/m4sugar.m4 (m4_set_map_sep): New macro, undocumented for now. (m4_set_contents, m4_set_foreach, m4_set_list, m4_set_listc) (m4_set_map): Adjust callers. Use _m4_foreach in more places. * lib/m4sugar/foreach.m4 (m4_dquote_elt, m4_join, m4_joinall) (_m4_minmax, m4_set_add_all): Use _m4_foreach instead of m4_foreach. * lib/m4sugar/m4sugar.m4 (_m4_joinall): Use m4_map_args_sep instead of m4_foreach or m4_map_args. Unify _m4_foreach and _m4_map. * lib/m4sugar/m4sugar.m4 (_m4_map): Delete, merged with... (_m4_foreach): ...this. (m4_foreach, m4_map, m4_mapall, m4_map_sep, _m4_mapall_sep) (m4_map_args, m4_map_args_sep): Adjust callers. * lib/m4sugar/foreach.m4 (_m4_map): Rename... (_m4_foreach): ...to this, overwriting old definition. 2008-11-04 Eric Blake Add m4_map_args_sep, undocumented for now. * lib/m4sugar/m4sugar.m4 (m4_map_args_sep): New macro. (_m4_map): Change API to cover more of m4_map*. * lib/m4sugar/foreach.m4 (_m4_map): Adjust to new API. (m4_map_args): Delete. * tests/m4sugar.at (m4@&t@_map_args and m4@&t@_curry): Enhance test. Improve m4_for performance. * lib/m4sugar/m4sugar.m4 (_m4_for): Alter API to make it easier to avoid m4_define by some clients. (m4_for): Adjust caller. * lib/m4sugar/foreach.m4 (_m4_foreach, m4_case, m4_bmatch) (_m4_cond, _m4_bpatsubsts, _m4_shiftn, m4_do, m4_reverse) (_m4_map, m4_map_args, m4_map_args_pair, _m4_list_pad) (_m4_list_cmp): Likewise. 2008-11-04 Eric Blake Adjust expected output. * tests/torture.at (Missing templates): Reflect added quoting. Detected by Bob Proulx's buildbot. Reject arguments with leading =. * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Detect case of missing variable name, with fewer forks. Quote invalid arguments in message, in case they include spaces. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS) (_AC_OUTPUT_MAIN_LOOP): Quote invalid arguments. * lib/autotest/general.m4 (AT_INIT): Likewise. * tests/base.at (configure arguments): Test this. Reported by Jeff Squyres. 2008-11-04 Eric Blake Upgrade to FDL 1.3. * cfg.mk (fetch): Add fdl-1.3.texi. * .gitattributes: Likewise. * doc/autoconf.texi (GNU Free Documentation License): Point to new upstream version. * doc/Makefile.am (autoconf_TEXINFOS): Likewise. (standards_TEXINFOS): Mention current dependence on older license. * doc/fdl-1.3.texi: New upstream file. * GNUmakefile: Resync from upstream. * build-aux/announce-gen: Likewise. * build-aux/texinfo.tex: Likewise. 2008-11-03 Ralf Wildenhues Point at AM_SUBST_NOTMAKE. * doc/autoconf.texi (Setting Output Variables): Add cross reference to new Automake macro AM_SUBST_NOTMAKE. 2008-11-03 Paolo Bonzini Eliminate a fork per invocation of AC_LANG_CONFTEST. * lib/autoconf/c.m4 (AC_LANG_CONFTEST(C)): Define instead of AC_LANG_SOURCE(C). * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Add a comment at the top of confdefs.h, which also works around cpp deficiencies. * lib/autoconf/lang.m4 (AC_LANG_DEFINE): Define AC_LANG_CONFTEST(xyz) (AC_LANG_CONFTEST): Dispatch based on _AC_LANG. (AC_LANG_CONFTEST()): New. 2008-11-03 Paolo Bonzini Reorganize definition of languages. * lib/autoconf/c.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Objective C), _AC_LANG_ABBREV(C), _AC_LANG_ABBREV(C++), _AC_LANG_ABBREV(Objective C), _AC_LANG_PREFIX(C), _AC_LANG_PREFIX(C++), _AC_LANG_PREFIX(Objective C)): Replace definitions with usage of AC_LANG_DEFINE. (Sections 2b, 2c): Delete. (Sections 1b, 1c): Move after section 2a. * lib/autoconf/erlang.m4 (AC_LANG(Erlang), _AC_LANG_ABBREV(Erlang), _AC_LANG_PREFIX(Erlang), AC_LANG_SOURCE(Erlang)): Replace definitions with usage of AC_LANG_DEFINE. (AC_LANG_ERLANG): Define using AU_DEFUN. * lib/autoconf/fortran.m4 (AC_LANG(Fortran), AC_LANG(Fortran 77), _AC_LANG_ABBREV(Fortran), _AC_LANG_ABBREV(Fortran 77), _AC_LANG_PREFIX(Fortran), _AC_LANG_PREFIX(Fortran 77), _AC_LANG_SOURCE(Fortran), AC_LANG_SOURCE(Fortran 77)): Replace definitions with usage of AC_LANG_DEFINE. * lib/autoconf/lang.m4 (AC_LANG_DEFINE, AC_LANG_SOURCE()): New. 2008-11-03 Paolo Bonzini Use preprocessor in cpp tests. * tests/c.at (CPP tests): Use AC_CHECK_HEADERS(..., [-]). 2008-10-31 Paolo Bonzini Rename _AC_CHECK_HEADER_OLD and _AC_CHECK_HEADER_NEW. * lib/autoconf/headers.m4 (AC_CHECK_HEADER): Adjust naming. (_AC_CHECK_HEADER_PREPROC_BODY): New name of _AC_CHECK_HEADER_OLD_BODY. (_AC_CHECK_HEADER_COMPILE_BODY): New name of _AC_CHECK_HEADER_NEW_BODY. (_AC_CHECK_HEADER_PREPROC): New name of _AC_CHECK_HEADER_OLD. (_AC_CHECK_HEADER_COMPILE): New name of _AC_CHECK_HEADER_NEW. * tests/semantics.at (AC_CHECK_HEADERS_OLD, AC_CHECK_HEADER_NEW): Give better name. 2008-10-31 Eric Blake Support multiple undiverts and dumpdefs at once. * lib/m4sugar/m4sugar.m4 (m4_dumpdefs, m4_undivert): Allow extra arguments. * doc/autoconf.texi (Redefined M4 Macros) , : Document argument list change. * tests/m4sugar.at (m4@&t@_divert_stack, m4@&t@_dumpdef): Test them. Simplify diversion stack handling. * lib/m4sugar/m4sugar.m4 (m4_divert_stack): Use fewer macros, and avoid extra newlines. (m4_divert_stack_push): Compute location here, rather than caller. (m4_divert_push): Update caller. (m4_divert): Likewise, and also adjust current diversion name. (m4_divert_pop): Simplify rule that diversion stack must never go empty. (_m4_require_call): Bypass diversion stack when collecting required macro text. (m4_init): Set current diversion without requiring m4_init. * lib/m4sugar/m4sh.m4 (AS_INIT): Avoid too many pops. * lib/autotest/general.m4 (AT_INIT): Likewise. * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Schedule wrapped text to run prior to m4sugar cleanup. * doc/autoconf.texi (Text processing Macros) : Mention optional argument. (Conditional constructs) : Mention use of dnl. * NEWS: Undo blurb about m4_divert. * tests/m4sugar.at (m4@&t@_divert_stack): New test. Simplify expansion stack handling. * lib/m4sugar/m4sugar.m4 (m4_expansion_stack): Use fewer macros; always output 'top level'. (_m4_expansion_stack_entry): New macro, to format the string only when needed. (m4_expansion_stack_push): Only push a macro name. (m4_warn, _m4_defun_pro): Update callers. (m4_expansion_stack_pop, m4_expansion_stack_dump): Delete. (_m4_defun_epi, m4_fatal): Inline the calls. * tests/m4sugar.at (m4@&t@_expansion_stack): New test. 2008-10-30 Eric Blake Better documentation of AC_CHECK_HEADER's fourth argument. * doc/autoconf.texi (Generic Headers) : Mention how to suppress compiler or preprocessor header check. Reported by Jeff Squyres. 2008-10-30 Eric Blake Fix LINENO testsuite failure. * tests/m4sh.at (AT_DATA_LINENO): Use AS_LINENO_PREPARE, not undocumented _AS_PREPARE, and move unset earlier in script. Update LINENO documentation. * doc/autoconf.texi (Initialization Macros) : (Special Shell Variables) : Mention that LINENO support in child scripts may be broken. Modernize example. 2008-10-30 Paolo Bonzini Do not check for $LINENO in generated scripts. * lib/m4sugar/m4sh.m4 (_AS_PREPARE): Do not call _AS_LINENO_PREPARE, and explain why. 2008-10-30 Eric Blake Don't check for non-POSIX extensions in suggested tests. * lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_WORKS): Remove suggestion; we still use += if available, but should not reject shells (like dash) that don't provide it. (_AS_DETECT_SUGGESTED): Document a policy for m4sh. Reported by Paolo Bonzini. 2008-10-30 Paolo Bonzini Pass CONFIG_SHELL down to generated scripts, and re-export SHELL. * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): If proceeding with a given CONFIG_SHELL, move it to SHELL. (AS_INIT_GENERATED): Re-export SHELL. 2008-10-30 Eric Blake Work around Solaris /bin/sh case bug. * lib/m4sugar/m4sh.m4 (_AS_CASE, _AS_CASE_DEFAULT): Always provide a non-empty command list. (AS_CASE): Always guarantee that a case will match. * doc/autoconf.texi (Limitations of Builtins) : Document the Solaris bug, and mention AS_CASE. 2008-10-30 Paolo Bonzini Require _AS_CR_PREPARE where appropriate. * lib/m4sugar/m4sh.m4 (_AS_PREPARE): Call _AS_CR_PREPARE. (AS_PREPARE): Require _AS_CR_PREPARE. Avoid walking the entire PATH when looking for a better shell. * lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Test shell characteristics as the PATH is walked. Add third argument to _AS_PATH_WALK * lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Do not call _AS_CR_PREPARE. (_AS_PATH_WALK): Add third optional argument. Trim down the length of the shell function test. * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK): Condense. 2008-10-29 Eric Blake Fix LINENO detection to work around bash and pdksh limitations. * lib/m4sugar/m4sh.m4 (_AS_LINENO_WORKS): Enhance the test, so that we can choose which of two tests to trust. (_AS_RUN): Set flag when alternate shell is running. (_AS_DETECT_EXPAND): New macro. (_AS_DETECT_BETTER_SHELL): Use it to massage LINENO tests. 2008-10-29 Eric Blake Mention proper fix for zsh users. * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Recommend zsh version known to work. Suggested by Paolo Bonzini. Document current beta-quality status. * configure.ac: Reflect fact that change to git-version-gen produces -, but not always a letter, on non-release builds. * BUGS: Mention known issues. * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Ask for help in debugging platforms with deficient shells. 2008-10-29 Eric Blake Alter signature of AS_INIT_GENERATED. * lib/m4sugar/m4sh.m4 (AS_INIT_GENERATED): Add parameters, and manage here-doc and chmod in place. This also allows future changes for optimizing the child via diversion/m4_wrap magic. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Update caller. * doc/autoconf.texi (Initialization Macros) : Update the documentation. 2008-10-29 Eric Blake Use _m4_stack_reverse in m4_set. * lib/m4sugar/m4sugar.m4 (_m4_set_contents_1) (_m4_set_contents_2): Rewrite to share _m4_stack_reverse implementation. (m4_set_contents, m4_set_foreach, m4_set_list, m4_set_listc) (m4_set_map): Adjust callers to new API. Add m4_stack_foreach_sep. * lib/m4sugar/m4sugar.m4 (m4_stack_foreach_sep) (m4_stack_foreach_sep_lifo): New macros. (_m4_stack_reverse): Adjust prototype, to support it. (m4_copy): Use fewer macros. * tests/m4sugar.at (m4@&t@_stack_foreach): Rename... (m4@&t@_stack): ...and add m4_stack_foreach_sep tests. 2008-10-29 Bruno Haible Mention Sun WorkShop 6.2 OpenMP bug. * doc/autoconf.texi (AC_OPENMP): Document portability pitfall. 2008-10-29 Paolo Bonzini Rewrite handling of diversion and expansion stack. * NEWS: Document stricter requirement on m4_init. * lib/m4sugar/m4sugar.m4 (m4_divert_stack): New, replacing _m4_divert_n_stack. (_m4_divert_stack_push): New. (m4_divert): Use _m4_divert_stack_push and replace m4_define with m4_popdef. (m4_divert_push): Use _m4_divert_stack_push. (m4_divert_pop): Use m4_divert_stack instead of _m4_divert_n_stack, pop _m4_divert_stack instead of m4_divert_stack. (m4_expansion_stack): New. Update comment above it. (m4_expansion_stack_push, m4_expansion_stack_pop): Work on _m4_expansion_stack instead of m4_expansion_stack. (m4_expansion_stack_dump): Check presence of _m4_expansion_stack instead of m4_expansion_stack. Use m4_expansion_stack's expansion instead of the definition, and compensate for the trailing newline in the expansion. (m4_warn, _m4_defun_pro, _m4_defun_epi): Check presence of _m4_expansion_stack instead of m4_expansion_stack. (m4_newline): Expand first argument after the newline. (m4_init): Use m4_divert_stack instead of _m4_divert_n_stack, * tests/m4sugar.at (m4_append, m4_text_wrap): Invoke m4_init. * tests/tools.at (whitespace in file names, the empty token): Likewise. 2008-10-28 Eric Blake Reduce forks while searching for better shell. * lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED) (_AS_DETECT_SUGGESTED): No need to provide extra subshell; _AS_RUN already does the job. (_AS_DETECT_BETTER_SHELL): Simplify AS_EXIT when not run in a trap 0 context. Undo needless efforts to protect $2 in $2_t. * lib/autoconf/types.m4 (_AC_TYPE_INT_BODY) (_AC_TYPE_UNSIGNED_INT_BODY): Reduce extra quoting. 2008-10-28 Ralf Wildenhues Fix parallel test execution output lossage. * lib/autotest/general.m4 (_AT_CHECK): Truncate files to hold standard output and standard error before the test, use append mode for writing. * THANKS: Update. Caught by Bob Proulx' build daemons, analysis and suggested fix by Stéphane Chazelas. 2008-10-28 Eric Blake Use m4_map_args in more places. * lib/m4sugar/m4sugar.m4 (m4_defn, m4_dumpdef, m4_popdef) (m4_undefine, m4_combine): Use m4_map_args, rather than m4_foreach. 2008-10-28 Eric Blake Override m4 1.4.x dumpdef, as it breaks autom4te. * lib/m4sugar/m4sugar.m4 (m4_dumpdef): New implementation. (m4_copy): Formatting touchup. * doc/autoconf.texi (Redefined M4 Macros) : Mention semantic differences as well as m4_dumpdefs. * NEWS: Likewise. * tests/m4sugar.at (m4@&t@_dumpdef): New test. 2008-10-28 Eric Blake Allow m4sugar to be used without autom4te, such as in bison. * lib/m4sugar/m4sugar.m4 (m4_text_wrap, m4_qlen): Document that alternate escape sequences can be used. (m4_text_box): Likewise. Don't output quadrigraphs. (m4_qdelta): Delete unused macro. 2008-10-28 Paolo Bonzini Add m4_stack_foreach and m4_stack_foreach_lifo. * lib/m4sugar/m4sugar.m4 (_m4_stack_reverse): New from _m4_copy. (m4_stack_foreach, m4_stack_foreach_lifo): New. (m4_copy): Use m4_stack_foreach and m4_curry. (_m4_dumpdefs_down, _m4_dumpdefs_up): Remove. (m4_dumpdefs): Rewrite using m4_stack_foreach_lifo. * tests/m4sugar.at (m4_stack_foreach): New test. 2008-10-28 Paolo Bonzini use a shell function for AC_TYPE_INTx_T * lib/autoconf/types.m4 (_AC_TYPE_INT_BODY, _AC_TYPE_UNSIGNED_INT_BODY): New. (_AC_TYPE_INT, _AC_TYPE_UNSIGNED_INT): Define and use a shell function. 2008-10-28 Paolo Bonzini * lib/autoconf/general.m4 (AC_CHECK_DECL): Fix AS_ESCAPE usage. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL, _AC_CHECK_HEADER_NEW): Likewise. * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, AC_CHECK_MEMBER): Likewise. 2008-10-28 Paolo Bonzini * lib/autoconf/types.m4 (_AC_CHECK_MEMBER_BODY): New. (AC_CHECK_MEMBER): Define and use a shell function. 2008-10-27 Eric Blake Prefer m4_fatal over AC_FATAL. * lib/autoconf/types.m4 (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF) (AC_CHECK_MEMBER): Use non-obsolete macro name. * lib/autoconf/fortran.m4 (_AC_LIST_MEMBER_IF): Likewise. * lib/autoconf/general.m4 (AC_REQUIRE_AUX_FILE, AC_SUBST): Likewise. * lib/autoconf/lang.m4 (_AC_LANG_DISPATCH): Likewise. * lib/autoconf/status.m4 (_AC_CONFIG_DEPENDENCY_DEFAULT) (_AC_CONFIG_UNIQUE, _AC_CONFIG_REGISTER_DEST): Likewise. 2008-10-27 Eric Blake Avoid raw carriage return in scripts. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Generate CR via tr, rather than with literal byte. * THANKS: Update. Reported by Steven R. Loomis; patch suggested by Thomas Dickey. 2008-10-27 Eric Blake Use AS_VAR_ARITH. * lib/autotest/general.m4 (at_func_arith): Delete; replace all clients with AS_VAR_ARITH instead. * lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE): Use new macro. * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Likewise. * tests/torture.at (Torturing config.status): Likewise. * tests/tools.at (autom4te --force): Likewise. Add AS_VAR_ARITH. * lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE, _AS_VAR_ARITH_WORKS) (AS_VAR_ARITH): New macros. (_AS_PREPARE, AS_PREPARE): Emit preparation. * tests/m4sh.at (AS@&t@_VAR_ARITH): New test. * doc/autoconf.texi (Polymorphic Variables) : Document new macro. (Limitations of Usual Tools) : Mention portability problem if first argument starts with -. (Shell Substitutions) <$((expression))>: Mention it. * NEWS: Likewise. 2008-10-27 Eric Blake Use read, rather than `cat`, for safe one-line files. * lib/autotest/general.m4 (AT_CLEANUP): Avoid a fork, since it is known that the file has only one line and no \. * lib/autoconf/general.m4 (_AC_COMPUTE_INT_RUN): Likewise. 2008-10-27 Paolo Bonzini * lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE, _AC_COMPUTE_INT_RUN): Add IF-SUCCESS argument. (_AC_COMPUTE_INT_BODY): New. (AC_COMPUTE_INT): Define and use a shell function. 2008-10-27 Paolo Bonzini * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW_BODY): Extract test body here. Move head comment of _AC_CHECK_TYPE_NEW here. (_AC_CHECK_TYPE_NEW): Define a shell function and call it. 2008-10-27 Paolo Bonzini * lib/autoconf/general.m4 (_AC_CHECK_DECL_BODY): New. (AC_CHECK_DECL): Use a shell function. 2008-10-27 Paolo Bonzini * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_OLD, _AC_CHECK_HEADER_NEW): Use a shell function. 2008-10-25 Eric Blake Track recent copyright assignments. * AUTHORS: Update. 2008-10-25 Paolo Bonzini and Eric Blake Use a shell function for _AC_CHECK_HEADER_MONGREL. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL_BODY): New macro. (_AC_CHECK_HEADER_MONGREL): Use a shell function. 2008-10-25 Eric Blake Simplify _AS_PREPARE handling of functions. * lib/m4sugar/m4sh.m4 (AS_REQUIRE_SHELL_FN): Factor... (_AS_REQUIRE_SHELL_FN): ...into new helper macro. (_AS_PREPARE): Temporarily redefine AS_REQUIRE_SHELL_FN to make this task easier. (_AS_LINENO_PREPARE): Make more efficient. (_AS_MKDIR_P_PREPARE): Simplify use in _AS_PREPARE. (_AS_UNSET_PREPARE): Avoid blank newline. (AS_INIT): Emit as_func_unset alongside other functions. 2008-10-25 Eric Blake Document AS_EXIT. * doc/autoconf.texi (Common Shell Constructs) : Document this macro. (Limitations of Builtins): Mention AS_EXIT. * NEWS: Mention it. Use AS_EXIT in autoconf.as. * bin/autoconf.as: Consistently use AS_EXIT. 2008-10-24 Eric Blake Fix m4 underquoting in AC_PROG_INSTALL. * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Produce accurate character ranges. Speed up AC_CHECK_HEADER. * lib/autoconf/headers.m4 (AC_CHECK_HEADER): Factor out $@. 2008-10-24 Paolo Bonzini and Eric Blake Use a shell function for AC_CHECK_FUNC. * lib/autoconf/functions.m4 (_AC_CHECK_FUNC_BODY): New macro. (AC_CHECK_FUNC): Use a shell function. * lib/autoconf/c.m4 (AC_LANG_SOURCE(C)): Reduce number of forks. 2008-10-24 Eric Blake Work around fact that gnulib-tool doesn't use m4_copy. * lib/autoconf/general.m4 (AC_LIBOBJ, AC_LIBSOURCES): Defun, not define, so that an initial location is present, to account for fact that gnulib-tool pushes another AC_DEFUN'd macro on top. Make m4_defun_init more robust. * lib/m4sugar/m4sugar.m4 (m4_defun_init): Handle indirect macro names, and correct number of arguments. (m4_copy): Also set up location of the copy. (m4_defun): When copied, use current macro name, not original. * tests/m4sugar.at (m4@&t@_require: one-shot initialization): Update test. Optimize clients of AS_REQUIRE. * lib/m4sugar/m4sugar.m4 (m4_defun): Add undocumented third argument. (m4_defun_init): New undocumented macro. * lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG, AS_MESSAGE, AS_BASENAME) (_AS_DIRNAME_EXPR, AS_DIRNAME, AS_ECHO, AS_ECHO_N, AS_TEST_X) (AS_LN_S, AS_MKDIR_P, _AS_PATH_WALK, AS_VERSION_COMPARE) (AS_TR_SH, AS_TR_CPP, AS_VAR_APPEND, AS_VAR_PUSHDEF): Use it to simplify these macros once the one-shot initialization is complete. * tests/m4sugar.at (m4@&t@_require: one-shot initialization): New test. Improve m4_copy. * lib/m4sugar/m4sugar.m4 (m4_copy): Add second implementation for public use. (_m4_copy): New macro, which preserves pushdef stacks. (_m4_defun_pro_outer): Bypass it, for speed. (m4_init): Bypass new implementation, since it breaks on m4_defn. * bin/autoupdate.in (handle_autoconf_macros): Likewise. * lib/autoconf/general.m4 (AC_PREREQ): Undefine before redefining, now that m4_copy checks this. * doc/autoconf.texi (Redefined M4 Macros) : Document this, as well as m4_rename. * lib/autoconf/autoconf.m4 (m4_copy): Temporarily redefine when renaming builtins, since it breaks on m4_ifdef. * NEWS: Likewise. * tests/m4sugar.at (m4@&t@_defn): Enhance test. 2008-10-24 Eric Blake AC_FUNC_GETGROUPS: Revert regression. * lib/autoconf/functions.m4 (AC_FUNC_GETGROUPS): Only set ac_cv_func_getgroups_works=no when it is not available. 2008-10-23 Eric Blake Whitespace cleanup. * lib/autoconf/fortran.m4: Consistently use tabs. 2008-10-23 Chikama Masaki (tiny change) For gfortran on sh, ignore -little. * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Add -little to list of ignored arguments. * THANKS: Update. 2008-10-23 Paolo Bonzini Eliminate empty lines after AC_*_IFELSE. * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE): Add a dnl at end. 2008-10-23 Paolo Bonzini Avoid a fork in _AC_RUN_LOG and _AC_RUN_LOG_STDERR * lib/autoconf/general.m4 (_AC_RUN_LOG, _AC_RUN_LOG_STDERR): Return a boolean status code based on $ac_status. 2008-10-23 Paolo Bonzini Ensure actions can look at conftest* files. * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY, _AC_COMPILE_IFELSE_BODY, _AC_LINK_IFELSE_BODY, _AC_RUN_IFELSE_BODY): Move rm commands, except IPA files and Apple debug symbols... (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE): ...in here. * tests/compile.at: Add regression test. 2008-10-23 Eric Blake Remove excess dnl from m4sh. * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL, _AS_PREPARE) (_AS_SHELL_FN_WORK, _AS_SHELL_SANITIZE, AS_IF, _AS_ECHO_LOG) (AS_MESSAGE, AS_ERROR, AS_BASENAME, _AS_BASENAME_PREPARE) (_AS_DIRNAME_EXPR, AS_DIRNAME, _AS_DIRNAME_PREPARE, AS_ECHO) (AS_ECHO_N, AS_TEST_X, AS_EXECUTABLE_P, _AS_ME_PREPARE) (_AS_LINENO_PREPARE, AS_LN_S, AS_MKDIR_P, _AS_PATH_WALK) (AS_SET_CATFILE, AS_HELP_STRING, AS_TMPDIR, AS_VERSION_COMPARE) (_AS_TR_SH_PREPARE, AS_TR_SH, _AS_TR_CPP_PREPARE, AS_TR_CPP) (_AS_TR_PREPARE, AS_VAR_APPEND, AS_VAR_PUSHDEF) (AS_INIT_GENERATED): Use fewer dnl in m4sh macro bodies. 2008-10-23 Paolo Bonzini and Eric Blake Use a shell function for _AC_RUN_IFELSE. * lib/autoconf/general.m4 (_AC_RUN_IFELSE_BODY): New macro. (_AC_RUN_IFELSE): Use a shell function. (_AC_RUN_LOG): Avoid subshell for logging. 2008-10-23 Eric Blake Formatting tweak: balance () with m4sh case statements. * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL) (_AS_SHELL_SANITIZE, _AS_ECHO_N_PREPARE, _AS_ECHO_PREPARE) (AS_SET_CATFILE, _AS_TEST_PREPARE): Add strategic shell comments. (_AS_CASE, _AS_CASE_DEFAULT, AS_CASE): Rearrange newlines, to allow output of strategic shell comments. (AS_VERSION_COMPARE): Use AS_CASE. * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Enhance test. 2008-10-22 Jim Meyering AC_FUNC_GETGROUPS: always define $ac_cv_func_getgroups_works * lib/autoconf/functions.m4 (AC_FUNC_GETGROUPS): Always define the shell variable, $ac_cv_func_getgroups_works. Otherwise, if it is set to "yes" in the environment and configure is run on a system like mingw that lacks the getgroups function, it would mistakenly define HAVE_GETGROUPS. Reported by Simon Josefsson in . 2008-10-22 Paolo Bonzini and Eric Blake Use a shell function for _AC_LINK_IFELSE. * lib/autoconf/general.m4 (_AC_LINK_IFELSE_BODY): New macro. (_AC_LINK_IFELSE): Use a shell function. 2008-10-22 Eric Blake Fix autoconf logging commands. * lib/autoconf/general.m4 (AC_MSG_RESULT_UNQUOTED, _AC_EVAL) (_AC_EVAL_STDERR, AC_RUN_LOG): Respect as_lineno. (_AC_DO_ECHO): Likewise, and use fewer dnl. (_AC_RUN_LOG_STDERR): Avoid subshell for logging. 2008-10-22 Eric Blake Fix testsuite failure. * tests/mktests.sh (ac_exclude_list): Don't generate test for AC_REQUIRE_SHELL_FN. 2008-10-21 Eric Blake Improve wording related to automake and autotest. * doc/autoconf.texi (Making testsuite Scripts): Clarify wording in relation to automake. Mention dependency on package.m4. Consolidate examples. Define AUTOM4TE. * THANKS: Update. Reported by William Pursell. 2008-10-21 Eric Blake Allow AS_VAR_SET_IF in shell lists. * lib/m4sugar/m4sh.m4 (AS_VAR_SET_IF): Allow continuation of line. * lib/autoconf/general.m4 (AC_CACHE_VAL): Supply newline no longer provided by AS_VAR_SET_IF. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Adjust clients. * lib/autoconf/libs.m4 (AC_SEARCH_LIBS): Likewise. * tests/m4sh.at (AS@&t@_VAR basics): Enhance test. Allow AS_VAR_IF in shell lists. * lib/m4sugar/m4sh.m4 (AS_VAR_IF): Allow continuation of line. * lib/autoconf/functions.m4 (AC_CHECK_FUNC): Adjust clients. * lib/autoconf/general.m4 (AC_CHECK_FILE, AC_CHECK_DECL): Likewise. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL) (_AC_CHECK_HEADER_NEW, _AC_CHECK_HEADER_OLD) (_AC_CHECK_HEADER_DIRENT): Likewise. * lib/autoconf/libs.m4 (AC_CHECK_LIB): Likewise. * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, AC_CHECK_MEMBER): Likewise. * tests/m4sh.at (AS@&t@_VAR basics): Enhance test. Allow AS_CASE in shell lists. * lib/m4sugar/m4sh.m4 (AS_CASE): Always execute test, in case of side effects. Allow continuation of script on same line as esac. * lib/autoconf/c.m4 (AC_PROG_CC_STDC): Adjust client. * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Enhance test. * NEWS: Document the subtle change. Allow AS_IF in shell lists. * lib/m4sugar/m4sh.m4 (AS_IF): Always execute test, in case of side effects. Allow continuation of script on same line as fi. (_AS_DETECT_BETTER_SHELL): Adjust clients. (AS_VAR_IF, AS_VAR_SET_IF): For now, supply newline no longer given by AS_IF. * lib/autoconf/c.m4 (_AC_PROG_PREPROC_WORKS_IFELSE): Likewise. * lib/autoconf/general.m4 (_AC_ENABLE_IF): Likewise. (AC_EGREP_CPP, _AC_RUN_IFELSE): Adjust client. * lib/autoconf/libs.m4 (AC_SEARCH_LIBS): Likewise. * doc/autoconf.texi (Common Shell Constructs) : Fix typo. (Polymorphic Variables): Move mention of dnl to the only two AS_VAR functions that need it. 2008-10-21 Paolo Bonzini and Eric Blake Use a shell function for _AC_COMPILE_IFELSE. * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE_BODY): New macro. (_AC_COMPILE_IFELSE): Use a shell function. 2008-10-21 Eric Blake Use AS_VAR_APPEND. * lib/autoconf/functions.m4 (AC_CHECK_FUNCS_ONCE): Use new macro. * lib/autoconf/general.m4 (_AC_INIT_PREPARE) (_AC_LIBOBJS_NORMALIZE): Likewise. * lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS) (_AC_OUTPUT_CONFIG_STATUS, _AC_OUTPUT_MAIN_LOOP): Likewise. * lib/autotest/general.m4 (AT_INIT): Likewise. Add AS_VAR_APPEND. * lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_PREPARE) (_AS_VAR_APPEND_WORKS, AS_VAR_APPEND): New macros. (AS_PREPARE, _AS_PREPARE): Emit preparation. * tests/m4sh.at (AS@&t@_VAR_APPEND): New test. * doc/autoconf.texi (Polymorphic Variables) : Document new macro. : Mention ramification of `""` rules. * NEWS: Mention new macro. 2008-10-21 Paolo Bonzini and Eric Blake Use a shell function for _AC_PREPROC_IFELSE. * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY): New macro. (_AC_PREPROC_IFELSE): Use a shell function. * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Factor for faster execution. (AS_REQUIRE_SHELL_FN): Bypass AS_REQUIRE if function has already been provided. 2008-10-21 Eric Blake Add banners to generated files. * lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Use m4_text_box for existing banner. (AS_INIT): Add new banners at strategic points. * lib/autoconf/general.m4 (AC_INIT): Alter banner location, and make consistent with other banners. * lib/autotest/general.m4 (AT_INIT): Make banners consistent. 2008-10-20 Paolo Bonzini Add AC_REQUIRE_SHELL_FN and the SHELL_FN diversion. * lib/autoconf/general.m4 (AC_REQUIRE_SHELL_FN): New. (m4_divert(SHELL_FN)): New. 2008-10-20 Eric Blake Avoid unportable use of echo in testsuite. * tests/m4sh.at (AS@&t@_VAR basics): Use AS_ECHO, since string contains backslash. 2008-10-18 Paolo Bonzini Make sure that nested AS_REQUIRE do not lose the desired diversion. * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Expand _m4_divert_desired before passing it to m4_divert_require, so that its content is not used anymore. * tests/m4sh.at (Nested AS_REQUIRE): New testcase. 2008-10-18 Eric Blake Document bugs in { } handling. * doc/autoconf.texi (Limitations of Builtins): Mention bug on empty list. Fix some testsuite failures introduced two days ago. * tests/m4sh.at (Nested AS@&t@_REQUIRE_SHELL_FN) (AS@&t@_REQUIRE_SHELL_FN and m4@&t@_require): Adjust to changed API. Reported by Ralf Wildenhues. 2008-10-18 Ralf Wildenhues Show how to extract single substitutions from config.status. * doc/autoconf.texi (config.status Invocation): Show example using `--file=-'. 2008-10-17 Eric Blake Add m4_curry. * lib/m4sugar/m4sugar.m4 (m4_curry, _m4_curry): New macros. * tests/m4sugar.at (m4@&t@_map_args): Rename... (m4@&t@_map_args and m4@&t@_curry): ...and add currying tests. * doc/autoconf.texi (Looping constructs) : Document currying as a way to add parameters. (Evaluation Macros) : Document the new macro. * NEWS: Likewise. Improve suggested test filtering. * lib/m4sugar/m4sh.m4 (_AS_DETECT_SUGGESTED_PRUNE): New macro, extracted from... (_AS_DETECT_BETTER_SHELL): ...here, to use faster API. No need to check for an empty required set. Add m4_set_map. * lib/m4sugar/m4sugar.m4 (m4_set_foreach): New macro. * tests/m4sugar.at (m4@&t@_set): Enhance test. * doc/autoconf.texi (Set manipulation Macros) : Document it. * NEWS: Likewise. Document m4_map_args. * lib/m4sugar/m4sugar.m4 (m4_transform, m4_transform_pair): Rename... (m4_map_args, m4_map_args_pair): ...to these names, and document. (m4_version_unletter): Use the interface. * lib/m4sugar/foreach.m4 (m4_map_args, m4_map_args_pair) (_m4_map_args_, _m4_map_args_pair_, _m4_map_args_pair_end): Perform same renames. * lib/m4sugar/m4sh.m4 (AS_CASE, AS_IF): Adjust callers. * tests/m4sugar.at (m4@&t@_map_args): New test. (recursion): Adjust caller. * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Likewise. * doc/autoconf.texi (Looping constructs) : Document this interface. * NEWS: Mention the new macros. 2008-10-17 Eric Blake Reduce vertical whitespace in configure. * lib/autoconf/general.m4 (AC_INIT): Silence newline output during m4 side effect initializations. * lib/m4sugar/m4sh.m4 (AS_PREPARE): Likewise. 2008-10-17 Eric Blake Document AS_VAR interfaces. * doc/autoconf.texi (Programming in M4sh): M4sh is now prime-time. (Polymorphic Variables): New node. * NEWS: Update accordingly. Test AS_VAR interfaces. * tests/m4sh.at (AS@&t@_VAR): New test. * lib/m4sugar/m4sh.m4 (AS_VAR_PUSHDEF): Force expansion of _AS_TR_SH_PREPARE at top level, rather than argument collection. (AS_TR_SH): Support command substitution. Add AS_VAR_COPY. * lib/m4sugar/m4sh.m4 (AS_VAR_COPY): New macro. (AS_VAR_IF): Use it, instead of the broken AS_VAR_GET. * lib/autoconf/general.m4 (AC_CACHE_CHECK): Likewise. * lib/autoconf/libs.m4 (AC_SEARCH_LIBS): Likewise. * lib/autotest/general.m4 (_AT_FINISH): Likewise. Sort AS_VAR_* interfaces. * lib/m4sugar/m4sh.m4 (AS_VAR_GET): Reduce output to one line. (AS_VAR_TEST_SET, AS_VAR_SET, AS_VAR_SET_IF, AS_VAR_POPDEF): Sort, no code changes. 2008-10-16 Eric Blake Allow comments before functions emitted by m4sh. * lib/m4sugar/m4sh.m4 (AS_REQUIRE_SHELL_FN): Add comment argument. Supply closing comment, to ease readability. (_AS_MKDIR_P_PREPARE): Adjust caller. (_AS_UNSET_PREPARE): Add comment. Add AS_FUNCTION_DESCRIBE. * lib/m4sugar/m4sh.m4 (AS_FUNCTION_DESCRIBE): New macro. * lib/autotest/general.m4 (AT_INIT): Use it. 2008-10-16 Eric Blake Speed up m4_qlen with caching. * lib/m4sugar/m4sugar.m4 (_m4_qlen): Renamed from old m4_qlen. (m4_qlen): Cache results for speed. 2008-10-16 Paolo Bonzini Add a testcase using more then one language. * tests/compile.at (Multiple languages): New test. 2008-10-16 Paolo Bonzini Fix Libtool's config.lt test. * lib/m4sugar/m4sh.m4 (_AS_PREPARE): Disable AS_REQUIRE while expanding it. 2008-10-15 Eric Blake Break circular require chain in _AS_LINENO_PREPARE. * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Ensure that logging is disabled when reporting LINENO failure, since logging requires LINENO. * doc/autoconf.texi (Initialization Macros): Recommend m4_pushdef, not m4_rename, since the latter is undocumented. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Avoid m4_rename, as it does not yet handle pushdef stacks. Reported by Ralf Wildenhues. 2008-10-15 Eric Blake Cleanups to previous patches. * doc/autoconf.texi (Portable Shell): Minor edits. (Limitations of Builtins): Touch up wording. * lib/m4sugar/m4sh.m4 (AS_LINENO_PUSH): Nuke trailing whitespace. (_AS_SHELL_SANITIZE): Wrap comments less than 80 columns. 2008-10-15 Paolo Bonzini Updates to shell portability documentation. * doc/autoconf.texi: Updates all references to "Portable Shell" and "Limitations of Builtins" to use three-argument commands. (Programming in M4sh): Document AS_ECHO, AS_ECHO_N, AS_UNSET. (Portable Shell): Move here discussion about "Where is the POSIX shell?" Mention that M4sh provides a SVR2 shell and takes care of unsetting variables if necessary. Talk about M4sh and not only Autoconf-generated scripts. (Special Shell Variables): Talk about M4sh and not only Autoconf-generated scripts. Don't talk about things that Autoconf does not do. Mention problems of $LINENO with shell functions. (Limitations of Builtins). Mention AS_ECHO and AS_ECHO_N. Move discussion of eval bugs before discussion on proper use of eval. Mention AS_IF. Reword why not to use "shift N". Mention "foo=; unset foo" trick. Include M4sh code that unsets MAIL for Bash 2.01. * NEWS: Update list of documented M4sh macros. 2008-10-15 Paolo Bonzini Assume a (possibly buggy) `unset' is present after a `better shell' was found. * lib/autoconf/general.m4 (_AC_CACHE_DUMP): Use AS_UNSET. * lib/autoconf/programs.m4 (AC_PROG_SED): Use AS_UNSET. * lib/m4sugar/m4sh.m4 (_AS_UNSET_PREPARE): Provide $as_unset as an alias for AS_UNSET, for backwards compatibility. (_AS_DETECT_BETTER_SHELL): Set BASH_ENV and ENV to /dev/null in case the shell does not support unset. (_AS_SHELL_SANITIZE): Work around Bash 2.01 bugs. Unset BASH_ENV. (AS_INIT, _AS_PREPARE, AS_PREPARE): Call it. (AS_UNSET): Assume it is there but it might fail if the variable is not set. Use it throughout instead of $as_unset. 2008-10-15 Paolo Bonzini Turn AS_SHELL_SANITIZE into a for-Libtool-only wrapper. * lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED, _AS_DETECT_SUGGESTED): Remove m4_require of _AS_DETECT_BETTER_SHELL. (_AS_CLEANUP): Add it here. (_AS_DETECT_BETTER_SHELL): Just expand the test instead of appending it to _AS_CLEANUP. (_AS_SHELL_SANITIZE): New name of the old AS_SHELL_SANITIZE macro. (AS_SHELL_SANITIZE): New macro hacking around Libtool misuse. (AS_PREPARE): Use _AS_SHELL_SANITIZE. (AS_INIT): Add m4_provide of itself. 2008-10-15 Paolo Bonzini Use "test x$foo = xyes" to avoid upsetting Libtool's sh.test. * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL, _AS_SHELL_FN_WORK): Use "test x$foo = xyes". 2008-10-15 Paolo Bonzini Trim down the size of the better-shell test. * lib/m4sugar/m4sh.at (_AT_DETECT_BETTER_SHELL): Store the common snippets into shell variables. (_AS_RUN): Rewrite. 2008-10-15 Paolo Bonzini Support a stack of LINENO values for AS_MESSAGE. * lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG): If defined, use $as_lineno as the line number emitted to the log file. (AS_LINENO_PUSH, AS_LINENO_POP): New. * tests/m4sh.at (LINENO Stack): New test. 2008-10-14 Eric Blake Correct previous patch. * doc/autoconf.texi (Shell Functions): Bash obeys Posix, after all. Document shell function environment pitfall. * doc/autoconf.texi (Shell Functions): Document bugs in bash, Solaris /bin/sh. 2008-10-14 Paolo Bonzini Use m4_require to implement AS_REQUIRE. * lib/m4sugar/m4sugar.m4 (_m4_require_call): Accept a third argument. (m4_require): Pass it. (m4_divert_require): New. * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Rewrite using m4_divert_require. Remove comment about differences with m4_require. * tests/m4sh.at (AS_REQUIRE_SHELL_FN and m4_require): Update to test the expected behavior. (Nested AS_REQUIRE_SHELL_FN): New test. 2008-10-13 Paolo Bonzini Test AS_LINENO_PREPARE. * tests/m4sh.at: Use documented AS_LINENO_PREPARE. 2008-10-13 Paolo Bonzini Test AS_ME_PREPARE. * tests/m4sh.at (as_me): New test. 2008-10-13 Paolo Bonzini Add and document AS_INIT_GENERATED. * lib/m4sugar/m4sh.m4 (AS_INIT_GENERATED): New. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Use it. * doc/autoconf.texi (Initialization macros): Document it. 2008-10-13 Eric Blake Use consistent shell function style. * lib/m4sugar/m4sh.m4 (_AS_PREPARE, AS_REQUIRE_SHELL_FN) (_AS_SHELL_FN_WORK): Imitate GNU Coding Standards for C functions. 2008-10-13 Paolo Bonzini * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Place names of contributors under m4 rather than shell comments. 2008-10-10 Paolo Bonzini * lib/m4sugar/m4sh.m4 (AS_ME_PREPARE, AS_LINENO_PREPARE): New. * doc/autoconf.texi (Initialization macros): Document them. (Portable Shell): Refer to AS_LINENO_PREPARE. * NEWS: Mention them. * bin/autoconf.as: Invoke AS_ME_PREPARE. * lib/autotest/general.m4: Likewise. 2008-10-10 Paolo Bonzini * doc/autoconf.texi (Programming in M4sh): Make its own chapter. 2008-10-10 Eric Blake Fix _AS_MKDIR_P usage. * lib/m4sugar/m4sh.m4 (_AS_MKDIR_P): Correct documentation to match implementation. (_AS_PREPARE, _AS_MKDIR_P_PREPARE): Adjust callers. * doc/autoconf.texi (Programming in M4sh) : Tweak wording to better match behavior. 2008-10-10 Paolo Bonzini * doc/autoconf.texi: Be less wary of shell functions. * NEWS: Document the increased use of shell functions. 2008-10-10 Paolo Bonzini * m4sugar/m4sh.m4 (_AS_MKDIR_P): New, from AS_MKDIR_P. Adjust meaning of as_mkdir_p to be `false' or a full `mkdir -p' command. (AS_MKDIR_P): Just dispatch to as_func_mkdir_p. (_AS_PREPARE): Define shell functions. (_AS_MKDIR_P_PREPARE): Set as_mkdir_p according to the above change. Define shell functions. 2008-10-09 Eric Blake Only prepare $as_me if it will be used. * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Avoid unconditional preparation. (_AS_ECHO_LOG): Depend on $LINENO preparation. (AS_MESSAGE): Depend on $as_me preparation. (AS_TMPDIR): Use AS_ERROR, rather than a hand-rolled copy. 2008-10-09 Paolo Bonzini * m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Delay setting as_me until the M4SH-INIT diversion using _AS_ME_PREPARE. (_AS_PREPARE): Invoke _AS_EXPR_PREPARE before _AS_BASENAME_PREPARE and _AS_DIRNAME_PREPARE, and _AS_BASENAME_PREPARE and _AS_ME_PREPARE before _AS_LINENO_PREPARE. (AS_PREPARE): Include all the AS_REQUIREs manually. (_AS_ME_PREPARE): New. (_AS_LINENO_PREPARE): Use m4_defun. 2008-10-09 Paolo Bonzini * m4sugar/m4sh.m4 (_AS_BASENAME_EXPR, _AS_DIRNAME_EXPR): Do not require _AS_EXPR_PREPARE. (_AS_BASENAME_PREPARE, _AS_DIRNAME_PREPARE): Do it here. (_AS_PREPARE): Add _AS_BASENAME_PREPARE. 2008-10-08 Eric Blake Resync from gnulib. * cfg.mk (cvs_executable_files, cvs_files): Rewrite... (fetch): ...into new target. (executable-update): Delete, now that it is unused. * maint.mk (update, local_updates, cvs_files, gnulib_repo) (wget-update, cvs-update): Likewise. * HACKING (Update the foreign files): Document new procedure. * GNUmakefile: Resync from upstream, via new 'make fetch'. * build-aux/config.guess: Likewise. 2008-10-08 Paolo Bonzini * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_SPY): Remove. (AS_INIT): Do not call it. 2008-10-08 Paolo Bonzini * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Expand _AS_UNSET_PREPARE in M4SH-SANITIZE. 2008-10-08 Eric Blake Avoid repeating required shell tests in suggested set. * lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED, _AS_DETECT_SUGGESTED): Use m4_set, rather than m4_expand_once/m4_append. (_AS_DETECT_SUGGESTED): Adjust to new storage layout, and filter required tests out of suggested tests. Reported by Paolo Bonzini. 2008-10-08 Paolo Bonzini Add m4sh keyword to all m4sh.at tests. * tests/m4sh.at: Add m4sh keyword to all tests. Fix comment pastos. 2008-10-08 Ralf Wildenhues Document AS_VERSION_COMPARE. * doc/autoconf.texi (Programming in M4sh): Document AS_VERSION_COMPARE. * NEWS: Update. Do not write to testsuite log fd before initialization. * lib/autotest/general.m4 (AS_MESSAGE_LOG_FD, AT_JOB_FIFO_FD): Define fds only when initializing the log fd so early error messages do not try to write to it. * tests/autotest.at (Startup error messages): New test. * NEWS: Document this 2.63 regression. 2008-10-07 Eric Blake Ensure _AS_CLEANUP is defined. * lib/m4sugar/m4sh.m4 (_AS_CLEANUP): Give initial definition. * tests/m4sh.at (AS@&t@_INIT cleanup): Expose the need for this. Improve m4sh maintainability. * lib/m4sugar/m4sh.m4: Sort macros for sanitizing the shell; no code change. Fix m4 quoting in previous patch. * lib/m4sugar/m4sh.m4 (AS_REQUIRE_SHELL_FN): Determine diversion name prior to invoking AS_REQUIRE. Reported by Ralf Wildenhues. 2008-09-18 Paolo Bonzini and Eric Blake Add a separate diversion for shell functions. * lib/m4sugar/m4sh.m4 (M4SH-INIT-FN): New diversion. (AS_REQUIRE): Accept diversion parameter. (AS_REQUIRE_SHELL_FN): Use it. 2008-10-06 Eric Blake Add m4_default_quoted. * lib/m4sugar/m4sugar.m4 (m4_default_quoted): New macro. (m4_for, m4_expand_once, m4_text_wrap, m4_text_box): Use it. * doc/autoconf.texi (Conditional constructs): Document it. * NEWS: Likewise. Fix build with case-insensitive make, again. * Makefile.am (pkgdata_DATA): Protect by MAKE_CASE_SENSITIVE. Reported via Keith Marshall, originally by newthinker in . 2008-10-06 Bruno Haible Warn about /usr/ucb on Solaris. * doc/install.texi (Particular Systems): Recommend putting /usr/ucb late in PATH, if at all. 2008-10-03 Ralf Wildenhues Fix more testsuite hang corner cases. * lib/autotest/general.m4: Use the serial code path if no test is to be run. * tests/autotest.at (parallel test execution): Test -j and -jN with `-k notmatched'. 2008-10-02 Ralf Wildenhues Fix hang with `testsuite -k notmatched'. * lib/autotest/general.m4: Do not reset $at_jobs if it is equal to one. Fixes hang with `-k notmatched'. 2008-10-02 Eric Blake Document more binary file portability traps. * doc/autoconf.texi (Limitations of Usual Tools) : Remind reader that NUL and sed don't always mix. : Mention Solaris /usr/ucb/tr bug with \0. 2008-10-02 Ralf Wildenhues Implement parallel Autotest test execution: testsuite --jobs. * lib/autotest/general.m4 (AT_JOB_FIFO_FD): New macro. (AT_INIT): : New variable. Accept -j, -jN, --jobs[=N], document them in --help output. Implement parallel driver loop using a FIFO, enabled with --jobs and if mkfifo works; otherwise, fall back to sequential loop. (AT_SETUP): Store, do not output summary progress line if parallel. * tests/autotest.at (parallel test execution, parallel truth) (parallel fallacy, parallel skip): New tests. * doc/autoconf.texi (testsuite Invocation): Document -j, --jobs, the mkfifo requirement, and that --errexit may cause concurrent jobs to finish. * NEWS: Update. 2008-09-20 Eric Blake Fix sample isinf definition. * doc/autoconf.texi (Function Portability) : Filter out NaN first. * THANKS: Update. Reported by David Cournapeau. 2008-09-16 Eric Blake Fix Erlang regression, introduced 2006-11-17. * lib/autoconf/erlang.m4 (AC_LANG(Erlang)): Avoid M4 comment caused by underquoting. * NEWS: Mention this fix. * THANKS: Update. Reported by BJ Terry. 2008-09-13 Ralf Wildenhues * lib/autoconf/general.m4 (AC_CONFIG_AUX_DIRS): Improve a bit. Mention Solaris sh ':' redirection bug. * doc/autoconf.texi (File Descriptors): Redirecting ':' in a loop causes bogus optimization with Solaris sh. 2008-09-10 Eric Blake Avoid testsuite bug when autom4te cache is disabled by user. * tests/tools.at (autoconf: forbidden tokens, basic): Enable cache, even if user normally disabled it. Reported by Bruno Haible. Avoid testsuite bug in presence of verbose config.site. * tests/base.at (Input/Output): Nullify config.site during test. Reported by Bob Friesenhahn. 2008-09-09 Eric Blake Release Version 2.63. * NEWS: Mention the release. Formatting tweaks to the manual. * doc/autoconf.texi (Introduction, Systemology) (File System Conventions, Portable C and C++) (Floating Point Portability): Allow URLs to split as needed. (Indices): Add entries, to work around texinfo bug on indices that start too close to a page break. (Particular Functions): Mention ftello. (Introduction, Language Choice): Use @enddots at sentence end. Resync from gnulib. * cfg.mk (cvs_executable_files, cvs_files): Update list of files, although for now, they are still manually sync'd. * build-aux/gnupload: Update. * build-aux/config.sub: Likewise. * GNUmakefile: Likewise. 2008-09-06 Eric Blake Mention that Automake already supports VPATH. * doc/autoconf.texi (Build Directories): Details in this section only apply to users avoiding automake. * THANKS: Update. Reported by Matej Tyc. Relax tone when warning about cross-compiler names. * lib/autoconf/programs.m4 (_AC_TOOL_WARN): Support cross-compiles with poorly named tools; the issue has been reported too many times in the last four years to pull support. * doc/autoconf.texi (Specifying Names, Generic Programs): Update documentation accordingly. * THANKS: Update. Reported by Josef Tran and others, wording suggested by Ralf Wildenhues. 2008-09-01 Eric Blake Improve AC_C_BIGENDIAN. * doc/autoconf.texi (C Compiler) : Mention that universal builds require a config header. * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Enhance comments. Check AH_HEADER at the last possible moment, so that users can use AC_CONFIG_HEADER after this macro. Reported by Stepan Kasal. Fix manual date information. * doc/autoconf.tex: UPDATED refers to the day the manual was built, not the release date of Autoconf. Based on a bison patch by Akim Demaille. 2008-08-27 Eric Blake Fix off-by-one bug in _m4_shiftn. * lib/m4sugar/foreach.m4 (_m4_shiftn): Handle case when shifting all arguments. * tests/m4sugar.at (M4 loops): Test it. Reported by Akim Demaille. 2008-08-26 Eric Blake Improve INSTALL formatting. * doc/install.texi [!autoconf]: Ensure first paragraphs are indented like all others in a plain text rendering. * Makefile.am ($(srcdir)/INSTALL): Ensure plaintext formatting. Reported by Bruno Haible. 2008-08-26 Stepan Kasal Check for case sensitive make. * m4/make-check.m4 (AC_PROG_MAKE_CASE_SENSITIVE): New macro,... * configure.ac: ... called here. * Makefile.am ($(abs_srcdir)/INSTALL, INSTALL): Return to... ($(srcdir)/INSTALL): ...this, but enclose the rule in "if MAKE_CASE_SENSITIVE". 2008-08-26 Eric Blake Update invocation documentation. * doc/autoconf.texi (autoscan Invocation): Mention --debug. (autoreconf Invocation): Mention -v. (autom4te Invocation): Tie --freeze to -F, not -f. (autoupdate Invocation): Mention --prepend-include. * doc/install.texi (configure Invocation): Mention --help=short, --help=recursive, -n/--no-create, --prefix. Avoid TABs. * bin/autoscan.in ($help): Omit space before `...'. * bin/ifnames.in ($help): Likewise. * bin/autoconf.as (Usage): Likewise. * bin/autoreconf.in ($help): Likewise. * bin/autoheader.in ($help): Likewise. * bin/autom4te.in ($help): Likewise. * bin/autoupdate.in ($help): Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Use `[OPTION]...', rather than `[OPTIONS]'. Mention --silent. Indent --file correctly. Don't let frozen __m4_version__ break downgrade to m4 1.4.x. * bin/autom4te.in: Adjust comments, now that we rely on 1.4.5+. (files_to_options): Avoid inheriting __m4_version__ from frozen file if current M4 does not support it. 2008-08-25 Eric Blake Adjust to recent m4 1.6 change to support m4_debugmode(d). * lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Move freeze-time decision of using faster 1.6 implementation... (m4_init): ...to a runtime decision, and add use of new debugmode flag. 2008-08-22 Peter O'Gorman Limit AC_C_BIGENDIAN univeral checks to Mac OS X. * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Limit the check to __APPLE_CC__ with possible -arch flags. * NEWS: Document it. 2008-08-22 Ralf Wildenhues * NEWS: Fix typo. 2008-08-22 Eric Blake * TODO: Add an item for additional m4sugar looping constructs. Suggested by Ralf Wildenhues. Add reminder to keep dual implementations in sync. * lib/m4sugar/m4sugar.m4: Add comments. * lib/m4sugar/foreach.m4: Likewise. Suggested by Ralf Wildenhues. 2008-08-22 Peter Eisentraut (tiny change) Format warning and error messages to match GCS. * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK) (_AC_INIT_PARSE_ARGS, _AC_CACHE_DUMP): Start warning and error messages with a lowercase letter, end them without punctuation. * lib/autoconf/lang.m4 (AC_NO_EXECUTABLES): Likewise. * lib/autoconf/libs.m4 (AC_PATH_X): Likewise. * lib/autoconf/status.m4 (AC_OUTPUT, _AC_OUTPUT_MAIN_LOOP): Likewise. * tests/fortran.at (GNU Fortran): Likewise. * tests/torture.at (Deep Package): Likewise. 2008-08-21 Eric Blake Avoid extra side effects in m4sugar list expansion. * lib/m4sugar/m4sugar.m4 (m4_mapall_sep, m4_list_cmp): Wrap around... (_m4_mapall_sep, _m4_list_cmp_raw): ...new helpers, to avoid duplicate side effects. (m4_version_compare): Adjust caller. * lib/m4sugar/foreach.m4 (m4_list_cmp): Rename... (_m4_list_cmp_raw): ...to match m4sugar. * doc/autoconf.texi (Looping constructs): Document the behavior of side effects. * tests/m4sugar.at (M4 loops, m4@&t@_map, m4@&t@_version_compare): Ensure only one side effect. (recursion): Fix test typo. Reported by Ralf Wildenhues. 2008-08-21 Ralf Wildenhues * TODO: Add item for compiler default flags. Suggested by Bruno Haible. * tests/m4sh.at (AS_IF and AS_CASE): Set the expansion limit back to 1000. 2008-08-21 Eric Blake Formatting improvements. * doc/autoconf.texi: Use @file and @command, rather than @code, where appropriate. Document another make bug. * doc/autoconf.texi (The Make Macro SHELL): Mention bug in BSD make, GNU make <= 3.80. Tweak wording about SHELL in Makefile. * doc/autoconf.texi (The Make Macro SHELL): Stronger wording on the importance of proper SHELL settings. Reported by Bruno Haible, in http://lists.gnu.org/archive/html/bug-libtool/2008-04/msg00029.html. 2008-08-20 Ralf Wildenhues Avoid timestamp races for updated input. * tests/m4sh.at (AS_IF and AS_CASE): Use `autom4te --force' for second script. * tests/tools.at (autotools and whitespace in file names): Add --force for repeated invocations. 2008-08-20 Bruno Haible Add section to INSTALL about particular systems. * doc/install.texi (Particular systems): New node. * doc/autoconf.texi: Adjust menus. 2008-08-19 Bruno Haible and Peter O'Gorman Mention universal binaries in INSTALL. * doc/install.texi (Compiling For Multiple Architectures): Explain how to create universal binaries on MacOS X. 2008-08-19 Jim Meyering Eric Blake Ralf Wildenhues Avoid shell parse errors after interrupt due to empty ``. * doc/autoconf.texi (Shell Substitutions): Document the issue. * lib/m4sugar/m4sh.m4 (AS_VAR_IF): New function. * lib/autoconf/functions.m4 (AC_CHECK_FUNC): Use it in place of "test AS_VAR_GET([...]) = yes" * lib/autoconf/general.m4 (AC_CHECK_FILE, AC_CHECK_DECL): Likewise. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Likewise. (_AC_CHECK_HEADER_NEW, _AC_CHECK_HEADER_OLD): Likewise. (_AC_CHECK_HEADER_DIRENT): Likewise. * lib/autoconf/libs.m4 (AC_CHECK_LIB): Likewise. * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, AC_CHECK_MEMBER): Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Use temporary variable to work around the issue. * tests/foreign.at (Libtool): Quote result of command substitution. 2008-08-18 Eric Blake Test m4_transform without tickling shell bugs. * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Relax test to something more manageable. * tests/m4sugar.at (recursion): Move stress test of m4_transform_pair here. Reported by Ralf Wildenhues. Let 'git diff' give better context for doc updates. * .gitattributes (*.texi*): Add new entry. * README-hacking: Mention how to use it. Inspired by a coreutils patch by Jim Meyering. 2008-08-15 Eric Blake Fix m4_map regression from 2007-10-16. * lib/m4sugar/m4sugar.m4 (_m4_apply): New macro. (m4_map): Ignore empty sublists. For a list consisting of only an empty sublist, this restores 2.61 behavior of being a no-op. (m4_map_sep): Likewise, and expand separator. (m4_mapall, m4_mapall_sep): New macros, to regain 2.62 behavior. (_m4_map): Rewrite, to be common base for all four variants. * lib/m4sugar/foreach.m4 (_m4_map): Adjust to new prototype. * tests/m4sugar.at (m4@&t@_map): Add tests. * doc/autoconf.texi (Looping constructs) : Document new macros, and mention ramifications of expanded separator. * NEWS: Mention the change. 2008-08-14 Eric Blake Implement m4_transform_pair, to speed up AS_IF. * lib/m4sugar/m4sugar.m4 (m4_transform, m4_transform_pair): New macros, undocumented for now. * lib/m4sugar/foreach.m4 (m4_transform, m4_transform_pair): Also the m4 1.4.x counterparts. * lib/m4sugar/m4sh.m4 (AS_IF, AS_CASE): Use it. * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Test it. 2008-08-14 Ralf Wildenhues * lib/autoconf/programs.m4 (AC_PATH_TARGET_TOOL) (AC_CHECK_TARGET_TOOL, AC_CHECK_TARGET_TOOLS): Require, do not warn about previous AC_CANONICAL_TARGET. (AC_CHECK_TARGET_TOOL): Add missing `$' making the macro unusable in the non-cross-compiling case. * NEWS, THANKS: Update. Report by Dave Erickson. 2008-08-12 Eric Blake Optimize m4_bmatch. * lib/m4sugar/foreach.m4 (m4_bmatch): Provide linear implementation for m4 1.4.x. * tests/m4sugar.at (m4@&t@_bmatch): New test. (recursion): Test the linear nature. * NEWS: Document the fix. Fix m4_cond corner case. * lib/m4sugar/foreach.m4 (_m4_cond): Ensure alternate implementation allows concatenation with subsequent text. * tests/m4sugar.at (m4@&t@_cond): Enhance test. Add test for m4_cond. * tests/m4sugar.at (m4@&t@_cond): New test. Reported by Ralf Wildenhues. 2008-08-06 Eric Blake Fix autoheader 2.62 regression on AC_DEFINE([__EXTENSIONS__]). * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Use a unique key for the AH_VERBATIM. * tests/c.at (AC_USE_SYSTEM_EXTENSIONS): New test. * NEWS: Mention the fix. Reported by Andreas Schwab, analyzed by Stepan Kasal. Add linear m4_cond for m4 1.4.x. * lib/m4sugar/m4sugar.m4 (m4_cond): Split into... (_m4_cond): ...this, for fewer macros per iteration. * lib/m4sugar/foreach.m4 (_m4_cond): New implementation. * tests/m4sugar.at (recursion): Test it. * NEWS: Document the linear guarantee. Speed up diversion handling. * lib/m4sugar/m4sugar.m4 (m4_divert, m4_divert_push) (m4_divert_pop, m4_divert_text): Avoid dnl for fewer macro expansions. AC_C_CHAR_UNSIGNED is not strictly necessary. * doc/autoconf.texi (C Compiler) : Mention a portable alternative to this macro. * THANKS: Update. Reported by Hallvard B Furuseth. Update some files from upstream. * GNUmakefile: Update. * build-aux/announce-gen: Likewise. * build-aux/config.guess: Likewise. * build-aux/config.sub: Likewise. * build-aux/git-version-gen: Likewise. * build-aux/texinfo.tex: Likewise. * build-aux/vc-list-files: Likewise. * doc/make-stds.texi: Likewise. * doc/standards.texi: Likewise. 2008-08-04 Ralf Wildenhues Fix AC_CONFIG_FILES([$var]) 2.62 regression. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Flatten whitespace in $ac_config_files and $ac_config_headers. * tests/torture.at (Parameterized AC_CONFIG_FILES): New test. Report by Andreas Schwab and Per Øyvind Karlsen. * THANKS: Update. 2008-07-30 Eric Blake Fix bugs in previous version of m4_bpatsubsts. * lib/m4sugar/foreach.m4 (_m4_bpatsubsts): Don't expand $1, and allow concatenation with subsequent text. * tests/m4sugar.at (m4@&t@_bpatsubsts): Enhance test. 2008-07-29 Eric Blake Add linear m4_bpatsubsts for m4 1.4.x. * lib/m4sugar/m4sugar.m4 (m4_bpatsubsts): Match documentation about anchors, even for only one substitution. * lib/m4sugar/foreach.m4 (_m4_bpatsubsts): New implementation. * doc/autoconf.texi (Conditional constructs) : Clarify behavior with regard to quoting. * tests/m4sugar.at (recursion): Test scaling of m4_bpatsubsts. (m4@&t@_bpatsubsts): New test. * NEWS: Document the linear guarantee. Tweak m4_do semantics. * lib/m4sugar/m4sugar.m4 (m4_do): Don't concat final argument with subsequent text. * lib/m4sugar/foreach.m4 (m4_do): Don't concat intermediate arguments, and avoid infinite loop. * doc/autoconf.texi (Evaluation Macros) : Document the behavior. * tests/m4sugar.at (m4@&t@_do): New test. Optimize m4_for. * lib/m4sugar/m4sugar.m4 (m4_for): Use fewer macros. (_m4_for): Take additional parameter, for fewer m4_indir calls. * lib/m4sugar/foreach.m4 (_m4_foreach, _m4_shiftn, m4_do) (m4_reverse, _m4_list_pad, _m4_list_cmp): Adjust all callers. * doc/autoconf.texi (Looping constructs) : Document subtle semantic change caused by the optimization. * tests/m4sugar.at (M4 loops): Test the new semantics. One more m4_list_cmp tweak. * lib/m4sugar/m4sugar.m4 (_m4_list_cmp_1): Don't defer shift. * lib/m4sugar/foreach.m4 (m4_list_cmp): Fix comment. * tests/m4sugar.at (recursion): Test both directions of list disparity. Add m4_reverse, and improve m4_list_cmp. * lib/m4sugar/m4sugar.m4 (m4_reverse): New macro. (m4_list_cmp): Rewrite to give linear behavior with M4 1.6 on an m4_reverse'd list. * lib/m4sugar/foreach.m4 (m4_reverse): Add the M4 1.4.x counterpart. * tests/m4sugar.at (recursion): Test it. * doc/autoconf.texi (Evaluation Macros) : Document it. (Text processing Macros) : Cross-reference to m4_set. * NEWS: Mention new macro. 2008-07-28 Eric Blake Avoid _m4_shiftn for m4 1.6 speedup. * lib/m4sugar/m4sugar.m4 (m4_foreach, _m4_foreach, m4_map) (_m4_map, m4_map_sep): Rewrite recursion to use one less m4_if. * lib/m4sugar/foreach.m4 (_m4_map): Accomodate changed signature. Implement O(n) unique element set creation. * lib/m4sugar/m4sugar.m4 (m4_set_add, m4_set_add_all) (m4_set_contains, m4_set_contents, m4_set_delete) (m4_set_difference, m4_set_dump, m4_set_empty, m4_set_foreach) (m4_set_intersection, m4_set_list, m4_set_listc, m4_set_remove) (m4_set_size, m4_set_union): New macros. * lib/m4sugar/foreach.m4 (m4_set_add_all): Add O(n) fallback for m4 1.4.x. * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS, AC_SUBST): Use new m4_set API for the set most likely to be large. * doc/autoconf.texi (Set manipulation Macros): New node. * NEWS: Mention new macros. * tests/m4sugar.at (m4@&t@_set): New test. 2008-07-25 Eric Blake Avoid infinite aclocal loop. * lib/m4sugar/m4sugar.m4 (m4_init): Bypass m4_include tracing, so that aclocal doesn't insist on finding m4sugar/foreach.m4. Provide O(n) replacement macros for M4 1.4.x. * lib/m4sugar/foreach.m4: New file. (m4_foreach, m4_case, _m4_shiftn, m4_do, m4_dquote_elt, _m4_map) (m4_join, m4_joinall, m4_list_cmp, _m4_minmax): Replace m4sugar macros based on $@ recursion [fast on M4 1.6, but quadratic on M4 1.4.x] with versions based on m4_for/m4_foreach [slow on 1.6, but linear on 1.4.x]. * lib/m4sugar/m4sugar.m4 (m4_init): Dynamically load new file if older M4 is assumed. (m4_map_sep): Optimize. (m4_max, m4_min): Refactor, by adding... (_m4_max, _m4_min, _m4_minmax): ...more efficient helpers. (m4_defn, m4_popdef, m4_undefine): Use foreach recursion. * lib/m4sugar/Makefile.am (dist_m4sugarlib_DATA): Distribute new file. * tests/m4sugar.at (M4 loops): Add a stress test that takes forever if m4_foreach and friends are quadratic. * NEWS: Mention this. 2008-07-21 Eric Blake Ignore undefined macros, necessary with m4 1.6. * bin/autoupdate.in (_au___undefine): New macro,... (_au__undefine): ...wrapped by ifdef to silence m4 warnings. Reported by Ralf Wildenhues. Resync with gnulib. * GNUmakefile: Grab from upstream, to fix issue where 'make install' would allow installation of stale version string. 2008-07-19 Eric Blake Support multiple arguments to m4_defn, m4_popdef, and m4_undefine. * lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Loop through all variables, per POSIX and newer m4. (_m4_text_wrap): Exploit the looping capabilities. * tests/m4sugar.at (m4@&t@_defn): Test this. * NEWS: Document it. * doc/autoconf.texi (Redefined M4 Macros) : Likewise. Reduce overhead of m4_builtin([defn]). * lib/m4sugar/m4sugar.m4 (_m4_defn, _m4_popdef, _m4_undefine): New internal macros, which are slightly more efficient than m4_builtin([defn]) and company. (m4_defn, m4_popdef, m4_undefine, m4_warn, m4_ifset) (_m4_dumpdefs_up, _m4_dumpdefs_down, _m4_wrap, m4_for) (_m4_divert_n_stack, m4_divert_pop, m4_expansion_stack_push) (m4_expansion_stack_dump, _m4_defun_pro, _m4_defun_epi) (_m4_defun_epi_outer, _m4_require_call, m4_combine, m4_append) (_m4_append_uniq, m4_append_uniq_w, _m4_text_wrap, m4_text_box) (m4_version_prereq): Use them. Use warnings from m4 when available. * lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Don't define slower wrapper if m4 will warn on our behalf; key off of __m4_version__, added alongside the new warnings in m4 1.6. * tests/m4sugar.at (m4@&t@_defn): New test. 2008-07-18 Eric Blake Add m4_joinall. * lib/m4sugar/m4sugar.m4 (m4_joinall, _m4_joinall): New macros. * tests/m4sugar.at (m4@&t@_join): Test them. * doc/autoconf.texi (Text processing Macros) : Document m4_joinall. * NEWS: Likewise. 2008-07-17 Stepan Kasal and Eric Blake Improve documentation of config.h.in template rules. * doc/autoconf.texi (Header Templates): Mention rules on comments and whitespace, and that the user cannot rely on #undef to survive through config.status. 2008-07-16 Eric Blake Revert m4_prepend; it is less efficient, and unused by bison. * lib/m4sugar/m4sugar.m4 (m4_prepend, m4_prepend_uniq) (m4_prepend_uniq_w): Delete addition from 2008-07-11. (_m4_grow_uniq_1): Rename back... (_m4_append_uniq): ...to this. * NEWS: Revert NEWS blurb. * doc/autoconf.texi (Text processing Macros) : Delete. * tests/m4sugar.at (m4@&t@_prepend): Delete. 2008-07-15 Eric Blake Avoid failure if version.m4 is omitted but m4_PACKAGE_* unused. * lib/m4sugar/m4sugar.m4 (m4_version_compare): Provide alternate definition for non-Autoconf clients of m4sugar. 2008-07-14 Eric Blake Tighten bound of potential speed of m4_append. * doc/autoconf.texi (Text processing Macros) : If m4 is fixed, m4_append can be linear rather than O(n log n). * lib/m4sugar/m4sugar.m4 (m4_append, m4_append_uniq): Fix comments. Analysis by Bruno Haible. 2008-07-11 Eric Blake Inherit improvements from bison's fork of m4sugar. * lib/m4sugar/m4sugar.m4 (m4_PACKAGE_VERSION): Ignore failure to find version.texi, since bison does not provide it. (m4_prepend): Add new macro, from bison. (m4_prepend_uniq, m4_prepend_uniq_w): Add new macros, for completeness. (_m4_append_uniq): Rename... (_m4_grow_uniq_1): ...to this to share implementation, and optimize initial assignment. (m4_append_uniq_w): Adjust caller. * NEWS: Document new macros. * doc/autoconf.texi (Text processing Macros) : Mention speed consideration. : Document the new prepend variants. * tests/m4sugar.at (m4@&t@_prepend): New test. Work around M4 1.6 warning on undefined macros. * lib/m4sugar/m4sugar.m4 (changeword, symbols): Don't rename if not already available as builtins. 2008-07-06 Ralf Wildenhues * doc/autoconf.texi (@dvar): Remove trailing newline. (@ovar): Likewise. Fix macro documentation. 2008-07-02 Stepan Kasal Add quotes to the header of autoscan-generated source. * bin/autoscan.in: Add quotes to AC_PREREQ and AC_INIT. 2008-06-28 Andreas Schwab * doc/autoconf.texi (autoscan Invocation): Fix spacing. (autoconf Invocation): Likewise. (autoreconf Invocation): Likewise. (autoheader Invocation): Likewise. (autom4te Invocation): Likewise. 2008-06-19 Eric Blake Add comment explaining recent patch. * lib/autotest/general.m4 (AT_INIT) : Explain choice of * vs. ? globbing. 2008-06-19 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_LINK): Do not warn when not linking a file to itself. Report by Bruno Haible. 2008-06-19 Eric Blake Resync with gnulib. * GNUmakefile: Grab from upstream, to fix VPATH 'make dist' bug. Reported by Stepan Kasal. 2008-06-18 Ralf Wildenhues Reorganize autotest files, factorize for parallel execution. * lib/autotest/general.m4 (AS_MESSAGE_LOG_FD): Move definition earlier in the file. (AT_INIT): Create line number cache in $at_suite_dir/at-source-lines. : New directory at-groups below $at_suite_dir. Add comment explaining the new directory structure. (at_func_group_prepare, at_func_group_postprocess): New shell functions to factorize per-test group work. Keep the actual test execution outside of a shell function in order to avoid zsh 4.x exit status bugs. : Turn these into per-group files below $at_helper_dir. Also store test results there in files named pass, fail, xpass, xfail, skip. Let the parent collect results from $at_helper_dir. Adjust summary statistics computation and result output. 2008-06-17 Ralf Wildenhues Fix '#undef variable /* comment */' transform in config headers. * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): For undefined preprocessor macros that are followed by a comment in the header template, do not create nested comments in the output. * tests/torture.at (@%:@define header templates): Extend test. * NEWS: Update. Report by Karsten Hopp . 2008-06-09 Eric Blake Mark AC_TYPE_SIGNAL as obsolete. * lib/autoconf/types.m4 (AC_TYPE_SIGNAL): Switch to AU_DEFUN. * doc/autoconf.texi (Function Portability): Update documentation. (Particular Types): Move AC_TYPE_SIGNAL... (Obsolete Macros): ...here, and mention why. * NEWS: Mention the change. Allow lib64 as a default X library location. * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Add lib64. * NEWS: Mention the change. * THANKS: Update. Reported by Brad Walker. 2008-06-05 Eric Blake Fix regression in AT_KEYWORDS([Macro]), from 2007-10-18. * lib/autotest/general.m4 (AT_KEYWORDS): Expand argument prior to converting it to lower case. * tests/autotest.at (Keywords and ranges): Test this. * NEWS: Document the fix. * THANKS: Update. Reported via Karsten Hopp, by Jochen Schmitt in https://bugzilla.redhat.com/show_bug.cgi?id=449973 2008-06-03 Eric Blake Fix 'make dist' regression from 2008-05-08. * Makefile.am (INSTALL): Add rule, to accomodate 'make dist' after GNUmakefile's _autoconf rule removes INSTALL. 2008-05-27 Eric Blake Document Solaris /bin/sh redirection pitfall. * doc/autoconf.texi (File Descriptors): Mention redirection bug. 2008-05-14 Eric Blake Improve documentation of ! issues. * doc/autoconf.texi (Limitations of Builtins) : Touch up. Reported by Noah Misch. Document some FreeBSD shell bugs. * doc/autoconf.texi (Limitations of Builtins) : Mention ! issue in compound pipe commands. : Mention difference of exporting an undefined variable. (Shell Functions): Mention loss of $? in entry to shell functions. Extracted from the git mailing list. 2008-05-13 Stepan Kasal Work around MSYS and Cygwin bugs when dealing with trailing space. * tests/atlocal.in (func_sanitize_dir_name): Let atlocal succeed, even when platform bugs are tickled. Reported by Keith Marshall and Eric Blake. 2008-05-12 Ralf Wildenhues Let AC_MSG_FAILURE report pwd. * lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE): Output $ac_pwd along with fatal failure. * tests/torture.at (Deep Package): Extend test. Reported numerous times against GCC, and probably other packages. 2008-05-12 Eric Blake Enforce --help and --version compliance. * configure.ac (AM_INIT_AUTOMAKE): Add std-options option. 2008-05-08 Keith Marshall (tiny change) Avoid case-insensitive `make install' vs. `INSTALL' conflict. * Makefile.am ($(srcdir)/INSTALL): Replace all references... ($(abs_srcdir)/INSTALL): ...with this. 2008-05-06 Eric Blake Fix typo. * doc/autoconf.texi (Shell Substitutions): Drop at_ prefix. Avoid overfull \hbox. * doc/autoconf.texi (Versioning): Reword to fit line size. Document $(( )) pitfalls. * doc/autoconf.texi (Shell Substitutions): Mention octal vs. decimal. Mention autotest's at_func_arith. Improve behavior of './testsuite 01'. * lib/autotest/general.m4 (AT_INIT) : Alter usage to eval its arguments, in order to normalize away leading zero. All callers updated. * tests/autotest.at (Keywords and ranges): Test range normalization with leading 0. 2008-04-26 Eric Blake Mention Solaris /usr/ucb/tr pitfall. * doc/autoconf.texi (Limitations of Usual Tools) : Add section. Reported by Bruno Haible and Jim Meyering. 2008-04-24 Eric Blake Mention m4sugar's internal quote strings. * doc/autoconf.texi (Quadrigraphs): Mention alternate quote used in m4sugar, and how to still output it literally. * tests/m4sugar.at (m4@&t@_split): And test it. Reported by Joel E. Denny. 2008-04-23 Eric Blake Allow unbalanced () in m4_expand. * lib/m4sugar/m4sugar.m4 (m4_expand, _m4_expand): Use more complex quotes. (m4_noquote, _m4_split): Use consistent complex quote. * tests/autotest.at (Left paren, Right paren): Test this. (Parentheses): Ensure new quadrigraphs still work. (AT_CHECK_AT_TITLE_CHAR): All title char tests exercise m4_expand. * NEWS: Mention the fix. * doc/autoconf.texi (Quadrigraphs): Revert mention of macros that require quadrigraphs for (). (Evaluation Macros) : Relax the restriction against unbalanced (). (Pretty Help Strings) : Likewise. (Writing Testsuites) : Likewise. Reported by Joel E. Denny, fix suggested by Noah Misch. 2008-04-22 Eric Blake Support unbalanced () in AT_SETUP by adding two new quadrigraphs. * bin/autom4te.in (handle_output): Substitute @{:@ and @:}@. (handle_traces): Likewise. * lib/m4sugar/m4sugar.m4 (m4_qlen): Account for new quadrigraphs. * tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Add new tests. * doc/autoconf.texi (Quadrigraphs): Document them. (Evaluation Macros) : Enhance documentation. (Text processing Macros) : Document cases where quadrigraphs can help for problemetic unbalanced parentheses. (Pretty Help Strings) : Likewise. (Writing Testsuites) : Likewise. (Limitations of Builtins) : Consolidate text on unbalanced parentheses, and add an example of creative comments. * NEWS: Document the addition. Reported by Joel E. Denny. 2008-04-16 Eric Blake Document pdksh exec behavior. * doc/autoconf.texi (Limitations of Builtins) : New subsection. Discovered by Jim Meyering. 2008-04-14 Ralf Wildenhues * tests/autotest.at (AT_CHECK_AT): Allow to pass additional arguments to the inner suite. (errexit, input from stdin): New tests. 2008-04-13 Ralf Wildenhues * NEWS: Post-release update. 2008-04-10 Eric Blake AC_AUTOCONF_VERSION might contain arbitrary macro names. * doc/autoconf.texi (Versioning): Mention problem with expansion. * tests/tools.at (autoconf: AC_AUTOCONF_VERSION): Adjust test. 2008-04-09 Slava Sysoltsev (tiny change) Flush buffered output before exit. * bin/autom4te.in (handle_output): Explicitly close file. * THANKS: Update. See http://lists.gnu.org/archive/html/autoconf/2008-04/msg00026.html. 2008-04-08 Eric Blake Generate web docs for 2.62. * doc/autoconf.texi (Evaluation Macros): Fix typo. (Notices): Use recommended means to escape RCS keyword. * cfg.mk (gnulib_dir): New macro. (web-manual): New target. 2008-04-05 Eric Blake Release Version 2.62. * NEWS: Mention the release. 2008-04-04 Stepan Kasal and Eric Blake Return back to GPLv2+, until the text of the exceptions is finalized, reverting the change from 2007-07-03 and the first part of the change from 2007-07-20. * COPYING: Revert to GPLv2. * COPYINGv3: New file, since some auxiliary build tools, used for building autoconf and not installed, are GPLv3. * Makefile.am (EXTRA_DIST): Distribute COPYINGv3. * NEWS: Remove mention of GPLv3. * README: Clarify situation regarding GPLv3. 2008-04-05 Eric Blake Prepare for release. * maint.mk (announcement): Avoid deleted option. * cfg.mk (release_archive_dir): Use default. * build-aux/gnupload: New file, from automake/gnulib. * Makefile.am (EXTRA_DIST): Distribute it. * .x-sc_two_space_separator_in_usage: New file, to exempt gnupload from syntax check. 2008-04-05 Jim Meyering and Ralf Wildenhues Work around CR EOL markers on OS/2 (www.ecomstation.com Ecs v2 rc4) * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): When CR is the EOL marker, skip a step that would remove and translate carriage return bytes. * THANKS: Update. Reported by Elbert Pol. 2008-04-05 Eric Blake Avoid some autoreconf -Wall warnings. * configure.ac: Use proper quoting, to be a good example. (PACKAGE_NAME): Remove setting covered by autoconf. (AM_INIT_AUTOMAKE): Bump automake requirement, for html rules. * doc/Makefile.am (TEXI2DVI): Remove settings covered by automake. (html, autoconf_1.html, standards_1.html): Likewise. (TEXI2HTML, TEXI2HTML_FLAGS): Remove unused macros. * Makefile.am (html): Likewise. * doc/autoconf.texi (Quoting and Parameters): Add missing section name. * tests/Makefile.am (AUTOMAKE_OPTIONS): Intentionally ignore warning about our override, until Automake is fixed. * README-hacking: Document minimum requirements for bootstrap. 2008-04-03 Eric Blake Fix version number generation in man pages. * Makefile.am (EXTRA_DIST): Distribute .version. (.version): New rule. * man/Makefile.am (common_dep): Depend on .version, not configure.ac. (.x.1): Use package name for version string. * GNUmakefile [!_have-Makefile]: Sync from upstream, again. * build-aux/git-version-gen: Sync from upstream. More maintainer tweaks: pass 'make maintainer-distcheck'. * GNUmakefile (_is-dist-target): Sync from upstream. * build-aux/vc-list-files: Sync from upstream, yet again. * tests/atlocal.in (unsupported_fs_chars): Always remove tdir. * tests/Makefile.am (EXTRA_DIST): Don't distribute the built package.m4. * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Bump year. Fix VPATH 'make syntax-check'. * maint.mk (VC_LIST, VC_LIST_EXCEPT, sc_changelog) (sc_prohibit_jm_in_m4, makefile-check): Support VPATH. (author_mark_check): Avoid error message. * build-aux/vc-list-files: Sync from upstream again. * build-aux/texinfo.tex: Likewise. Sync files from upstream, and pass 'make syntax-check'. * config/announce-gen: Move... * build-aux/announce-gen: ...here, and sync from gnulib. * Makefile.am (EXTRA_DIST): Adjust accordingly. * cfg.mk (announce_gen): Likewise. (prev_version_file): Delete, relying on default in maint.mk. (gpg_key_ID): New macro. (url_dir_list): Rewrite to match coreutils. * config/prev-version.txt: Move... * .prev-version: ...here, and adjust to 2.61. * build-aux/vc-list-files: Sync from coreutils. * maint.mk: Resynchronize with coreutils, where possible. (ME): Remove $(srcdir) from definition. (CVS): Delete. (GIT, VC, VC-tag): New macros. (CVS_LIST, CVS_LIST_EXCEPT): Rename... (VC_LIST, VC_LIST_EXCEPT): ...to this. (cvs-tag-check): Delete. (cvs-diff-check): Rename... (vc-diff-check): ...to this. (sc_file_system): Allow FHS acronym. * doc/autoconf.texi (Particular Functions): Recommend unconditional . * build-aux/config.guess: Sync from upstream (manually). * build-aux/config.sub: Likewise. * build-aux/texinfo.tex: Likewise. * doc/make-stds.texi: Likewise. * doc/standards.texi: Likewise. * .gitattributes: Ignore whitespace problems in upstream files. 2008-04-03 Ralf Wildenhues * doc/autoconf.texi (Limitations of Usual Tools): Mention awk %u bug on HP-UX/IA. Report by Peter O'Gorman. 2008-04-02 Eric Blake Recommend the just-released M4 1.4.11. * NEWS: Update recommendation. * README: Likewise. * doc/autoconf.texi (Introduction): Likewise. * m4/m4.m4 (AC_PROG_GNU_M4): Likewise. 2008-04-01 Eric Blake * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Bump copyright year. 2008-03-28 Peter O'Gorman Find X11 on Mac OS X too. * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT,_AC_PATH_X_XMKMF): Check for libX11 with extensions dylib la and dll too. * THANKS: Update. Reported by Martin Costabel. 2008-03-28 Eric Blake Update TODO based on completed tasks. * TODO (AC_PROG_INSTALL takes multiple files): Done. (AC_GNU_SOURCE deprecation): Done, see AC_USE_SYSTEM_EXTENSIONS. (AC_COMPILE_IFELSE documentation): Done. (Tracing builtins): Done, now that we require M4 1.4.5. (AC_PROG_CC_POSIX suggestion, providing header files) (AC_TYPE_SIGNAL): Not needed; gnulib's approach is better. (cache consistency): Done with precious variables. 2008-03-26 Eric Blake Document --trace=macro:format in --help output. * bin/autom4te.in (help): Mention optional trace format. * bin/autoconf.as (usage): Likewise. * doc/autoconf.texi (Limitations of Usual Tools) : Fix typos in last patch. Reported by Ralf Wildenhues. 2008-03-26 Jim Meyering Fix texinfo syntax error. * doc/autoconf.texi (Limitations of Usual Tools): s/@kbd {/@kbd{/ 2008-03-26 Ralf Wildenhues Warn, not fail on whitespace-only precious variable differences. * lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE): Output precious variable differences less ambiguous with `ugly-quotes'. If their settings differ only in whitespace, do not fail, but reuse the old value. * tests/torture.at (AT_CHECK_AC_ARG_VAR): Extend macro to allow an optional status and expected-warning argument. Fix m4 quotation for initial value. (AC_ARG_VAR): Also test for whitespace-only differences, and that the old value is retained in this case. * doc/autoconf.texi (Setting Output Variables): Document this. * NEWS: Update. Report and initial patch by Paolo Bonzini. 2008-03-26 Eric Blake Document busybox sed bug. * doc/autoconf.texi (Limitations of Usual Tools) : Mention restrictions when using back-references. Reported by Vincent Lefevre: . Document Automake interaction with AC_CONFIG_MACRO_DIR. * doc/autoconf.texi (Input): Mention ACLOCAL_AMFLAGS for automake users. * THANKS: Update. Reported by Chris Pickett. 2008-03-25 Ralf Wildenhues * tests/autotest.at (Using atlocal): Quote instances of `pwd`. * tests/local.at (AT_CHECK_M4): Factorize warning output normalization. Suggested by Eric Blake. 2008-03-24 Ralf Wildenhues Fix .exe-related test failure on MinGW. * tests/local.at (AT_CHECK_M4): Normalize `/bin/m4.exe' correctly for comparing warning output. Fix Fortran testsuite failures with gfortran 4.3. * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): When scanning verbose compiler output, skip lines that set variables; gfortran 4.3 sets LIBRARY_PATH, COMPILER_PATH, COLLECT_GCC_OPTIONS. * THANKS: Update. Report by Vincent Lefèvre. 2008-03-21 Eric Blake * GNUmakefile: Resynchronize with gnulib. Document more uses of $cross_compiling. * doc/autoconf.texi (Runtime): Document that a temporary override is permissible. * THANKS: Update. Reported by Ineiev, example by Ralf Wildenhues. Don't swallow $1 in textual local variables. * lib/m4sugar/m4sugar.m4 (m4_combine): Don't use overquoting and expansion of text arguments, as that swallows $1. (m4_text_wrap): Likewise, by splitting out... (_m4_text_wrap): ...new helper macro. Also, allow arbitrary expression for width. * tests/m4sugar.at (m4@&t@_text_wrap): Test this. (m4@&t@_combine): Likewise. 2008-03-21 Ralf Wildenhues Avoid leftover files on Leopard. * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT): Remove a.out.dSYM directory created on darwin. (AC_NO_EXECUTABLES): Likewise; also remove objects which may be left over from a broken link. * tests/c.at (AC_NO_EXECUTABLES (working linker)) (AC_NO_EXECUTABLES (broken linker)): New tests. Report by Gary V. Vaughan. * lib/autom4te.in (Automake-preselections): Trace _AM_COND_IF, _AM_COND_ELSE, _AM_COND_ENDIF. 2008-03-20 Eric Blake Kill more CVS references. * README-cvs: Delete. See README-hacking instead. * README-hacking: Update wording, based on older file. * BUGS: Remove CVS mention. 2008-03-20 Ralf Wildenhues * tests/tools.at (autotools and whitespace in file names): Skip if aclocal is not present. 2008-03-20 Eric Blake Sync GNUmakefile with gnulib. * GNUmakefile (Makefile.cfg): Rename... (cfg.mk): ...to this, and make optional. (GNUmakefile.cfg): Delete, redundant with cfg.mk. (Makefile.maint): Rename... (maint.mk): ...to this. (all) [!_have-Makefile]: Rename... (abort-due-to-no-makefile): ...to this, and invoke via .DEFAULT_GOAL to pick up all targets. * Makefile.cfg: Rename... * cfg.mk: ...to this. * Makefile.maint: Rename... * maint.mk ...to this. (ME): Reflect name change. (makefile-check, m4-check, author_mark_check, msg): Use $(ME) rather than hard-coded name. * GNUmakefile.cfg: Delete; move rules into cfg.mk. * Makefile.am (EXTRA_DIST): Reflect file name changes. * .x-sc_prohibit_atoi_atof: Likewise. * lib/freeze.mk: Likewise. 2008-03-19 Stepan Kasal * doc/autoconf.texi (Introduction): Improve the paraphrase of Henry Spencer's quotation. 2008-03-19 Eric Blake AC_CONFIG_HEADERS replaced AC_CONFIG_HEADER. * bin/autoscan.in (output): Avoid obsolete spelling. * tests/local.at (AC_STATE_SAVE): Update usage. * THANKS: Update. Reported by John Calcote. Emphasize that ease of configure triumphs over ease of autoconf. * doc/autoconf.texi (Introduction): Expand on primary vs. secondary goal of autoconf. * THANKS: Update. Inspired by Paul Smith. 2008-03-17 Ralf Wildenhues * lib/Autom4te/FileUtils.pm (handle_exec_errors): New argument $hint, show if the executing program does not exist. (xsystem_hint): New function, like xsystem but allows to pass a hint. * bin/autoreconf.in: Use xsystem_hint for spawning autopoint and libtoolize. Report by Bruce Korb. 2008-03-14 Stepan Kasal * lib/Autom4te/ChannelDefs.pm, tests/fortran.at, tests/mktests.sh, tests/wrapper.as: Fix typos. 2008-03-12 Eric Blake Fix yesterday's regression in m4_wrap([$1]). * lib/m4sugar/m4sugar.m4 (_m4_wrap): Don't directly invoke wrapped text, since it may contain text that looks like parameters. * tests/m4sh.at (AS@&t@_INIT cleanup): Enhance test. 2008-03-11 Eric Blake Improve error messages for common testsuite bugs. * lib/autotest/general.m4 (_AT_DEFINE_INIT, _AT_DEFINE_SETUP): New macros for defining order-enforced macros. (AT_INIT, AT_SETUP, AT_CLEANUP, AT_BANNER, AT_XFAIL_IF) (AT_CAPTURE_FILE, AT_DATA, AT_CHECK, AT_CHECK_NOESCAPE): Add error messages when order violations are detected. * tests/autotest.at (AT_CHECK_AT_SYNTAX): New helper macro. (AT_SETUP without AT_INIT, AT_BANNER without AT_INIT) (AT_CLEANUP without AT_INIT, Missing AT_CLEANUP) (AT_CHECK without AT_SETUP, AT_DATA without AT_SETUP) (AT_XFAIL_IF without AT_DATA, AT_KEYWORDS without AT_SETUP, (AT_CLEANUP without AT_SETUP, AT_BANNER inside AT_SETUP) (AT_SETUP inside AT_SETUP, Multiple AT_INIT) (Banner-only test suite): New tests. Reported by Christopher Hulbert. Tweak m4_wrap to force FIFO or LIFO semantics. * lib/m4sugar/m4sugar.m4 (m4_wrap): Override M4 implementation. (m4_wrap_lifo, _m4_wrap): New macros. * lib/m4sugar/m4sh.m4 (AS_INIT): Combine all cleanup into known order, prior to m4sugar's. (_AS_DETECT_BETTER_SHELL): Use cleanup parameter, rather than m4_wrap. * lib/autotest/general.m4 (AT_INIT): Combine all cleanup into known order, prior to m4sh's. * doc/autoconf.texi (Diagnostic Macros) : Document argument. (Redefined M4 Macros) : Rewrite documentation to match new behavior. * tests/m4sh.at (AS_INIT cleanup): New test. * NEWS: Document the change. 2008-03-10 Eric Blake Encode nested autotest data. * tests/autotest.at (AT_CHECK_AT_PREP): Avoid raw AT_ in output. (unusual file names): Likewise. (m4_pattern_allow): Remove loophole, to make it easier to catch poorly written tests. Factor some autotest tests. * tests/autotest.at (AT_CHECK_AT_PREP): New macro, to factor out common initialization. (AT_CHECK_AT, Banners, Keywords and ranges, srcdir propagation) (whitespace in absolute testdir, unusual file names): Use it. 2008-03-06 Eric Blake Minor documentation fix. * doc/autoconf.texi (Evaluation Macros): Fix typo. 2008-03-04 Eric Blake Make AT_CHECK act like a simple command. * lib/autotest/general.m4 (_AT_CHECK): Wrap commands in {;}. * tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Test it. 2008-03-04 Ralf Wildenhues On MinGW, substitution of CR and 0xFF fails. * tests/torture.at (Substitute and define special characters): MinGW awk cannot handle 0xFF, and on MinGW, the test does the wrong thing for CR. 2008-03-04 Eric Blake Pull in recent maintainer improvements from coreutils. * GNUmakefile (_is-dist-target): 'make distclean' should not trigger autoreconf. (_dummy): Change directories before removing autom4te.cache. (check dist distcheck install) [!_have-Makefile]: Provide nicer diagnostics. * configure.ac (AC_CONFIG_LINKS): Copy GNUmakefile into VPATH builds, after initial bootstrap. * Makefile.am (distclean-local): Work around current automake bug. * Makefile.maint (ME): Allow VPATH usage. Use git-merge-changelog when available. * .gitattributes: New file. * README-hacking: Document use of git-merge-changelog. Work around cygwin bug. * tests/atlocal.in (unsupported_fs_chars): Avoid cygwin bug where "touch 't\'" creates regular file 't'. Ignore tests that require read-only directories under root. * tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Skip no-write portion if user has root-like privileges. 2008-03-04 Ralf Wildenhues * lib/autotest/general.m4 (AT_INIT): Fix detection of '-C -'. 2008-03-03 Ralf Wildenhues autoreconf -m now honors $MAKE. * bin/autoreconf.in ($run_make): Renamed from ... ($make): ... this. Use now as command to run `make', overridden by $MAKE. Document this in --help output. * doc/autoconf.texi (autoreconf Invocation): Document all environment variables honored by autoreconf. * NEWS: Update. Report by Paul Eggert. 2008-03-03 Eric Blake Documentation improvements. * doc/autoconf.texi (Looping constructs): s/recurses/repeats/. (Evaluation Macros): Drop `1' suffix from metasyntax variable name that preceeds @dots. Improve wording. (Text processing Macros): Drop `1' suffix from metasyntax variable name that preceeds @dots. (Number processing Macros): Drop `1' suffix from metasyntax variable name that preceeds @dots. Improve wording. * lib/m4sugar/m4sugar.m4 (m4_cmp): Comment wording fix. Suggested by Ralf Wildenhues. 2008-03-02 Jim Meyering Don't infloop upon "make dist". * GNUmakefile: Merge from coreutils. * Makefile.am (dist-hook): Inject .tarball-version into tarball, not .version. * configure.ac (AC_INIT): Use .tarball-version, not .version. * build-aux/git-version-gen: Update from gnulib. 2008-03-02 Ralf Wildenhues * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Before using /dev/full, check that it is a writable character special device. Report by Benoit Sigoure and Eric Blake. Actually test that @configure_input@ is expanded correctly. * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Actually check generated file contents for the name of the generated file, using AC_PROG_FGREP and $FGREP. 2008-03-01 Benoit Sigoure Be nice with file systems that don't handle unusual characters. * tests/atlocal.in (func_sanitize_file_name) (func_sanitize_dir_name): New shell functions. * tests/tools.at (autom4te and whitespace in file names) (autotools and whitespace in file names): Use them. * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Cover more potentially problemtic file names. Use the new functions. Properly handle funny file names for headers in config.status. The test suite did not cover this bug because the code was not quoting properly the arguments of `rm -f' (which "fails" silently) as well as the arguments of `diff' (whose output was redirected to /dev/null so we couldn't see its error message). * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Properly quote the file names passed to `rm' and `diff'. * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Add a regression test. 2008-03-01 Benoit Sigoure and Ralf Wildenhues Properly expand @configure_input@ in config.status. * lib/autoconf/status.m4 (_AC_OUTPUT_FILE, _AC_OUTPUT_MAIN_LOOP): Escape the backslashes and ampersands in $configure_input before using it in the sed replacement string to expand @configure_input@. Report by Eric Blake and Patrick Welche. 2008-03-01 Ralf Wildenhues Ignore errors from ./run on w32. * tests/autotest.at (whitespace in absolute testdir): Ignore stderr for `./run' which fails to remove the busy test directory on w32. 2008-02-22 Eric Blake Improve documentation for writing autotest suites. * doc/autoconf.texi (Writing Testsuites) : Mention that checks must live inside a test group. Reported by Christopher Hulbert. 2008-02-21 Eric Blake Sync git-version-gen from upstream. * build-aux/git-version-gen: Pull from gnulib. * configure.ac (AC_INIT): Adjust to new calling convention. 2008-02-12 Eric Blake Avoid trailing space in config.h with AC_DEFINE([var], []). * lib/autoconf/general.m4 (_AC_DEFINE_Q): Explicitly mark empty defines with a comment. 2008-02-08 Eric Blake Fix texinfo typos in previous patch. * doc/autoconf.texi (Site Defaults): s/[{}]/@&/g. Reported by Ralf Wildenhues. Describe a config.site that can be used for FHS compliance. * doc/autoconf.texi (Site Defaults): Fix typo. Add new example for FHS. * THANKS: Update. Reported by Jules Colding and Ralf Wildenhues. 2008-02-02 Eric Blake * doc/autoconf.texi (Limitations of Usual Tools) : Fix typo. 2008-02-02 Ralf Wildenhues * lib/autotest/general.m4 (AT_INIT): Fix --clean to work again, broken since introduction of `-C dir'. * tests/autotest.at (Choosing where testsuite is run): Test it. 2008-01-30 Paul Eggert * doc/autoconf.texi: Update Back-Cover text to reflect new GNU wording. 2008-01-29 Eric Blake Fix more autotest regressions. * lib/autotest/general.m4 (AT_LINE): Fix regression from 2007-10-04 when file name is `dnl'. (AT_INIT) : Move command-line assignments... : ...to this new diversion, to fix regression from yesterday in libtool's testsuite. (_AT_ARG_OPTION): Detect write failure. * doc/autoconf.texi (Diversion support): Document PREPARE_TESTS to make libtool's use kosher. Document m4_init. (Programming in M4sh): Document AS_INIT. (Writing Testsuites): Document limitation of AT_DATA file name. * tests/autotest.at (unusual file names): New test. (Banners, Keywords and ranges): Use correct shell. More corner cases in testsuite VAR=VALUE handling. * lib/autotest/general.m4 (AT_INIT) : Also detect leading digits in assignments. * tests/autotest.at (Using atlocal): Enhance test to catch last bug. * doc/autoconf.texi (Limitations of Builtins) <.>: Mention bash bug. 2008-01-28 Eric Blake Fix regression in handling VAR=VALUE arguments to testsuite. * lib/autotest/general.m4 (AT_INIT) : Detect leading = as invalid. Defer use of command-line variable assignments... : ...here, after atconfig has been sourced. Fix regression in sourcing files. * tests/autotest.at (Using atlocal): New test to catch this. (Debugging a successful test, Choosing where testsuite is run): Use correct shell. Reported by Ralf Wildenhues. Document grep peculiarity. * doc/autoconf.texi (Limitations of Usual Tools) : Document BSD behavior on binary input. Minor testsuite improvements. * lib/autotest/general.m4 (AT_INIT) : Use fewer forks when sanitizing PATH. Always output machine information, not just when atconfig was located. Add 'testsuite -C dir'. * lib/autotest/general.m4 (_AT_ARG_OPTION): Move missing argument detection... (AT_INIT) : ...here, since -k always takes argument. : Delay computation of variables based on $at_dir... : ...to here, since -C can change $at_dir. : Re-invoke via absolute name, since -C may be in effect. : Parse new option. : Document it. * tests/autotest.at (Choosing where testsuite is run): New test for this feature. (Keywords and ranges): Add test for missing -k argument. * NEWS: Document this. * doc/autoconf.texi (testsuite Invocation): Likewise. 2008-01-24 Ralf Wildenhues * build-aux/config.guess, build-aux/config.sub, build-aux/texinfo.tex: Sync from gnulib. * doc/fdl.texi, doc/make-stds.texi, doc/standards.texi: Likewise. 2008-01-23 Ralf Wildenhues * doc/autoconf.texi (Particular Programs): Do not mention the Autoconf version in which the AC_PROG_INSTALL change was done. Suggested by Paul Eggert. 2008-01-22 Ralf Wildenhues Fix --help=recursive with multiple AC_CONFIG_SUBDIRS. * lib/autoconf/general.m4 (_AC_INIT_HELP): If, for recursive help mode, we change to the source directory, also set $ac_pwd so we do not go back to the build tree for the next config subdir. * tests/torture.at (Deep Package): Extend test to contain two config subdirs on the top level. Fix parallel `maintainer-check'. * Makefile.am (maintainer-check-tests): Depend on `all'. Use `$(MAKE) $(AM_MAKEFLAGS)' instead of plain `make'. * tests/Makefile.am (maintainer-check-c++, maintainer-check-posix): Likewise. (maintainer-check): Serialize the testsuite runs. * lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE2): Accept `+' in feature string for --enable/--with. Convert to underscore for variable name. * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Require that `install -c file1 file2 dir' works. * doc/autoconf.texi (Particular Programs): Document this. * NEWS: Update. 2008-01-21 Eric Blake Improve documentation about default include directives. * doc/autoconf.texi (Generic Headers, Generic Declarations) (Generic Structures, Generic Types) (Generic Compiler Characteristics): Add links to AC_INCLUDES_DEFAULT. Reported by Reuben Thomas. 2008-01-15 Eric Blake * lib/m4sugar/m4sugar.m4 (m4_qlen): Use fewer macros. 2008-01-08 Ralf Wildenhues * tests/Makefile.am (noinst_SCRIPTS): Renamed from check_SCRIPTS. Building the wrappers for `all' allows help2man to use them for the manpages. Report by Benoit Sigoure. * bin/autoreconf.in: Discard stderr for $autoconf/$aclocal --help. 2007-12-16 Ralf Wildenhues Fix some write failure cases in Autotest. * lib/autotest/general.m4 (AT_INIT): Do not exit successfully upon write failures for --help, --version, --list. Guard against write failures for intermediate created scripts. : Do not make the debugging script executable if it is not complete. 2007-12-12 Eric Blake Fix thinko in earlier patch - m4_join isn't defined yet. * lib/m4sugar/m4sugar.m4 (m4_expansion_stack_push, _m4_defun_pro) (_m4_defun_pro_outer, _m4_defun_epi, _m4_defun_epi_outer) (m4_require): Use m4_do, not m4_join. Fix some whitespace tests on cygwin. * tests/tools.at (autom4te and whitespace in file names): Restore font-lock. Create $TMPDIR before it might be used. Fix spurious testsuite failure with M4 1.4.11. * tests/local.at (AT_CHECK_M4): Cater to new m4 error message. Optimize AC_REQUIRE. * lib/m4sugar/m4sugar.m4 (m4_expansion_stack_push, _m4_defun_pro) (_m4_defun_pro_outer, _m4_defun_epi, _m4_defun_epi_outer) (m4_require): Avoid extra macro calls. 2007-12-08 Ralf Wildenhues * tests/torture.at (srcdir): Fix quoting. Do not pass top_srcdir to configure scripts in testsuite. * tests/autotest.at (srcdir propagation): Copy install-sh to source tree. (my only test): Drop setting of `top_srcdir'. * tests/base.at (Input/Output): Likewise. * tests/local.at (AT_CONFIGURE_AC): Copy install-sh, config.guess, and config.sub to test source tree. Drop AC_CONFIG_AUX_DIR setting. (AT_CHECK_CONFIGURE): Drop setting of `top_srcdir'. * tests/torture.at (Substitute a 2000-byte string): Drop AC_CONFIG_AUX_DIR setting, copy install-sh to test source tree. (Substitute a newline, datarootdir workaround): Likewise. (Define a newline): Adjust for linenumber changes in configure.ac. * tests/foreign.at (Libtool): Adjust comment to reflect changes. * tests/semantics.at (AC_PATH_PROGS_FEATURE_CHECK): Skip test if `pwd` contains whitespace. Quote $abs_top_srcdir in tests. * tests/local.at (AT_CHECK_PERL_SYNTAX): Likewise. * tests/tools.at (Syntax of the shell scripts): Likewise. * tests/m4sh.at (LINENO): Quote $0. Fix testsuite program wrapper for whitespace in `pwd`. The problem here is that the usual mantra is that command variables can contain arguments, thus we cannot just escape $AUTOCONF, $AUTOM4TE etc. The compromise is to put the $top_builddir/tests directory early in $PATH, so that the wrappers are found by their plain name. * tests/wrapper.as: Put $testdir early in $PATH. (AUTOCONF, AUTOHEADER, AUTOM4TE): Set to plain command names. Proper config.status --file/--header and $srcdir escaping. * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Quote special characters in $ac_file_inputs. (_AC_OUTPUT_FILE, _AC_OUTPUT_HEADER): eval $ac_file_inputs accordingly. * tests/torture.at (datarootdir workaround): Adjust. (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Extend test. Fix Autotest for whitespace in `pwd`. * lib/autotest/general.m4 (AT_INIT) : Quote $at_group_dir. * tests/autotest.at (whitespace in absolute testdir): New test. * lib/autom4te.in: Quote @datadir@. Proper file name escaping in Autoconf programs and Perl modules. This includes escaping of characters special to the shell as well as special to Perl, e.g., leading `<' or `>'. For example, when $file starts with `>', `open ">$file"' wrongly tries to append to a different file. * bin/autoconf.as: Fix quoting for autom4te options. * lib/Autom4te/General.pm (shell_quote): New function, taken from coreutils, written by Jim Meyering. (mktmpdir): Use it. * bin/autom4te.in (files_to_options, handle_m4): Use shell_quote and open_quote. * bin/autoreconf.in (parse_args): Likewise. * bin/autoscan.in (main): Likewise. * bin/autoupdate.in (main): Likewise. * bin/autoheader.in: Likewise, fixing old insufficient escaping. * bin/ifnames.in: Likewise, XFile usage fixes. * tests/tools.at (autom4te and whitespace in file names): Extend test. Test twice, with special characters allowed on w32, and the rest. Test leading and trailing whitespace, for `open_quote'. (autotools and whitespace in file names): New, analogous test. Reported by Paul Eggert and Benoit Sigoure, additional suggestions by Russ Allbery and Eric Blake. Sync from Automake. * lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm, lib/Autom4te/Struct.pm, lib/Autom4te/XFile.pm: Likewise. * lib/Autom4te/FileUtils.pm (open_quote): New function. (update_file, contents): Use it. * Makefile.am (autom4te-update): Rewrite for git. 2007-12-04 Ralf Wildenhues * doc/autoconf.texi (autom4te Invocation, Autom4te Cache): Fix typos. Fix copyright years. * Makefile.am, doc/install.texi, lib/autoconf/fortran.m4, lib/autoconf/lang.m4, lib/freeze.mk: Likewise. 2007-12-04 Eric Blake Manually resync with gnulib, since 'make cvs-update' no longer works. * build-aux/config.guess: New upstream version. * build-aux/config.sub: Likewise. When using older automake, don't downgrade build-aux/texinfo.tex. * configure.ac (AM_INIT_AUTOMAKE): Add no-texinfo.tex option. * doc/Makefile.am (TEXINFO_TEX): Add. 2007-11-27 Paul Eggert Fix AC_C_BIGENDIAN bug caused by new awk method of substitution. * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Don't comment out the #undef as this runs afoul of our new way of creating config.h. Problem reported by Jim Meyering in . 2007-11-26 Ralf Wildenhues Fix autom4te for unusual characters in input file names. * bin/autom4te.in (files_to_options): Quote active characters for the shell. * tests/tools.at (autom4te and white space in file names): New test. * doc/autoconf.texi (Limitations of Usual Tools) : Document that Tru64 awk always splits $0. 2007-11-24 Stepan Kasal * lib/autotest/general.m4 (AT_INIT): Do not extract the `#AT_STOP_...' line at the end of each test. 2007-11-23 Ralf Wildenhues * lib/autotest/general.m4 (AT_INIT): For awk line number extraction script, ensure `$at_group' has a defined value even for the empty set, and properly quote its usage inside the awk script. 2007-11-22 Ralf Wildenhues * doc/autoconf.texi (Shell Functions): New chapter. Document IRIX sh $0 issue in functions, move content from ... (Portable Shell): ... here. (Shell Script Compiler): Note that shell functions are not totally unportable any more. 2007-11-22 Stepan Kasal and Ralf Wildenhues * lib/autotest/general.m4 (AT_INIT): Exit awk script after extracting the line numbers of the last needed test. 2007-11-20 Ralf Wildenhues * lib/autotest/general.m4 (AT_INIT) : Fix quoting. 2007-11-19 Ralf Wildenhues Fix IRIX testsuite debugging failures: $0 in functions. * lib/autotest/general.m4 (AT_INIT) : Do not use $0 inside a function, as IRIX sh will set that to the function name rather than the script invocation name. 2007-11-19 Paolo Bonzini and Ralf Wildenhues * lib/autotest/general.m4 (at_func_test): Use cached line numbers to extract test scripts. (AT_INIT): Extract and cache test script line numbers. 2007-11-19 Ralf Wildenhues * lib/autotest/general.m4: Revert 2007-11-15 patch and subsequent fixups; the awk -> here-document conversion trashes performance too much with AIX sh. 2007-11-18 Ralf Wildenhues * tests/local.at: Do not test m4, perl with AT_TESTED. Diagnose and guard against write errors dealing with config.status. The general idea is this: all write failures from `configure' writing `config.status' are indicated by $ac_write_error, which is only checked at the end. This is safe because config.status code is not executed before the file is complete. Other write failures, be they inside config.status, or in sub shell/awk scripts spawned from configure or config.status, typically need earlier checking, as their results are used right afterwards. * lib/autoconf/status.m4 (AC_OUTPUT): Initialize `ac_write_fail' before writing config.status, check afterwards. (_AC_OUTPUT_FILES_PREPARE, _AC_OUTPUT_FILE) (_AC_OUTPUT_HEADERS_PREPARE,_AC_OUTPUT_CONFIG_STATUS): Set `ac_write_error' for write failures to config.status. Barf upon write failures to temporary files. Adjust note about closing and reopening the here-document. (_AC_OUTPUT_HEADER, _AC_OUTPUT_LINK, _AC_OUTPUT_COMMAND) (_AC_OUTPUT_MAIN_LOOP): Likewise, adjust note about closing and reopening the here-document. * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Ensure `ac_write_error' does not escape into config.status. Also, add a couple of code paths not yet exercised in the test suite: a config file with input from stdin, and a config header output to stdout. Suggestion for catching write errors by Bruno Haible. 2007-11-17 Ralf Wildenhues Avoid error with Tru64 awk and testsuite lines with many words. * lib/autotest/general.m4 (AT_INIT): In the awk script that reads the testsuite, set the field separator to an unusual value, in order to not run over the limit of 199 fields. Tru64 4.0D awk even splits the input if $i, i>0, was never accessed in the script. Revert 2007-10-17 change. * TODO: Multiline args in config files and headers mean something different and are not fixed, see Report by Stepan Kasal. * doc/autoconf.texi (Generic Programs): Fix typo. 2007-11-16 Stepan Kasal AC_*_TOOL does not canonicalize the prefix * doc/autoconf.texi (Generic Programs): Do not say that the *_TOOL macros canonicalize, they simply use the `host_alias'. 2007-11-16 Ralf Wildenhues Diagnose write errors in config.status instantiations. * lib/autoconf/status.m4 (_AC_OUTPUT_FILE) (_AC_OUTPUT_HEADER, _AC_OUTPUT_MAIN_LOOP): Bail out on write errors. * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Extend test to also check for some write error failures, using... : ...this new macro. Report by Bruno Haible. Indentation fixups. * lib/autotest/general.m4 (AT_INIT) : Fix indentation. (_AT_CHECK): Use less indentation, to save space. 2007-11-15 Ralf Wildenhues Add witness macro for @top_build_prefix@ substitution. * lib/autoconf/status.m4 (_AC_HAVE_TOP_BUILD_PREFIX): New macro. (_AC_OUTPUT_FILE): Mention it here. 2007-11-15 Paolo Bonzini and Ralf Wildenhues * lib/autotest/general.m4 (at_func_test): Remove. (AT_INIT): Pre-extract test groups into separate files. (AT_CLEANUP): Source pre-extracted file instead of calling at_func_test. Remove at-test-source files together with the $at_group_dir. * tests/autotest.at (Long test source lines): New test. 2007-11-15 Ralf Wildenhues Shell functions and variables may share a namespace. * doc/autoconf.texi (Portable Shell): Mention Solaris sh limitation. 2007-11-14 Paul Eggert * lib/autoconf/types.m4 (_AC_TYPE_LONG_LONG_SNIPPET): Make comment match gnulib. 2007-11-14 Ralf Wildenhues * lib/autoconf/status.m4: Fix a couple of comment typos. * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Use $as_me, not $me. 2007-11-13 Jim Meyering Clean up the rule to create "expr". * tests/Makefile.am (expr): Don't redirect directly to target. Redirect just once, not for each echo statement. Use $@, not literal "expr". 2007-11-13 Paul Eggert Don't worry about preprocessor when testing long long. See: http://lists.gnu.org/archive/html/bug-gnulib/2007-11/msg00075.html * doc/autoconf.texi (Preprocessor Arithmetic): New section. (AC_TYPE_LONG_LONG_INT, AC_TYPE_UNSIGNED_LONG_LONG_INT): These no longer check for preprocessor flaws. * lib/autoconf/types.m4 (_AC_TYPE_LONG_LONG_SNIPPET): Do not check for preprocessor flaws. 2007-11-13 Jim Meyering Adapt dependencies, now that a version change doesn't modify configure.ac * GNUmakefile: Remove "make clean" kludge. * lib/m4sugar/Makefile.am (version.m4): Depend on Makefile, not configure.ac. Don't redirect directly to target. Use $@, not literal "version.m4". 2007-11-12 Ralf Wildenhues * doc/autoconf.texi (Making testsuite Scripts): Document ":;{" shorthand as in previous patch. 2007-11-12 Paul Eggert * doc/autoconf.texi (Limitations of Builtins): Document problem with { ... } a bit more clearly. Suggest ":;{" as a shorthand for the workaround. * lib/m4sugar/Makefile.am (version.m4): Detect 'echo' failure. Use ":;{" shorthand. * tests/Makefile.am ($(srcdir)/package.m4): Likewise. 2007-11-12 Jim Meyering Add more non-srcdir build support. * GNUmakefile (dummy): Split a long line. Add -v option to autoreconf invocation. Remove the autoreconf-provided INSTALL, so that we regenerate it. * GNUmakefile (dummy): Remove INSTALL. Remove racy commands to build scripts in bin/ and tests/. * man/Makefile.am (.x.1): Now that scripts in bin/ and tests/ are guaranteed to be built, remove the rules that tried to build them. Before, with a parallel build, these rules could lead to two processes writing tests/wrapper.in concurrently. Build in man/ only *after* building in bin/ and tests/. * Makefile.am (SUBDIRS): The man-page-creation process runs $(MAKE) in both bin/ and tests/. Accommodate non-srcdir build-from-checkout. * build-aux/git-version-gen: Require an additional parameter: $srcdir. Use git's --git-dir=$srcdir/.git option. Add quotes, in case tarball_version_file contains shell meta-characters. * GNUmakefile (_curr-ver): Pass $(srcdir) to git-version-gen. * configure.ac: Pass "." to git-version-gen. Avoid spurious test failures due to version skew. * GNUmakefile (dummy): Run $(MAKE) clean after autoreconf -i. 2007-11-12 Ralf Wildenhues Avoid warnings about conftest.dSYM directories on Mac OS X Leopard. * lib/autoconf/general.m4 (_AC_LINK_IFELSE, _AC_RUN_IFELSE): Remove conftest.dSYM directory. * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT) (_AC_LANG_PROGRAM_C_, _AC_FC_MAIN, __AC_FC_NAME_MANGLING): Remove `conftest.*' recursively. * lib/autoconf/lang.m4 (AC_LINK_IFELSE): Likewise. * lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): Likewise. (_AC_COMPILER_OBJEXT_REJECT): Reject *.dSYM. * THANKS: Update. Report and analysis by Jeff Squyres and Peter O'Gorman. 2007-11-12 Benoit Sigoure Fix typos in variable names. * tests/semantics.at (test for AC_CHECK_LIB): s/at_m/ac_m/. 2007-11-11 Benoit Sigoure Document that $((expression)) is not portable. * doc/autoconf.texi (Shell Substitutions): Here. 2007-11-10 Ralf Wildenhues Ignore configure --help* errors due to LINENO-impaired shells. * tests/torture.at (Configuring subdirectories, Deep Package): In the --help* tests in read-only trees, make `.' temporarily writable again for the `stderr' file, and ignore errors due to the attempt to write configure.lineno. Report by Patrick Welche. 2007-11-10 Jim Meyering Generate package.m4 in build-dir, not srcdir. * tests/Makefile.am (package.m4): Adjust target. Don't redirect directly to $@. (CLEANFILES): Add package.m4. ($(TESTSUITE)): Depend on just-built package.m4, not the one in $(srcdir). When running $(AUTOTEST), search "." before searching $(srcdir). Avoid a race condition that would make parallel "distclean" fail. * tests/Makefile.am (distclean-generic): Replace the default, automake-provided rule with an identical one, but with an additional dependency on distclean-local. Simply adding the dependency would cause automake not to emit the rule at all. * BUGS: Building with -jN works, now. Distribute git-version-gen. * Makefile.am (EXTRA_DIST): Add build-aux/git-version-gen, since GNUmakefile is distributed, and requires it for dist* rules. Remove two more generated files from version control. * INSTALL: Remove generated file. * lib/autoscan/autoscan.list: Remove generated file. 2007-11-09 Paul Eggert * GNUmakefile (PATH): Remove stray apostrophes; they become part of PATH, which isn't wanted here. 2007-11-09 Ralf Wildenhues New config files output variable `top_build_prefix'. * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Substitute `top_build_prefix'. * doc/autoconf.texi (Preset Output Variables): Document it. * NEWS: Update. Report by Bob Friesenhahn. Avoid expr for arithmetic evaluation if the shell accepts $((...)). * lib/autotest/general.m4 (AT_INIT) : New function, to parametrize arithmetic with expr vs. the shell. Use it where possible. Suggestion by Benoit Sigoure. 2007-11-03 Benoit Sigoure Adjust the documentation of autotest WRT atlocal. * doc/autoconf.texi (Making testsuite Scripts): It is not necessary, when using Automake, to write a rule to produce atlocal, since it's an AC_CONFIG_FILES. Mention that atlocal.in needs to be distributed, not atconfig.in. 2007-11-04 Eric Blake Update list information. * README: Mention new autoconf-commit list. * doc/autoconf.texi (Introduction): Mention autoconf-commit list. 2007-11-04 Ralf Wildenhues * lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF): Fix comment typo. * lib/m4sugar/Makefile.am (version.m4): Another bash bug workaround. * build-aux/.gitignore: Ignore mkinstalldirs. * doc/autoconf.texi (autoreconf Invocation): Fix an underfull line. 2007-11-03 Jim Meyering s/-/./ in snapshot version string: 2.61a-256-8b556 -> 2.61a.256-8b556 * build-aux/git-version-gen: This syncs from coreutils. Adjust the build procedure so "make check" works reliably. * README-hacking: Include an extra step between "make" and "make check" to ensure that the latter passes. Use just-built tools, when possible. * GNUmakefile (PATH): Set and export here, ... (dummy): ... rather than here. 2007-11-03 Ralf Wildenhues and Andreas Schwab * tests/Makefile.am ($(srcdir)/package.m4): Work around bash exit status bug. 2007-11-03 Ralf Wildenhues * configure.ac (AC_PREREQ): Require version 2.60, for AC_PROG_SED, AC_PROG_GREP. 2007-11-02 Benoit Sigoure and Jim Meyering and Andreas Schwab and Eric Blake Document a bug in GNU Bash with compound commands and redirections. * doc/autoconf.texi (Limitations of Builtins): Mention that GNU Bash doesn't properly set $? when `{ ... } >/bad' fails, and give workaround. 2007-11-03 Eric Blake Support m4 1.4.5 in testsuite. * tests/torture.at (Define a newline): Exclude line numbers in error message. Reported by Ralf Wildenhues. 2007-11-03 Jim Meyering Remove automake-provided files from version control. * build-aux/elisp-comp: Remove file. * build-aux/install-sh: Remove file. * build-aux/missing: Remove file. * build-aux/mdate-sh: Remove file. * build-aux/.gitignore: New file. Suggestion from Ralf Wildenhues. 2007-11-03 Eric Blake Adjust version comparison to account for git snapshot numbers. * lib/m4sugar/m4sugar.m4 (_m4_version_unletter): Also treat - as a component separator. * doc/autoconf.texi (Number processing Macros) : Document this change. * tests/m4sugar.at (m4@&t@_version_compare): Test it. 2007-10-30 Bruno Haible * lib/autoconf/types.m4 (_AC_TYPE_LONG_LONG_SNIPPET): New macro, extracted from AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT. (AC_TYPE_LONG_LONG_INT, AC_TYPE_UNSIGNED_LONG_LONG_INT): Use it. Fixes problem with Sun C 5.[0-8] in 32-bit mode, reported in Suggested by Paul Eggert. 2007-10-28 Jim Meyering * README-hacking: Autoconf, Automake, and Perl are required to build. List Gzip and Tar separately. Suggested by Ralf Wildenhues. 2007-10-28 Jim Meyering README-hacking: Recommend running autoreconf -vi. * GNUmakefile (dummy): Use autoreconf -i, with appropriate PATH, so that we use just-built tools when they're available. Suggestions from Ralf Wildenhues. 2007-10-28 Jim Meyering Make inter-release --version output more useful. Now, each unofficial build has a version "number" like 2.61a-19-58dd, which indicates that it is built using the 19th change set (in _some_ repository) following the "v2.61a" tag, and that 58dd is a prefix of the commit SHA1. * build-aux/git-version-gen: New file. * configure.ac: Run it to set the version. (AM_INIT_AUTOMAKE): Don't check NEWS here. * Makefile.am (dist-hook): Arrange so that .version appears only in distribution tarballs, never in a checked-out repository. * .gitignore: Add .version here, too. Just in case. * tests/Makefile.am ($(srcdir)/package.m4): Depend on Makefile, not configure.ac, now that the version number changes automatically. Ensure that $(VERSION) is up to date for dist-related targets. * GNUmakefile: Arrange to rerun autoconf, if the version reported by git-version-gen doesn't match $(VERSION), but only for dist targets. 2007-10-27 Ralf Wildenhues Fix `Deep Package' failure with a configure script early in PATH * tests/torture.at (Deep Package): Add `.' early in PATH. Report by Jim Meyering. 2007-10-27 Jim Meyering Remove all generated files from version control. * aclocal.m4: Remove. * configure: Remove. * Makefile.in: Remove, along with all other Makefile.in in subdirs. * .gitignore: Add aclocal.m4, configure and Makefile.in. Sort. * README-hacking: New file: how to build from just-checked-out sources. 2007-10-23 Eric Blake Improve corner case of m4_expand. * lib/m4sugar/m4sugar.m4 (m4_expand, _m4_expand): Rewrite more efficiently. * tests/m4sh.at (AS@&t@_HELP_STRING): Test overquoted comma. * doc/autoconf.texi (Evaluation Macros) : Update documentation. 2007-10-23 Paul Eggert * doc/make-stds.texi: Update from gnulib. 2007-10-22 Paul Eggert and Eric Blake * lib/autoconf/c.m4 (AC_C_RESTRICT): Work around Sun C++ compatibility problem reported by Bruno Haible in . 2007-10-22 Eric Blake * doc/autoconf.texi (Particular Types): Mention bug in HP-UX 11.00 preprocessor. 2007-10-22 Paul Eggert Don't check for bug in HP-UX 11.00 cpp. * lib/autoconf/types.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Use -1ull rather than -1u, since that causes problems with gnulib; see . 2007-10-22 Ralf Wildenhues * tests/autotest.at (Backquote command substitution) (Multiline backquote command substitution) (Parenthetical command substitution) (Multiline parenthetical command substitution): Fix typos in test names. 2007-10-21 Eric Blake * configure: Regenerate. 2007-10-21 Ralf Wildenhues Fix config status generation with Tru64 ksh. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix escaping of backslash in here-documents. Fix `Deep Package' test failure on FreeBSD. * tests/torture.at (Deep Package): Do not add `.' to $PATH unnecessarily. Do not try running `/bin/sh configure' with a configure script to be found in $PATH, if the shell does not do this resolution. Fixes test failure on FreeBSD. Fix config header generation with AIX awk. * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): In awk script, use helper array D_is_set, as `" 0"' does not evaluate to true for AIX awk. 2007-10-21 Eric Blake * tests/autotest.at (Banners): Reinstate test, with typo corrected. 2007-10-20 Ralf Wildenhues * lib/autotest/general.m4 (Defaults): Validate input ranges ... : ... using this new function. * tests/autotest.at (Keywords and ranges): Test invalid ranges. Test --list with ranges and keywords. (Banners): Remove one now-failing test. 2007-10-20 Eric Blake Fix testsuite --list subset. * lib/autotest/general.m4 (AT_INIT) : Swap newlines back to spaces, before listing subset of tests. Reported by Ralf Wildenhues. 2007-10-19 Eric Blake s/parenthesis/parentheses/ where appropriate. * doc/autoconf.texi: Fix typos. * lib/m4sugar/m4sugar.m4: Likewise. Reported by Ralf Wildenhues. Document m4_expand limitation. * lib/m4sugar/m4sugar.m4 (m4_expand): Mention problem with unbalanced parse. * doc/autoconf.texi (Pretty Help Strings, Evaluation Macros) (Writing Testsuites): Mention limitations inherited from m4_expand. Improve AT_BANNER handling. * lib/autotest/general.m4 (BANNERS): New named diversion. (TESTS_END): Diversion no longer used. (AT_INIT) : Factor all banners into a shell function, which prints only as needed, using an associative array of banner text from a special diversion. : No longer need awk to find banners. : Banners are no longer processed by main driver loop, so we no longer need case statement. (AT_BANNER): Rewrite to populate new diversion. (AT_SETUP): Each test invokes its own banner. No output is needed to the TESTS diversion. * doc/autoconf.texi (Writing Testsuites): Document slight semantics change. * tests/autotest.at (AT_BANNERS): Enhance test. * NEWS: Document AT_BANNER. Document and test AT_BANNER. * doc/autoconf.texi (Writing Testsuites): Document AT_BANNER. * tests/autotest.at (AT_CHECK_EGREP): Share between tests. (AT_CHECK_BANNERS): New test. Doc touchups. * doc/autoconf.texi (Text processing Macros) : Clarify and fix typos. 2007-10-18 Eric Blake Ignore `make dist' changelogs in testsuite.log. * lib/autotest/general.m4 (AT_INIT) : Prune directories matching AT_PACKAGE_TARNAME-*. Fix AT_TESTED, AT_KEYWORDS. * lib/m4sugar/m4sugar.m4 (m4_append_uniq): Warn if separator occurs in string, as duplicates may be added. (_m4_append_uniq): New helper macro. (m4_append_uniq_w): New macro. * lib/autotest/general.m4 (AT_TESTED, AT_KEYWORDS): Fix duplication bug by using new macro. (AT_INIT) : Restore newline separators. Invoke tested programs with stdin redirected, so programs that don't understand --version won't try to behave interactively. * tests/autotest.at (Tested programs): Catch this bug. * tests/m4sugar.at (m4@&t@_append): Test new macro. * tests/local.at (AT_TESTED): Add m4, perl. * doc/autoconf.texi (Text processing Macros): Document m4_append_uniq_w, and update text on m4_append. * NEWS: Document the addition. 2007-10-17 Eric Blake Function cleanup. * lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT): Convert from m4 macro... (AT_INIT) : ...to shell function. (AT_INIT): Defer function declarations until after --help, --version. Format functions consistently, trying to fit in 80 columns. (TEST_FUNCTIONS): Based on recent changes, rename... (TEST_GROUPS): ...to this. Reject FreeBSD m4. * m4/m4.m4 (AC_PROG_GNU_M4): Also check for frozen file support. * configure: Regenerate. Reported by Bob Friesenhahn. Test recent additions. * tests/m4sugar.at (m4@&t@_map, m4@&t@_combine) (m4@&t_max and m4@&t_min): New tests. * doc/autoconf.texi (Evaluation Macros) : Enhance description. 2007-10-17 Ralf Wildenhues * TODO: multiline args in config files and headers work now. Autotest: do not use shell functions for individual tests. * lib/autotest/general.m4 (AT_INIT) : Merely extract the source test source, do not invoke it. (AT_SETUP, AT_CLEANUP): Source test code outside shell function. * tests/autotest.at (Fallacy): Actually let the inner suite fail, expect exit status of 1. * tests/autotest.at (Skip): New test, for bogus zsh exit status. * lib/autotest/general.m4 (at_func_test): Fix test extraction script. 2007-10-17 Eric Blake Fix m4_combine for empty suffix list. * lib/m4sugar/m4sugar.m4 (m4_combine): Check for suffix list. * doc/autoconf.texi (Text processing Macros): Document this. Add m4_combine, based on Libtool's lt_combine. * lib/m4sugar/m4sugar.m4 (m4_combine): New macro. * doc/autoconf.texi (Text processing Macros): Document it. * NEWS: Likewise. 2007-10-16 Ralf Wildenhues Fix `configure --help=recursive' in unconfigured/read-only trees. * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Avoid errors when `.' is not writable, use 'cp -p' in this case, in the hope that it will not actually be needed. Still try removing files, in case of other write errors. * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): For ac_confdir, use $as_myself, not $0. (_AC_INIT_HELP): For --help=recursive, if the subdir does not exist, try again in the the source tree. This change assumes that the subpackage configure script is capable of running --help=recursive in the source tree. * tests/torture.at (Configuring subdirectories, Deep Package): Adjust tests to expose both issues, also try invocation as `sh configure ...' and plain `configure ...' with PATH adjusted. * NEWS, THANKS: Update. Report by Hans Ulrich Niedermann. 2007-10-16 Paul Eggert Check for 64-bit int errors in HP-UX 10.20 preprocessor. Problem reported by H.Merijn Brand in . * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): (AC_TYPE_UNSIGNED_LONG_LONG_INT): Check that preprocessor handles 64-bit ints, too. 2007-10-16 Eric Blake m4_map is a looping construct. * lib/m4sugar/m4sugar.m4 (m4_map, _m4_map, m4_map_sep): Move. Fix m4_map, and add some more utility macros. * lib/m4sugar/m4sugar.m4 (m4_apply, m4_count, m4_dquote_elt) (m4_echo, m4_make_list): New documented macros. (_m4_quote, _m4_shift2): New helper macros. (m4_map): Change semantics to allow calling macro without arguments. (m4_map_sep): Likewise. Also change semantics to quote separator, to match m4_join and m4_append. (m4_version_unletter): Fix use of m4_map. * doc/autoconf.texi (Evaluation Macros): Document m4_apply, m4_count, m4_dquote_elt, m4_echo, m4_make_list. (Text processing Macros): Mention m4_dquote as a faster alternative to joining with commas. (Looping constructs): Document m4_map, m4_map_sep. * NEWS: Mention new macros. A few more m4sugar improvements, to benefit libtool. * lib/m4sugar/m4sugar.m4 (m4_bpatsubsts, _m4_shiftn): Reduce size of expansion by avoiding extra uses of $@. (m4_shiftn): Avoid extra dnl, and forbid shifting by 0. (_m4_cdr): New helper macro. (_m4_map, m4_map_sep): Use it to reduce size of expansion. (_m4_shift3): New helper macro. (_m4_foreach): Swap argument order, and use new macro to reduce size of expansion. * doc/autoconf.texi (Looping constructs) : Mention that count must be positive. * doc/autoconf.texi (Evaluation Macros) : Fix typo. Reported by Ralf Wildenhues. 2007-10-15 Ralf Wildenhues * doc/autoconf.texi (Portable Shell): Improve description of zsh 4.x function subshell bug with exit and trap. 2007-10-15 Eric Blake Enhance AS_HELP_STRING. * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Don't expand arguments, and reduce number of expansions. * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Rework to use m4_expand, and to take indent and wrap column numbers. * tests/m4sh.at (AS@&t@_HELP_STRING): Update the test. * doc/autoconf.texi (Pretty Help Strings): Document details about arguments. (Text processing Macros): Minor tweaks. * NEWS: Document this change. Fix 2007-10-03 regression with AT_SETUP([a, b]). * lib/m4sugar/m4sugar.m4 (m4_expand): New macro. (m4_text_box): Use it. * lib/autotest/general.m4 (AT_SETUP): Use it. * lib/m4sugar/m4sh.m4 (_AS_RUN): Use it. * tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Test this. * NEWS: Revert caveat about semantics change on comma. * doc/autoconf.texi (Evaluation Macros): Document m4_expand. 2007-10-13 Eric Blake Change m4_join to match libtool's ltsugar semantics. * lib/m4sugar/m4sugar.m4 (m4_join): Just define this, not defun. Ignore empty arguments, using... (_m4_join): ...this new helper. * tests/m4sugar.at (m4@&t@_join): New test. * doc/autoconf.texi (Text processing Macros): Document new semantics of m4_join. Make AC_PREREQ faster and more robust. * lib/m4sugar/m4sugar.m4 (m4_ignore, m4_unquote): New macros. (m4_version_prereq): Inline constant expansions. (m4_list_cmp): Reduce number of expansions, by avoiding m4_case. Rewrite in terms of [] list, not () list. (_m4_list_cmp, _m4_version_unletter): New helper macros. (m4_version_unletter): Write wrapper around new implementation to preserve old semantics. (m4_version_compare): Pass correct type of list, and avoid overhead of flattening expressions too early. (m4_do): Move to be near other quoting macros. (m4_max, m4_min): Always result in decimal output. * doc/autoconf.texi (Looping constructs): Add m4_car, m4_cdr. Move m4_do... (Evaluation Macros): ...here. Add m4_ignore, m4_unquote. (Text processing Macros): Move m4_version_compare... (Number processing Macros): ...to this new node; document m4_cmp, m4_list_cmp, m4_sign, m4_max, m4_min. * tests/m4sugar.at (m4@&t@_version_compare): Enhance test, to pick up on bugs fixed by this patch. * NEWS: Document new macros. 2007-10-12 Eric Blake * doc/autoconf.texi (Text processing Macros): Fix bad merge. (Reporting Messages): Fix underfull hbox. Some more m4sugar documentation. * lib/m4sugar/m4sugar.m4: Clean up macro order. * doc/autoconf.texi (Programming in M4): Lighten the warning on using m4sugar; it is stabilizing and useful. (Redefined M4 Macros): Touch up wording on M4 builtins; sort. Add m4_divert, m4_undivert, __file__, __line__, __oline__. (Diagnostics): New node, documenting m4_assert, m4_errprintn, m4_fatal, m4_location, m4_warn. (Diversion support): New node, documenting m4_divert_push, m4_divert_pop, m4_divert_text, m4_divert_once. (Text processing Macros): Sort. Add m4_flatten, m4_join, m4_newline, m4_strip, m4_text_box, m4_text_wrap. (Reporting Messages): Mark AC_DIAGNOSE, AC_WARNING, and AC_FATAL as obsolescent. (Printing Messages): Change cross-reference. Document interaction of recent m4_append change with Libtool HEAD. * lib/m4sugar/m4sugar.m4 (m4_append): Document semantics change. (m4_append_uniq): Add new parameters, based on lt_append_uniq. * tests/m4sugar.at (m4@&t@_append): New test. * NEWS: Document semantics change. * doc/autoconf.texi (Text processing Macros): Likewise. s/AC_VERSION/AC_AUTOCONF_VERSION/. * doc/autoconf.texi (Versioning): Change the name. * NEWS: Likewise. * lib/autoconf/general.m4 (AC_AUTOCONF_VERSION): Likewise. * tests/tools.at (autoconf: AC_AUTOCONF_VERSION): Likewise. Suggested by Ralf Wildenhues. Namespace cleanup. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE) (_AC_OUTPUT_HEADERS_PREPARE): Convert here-doc delimiters into autoconf namespace. * doc/autoconf.texi (Programming in M4sugar, Forbidden Patterns) (Programming in M4sh, Macro Names): Beef up description of namespaces reserved for autoconf. * configure: Regenerate. 2007-10-12 Eric Blake and Paolo Bonzini Speed up execution of subset of testsuite. * lib/autotest/general.m4 (TEST_FUNCTIONS): New diversion. (AT_INIT) : New shell function. (AT_INIT) : New variable, set to absolute $as_myself. (AT_INIT) New variable, names file that holds current test function definition. (AT_SETUP): Start the shell function at_func_test_#, into the TEST_FUNCTIONS diversion. (AT_CLEANUP): End the shell function. Simplify the TESTS diversion to invoke the function. 2007-10-11 Ralf Wildenhues * .gitignore: Ignore tags and TAGS files. 2007-10-11 Eric Blake Config header generation followup. * lib/autoconf/general.m4 (_AC_DEFINE_Q): Check for raw newlines, which won't work with the preprocessor nor with the awk implementation. * tests/torture.at (Define a newline): Test raw newline detection, removing the XFAIL. * doc/autoconf.texi (Defining Symbols): Document recent change to allow backslash-newline. * THANKS: Update. 2007-10-11 Ralf Wildenhues * lib/autotest/general.m4: Put function braces in separate line. 2007-10-10 Eric Blake Avoid some overhead from m4_defn and m4_popdef. * lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Only pass on first argument, since we are documented that way. (m4_for, m4_append_uniq, m4_text_wrap): Optimize out defined-ness check where it is safe to do so. (m4_append): Likewise, and quote the separator. (m4_text_box): Likewise, and avoid regex, also be robust to expansion and quadrigraphs. Another AC_DEFINE speedup. * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Move parameter elision... (_AC_DEFINE_Q): ...here, and only do it once. * lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Avoid overquoting. * lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Fix m4_defn overquoting introduced 2007-10-05. Whitespace cleanup. * lib/autoconf/general.m4: Use consistent indentation. * configure: Regenerate. * NEWS: Announce recent round of speed optimizations. 2007-10-10 Ralf Wildenhues * NEWS: Announce shell function usage in Autotest. 2007-10-10 Eric Blake and Paul Eggert Reduce number of forks at startup. * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Speed up NLS sanitization. * configure: Regenerate. 2007-10-10 Ralf Wildenhues and Paul Eggert Use awk for config header generation. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix comments. (_AC_OUTPUT_HEADERS_PREPARE): New macro. Rewrite of the config header machinery for use with awk and placement outside the main config.status instantiation loop. Retain multi-line defines through backslash-newline combinations, do not split the script any more. (_AC_OUTPUT_HEADER): Simplify accordingly, use $AWK. (_AC_OUTPUT_MAIN_LOOP): Call _AC_OUTPUT_HEADERS_PREPARE if needed. (AC_OUTPUT_MAKE_DEFS): Remove backslash-newline combinations from define values. * NEWS: Update. * tests/torture.at (#define header templates): Extend test by several more cases: white space before and after `#', macros with parameters in config.hin and as defines, multi-line macro values. (Torturing config.status): Use a define value twice the length in order to exercise the awk literal string limit. (Substitute and define special characters): Also try special delimiter, to exercise the special-case code. Suggestion by Eric Lemings. 2007-10-10 Ralf Wildenhues * tests/local.at (AT_COPYRIGHT): Bump copyright years. 2007-10-09 Eric Blake Improve header of bin/autoconf. * lib/m4sugar/m4sh.m4 (AS_INIT): Add a 'generated from' notice. * lib/autoconf/general.m4 (_AC_INIT_NOTICE): Override new notice from M4sh. * bin/autoconf.as: Put copyright up front in generated file. * bin/autoconf.as (exit_missing_arg): Font-lock tweak. 2007-10-09 Ralf Wildenhues * doc/install.texi (Basic Installation): Document `uninstall'. * INSTALL: Regenerate. Suggestion by Roberto Bagnara. 2007-10-08 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): V7 awk had 'index'. Adjust doc. to match latest gnulib. * build-aux/texinfo.tex: Sync from gnulib. * doc/standards.texi: Likewise. * doc/autoconf.texi (Copying This Manual): Rename to "GNU Free Documentation License" and remove the subsection. This simplifies the manual a bit and is more like what other GNU projects do nowadays. 2007-10-08 Eric Blake Use recent changes. * configure: Regenerate. Fix regression in m4_text_wrap from 2007-10-05. * lib/m4sugar/m4sugar.m4 (m4_max, m4_min): New macros. (m4_sign): Sort. (m4_text_wrap): Fix off-by-one error in rewrite from m4_for to m4_format. * lib/autotest/general.m4 (AT_SETUP): Avoid negative width. * tests/autotest.at (Long test title, Longer test title): Test this fix, beyond what AS_HELP_STRING already tests. Avoid m4 warnings on bad m4_format usage. * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Use %*s, in case width evaulates to 0. * lib/autotest/general.m4 (AT_SETUP): Likewise; also ensure that enough arguments are provided. 2007-10-06 Paolo Bonzini * doc/autoconf.texi (Shell portability): Document shell function portability. 2007-10-06 Paolo Bonzini * lib/autotest/general.m4 (AT_INIT): Add at_func_diff_devnull, at_func_check_skip, at_func_check_status, at_func_filter_trace, at_func_log_failure shell functions. Use test -s to avoid useless diff invocations. (at_func_check_newline): Renamed from at_check_newline. (AT_SETUP): Define AT_captured_files to empty. (AT_DIFF_STDERR(*), AT_DIFF_STDOUT(*)): New, extracted from _AT_CHECK. (_AT_CHECK): Replace m4_case with m4_ifdef/m4_indir. Use all the shell functions. 2007-10-05 Paul Eggert Don't assume "." is writeable, for commands like "autoconf --version". * lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): Use a different heuristic instead, one that doesn't rely on creating files. * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Handle "///" correctly. 2007-10-05 Jim Meyering Avoid makeinfo warnings. * doc/autoconf.texi (Redefined M4 Macros): Add a `,' after @xref. (Looping constructs): Add ` ' after @defmac'd name, m4_do. 2007-10-05 Eric Blake Resolve Python issue 1676135 regarding configure directory args. * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Strip trailing slashes from directory arguments. * tests/base.at (configure directories): New test. * doc/autoconf.texi (Installation Directory Variables): Document the change. * NEWS: Likewise. * THANKS: Update. Reported by Björn Lindqvist. Provide better short-circuiting operation. * lib/m4sugar/m4sugar.m4 (m4_cond, m4_newline): New macros. (m4_text_wrap): Use it. Also avoid useless m4_for. * lib/m4sugar/m4sh.m4 (_AS_QUOTE_IFELSE, AS_LITERAL_IF): Use new macro. (_AS_IDENTIFIER_IF): Likewise, and fix bug when $1 is [,]. * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Use new macros to avoid regexps. * doc/autoconf.texi (Redefined M4 Macros): Expand m4_if documentation. Sort m4_mkstemp, m4_undefine. Move m4_ifndef... (Conditional constructs): ...here, to new section. Also document m4_cond, m4_ifval, m4_n, m4_ifvaln, m4_ifset, m4_case, m4_bmatch, m4_bpatsubsts, and m4_default. (Looping constructs): Document m4_shiftn, m4_shift2, m4_shift3, m4_do. 2007-10-04 Eric Blake Fix recent testsuite failures. * lib/autotest/general.m4 (AT_INIT, AT_SETUP): Double-quote text that must not be re-expanded after AS_ESCAPE. * lib/m4sugar/m4sh.m4 (_AS_IDENTIFIER_IF): Don't expand $1 when checking if it is an identifier. Whitespace cleanup. * lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT): Avoid leading whitespace, as it caused space-tab in testsuite. (AT_INIT): Avoid trailing newlines in testsuite. One more round of m4_foreach_w speedups. * lib/m4sugar/m4sugar.m4 (m4_flatten): Only use regex if newline is present. (_m4_split): Avoid useless expansions inside definition. Move argument defaulting... (m4_split): ...here. Change alternate quote to something less likely to appear in $1. Also, special case space as regexp... (m4_foreach_w): ...to avoid regexp on single-term list. (m4_default, m4_defn, m4_popdef, m4_undefine, _m4_foreach): Avoid useless expansions inside definition. * tests/m4sugar.at (m4@&t@_split): Add tests. 2007-10-04 Paolo Bonzini * general.m4 (AT_INIT): Add at_check_newline function. (_AT_DECIDE_TRACEABLE): Include at_traceon test, use shell function. (_AT_CHECK): Don't use at_trace_this. 2007-10-04 Paolo Bonzini Fix previous commit. * lib/autotest/general.m4 (AT_LINE): Fix regex. 2007-10-04 Eric Blake Speed up building testsuites. * lib/autotest/general.m4 (AT_LINE): Only use regex when file changed since last time. Use simpler regex. 2007-10-03 Eric Blake Optimize checking for identifiers. * lib/m4sugar/m4sh.m4 (AS_IDENTIFIER_IF, _AS_IDENTIFIER_IF): New macros, more efficient than regex on m4_re_word. * lib/autoconf/general.m4 (AC_SUBST, AC_DEFINE_TRACE_LITERAL): Rewrite in terms of new macro. As a side-effect, AC_DEFINE can now use @&t@. * configure: Regenerate. Remove some XFAILs, and make AT_SETUP output line up. * lib/autotest/general.m4 (AT_SETUP): Only expand description once; thereafter, use its expansion, properly quoted. * tests/autotest.at (AT_CHECK_AT_TITLE): Also check macro expansion with arguments, and check for aligned output. (AT_CHECK_AT_TITLE_CHAR): Remove XFAILs for tests that now pass. Add a test for macros with parameters. * NEWS: Document the semantics change. * tests/base.at: Fix test titles containing commas. * tests/compile.at: Likewise. * tests/tools.at: Likewise. * tests/torture.at: Likewise. Another round of regex avoidance. * lib/m4sugar/m4sugar.m4 (m4_cr_alnum, m4_cr_all) (_m4_define_cr_not, m4_cr_not_letters, m4_cr_not_LETTERS) (m4_cr_not_Letters, m4_cr_not_digits, m4_cr_not_alnum) (m4_cr_not_symbols1, m4_cr_not_symbols2): New macros, implementing character ranges useful in m4_translit. (m4_toupper, m4_tolower): Optimize the constant portion of definition. * lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Also reject @S|@ because it creates $, and reject [] thanks to AS_TR_SH rewrite. (AS_TR_SH, AS_TR_CPP): Use just translit, not bpatsubst. (AS_ESCAPE): Factor... (_AS_ESCAPE): ...into new macro, with second argument required. Avoid regex in common case. (_AS_QUOTE): Use new macro. Whitespace cleanup. * lib/autoconf/types.m4: Avoid space-tab. * lib/m4sugar/m4sh.m4: Use tab consistently. 2007-10-03 Paul Eggert * lib/m4sugar/m4sugar.m4 (m4_shift2, m4_shift3): New macros. (m4_shiftn): Remove no-longer-needed optimization. Perhaps we should remove m4_shiftn entirely? (m4_case, b4_bmatch, m4_map_sep, m4_bpatsubsts, m4_join): Prefer m4_shift2 and m4_shift3 to m4_shiftn. * lib/autoconf/lang.m4 (_AC_LANG_DISPATCH): Likewise. * lib/m4sugar/m4sh.m4 (AS_CASE, AS_IF): Likewise. * tests/autotest.at (AT_CHECK_AT_TEST): Likewise. 2007-10-03 Eric Blake Comment touchups. * lib/m4sugar/m4sugar.m4: Grammar fixes in comments. 2007-10-02 Eric Blake Optimize appending text. * lib/m4sugar/m4sugar.m4 (m4_append_uniq): Use index, not regular expressions. Optimize recursion. * lib/m4sugar/m4sugar.m4 (m4_shiftn): This macro is called in a lot of hot spots; optimize it for 2 and 3 shifts. Optimize AC_PREREQ and other m4sugar numerics. * lib/m4sugar/m4sugar.m4 (m4_sign): Write with m4_eval. (m4_cmp): Compare arbitrary expressions, without overflow. (m4_version_unletter): Also recognize capital letters. (m4_version_compare): Avoid regex when splitting version number string. 2007-10-01 Eric Blake Once again, reject IRIX m4. * m4/m4.m4 (AC_PROG_GNU_M4): Use indir builtin to root out non-GNU implementations that ignore --trace. * configure: Regenerate. Reported by Ralf Wildenhues. Fix regression in AC_DEFINE([macro(with_arg)]). * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Don't chop off close quotes with a careless m4_substr. 2007-09-30 Eric Blake Allow nameless iteration. * lib/m4sugar/m4sugar.m4 (m4_for, _m4_for): Access variable indirectly. * tests/m4sugar.at (myvar): Test this. 2007-09-29 Eric Blake Speed optimization: avoid m4 regex when other algorithms work. * lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Rewrite without regex. (_AS_QUOTE_IFELSE): Likewise. * lib/m4sugar/m4sugar.m4 (m4_strip): Reduce from 3 to 2 regex. (m4_bpatsubsts): Split... (_m4_bpatsubsts): ...so that recursion can avoid patsubst on empty regex. (_m4_divert()): Define, to avoid m4 warning on `m4_divert'. (m4_qlen): Optimize on short strings, to avoid regex. (m4_sign): Avoid regex, and fix bug with `01' and `-0'. * lib/autoconf/general.m4 (AC_CACHE_VAL): Rewrite without regex. (AC_DEFINE_TRACE): Likewise. 2007-09-28 Eric Blake Oops - my earlier 'optimization' caused a regression. * tests/local.at (AT_CHECK_M4): Fix typo. 2007-09-27 Eric Blake and Ralf Wildenhues Catch even more common AC_CACHE_VAL mistakes. * lib/autoconf/general.m4 (AC_CACHE_VAL): Warn if cache variable lacks '_cv_', or if AC_SUBST appears in body. * tests/base.at (AC_CACHE_CHECK): Test this change. 2007-09-27 Stepan Kasal and Eric Blake Autotest no longer caters to Ultrix redirection limitation. * doc/autoconf.texi (Writing testsuite.at): Remove the limitation that the first parameter of AT_CHECK cannot contain redirection. (File Descriptors): Mention that Ultrix limitation is no longer a show-stopper in modern code. * tests/local.at (AT_CHECK_M4): Fix for cases when the fourth parameter is `stderr' or `experr'. Optimize if it was `ignore'. * lib/autotest/general.m4 (AT_CHECK): Update comment. 2007-09-27 Eric Blake Squelch changeword in m4sugar. * lib/m4sugar/m4sugar.m4 (changeword): Disable this experimental feature of m4 1.4.x. Configure whitespace touchups. * lib/autoconf/general.m4 (_AC_INIT_HELP): Fix alignment of installation directories, and avoid TAB, in configure --help output. * configure.ac: Avoid extra trailing newline. * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Avoid space-tab. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Avoid TAB in config.status --help output. * configure: Regenerate. Fix underquotation in AS_HELP_STRING. * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Don't underquote lhs argument. * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Don't underquote first-prefix argument. * tests/m4sh.at (AS@&t@_HELP_STRING): Test this fix. * NEWS: Document AS_HELP_STRING fix. Autotest formatting touchups. * lib/autotest/general.m4 (HELP_TUNING): Avoid TAB in terminal output. (PATH): Simplify computation of new PATH. 2007-09-26 Eric Blake Fix testsuite breakage in last patch. * tests/autotest.at (AT_CHECK_AT_TITLE): Properly quote the font-lock fix. * tests/torture.at (@%:@define header templates): Rename, so that output lines up correctly. More font-lock happiness. * tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Clean up font confusion. 2007-09-25 Eric Blake Typo fixes. * lib/autoconf/general.m4 (AC_SUBST): Fix typo in comment. * lib/m4sugar/m4sh.m4 (AS_VAR_PUSHDEF): Likewise. Improve documentation of M4 parameter expansion. * doc/autoconf.texi (Quoting and Parameters): New section. (Quotation and Nested Macros): Improve wording. Improve C99 detection. * lib/autoconf/c.m4 (_AC_PROG_CC_C99): Add support for HP cc, and avoid deprecation warning with icc. * THANKS: Update. Reported by Ted Bullock. 2007-09-24 Jim Meyering Whenever possible, use the vertical bar as sed delimiter. * lib/autoconf/functions.m4 (GETLOADAVG_LIBS) [AC_FUNC_GETLOADAVG]: Use "|", not "!". * lib/autoconf/status.m4 (_AC_SRCDIRS) [ac_top_builddir_sub]: [ac_dir_suffix]: Use "|", not "," as sed delimiter. * tests/mktests.sh (as_me): Likewise. * lib/freeze.mk (check-forbidden-patterns): Likewise. * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Likewise. * configure: Regenerate. * doc/autoconf.texi (Shell Substitutions): Use "|", not "," in examples. * lib/autotest/general.m4 (AT_INIT): Use "|", not "&" as sed delimiter in the : -> $PATH_SEPARATOR transformation of $AUTOTEST_PATH. This is fine, as long as $PATH_SEPARATOR doesn't contain "|". 2007-09-22 Jim Meyering Add a comment. * lib/autoconf/headers.m4 (HAVE_STDBOOL_H): Document the 2004-05-31 change also with a comment in the code. 2007-09-20 Eric Blake More contribution housekeeping. * THANKS: Sort. * AUTHORS: Sort, reflect recent assignment from Helge Deller. Ignore additional files, when copying cross-repository. * .gitignore: Ignore CVS directories, emacs edits. * .cvsignore: Ignore .git directory, emacs edits. 2007-09-15 Eric Blake Provide AC_VERSION, not m4_AUTOCONF_VERSION. * doc/autoconf.texi (Text processing Macros): Remove mention of m4_AUTOCONF_VERSION, and leave m4_PACKAGE_VERSION undocumented once again. (Notices): Move AC_PREREQ... (Versioning): ...to this new section, alongside the new AC_VERSION alias for the undocumented m4_PACKAGE_VERSION. * lib/m4sugar/m4sugar.m4 (m4_AUTOCONF_VERSION): Revert change. * lib/autoconf/general.m4 (AC_VERSION): New macro. * NEWS: Update to match this rename. * tests/m4sugar.at (m4@&t@_version_compare): Remove tests of m4_PACKAGE_VERSION. * tests/tools.at (autoconf: AC_VERSION): New test. Suggested by Paolo Bonzini and Benoit Sigoure. 2007-09-14 Eric Blake Prepare for conversion to git. * doc/.cvsignore: Avoid multiple listings on one line. * bin/.cvsignore: Likewise. * .gitignore, bin/.gitignore, config/.gitignore, doc/.gitignore, lib/.gitignore, lib/Autom4te/.gitignore, lib/autoconf/.gitignore, lib/autoscan/.gitignore, lib/autotest/.gitignore, lib/emacs/.gitignore, lib/m4sugar/.gitignore, man/.gitignore, tests/.gitignore: New files, identical to .cvsignore counterpart. 2007-09-13 Eric Blake Editing eye-candy. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Restore font-lock balance. * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Likewise. * lib/autoconf/general.m4 (_AC_DO_ECHO): Likewise. * configure: Regenerate. Clean up 'make dist' of previous patch. * tests/Makefile.am (EXTRA_DIST): Distribute mktests.stamp. (CLEANFILES): Don't clean the stamp, since we distribute the generated files pre-built. (MAINTAINERCLEANFILES): Clean it here instead. * tests/Makefile.in: Regenerate. Avoid parallel 'make check' issue. * tests/Makefile.am (mktests.stamp): New witness. (TESTSUITE_GENERATED_AT): Use it. (CLEANFILES): Clean the witness. * tests/.cvsignore (mktests.stamp): Ignore the witness. Document another awk pitfall. * doc/autoconf.texi (Limitations of Usual Tools) : Document limitation of field variables in END. Reported by Gary V. Vaughan. * AUTHORS: Add missing entries. 2007-09-12 Eric Blake Publish m4_ifndef, m4_version_compare, m4_AUTOCONF_VERSION. * doc/autoconf.texi (Text processing Macros): Document m4_version_compare, m4_AUTOCONF_VERSION, m4_PACKAGE_VERSION. (Redefined M4 Macros): Document m4_ifndef. * lib/m4sugar/m4sugar.m4 (m4_AUTOCONF_VERSION): New macro; we can't obsolete m4_PACKAGE_VERSION at this time since Autoconf 1.10 used it while it was undocumented. * NEWS: Document this change. * lib/m4sugar/Makefile.am (version.m4): Update copyright dates. * lib/m4sugar/Makefile.in: Regenerate. * tests/m4sugar.at (m4@&t@_version_compare): New test. Reported by Bruno Haible. * doc/autoconf.texi (Generic Compiler Characteristics): Add missing index entries. 2007-09-11 Eric Blake Centralize all system extensions checks. * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Inline code from AC_AIX, AC_GNU_SOURCE, AC_MINIX. Add Interix support. (AC_AIX, AC_GNU_SOURCE, AC_MINIX): Obsolete, and point to AC_USE_SYSTEM_EXTENSIONS. (AC_ISC_POSIX): Obsolete, and point to AC_SEARCH_LIBS. (AC_XENIX_DIR, AC_IRIX_SUN): Promote proper quoting in AU_DEFUN. * doc/autoconf.texi (Posix Variants): Reword this section, emphasizing that AC_USE_SYSTEM_EXTENSIONS is the preferred method, rather than a series of system-specific checks. (Obsolete Macros): Add AC_AIX, AC_GNU_SOURCE, AC_ISC_POSIX, AC_MINIX. * NEWS: Document this change. * THANKS: Update. Reported by Martin Koeppe. 2007-09-08 Eric Blake Clean up obsolete macros references. * doc/autoconf.texi: Add anchors to support better cross-referencing. (Particular Structures): Move obsolete macros descriptions... (External Software): Likewise. (Package Options): Likewise. (Obsolete Macros): ...to here. Add cross-references to documentation on replacements. * NEWS: Mention that these macros have been obsolete for a while now: AC_STRUCT_ST_BLKSIZE AC_STRUCT_ST_RDEV AC_WITH AC_ENABLE. Improve M4 path searching during configure. * lib/autoconf/programs.m4 (AC_PATH_PROGS_FEATURE_CHECK): New macro. (_AC_PATH_PROG_FEATURE_CHECK): Rename... (_AC_PATH_PROGS_FEATURE_CHECK): ...to this, add defaulted action parameter, and kill side effects. (_AC_PROG_GREP, AC_PROG_SED): Adjust callers. (_AC_FEATURE_CHECK_LENGTH): Kill extra whitespace. * m4/m4.m4 (AC_PROG_GNU_M4): Don't stop searching until working m4 is found. (AC_PATH_PROGS_FEATURE_CHECK): Add backwards compatibility hack to allow bootstrapping with autoconf 2.61. * configure.ac (M4): AC_PROG_GNU_M4 now exits on failure. * configure: Regenerate. * doc/autoconf.texi (Generic Programs): Document new macro. * tests/mktests.sh (au_exclude_script): Exclude auto-testing new macro. * tests/semantics.at (AC_PATH_PROGS_FEATURE_CHECK): New test. * NEWS: Document the change. * THANKS: Update. Reported by Hans Aberg. * doc/autoconf.texi (Generic Programs): Fix typo. 2007-09-06 Eric Blake * doc/autoconf.texi (Generic Programs): Use $PATH_SEPARATOR, not :, and make it clear that optional @var{path} defaults to $PATH. (Erlang Compiler and Interpreter): Likewise. Texinfo cleanup. * doc/autoconf.texi: Avoid lines > 80 columns when possible. Reword some paragraphs to avoid overfull, underfull hbox warnings. Add index entries to avoid overfull vbox warnings. 2007-09-05 Eric Blake * NEWS: Adjust wording for AC_CONFIG_LINKS. Reported by Ralf Wildenhues. 2007-09-03 Eric Blake * NEWS: Document fixes that have been applied since 2.61a. Housekeeping. * THANKS: Update, and convert to UTF-8 encoding. * AUTHORS: Likewise. 2007-08-23 Ralf Wildenhues * lib/autoconf/general.m4 (AC_SITE_LOAD): Guard against file names beginning with `-' again. 2007-08-22 Stepan Kasal Ralf Wildenhues * doc/autoconf.texi (Defining Directories): Mention AM_CPPFLAGS, as the way to modify CPPFLAGS when using Automake. 2007-08-21 Ralf Wildenhues * lib/autoconf/general.m4 (AC_SITE_LOAD): Do not overwrite "$@" here, this macro is expanded by AC_INIT. Fixes 2.60 regression. * tests/base.at (configure arguments): New test. * THANKS: Update. Report by Olaf Lenz. * lib/autoconf/general.m4 (_AC_ENABLE_IF): Expand macro arguments in comment. Report by Vincent Torri . 2007-08-20 Benoit Sigoure * doc/autoconf.texi (File System Conventions): Index the proper way of detecting absolute file names. 2007-08-20 Ralf Wildenhues * build-aux/config.guess, build-aux/config.sub, build-aux/elisp-comp, build-aux/install-sh, build-aux/mdate-sh, build-aux/missing, build-aux/texinfo.tex, doc/fdl.texi, doc/make-stds.texi, doc/standards.texi: Sync from gnulib. * doc/autoconf.texi (GNU Free Documentation License): Adjust for sectioning change in fdl.texi. * bin/autoconf.as: Update --version output to match current GCS. * bin/autoheader.in: Likewise. * bin/autom4te.in: Likewise. * bin/autoreconf.in: Likewise. * bin/autoscan.in: Likewise. * bin/autoupdate.in: Likewise. * bin/ifnames.in: Likewise. 2007-08-18 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_LINK): Do not try to link a file to itself if source and build trees coincide. * tests/torture.at (AC_CONFIG_LINKS and identical files): New test. Report by Sebastian Freundt . 2007-07-20 Paul Eggert Reword the copyright notices to match what's suggested in GPLv3. In ChangeLog files, use more-permissive notice rather than GPL, as per usual GNU standards these days. 2007-07-13 Paul Eggert * doc/autoconf.texi (autoreconf Invocation): Document ACLOCAL_AMFLAGS limitation reported by Leo Moisio in . 2007-07-03 Paul Eggert * COPYING: Update to GPLv3. All uses changed. 2007-06-26 Ralf Wildenhues and Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): sed -e '' fails on AIX 5.3. 2007-06-17 Noah Misch * lib/autotest/general.m4 (AT_INIT): Handle absolute `srcdir'. * tests/autotest.at (srcdir propagation): Test absolute `srcdir' and `srcdir' as subdirectory of `builddir'. 2007-06-13 Noah Misch * lib/autotest/general.m4 (AT_INIT): Compute $srcdir correctly. * tests/autotest.at (srcdir propagation): New test. * THANKS: Update. Reported by Mike Frysinger. 2007-06-13 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): Set FPATH too. Problem reported by Fred Kreek in . * doc/autoconf.texi (Special Shell Variables): Warn about FPATH. (Macro Names, Defining Directories): Don't mention PATH as a name for a fully qualified file name, as this usage violates the GNU coding standards and we shouldn't recommend it. * lib/autotest/general.m4 (AT_INIT): Don't set PATH to the empty string and then assume shell builtins like "test" will work. 2007-06-12 Noah Misch * lib/autoconf/general.m4 (AC_SUBST): Raise a fatal error if VARIABLE is not a valid shell variable name. * tests/mktests.sh (ac_exclude_list): Add AC_ARG_VAR. * tests/torture.at (AC_SUBST: variable name validation): New test. Reported by Andreas Schwab. 2007-06-04 Noah Misch * doc/autoconf.texi (AC_F77_MAIN): Give a specific usage example that works with both C and C++. 2007-06-03 Noah Misch , Bruno Haible * lib/autoconf/c.m4 (AC_OPENMP): Use a simple loop instead of compiler brand tests. 2007-05-31 Paul Eggert * doc/autoconf.texi (Particular Types): Give example of use for AC_TYPE_INT8_T etc. 2007-05-29 Stepan Kasal * lib/autoconf/types.m4 (_AC_TYPE_UNSIGNED_INT): Fix a typo. 2007-05-28 Paul Eggert * doc/autoconf.texi (Particular Types): AC_TYPE_INT8_T does not define HAVE_INT8_T, and likewise for similar macros. Problem reported by Patrick Welche in . 2007-05-25 Noah Misch * bin/Makefile.am ($(top_builddir)/bin/autom4te): New dependency. 2007-05-21 Paul Eggert * lib/autoconf/c.m4 (AC_OPENMP): Don't echo --enable-openmp choice, since that's what we do with --enable-largefile etc. Redo indenting and assignments to simplify things a bit, and make the parens work with Emacs. * doc/autoconf.texi (Generic Compiler Characteristics): Fix typo in my previous change: AC_C_OPENMP -> AC_OPENMP. Reported by Bruno Haible. 2007-05-21 Noah Misch * lib/autoconf/c.m4 (AC_OPENMP): Simplify use of AC_ARG_ENABLE. * tests/local.at (AT_CHECK_ENV): Exempt OPENMP_CFLAGS. 2007-05-21 Bruno Haible * NEWS: Rename AC_C_OPENMP to AC_OPENMP. * lib/autoconf/c.m4 (AC_OPENMP): Renamed from AC_C_OPENMP. * doc/autoconf.texi (Generic Compiler Characteristics): Move renamed AC_OPENMP documentation here, from "C compiler". Mention C++ and Fortran. 2007-05-21 Paul Eggert * doc/autoconf.texi (C Compiler): Tweak OpenMP documentation a bit. 2007-05-21 Bruno Haible * NEWS: Mention AC_C_OPENMP. * lib/autoconf/c.m4 (AC_C_OPENMP): New macro. * doc/autoconf.texi (C Compiler): Document AC_C_OPENMP. Based in part on Steven G. Johnson's investigations for the AX_OPENMP macro in the Autoconf macro archive. 2007-05-17 Ralf Wildenhues * bin/autom4te.in: Fix typos. 2007-05-16 Noah Misch * bin/autoconf.as: Handle `-' just like other input files. * bin/autom4te.in (parse_args): Pass `-' through. (handle_output): Skip the forbidden token search if we read from stdin. (up_to_date): Always treat stdin as out of date. * tests/tools.at (autoconf: input from stdin): New test. (autoconf: forbidden tokens, basic): Check a second `autoconf' run. 2007-05-16 Stepan Kasal * tests/foreign.at tests/semantics.at, tests/tools.at: Remove parameters for AT_CLEANUP. * tests/local.at (AT_CHECK_AU_MACRO): Likewise. 2007-05-14 Paul Eggert * NEWS: Document that AC_C_RESTRICT checks 'restrict' last. * doc/autoconf.texi (C Compiler): Likewise. 2007-05-14 Noah Misch * lib/autoconf/c.m4 (AC_C_RESTRICT): Check `restrict' last. 2007-05-09 Stepan Kasal * doc/autoconf.texi: Direntry for "autoconf Invocation" renamed to "autoconf-invocation" * doc/autoconf.texi (Caching Results): The CACHE-ID variable in the examples should not use the internal "ac_" prefix. 2007-05-05 Noah Misch * lib/autotest/general.m4 (_AT_NORMALIZE_TEST_GROUP_NUMBER): Use `eval'. * doc/autoconf.texi ($@, case): Document Zsh limitations. 2007-05-03 Stepan Kasal * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Put a.out first. Reorganize the comments before and in the macro. 2007-05-02 Stepan Kasal * lib/autoconf/lang.m4, lib/autoconf/c.m4, lib/autoconf/fortran.m4, lib/autoconf/erlang.m4: Cleanup of section titles and other comments; no code change. 2007-05-01 Kevin Ryde * doc/autoconf.texi (Particular Programs): Typo @acindex{AC_PROG_MKDIR_P} shouldn't have "AC" in that call. 2007-04-30 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_SPY): Don't imply that 'configure' will fail if the shell lacks proper support for shell functions. Suggested by RMS. 2007-04-29 Paul Eggert * doc/autoconf.texi (Limitations of Builtins): Correct the warning about Solaris /bin/printf '%010000x' 123. Problem reported by Bruno Haible. 2007-04-28 Paul Eggert * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Don't look for a.* when searching for executables, as this prevents users from having files like a.c. Problem reported by Ralf Wildenhues in: http://lists.gnu.org/archive/html/autoconf-patches/2007-04/msg00029.html This fixes a problem introduced on 2000-12-19. 2007-04-26 Paul Eggert * doc/autoconf.texi (Limitations of Builtins): Warn about Solaris /bin/printf '%010000x' 123. Problem reported by Arto C. Nirkko via Bruno Haible. 2007-04-12 Paul Eggert * NEWS: Document recent changes to AC_CHECK_ALIGNOF, AC_CHECK_SIZEOF, AC_CHECK_TYPE, AC_CHECK_TYPES. * doc/autoconf.texi (Generic types): C types must be type-names (the C terminology), not type-ids (the C++ term). C++ types must not be anonymous. * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW): Remove special case for C++; this drops support for anonymous struct and union types, which were problematic anyway. * tests/semantics.at (AC_CHECK_HEADERS_NEW): Adjust test to work even for C++. 2007-04-12 Jim Meyering * doc/autoconf.texi (Libraries): Typo fix: insert missing "in". 2007-04-12 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_LINK): Fix AC_CONFIG_LINKS to prefer a link source from the build tree, if it exists. Report by Pallav Gupta . 2007-04-11 Paul Eggert * doc/autoconf.texi (Generic Types): Document the restrictions on types imposed by AC_CHECK_TYPE, AC_CHECK_TYPES. (Generic Compiler Characteristics): AC_CHECK_SIZEOF now works with objects too. Document the restrictions on its use. Document the restrictions on AC_CHECK_ALIGNOF's type argument. * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW): For C, just try sizeof (TYPE) and sizeof ((TYPE)); if the former works but the latter doesn't, then it's a valid type. This lets people use function types and so forth. For C++ there doesn't seem to be a simple solution, so leave it alone. (AC_CHECK_SIZEOF): Allow argument to be a variable. (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF): Don't bother to invoke AC_CHECK_TYPE; that wasn't documented or necessary. 2007-04-11 Stepan Kasal * lib/autoconf/general.m4 (_AC_LINK_IFELSE): Skip AS_TEST_X when cross-compiling. 2007-04-11 Stepan Kasal * doc/autoconf.texi (External Software): Fix a typo in the previous change. 2007-04-11 Ralf Wildenhues * doc/autoconf.texi (External Software, Package Options): Fix ambiguous wording. Report by Reuben Thomas . 2007-04-06 Paul Eggert * doc/autoconf.texi (Particular Types): AC_C_LONG_DOUBLE is now obsolescent. Suggested by Bruno Haible. * NEWS: Document this. 2007-03-29 Paul Eggert * doc/autoconf.texi (Here-Documents, Limitations of Builtins): (Limitations of Usual Tools): Don't say "older" if Solaris 10 by default still has the problem. Problem reported by Bruce Korb. 2007-03-28 Stepan Kasal and Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix a comment in the generated config.status. 2007-03-27 Stepan Kasal * lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Update comment. 2007-03-26 Paul Eggert * doc/autoconf.texi (Shellology): Rework treatment of the 'test' command and case statements to make it a bit clearer and describe more pitfalls. 2007-03-23 Paul Eggert * doc/autoconf.texi (C Compiler): Mention that AC_PROG_CC_C99 also checks for unsigned long long int. 2007-03-19 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Warn about other nonstandard grep R.E. escape sequences. 2007-03-17 Jim Meyering * doc/autoconf.texi: Adjust grammar around use of "heuristics". (Limitations of Usual Tools): Also list \< and \>, and mention that HP-UX's grep, like the one from Solaris, does not support that syntax. 2007-03-09 Stepan Kasal * doc/autoconf.texi (Specifying Names): `--host' does not change the build type. 2007-03-05 Paul Eggert * doc/autoconf.texi (C Compiler): Warn that AC_C_BIGENDIAN suggests AC_CONFIG_HEADERS. * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Warn if not using AC_CONFIG_HEADERS. Problem reported by Peter O'Gorman. 2007-02-28 Paul Eggert * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Fix typo "__LITLE_ENDIAN__". Problem reported by Paolo Bonzini in: http://lists.gnu.org/archive/html/autoconf-patches/2007-02/msg00024.html * tests/semantics.at (AC_C_BIGENDIAN): Don't reject hosts that have universal binaries. Problem reported by Elias Pipping. 2007-02-27 Paul Eggert * NEWS: AC_C_BIGENDIAN now supports universal binaries a la Mac OS X. * doc/autoconf.texi (C Compiler): Document this. There is a new extra argument ACTION-IF-UNIVERSAL. * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Implement this. Add support for Solaris-style _LITTLE_ENDIAN and _BIG_ENDIAN. Reindent for sanity's sake. 2007-02-24 Eric Blake * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Update copyright. * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Likewise. * lib/autotest/general.m4 (AT_INIT): Likewise. (_AT_DECIDE_TRACEABLE): Fix syntax highlighting. 2007-02-13 Ralf Wildenhues * lib/autotest/general.m4 (AT_INIT): With --clean, return exit status of rm so we know when it failed. If cleaning of test dir failed before running the test, warn. Output the line separator in verbose mode before the warning to make clear the warning belongs to the following test. 2007-02-08 Paul Eggert * doc/autoconf.texi (Parentheses): Mention problem with (( in shells. 2007-02-07 Ralf Wildenhues and Paul Eggert * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix quoting errors introduced in last change. 2007-02-07 Paul Eggert * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Prefer \r to an actual carriage return. Use "ac_cr" to contain the actual carriage return. * doc/autoconf.texi (Limitations of Usual Tools): Document problem with traditional Awk and begin. * tests/torture.at (Limitations of Builtins): Document the problem with Bash 2.03 printf. (Substitute and define special characters): Remove trailing white space. Work around a bug in Solaris 8 /bin/bash. 2007-02-06 Ralf Menzel (tiny change) * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Redirect input from /dev/null in awk test, so even Solaris /usr/bin/awk will not wait for input with a script containing only a BEGIN rule. 2007-02-03 Paul Eggert * doc/autoconf.texi (Introduction, Why GNU M4): Clarify M4 version requirements. * README: Likewise. 2007-02-02 Eric Blake * NEWS: Update copyright. * m4/m4.m4 (AC_PROG_GNU_M4): Reject M4 1.4 through 1.4.4 as broken. * configure.ac: Update error message. * NEWS: Note that M4 1.4.5 or later is now a hard dependency. Reported by Gary Vaughan and Jim Meyering, and problem analyzed by Stepan Kasal: http://lists.gnu.org/archive/html/bug-autoconf/2006-11/msg00025.html 2007-01-31 Eric Blake * THANKS (people): Update. 2007-01-28 Paul Eggert * doc/autoconf.texi (Shellology): pdksh 5.2.14 is still the latest version. (Shell Substitutions): Note problems with @{var:=value} etc. Add a new section for problems with @{#var} etc. Problem noted by Ralf Wildenhues. See: http://lists.gnu.org/archive/html/libtool-patches/2005-01/msg00157.html 2007-01-23 Ralf Wildenhues * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Also AC_SUBST([MKDIR_P]), so that Automake < 1.10 will pick up its trace, if a package uses AC_PROG_MKDIR_P explicitly. The actual substitution will still be done by the special code. Report by Jim Meyering. * doc/autoconf.texi (File System Conventions): Mention that $PATH_SEPARATOR is for the build system only. Report by Keith Marshall. 2007-01-19 Ralf Wildenhues * doc/autoconf.texi (Setting Output Variables): Mention that all non-NUL characters are ok in substituted values. * lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): Fix comment typo. (_AC_OUTPUT_FILES_PREPARE): Test and use backslash escaping of carriage return for $AWK, needed for BSD awk. * tests/torture.at (Substitute and define special characters): Test all 8 bit non-NUL characters. Report against Automake by Patrick Welche. 2007-01-15 Stepan Kasal * doc/autoconf.texi: Direntry for "autoconf Invocation" renamed. 2007-01-11 Ralf Wildenhues * lib/autoconf/programs.m4 (AC_PROG_SED): When closing a pipe early on the reader side, drop stderr of the input to avoid `broken pipe' error output; this may happen even with shell builtin `echo' of some bash versions. Reports by Ian Macdonald and Sam Sexton . 2007-01-10 Ralf Wildenhues * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Use newlines to separate items of `ac_user_opts', to avoid long lines. (_AC_INIT_PARSE_ENABLE2, _AC_ENABLE_IF_ACTION): Adjust. 2007-01-08 Ralf Wildenhues * doc/autoconf.texi: Fix some typos. 2007-01-05 Paul Eggert Fix some wording problems noted by Paolo Bonzini in: http://lists.gnu.org/archive/html/autoconf-patches/2007-01/msg00077.html * doc/autoconf.texi (Signed Overflow Examples): Give more discussion about the allow_superuser_privileges example, and change it a bit to make things clearer. (Optimization and Wraparound): Clarify whether the compiler will generate an infinite loop for the example derived from Autoconf's mktime test. (Signed Overflow Advice): Say that -ftrapv is meant for debugging. Also, clarify unsigned multiplication overflow. 2007-01-04 Eric Blake * bin/Makefile.am (RELEASE_YEAR): New macro. (edit): Use it to supply correct copyright year to scripts. * bin/autoconf.as (version): Use it. * bin/autoheader.in ($version): Likewise. * bin/autom4te.in ($version): Likewise. * bin/autoreconf.in ($version): Likewise. * bin/autoscan.in ($version): Likewise. * bin/autoupdate.in ($version): Likewise. * bin/ifnames.in ($version): Likewise. 2007-01-02 Paul Eggert * doc/autoconf.texi (Integer Overflow): Revised based on today's feedback. The most important changes document what happens when you convert an out-of-range value to a signed integer type, and say that (sum < a) != (b < 0) reliably detects overflow when sum = a + b. * doc/autoconf.texi (Integer Overflow): Greatly expand and rewrite, taking notions from the recent discussion on the gcc and autoconf mailing lists; please see http://lists.gnu.org/archive/html/autoconf-patches/2006-12/msg00091.html and follow the many links. (Integer Overflow Basics, Signed Overflow Examples): (Optimization and Wraparound, Signed Overflow Advice): (Signed Integer Division): New sections. 2006-12-28 Steven G. Johnson * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Don't include preprocessor macro arguments in traced name. * doc/autoconf.texi (Defining symbols): Document longstanding support for AC_DEFINE-ing macros with arguments, and document behavior when the same variable has multiple AC_DEFINEs. * lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Revert to the old implementation which AC_DEFINEs the FC_FUNC and FC_FUNC_ macros directly, giving much shorter and simpler code. 2006-12-28 Malcolm Purvis (trivial change) * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Insert a space before "$ac_configure_args" to prevent a 'config.status --recheck' failure if ac_configure_args doesn't contain a leading space. This works around a problem with the XEmacs configure.ac, which uses the (undocumented) ac_configure_args variable inconsistently with Autoconf. 2006-12-22 Paul Eggert * lib/autoconf/functions.m4 (AC_FUNC_MKTIME): Include , and use its INT_MAX to rewrite the j loop so that it does not overflow 'int'. Problem reported by Ralf Wildenhues in . Play it safe by shifting left by 1 rather than multiplying by 2, as GCC is less likely to optimize this away when the value is signed (when it assumes overflow leads to undefined behavior). Also, don't assume time_t uses two's complement. 2006-12-20 Ralf Wildenhues * tests/torture.at (Substitute a 2000-byte string): Avoid using a 10kB long (multi-line) string literal, OpenServer 5.0.7 ksh dumps core on it. Report by Tim Rice. 2006-12-18 Steven G. Johnson * lib/autoconf/general.m4 (AC_ARG_ENABLE): Print help about --disable-option-checking to --help output even when AC_PRESERVE_HELP_ORDER is not used. (_AC_INIT_PARSE_ENABLE2): Print warnings using actual --enable or --with argument, rather than argument with [-.] replaced by underscores. * NEWS: Fix typo in previous change; the news was in the wrong section. 2006-12-18 Paul Eggert * NEWS: Warnings are now generated by default for unknown --enable-* and --with-* options. * doc/autoconf.texi (Option Checking): Renamed from (Configure Option Checking). Tighten up the wording a bit. (External Software, Package Options): Cross-reference to Option Checking, and use this to shorten our section. * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Prefer test -n "$x" to test "x$foo" != x. * lib/autoconf/status.m4 (AC_OUTPUT): Likewise. Don't warn if $enable_option_checking is "no". * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Initialize ac_unrecognized_opts to the empty string. Don't echo the unrecognized opts, as this might mishandle backslashes or leading -. (AC_PRESERVE_HELP_ORDER): Put the --disable-option-checking usage next to the other --disable-FEATURE options in the help string. 2006-12-18 Steven G. Johnson * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS): (_AC_INIT_PARSE_ENABLE2, _AC_INIT_HELP, _AC_ENABLE_IF): Print warning for unrecognized --with and --enable options (AC_DISABLE_OPTION_CHECKING): New macro to disable warnings. * lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS, _AC_OUTPUT_SUBDIRS): Disable option checking when subdirs are configured. (AC_OUTPUT): If warnings are enabled, print warning about unrecognized --with and --enable options at the end of the configure output (as well as at the beginning). * doc/autoconf.texi (Option Checking): New node. Document new option warning functionality. 2006-12-16 Eric Blake * configure.ac (AC_INIT): Bump version, since 2.61a is released. * NEWS: Start news for current version. 2006-12-15 Paul Eggert * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Define HAVE_GETMNTENT to 1, not to the empty string. Problem originally reported by Jochen Friedrich in . This change prompted by a problem report by Andrey Simonenko in . * doc/autoconf.texi (Defining Symbols): AC_DEFINE works for object-like macros only, in the traditional portable character set. * lib/autoconf/general.m4 (AC_DEFINE_TRACE_LITERAL): Warn about attempts to define things that are not identifiers. * lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Rewrite to avoid awful hack that AC_DEFINEd macro names containing parentheses. 2006-12-12 Paul Eggert * doc/autoconf.texi: Undo some of the 2006-12-10 change. It was too drastic, even if Texinfo in theory requires it for info mode. (config.status Invocation): Renamed back from Recreating a Configuration). (Obsolete config.status Use): Renamed back from Obsolete Recreation. (Autoconf 2.13): Renamed back from 20th-century Autoconf 2. 2006-12-11 Paul Eggert * NEWS: Version 2.61a. 2006-12-11 Paul Eggert and Ralf Wildenhues * NEWS: Document changes with echo and printf, and the lack of limits on the total size of multi-line values of substituted variables, and the AC_FUNC_FSEEKO fix. 2006-12-10 Paul Eggert * doc/autoconf.texi (Writing Autoconf Input): Renamed from Writing configure.ac. (Autoconf Input Layout): Renamed from configure.ac Layout. (Recreating a Configuration): Renamed from config.status Invocation. (Obsolete Recreation): Renamed from Obsolete config.status Use. (acconfig Header): Renamed from acconfig.h. (20th-century Autoconf 2): Renamed from Autoconf 2.13. (Writing Testsuites): Renamed from Writing testsuite.at. (Autom4te Cache): Renamed from autom4te.cache. * BUGS: Remove mention of VPATH problem, since it's now documented not to be a bug in the Autoconf build procedure itself, but rather a problem with the proprietary `make' programs. * doc/autoconf.texi (Build Directories): Add a cross reference to VPATH and Make. * build-aux/config.guess, build-aux/config.sub, build-aux/texinfo.tex: * doc/standards.texi: Sync from gnulib. * man/autoconf.1, man/autoheader.1, man/autom4te.1, man/autoreconf.1: * man/autoscan.1, man/autoupdate.1, man/config.guess.1: * man/config.sub.1, man/ifnames.1: Remove from CVS, since they're generated automatically. 2006-12-06 Paul Eggert * lib/autoconf/c.m4 (_AC_PROG_CC_C89): Also try -xc99=all, for Sun C 5.8 on Solaris 10. Using -xc99=all rather than -xc99 bypasses the buggy -xc99 option of Forte Developer 7 C on Solaris 9. 2006-12-07 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Drop the `CEOF$ac_eof' special marker, the awk script cannot contain a line matching `^CEOF', so this is not needed any more. * tests/torture.at (Substitute a newline): Expose the `%!_!# ' special marker in the test. 2006-12-06 Stepan Kasal * tests/tools.at (autom4te preselections): Use `find -newer'; remove one of the sleeps. * lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE): Make it more readable, using ... (_AC_INIT_PARSE_ENABLE2): ... this new helper macro. * doc/autoconf.texi (autoheader Invocation): Do not double- quote the parameter of `AH_BOTTOM' in the example. 2006-12-05 Stepan Kasal * doc/autoconf.texi (Configuration Headers): Remove the example with multiple input files. (autoheader Invocation): Encourage `AH_BOTTOM', discouraging multiple input files. 2006-12-05 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): When creating the awk substitution script, handle one input line at a time, so that the maximum length of a substituted (multi-line) value is not limited by the size of the sed pattern space. The trade-off is a slightly repetitive sed script. * doc/autoconf.texi (Limitations of Usual Tools): Branch labels can only have up to 7 characters, due to Solaris 10 /bin/sed. * tests/torture.at (Substitute a 2000-byte string): Increase the test with several long lines, they should not be caught by sed limits any more. * tests/tools.at (autom4te preselections): New test, to flag entries missing from autom4te.cfg. Report by David Byron . * tests/torture.at (Substitute a 2000-byte string): Actually use AC_PROG_AWK, so the last change works as intended. (Substitute and define special characters): Likewise. (Substitute a newline): Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Use `$AWK' instead of `awk' consistently. (_AC_OUTPUT_CONFIG_STATUS): Initialize $AWK. * tests/torture.at (Torturing config.status): Test both the result of AC_PROG_AWK and plain awk. (Substitute a 2000-byte string): Likewise. (Substitute and define special characters): Likewise. (Substitute a newline): Likewise. 2006-12-04 Paul Eggert * lib/autoconf/functions.m4 (AC_FUNC_FSEEKO): Check that fseeko can be assigned to a function pointer. Problem reported by Peter Palfrader in . Based on part of a patch by Ralf Wildenhues in that same bug report. 2006-12-01 Paul Eggert * tests/mktests.sh (ac_exclude_list): Exclude AC_FUNC_SETVBUF_REVERSED. * tests/semantics.at (AC_FUNC_SETVBUF_REVERSED): New test. 2006-12-01 Eric Blake * lib/autoconf/c.m4 (AC_LANG_INT_SAVE): Avoid newline, to aid in cross-compiling from cygwin to mingw. Reported by Bob Rossi. This resurrects the 2000-11-30 patch to aclang.m4, which was mistakenly removed in the 2001-09-17 patch to lib/autoconf/c.m4. 2006-12-01 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Use a longer test string for more reliable failure. Wrap the entire test that causes the broken Solaris printf to dump core, in a subshell, so the segmentation fault message is reliably suppressed. Fix shell expansion errors by using /usr/ucb/echo always; avoid an error on systems without it by another subshell. Avoid m4 expansion of `$1'. Set the zeroth argument of the subshell-$as_echo to `as_echo', for better error message. 2006-11-28 Ralf Wildenhues * lib/autoconf/general.m4 (_AC_CACHE_DUMP): If `BASH_ARGV' or `BASH_SOURCE' contain a newline, set them to empty, as they may not be unset. 2006-11-27 Paul Eggert Turn AC_FUNC_SETVBUF_REVERSED into a noop. It's been obsolete for years and is too hard to maintain now. The last straw was reported by Jerker Baeck in . * NEWS: AC_FUNC_SETVBUF_REVERSED is now obsolete. * doc/autoconf.texi (Particular Functions): Move AC_FUNC_SETVBUF_REVERSED from here... (Obsolete Macros): ... to here. Say that it does nothing now. * lib/autoconf/functions.m4 (AC_FUNC_SETVBUF_REVERSED): Turn into (almost) a no-op. * lib/autoconf/c.m4 (AC_PROG_GCC_TRADITIONAL, AC_C_CONST): (AC_C_VOLATILE): Do not recommend via AN_FUNCTION, AN_IDENTIFIER, or AN_HEADER. These macros are obsolescent and new applications shouldn't need them. * lib/autoconf/functions.m4 (AC_FUNC_CLOSEDIR_VOID, AC_REPLACE_FNMATCH): (AC_FUNC_GETLOADAVG, AC_FUNC_GETPGRP, AC_FUNC_MEMCMP): (AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP, AC_FUNC_STAT, AC_FUNC_LSTAT): (AC_FUNC_STRFTIME, AC_FUNC_SETVBUF_REVERSED, AC_FUNC_UTIME_NULL): (AC_FUNC_VPRINTF): Likewise. * lib/autoconf/headers.m4 (AC_HEADER_DIRENT, AC_HEADER_STAT): (AC_HEADER_STDC, AC_HEADER_SYS_WAIT, AC_HEADER_TIME): Likewise. * lib/autoconf/types.m4 (AC_STRUCT_TM): Likewise. * doc/autoconf.texi (Setting Output Variables): Mention that @VAR1@VAR2 has unspecified behavior. Problem reported by Ralf Wildenhues. * NEWS: Mention this. * Makefile.am: Put only a single '#' into the copyright notice, so that it's also present in the output file. Standardize wording in makefile copyright notices to match GNU coding standards. * bin/Makefile.am: Likewise. * doc/Makefile.am: Likewise. * lib/Makefile.am: Likewise. * lib/freeze.mk: Likewise. * lib/autoconf/Makefile.am: Likewise. * lib/autoscan/Makefile.am: Likewise. * lib/autotest/Makefile.am: Likewise. * lib/m4sugar/Makefile.am: Likewise. * man/Makefile.am: Likewise. * tests/Makefile.am: Likewise. * lib/emacs/Makefile.am: Remove copyright notice; it's just a one-line file. 2006-11-27 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix error in the sed script that mangles the awk script: delete up to the first exclamation mark only. * tests/torture.at (Substitute and define special characters): Test '!' too. 2006-11-26 Ralf Wildenhues Rewrite config files generation: avoid quadratic growth in the number of substituted variables by using awk instead of sed for the bulk of the substitutions. * NEWS: Mention this. * doc/autoconf.texi (Setting Output Variables): `|#_!!_#|' is also forbidden in the output (and thus input) file. * lib/autoconf/status.m4 (_AC_AWK_LITERAL_LIMIT): New macro. (_AC_OUTPUT_FILES_PREPARE): Instead of several sed scripts, generate just one large awk script for substitutions, eliminating much of the earlier complexity, while adding some new complexity. Only expand the substitution templates at configure time, for smaller configure script size. If _AC_SUBST_FILES are used, test 'awk' for working getline support at config.status time. If absent, interpolate through the shell. The awk script was written with much help from Paolo Bonzini and Paul Eggert. (_AC_SED_CMD_NUM, _AC_SED_DELIM_NUM, _AC_SED_FRAG): Removed. (_AC_SED_FRAG_NUM): Likewise. (_AC_SUBST_CMDS): Renamed from... (_AC_SED_CMDS): ...this. (_AC_OUTPUT_FILE): Use _AC_SUBST_CMDS. * tests/torture.at (Substitute a 2000-byte string): Also substitute a line with 1000 words, and a variable with several long lines. (Substitute and define special characters): Test awk special characters, and put substitution input strings `@foo@' in the output, to test that no recursion happens; test several other combinations from Paolo Bonzini. 2006-11-25 Paul Eggert * lib/autotest/general.m4 (AT_INIT): Undo recent changes that replaced echo with AS_ECHO where this wasn't necessary. Problem reportd by Ralf Wildenhues. * lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Port to Solaris 7, where "/usr/bin/printf '%s\n' S" dumps core if S is long. This is Sun bug 4206210. Problem reportd by Ralf Wildenhues. 2006-11-24 Ralf Wildenhues * lib/freeze.mk (GREP): Removed, no need to initialize this. 2006-11-21 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Don't claim that traditional Awk lacks 3-arg "split". It has it. Mention that FS must be a single character, and a few other 99-byte limits of traditional Awk. Mention that if (i in a) doesn't work with traditional Awk. 2006-11-18 Paul Eggert * tests/autotest.at (BSx641-newline in command): (BS-BS-newline in command, BSx640-newline in command): (Newline-CODE-BS-newline in command): (Single-quote-BS-newline in command): (Single-quote-newline-BS-newline in command): Use printf '%s\n' instead of echo, for portability to hosts where echo interprets backslashes. This will break on hosts that lack printf, but for now let's assume all such hosts are dead (if not, we should get reports of test failures). 2006-11-17 Paul Eggert 'echo' has some portability problems, when given a first argument with a leading '-', or when given any argument containing '\'. Avoid using 'echo' in these cases. * bin/Makefile.am $(bin_SCRIPTS): Rewrite to avoid 'echo' entirely. * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Likewise. * lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise. * lib/autotest/general.m4 (AT_INIT): Likewise. * bin/autoconf.as: Use AS_ECHO rather than plain echo, when the argument might be unportable. * lib/autoconf/c.m4 (AC_PROG_CC_C_O): Likewise. * lib/autoconf/erlang.m4 (AC_LANG(Erlang)): Likewise. * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): (_AC_FC_LIBRARY_LDFLAGS): Likewise. * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Likewise. * lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE, _AC_INIT_PREPARE): (_AC_ARG_VAR_VALIDATE, AC_ARG_PROGRAM, _AC_MSG_LOG_CONFTEST): (AC_RUN_LOG, _AC_RUN_IFELSE, _AC_LIBOBJS_NORMALIZE): Likewise. * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Likewise. * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Likewise. * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): (AC_PROG_MAKE_SET): Likewise. * lib/autoconf/status.m4 (_AC_SRCDIRS, _AC_OUTPUT_HEADER): (_AC_OUTPUT_SUBDIRS, _AC_OUTPUT_CONFIG_STATUS): Likewise. * lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT, AT_INIT): (AT_CLEANUP, _AT_DECIDE_TRACEABLE, _AT_CHECK): Likewise. * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE, _AS_ECHO_UNQUOTED): (_AS_BASENAME_SED, _AS_DIRNAME_SED, AS_MKDIR_P, AS_TMPDIR, AS_UNAME): (AS_TR_SH, AS_TR_CPP, AS_VAR_GET): Likewise. * bin/autoconf.as: Redo verbose flag implementation, as the old scheme wouldn't work with AS_ECHO. * lib/autotest/general.m4 (AT_INIT): Likewise. * lib/autoconf/general.m4 (AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED): Don't use ECHO_T, since ECHO_N is now reliable. * lib/autotest/general.m4 (AT_INIT): Likewise. * lib/autoconf/general.m4 (AC_ARG_PROGRAM): Use sed "$script" rather than using a here-document to put the script into a file. (_AC_DO_ECHO): Hoist the eval out of the echo, so that we can use AS_ECHO. * lib/m4sugar/m4sh.m4 (AS_VAR_GET): Likewise. * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Use AS_ECHO_N rather than ECHO_N and ECHO_C. This doesn't fix any bug, but we might as well stop using ECHO_N and ECHO_C internally. * lib/autotest/general.m4 (AT_SETUP): Likewise. * lib/m4sugar/m4sh.m4 (_AS_ECHO_N): Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): (_AC_OUTPUT_MAIN_LOOP): Rework echo so that it has just one operand, as AS_ECHO requires. Avoid double file name expansion. * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Invoke _AS_ECHO_PREPARE. Don't set as_nl, since _AS_ECHO_PREPARE does that now. (_AS_PREPARE): Comment that _AS_ECHO_N_PREPARE is just for user code. (AS_ECHO, AS_ECHO_N, _AS_ECHO_PREPARE): New macros. * tests/c.at (AC_PROG_CPP without warnings, AC_PROG_CPP via CC): Double-quote strings that would otherwise contain M4 comments. * tests/m4sh.at (AS_ECHO and AS_ECHO_N): New test. * configure.ac (AC_INIT): Bump to 2.61a. * NEWS: Likewise. 2006-11-17 Paul Eggert Version 2.61. * configure.ac (AC_INIT): Bump to 2.61. * NEWS: Likewise. * tests/autotest.at (Macro with backslash in a test title): Comment out for now, as this tests neither fails nor passes reliably. Problem reported by Ralf Wildenhues. 2006-11-16 Paul Eggert * lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE): Fix some typos in previous change, which caused test failures. 2006-11-16 Stepan Kasal * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Factor out code for --enable, --disable, --with, and --without to... (_AC_INIT_PARSE_ENABLE): ... a new macro. * doc/autoconf.texi (Package Options): * NEWS: Document that AC_ARG_ENABLE allows dots, too. 2006-11-16 Paul Eggert Import these changes from config via gnulib: 2006-11-15 Ben Elliston From Josselin Mouette : * build-aux/config.guess (SX-8:SUPER-UX:*:*): New. 2006-11-08 Ben Elliston * build-aux/config.guess (authenticamd:Interix*:[3456]*): Another AMD64. 2006-11-07 Steve Woodford Ben Elliston * build-aux/config.guess (*:NetBSD:*:*): Handle sh5el arch. * build-aux/config.sub (sh5el): New basic_machine. Import this change from coreutils: 2006-02-13 Jim Meyering * GNUmakefile (all): Emit diagnostics to stderr, not stdout. Import this change from gnustandards via gnulib: 2006-11-15 Karl Berry * standards.texi: core -> memory, throughout. (CPU Portability): show correct example of calling write on a char value; thanks to Paul Eggert for the code. Both of these suggestions from Eugene Y. Vasserman. Import these changes from texinfo via gnulib: 2006-11-08 Karl Berry * build-aux/texinfo.tex (\dopdfimage): look for png, jpg/jpeg/JPG, and as well as pdf images, since they are supported in pdftex with no further ado. 2006-11-05 Karl Berry * doc/texinfo.tex (Image Syntax): don't mention GIF any more. 2006-11-13 Paul Eggert * NEWS: Document the AC_ARG_WITH change. 2006-11-13 Bruno Haible * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): For --with, --without options, transliterate also dots to underscores. (_AC_ENABLE_IF): Transliterate also dots to underscores. * doc/autoconf.texi (External Software): Document that AC_ARG_WITH's first argument may also contain dots. 2006-11-09 Paul Eggert * tests/mktests.sh (ac_exclude_list): Exclude AC_PROG_CXX_C_O, for benefit of platforms like Solaris+GCC where it is common to have a non-working g++ installation. 2006-11-08 Ralf Wildenhues and Joel E. Denny and Paul Eggert * tests/autotest.at (AT_CHECK_AT_TITLE): Fix shell quoting bugs and non-portable sed scripts, and use $CONFIG_SHELL when invoking ./micro-suite. 2006-11-08 Paul Eggert * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int to 'yes' instead of 'cross-compiling'. Imported from a similar patch to gnulib by Bruno Haible. 2006-11-08 Paul Eggert * NEWS: New macros AC_C_FLEXIBLE_ARRAY_MEMBER, AC_C_VARARRAYS. * doc/autoconf.texi (C Compiler): Document them. * lib/autoconf/c.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER, AC_C_VARARRAYS): New macros, taken from gnulib. 2006-11-07 Paul Eggert * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by Matthew Woehlke. 2006-10-28 Ralf Wildenhues * tests/torture.at (Configuring subdirectories): Do not skip Automake 1.10 nor future Automake 11.1 (sic). 2006-10-26 Joel E. Denny and Stepan Kasal Handle special characters in test case titles correctly. * lib/autotest/general.m4 (AT_INIT): M4-quote and AS_ESCAPE AT_help_all properly. (AT_SETUP): M4-quote and AS_ESCAPE the title properly everywhere. * tests/autotest.at (AT_CHECK_AT_TITLE): Add EXPANDED-TITLE-TO-TEST argument. Extend to check titles printed by ./micro-suite and ./micro-suite -l and the title in micro-suite.log. (Backquote in a test title, Single-quote in a test title, Double-quote in a test title): Don't expect failure anymore. (Backslash in a test title): Put a non-whitespace character after the backslash so that Bourne shells might actually see it as an escape sequence. (Brackets in a test title, Pound in a test title, Comma in a test title, Quoted Macro in a test title, Macro in a test title, Macro with single-quote in a test title): New tests. (Macro with backquote in a test title, Macro with double-quote in a test title, Macro with backslash in a test title): New tests expected to fail. * tests/torture.at (#define header templates): M4-quote this title in AT_SETUP call so that no M4 code is commented inadvertently somewhere. The visible effect was a stray [] in the testsuite output. 2006-10-27 Ralf Wildenhues * doc/autoconf.texi (Limitations of Builtins): Do not invoke `trap ... 0' inside a function, for AIX sh. 2006-10-26 Paul Eggert * tests/base.at (AC_COMPUTE_INT): Test **0** rather than 1 / 0, since powerpc-apple-darwin8-gcc-4.0.1 (Apple Computer, Inc. build 5363) simply issues a warning when dividing by zero at compile time. Problem reported by Elias Pipping. 2006-10-26 Eric Blake * THANKS: Update. * doc/autoconf.texi (Evaluation Macros): Improve the example to show effect on macros that expand with commas. Reported by Joel E. Denny. * tests/m4sugar.at (m4_warn, m4_require: circular dependencies): Also work with M4 1.4.8. 2006-10-25 Paul Eggert * doc/autoconf.texi (Slashes): Document Tru64 4.0 bug reported by Jim Meyering. 2006-10-25 Stepan Kasal * tests/tools.at (autom4te --force): New test, verifies that `--force' always rewrites the output file. 2006-10-24 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Document that rm needs operands on NetBSD 2.0.2. Problem reported by Bruno Haible. 2006-10-24 Stepan Kasal * tools/trace.at (autoconf --trace: user macros): Test `$%'. 2006-10-24 Paul Eggert * lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): If FUNCTION-BODY is nonempty, use AC_LINK_IFELSE rather than AC_COMPILE_IFELSE, to work around problem with OSF/1 4.0F fseeko reported by Nelson H. F. Beebe for Coreutils 6.4. * tests/tools.at (autoconf --trace: user macros): Remove test for tracing multiline macros, since m4 1.4.7a uses a different way to number lines. Problem reported by Ralf Wildenhues. 2006-10-24 Stepan Kasal * bin/autom4te.in (handle_m4): Do not redirect stdin to /dev/null since the heuristics for interactive behaviour was fixed in CVS m4. * bin/autom4te.in: With --force, always refresh the output file. Problem reported by Greg Schafer . * bin/autoconf.as: Fix the verbose message at the end. 2006-10-23 Paul Eggert * configure.ac (AC_INIT): Bump to 2.60c. * NEWS: Likewise. 2006-10-22 Paul Eggert * NEWS: Version 2.60b. Import this change from Texinfo: 2006-10-15 Karl Berry * build-aux/texinfo.tex: automake 1.10 * NEWS: Remove AC_CACHE_CHECK_INT. * doc/autoconf.texi (Caching Results): Likewise. * lib/autoconf/general.m4 (_AC_CACHE_CHECK_INT): Renamed from AC_CACHE_CHECK_INT, since it's no longer public. * lib/autoconf/types.m4: All uses of AC_CACHE_CHECK_INT changed. * tests/base.at (AC_COMPUTE_INT): Test this, not AC_CACHE_CHECK_INT. 2006-10-20 Ralf Wildenhues * doc/autoconf.texi (Limitations of Usual Tools): Fix two typos. 2006-10-19 Eric Blake * lib/m4sugar/m4sugar.m4 (m4_mkstemp): New macro. (m4_maketemp): Avoid warnings with M4 1.9a. * lib/emacs/autoconf-mode.el (autoconf-font-lock-keywords): Color m4_mkstemp. * doc/autoconf.texi (Redefined M4 Macros): Document m4_mkstemp. * NEWS: Likewise. 2006-10-16 Eric Blake * doc/autoconf.texi (Setting Output Variables): Fix typo. * bin/autoconf.as (version): Reword to match GNU Coding Standards. * bin/autoheader.in (version): Likewise. * bin/autom4te.in (version): Likewise. * bin/autoreconf.in (version): Likewise. * bin/autoscan.in (version): Likewise. * bin/autoupdate.in (version): Likewise. * bin/ifnames.in (version): Likewise. 2006-10-14 Stepan Kasal * lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Expand $1 before looking for special shell characters. * lib/autoconf/functions.m4 (AC_CHECK_FUNC): Do not expand the macro defined by AS_VAR_PUSHDEF before passing it as a parameter. * lib/autoconf/general.m4 (AC_CHECK_FILE, AC_CHECK_DECL): * lib/autoconf/libs.m4 (AC_SEARCH_LIBS, AC_CHECK_LIB): * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, AC_CHECK_MEMBER): * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): (_AC_CHECK_HEADER_NEW, _AC_CHECK_HEADER_OLD, _AC_CHECK_HEADER_DIRENT): Likewise. * lib/autotest/general.m4 (AT_INIT): Quote parameters of AS_VAR_* properly. * tests/m4sh.at (AS_LITERAL_IF): New test. 2006-10-14 Paul Eggert (Imported from Automake.) * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m, which incorrectly sets the mode of an existing destination directory. In some cases the unpatched install-sh could do the equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD system. We hope this is rare in practice, but it's clearly worth fixing. Problem reported by Alex Unleashed in . Also, don't bother to check for -m bugs unless we're using -m; suggested by Stepan Kasal. 2006-10-14 Paul Eggert Import this change from Automake: 2006-08-23 Alexandre Duret-Lutz * lib/Autom4te/ChannelDefs.pm (usage): Mention that -Wportability is enabled by default with gnu and gnits strictness. Report from Bruno Haible. 2006-03-10 Alexandre Duret-Lutz * lib/Autom4te/ChannelDefs.pm: Make -Wportability the default in gnu and gnits modes. Import this change from Config: 2006-09-20 Ben Elliston * build-aux/config.sub (score, score-*): New. Import this change from Gnulib: 2006-09-16 Karl Berry * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec, to avoid sectioning errors. Import these changes from Texinfo: 2006-10-04 Karl Berry * build-aux/texinfo.tex (\singlequotechar): rename to \codequoteright. (\quoteexpand): rename to \rquoteexpand. (\codequoteleft): new def, to look for @set codequotebacktick. (\lquoteexpand, \quoteexpand): new defs. (\lquoteChar, \rquoteChar, \dashChar, \underChar: new \chardef's. (\code): must use new \...Char values, since now ` is active. 2006-08-26 Karl Berry * build-aux/texinfo.tex (\textdegree): New command. 2006-08-12 Karl Berry * build-aux/texinfo.tex (error \box0): smaller font. 2006-10-14 Ralf Wildenhues * doc/autoconf.texi (Autoheader Macros): Fix syntax error. 2006-10-13 Stepan Kasal * doc/autoconf.texi (Autoheader Macros): Warn that the text added to the template can get mangled. 2006-10-13 Ralf Wildenhues * lib/autoconf/functions.m4 (AC_FUNC_OBSTACK): In the test, include the default headers, and redefine obstack_chunk_alloc and obstack_chunk_free. Fixes false failure with glibc. 2006-10-12 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Set as_executable_p, for backward compatibility with Libtool 1.5.22. Problem reported by Ralf Wildenhues. 2006-10-12 Ralf Wildenhues * lib/autoconf/c.m4 (AC_PROG_GCC_TRADITIONAL): Require AC_PROG_CC. Report by IOhannes m zmoelnig . 2006-10-11 Paul Eggert * NEWS: AC_USE_SYSTEM_EXTENSIONS now defines _TANDEM_SOURCE for the NonStop platform. * doc/autoconf.texi (Posix Variants): Likewise. * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Likewise. * lib/m4sugar/m4sh.m4 (AS_TEST_X): New macro. (AS_EXECUTABLE_P): Use as_test_x rather than as_executable_p. (_AS_TEST_PREPARE): Set as_test_x rather than as_executable_p. Use a better substitute, by inspecting the output of "ls" rather than just using ":". * lib/autoconf/general.m4 (_AC_LINK_IFELSE): Use AS_TEST_X rather than AS_EXECUTABLE_P, since we needn't worry about non-regular files here. * NEWS: Autoconf-generated shell scripts no longer export BIN_SH, due to configuration hassles with this. See Tonya Underwood's report . * doc/autoconf.texi (Special Shell Variables): Likewise. 2006-10-11 Paul Eggert Stepan Kasal * lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Don't set BIN_SH. (_AS_DETECT_BETTER_SHELL): Don't look in /usr/bin/posix. 2006-10-11 Stepan Kasal * lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Move the initialization which is not inherited through the environment (_AS_BOURNE_COMPATIBLE): ... to this new macro. (_AS_RUN): Call _AS_BOURNE_COMPATIBLE, not AS_BOURNE_COMPATIBLE. 2006-10-09 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Describe problems with mkdir -p -m. 2006-10-06 Paul Eggert * lib/autoconf/c.m4 (_AC_PROG_PREPROC_WORKS_IFELSE): Remove comment about ac_cpp_err; it was incorrect, and anyway ac_cpp_err is being removed below. * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE): Don't set ac_cpp_err to 'yesyes' if preproc_warn_flag and werror_flag are both 'yes'. In fact, don't bother setting ac_cpp_err at all; nobody uses it. (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Don't log our funky tests with werror_flag and conftest.err and so forth. This is more compatible with how _AC_PROG_PREPROC_WORKS_IFELSE behaves, and anyway the user shouldn't normally want to see this gorp logged. Problem reported by Ralf Wildenhues. * lib/autoconf/lang.m4 (AC_LANG_WERROR): werror_flag's default is empty, not 'no', since the rest of the code uses 'test -z'. 2006-10-04 Paul Eggert * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Use a single call to AC_DO_TOKENS rather than multiple, for efficiency. (_AC_LINK_IFELSE): Test that resulting file is executable. Problem reported by mwoehlke in . * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Use "test -x /" rather than creating a file to use with test -x; this is much faster. 2006-10-02 Bruno Haible * lib/autom4te.in (Automake-preselections): Add AM_GNU_GETTEXT_INTL_SUBDIR, for automake 1.10. 2006-09-27 Stepan Kasal * doc/autoconf.texi (Writing testsuite.at): Fix a typo: for standard error, `experr' should be used, not `expout'. 2006-09-26 Paul Eggert * lib/autoconf/functions.m4 (AC_FUNC_FSEEKO): Don't compile the fseeko testing program twice; just use the earlier result. * lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): Set cache var to 'unknown' (not 'no') if leaving the macro unset still doesn't let the program compile. (AC_SYS_LARGEFILE): Test for _LARGE_FILES only if earlier tests failed. * lib/autoconf/functions.m4: Fix problems reported by Ralf Wildenhues. (AC_FUNC_ERROR_AT_LINE): Don't bother to check for error.h. Just include it, without including anything else. (AC_FUNC_FSEEKO): Avoid gcc -Wall warnings about constant expressions. (AC_FUNC_STRNLEN): Require AC_USE_SYSTEM_EXTENSIONS. 2006-09-26 Ralf Wildenhues * lib/autoconf/functions.m4 (AC_FUNC_ERROR_AT_LINE): Check for `error.h', and include it, for a `error_at_line' prototype. Use a nonempty format string in the link test. * lib/autoconf/functions.m4 (AC_FUNC_WAIT3): Include , for a declaration of wait3. 2006-09-26 Paul Eggert * NEWS: AC_CHECK_DECL now also works with aggregate objects. * doc/autoconf.texi (Generic Declarations): Clarify that AC_CHECK_DECL can apply to constants too, and that it checks for macro defns. * lib/autoconf/general.m4 (AC_CHECK_DECL): Assume C89 or better, and simply cast the identifier to void. This handles structure values. Problem reported by Ralf Wildenhues. * tests/semantics.at (AC_CHECK_DECLS): Also check enums. 2006-09-26 Ralf Wildenhues * tests/semantics.at (AC_CHECK_DECLS): Also check macros, structure, and function symbols. 2006-09-26 Ralf Wildenhues * tests/semantics.at (AC_CHECK_MEMBERS): Also test with a struct member. 2006-09-25 Paul Eggert * NEWS: Recommend M4 1.4.7 instead of 1.4.6. * README: Likewise. * doc/autoconf.texi (Introduction, Why GNU M4): Likewise. 2006-09-25 Paul Eggert and Ralf Wildenhues * lib/autoconf/functions.m4 (AC_FUNC_OBSTACK): Avoid `gcc -Wall' warnings (uninitialized value). (AC_FUNC_UTIME_NULL): Likewise, test for and include if present. * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Likewise, add parentheses. (AC_STRUCT_TM): Likewise, avoid unused variables. 2006-09-20 Ralf Wildenhues * lib/autoconf/c.m4 (_AC_ARG_VAR_LDFLAGS): Update comment. (_AC_ARG_VAR_LIBS): New macro: let LIBS be precious. (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Call _AC_ARG_VAR_LIBS. * lib/autoconf/fortran.m4 (AC_PROG_F77, AC_PROG_FC): Likewise. Report by Olly Betts. 2006-09-19 Eric Blake * m4/m4.m4: Change copyright. * configure: Regenerate. * Makefile.in: Likewise. * bin/Makefile.in: Likewise. * doc/Makefile.in: Likewise. * lib/Makefile.in: Likewise. * lib/Autom4te/Makefile.in: Likewise. * lib/autoconf/Makefile.in: Likewise. * lib/autoscan/Makefile.in: Likewise. * lib/autotest/Makefile.in: Likewise. * lib/emacs/Makefile.in: Likewise. * lib/m4sugar/Makefile.in: Likewise. * man/Makefile.in: Likewise. * tests/Makefile.in: Likewise. * m4/m4.m4 (AC_PROG_GNU_M4): Check for m4 --debugfile support. * bin/Makefile.am (edit): Substitute M4_DEBUGFILE. * bin/autom4te.in (handle_m4): Favor --debugfile over misnamed --error-output, to avoid warnings with M4 2.0. 2006-09-19 Stepan Kasal * lib/autoconf/libs.m4 (AH_CHECK_LIB): Fix quoting, to be consistent with _AH_CHECK_FUNCS and _AH_CHECK_HEADERS. * lib/autoconf/headers.m4 (AH_CHECK_HEADERS_DIRENT): Likewise. 2006-09-15 Stepan Kasal * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Eliminate the expansion of AC_CHECK_FUNCS. 2006-09-14 Stepan Kasal * lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR): Remove a mistaken comment: the path has to be relative; do not use the path at runtime. 2006-09-13 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Quote the argument to `--prefix' for sub-configure scripts. Pass `--silent' to sub-configure scripts. * tests/torture.at (Configuring subdirectories): Add tests for both changes. * doc/autoconf.texi (Setting Output Variables): Fix example to not show `--silent' being passed to a `configure' re-run. 2006-09-12 Paul Eggert * doc/autoconf.texi (Input): Clarify role of AC_CONFIG_MACRO_DIR. * lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR): Do not check for the existence of the directory at configure-time. That's too late, anyway. Problem reported by Stefan Seefeld. * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Avoid bug in UnixWare 7.1.4 /usr/bin/posix/sh described by Tim Rice in . 2006-09-11 Stepan Kasal * tests/local.at (AT_CHECK_M4): Fix this so that the testsuite works with GNU M4 1.4.3 again; make the normalized form match the current m4 message; fix the description. * test/tools.at (autom4te cache): Adapt to the change. 2006-09-08 Paul Eggert * lib/autoconf/functions.m4 (AC_FUNC_MKTIME): Add year_2050_test to catch glibc bug 2821 . Merge from gnulib as follows: Use AC_CHECK_HEADERS_ONCE instead of AC_CHECK_HEADERS, and likewise for AC_CHECK_FUNCS_ONCE and AC_CHECK_FUNCS. Don't check for stdlib.h, since we now assume C89. 2006-09-08 Stepan Kasal * lib/autom4te.in (Autoconf-without-aclocal-m4): Move the preselections ... (Autoconf): ... here. (Autoscan-preselections): Delete. 2006-09-07 Stepan Kasal * lib/autom4te.in (Automake-preselections): Preselect AM_ENABLE_MULTILIB. 2006-09-05 Paul Eggert * doc/autoconf.texi (Preset Output Variables): srcdir and top_srcdir are not necessarily relative. Problem reported by Dries Kimpe. 2006-09-05 Ralf Wildenhues * lib/autoconf/fortran.m4 (_AC_PROG_FC): Prefer xlf90/xlf95 over f90/f95 because the latter drivers of AIX Fortran 9.1 do not accept files with extension `.f'. For consistency, also prefer xlf over f77. * doc/autoconf.texi (Fortran Compiler): Remove mention of bug from last patch. 2006-09-05 Romain Lenglet * lib/autoconf/erlang.m4 (AC_ERLANG_CHECK_LIB): Added substitution of ERLANG_LIB_VER_* variables. * doc/autoconf.texi (Erlang Libraries): Document ERLANG_LIB_VER_* variables. 2006-09-03 Paul Eggert and Ralf Wildenhues * doc/autoconf.texi (Limitations of Builtins): Document 'unset' bugs of Bash 2.01 and 2.05a. (Fortran Compiler): Document that AC_PROG_CC should be called before AC_PROG_FC, due to a bug in Autoconf. 2006-09-01 Paul Eggert * NEWS: New macro AC_CACHE_CHECK_INT. It replaces the old AC_COMPUTE_INT, which now behaves like _AC_COMPUTE_INT except the first two arguments are reversed. * doc/autoconf.texi (Caching Results): New macro AC_CACHE_CHECK_INT. (Generic Compiler Characteristics): AC_COMPUTE_INT no longer caches nor outputs a diagnostic. Suggested by Bruno Haible. * lib/autoconf/general.m4 (AC_CACHE_CHECK_INT): New macro, equivalent to the old AC_COMPUTE_INT. (AC_COMPUTE_INT): No longer caches or reports. New signature. All uses changed to AC_CACHE_CHECK_INT. * tests/base.at (AC_CACHE_CHECK_INT): New test. * tests/mktests.sh (ac_exclude_list): Add AC_CACHE_CHECK_INT. 2006-08-31 Paul Eggert * NEWS: AC_FUNC_FNMATCH, AC_FUNC_FNMATCH_GNU, AC_FUNC_GETLOADVG, and AC_REPLACE_FNMATCH are now obsolescent in Autoconf. New programs should use their Gnulib counterparts. * doc/autoconf.texi (Particular Functions): Likewise. (Macro Names, testsuite Invocation): Replace uses of these obsolete macros with uses of non-obsolete macros. 2006-08-29 Eric Blake * configure.ac (AC_INIT): Bump to 2.60b. * NEWS: Update. 2006-08-28 Eric Blake * lib/autoconf/headers.m4 (AC_HEADER_STAT): Fix logic that was mistakenly swapped on 2006-08-15. 2006-08-25 Paul Eggert * NEWS: Version 2.60a. 2006-08-25 Stepan Kasal * lib/autoconf/general.m4 (_AC_LINK_IFELSE): Remove the IPA/IPO file created by the PGI compiler. 2006-08-25 Noah Misch * lib/Autom4te/General.pm (END): Use `File::Path::rmtree' to simplify the code. 2006-08-25 Paul Eggert Fix Lex library problem reported to us by Julio Garvia. * doc/autoconf.texi (Particular Programs): YYTEXT_POINTER is for the default, which the user can override. * lib/autoconf/programs.m4 (AC_PROG_LEX): Let _AC_PROG_LEX_YYTEXT_DECL deal with LEXLIB. (_AC_PROG_LEX_YYTEXT_DECL): Handle caching correctly; the old code didn't work if some values were cached but not others. Test for broken lex libraries like native ia64-hp-hpux11.22; see , and work around the problem by preferring an empty LEXLIB to -lfl or -ll. Let the user set LEXLIB='' to indicate no library needed. * NEWS: Recommend M4 1.4.6 instead of 1.4.5. * README: Likewise. * doc/autoconf.texi (Introduction, Why GNU M4): Likewise. 2006-08-24 Paul Eggert Rework to use more-modern build style. Many files are renamed; all uses of their names were changed. * .x-sc_trailing_blank: Renamed from .x-sc_trailing_space. * .x-sc_useless_cpp_parens: New file. * build-aux/config.guess: Renamed from config/config.guess. Update. * build-aux/config.sub: Renamed from config/config.sub. Update. * build-aux/elisp-comp: Renamed from config/elisp-comp. * build-aux/install-sh: Renamed from config/install-sh. Update. * build-aux/mdate-sh: Renamed from config/mdate-sh. * build-aux/missing: Renamed from config/missing. * build-aux/texinfo.tex: Renamed from config/texinfo.tex. Update. * build-aux/vc-list-files: Renamed from config/vc-list-files. * config/Makefile.am: Removed. * config/mkinstalldirs: Removed. * config/move-if-change: Removed. * m4/m4.m4: Renamed from config/m4.m4. Add (C) to copyright notice. * Makefile.am (SUBDIRS): Remove config. (ACLOCAL_AMFLAGS): Include from m4, not config. (EXTRA_DIST): Add config/announce-gen, config/prev-version.txt. (WGET, WGETFLAGS): New macros, since Makefile.maint no longer does this. (autom4te-update): Rewrite with a loop. Get from gnulib, not automake. Fail if there's an error. * Makefile.cfg (move_if_change): Remove. (wget_files): Remove. (cvs_executable_files): New macro. (cvs_files): Use it. Remove mkinstalldirs. Add fdl.texi. (executable-update): Use $(cvs_executable_files). (local-checks-to-skip): Remove. * Makefile.maint: Merge from coreutils, plus add our own changes (gzip_rsyncable): New macro. (GZIP_ENV): Use it. (CVS_LIST): Use build-aux/vc-list-files. (VERSION_REGEXP): New macro. (local-checks-available): Add patch-check, $(syntax-check-rules), check-AUTHORS. (syntax-check-rules): Compute dynamically. (sc_cast_of_x_alloc_return_value): Work even if no source files. (sc_cast_of_alloca_return_value): Likewise. (sc_prohibit_atoi_atof): Simplify regexp. (sc_no_if_have_config_h, sc_require_config_h): (sc_prohibit_assert_without_use, (sc_obsolete_symbols): Check for O_NDELAY. (sc_texi_notab): Remove. (sc-changelog): Don't make an exception for '----' lines. (.re-list): Remove, so we don't have a junk file behind. (sc_system_h_headers): Remove the need for .re-list. (sc_the_the): New rule. (sc_tight_scope): Simplify. (sc_trailing_blank): Renamed from sc_trailing_space. (longopt_re): New macro. (sc_two_space_separator_in_usage): New rule. (sc_unmarked_diagnostics): Look at all files under CVS. (sc_useless_cpp_parens, patch-check, check-AUTHORS): New rules. (news-date-check, changelog-check): Version is OK. (po-check): Look for lib files even if not in CVS. (copyright-check): Use $() not ``. (maintainer-distcheck): Do not depend on changelog-check. (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz). Also check for -Wpointer-arith. (WGET, WGETFLAGS, tgz-md5, tgz-sha1, bz2-md5, bz2-sha1): (xdelta-md5, xdelta-sha1, tgz-size, bz2-size, xd-size, rel-check): Remove. (announcement): Add --gpg-key-id arg. (cvs-sv): Remove. (move_if_change): Just use mv. (local_updates: Remove wget-update, po-update. (po_repo, do-po-update, po-update, wget_files, get-targets): Remove. (config.guess-url_prefix, config.sub-url_prefix): Remove. (ansi2knr.c-url_prefix, texinfo.tex-url_prefix): (standards.texi-url_prefix, make-stds.texi-url_prefix, target, url): ($(get-targets)): Remove. (cvs_files): Remove missing, mkinstalldirs, ansi2knr.c. (gnulib_repo): Renamed from automake_repo. Get from gnulib now. (cvs-update): Get from gnulib. (emut_upload_commands): gnupload is in build-aux now. (alpha beta major): Add changelog-check. Check version. * configure.ac (AC_CONFIG_AUX_DIR): Renamed from config to build-aux. (AC_CONFIG_FILES): Remove. * bin/autoconf.as: Add spaces to avoid distcheck warning. * config/announce-gen: Sync from coreutils. * doc/make-stds.texi: Sync from gnulib. * doc/standards.texi: Likewise. * man/Makefile.am: Adjust for config -> build-aux renaming. * tests/Makefile.am: Prefer $(FOO) to @FOO@. * tests/local.at: Adjust from config -> build-aux renaming. * tests/tools.at: Likewise. * tests/torture.at: Likewise. * NEWS: The C99 check now tests for vararg macros and 64-bit preprocessor ints. * doc/autoconf.texi (C Compiler): Document // comments, va_copy. * lib/autoconf/c.m4 (_AC_PROG_CC_C99): Test varargs macros and 64-bit preprocessor ints. Check for static initialization of long long. Remove unnecessary casts. 2006-08-24 Ralf Wildenhues * doc/autoconf.texi (Particular Programs): Mention that @INSTALL@ and @MKDIR_P@ may vary for different output files. Reported by Alexandre Duret-Lutz. 2006-08-24 Paul Eggert * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Also ignore -lgcc?* and -lSystem, for Darwin/MacOS X. Problem reported by Bill Northcott in . 2006-08-22 Paul Eggert * lib/autoconf/c.m4 (AC_C_CONST): Don't used shadowed vars, to pacify insanely picky compilers. Problem reported by Eric Blake. * doc/autoconf.texi (Posix Variants): INTERACTIVE Unix is no longer supported by Sun. 2006-08-15 Paul Eggert * NEWS: Autoconf now uses constructs like "#ifdef HAVE_STDLIB_H" rather than "#if HAVE_STDLIB_H", so that it now works with "gcc -Wundef -Werror". Problem reported by David Fang in . * doc/autoconf.texi (Header Templates, Default Includes): (Particular Functions, Generic Functions, Header Portability): (Particular Headers, Generic Headers, Generic Declarations, Guidelines): (Obsolete Macros, AC_FOO_IFELSE vs AC_TRY_FOO): (Present But Cannot Be Compiled, Preprocessor Symbol Index): Prefer #ifdef to #if. * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Prefer #ifdef to #if. * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA, _AC_FUNC_MALLOC_IF): (AC_FUNC_MKTIME, AC_FUNC_MMAP, _AC_FUNC_REALLOC_IF): (AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETVBUF_REVERSED, _AC_FUNC_VFORK): Likewise. * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): (AC_HEADER_RESOLV, AC_HEADER_STAT): Likewise. * lib/autoconf/specific.m4 (AC_DECL_SYS_SYGLIST): (AC_SYS_RESTARTABLE_SYSCALLS): Likewise. * lib/autoconf/headers.m4 (AC_HEADER_STAT): Don't assume that S_ISDIR etc. are valid for use in #if; POSIX doesn't guarantee this. 2006-08-14 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Document sed problems with arg script text that doesn't end in newline, and with '-e a...'. Problems reported by Ralf Wildenhues. 2006-08-12 Alexandre Julliard (tiny change) * lib/autoconf/libs.m4 (AC_PATH_X_DIRECT): Replace another check for libXt by a check for libX11. 2006-08-10 Ralf Wildenhues * doc/autoconf.texi (config.status Invocation): Adjust according to last change. 2006-08-08 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): `config.status --help' should mention that `--version' outputs configuration settings. Report by Bruno Haible. 2006-08-06 Paul Eggert Fix test suite failures reported by Pierre in . * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Don't claim the compiler created a file "b.out" when it didn't create anything at all. * lib/autoconf/specific.m4 (AC_SYS_INTERPRETER): Discard stderr too, when invoking the test script. 2006-08-05 Alexandre Julliard (tiny change) * lib/autoconf/libs.m4 (AC_PATH_XTRA): Fixed a typo in the restoring of the werror flag. 2006-07-24 Paul Eggert * doc/autoconf.texi (Volatile Objects): Be even a little less skeptical about "volatile", after discussion with Bruno Haible on bug-gnulib. (Limitations of Usual Tools): Warn about sed stripping leading white space from text. From Bruno Haible. 2006-07-20 Paul Eggert * lib/autoconf/libs.m4 (AC_PATH_XTRA): Don't use -R if the compiler complains about it, even if things works after the complaint. Problem reported by Peter O'Gorman. * doc/autoconf.texi (Preset Output Variables): Document CFLAGS, CPPFLAGS, and LDFLAGS better. Problem reported by Bruno Haible. Similarly for CXXFLAGS, OBJCFLAGS, ERLCFLAGS. 2006-07-17 Paul Eggert * lib/autoconf/libs.m4 (AC_PATH_XTRA): Do the check for space after -R regardless of host. Patrick Welche reports that this fixes things on NetBSD 3.99. * NEWS: Recommend M4 1.4.5. * README: Likewise. * doc/autoconf.texi (Introduction, Why GNU M4): Likewise. * tests/tools.at (autom4te cache): Update wording of diagnostic to match M4 1.4.5. 2006-07-07 Paul Eggert * doc/autoconf.texi (C Compiler): Add a ref to Volatile Objects under AC_C_VOLATILE. (Volatile Objects): Be a little less skeptical about what "volatile" means. Derived from thoughts by Ben Pfaff in . 2006-07-07 Ralf Wildenhues * doc/autoconf.texi: Fix some typos. 2006-07-07 Paul Eggert * tests/torture.at (Configuring subdirectories): Set CONFIG_SITE more globally, since the 2006-06-30 patch didn't suffice. Problem reported by Keith Marshall. Also, don't bother with builddir2, since it shouldn't be needed any more. 2006-07-07 Paolo Bonzini * doc/autoconf.texi (Generic compiler characteristics): Document AC_COMPUTE_INT. Fix wrong statements on Default Includes for AC_CHECK_SIZEOF and AC_CHECK_ALIGNOF. * lib/autoconf/general.m4 (AC_COMPUTE_INT): New. (_AC_COMPUTE_INT): Add obsoletion warnings. * lib/autoconf/types.m4 (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF): Use AC_COMPUTE_INT. * NEWS: Document change. 2006-07-05 Paul Eggert * doc/autoconf.texi (Volatile Objects): New section. * NEWS: Document previous change. 2006-07-02 Paul Eggert * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Require that long long int be at least 64 bits wide. C99 requires this and enough programs depend on it so we should check for it. Bruno Haible reports in that long long int is 32 bits wide with some nonstandard compilers. (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise. 2006-06-30 Paul Eggert * tests/torture.at (Configuring subdirectories): Set CONFIG_SITE to a nonexistent file, so that we don't have to worry about a local site configuration that doesn't use /usr/local. Problem reported by Keith Marshall in . 2006-06-28 Paul Eggert * doc/autoconf.texi: Be more consistent about using @acronym with "HP" and "HP-UX". Remove mention of OSF; the old version wasn't quite right (it talked about "OSF/Tru64", even though the operating systems were called OSF/1, Digital UNIX, and Tru64 UNIX, and it even mentioned "OSF 4"!) and at this point there's little reason to talk about OSF any more, since it died in 1994. (Specific Compiler Characteristics): Simplify example of negative-size array. (File Descriptors): Reorder to make the text flow better. Remove joke about "appreciate the various levels"; I didn't get it. Add remark about HP-UX sh -x bug with stderr noted by Bob Proulx in . (File Descriptors, Limitations of Usual Tools): Tone down the advice against renaming or removing open files. (Limitations of Usual Tools): Add a new section, on 'rm'. 2006-06-26 Stepan Kasal * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Use -lX11, not -lXt in LIBS, idea from Karsten Hopp; this was due since this change: 2005-09-18 Paul Eggert * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Look for X11/Xlib.h and XrmInitialize rather than X11/Intrinsic.h and XtMalloc (which belong to Xt, not X itself). See Debian bug 327655. 2006-06-23 Ralf Wildenhues * configure.ac (AC_INIT): Bump to 2.60a. * NEWS: Update. 2006-06-23 Ralf Wildenhues Version 2.60. * configure.ac, NEWS: Update. 2006-06-23 Ralf Wildenhues * config/texinfo.tex: Sync from upstream. * bin/autom4te.in (handle_traces): Transform the `@S|@' quadrigraph correctly in traces. * NEWS, lib/Autom4te/C4che.pm, lib/autoconf/functions.m4: Fix typos. * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Expand tests for datarootdir-related errors only if AC_DATAROOTDIR_CHECKED is not defined. * doc/autoconf.texi (Changed Directory Variables): New node, to document the whole `datarootdir' business a bit better. * NEWS: Update. * tests/torture.at (datarootdir workaround): Extend test. Prompted by report by Alexandre Julliard. 2006-06-22 Paul Eggert * lib/autoconf/c.m4 (_AC_PROG_CC_C89): Check for C89 incompatibility when using default mode of IBM C 6 for AIX. Problem and two-line fix reported by Larry Jones. 2006-06-22 Alexandre Julliard * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Avoid warning about literal '${datarootdir}' if a definition is found in the output file. 2006-06-20 Paul Eggert * NEWS: Use "M4" rather than "m4" when appropriate. Problem reported by Eric Blake. * doc/autoconf.texi: Likewise. Use @acronym around BSD, GCC, and GNU when appropriate. (Why GNU M4): Renamed from "Why GNU m4". (Redefined M4 Macros): Mention that Posix m4wrap takes only 1 argument, but GNU M4 1.4.x takes more. (Buffer Overruns): Mention size_t and ptrdiff_t as alternatives to int. 2006-06-20 Ralf Wildenhues * bin/autom4te.in (handle_output): Do not forbid the empty pattern. * tests/tools.at (autoconf: the empty token): New test. 2006-06-20 Stepan Kasal * lib/m4sugar/m4sugar.m4 (m4_init): Merge the two m4_wrap calls, so that we do not care whether they are LIFO or FIFO; in the m4_wrap, do not check which diversion is the topmost one, just check that the stack is balanced at the end. * lib/m4sugar/m4sh.m4 (AS_INIT): We are going to change the base diversion forever--pop the previous diversion before opening the new one; consequently, remove the m4_wrap call. * lib/autotest/general.m4 (AT_INIT): Likewise. * tests/m4sugar.at: Do not use m4_wrap([m4_diversion_pop([..])]), for educational purposes. 2006-06-19 Paul Eggert and Ralf Wildenhues * NEWS: Document that m4wrap/m4_wrap might not be LIFO. * doc/autoconf.texi (Redefined M4 Macros): Likewise. Rework example of m4wrap token-pasting trouble so that it doesn't care whether it's LIFO or FIFO. Fix some "contrary to"s that are awkward in English. 2006-06-19 Ralf Wildenhues * lib/autoconf/types.m4 (_AC_TYPE_INT): Set `$ac_cv_c_int$1_t' to `yes' instead of `int$1_t' if the type is found, for more consistent configure output (where $1 is the number of bits). (_AC_TYPE_UINT): Likewise for `uint$1_t'. Suggested by Bruno Haible. * lib/autoconf/types.m4 (_AC_TYPE_UNSIGNED_INT): Solaris 2.5.1 needs _UINT8_T and _UINT64_T defines as well, to avoid clashes with system headers. Report by Bruno Haible. 2006-06-17 Ralf Wildenhues * config/config.guess, config/config.sub: Sync from upstream. * bin/Makefile.am (autoconf.in): Use `--melt' for autom4te, in order to avoid picking up an older installed frozen m4sh.m4f. Besides an outdated shell startup, this could have been created by an earlier M4 version with incompatible frozen file format. 2006-06-16 Paul Eggert * README: Recommend m4 1.4.4 instead of 1.4.3.. * doc/autoconf.texi: Likewise. (Special Chars in Names): Say that $(.FOO) is portable, as suggested by Stepan Kasal. (Installation Directory Variables, Build Directories): (Automatic Remaking, Subdirectories, Fortran Compiler): (Making testsuite Scripts, Defining Directories): Quote variable usages better. (Making testsuite Scripts): Add clean-local rule to makefile snippet, by Eric Blake. (Installation Directory Variables): Fix table item font. Reword slightly to clarify. Generalize advice about not using special characters to include all file-related vars, not just VPATH. (Special Chars in Variables): Warn about special characters in $(srcdir) too. (Assignments): Clarify default-value example as suggested by Ralf Wildenhues in . (Special Shell Variables): Note leading ./ or ../, as suggested by Eric Blake. (Limitations of Builtins): Under cd, warn about CDPATH. (The Make Macro MAKEFLAGS): Untabify. Problem reported by Ralf Wildenhues. 2006-06-15 Ralf Wildenhues * doc/autoconf.texi (Configuration Actions): Remove duplicate `@var', for texi2html. (Systemology): Some more word wrapping, for DVI output. (autom4te Invocation): The short option for `--melt' is `-M', not `-m'. 2006-06-15 Paul Eggert * doc/autoconf.texi: More formatting and English tweaks, many suggested by Ralf Wildenhues. Reword to avoid "@code{...}'s" and the like, since it's ugly with Emacs info mode. discontents -> woes. Put a few "will"s back. time stamp -> timestamp. side-effect -> side effect. 2006-06-14 Paul Eggert * doc/autoconf.texi (Initializing configure, Shell Substitutions): Warn about $@ not persisting. Problem reported by Julien Danjou in . (Special Chars in Names): Renamed from Leading _ in Macro Names. Mention other special chars, too. 2006-06-14 Eric Blake * doc/autoconf.texi (The Make Macro MAKEFLAGS): New node. 2006-06-13 Paul Eggert * doc/autoconf.texi: Some systematic minor improvements, as follows. Use "makefile" when talking about makefiles generally (which might be named "makefile" or "Makefile" or even "foo.mk"), "Makefile" when talking about a specific makefile called "Makefile". This unclutters the text from weird quotes (e.g., "`Makefile's" in info mode). Similarly, use "@var{foo} values" rather than "@var{foo}s" and similar constructs containing "}s". Use "Make rules" rather than "Makefile rules". Minor English-language improvements. Change the prefix "sub-" to "sub" and "re-" to "re". Put blank lines around examples more consistently. Avoid "rather" and "very" as intensifiers. Avoid "will" as an auxiliary. (Limitations of Make): Split this node into.... (Portable Make, $< in Ordinary Make Rules, Failure in Make Rules): (Leading _ in Macro Names, Backslash-Newline-Newline): (Backslash-Newline Comments, Long Lines in Makefiles): (Macros and Submakes, The Make Macro SHELL, Comments in Make Rules): (obj/ and Make, make -k Status, VPATH and Make): (VPATH and Double-colon, $< in Explicit Rules): (Automatic Rule Rewriting, OSF/Tru64 Directory Magic): (Make Target Lookup, Single Suffix Rules, Timestamps and Make): New nodes, resulting from splitup of Limitations of Make. All cross-references changed. Raise the top node from a section to a chapter, and all subnodes accordingly. Redo the introductory wording to match the new organization. (Installation Directory Variables): Use an example that is closer to what Autoconf actually does. Mention that VPATH's value should not contain metacharacters or white space. (Fortran Compiler): Fix a VPATH bug in an example. (Leading _ in Macro Names): Mention that this problem is no longer of practical concern. (VPATH and Make): Reword the advice to make it clearer that Autoconf and Automake support VPATH in non-GNU make, but many packages have bugs in this area. ($< in Explicit Rules): Refer to Build Directories rather than using a (non-VPATH-safe) example. (Automatic Rule Rewriting): Mention the sort of disaster that can ensue with Solaris-style rule rewriting with VPATH. 2006-06-13 Ralf Wildenhues * doc/install.texi (Compilers and Options): Weaken the suggestion to use GNU make for VPATH builds. * lib/autom4te.in (Automake-preselections): Add AM_PROG_CXX_C_O, AM_PROG_F77_C_O, AM_PROG_FC_C_O, AC_FC_SRCEXT, AC_FC_FREEFORM. * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Fix M4 quotation in regular expression. 2006-06-08 Ralf Wildenhues * doc/autoconf.texi (Installation Directory Variables): Drop extra @samp from `@table @samp' item. (Limitations of Usual Tools): Comment fix. Do not nest @samp just to point to other table items. (Writing testsuite.at) : The second argument to `@dvar' is already @samp'ed. (Making testsuite Scripts) : Likewise, do not use @var in the second argument. 2006-06-07 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Look for $as_shell.exe too. Problem reported by Andreas Buening in . 2006-06-07 Ralf Wildenhues * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA): Work around `unused variable' compiler warning, for `-Wall -Werror'. Reported by Jaap Haitsma in . 2006-06-06 Paul Eggert * lib/autoconf/c.m4 (AC_PROG_CC_C_O): Remove core file, in case the compiler dumps core. Problem reported for OpenServer 5.0.7 by Tim Rice in . * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Likewise. 2006-06-06 Tim Rice . * lib/freeze.mk: Quiet check-forbidden-patterns so the string "ERROR" only shows up in "make check" output if there is an error. 2006-06-06 Eric Blake * tests/tools.at (automatically allowed tokens): Fix typo. 2006-06-05 Paul Eggert * NEWS: Don't blame non-GNU VPATH compatibility issues on Automake. * doc/autoconf.texi (Integer Overflow): Mention that INT_MIN % -1 typically overflows on x86 CPUs, even though the C standard requires otherwise. 2006-06-05 Ralf Wildenhues * configure.ac (AC_INIT): Bump to 2.59e. * NEWS: Update. 2006-06-05 Ralf Wildenhues Version 2.59d. * config/texinfo.tex: Sync from upstream. * bin/autoreconf.in: Trace `LT_CONFIG_LTDL_DIR'; if it has been seen, invoke libtoolize with `--ltdl' argument. * lib/autom4te.in (Autoreconf-preselections): Adjust. * NEWS: Update. Suggested by Eric Blake. 2006-06-05 Paul Eggert * NEWS: Whoops! AC_FUNC_STRNLEN isn't obsolescent. Problem reported by Ralf Wildenhues. * doc/autoconf.texi (AC_FUNC_STRNLEN): Likewise. 2006-06-05 Ralf Wildenhues * THANKS: Update. 2006-06-05 Paul Eggert * doc/autoconf.texi: Modernize some of the references to Solaris. 2006-06-05 Stepan Kasal * lib/m4sugar/m4sugar.m4 (m4_require): Modify the error message issued by AC_REQUIRE. * tests/m4sugar.at: Check m4_require's error message. * tests/base.at: Check AC_REQUIRE's error message. * tests/local.at (AT_CHECK_M4): New macro, almost identical to... (AT_CHECK_AUTOM4TE): ... which is now a thin wrapper around AT_CHECK_M4. (AT_CHECK_AUTOCONF): Use AT_CHECK_M4; no longer support `expout' as the last parameter. * tests/tools.at: Adapt to the above change. 2006-06-04 Stepan Kasal * doc/autoconf.texi (Limitations of Usual Tools): Correct information about race-free implementations of mkdir. 2006-06-04 Eric Blake * bin/autoreconf.in (help): Document M4 environment variable. * bin/autoconf.as (Usage): Likewise. * bin/autom4te.in (help): Likewise. * doc/autoconf.texi (autom4te Invocation): Likewise. 2006-06-04 Paul Eggert * NEWS: GNU make now recommended for VPATH builds. Mention that some macros are now documented to be obsolescent. * doc/autoconf.texi: Prefer "current" to "modern" to describe currently-used (albeit perhaps old-fashioned) hosts. Mention which ancient features no longer need to be worried about. setgid -> set-group-ID setuid -> set-user-ID (these are the Posix terms) Fix some misuses of "only". (AC_C_BACKSLASH_A, AC_C_CONST, AC_C_PROTOTYPES): (AC_C_STRINGIZE, AC_C_VOLATILE, AC_FUNC_CLOSEDIR_VOID): (AC_FUNC_GETPGRP, AC_FUNC_LSTAT, AC_FUNC_MEMCMP): (AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP): (AC_FUNC_SETVBUF_REVERSED, AC_FUNC_STAT, AC_FUNC_STRFTIME): (AC_FUNC_STRNLEN, AC_FUNC_UTIME_NULL, AC_FUNC_VPRINTF): (AC_HEADER_DIRENT, AC_HEADER_STAT, AC_HEADER_STDC): (AC_HEADER_SYS_WAIT, AC_HEADER_TIME, AC_ISC_POSIX): (AC_PROG_GCC_TRADITIONAL, AC_STRUCT_TM): Mention that these macros are obsolescent. (Installation Directory Variables): shall -> should (File Descriptors): Mention that 0, 1, 2 might get reopened. Mention that it's now safe to use 3 and 4. (Limitations of Usual Tools): cp -r is now specified by Posix. Omit longwinded and obsolescent discussion of cp -f. Modernize discussion of expr, ls. (Limitations of Make): Modernize discussion of VPATH builds. Mention $? as a workaround in some cases. * doc/install.texi (Basic Installation): Mention "./configure; make; make install" first. Be more specific about why this file is generic. Remove unnecessary parens. Remove misleading "only". Remove obsolete advice about csh. Don't say "configure" takes awhile; say it might take a while. Suggest CFLAGS=-g rather than CFLAGS=-O2, and CC=c99 rather than CC=c89, as these are blessed by current Posix. Recommend GNU make if doing a VPATH build. 2006-06-03 Paul Eggert * doc/autoconf.texi: Use a consistent style "$ @kbd{...}" for examples involving shell prompts. 2006-06-02 Stepan Kasal and Paul Eggert * doc/autoconf.texi (Here-Documents): Add details about the pre-ksh93g bug. Reword slightly to make it clearer. Consistently use "here-documents" instead of "here documents". 2006-06-01 Ralf Wildenhues * config/texinfo.tex, doc/standards.texi: Sync from upstream. 2006-06-01 Paul Eggert * doc/autoconf.texi (File System Conventions): Warn about ":" anywhere in directory names. 2006-05-31 Paul Eggert * lib/autoconf/general.m4 (_AC_DO_ECHO): Be even more conservative about quoting the case statement, just in case. * doc/autoconf.texi (Here-Documents): Mention that the ksh bug was fixed in ksh93g; reported by Ralf Wildenhues. 2006-05-31 Stepan Kasal * doc/autoconf.texi (System Services): Do not document overriding EXEEXT via ac_cv_exeext=ext. (Particular Programs) : Document that ${MKDIR_P} understands --. * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Improve the comment. 2006-05-31 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (_AS_DIRNAME_PREPARE): Guard against test argument with leading hyphen. Problem reported by Paul Eggert. 2006-05-30 Paul Eggert * lib/autoconf/general.m4 (_AC_DO_ECHO): Be more conservative about quoting ac_try: quote all of it, if any of it seems suspicious. This means we don't have to worry about ${ or sed any more. Also, double-quote the case statement, to work around misuses via underquoting as reported by Ralf Wildenhues in . (_AC_EVAL_STDERR): Revert, since evidently some packages rely on this undocumented and dangerous macro. Problem reported by Ralf Wildenhues in . 2006-05-31 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (_AS_DIRNAME_PREPARE): Check whether `dirname -- /' returns `/', for SunOS dirname scripts that escaped. Report by Sam Sirlin . 2006-05-30 Paul Eggert * lib/autoconf/general.m4: Revert AC_TRY_EVAL and AC_TRY_COMMAND, since evidently some packages rely on the old, broken behavior. Problem reported by Ralf Wildenhues in . (AC_TRY_EVAL, AC_TRY_COMMAND, _AC_EVAL): Go back to the pre-2006-05-26 definitions, but leave in the comments that these macros are dangerous and should not be used. (_AC_DO_ECHO): Renamed from _AC_EVAL_ECHO. All callers changed. (_AC_DO): Renamed from _AC_EVAL. All callers changed. (_AC_DO_STDERR): Renamed from _AC_EVAL_STDERR. All callers changed. (_AC_DO_VAR): Renamed from AC_TRY_EVAL. (_AC_DO_TOKENS): Renamed from AC_TRY_COMMAND. 2006-05-29 Paul Eggert * lib/autoconf/status.m4 (AC_OUTPUT_MAKE_DEFS): Rewrite to avoid the use of 'tr', since this is our only use of 'tr'. 2006-05-29 Ralf Wildenhues and Paul Eggert * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Don't assume 'grep' works on long lines, since AIX grep doesn't. 2005-05-28 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Do not use `grep' on the output file in the `${datarootdir}' test. 2005-05-28 Stepan Kasal and Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): If we have not seen mention of `datarootdir' in the input file(s), but literal `${datarootdir}' in the output file, and we haven't warned yet, then warn as well: the user may have (erroneously) used `AC_SUBST([mydatadir], [$datadir/my])' instead of the correct `AC_SUBST([mydatadir], ['${datadir}/my'])'. * tests/torture.at (datarootdir workaround): Extend this test. * NEWS: Update. 2006-05-27 Ralf Wildenhues and Paul Eggert * doc/autoconf.texi (autoheader Invocation): The first argument to `AC_DEFINE_UNQUOTED' need not be a literal. Mention the alternatives and clear up the language a bit. 2006-05-27 Paul Eggert * NEWS: Reword notice for AC_TRY_COMMAND, AC_TRY_EVAL, ac_config_guess, ac_config_sub, ac_configure. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix typo that prevented an unnecessary space from being removed. Problems reported by Ralf Wildenhues in: http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00143.html 2006-05-26 Paul Eggert * doc/autoconf.texi (Particular Programs, Limitations of Usual Tools): Use better wording to talk about AC_PROG_MKDIR_P's thread-safety. Don't use the term "thread-safe" to talk about mkdir race conditions, since the problem is more a process than a thread issue. Problem reported by Stepan Kasal in: http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00088.html * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Use code that mimics the test for 'install' more closely. Look at MKDIR_P first. Look in the PATH, and at /opt/sfw/bin. Look for a 'gmkdir' program as well (Solaris 10 /opt/sfw/bin/gmkdir). Don't bother to try mkdir -p, since we already check mkdir --version; just look at the version number. (There's no easy way to check for race-free implementations.) * tests/tools.at (autoconf: subdirectories): Adjust to above changes, since MKDIR_P now might end in "/mkdir -p". * doc/autoconf.texi (autoheader Invocation): Mention that the first arg of AC_DEFINE_UNQUOTED must be a literal. Problem reported by Ben Pfaff in . * NEWS: Mention that AC_TRY_COMMAND and AC_TRY_EVAL may be removed. * doc/autoconf.texi (Special Chars in Variables): New section. (Preset Output Variables): Warn about special chars in CPPFLAGS. (Installation Directory Variables): Quote $(datadir) better. (Limitations of Builtins): Describe some of eval's trickiness. * lib/autoconf/c.m4 (AC_PROG_CC_C_O): Simplify quoting. * lib/autoconf/fortram.m4 (_AC_PROG_FC_V_OUTPUT): Likewise. * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Put leading space in front of every arg, not just trailing args. Quote apostrophes. (_AC_EVAL_ECHO): New macro. (_AC_EVAL, AC_EVAL_STDERR): Use it. Quote arg of eval. (AC_TRY_EVAL, AC_TRY_COMMAND): Mention that these macros might get removed. (_AC_LINK_IFELSE): Use proper rule for shell continuation lines, exposed by quoting of eval argument. Put the command on line line so it logs better. * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Use eval more safely. (_AC_PATH_X, AC_PATH_X): Quote more safely. * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Use eval more safely. * lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Don't use eval. * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Minor style change. Handle special chars in prefix, ac_srcdir, ac_aux_dir. Use eval more safely. (_AC_OUTPUT_CONFIG_STATUS): Adjust to above changes. * lib/m4sugar/m4sh.m4 (AS_VAR_GET): Note that this API needs to be replaced. * tests/base.at (AC_TRY_COMMAND): Use proper rule for shell continuation lines, exposed by quoting of eval argument. 2006-05-26 Stepan Kasal and Ralf Wildenhues * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Drop the initialization of `ac_cv_exeext', do not override it if it was already set, unless it was set to `no', for compatibility with Autoconf-2.13, and comment this. Do not export `ac_cv_exeext', Libtool hasn't needed this for years. (_AC_COMPILER_EXEEXT_DEFAULT): Likewise, do not export it. (_AC_COMPILER_EXEEXT_WORKS, _AC_COMPILER_EXEEXT_CROSS): Typos. * doc/autoconf.texi (Compilers and Preprocessors) : Document that this test may be overridden by setting `ac_cv_exeext'. 2006-05-26 Ralf Wildenhues Revert these two patches: 2006-04-06 Eric Blake * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_O): Inside cache check, s/ac_exeext/ac_cv_exeext/. Fixes regression introduced 2006-04-01. 2006-04-01 Stepan Kasal Clean up _AC_COMPILER_EXEEXT* macros. * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Don't try to detect exeext, it will be done by _AC_COMPILER_EXEEXT_O; just set ac_file to the name of the default output file and call _AC_COMPILER_EXEEXT_WORKS. Move the definition of ac_files and the initial `rm' of the candidate files... (_AC_COMPILER_EXEEXT): ... here and simplify them. Moreover, use the same list in subsequent `rm' calls, and for the temporary redefinition of ac_clean_files; call _AC_COMPILER_OBJEXT at the end, and don't call the other _AC_COMPILER_EXEEXT_* macros directly, use... (_AC_COMPILER_EXEEXT_TESTS): ... this new macro. (_AC_COMPILER_EXEEXT_O): Don't export ac_cv_exeext, it's not needed (or no longer needed) by libtool. Make it a cache check. (_AC_COMPILER_EXEEXT_CROSS): Remove the comment, it was obviously copied here by mistake. (AC_NO_EXECUTABLES): Redefine _AC_COMPILER_EXEEXT_TESTS, not _AC_COMPILER_EXEEXT. * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Do not call _AC_COMPILER_OBJEXT directly. * lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise. 2006-05-25 Ralf Wildenhues * doc/autoconf.texi (Limitations of Usual Tools) < sed (`t')>: Fix description of how the buggy `sed' works. 2006-05-25 Noah Misch Sync from Automake: * lib/Autom4te/XFile.pm (lock): Allow EOPNOTSUPP, besides ENOLCK. Only mention `make -j' when applicable. Only raise fatal errors when `make -j' is involved. Improve error message. 2006-05-25 Ralf Wildenhues * doc/autoconf.texi (Here-Documents): We now know more about the variable expansion in here documents bug. Thanks to Tim Rice and Stepan Kasal. * doc/autoconf.texi (Making testsuite Scripts): Add an example how to use TESTSUITEFLAGS. Suggested by Eric Blake. 2006-05-24 Ralf Wildenhues * tests/autotest.at (Multiline command from M4 expansion): No failure to be expected if the shell quotes newlines in commands in the `set -x' output. Report by Tim Rice. * THANKS: Update. 2006-05-23 Paul Eggert * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Don't use shell expansion in the here-documents used by config.status, as that runs afoul of the Korn shell version M-12/28/93d bug described in the Autoconf manual, and this in turn causes a Coreutils 5.95 build to fail as described by Tim Rice and diagnosed by Ralf Wildenhues in . 2006-05-23 Jim Meyering * lib/autoconf/functions.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Fix typo introduced with 2006-04-02 change. It reversed the sense of the test. 2006-05-23 Paul Eggert * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Simplify ac_dA and ac_dB slightly, to save bytes in the script. Max out at 50 lines, rather than 96; this is more likely (though not guaranteed) to avoid obscure 'sed' failures. 2006-05-23 Ralf Wildenhues * lib/autotest/general.m4 (AT_INIT): UnixWare `tr' may interpret `tr -d -' as bad option argument. Work around this by deleting an unrelated character. Report by Tim Rice . 2006-05-22 Paul Eggert , Ralf Wildenhues , Stepan Kasal * doc/autoconf.texi (Particular Programs): Do not promise that we always prefer the GNU version of the program, and that we search according to PATH; both rules can have exceptions. Update description of AC_PROG_GREP, AC_PROG_EGREP, AC_PROG_FGREP, AC_PROG_SED. Move descriptions of limitations to the Limitations of Usual Tools section. (Limitations of Usual Tools) : Mention script length limitations with Solaris /usr/ucb/sed. : Fix wording for empty alternative. Mention that -c and -l should not be combined, and that -E and -F should not be combined. 2006-05-21 Paul Eggert and Ralf Wildenhues * lib/autoconf/programs.m4 (AC_PROG_SED): Catch script length limits in Solaris 8 /usr/ucb/sed by testing a long script. 2006-05-22 Stepan Kasal * doc/autoconf.texi (Defining Symbols): Literal parameter of AC_DEFINE is now passed to m4_pattern_allow. * NEWS: Mention that; likewise for AC_SUBST. * lib/autoconf/general.m4 (AC_DEFINE_TRACE_LITERAL): Pass the parameter to m4_pattern_allow. * tests/tools.at: Add a check for that. 2006-05-22 Stepan Kasal * lib/autoconf/status.m4: Fix typos. 2006-05-21 Ralf Wildenhues * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Remove only the files that this macro generates. 2006-05-21 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools) : For the HP-UX sed limitation of 99 commands, labels do not count. * lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): Mention that in the comment. (_AC_OUTPUT_HEADER): Revert the change from 2006-05-19. 2006-05-21 Paul Eggert * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Import the following fix from coreutils: 2006-01-13 Jim Meyering Invoke AC_CHECK_FUNCS(getmntent) unconditionally so that tests of $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not double-quote uses of that variable, to accommodate the rare case in which getmntent is available in none of the libraries checked. This happens at least on FreeBSD 5.0. 2006-05-20 Paul Eggert * lib/autoconf/general.m4 (AC_CONFIG_AUX_DIRS): Bring back ac_config_guess, ac_config_sub, and ac_configure, since evidently some other programs unwisely rely on these undocumented vars. But put in warning comments about them. Problem reported by Ralf Wildenhues in . * NEWS: Document that these variables are intended to go away. 2006-05-20 Ralf Wildenhues * lib/autoconf/c.m4 (AC_PROG_CXX_C_O): Require AC_PROG_CXX, and set the language to C++ (analogous to the equivalent Fortran tests). * lib/autoconf/c.m4 (AC_PROG_CXX_C_O): New macro. * doc/autoconf.texi (C++ Compiler): Document it. * lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O): Adjust comment. * NEWS: Update. 2006-05-19 Paul Eggert * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Fix off-by-one bug that caused config.status to generate 100-command sed scripts; the portable limit is 99. 2006-05-19 Ralf Wildenhues * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Name temporary variable `ac_d' instead of `d' to avoid infringing namespace. Report by Ralf Menzel. 2006-05-18 Paul Eggert * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Don't prepend $ac_top_build_prefix to $MKDIR_P if it's just 'mkdir -p'. * tests/tools.at (autoconf: subdirectories): New test, taken from the corresponding problem report by Ralf Wildenhues in: http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00053.html * lib/autoconf/functions.m4 (AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU): Quote some uses of shell variables if they might suffer unexpected globbing. This doesn't fix all instances of quoting problems that I found, just the easy ones that look safe. * lib/autoconf/general.m4 (_AC_INIT_SRCDIR, _AC_INIT_HELP): (AC_CONFIG_AUX_DIR, AC_CONFIG_AUX_DIR_DEFAULT, AC_CONFIG_AUX_DIRS): (AC_CANONICAL_BUILD, AC_CANONICAL_HOST, AC_CANONICAL_TARGET): (AC_CACHE_LOAD, AC_CACHE_SAVE): Likewise. * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF, _AC_PATH_X_DIRECT): Likewise. * lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_LINK, _AC_OUTPUT_SUBDIRS): Likewise. * lib/autotest/general.m4 (_AC_INIT_PARSE_ARGS): Likewise. * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Likewise. 2006-05-18 Ralf Wildenhues * bin/autoreconf.in ($help): Reword according to the manual. Suggested by Olly Betts. 2006-05-17 Olly Betts (tiny change) and Ralf Wildenhues * bin/autoreconf.in: Pass the directory argument to `require_configure_ac'. Fix comment. * tests/torture.at (Configuring subdirectories): Expose this. Reported by Olly Betts. 2006-05-17 Ralf Wildenhues * lib/Automake/Configure_ac.pm, lib/Automake/Channels.pm, lib/Automake/FileUtils.pm, lib/Automake/Struct.pm: Sync from Automake as follows: * lib/Autom4te/Configure_ac.pm (find_configure_ac): Use `$configure_in' instead of `configure.in', to preserve directory component. 2006-05-17 Ralf Wildenhues * config/config.guess, config/config.sub, config/texinfo.tex, doc/make-stds.texi, doc/standards.texi: Sync from upstream. 2006-05-14 Paul Eggert * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Fix overly-picky test for C99 conformance; (bool) 0.5 is an integer constant expression, but (bool) -0.5 is not. Problem reported by Fedor Sergeev in . 2006-05-13 Paul Eggert * doc/autoconf.texi (Particular Programs): AC_PROG_MKDIR_P now sets MKDIR_P, not mkdir_p, to avoid collisions with Automake. Warn about obsolete install-sh files. Remove stray sentence fragment and fix cross reference. * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Don't insist on install -d; this undoes the 2006-05-10 change. (MKDIR_P): Mark with AN_MAKEVAR. (AC_PROG_MKDIR_P): Fall back on $ac_install_sh, not $INSTALL, so that we don't require $INSTALL to be thread-safe. Move comments out of generated code. Require AC_CONFIG_AUX_DIR_DEFAULT instead of AC_PROG_INSTALL. Output a message saying that we're checking mkdir -p. Set MKDIR_P rather than mkdir_p. Do special magic for MKDIR_P instead of AC_SUBST. * lib/autoconf/status.m4 (_AC_OUTPUT_FILE, _AC_OUTPUT_CONFIG_STATUS): Special magic for MKDIR_P, too. * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Remove comment that defeated a dnl. * tests/local.at (AT_CHECK_ENV): mkdir_p -> MKDIR_P. 2006-05-11 Paul Eggert Sync from Automake, as follows: 2006-05-11 Ralf Wildenhues * config/install-sh: Initialize IFS, so field splitting isn't turned off later. * config/mkinstalldirs: Likewise. * config/missing: Remove superfluous quotes. Replace all uses of `[' by `test', for consistency, and for.. * config/missing (sed_minuso, sed_output): New variables. (autom4te, help2man, makeinfo): Use them. Unifies detection of `-o FILE', `--output FILE', `--output=FILE', stricter regex. Fixes `missing' to detect `--output' for help2man. Fixes PR automake/483. Report by Dennis J. Linse. (autom4te): Document in `missing --help'. 2006-05-10 Paul Eggert * NEWS: New macro AC_PROG_MKDIR_P. AS_MKDIR_P is now more robust. * config/install-sh: Don't use 'path' to talk about file names, as per GNU coding standards. Close a race condition reported by Ralf Wildenhues and Stepan Kasal. There is still a race condition on hosts that predate Posix 1003.1-1992, but we can't help this. Don't mishandle weird characters like space on pre-Posix hosts. Invoke mkdir at most once per dir arg on pre-Posix hosts. * doc/autoconf.texi (Programming in M4sh): Cross-reference to AC_PROG_MKDIR_P from AS_MKDIR_P. (Limitations of Usual Tools): Cross-reference to AC_PROG_MKDIR_P from mkdir. Mention that Autoconf 2.60 install-sh is safe but earlier editions are not (including Automake 1.8.3). Do not suggest mkinstalldirs for thread-safety. * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Insist on an 'install' that understands -d, so that AC_PROG_MKDIR_P can fall back on $INSTALL. * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Make it more robust in the presence of special characters and race conditions. * tests/local.at (AT_CHECK_ENV): Add mkdir_p to the list of variables in Autoconf's name space. 2006-05-10 Bruno Haible and Paul Eggert * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): New macro, taken from Automake with minor changes. * doc/autoconf.texi (Particular Programs): Document AC_PROG_MKDIR_P. 2006-05-10 Paul Eggert * config/install-sh: Update to Automake CVS version, as follows: 2006-04-25 Stepan Kasal * lib/install-sh: Simplify the expr implementation of dirname. 2006-04-24 Paul Eggert * lib/install-sh: Handle --, and diagnose unknown options. 2006-05-09 Ralf Wildenhues * tests/Makefile.am (AUTOTEST): Use `$(MY_AUTOM4TE)' instead of `./autom4te' to create `./testsuite', since the `all' target will ensure its presence, but `installcheck' should not create the uninstalled wrappers. * tests/torture.at (Unusual Automake input files): Skip if we detect automake < 1.8. 2006-05-07 Ralf Wildenhues * lib/autoconf/c.m4 (AC_PROG_CC_STDC): If ac_cv_prog_cc_stdc is set to `no', then that overrides and sets ac_cv_prog_cc_c89 and ac_cv_prog_cc_c99 to `no', for backward compatibility. * NEWS: Update. 2006-05-06 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Take care not to munge (multiple) white space and other oddities. * tests/torture.at (AT_CHECK_AC_ARG_VAR): Make sure to M4-escape single quotes in variable assignment. (AC_ARG_VAR, configure invocation): Adjust tests to expose this and similar failures by adding multiple spaces, tabs, and other special characters. Report and different test suggested by Francesco Romani and Andrew Church . * lib/autoconf/general.m4 (_AC_INIT_PREPARE): When we escape single quotes, we only need to search for single quotes; this both simplifies the search pattern, and makes us less susceptible to `echo' variations for arguments not containing single quotes. (_AC_ARG_VAR_VALIDATE): Likewise. 2006-05-04 Ralf Wildenhues * doc/autoconf.texi (Special Shell Variables) : Document `$*' and IFS concatenation issue with traditional shells and bash-2.04. Report by Seanster@Seanster.com. 2006-05-03 Bruno Haible * doc/autoconf.texi (Limitations of Usual Tools): Identify more precisely which Mac OS X versions have the od problem. 2006-05-02 Paul Eggert * doc/autoconf.texi: Use @option systematically. 2006-05-02 Paul Eggert and Bruno Haible * doc/autoconf.texi (Limitations of Usual Tools): Add a paragraph about 'od'. (Integer Overflow): Mention the special case of integer division overflow. 2006-05-02 Ralf Wildenhues * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Cater for traditional shells like the Solaris one that do not use the first IFS character for assembling `$*'. Prompted by a related report from autoconf_bug@nro.ca. 2006-05-01 Paul Eggert and Ralf Wildenhues * doc/autoconf.texi (Limitations of Builtins, Limitations of Make): Mention more problems with the -e option. 2006-04-30 Ralf Wildenhues * NEWS: Typo. * doc/autoconf.texi (Systemology): Mention the Heirloom Project. * doc/autoconf.texi (Introduction, Pointers): Use `@/' liberally in URLs to improve DVI formatted output (requires texinfo 4.6). (System Services, Systemology, Shellology): Likewise. (Limitations of Usual Tools): Rewrite Mac OS X example for nicer output. * doc/autoconf.texi (Fortran Compiler): Do not use `@ovar' in continuous text. (Runtime): Fix macro argument names to match description: `action-if-found' -> `action-if-true' and similarly. (Obsolete Macros): Likewise. * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE): Likewise. (AC_COMPILE_IFELSE, AC_TRY_COMPILE, _AC_LINK_IFELSE) (AC_LINK_IFELSE, AC_TRY_LINK, AC_COMPILE_CHECK): Likewise. 2006-04-29 Ralf Wildenhues * doc/autoconf.texi (Limitations of Make): Clean up markup. * ChangeLog: Typo. * doc/autoconf.texi (Portable Shell): Allow wrapped URLs, for DVI output. 2006-04-28 Ralf Wildenhues * doc/autoconf.texi (Limitations of Builtins): Document FreeBSD /bin/sh set unsorted output. * lib/autoconf/general.m4 (_AC_CACHE_DUMP): Adjust. * tests/local.at: Likewise. 2006-04-26 Paul Eggert * doc/autoconf.texi (Portable C and C++, Varieties of Unportability): (Integer Overflow, Null Pointers, Buffer Overruns): (Floating Point Portability, Exiting Portably): New sections. (Writing Test Programs): Fix some langauge. Recommend exiting with status 1, not merely nonzero. Clarify exit declaration. (Run Time): Move C exit status stuff to new Exiting Portably section. (Systemology): Mention Posix and levenez. Update v7 reference. (Portable Shell): Mention the Posix shell. 2006-04-25 Stepan Kasal * bin/autoconf.as (me): Replace by as_me. 2006-04-25 Paul Eggert * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Don't use AS_ERROR, since as_me isn't set yet. 2006-04-23 Paul Eggert Prepare for deprecation of AS_BASENAME and AS_DIRNAME, and fix a few minor bugs in this area. * doc/autoconf.texi (Programming in M4sh): Comment out the documentation of AS_BASENAME, for now. (Shell Substitutions): Do not use AS_DIRNAME in an example. (Limitations of Builtins) : Do not refer to AS_BASENAME. * bin/autoconf.as (me): Don't use AS_BASENAME. (dir): Remove the unused variable. * lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED): Renamed from AS_DETECT_REQUIRED. All uses changed. (_AS_DETECT_SUGGESTED): Renamed from AS_DETECT_SUGGESTED. All uses changed. (_AS_DETECT_BETTER_SHELL): Put ;; at the end of a case. (AS_BASENAME): Use "basename --" to protect against leading "-". (_AS_BASENAME_EXPR): Renamed from AS_BASENAME_EXPR. All uses changed. (_AS_BASENAME_SED): Renamed from AS_BASENAME_SED. All uses changed. (_AS_BASENAME_PREPARE): Reject implementations that cannot handle "--". (_AS_DIRNAME_PREPARE): Likewise. (_AS_DIRNAME_EXPR): Renamed from AS_DIRNAME_EXPR. All uses changed. (_AS_DIRNAME_SED): Renamed from AS_DIRNAME_SED. All uses changed. (AS_DIRNAME): Use "dirname --". 2006-04-23 Paul Eggert * doc/autoconf.texi (Runtime): Renamed from "Run Time". All uses of "run time" and "run-time" changed to "runtime", for consistency. * lib/autoconf/fortran.m4: Likewise (in comment). * lib/autoconf/functions.m4: Likewise. * lib/autoconf/general.m4: Likewise. * lib/autoconf/headers.m4: Likewise. * doc/autoconf.texi (Run Time): Document the exit status situation with more accuracy and detail. 2006-04-23 Ralf Wildenhues * doc/autoconf.texi (Introduction): The GNU Autoconf Macro Archive is not officially `GNU' any more. Update URL. (Defining Directories): Likewise * lib/autoconf/c.m4 (AC_C_RESTRICT): Update URL. 2006-04-19 Ralf Wildenhues * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Remove the leading newline from the `trap' code to finish `config.log'; the NetBSD /bin/sh resets the exit status after an empty command, as documented in doc/autoconf.texi. Reported by Dalibor Topic . 2006-04-19 Paul Eggert * doc/autoconf.texi (C Compiler): Clarify AC_C_TYPEOF. Suggested by Bruno Haible. 2006-04-18 Paul Eggert * configure.ac (ac_cv_sh_n_works): Don't try to test for it, since some shells (e.g., Solaris 8 /bin/sh) implement it verrrry slowly. Instead, just list the shells that we know work. * tests/local.at (AT_CHECK_SHELL_SYNTAX): Remove 2nd arg. All uses changed. Be more cautious about the _cv_ variable. * tests/tools.at (Syntax of the shell scripts): Check the _cv_ variable once, at first, to avoid an internal autoconf error when sh -n does not work. 2006-04-17 Ralf Wildenhues * lib/Autom4te/FileUtils.pm: Sync from Automake. 2006-04-16 Paul Eggert * lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Don't use ">&-" since we're only 99.999% sure that this is portable, and since the MinGW bug is fixed in a different way. * lib/autotest/general.m4 (AT_INIT): Likewise. 2006-04-16 Stepan Kasal * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Handle --recheck before opening config.log, to avoid hitting a bug on MinGW. 2006-04-14 Paul Eggert * lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Close AS_MESSAGE_LOG_FD before reopening it onto the log file. This works around a MinGW bug reported by Eric Paire. Make sure that all writes to the log file append to it, rather than possibly losing data. * lib/autotest/general.m4 (AT_INIT): Likewise. 2006-04-14 Stepan Kasal * lib/Autom4te/FileUtils.pm (find_file): Fix a typo in the description. 2006-04-13 Ralf Wildenhues * NEWS: Update. * configure.ac (AC_INIT): Bump to 2.59d. 2006-04-12 Ralf Wildenhues Version 2.59c. * Makefile.maint (news-date-check): Do not require a leading `*' before the release date in NEWS. 2006-04-12 Stepan Kasal and Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): If the templates for the instantiated file do not contain the string 'datarootdir' but contain @datadir@, @docdir@, @infodir@, @localedir@, or @mandir@, replace the reference '${datarootdir}' by the value. * tests/torture.at (datarootdir workaround): New test. * NEWS: Advertise this temporary fixup. Based on a patch by Bruno Haible, reported and analyzed by Paul Eggert and Noah Misch. 2006-04-12 Eric Blake * tests/autotest.at (Debugging a failed test): Fix comment. 2006-04-12 Stepan Kasal * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Simplify the summary of all the changes since 2006-04-07. 2006-04-11 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): If `ln -s file1 file2' succeeded, but `ln -s file dir' failed, take care to remove the leftover target before the next test, to prevent its spurious failure; also make sure `ln file dir' works before selecting it. Thanks to Keith Marshall for pointing this out. * THANKS: Update. * lib/autotest/general.m4 (AT_INIT): Store quoted variable assignments in `at_debug_args', so that we put them correctly in the `run' script. * tests/autotest.at (Debugging a failed test): Unmark XFAIL. Reported by Eric Blake. 2006-04-11 Eric Blake * tests/autotest.at (AT_CHECK_AT): Add new argument, to allow top-level tests after micro-suite has been run. Used in... (Debugging a successful test, Debugging script and environment), (Debugging a failed test): ...these new tests. The first of these is fixed by... * lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT): New macro, split out from... (AT_INIT): ...here, so that using -d also generates a run script. Document that -d inhibits top-level logging. * doc/autoconf.texi (testsuite Invocation): Document that -d only inhibits top-level logging; debug scripts are created. * lib/autotest/general.m4 (_AT_CHECK): Avoid syntax error on empty check. * tests/autotest.at (Empty test, Empty check): New test to check it. * lib/autoconf/c.m4 (AC_C_CONST, AC_C_VOLATILE): Avoid warnings from gcc. 2006-04-10 Stepan Kasal * tests/mktests.sh: Use "trap '' 0", not "trap 0". Do not touch the files if a problem appears. Make the empty *.at files read-only, too. Proposed by Ralf Wildenhues. 2006-04-10 Ralf Wildenhues * config/Makefile.am: Add comment to force updated Makefile.in. * lib/freeze.mk: Fix typo in comment. Unlike the last, white space only patch to this file, this patch causes the Makefile.in files that include freeze.mk to be updated, and thus have a newer time stamp again, which in turn makes a pristine CVS checkout have correct time stamps. * Makefile.maint (cvs-sv): New macro, to be used.. (config.guess-url_prefix, config.sub-url_prefix) (texinfo.tex-url_prefix, standards.texi-url_prefix): ..here; point to CVS text checkout of Gnulib files. (copyright-check): Bump current year. (announcement): Do not hard-wire `./announce-gen'. (cvs-update): Propagate failures of `cvs' and `move-if-change' correctly. * Makefile.cfg (executable-update): Use `chmod a+x' instead of `chmod +x'. (wget_files): Update config.guess, config.sub, texinfo.tex by `wget-update', now that their URLs work again. 2006-04-10 Paul Eggert * doc/autoconf.texi (Particular Types): Don't use AC_CHECK_TYPE. Problem noted by Paul D. Smith. 2006-04-10 Ralf Wildenhues * doc/autoconf.texi: Remove unused words from word list. * .x-sc_prohibit_atoi_atof, .x-sc_space_tab, .x-sc_sun_os_names, .x-sc_trailing_space: New files. * doc/standards.texi: Sync from gnulib. * NEWS, doc/autoconf.texi (AC_LIBOBJ vs LIBOBJS): Mark `LIBOBJDIR' as experimental. * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): MSYS `ln -s' fails with a target directory; it's internally implemented as `cp' anyway, but since Autoconf advertises the possibility to use a target directory when LN_S is `ln -s', we need to find out. Reported by Rolf Ebert against MSYS, analyzed by Keith Marshall . * THANKS: Update. 2006-04-10 Paul Eggert * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Just output confdefs.h as-is. In general, if it has backslash-newline or the like, then it doesn't work either to sort or to remove empty lines. 2006-04-09 Stepan Kasal * tests/Makefile.am (AUTOCONF_FILES): Fix typo in the comment. 2006-04-09 Alexandre Duret-Lutz * lib/autom4te.in (Automake-preselections): Preselect _AM_SUBST_NOTMAKE. 2006-04-08 Paul Eggert * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Use '\'' for an apostrophe within a single-quoted string, as this is the usual tradition and is easier to read than '"'"'. Don't rely on the shell treating "$/" like '$/'. Use a more-consistent indenting style for the trap. 2006-04-09 Eric Blake * tests/autotest.at (Backquote command substitution), (Multiline backquote command substitution): Remove mistaken AT_NO_CMDSUBST from the 2006-03-14 patch, which was meant to be applied... (Parenthetical command substitution, Multiline parenthetical command substitution): here. 2006-04-08 Paul Eggert Import macros from gnulib (often changing their name). * NEWS: AC_C_TYPE_LONG_DOUBLE is now obsolete. New macros AC_CHECK_DECLS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_HEADERS_ONCE, AC_FUNC_STRTOLD, AC_HEADER_ASSERT, AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE, AC_TYPE_LONG_DOUBLE, AC_TYPE_LONG_DOUBLE_WIDER, AC_TYPE_INT8_T, AC_TYPE_INT16_T, AC_TYPE_INT32_T, AC_TYPE_INT64_T, AC_TYPE_INTMAX_T, AC_TYPE_INTPTR_T, AC_TYPE_LONG_LONG_INT, AC_TYPE_UINT8_T, AC_TYPE_UINT16_T, AC_TYPE_UINT32_T, AC_TYPE_UINT64_T, AC_TYPE_UINTMAX_T, AC_TYPE_UINTPTR_T, AC_TYPE_UNSIGNED_LONG_LONG_INT, AC_USE_SYSTEM_EXTENSIONS. The manual mentions Gnulib more prominently. * doc/autoconf.texi (Gnulib): New node. (Pointers): Add Gnulib URL. (Particular Functions): Alphabetize. Add AC_FUNC_STRTOLD. (Generic Functions): Add AC_CHECK_FUNCS_ONCE. Refer to new Gnulib section. (Particular Headers): Add AC_HEADER_ASSERT. For stdbool.h, suggest a #define rather than a typedef for _Bool, and mention Gnulib rather than trying to substitute stdbool code. (Generic Headers): Add AC_CHECK_HEADERS_ONCE. (Generic Declarations): Add AC_CHECK_DECLS_ONCE. (Particular Structures): Add AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE. (Particular Types): Mention stdint.h and inttypes.h as standard headers too. Add AC_TYPE_INT8_T, AC_TYPE_INT16_T, AC_TYPE_INT32_T, AC_TYPE_INT64_T, AC_TYPE_INTMAX_T, AC_TYPE_INTPTR_T, AC_TYPE_LONG_DOUBLE, AC_TYPE_LONG_DOUBLE_WIDER, AC_TYPE_LONG_LONG_INT, AC_TYPE_UINT8_T, AC_TYPE_UINT16_T, AC_TYPE_UINT32_T, AC_TYPE_UINT64_T, AC_TYPE_UINTMAX_T, AC_TYPE_UINTPTR_T, AC_TYPE_UNSIGNED_LONG_LONG_INT. (C Compiler): Move AC_C_LONG_DOUBLE to ... (Obsolete Macros): here. Under AC_LONG_DOUBLE, mention AC_TYPE_LONG_DOUBLE or AC_TYPE_LONG_DOUBLE_WIDER instead. (Posix Variants): Add AC_USE_SYSTEM_EXTENSIONS. (Coding Style). Don't mention m4_expand_once. * lib/autoconf/c.m4 (AC_C_LONG_DOUBLE): Implement via AC_TYPE_LONG_DOUBLE_WIDER. Now obsolete. * lib/autoconf/functions.m4 (_AH_CHECK_FUNCS): New macro. (AC_CHECK_FUNCS): Use it. (AC_CHECK_FUNCS_ONCE, AC_FUNC_STRTOLD): New macros. (AC_FUNC_WAIT3): "the Open Group standards" -> "POSIX". * lib/autoconf/general.m4 (AC_CHECK_DECLS_ONCE): New macro. * lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): New macro. (AC_HEADER_ASSERT): New macro. (AC_HEADER_STDBOOL): Don't assume "#error" works. Catch a bug in IBM AIX xlc compiler version 6.0.0.0. Catch a bug in an HP-UX C compiler. * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): New macro. * lib/autoconf/types.m4 (AC_TYPE_INTMAX_T. AC_TYPE_UINTMAX_T): (AC_TYPE_INTPTR_T, AC_TYPE_UINTPTR_T. AC_TYPE_LONG_DOUBLE): (AC_TYPE_LONG_DOUBLE_WIDER, AC_C_LONG_DOUBLE, AC_TYPE_LONG_LONG_INT): (AC_TYPE_UNSIGNED_LONG_LONG_INT, _AC_TYPE_INT, _AC_TYPE_UNSIGNED_INT): (_AC_STRUCT_DIRENT, AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE): New macros. * tests/mktests.sh (ac_exclude_list, au_exclude_list): Do not use /^foo|bar$/, it does not mean /^(foo|bar)$/. 2006-04-08 Stepan Kasal * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Fix the wording of the warning introduced by the 2001-08-28 change. 2006-04-08 Stepan Kasal , Ralf Wildenhues * lib/autoconf/general.m4 (AC_CACHE_SAVE): All `ac_cv_env_foo' variables shall be overriden by the cache. * tests/torture.at (AC_ARG_VAR): Test also with a first value that contains braces. 2006-04-07 Stepan Kasal Revert the patch from 2006-04-01 and only improve _AS_DETECT_BETTER_SHELL: * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Do not optimize; do not skip nonexistent directories. (_AS_DETECT_BETTER_SHELL): The optimization is moved here--try only shell candidates which exist. (AS_UNAME): No need to give three parameters to _AS_PATH_WALK. * lib/autotest/general.m4 (AT_INIT): No need to give three parameters to _AS_PATH_WALK. 2006-04-07 Stepan Kasal , Ralf Wildenhues * bin/autoupdate.in (handle_autoconf_patches): Change the way we distinguish m4sugar macros. * tests/tools.at (autoupdating with aclocal and m4_include): New test. Bug reported by Gary V. Vaughan , test case by Noah Misch . 2006-04-07 Stepan Kasal Revert my change from 2006-03-17, in other words: * lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Insert BIN_SH=xpg4 and DUALCASE=1. (AS_SHELL_SANITIZE): Remove DUALCASE=1. * doc/autoconf.texi (Special Shell Variables) : Say that it is set. 2006-04-07 Eric Blake * doc/autoconf.texi (Programming in M4sh): Document that AS_MKDIR_P exits the script on failure. * lib/autotest/general.m4: Remove redundant AS_ERROR. 2006-04-07 Ralf Wildenhues * config/elisp-comp, config/install-sh, config/mdate-sh, config/missing, config/mkinstalldirs: Sync from Automake. * lib/Autom4te/FileUtils.pm, lib/Autom4te/Struct.pm: Sync from Automake. * doc/make-stds.texi: Sync from gnulib. 2006-04-06 Eric Blake * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_O): Inside cache check, s/ac_exeext/ac_cv_exeext/. Fixes regression introduced 2006-04-01. 2006-04-06 Stepan Kasal , Eric Blake , Paul Eggert , Ralf Wildenhues * lib/autoconf/general.m4 (_AC_CACHE_DUMP): Fix the detection of whether `set' quotes correctly: redirect stderr of the tested `set', and use a subshell, for Ultrix; use `sed' instead of `grep' for zsh `set' which may write binary output; match only at the beginning of a line, to avoid false positives. In order to avoid false positives by unrelated variables with multiline content, put the dump algorithm in a subshell and unset all variables containing newlines (except some which are special to the shell). Warn about cache variables that are unset. 2006-04-06 Ralf Wildenhues * config/config.guess, config/config.sub, config/texinfo.tex: Sync from upstream. * tests/mktests.sh: Reword comments. * tests/mktests.sh: Only skip internal macros starting with `_AC_' or `__AC_'. Noted by Stepan Kasal. Update exclusion lists for the test suite to this end: (AC_ARG_VAR): Do test this now. (AC_SEARCH_LIBS, AC_REPLACE_FUNCS): Need an argument. (AC_LINKER_OPTION): Remove (renamed to _AC_LINKER_OPTION). (AC_LIST_MEMBER_OF): Likewise (renamed to _AC_LIST_MEMBER_IF). (AC_LINK_FILES): Obsoleted since (and thus AU_DEFUN'ed). * doc/autoconf.texi (Shell Substitutions): Mention the MSYS shell issue with double-quoted command substitutions of native commands. Reported to MSYS by Mark Cave-Ayland, to Autoconf by Keith Marshall. * Makefile.maint (sc_cast_of_argument_to_free): Do not fail when no file matches the glob, discard the warning, set `nullglob'. (syntax-check): Likewise. (sc_cast_of_x_alloc_return_value): Likewise. (sc_cast_of_alloca_return_value, sc_error_exit_success) (sc_prohibit_jm_in_m4, .re-list, sc_unmarked_diagnostics) (m4-check): Likewise. (sc_system_h_headers): Do not print rule on execution. (sc_tight_scope): Do not fail for non-existing `src' directory. (sc_changelog): Skip the Copyright footer. * lib/autoconf/lang.m4: Remove trailing space. * lib/autoconf/status.m4: More replacements to where this makes sense. 2006-04-06 Stepan Kasal * tests/Makefile.am (maintainer-check-posix): s/POSIXLY_CORRECTLY/POSIXLY_CORRECT/ * lib/autoconf/status.m4 (_AC_CONFIG_FOOS): Append TAGS to ac_config_s again, sometimes normalized, sometimes not. (AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_LINKS): (AC_CONFIG_COMMANDS): Do not do so here. (_AC_CONFIG_REGISTER_DEST): Double quote the tags in macros _AC_LIST_TAGS and_AC_LIST_TAG_COMMANDS; fixes another regression introduced by the 2005-07-25 rewrite. Noticed by Noah Misch. * lib/autoconf/general.m4 (AC_PRESERVE_HELP_ORDER): Do not define _AC_PRESERVE_HELP_ORDER, ... (AC_ARG_ENABLE, AC_ARG_WITH): ... use AC_PROVIDE_IFELSE insetad. * lib/autoconf/general.m4 (AC_ARG_VAR): Do not use m4_divert_once inside m4_expand_once; it is redundant. * lib/autoconf/general.m4 (_AC_INIT_HELP): Remove the broken support for --help from Cygnus `configure.' 2006-04-06 Paul Eggert * doc/autoconf.texi (C Compiler): Warn about #error. Follows up on a patch proposed by Ralf Wildenhues. 2006-04-05 Paul Eggert * lib/autoconf/status.m4: Replace '' with where this makes sense. 2006-04-05 Howard Chu (trivial change) Noah Misch * lib/autoconf/general.m4 (AC_PRESERVE_HELP_ORDER): New macro. (AC_ARG_ENABLE, AC_ARG_WITH): Adjust. * doc/autoconf.texi (Help Formatting): New node. * NEWS: Announce AC_PRESERVE_HELP_ORDER. 2006-04-05 Ralf Wildenhues * TODO, config/Makefile.am, lib/freeze.mk, lib/autoconf/c.m4, lib/autoconf/specific.m4, lib/autoconf/status.m4, lib/autoconf/types.m4, lib/autotest/general.m4, tests/mktests.sh, tests/torture.at: White space cleanup: remove some SPACE before TAB, or add quoting ('' or @&t@). * NEWS, TODO, bin/autoreconf.in: `filesystem' -> `file system'. * doc/autoconf.texi (Shell Substitutions): Document `^' vs. `|'. 2006-04-05 Eric Blake * lib/autotest/general.m4 (AT_INIT): Prep AT_*_all, so that an empty test suite works. * tests/autotest.at (Empty test suite): Remove xfail. 2006-04-05 Noah Misch * lib/autoconf/status.m4 (_AC_CONFIG_FOOS): Do not append normalized TAGS to ac_config_s. (AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_LINKS): Do so here. (AC_CONFIG_COMMANDS): Append NAME to ac_config_commands without normalizing it, consistent it with previous releases. * tests/torture.at (Macro calls in AC_CONFIG_COMMANDS tags): New test. 2006-04-05 Paul Eggert * lib/m4sugar/m4sh.m4 (AS_BASENAME_EXPR, AS_DIRNAME_EXPR): Use simplified args that Eric Blake originally suggested. 2006-04-04 Paul Eggert * tests/mktests.sh: Don't use 'cat'; just read the files directly. Prefer 'sort -u' to 'sort | uniq'. Filter data before sorting it. Use 'comm' rather than N instances of grep; this also fixes a bug whereby substrings were incorrectly matched, causing us to not generate tests for AC_F77_NAME_MANGLING and AC_FUNC_LSTAT. (exclude_list): Exclude empty macros. (ac_exclude_list): Exclude AC_INCLUDES_DEFAULT. Use awk rather than grep -E or egrep, to avoid portability problems with regular expressions containing newlines. (exclude_list, ac_exclude_list, au_exclude_list, ac_exclude_script): Switch from grep to awk syntax. (ac_exclude_script): Renamed from ac_exclude_egrep. (au_exclude_script): Renamed from au_exclude_egrep. 2006-04-04 Noah Misch * lib/autoconf/general.m4 (_AC_INIT_HELP): Only `configure.in' evidences a subdirectory subject to Cygnus `configure'. * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Likewise. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Omit the bug report request when we have no AC_PACKAGE_BUGREPORT. 2006-04-03 Ralf Wildenhues * THANKS: Update. * tests/mktests.sh: Update copyright year in the header of the generated files. * lib/autoconf/c.m4 (AC_C_INLINE): Do not skip cleanup code. (AC_C_RESTRICT): Likewise. Furthermore, add a function with a typedef'ed restricted pointer, to catch a compiler bug on HP-UX 11.x, and fix warnings so it passes with -Werror. (_AC_PROG_CC_C99): Likewise. Reported by Albert Chin . * tests/mktests.sh: Do not skip AC_C_INLINE, AC_C_RESTRICT. 2006-04-03 Noah Misch * bin/autoscan.in (subdirs): New global. (scan_file): Prune directories with configure{,.{ac,in,gnu}}. (output): Emit AC_CONFIG_SUBDIRS as needed. * tests/autoscan.at (autoscan): Remove XFAIL. 2006-04-03 Noah Misch * lib/autoconf/general.m4 (AC_CACHE_SAVE): Use AC_MSG_NOTICE. 2006-04-03 Eric Blake * THANKS: Add myself. 2006-04-03 Ralf Wildenhues * lib/autotest/general.m4 (AT_INIT): Add `at_testdir' to pointer to log, point to testsuite output tree. 2006-04-02 Paul Eggert * NEWS: AC_PROG_CC and AC_PROG_CXX no longer declare 'exit'. * doc/autoconf.texi (Function Portability): Mention that C++ has trouble with 'exit'. (Guidelines): Test programs shouldn't use 'exit'. * lib/autoconf/c.m4 (_AC_PROG_CXX_EXIT_DECLARATION): Remove; all uses removed. (AC_LANG_INT_SAVE(C), AC_C_BIGENDIAN): Return from 'main' instead of calling 'exit'. * lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_CLOSEDIR_VOID): (_AC_FUNC_FNMATCH_IF, AC_FUNC_GETGROUPS): (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, _AC_FUNC_MALLOC_IF): (AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_MMAP, _AC_FUNC_REALLOC_IF): (AC_FUNC_SETPGRP, _AC_FUNC_STAT, AC_FUNC_STRTOD, AC_FUNC_STRERROR_R): (AC_FUNC_STRNLEN, AC_FUNC_SETVBUF_REVERSED, AC_FUNC_UTIME_NULL): (_AC_FUNC_FORK, _AC_FUNC_VFORK, AC_FUNC_WAIT3): Likewise. * lib/autoconf/headers.m4 (AC_HEADER_STDC): Likewise. * lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise. * lib/autoconf/types.m4 (AC_TYPE_GETGROUPS): Likewise. * tests/compile.at: Likewise. 2006-04-02 Pavel Roskin * doc/autoconf.texi (AC_PATH_X): Update per 2005-08-26 change. 2006-04-01 Stepan Kasal Clean up _AC_COMPILER_EXEEXT* macros. * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Don't try to detect exeext, it will be done by _AC_COMPILER_EXEEXT_O; just set ac_file to the name of the default output file and call _AC_COMPILER_EXEEXT_WORKS. Move the definition of ac_files and the initial `rm' of the candidate files... (_AC_COMPILER_EXEEXT): ... here and simplify them. Moreover, use the same list in subsequent `rm' calls, and for the temporary redefinition of ac_clean_files; call _AC_COMPILER_OBJEXT at the end, and don't call the other _AC_COMPILER_EXEEXT_* macros directly, use... (_AC_COMPILER_EXEEXT_TESTS): ... this new macro. (_AC_COMPILER_EXEEXT_O): Don't export ac_cv_exeext, it's not needed (or no longer needed) by libtool. Make it a cache check. (_AC_COMPILER_EXEEXT_CROSS): Remove the comment, it was obviously copied here by mistake. (AC_NO_EXECUTABLES): Redefine _AC_COMPILER_EXEEXT_TESTS, not _AC_COMPILER_EXEEXT. * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Do not call _AC_COMPILER_OBJEXT directly. * lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise. 2006-04-01 Stepan Kasal * lib/m4sugar/m4sh.m4 (_AS_DIRNAME_PREPARE): New macro. (AS_DIRNAME): Use it. (_AS_PREPARE): Add _AS_DIRNAME_PREPARE. * tests/*.at: Remove the generated ones. 2006-04-01 Stepan Kasal * lib/autotest/general.m4 (AT_INIT): Don't optimize the first PATH walk. 2006-04-01 Eric Blake * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Optimize nonexistent directories, unless optional third argument supplied. (AS_UNAME): Don't optimize PATH walk. * lib/Autom4te/Struct.pm, lib/autoconf/c.m4: s/non-existent/nonexistent/ 2006-04-01 Eric Blake and Stepan Kasal * lib/m4sugar/m4sh.m4: Sort sections as implied by the comments, and fix some typos. 2006-04-01 Noah Misch * lib/autoconf/general.m4 (_AC_INIT_VERSION): Emit script name and Autoconf version number despite a zero- or one-argument AC_INIT. * bin/autoreconf.in (parse_args): Multiple -v send --verbose to subordinate tools. * lib/Autom4te/General.pm (getopt): Make -v and -d incremental. * doc/autoconf.texi (autoreconf Invocation): Document it. * doc/autoconf.texi: Use `Cygwin', `MinGW', and `license' consistently. Append LocalWords so ispell-buffer passes cleanly. Spelling fixes. 2006-04-01 Eric Blake * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Allow use in shell lists. * lib/autotest/general.m4: Be tolerant of existing directory when rm failed to remove it. 2006-04-01 Ralf Wildenhues * bin/autoupdate.in: Redefine m4_location so that warnings print the correct lines of the input file by subtracting.. (_au__first_line): ..this new definition. * lib/autoconf/general.m4 (AC_COMPILE_CHECK): Prefer AC_MSG_CHECKING over obsolete AC_CHECKING in autoupdated code. Remove stray newline in output. (AC_FOREACH): AU_DEFUN this as literal for autoupdate, and also AC_DEFUN this for autoconf, including the obsoletion diagnose. Fixes autoupdating of code where the replacement output contains m4sugar macros. * lib/autoconf/lang.m4 (AC_LANG_SAVE): Likewise. * tests/mktests.sh (ac_exclude_list): Add AC_FOREACH. (au_exclude_list): Add AC_LANG_SAVE. * tests/tools.at: Several new tests for all of this. * doc/autoconf.texi (Obsoleting Macros): Give a hint about the hairy details. The AC_LANG_SAVE issue was reported against Libtool by Dalibor Topic , and against Autoconf 2.57 by Kristian Kvilekval . 2006-04-01 Stepan Kasal * bin/autoupdate.in: Handle m4 builtins and m4sugar macros together-- switch all of them on and of when necessary. Fixes the bug when m4sugar macros (e.g., m4_define) were expanded after the first automatic update (e.g., after AC_PREREQ or AC_INIT). 2006-03-31 Paul Eggert * doc/autoconf.texi (Programming in M4sh): Sharpen the descriptions of AS_BASENAME and AS_DIRNAME. Reported by Stepan Kasal. * lib/m4sugar/m4sh.m4 (AS_BASENAME_EXPR): Handle ///, ////, etc. correctly. Problem reported by Eric Blake. (_AS_EXPR_PREPARE): Detect Tru64 expr bug. Problem reported by Ralf Wildenhues. 2006-03-30 Paul Eggert * doc/autoconf.texi (Programming in M4sh, Limitations of Usual Tools): Tighten up the basename/dirname wording. 2006-03-30 Ralf Wildenhues * Makefile.maint (sc_texi_notab): New check: do not use TABs in texinfo files outside of verbatim environments. (syntax-check-rules): Update. * doc/autoconf.texi (Configuration Headers): Conform to it. 2006-03-30 Chris Pickett (tiny change) * doc/autoconf.texi (autoreconf Invocation): Mention that -I for aclocal cannot be given on the command line. 2006-03-29 Paul Eggert * doc/autoconf.texi (Programming in M4sh): Mention AS_BASENAME. Give an example for AS_DIRNAME instead of referring to Posix.. (File System Conventions): Put discussion of // versus / here, and modernize it a bit. (Limitations of Usual Tools): Add basename. Remove verbiage after dirname, since it got moved to the above sections. All this was inspired by a patch proposed earlier by Eric Blake. 2006-03-27 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Quote `$0' to protect against spaces. * lib/autotest/general.m4 (AT_INIT): Likewise. * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Likewise, for `$0', $as_me. 2006-03-26 Ralf Wildenhues * bin/autoscan.in: The value of find_configure_ac should be checked for existence, so we don't barf over a nonexisting configure.ac. Reported by Laurence Darby . 2006-03-22 Ralf Wildenhues * bin/autoupdate.in: Fix some typos. 2006-03-21 Stepan Kasal * doc/autoconf.texi (Installation Directory Variables): Fix typo. * lib/autoscan/autoscan.list: Refreshed. 2006-03-20 Ralf Wildenhues * tests/local.at (AT_CHECK_ENV): Ignore AC_SUBSTed Objective C and Erlang related variables. * lib/autoconf/c.m4 (AC_LANG(Objective C), AC_LANG_OBJC) (_AC_LANG_ABBREV(Objective C), _AC_LANG_PREFIX(Objective C)) (AC_LANG_SOURCE(Objective C), AC_LANG_PROGRAM(Objective C)) (AC_LANG_CALL(Objective C), AC_LANG_FUNC_LINK_TRY(Objective C)) (AC_LANG_BOOL_COMPILE_TRY(Objective C)) (AC_LANG_INT_SAVE(Objective C), AC_LANG_PREPROC(Objective C)) (AC_PROG_OBJCPP, AC_LANG_COMPILER(Objective C), AC_PROG_OBJC) (_AC_PROG_OBJC_G): New macros. (_AC_ARG_VAR_CPPFLAGS): Adjusted. * doc/autoconf.texi (Objective C Compiler): New node. (Preset Output Variables): Document OBJCFLAGS. (Language Choice): Document `Objective C' language. (Fortran Compiler): Fix typo. * NEWS: Updated. Inspired by a patch from David M. Lloyd . 2006-03-20 Stepan Kasal * doc/autoconf.texi (Default Includes): Fix typo s/AC_HEADERS_STDC/AC_HEADER_STDC/ (Limitations of Usual Tools): s/unwriteable/unwritable/ * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT): Fix typos in the comments. 2006-03-17 Stepan Kasal * lib/autoconf/programs.m4 (AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Factor out the warning to... (_AC_TOOL_WARN): ... this new macro; use `cross_compiling'. * tests/local.at (AT_CHECK_MACRO_CROSS): Avoid this warning. * tests/semantics.at (AC_C_BIGENDIAN): Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Do not special case `ac_delim' when writing the sed script. * lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Removed BIN_SH=xpg4, moved DUALCASE=1 ... (AS_SHELL_SANITIZE): ... here. * doc/autoconf.texi (Special Shell Variables) : Do not say that it is set. * lib/autoconf/programs.m4 (AC_CHECK_PROG): Quote the parameter of AC_SUBST. (_AC_PATH_PROG): Store the result to VARIABLE. (AC_PATH_PROG): No need to set VARIABLE again. * tests/local.at (AT_CHECK_MACRO_CROSS): New macro, creates two tests: the first one is usual AT_CHECK_MACRO test, the second one checks that the same works when cross-compiling. * tests/semantics.at (AC_CHECK_ALIGNOF, AC_CHECK_ALIGNOF struct): (AC_CHECK_SIZEOF, AC_CHECK_SIZEOF struct): Use it. 2006-03-17 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Prepend the directory `/usr/bin/posix' in the shell search, to prefer the Posix shell not only in subsequent spawns as with `$BIN_SH' on Tru64. * doc/autoconf.texi (contents): To fix texi2html output, hide `@setcontentsaftertitlepage' for HTML. (Writing Autoconf Macros): Likewise, insert space after `@c'. (Leviticus, Numbers, Deuteronomy): Likewise, change `@,c' to `@,{c}'. 2006-03-16 Stepan Kasal * lib/m4sugar/m4sh.m4 (_AS_PREPARE): Move the IFS setup and CDPATH sanitizing... (AS_SHELL_SANITIZE): ...here; mention _AS_PATH_WALK needs IFS set. * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Add an explanation why IFS is restored so late; thank you, Ralf, for reminding us. 2006-03-15 Stepan Kasal * doc/autoconf.texi (Pretty Help Strings): No need to use cached variables in the examples. 2006-03-14 Romain Lenglet * doc/autoconf.texi (several sections): Cleaned up documentation for macros in erlang.m4. 2006-03-14 Ralf Wildenhues * tests/autotest.at (AT_NO_CMDSUBST): New macro to determine failure condition for `$(cmd)' style command substitutions. (Parenthetical command substitution, Multiline parenthetical command substitution): Use it. * doc/autoconf.texi (Special Shell Variables): Missing word. Reported by Keith Marshall . * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Do not forget to reset IFS even in case of empty `$PATH'. 2006-03-12 Ralf Wildenhues * lib/autotest/general.m4 (AT_INIT) : Optimize `expr' away if there is nothing to do. < --keywords >: Simplify and robustify argument handling. Revert erroneous comment from 2005-08-23. Extend to allow keyword negation with `!'. Update help message. Remove broken code to prevent running tests multiple times. * doc/autoconf.texi (testsuite Invocation) < --keywords >: Update and fix the documentation accordingly. * tests/autotest.at (Keywords): Renamed to.. (Keywords and ranges): .. this. Extended to make sure negated keywords, keywords taken from AT_SETUP arguments, and numeric test ranges work, and that matching is case-insensitive. 2006-03-11 Ralf Wildenhues * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW): Use a typedef to allow to pass unnamed structs even in C++. (AC_CHECK_SIZEOF): Likewise. Also fix quoting error in `AC_MSG_FAILURE' arguments. * tests/semantics.at (AC_CHECK_ALIGNOF struct, AC_CHECK_SIZEOF struct): New tests for unnamed structs, each both native and cross-compiling. * lib/autoconf/c.m4 (AC_C_TYPEOF): Use typedef to avoid defining a structure inside a cast, for C++ conformance. * lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Likewise. Also fix quoting error in `AC_MSG_FAILURE' arguments. * lib/autoconf/c.m4 (AC_PROG_CC_STDC): If we cannot enable C99 nor C89 mode, set `$ac_cv_prog_cc_stdc' to `no' instead of trying to execute the command `no'. * lib/autoconf/lang.m4 (AC_LANG_CONFTEST): AC_DEFUN this, not m4_define, so that the requirements of `AC_INCLUDES_DEFAULT' are expanded outside. * doc/autoconf.texi (autoconf Invocation): Fix typos in trace example. Do not emphasize `$%', it is hardly new and special. Reported by Edouard Bechetoille . * doc/autoconf.texi (Limitations of Usual Tools): Document OpenBSD and traditional `grep' failure to handle multiple patterns separated by newlines. 2006-03-10 Romain Lenglet * doc/autoconf.texi (several sections): Add documentation for macros in erlang.m4. 2006-03-10 Eric Blake * doc/autoconf.texi (Obsolete Macros): Fix wording of AC_TRY_LINK_FUNC. 2006-03-10 Paul Eggert * doc/autoconf.texi: Use @acronym more consistently for acronyms like BSD, GPL, LGPL. Fix minor English typos. (AC_STDC_HEADERS, AC_PROG_GCC_TRADITIONAL): Mention that these macros are becoming obsolete. (AC_STDC_HEADERS, AC_PROG_CC, AC_C_CONST, AC_C_VOLATILE): Use more modern terminology for which standard is what. (AC_PROG_CC): Mention gcc first, and remove obsolete references to egcs and to ansi2knr. (AC_PROG_CXX): Likewise. (AC_C_PROTOTYPES, Test Functions, AC_LIBOBJ vs LIBOBJS): Remove obsolete discussion about how to port to K&R. (Guidelines for Test Programs): Suggest AC_HEADER_STDBOOL rather than the obsolescent AC_HEADER_STDC. (AC_FOO_IFELSE vs AC_TRY_FOO): Don't use #error; test programs can't rely on it. 2006-03-08 Ralf Wildenhues * tests/c.at (AC_PROG_CPP without warnings, AC_PROG_CPP via CC): Remove stdin redirection from /dev/null to allow pipe to work. 2006-03-08 Paul Eggert * tests/c.at (AC_PROG_CPP without warnings, AC_PROG_CPP via CC): Require that /lib/cpp include stdio.h correctly. Solaris 10's doesn't. Problem reported by D'Arcy A MacIsaac and diagnosed by Ralf Wildenhues. 2006-03-06 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): The limit for HP-UX sed is 99 commands, not 100. (_AC_OUTPUT_FILES_PREPARE): Do not count the `}' of an _AC_SUBST_FILES fragment. Separate `{' and `r' commands by newline for portability. * tests/torture.at (Torturing config.status): Also test 100 AC_SUBST_FILE invocations. Fix test to actually verify the AC_CONFIG_FILES output. * doc/autoconf.texi (Limitations of Usual Tools): Document HP-UX command, label, and read-file `r' limits. Unify HP-UX spelling. * tests/Makefile.am (edit, $(wrappers)): Do not use `$<' in non-suffix rule. ($(TESTSUITE_GENERATED_AT)): Use `$(srcdir)` for the benefit of non-GNU make. (autoconfdir, $(AUTOCONF_FILES)): Likewise. * tests/mktests.sh: Small shell portability fixes. 2006-03-05 Ralf Wildenhues * doc/autoconf.texi (Caching Results): Fix the examples to use a recommended quoting style and discard unwanted output. 2006-03-05 Paul Eggert * lib/autotest/general.m4 (_AT_NORMALIZE_TEST_GROUP_NUMBER): New macro. (AT_INIT): Use it, to remove arbitrary limit of 999,999 test cases, and to work around Tru64 expr bug. 2006-03-05 Ralf Wildenhues * doc/autoconf.texi (Limitations of Usual Tools): Mention Tru64 expr bug that turns the result of a regex match into a number if possible. 2006-03-04 Ralf Wildenhues * lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Work around HPUX compiler bug, similarly to AC_CHECK_SIZEOF, as documented in section `Specific Compiler Characteristics'. 2006-03-04 Eric Blake * lib/autoconf/functions.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning. 2006-03-01 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Force correct order of variable initialization, so even the Solaris 2.6 shell can create a config header correctly. Fixes lots of test suite failures. 2006-02-22 Ralf Wildenhues * doc/autoconf.texi (Text processing Macros): New node to document the m4sugar macros m4_re_escape, m4_tolower, m4_toupper, m4_split, m4_normalize, m4_append, m4_append_uniq. 2006-02-22 Paul Eggert * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Fix typo: XrmInitialize (0) -> XrmInitialize (). Reported by Toshio Kuratomi. 2006-02-21 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (AS_IF): Extend to allow more than one test, as in `if tests; then cmd1; elif ...; else ...; fi'. * doc/autoconf.texi (Programming in M4sh): Adjusted. * tests/m4sh.at (AS_IF and AS_CASE): Test this. Also make sure both macros are defun'ed so that required macros are evaluated outside. * doc/autoconf.texi (Prerequisite Macros): State more precisely where a required macro will be expanded. (Coding Style): Another reason not to use `m4_define'. 2006-02-21 Eric Blake * lib/autoconf/general.m4 (_AC_LIBOBJ): Minor optimization. 2006-02-20 Ralf Wildenhues * doc/autoconf.texi (Looping constructs): New node, to document m4_for, m4_foreach, m4_foreach_w, and mention obsolete AC_FOREACH. (Obsolete Macros): Document AC_FOREACH. * lib/m4sugar/m4sugar.m4 (_m4_for): Fix declaration comment. (m4_for): Fix to never loop (almost) endlessly, work correctly with arithmetic expressions in arguments, a step of zero or non-integer multiple of the interval, and avoid integer overflow. * tests/m4sugar.at: New test for m4_for, m4_foreach, and m4_foreach_w. 2006-02-20 Romain Lenglet Add basic support for Erlang, both for configuring Erlang/OTP tools, and Erlang as a conf test language. * lib/autoconf/erlang.m4: New file. * lib/autoconf/autoconf.m4: Add erlang.m4. * lib/autoconf/Makefile.am (dist_autoconflib_DATA): Likewise. * lib/freeze.mk (autoconf_m4f_dependencies): Likewise. * NEWS: Add short description of new macros. * THANKS: Add Romain Lenglet. 2006-02-20 Ralf Wildenhues * doc/autoconf.texi (Shellology) : Document that pdksh as native /bin/sh may not set KSH_VERSION (seen on OpenBSD). 2006-02-15 Eric Blake * lib/autoconf/general.m4 (AC_CHECK_DECL): Avoid unused variable warning. 2006-02-15 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (AS_CASE): New macro. (_AS_CASE): Private helper macro. * tests/m4sh.at: Basic tests for AS_IF and AS_CASE. * doc/autoconf.texi (Programming in M4sh): Document AS_CASE. Fix syntax of AS_IF description (Prerequisite Macros): Mention AS_IF and AS_CASE as workarounds for the AC_REQUIRE mess. * NEWS: Mention AS_CASE, AS_BOURNE_COMPATIBLE, and AS_SHELL_SANITIZE. 2006-02-14 Paul Eggert * doc/autoconf.texi: Minor style cleanup. Be consistent about spaces after commas. Insert [] where empty args look a bit funny. Fix some "i.e." and "e.g." usages. Try to avoid "X/Y" usages. Don't be pedantic about "ISO C99"; just say C99. Prefer GNU style for spaces in front of parens. (Function Portability): Comment about C89 versus C99 signed integer division. (Particular Headers): Use current gnulib style for dirent includes. 2006-02-14 Stepan Kasal and Ralf Wildenhues * bin/autoupdate.in (handle_autoconf_macros): Fix updating of macros without parameters. * lib/autoconf/autoupdate.m4 (AU_ALIAS): Likewise. * doc/autoconf.texi (Obsoleting Macros): Document AU_ALIAS. * tests/tools.at (autoupdating AU_ALIAS): New test for AU_ALIAS `$#' bug. (autoupdate): Updated to match AU_ALIAS fix. 2006-02-13 Ralf Wildenhues and Paul Eggert * doc/autoconf.texi (Programming in M4sh): Document AS_BOURNE_COMPATIBLE and AS_SHELL_SANITIZE. 2006-02-13 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Renamed to.. (AS_BOURNE_COMPATIBLE): ..this. (_AS_RUN, AS_SHELL_SANITIZE): Adjusted all callers. 2006-02-12 Paul Eggert * doc/install.texi (Defining Variables): Tighten up the CONFIG_SHELL wording. 2006-02-12 Paul Eggert and Ralf Wildenhues * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Look at the output of (set -o) rather than testing whether (set -o posix) succeeds, to work around a bug in the AIX 5.3 shell. Problem originally reportd by Howard Chu for libtool. 2006-02-10 J.T. Conklin * doc/autoconf.texi (Running the Compiler, Running the Linker): Changes the macro arguments in summaries to match the descriptions. 2006-02-04 Stepan Kasal * doc/install.texi (Defining Variables): Classify the `CONFIG_SHELL' hint as ``a workaround for a bug.'' 2006-01-31 Ralf Wildenhues * bin/autoreconf.in: New option `--no-recursive'. Improve wording for subpackages a bit. * doc/autoconf.texi (autoreconf Invocation): Updated. * NEWS: Updated. * doc/install.texi (Defining Variables): Put `CONFIG_SHELL' in environment of `configure', not the command line. Reported by Howard Chu . 2006-01-25 Paul Eggert * doc/autoconf.texi (Limitations of Builtins): Document the problem with "trap -". 2006-01-23 Steven G. Johnson * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS, _AC_FC_DUMMY_MAIN): (_AC_FC_MAIN, __AC_FC_NAME_MANGLING): Use _AC_LANG in check messages to differentiate Fortran and Fortran 77 tests. (AC_FC_SRCEXT, AC_FC_FREEFORM): Use AC_LANG_PUSH/POP instead of AC_LANG_ASSERT, to allow use in mixed-language projects. 2006-01-23 Paul Eggert * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)): Prefer "defined FOO" to "defined (FOO)". * lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA): Likewise. * lib/autoconf/headers.m4 (AC_HEADER_STAT): Likewise. * lib/autoconf/specific.m4 (AC_XENIX_DIR): Likewise. * tests/tools.at (ifnames): Likewise. 2006-01-21 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Do not pass `-q' to mktemp. * lib/Autom4te/General.pm (mktmpdir): Likewise. (END): Improve error message a bit. Reported by Bruce Korb . 2006-01-12 Ralf Wildenhues * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Ignore `-LIST:' and `-LNO:', for PathScale 2.3 compilers. 2006-01-11 Stepan Kasal * doc/autoconf.texi (Header Portability): On Solaris 8, sys/ptem.h requires sys/stream.h. Reported by Oliver Kiddle. 2006-01-11 Ralf Wildenhues Stepan Kasal * lib/autotest/general.m4 (AT_INIT): When ensuring writability before the removals of test dirs, use `find' to avoid modification of symlinked directories. 2006-01-11 Steven G. Johnson * lib/autoconf/fortran.m4 (AC_F77_DUMMY_MAIN, AC_FC_DUMMY_MAIN): Don't ignore the macro arguments. 2006-01-11 David Thompson * lib/autoconf/c.m4 (_AC_PROG_CXX_EXIT_DECLARATION): Add `exit' declaration that works for MSVC. 2006-01-11 Ralf Wildenhues * lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT_REJECT): Add `*.map' and `.inf' for Green Hills compiler. Reported by Stefan Seefeld . * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Handle quadrigraphs correctly: pad with spaces after FIRST_PREFIX if necessary, and compute string lenghts with `m4_qlen' instead of `m4_len'. * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Comments updated. * tests/m4sh.at (AS_HELP_STRING): Test extended. * NEWS: Updated. Reported by numerous people, numerous times. 2006-01-05 Paul Eggert * bin/autoconf.as, bin/autoheader.in, bin/autom4te.in * bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in: * lib/autoconf/general.m4, lib/autoconf/status.m4: * lib/autotest/general.m4, tests/local.at: Update copyright year to 2006. * Makefile.maint (sc_root_tests): Use the recommended style s/a/b/ for sed substitutions. * doc/autoconf.texi (Installation Directory Variables): Use s|a|b| for file names, again. Reported by Noah Misch. (Coding Style): Explain that s|a|b| is preferred for file names. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Prefer s/a/b/. (AC_OUTPUT_MAKE_DEFS): Likewise. * lib/autotest/general.m4 (AT_INIT): Likewise. * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Likewise. * tests/local.at (AT_CHECK_AUTOM4TE): Likewise. Fix Posix-conformance bugs re use of { command in sed scripts, and improve the sed-related documentation a bit. * doc/autoconf.texi (Installation Directory Variables): Use our own style advice re 's,a,b,' versus 's|a|b|'. Use "Sed" rather than "sed" when talking about Sed in general. (Particular Programs): Likewise. (Coding Style): y is like s with respect to / and ,. (Limitations of Usual Tools): Document the weird restrictions that Posix has about { }. Use better quoting. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE, _AC_OUTPUT_HEADER): Rewrite to conform to Posix rules about { } in sed scripts. * lib/m4sugar/m4sh.m4 (AS_DIRNAME_SED, AS_BASENAME_SED): Likewise. * tests/foreign.at (Libtool): Likewise. * tests/semantics.at (AC_CHECK_PROG & AC_CHECK_PROGS): Use our own style advice re 's,a,b,' versus 's|a|b|'. 2006-01-05 Ralf Wildenhues * lib/autoconf/status.m4: Fix typo. * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Ignore singly- or doubly-quoted arguments to `-cmdline', `-ignore', `-def', for the benefit of Portland `pgf90 -Mipa'. Reported by Christopher Hulbert . 2006-01-04 Paul Eggert * doc/autoconf.texi: Update copyright (and other) dates to 2006. * doc/autoconf.texi (Shellology): Mac OS X 10.2 changed the default shell from zsh to bash. 2005-12-31 Stepan Kasal * lib/autoconf/programs.m4 (_AC_PROG_GREP): Use $PATH_SEPARATOR; ":" caused problems on OS/2-EMX. Suggested by Andrew Belov. 2005-12-29 Paul Eggert * doc/autoconf.texi (Shell Substitutions): Warn about unbalanced parentheses in $(...). Problem reported by Eric Blake. 2005-12-12 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Mention which characters can be escaped with \ in portable regular expressions used in grep, sed, expr. Mention the leading ^ problem with expr. Clean up some confusing wording. Mention which grep options are portable. 2005-12-09 Stepan Kasal * tests/local.at (AT_CHECK_AUTOM4TE): Fix typo in the comment. 2005-12-02 Paul Eggert * doc/autoconf.texi (Limitations of Builtins): Fix typos in previous patch, noted by Ralf Wildenhues. 2005-12-02 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Try `set -o posix' unconditionally, for pdksh in `native sh' emulation. 2005-12-01 Paul Eggert * doc/autoconf.texi (Shellology): Document eval $? problem with ash. (Limitations of Builtins): Likewise. 2005-11-10 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Pass CONFIG_SHELL in the environment of the configure rerun. * doc/autoconf.texi (Here-Documents, config.status Invocation): Suggest passing CONFIG_SHELL absolute, and in the environment rather than as option. 2005-11-09 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix quoting of output line (triggered for many AC_SUBST_FILEs). Fix macro quoting. Fix output for n * 98 substituted variables. 2005-11-08 Ralf Wildenhues * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Initialize `tmp' to avoid file removal race. 2005-11-07 Ralf Wildenhues * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Initialize ac_clean_files and LIBOBJS. 2005-11-06 Ralf Wildenhues * lib/autoconf/programs.m4 (AC_CHECK_PROG, AC_PATH_PROG): Factor functionality to.. (_AC_CHECK_PROG, _AC_PATH_PROG): these new macros, but only `AC_SUBST($1)' in the public version. (AC_CHECK_TOOL, AC_PATH_TOOL, AC_PATH_TARGET_TOOL) (AC_CHECK_TARGET_TOOL): Use internal versions for ac_ct_* and ac_pt_* variables. 2005-11-01 Stepan Kasal * lib/autoconf/c.m4 (AC_PROG_CC_C_O): Remove the comment about 8+3 filesystems. 2005-11-01 Ralf Wildenhues * NEWS: Move AH_HEADER mention to right place. 2005-10-27 Stepan Kasal * lib/autoconf/c.m4 (AC_PROG_CC_C_O): "conftst2" -> "conftest2" * lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O): Likewise. 2005-10-25 Stepan Kasal * lib/autoconf/c.m4 (AC_PROG_CC_C_O): rm -f conftst2.*, not only conftst2.$ac_objext. * lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O): Likewise. 2005-10-24 Stepan Kasal * lib/autoconf/c.m4 (AC_PROG_CC_C_O): Use conftst2.o instead of conftest.o, to see whether the compiler really obeys; rm the object file before and after the test and register it with ac_clean_files. * lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O): Likewise. 2005-10-21 Stepan Kasal * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): When determining, the delimiter CEOF$ac_eof: fix quoting of CEOF[0-9]* and modify the code so that the most common case requires less forks. 2005-10-20 Stepan Kasal * doc/autoconf.texi (Shell Substitutions}: Document that ${10} is not portable; thanks to Paul Eggert and Alexandre. * NEWS: Fix an old typo. 2005-10-20 Jim Meyering * doc/autoconf.texi: Typo: s/feature/features/ in ``the features of the latter'', in two places. 2005-10-19 Paul Eggert * doc/autoconf.texi (Generating Sources): AC_LANG_PROGRAMS -> AC_LANG_PROGRAM, fixing a typo. Don't give details about the inner workings of AC_LANG_FUNC_LINK_TRY. * lib/autoconf/c.m4 (AC_LANG_CALL(C)): Reformat to match AC_LANG_FUNC_LINK_TRY. This involves returning the value returned by the function rather than ignoring it. (AC_LANG_FUNC_LINK_TRY(C)): Call the function rather than simply comparing its address. Intel's interprocedural optimization was outsmarting the old heuristic. Problem reported by Mikulas Patocka. 2005-10-19 Stepan Kasal * lib/autoconf/general.m4 (AC_SUBST): Remove an obsolete comment. 2005-10-05 Paul Eggert * lib/m4sugar/m4sugar.m4 (_m4_map): New macro. (m4_map, m4_map_sep): Use it. Handle the empty list correctly. 2005-10-04 Stepan Kasal * lib/autotest/general.m4 (AT_INIT): Really make the subtree writable before removing it (chmod -R u+rwx); there are three instances of this. 2005-10-02 Ralf Wildenhues Stepan Kasal * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Balance parentheses. * lib/autotest/general.m4 (AT_INIT): If the test dir already exists, make its content writable before removing it. Remove an errorneous comment from the end, where the logs of the failed tests are copied to the main log file. 2005-09-27 Stepan Kasal * tests/semantics.at (AC_C_BIGENDIAN): Pass --force to autoheader, in case the computer is too quick. Double quote the configure.ac snippets. * tests/local.at (AT_CHECK_AUTOCONF): Always pass --force to prevent problems if the testsuite were running too fast. 2005-09-18 Paul Eggert * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Look for X11/Xlib.h and XrmInitialize rather than X11/Intrinsic.h and XtMalloc (which belong to Xt, not X itself). See Debian bug 327655. * NEWS: Mention this. 2005-09-07 Stepan Kasal * lib/autoconf/c.m4 (AC_LANG_SOURCE(C)): Remove an incorrect comment. 2005-09-06 Paul Eggert * config/move-if-change: Don't output "$2 is unchanged"; suggested by Ben Elliston. Handle weird characters correctly. 2005-09-06 Stepan Kasal * lib/autoconf/libs.m4 (AC_SEARCH_LIBS): Merge the two AC_LINK_IFELSE calls, so that the final expansion of this macro is shorter. Create the conftest.$ac_ext outside the `for' loop, to speed the run. Do not use `break' in the argument to AC_LINK_IFELSE, it would skip the cleanup there. Use AS_VAR_* macros, to be more general. * tests/semantics.at (AC_SEARCH_LIBS): Check for the cleanup. * lib/autoconf/general.m4: Use AS_IF where appropriate. * lib/m4sugar/m4sh.m4 (AS_IF): Use m4_default. 2005-09-01 Stepan Kasal * doc/autoconf.texi (Configuration Headers): Add an index entry for AH_HEADER. 2005-08-26 Pavel Roskin * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Use shell variable XMKMF to locate xmkmf. Make XMKMF precious. Export CC when running xmkmf. 2005-08-26 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_VERSION_COMPARE_PREPARE): The previous patch didn't work, so try a better one. 2005-08-26 Stepan Kasal * doc/autoconf.texi (Programming in M4sh) : Fix m4 quoting in the example. Reported by Bruno Haible. : Likewise. Also modify the example to be more convincing: "if $undefined_var;" succeeds with my shell. * lib/autoconf/general.m4 (AC_CANONICAL_BUILD, AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Define by AC_DEFUN, no need to use AC_DEFUN_ONCE; but change the m4_divert_text to m4_divert_once. 2005-08-25 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_VERSION_COMPARE_PREPARE): Work around bug in Solaris /usr/xpg4/bin/awk. The bug is present in at least Solaris 8 through 10. 2005-08-24 Stepan Kasal * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Simplify; rejecting some evil values and relying on the fact that $* concatenates the parameters by the first character from IFS. 2005-08-23 Ralf Wildenhues , Stepan Kasal * lib/autoconf/status.m4 (_AC_CONFIG_REGISTER_DEST): When the first header appears, define AH_HEADER. * doc/autoconf.texi (Configuration Headers): Document AH_HEADER. Update limitations about when to call AC_CONFIG_HEADERS. (Configuration Commands): Document that AC_CONFIG_COMMANDS_PRE parameter can call AC_SUBST, AC_DEFINE, or AC_CONFIG_FOOS; explain that AC_CONFIG_COMMANDS_PRE and AC_CONFIG_COMMANDS_POST are not ``Configuration Actions''; fix their index entries. * lib/autotest/general.m4 (AT_INIT): Process multiple keywords options correctly. Process N-M as M-N if M is smaller than N. Process ranges correctly so that N-N will run only N. Sort and uniquify the tests that will be run. If there is more than one test, reinsert the banners for the tests. * tests/autotest.at (Keywords): Unmark XFAIL. 2005-08-23 Stepan Kasal * lib/autoconf/general.m4 (_AC_DEFINE_Q): Strip the parameter list before passing the macro name to AH_TEMPLATE. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): config.status now opens log after option processing; in particular, --version and --help do not touch config.log. * Makefile.maint: Revert the change from 2005-08-12. 2005-08-22 Stepan Kasal * lib/autoconf/general.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Factor out common code to... (_AC_ENABLE_IF, _AC_ENABLE_IF_ACTION): ... these new macros. 2005-08-21 Ralf Wildenhues * doc/autoconf.texi (Using Autotest, testsuite Scripts) (Autotest Logs, Writing testsuite.at, testsuite Invocation): Language cleanup. * doc/autoconf.texi (Defining Symbols, Changed Results): Prepend to LIBS, not append, in examples. 2005-08-16 Stepan Kasal When building in place, set srcdir="."; suggested by Tim Van Holder. * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): Do this; to recognize build in place, we need ac_pwd, and thus have to AC_REQUIRE ... (_AC_INIT_DIRCHECK): ... this macro and AC_DEFUN both of them. * lib/autoconf/status.m4 (_AC_SRCDIRS): Fix a comment: srcdir="." does not mean "no --srcdir option". 2005-08-15 Ralf Wildenhues * tests/autoscan.at (autoscan): New file. * tests/suite.at: Use it. * tests/Makefile.am (TESTSUITE_HAND_AT): Add it. Reported against Libtool by Gideon Go . * tests/autotest.at (Keywords): Test keywords combinations. 2005-08-12 Stepan Kasal * Makefile.maint (GZIP_ENV): When checking the help text of gzip, add "2>&1"; gzip 1.2.4 prints help on stderr. 2005-07-27 Stepan Kasal * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): The symbol at_reason was pushdef'ed twice while popped only once. Push it only once. (_AT_CHECK): Cosmetic changes to the "case $at_status" command. 2005-07-26 Stepan Kasal * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): The message is now prefixed by mere "===", not "configure: === ". 2005-07-25 Paul Eggert * Makefile.maint: Update from Bison. * lib/m4sugar/m4sugar.m4 (m4_strip): Comment fix---change tab to "" in comment, so that the point is understandable. 2005-07-25 Stepan Kasal Rewrite substantial part of lib/autoconf/status.m4. The main change is that CONFIG_FILES, CONFIG_HEADERS, CONFIG_LINKS, and CONFIG_COMMANDS are not processed in four separate loops. Instead, there is one main loop. This alows that the common code is expanded only once, thus config.status (and configure) is smaller. The registration mechnism in AC_CONFIG_FILES and cousins also changed; the AC_LIST_FILES and cousins macros are no longer used. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_OUTPUT_LINKS, _AC_OUTPUT_COMMANDS): Renamed to ... (_AC_OUTPUT_FILE, _AC_OUTPUT_HEADER, _AC_OUTPUT_LINK, _AC_OUTPUT_COMMAND): ..., respectively. These macros no longer contain the initialization, nor the for loop, nor the associated commands; all these go to ... (_AC_OUTPUT_MAIN_LOOP): ... this new macro, called from _AC_OUTPUT_CONFIG_STATUS. (_AC_CONFIG_SPLIT, _AC_CONFIG_SPLIT_SOURCE_DEST, _AC_CONFIG_SPLIT_FILE_IN): Nuked; the code was merged into _AC_OUTPUT_MAIN_LOOP. (_AC_OUTPUT_FILE): The creation of the sed script ... (AC_OUTPUT): ... and the setup of ac_vpsub goes to ... (_AC_OUTPUT_FILES_PREPARE): ... a new macro, also called from _AC_OUTPUT_MAIN_LOOP. (_AC_CONFIG_FILES, _AC_CONFIG_HEADERS, _AC_CONFIG_LINKS, _AC_CONFIG_COMMANDS): Use ... (_AC_CONFIG_FOOS): ... this new macro, which uses these ... (_AC_CONFIG_REGISTER, _AC_CONFIG_REGISTER_DEST): ... new macros. (_AC_CONFIG_FILE, _AC_CONFIG_HEADER, _AC_CONFIG_LINK, _AC_CONFIG_COMMAND, _AC_CONFIG_DEPENDENCIES): No longer needed. (_AC_CONFIG_DEPENDENCY): Update, it uses these ... (_AC_CONFIG_DEPENDENCY_DEFAULT, _AC_FILE_DEPENDENCY_TRACE_COLON): ... new macros. (_AC_CONFIG_UNIQUE): Update. (AC_LIST_FILES, AC_LIST_HEADERS, AC_LIST_LINKS, AC_LIST_COMMANDS): Replaced by this ... (_AC_LIST_TAGS): ... new common macro. (AC_LIST_FILE_COMMANDS, AC_LIST_HEADER_COMMANDS, AC_LIST_LINK_COMMANDS, AC_LIST_COMMAND_COMMANDS): Replaced by this ... (_AC_LIST_TAG_COMMANDS): ... new common macro. (_AC_CONFIG_COMMANDS_INIT): Moved top to the `registration' section; this didn't belong to the `config commands' section. (_AC_OUTPUT_COMMANDS_INIT): Don't initialize, m4_ifdef is our friend. (AC_CONFIG_COMMANDS_PRE, AC_OUTPUT_COMMANDS_PRE, AC_CONFIG_COMMANDS_POST): Moved to a new section, these didn't belong to the `config commands' section either. (AC_CONFIG_SUBDIRS): Don't touch diversion DEFAULTS. (_AC_LIST_SUBDIRS): Don't initialize, m4_ifdef is our friend. ... and many changes to the comments nearby. * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): At the end of the day, set ac_subdirs_all='_AC_LIST_SUBDIRS'. * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): AC_CONFIG_COMMANDS(command:input,...) is no longer allowed. (#define header templates): The comment at the top of the generated header now includes the name(s) of the source file(s). Several unrelated small changes: * lib/autoconf/general.m4 (AC_CACHE_VAL): Be didactic, quote the first parameter to AC_DIAGNOSE. * lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Likewise. (_AC_LINK_FILES_CNT): Don't AU_DEFUN this; it causes confusing messages with autoupdate; use m4_define_default inside AU_DEFUNed AC_LINK_FILES. (AC_OUTPUT): In the compatibility code, use m4_ifvaln, to be consistent with AU::AC_OUTPUT. (AU::AC_OUTPUT): Don't double-quote $2 and $3, the compatibility code in AC_OUTPUT doesn't double-quote it either. * tests/tools.at (autoupdate): AU::AC_OUTPUT no longer double-quotes the parameters. 2005-07-10 Stepan Kasal * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Document which versions of Portland Group compiler produce single- and double-quoted -cmdline argument. Reported by Steven G. Johnson and Ole Holm Nielsen . 2005-07-07 Paul Eggert * tests/local.at (AT_CONFIG_CMP): Ignore lines like "LIBS=''" too. This is a corrected version of yesterday's patch. 2005-07-07 Stepan Kasal * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Report the full path, too; insert a "===" to emphasize the line. * lib/autoconf/general.m4 (AC_CANONICAL_BUILD): Rename ac_cv_build_alias to ac_build_alias. (AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Simplify. On 2005-02-24, an unintentional AC_SUBST([CC]) was introduced; this change eliminates it. Problem reported by Alexandre Duret-Lutz. * lib/autoconf/general.m4 (_AC_ARG_VAR_PRECIOUS): Move the AC_SUBST ... (AC_ARG_VAR): ... here. (_AC_INIT_PREPARE): Call AC_SUBST for build_alias, host_alias and target_alias. Keep a list of all precious variables and process them with one simple for loop, instead of expanding all commands, or, OTOH, complicated processing of output of "set". * lib/autoconf/general.m4 (_AC_ARG_VAR_PRECIOUS): Acumulate the variable names in new macro... (_AC_PRECIOUS_VARS): ... which will be assigned to ac_precious_vars. (_AC_ARG_VAR_STORE): New macro which writes to diversion PARSE_ARGS a loop to assign all ac_env_* and ac_cv_env_* variables. (_AC_ARG_VAR_VALIDATE): Use shell variable ac_precious_vars, divert to INIT_PREPARE. (_AC_INIT_DEFAULTS): At the end, if _AC_PRECIOUS_VARS is set, assign its value to shell variable ac_precious_vars and call _AC_ARG_VAR_STORE and _AC_ARG_VAR_VALIDATE. * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Don't call _AC_ARG_VAR_VALIDATE. * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Move AC_LANG_PUSH(C) and the AC_SUBSTs ... (AC_INIT): ... here. * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Changed the title of the ac_subst_files section in config.log. * tests/local.at (AT_CONFIG_CMP): Revert Paul's previous change. 2005-07-06 Paul Eggert * NEWS: New macro AC_C_TYPEOF. * doc/autoconf.texi (C Compiler): Document AC_C_TYPEOF. * lib/autoconf/c.m4 (AC_C_TYPEOF): New macro. * tests/c.at (C keywords): Test AC_C_TYPEOF. Fix problems reported by Nicolas Joly. * tests/base.at (Input/Output): Ignore 'loading site script' chatter. * tests/local.at (AT_CONFIG_CMP): Ignore lines like "LIBS=''" too. They are generated by the Tru64 v5.1B shell. 2005-07-05 Stepan Kasal Fix my changes from 2005-07-01; reported by Noah Misch. * lib/autoconf/status.m4 (_AC_CONFIG_DEPENDENCIES): Fix the description, the macro now accepts only a single tag. (_AC_CONFIG_UNIQUE): Likewise; s/AC_File/[$1]/ Fix cases when the varsions of Autoconf and Autotest don't match. Reported by Noah Misch. * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Set also at_top_builddir, for compatibility with older autotest. * lib/autotest/general.m4 (AT_INIT): If at_top_build_prefix is not set, use at_top_builddir, for compatibility with older versions of autoconf. 2005-07-04 Paul Eggert * bin/autom4te.in ($m4): Catch usages like --nesting-limit=2048. Problem reported by Patrick Welche. 2005-07-03 Paul Eggert * lib/autoconf/general.m4 (AC_ARG_PROGRAM): Use &, not |, in sed substitution command, so that we allow | in program prefixes and program suffixes. (& is a problem anyway; we're not fixing that here.) * lib/autoconf/status.m4 (AC_CONFIG_FILES): Likewise, for configure_input, top_builddir, srcdir, etc. * lib/autotest/general.m4 (AT_INIT): Likewise, for PATH_SEPARATOR in AUTOTEST_PATH. 2005-07-02 Alexandre Duret-Lutz * lib/autoconf/general.m4 (AC_SITE_LOAD): Rewrite the for loop over config.site files using `set', to allow directory names containing IFS characters. 2005-07-01 Paul Eggert * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK): Remove the tests for directories with weird names. Apparently some people like living on the edge. However, improve the test that "pwd" actually does report a name for the working directory. * NEWS: Remove the claim that we test for funny chars in dir names. 2005-07-01 Stepan Kasal * lib/autoconf/general.m4 (AC_FOREACH): Make obsolete; it's replaced ... * lib/m4sugar/m4sugar.m4 (m4_foreach_w): ... by this new macro. * lib/autoconf/status.m4 (_AC_CONFIG_DEPENDENCIES, _AC_CONFIG_UNIQUE): Now accept a single tag, not whitespace separated list. (AC_CONFIG_SUBDIRS): Call _AC_CONFIG_UNIQUE in a m4_foreach_w loop. 2005-06-30 Stepan Kasal * doc/autoconf.texi (Configuration Headers): Change the explanation about #include . (Generic Functions): Mention the Gnulib project. (Limitations of Usual Tools) : Another minor rephrasing. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Use a here document to output the default config_* lists to config.status. Don't recognize option --file, if the functionality is not there. Likewise for --header; moreover, recognize --he and --h as shortcuts for --help in that case. * lib/autoconf/status.m4: Fix the order of the "sections", so that it matches the order of execution. No code changed. 2005-06-30 Ralf Wildenhues * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Fix also for single-quoted -cmdline argument in Portland Group compiler. Reported against LAM by Ole Holm Nielsen . 2005-06-30 Alexandre Duret-Lutz * lib/autom4te.in (Automake-preselections): Preselect AC_SUBST_TRACE. 2005-06-29 Stepan Kasal * doc/autoconf.texi (File Descriptors): ksh doesn't pass open file descriptors to child processes; reported by Norman Gray. 2005-06-29 Stepan Kasal * lib/autoconf/general.m4 (AC_ARG_VAR): Move next to _AC_ARG_PRECIOUS. * lib/autoconf/general.m4 (AC_SUBST_TRACE): New macro, to be traced instead of AC_SUBST; proposed by Alexandre Duret-Lutz. (AC_SUBST): Call it. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Call AC_SUBST_TRACE for the directory specific variables; but don't call it for configure_input. 2005-06-28 Derek Price * doc/autoconf.texi (Limitations of Usual Tools) : Reword recent addition. 2005-06-23 Paul Eggert * NEWS: Don't worry about spaces in bindir etc. Only srcdir and working directory have inherent problems with special characters like spaces, due to limitations in Make syntax. Problem reported by Alexandre Duret-Lutz. * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK): Implement the above. Also, fix Tru64 porting problem with shell patterns, reported by Ralf Wildenhues. 2005-06-23 Ralf Wildenhues * doc/autoconf.texi (Subdirectories): Fix markup typos. 2005-06-23 Paul Eggert * tests/local.at (AT_CHECK_ENV): Simplify regexp slightly. Fix some more shell quoting problems. Prompted by a bug report from Justace Clutter. * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK): Put name of invalid variable into diagnostic. Make the diagnostic an error, not a warning, because we really don't support spaces and suchlike in dir names. (_AC_INIT_SRCDIR): Allow special characters in $ac_unique_file. Don't worry about backslashes in srcdir; it can't happen now. (_AC_INIT_PARSE_ARGS): Allow weird characters in ac_optarg. Simplify ac_optarg handling. (_AC_ARG_VAR_VALIDATE): Remove unnecessary and inconsistent quotes. 2005-06-22 Stepan Kasal Fix AT_CONFIG_CMP for Solaris hosts; idea from Ralf Menzel. * configure.ac: Call AC_PROG_EGREP and AC_PROG_SED. * tests/atlocal.in: Propagate $EGREP and $SED. * tests/local.at (AT_CHECK_ENV): Use $EGREP, not $GREP -E. (AT_CONFIG_CMP): Use sed instead of grep plumbing. * doc/autoconf.texi (Limitations of Usual Tools) : Mention that '\|' is not allowed in BREs; recommend using newline separated list of patterns instead of multiple -e options. * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Remove an old comment. * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Use AC_SUBST/2. 2005-06-22 Ralf Wildenhues * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Fix typo. 2005-06-21 Stepan Kasal * doc/autoconf.texi (Limitations of Usual Tools) : Document that b, t, r, w commands require single space, while : cannot have any. (Special Shell Variables): Fix sed code this in the example. * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): Likewise; and fix a typo. * lib/autotest/general.m4 (AT_ARG_OPTION): Fix typo in the description. * lib/m4sugar/m4sugar.m4 (m4_split): If the parameter is empty, expand to the empty list. Don't use two pairs of m4_changequote, it's not necessary. 2005-06-20 Derek Price * lib/m4/programs.m4 (AC_PROG_YACC): Declare YACC & YFLAGS precious. 2005-06-17 Paul Eggert * lib/m4sugar/m4sh.m4 (as_awk_strverscmp): Port to Solaris /bin/awk. * doc/autoconf.texi: Don't mention Solaris versions so much, if a problem is common to all extant versions of Solaris. Say "SunOS 4" instead of "SunOS" for SunOS 4. (awk): Mention more of the limitations of traditional Awk. (cat): Don't talk about cat -v. 2005-06-16 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_VERSION_COMPARE_PREPARE): New macro. (AS_VERSION_COMPARE): New macro. The API is taken from CVS, but the implementation is entirely different and is designed to be compatible with glibc strverscmp. * tests/m4sh.at (AS_VERSION_COMPARE): New test. * doc/autoconf.texi (Limitations of Usual Tools): Mention expr bug on Mac OS X 10.4 reported by Peter O'Gorman in: http://lists.gnu.org/archive/html/autoconf-patches/2005-06/msg00041.html * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Use shell builtins rather than 'expr', to work around expr bug. 2005-06-10 Paul Eggert * doc/autoconf.texi: "filesystem" -> "file system". "behaviour" -> "behavior". Warn about \(...\)* in Solaris sed (written by Ralf Menzel). * lib/autoconf/general.m4: Omit blank after ":" sed command, as per POSIX. * lib/m4sugar/m4sh.m4: Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): Work around problem with Solaris sed. Fix by Ralf Menzel and Stepan Kasal. * man/Makefile.am (MOSTLYCLEANFILES): Add $(srcdir)/*.t. (.x.1): Ignore the time stamp in the .TH line when deciding whether to update the man page. That way, we don't have to check in new man pages every month. * lib/m4sugar/m4sh.m4 (AS_VAR_TEST_SET): Work even if $1 contains quotes and backslashes. Patch from Derek Price. 2005-06-10 Derek Price * doc/autoconf.texi (Programming in M4sh): Document AS_TR_CPP & AS_TR_SH. 2005-06-08 Paul Eggert * lib/autotest/general.m4 (AT_INIT): Don't accept Solaris 9's diff -u, since it outputs chatter if the input files are the same. Problem reported by Ralf Menzel. 2005-06-08 Derek Price * lib/m4sugar/m4sugar.m4: Undefine include & sinclude rather than renaming them since they are about to be redefined anyhow. 2005-06-08 Derek Price * doc/autoconf.texi (Redefined M4 Macros): Add index entries for most redefined M4 macros to this node. Document m4_include & m4_sinclude. Move m4_undefine to alphabetical order. 2005-06-07 Paul Eggert * README: Recommend GNU M4 1.4.3 or later. * doc/autoconf.texi (Introduction): Likewise. Reword to avoid some formatting glitches. Use "#!/bin/sh", not "#! /bin/sh"; the space isn't needed these days. Clarify explanation of HP compiler bug. Redo example output tp match current CVS snapshot. Use @example.org in email addresses when the examples might get inadvertently cut-and-pasted into user code. Remove example of autom4te usage that doesn't seem to work now. Use modern AC_INIT (except when the example is meant to be shown with Autoconf 2.13). Update ksh info for Solaris 9 and later. KB -> kB. Modernize description of Automake versions a bit. Don't claim a future version of Autoconf is near. * doc/install.texi: Reword to avoid some formatting glitches. 2005-06-07 Ralf Wildenhues * doc/autoconf.texi: Add [] to examples, so that the manual follows its own advice about quoting better. Reword to avoid some formatting glitches. * doc/installt.exi: Reword to avoid some formatting glitches. * doc/autoconf.texi (Limitations of Builtins) : Mention Tru64 ksh pattern matching bug. Reported against Libtool by Albert Chin and Nicolas Joly . 2005-06-06 Stepan Kasal m4_cdr of one-member list was [[]] (one-member list containing an empty string) instead of [] (an empty list. Callers were skewed to match this misbehaviour. As a consequence of this: - m4_foreach([x], [], [foo]) expanded to `foo', while - the expansion of m4_foreach([x], [[]], [foo]) was empty. This bug has been fixed: * lib/m4sugar/m4sugar.m4 (m4_cdr): If only one argument is given, expand to an empty string; print error msg if called without an argument list. (m4_foreach, m4_map, m4_map_sep): Don't expect the previous misbehaviour; handle [] and [[]] correctly. 2005-06-06 Stepan Kasal * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Nuke ac_max_here_lines. * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): Simplify the sed scripts created and the loop applying them, use _AC_SED_CMD_LIMIT. 2005-06-06 Ralf Menzel (trivial change) * doc/autoconf.texi (Limitations of Usual Tools): Solaris' awk cannot swallow records with more than 99 fields. * lib/autotest/general.m4 (AT_INIT): Use the awk builtin `split' to parse the long line. 2005-06-04 Stepan Kasal * doc/autoconf.texi (Limitations of Usual Tools): AIX awk cannot swallow literals longer than 399. Reported by Ralf Wildenhues. * lib/autotest/general.m4 (AT_INIT): Pass $at_groups though stdin, to workaround this limitation. 2005-06-03 Steven G. Johnson * lib/autoconf/fortran.m4 (_AC_PROG_FC): Find g95 in addition to gfortran, and make these the first two compiler names checked (following the general autoconf preference for gcc). 2005-06-03 Stepan Kasal * tests/Makefile.am (check_SCRIPTS): Set to $(wrappers). (DISTCLEANFILES): Remove $(check_SCRIPTS). (testsuite): Make sure autotest.m4f is up-to-date before using it. 2005-06-02 Paul Eggert * lib/autotest/general.m4 (AT_INIT): Don't create a regular expression of unbounded size when processing the --list option. This runs afoul of a limit of 399 bytes per regular expression on AIX. Problem reported by Ralf Wildenhues. 2005-06-01 Paul Eggert * NEWS: Note yesterday's changes to AC_SUBST and AC_SUBST_FILE. * doc/autoconf.texi (Particular Headers): Reword example for multiline stdbool replacement. (Setting Output Variables): Reword text a bit. Don't give all the details about |#_!!_#|. Reword description of line replacement. 2005-05-31 Dan Manthey * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Output variables may now contain newlines, and substituted files must be referenced on a line alone; the sed scripts to substitute them are now very different. (_AC_SED_CMD_LIMIT): Added; single place to store limit on how many commands can be put in a sed script portably. * doc/autoconf.texi (Setting Output Variables): Document above changes. (Particular Header Checks) : Give exaple use of multiline substitution. * tests/torture.at: No longer expect substitution of newline to fail. 2005-05-27 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK): Fix diagnostics. From Ralf Menzel (trivial change). 2005-05-25 Paul Eggert * tests/local.at: Don't attempt to check for negated character classes in shell scripts. The test was too brittle. 2005-05-25 Stepan Kasal * bin/autoconf.as: Don't use "shift 2"; it's not portable enough. * doc/autoconf.texi (Limitations of Builtins): Document this limitation. 2005-05-24 Stepan Kasal * lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG): New macro to factor out common code; used in many places in the tree. (AS_ESCAPE): Make the pattern a bit simpler; use \& insetad of \1. (_AS_ECHO_UNQUOTED): Move the macro lower; no code change. * lib/m4sugar/m4sugar.m4 (m4_ifset): Use m4_ifval. * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): Merge the two error messages when ac_unique_file is not found. (AC_CONFIG_MACRO_DIR): Simplify the `if' at the end. (AC_MSG_CHECKING, AC_MSG_RESULT): Put braces around the two echo commands, for consistency with AC_MSG_ERROR and such. * bin/autoconf.as: Make more use of "shift 2" in option processing. * bin/Makefile.am: Merge the two rules for creating scripts. 2005-05-23 Stepan Kasal * lib/autoconf/general.m4 (AC_MSG_RESULT_UNQUOTED): Make obsolete; it was never documented. (AC_CACHE_CHECK): Use AC_MSG_RESULT instead. 2005-05-20 Stepan Kasal * NEWS: @top_builddir@ is now a dirname, ac_top_builddir will follow. * lib/autoconf/status.m4 (_AC_SRCDIRS): Rename ... (ac_top_builddir): ... this ... (ac_top_build_prefix): ... to this; the old name is also kept, for backward compatibility. (ac_top_builddir_sub): New variable, without the trailing slash, always nonempty. (_AC_OUTPUT_FILES): s/@top_builddir@/$ac_top_builddir_sub/ * doc/autoconf.texi (Configuration Actions): Rename ac_top_builddir to ac_top_build_prefix. * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Rename at_top_builddir to at_top_build_prefix. * lib/autotest/general.m4 (AT_INIT): Likewise. 2005-05-20 Stepan Kasal * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Simplify the init of confdefs.h . 2005-05-17 Stepan Kasal * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Don't m4_quote the second argument to m4_foreach. I guess it was necessary in the past, but I think it's a no-op now. 2005-05-17 Stepan Kasal * lib/autoconf/general.m4 (_AC_INIT_HELP): Merge two consecutive ``cat <<_ACEOF'' commands to one. (_AC_CANONICAL_SPLIT): Use expr, not ``echo|sed.'' * lib/autoconf/status.m4: On various places, use expr instead of ``echo|sed.'' (_AC_CONFIG_SPLIT, _AC_CONFIG_SPLIT_SOURCE_DEST): (_AC_CONFIG_SPLIT_FILE_IN): New macros, to factor out common code. * lib/autotest/general.m4 (AT_INIT): Use expr to get the numbers from a range. * tests/local.at (AT_CHECK_SHELL_SYNTAX): Use awk to search for the wrong patterns between ``case'' and ``esac.'' The previous code had false positives. 2005-05-14 Alexandre Duret-Lutz * lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA): Prepend ${LIBOBJDIR}, as on 2005-05-02. * doc/autoconf.texi (Particular Functions) : Mention LIBOBJDIR. 2005-05-13 Paul Eggert * AUTHORS, BUGS, COPYING, ChangeLog, ChangeLog.0, ChangeLog.1, ChangeLog.2, GNUmakefile, Makefile.am, Makefile.cfg, Makefile.maint, NEWS, README, README-alpha, TODO, configure.ac, bin/Makefile.am, bin/autoconf.as, bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in, config/Makefile.am, config/config.guess, config/config.sub, config/elisp-comp, config/m4.m4, config/mdate-sh, config/missing, config/texinfo.tex, doc/Makefile.am, doc/fdl.texi, lib/Makefile.am, lib/autom4te.in, lib/freeze.mk, lib/Autom4te/C4che.pm, lib/Autom4te/ChannelDefs.pm, lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm, lib/Autom4te/FileUtils.pm, lib/Autom4te/General.pm, lib/Autom4te/Request.pm, lib/Autom4te/Struct.pm, lib/Autom4te/XFile.pm, lib/autoconf/Makefile.am, lib/autoconf/autoconf.m4, lib/autoconf/autoheader.m4, lib/autoconf/autoscan.m4, lib/autoconf/autotest.m4, lib/autoconf/autoupdate.m4, 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/libs.m4, lib/autoconf/oldnames.m4, lib/autoconf/programs.m4, lib/autoconf/specific.m4, lib/autoconf/status.m4, lib/autoconf/types.m4, lib/autoscan/Makefile.am, lib/autoscan/autoscan.list, lib/autoscan/autoscan.pre, lib/autotest/Makefile.am, lib/autotest/autotest.m4, lib/autotest/general.m4, lib/emacs/Makefile.am, lib/emacs/autoconf-mode.el, lib/emacs/autotest-mode.el, lib/m4sugar/Makefile.am, lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4, man/Makefile.am, tests/Makefile.am, tests/atlocal.in, tests/autotest.at, tests/base.at, tests/c.at, tests/compile.at, tests/foreign.at, tests/fortran.at, tests/local.at, tests/m4sh.at, tests/m4sugar.at, tests/mktests.sh, tests/semantics.at, tests/suite.at, tests/tools.at, tests/torture.at, tests/wrapper.as: Update FSF postal mail address. 2005-05-13 Stepan Kasal * lib/autoconf/general.m4 (AC_CONFIG_LIBOBJ_DIR): Remove the broken check. * lib/m4sugar/m4sugar.m4 (m4_bmatch): Halt with error if we don't get enough arguments, similarly as in m4_bpatsubsts. 2005-05-12 Stepan Kasal * lib/autoconf/status.m4 (_AC_SRCDIRS): Simplify the computation of absolute paths. 2005-05-11 Stepan Kasal * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Make the check for absolute directory names in one loop. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Handle abbreviations of --version and --debug. 2005-05-10 Paul Eggert * doc/autoconf.texi (Autoconf Language): Be more precise about quoting rules. Problems noted by Stepan Kasal. Also, throughout this document, be more careful about white space. "blank", "white space", and "space" all have different meanings and we should be careful to say what we mean. 2005-05-05 Paul Eggert Fix C++ related problems reported by Werner Lemberg. * doc/autoconf.texi (C++ Compiler): Mention .cpp extension. * lib/autoconf/c.m4 (AC_LANG(C++)): Set ac_ext to .cpp, not .cc. * lib/autoconf/types.m4 (AC_TYPE_SIGNAL): Simplify test, to avoid problems with C++ and throw. * tests/compile.at: .cpp, not .cc. * tests/semantics.at: Prepend LIBOBJDIR, as per 2005-05-02 change. 2005-05-05 Ralf Wildenhues * doc/autoconf.texi (Generic Functions): Typos. 2005-05-02 Gary V. Vaughan * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Prepend each object named in LIBOBJS and LTLIBOBJS with the ${LIBOBJDIR}, as set by latest automake. 2005-05-01 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): "expr '' \| ''" outputs 0 on GNU/Linux these days. 2005-04-29 Paul Eggert * doc/autoconf.texi (Autoconf Language): Add more description about quoting heuristics. (Limitations of Builtins): Describe "set -" problems. 2005-04-29 Ralf Wildenhues * lib/autotest/general.m4 (AT_KEYWORDS): Separate by space, not newline. * doc/autoconf.texi (External Software): Replace AC_DEFINE_UNQUOTED by AC_DEFINE; it was a mistake. From bug reported against libtool by Dalibor Topic . 2005-04-25 Stepan Kasal * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): A tiny optimization. 2005-04-22 Stepan Kasal * doc/autoconf.texi (External Software): Quadrigraphs are not processed correctly in AS_HELP_STRING; avoid this in the examples. * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Add a FIXME about quadrigraphs. * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Likewise; and rephrase the comment and reduce m4_default([foo], []) to [foo]. (m4_strip): Update the explanation. 2005-04-19 Paul Eggert * lib/autoconf/general.m4 (_AC_INIT_PREPARE, _AC_RUN_IFELSE): Remove core.conftest.* too; it's generated by Tru64 5.1. Problem reported by Jennis Pruett. * lib/autoconf/functions.m4 (AC_FUNC_SETVBUF_REVERSED, AC_FUNC_UTIME_NULL): Don't bother to remove core files; AC_RUN_IFELSE should do that for you. 2005-04-19 Stepan Kasal * lib/m4sugar/m4sugar.m4 (m4_bpatsubsts): Add the b- to comment, too. 2005-04-19 Alexandre Duret-Lutz * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Handle --docdir. Report from Horst Wente. 2005-04-15 Stepan Kasal * lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE): Fixed a typo in the comment. 2005-04-14 Gregorio Guidi * doc/autoconf.texi (External Software, Package Options): Add examples showing how to implement --with-* and --enable-* options. 2005-04-13 Paul Eggert * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Look for configure.ac as well as configure.in. Problem reported by Gregorio Guidi. 2005-04-10 Paul Eggert * doc/autoconf.texi (Particular Functions): Use gnulib's current pattern for alloca snippet. 2005-04-04 Stepan Kasal * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Fix a typo. 2005-04-01 Stepan Kasal * doc/autoconf.texi (Generic Programs): Fix a typo. 2005-04-01 Paul Eggert * lib/autotest/general.m4 (AT_INIT): Don't assume that "date +%s" fails if %s isn't supported. Problem reported by Ralf Wildenhues. 2005-03-22 Ralf Wildenhues * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Merge `-z option' as well for the benefit of Solaris link flags. Pass whole-archive (-zallextract, -zdefaultextract) options in the hope of unique libraries, for the Sun Fortran 95 8.0 compiler. Bug reported against Libtool by Yury Puhalsky . 2005-03-22 Paul Eggert * NEWS: The configure command now warns you if you attempt to use a directory whose name contains a special character like space, newline, or "\". * doc/autoconf.texi (Installation Directory Variables): Allow "," in file names. Do not use \@; it's not a portable regexp. * bin/Makefile.am (edit): Likewise. * lib/Makefile.am (edit): Likewise. * tests/Makefile.am (edit): Likewise. * tests/semantics.at: Likewise. * tests/torture.at: Likewise. * lib/autoconf/general.m4 (AC_ARG_PROGRAM): Likewise. * lib/autoconf/status.m4 (_AC_SRCDIRS): Likewise. * doc/autoconf.texi (File System Conventions): Warn about unportable file names. * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK): New macro. (AC_INIT): Use it. (_AC_INIT_SRCDIR): Use ac_pwd rather than invoking pwd. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Propagate ac_pwd, and quote srcdir. * lib/autotest/general.m4 (AT_INIT): Quote file name args. * doc/autoconf.texi: Fix some systematic formatting problems. ".)" needs a following @: if not at the end of a sentence, and similarly for "!)". "etc." should be preceded by a comma. "n-th" -> "@var{n}th". pdksh is still buggy, so update its date. 2005-03-22 Bruno Haible * doc/autoconf.texi (Input): Mention that AC_CONFIG_AUX_DIR's argument is often called 'build-aux'. 2005-03-07 Stepan Kasal * doc/autoconf.texi (Quotation Rule Of Thumb): Mention that the macro AC_TRY_LINK is obsolete. (Installation Directory Variables): Change `AC_OUTPUT_FILES' to `AC_CONFIG_FILES'. 2005-02-24 Stepan Kasal * lib/autoconf/c.m4 (AC_PROG_CC): Be more careful to skip `/usr/ucb/cc'; use `cl.exe' to distinguish the MS compiler from a Common Lisp's `cl'. (AC_PROG_CXX): Behave according to the documentation: don't search for $ac_tool_prefix$CCC and $CCC, just set CXX=$CCC; make the variable CCC precious; use `cl.exe', not `cl'. 2005-02-23 Paul Eggert Alexandre Duret-Lutz * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Redirect stdin from /dev/null, as "configure" shouldn't read stdin, and this insulates us from problems (e.g., when testing for "cl"). Also, do this redirection before invoking "hostname" or "uname", and keep the original input stream available via... (AS_ORIGINAL_STDIN_FD): ... this new macro. (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Don't bother with " * lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE): Don't set ECHO_C to newline if neither \c nor -n work, as that would output two newlines. Prefer -n to \c. Reported by Stepan Kasal. 2005-02-12 Stepan Kasal * lib/m4sugar/m4sh.m4 (AS_IF): Define by m4_defun, not m4_define. This causes that any required macros inside will get before the if. * doc/autoconf.texi (autom4te.cache): A typo. 2005-02-12 Paul Eggert Undo previous change, except keep the change to lib/autoconf/programs.m4 that replaced grep with shell pattern-matching. This is because net-snmp configure reads stdin. Reported by Noah Misch. 2005-02-11 Paul Eggert * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Redirect stdin from /dev/null, as "configure" shouldn't read stdin, and this insulates us from problems (e.g., when testing for "cl"). Suggested by Alexandre Duret-Lutz. Also, do this redirection before invoking "hostname" or "uname". (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Undo previous change, as it's no longer needed. * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX): Don't bother with " * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Redirect stdin to /dev/null, in an attempt to avoid thinking that Allegro Common Lisp's "cl" command is a C++ compiler. 2005-02-09 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Document that grep -q isn't portable. Improve grep -s explanation. Problem reported by Dan Manthey. 2005-02-08 Paul Eggert * doc/autoconf.texi (Special Shell Variables): Clarify PATH_SEPARATOR wording; fix typo in IFS. Reported by Gary V. Vaughan. 2005-02-07 Paul Eggert * doc/autoconf.texi: Use @acronym for DJGPP. Fix some @code's that should have been @env's, and vice versa. Sort environment variable names. Mention that shells no longer inherit IFS. Don't recommend PATH_SEPARATOR=';' so strongly. Mention that $RANDOM might expand to the empty string. "symlink" and "soft link" -> "symbolic link". Improve mktemp description (reported by Bruno Haible). 2005-02-05 Paul Eggert * tests/foreign.at (Libtool): Don't overquote AT_SETUP arg. * tests/m4sh.at (AS_DIRNAME, AS_BASENAME, AS_MKDIR_P, AS_HELP_STRING): Likewise. * tests/semantics.at (AC_C_BIGENDIAN, AC_PATH_PROG & AC_PATH_PROGS): Likewise. 2005-02-04 Paul Eggert * NEWS: Mention AT_COPYRIGHT. * tests/local.at (AT_CMP): Use diff directly on input files rather than copying them. * lib/autoconf/programs.m4 (AC_PROG_SED): Don't look in /usr/xpg4/bin since that sed dumps core (at least on Solaris 8). 2005-02-04 Noah Misch and Paul Eggert * tests/autotest.at (Empty test suite): New test. * tests/torture.at (Substitute and define special characters) (Substitute a 2000-byte string, Define to a 2000-byte string) (Substitute a newline, Define a newline): New tests. 2005-02-04 Noah Misch * lib/m4sugar/m4sugar.m4 (m4_re_string, m4_re_word): Revert 2002-03-04. * tests/local.at (AT_CHECK_M4SUGAR): Add `m4sugar' to keywords. (AT_CHECK_ENV): Ignore LTLIBOBJS, FC variables, EGREP, FGREP, and SED. * tests/m4sugar.at (AT_CHECK_M4SUGAR_TEXT, AT_CHECK_M4RE): New macros. (Standard regular expressions): New test. (m4_warn, m4_require: circular dependencies, m4_text_wrap): Strip excess test name quoting. * tests/semantics.at (AC_CHECK_HEADERS_OLD, AC_CHECK_HEADERS_NEW): Pass CPPFLAGS to `configure' instead of setting it in `configure'. * lib/m4sugar/m4sh.m4 (AS_UNAME): Try only /usr/bin/hostinfo, not any `hostinfo' in $PATH, since hostinfo.exe is a popular file name on some platforms. * lib/autoconf/fortran.m4 (AC_LANG(Fortran), AC_FC_SRCEXT): s/FC_SRCEXT/ac_fc_srcext/; s/FCFLAGS_SRCEXT/ac_fcflags_srcext/. * tests/local.at (AT_CMP): New macro. (AT_DATA_AUTOCONF): Do not call AC_PROG_GREP. (AC_SAVE_STATE): Move environment grep... (AT_CHECK_ENV): to here. Filter out `'$''. Use AT_CMP. (AT_CONFIG_CMP): New macro. (AT_CHECK_MACRO): Run `configure' twice with cache and compare results. * tests/c.at (Extensions): Do not exit early. * tests/atlocal.in: Inherit $GREP. * lib/autoconf/c.m4 (_AC_C_STD_TRY): New macro. (_AC_PROG_CC_C89, _AC_PROG_CC_C99): Use it. * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Update for 2005. (AC_COPYRIGHT): Factor header comment portion out and move into... * lib/m4sugar/m4sh.m4 (AS_COPYRIGHT): This. * lib/autotest/general.at (AT_COPYRIGHT): New macro. (AT_INIT): Add Autotest copyright notice. Display copyright notices in --version output. * tests/local.at: Add Autoconf test suite copyright notice. * doc/autoconf.texi (Writing testsuite.at): Document AT_COPYRIGHT. 2005-02-04 Bruno Haible and Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): New mkstemp entry. 2005-02-03 Paul Eggert * lib/m4sugar/m4sugar.m4 (m4_re_escape): Escape ?, ^, \, $ too; this fixes a bug tickled by the AT_CAPTURE_FILE change noted below. Try not to generated lines of unlimited length, as POSIX places a 2047-byte limit on line length of portable text files. * lib/autoconf/general.m4 (AC_SUBST, AC_SUBST_FILE): Use newline as a separator, not space. * lib/autotest/general.m4 (AT_TESTED, AT_KEYWORDS): Likewise. (AT_CAPTURE_FILE): Use space-backslash-newline as a separator, not space. 2005-02-03 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK): Move func_* to as_func_*. Add test to check whether positional parameters are restored after function return. 2005-02-02 Paul Eggert * doc/autoconf.texi (Special Shell Variables): Mention _, BIN_SH, DUALCASE. Say that variables other than "status" are safe if they contain a lower-case letter. The DUALCASE problem was reported by Ralf Wildenhues. * bin/autoconf.as: Don't exit with status 0 after write failure with --help or --version. * lib/autoconf/general.m4 (_AC_INIT_HELP, _AC_INIT_VERSION): Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise. 2005-02-02 Ralf Wildenhues * doc/autoconf.texi (Limitations of Usual Tools): Unicos 9 sed limitations. * lib/autoconf/fortran.m4 (_AC_PROG_FC): Try cf77 before fort77 to get the option-enhanced interface on older Crays. Try ftn for Fortran 95 (newer Crays). 2005-02-01 Paul Eggert * man/Makefile.am (.x.1): Go back to the simple solution, but take care to echo the commands, so the user knows what's going on. Modified from a suggestion by Stepan Kasal. * doc/autoconf.texi (autoreconf Invocation): Mention autopoint, with a cross reference. Derived from a suggestion by Bruce Korb. 2005-01-31 Paul Eggert * doc/autoconf.texi (config.status Invocation): Warn about discrepancy between CONFIG_SHELL and shell used to invoke 'configure'. * doc/install.texi (Defining Variables): Likewise. Based on a proposed patch by Ralf Wildenhues. * man/Makefile.am (.x.1): Make sure the required generated files are up to date. Problem and original solution proposed by Stepan Kasal. $(dist_man_MANS:.1=-bin-prereq), $(dist_man_MANS:.1=-tests-prereq), implicit-man-prerequisites): New rules, used by the above. * doc/make-stds.texi, doc/standards.texi: Sync from gnulib. * config/config.guess, config/config.sub, config/install-sh: Likewise. * config/missing, config/texinfo.tex: Likewise. 2005-01-29 Stepan Kasal Simplify the implementation of m4_require (a.k.a. AC_REQUIRE). Update the long comment explaining it. m4_require no longer writes an ``is required by'' line to the execution stack. It contains only one bit of non-redundant information: that the macro was required, not called. And even this bit is useless in most situations: have you ever met a macro which both calls and requires the same macro? * lib/m4sugar/m4sugar.m4 (_m4_defun_pro): Don't push a diversion... (_m4_defun_pro_outer): ... only via this macro, for the outermost macro. (_m4_defun_epi, _m4_defun_epi_outer): Complementarily. (m4_expansion_stack_pop): Remove the misplaced comment. (m4_require): Don't put the ``is required by'' line to the execution stack; slightly improve the out-of-a-defun error message. (_m4_divert_grow): New macro, counter for the temporary diversions. (_m4_require_call): Use it. * tests/m4sugar.at (m4_require): Expect output without the ``is required by'' messages. 2005-01-28 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Recommend X rather than x for expr. * lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT): Avoid subshells when this is safe. * lib/autoconf/programs.m4 (AC_PROG_EGREP, AC_PROG_FGREP): Likewise. * lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Likewise. * lib/autotest/general.m4 (AT_INIT): Likewise. * lib/m4sugar/m4sh.m4 (_AS_LINENO_WORKS): Likewise. * tests/mktests.sh: Likewise. 2005-01-27 Akim Demaille Have autoheader honor --force. * doc/make-stds.texi, doc/standards.texi: Update from masters. * lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm * lib/Autom4te/FileUtils.pm, lib/Autom4te/XFile.pm: Update from masters, so that FileUtils.pm's update_file provide --force support. * bin/autoheader.in: Pass $force to update_file so that config.h.in is always recreated when --force. 2005-01-24 Stepan Kasal * doc/autoconf.texi (Introduction): Update Peter Simons' address. 2005-01-21 Paul Eggert * doc/autoconf.texi (Limitations of Builtins): Clarify that "if test ! -d foo; ..." is portable. Suggested by Stepan Kasal. 2005-01-20 Paul Eggert * doc/autoconf.texi (Shell Substitutions): Fix typo in case statement. Warn about newline stripping in `` and $(). Update Solaris version to 9. (Limitations of Builtins): Use expr "X...", not expr "x...", as X insulates us from future changes to Posix. (Limitations of Usual Tools): For AS_DIRNAME, warn about newline stripping. 2005-01-19 Stepan Kasal * doc/autoconf.texi (Defining Symbols): Delete the false comment that you cannot use AC_DEFINE to define macros containing `[' or `]'. 2005-01-13 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Document bug in Solaris 8 join. Problem reported by Tomohiro Suzuki on bug-tar mailing list. 2005-01-05 Stepan Kasal * lib/m4sugar/m4sugar.m4 (m4_copy): Fix the explanation. 2005-01-05 Paul Eggert * lib/autoconf/c.m4 (AC_LANG_INT_SAVE(C)): Declare longval and ulongval to be static, to avoid unwanted GCC warning. Problem reported by Michael Jennings via Daniel Reed; see . 2005-01-05 Alexandre Duret-Lutz * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Define datarootdir, docdir, htmldir, dvidir, pdfdir, psdir, and localdir. Update datadir, infodir, and mandir. Adjust argument parsing code. (_AC_INIT_HELP): Update help text. * doc/autoconf.texi (Installation Directory Variables): Document new variables. 2005-01-04 Noah Misch * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): If the Make program does not seem to work, assume it does set $(MAKE). * doc/autoconf.texi (AC_PROG_MAKE_SET): Update. 2005-01-03 Stepan Kasal * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Add a comment about nesting. 2005-01-03 Stepan Kasal A cleanup of the diversion support in m4sugar. * lib/m4sugar/m4sugar.m4 (_m4_divert): A typo in description. (_m4_divert_n_stack): New macro; the expansion is m4_divert_stack, if m4_divert_stack is defined, and void otherwise. (m4_divert, m4_divert_push, m4_divert_pop, m4_init): Use it. (m4_divert_push, m4_divert_pop, _m4_defun_epi): Don't expand the word stored in _m4_divert_diversion or _m4_divert_dump. (m4_divert_pop): When the parameter is given, compare the symbolic name with the last diversion pushed on the stack. Previously, the current diversion was compared with the numeric value of the diversion given as the parameter. (m4_require): If the macro hasn't been expanded yet, call ... (_m4_require_call): this new macro. 2005-01-03 Ralf Wildenhues * lib/autoconf/general.m4 (_AC_INIT_PREPARE, _AC_ARG_VAR_VALIDATE): Workarounds for documented `case' limitations. 2005-01-03 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Warn about sed 'command1;command2'. Problem reported by Ralf Wildenhues. 2005-01-02 Paul Eggert * bin/autoconf.as, bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in, tests/mktests.sh: Update copyright date to 2005. Patch from Roger Leigh (with some minor changes) as follows: * NEWS: New macros AC_PROG_CC_C89, AC_PROG_CC_C99. Resurrect AC_PROG_CC_STDC. * doc/autoconf.texi (C Compiler): Add AC_PROG_CC_STDC, AC_PROG_CC_C89, AC_PROG_CC_C99. (Obsolete Macros): Remove AC_PROG_CC_STDC; it's no longer obsolete. * lib/autoconf/c.m4 (_AC_PROG_CC_C89, _AC_PROG_CC_C99, AC_PROG_CC_C89, AC_PROG_CC_C99): New macros. (AC_PROG_CC_STDC): Use them. (_AC_PROG_CC_STDC): Remove. (AC_C_PROTOTYPES): Use ac_cv_prog_cc_c89, not ac_cv_prog_cc_stdc. * THANKS: Add Roger Leigh. 2004-12-30 Noah Misch * bin/autoreconf.in (autoreconf_current_directory): AM_INIT_AUTOMAKE signals that the package uses Automake; a `Makefile.am' is typical but not essential. Reported by Magnus Therning. * tests/torture.at (autoreconf.): New banner. (autoreconf and non-AC configure): Rename to `Non-Autoconf AC_CONFIG_SUBDIRS'. (autoreconf an empty directory): Rename to `Empty directory'. (Unusual Automake input files): New test. 2004-12-30 Noah Misch * lib/autotest/general.m4 (AT_CAPTURE_FILE): New macro. (AT_SETUP): Clear AT_capture_files. (_AT_CHECK): On failure, log each of AT_capture_files. Fix comment. (AT_KEYWORDS): Fix comment typo. * tests/autotest.at (AT_CHECK_AT): Use AT_CAPTURE_FILE. * tests/local.at (AT_CHECK_CONFIGURE): Use AT_CAPTURE_FILE. * doc/autoconf.texi (Writing testsuite.at): Document AT_CAPTURE_FILE. 2004-12-29 Albert Chin-A-Young * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): If the variable to set is already set, set ac_cv_path_$1 to the preset value so caller can assume ac_cv_path_$1 is available. (trivial change) 2004-12-27 Noah Misch * BUGS (Minor Problems): Warn about makefile limitations. * Makefile.am: Find and update `INSTALL' in $(srcdir). * man/Makefile.am: Find and update manual pages in $(srcdir). 2004-12-24 Eric Blake * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Test candidate shells in subshell, to avoid noise from ash. (trivial change) 2004-12-22 Ralf Wildenhues * doc/autoconf.texi (Limitations of Builtins) : Mention problems with SunOS ksh and backslash escaping, Bourne shells and closing brackets (both within character classes). Bug reported against Libtool by Alexander Kurz . : New entry. Mention non-availability of -r. 2004-12-21 Akim Demaille * lib/autotest/general.m4 (AT_LINE): Don't add srcdir here, to avoid cluttering displayed messages. Rather, prepend srcdir where AT_LINE is used for log files. 2004-12-21 Stepan Kasal * lib/autoconf/status.m4: Quote ``$tmp'' in many places. * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Fix the comment, as traps are no longer part of the macro, quote the occurrence of ``$tmp''. * doc/autoconf.texi (Forbidden Patterns): Typo. 2004-12-21 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Make sure the "ok" etc. are separated from the test title by forcing a white space. 2004-12-21 Akim Demaille Enable Emacs navigation within testsuite.log files. * lib/autotest/general.m4 (AT_CLEANUP): Add an hint for Emacs to use the compilation mode. (AT_LINE): Point to the srcdir. 2004-12-19 Noah Misch * tests/Makefile.am (installcheck-local): Use $(bindir). (check-local, installcheck-local): Pass TESTSUITEFLAGS. * doc/autoconf.texi (Making testsuite Scripts): Recommend the same Makefile.am scheme Autoconf now uses. 2004-12-18 Noah Misch * lib/m4sugar/m4sugar.m4 (m4_qlen, m4_qdelta): New macros. * lib/autotest/general.m4 (AT_SETUP): Use m4_qdelta. 2004-12-18 Noah Misch * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): New macro. (_AT_CHECK): Use it. * lib/m4sugar/m4sh.m4 (AS_ESCAPE_FOR_EXPAND): Remove. (AS_ESCAPE): Fix comment. * tests/autotest.at: Adjust section banner comments. (AT_CHECK_AT): Accept STATUS and STDERR. (AT_CHECK_AT_TEST): Likewise. (Invalid brace-enclosed parameter expansion) (Multiline command from M4 expansion) (Double-M4-quoted command): New tests. 2004-12-17 Paul Eggert * doc/autoconf.texi: Update GNU FDL version from 1.1 to 1.2. 2004-12-17 Akim Demaille * lib/autoconf/general.m4 (AC_SUBST, AC_SUBST_FILES): Pass $1 to m4_pattern_allow. Suggested by Alexandre Duret-Lutz. * doc/autoconf.texi (Setting Output Variables): Catch up. 2004-12-17 Stepan Kasal * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Fix comment. 2004-12-17 Stepan Kasal * lib/autoconf/general.m4 (_AC_LIBOBJ): We can use AC_SUBST/2, remove the comment which said we cannot. 2004-12-17 Stepan Kasal Add a specialized check for resolv.h. Thanks to Gerrit P. Haase, Reini Urban and Paul Eggert for reporting the dependencies. * lib/autoconf/headers.m4 (AC_HEADER_RESOLV): New macro. * doc/autoconf.texi (AC_HEADER_RESOLV): Document it. (AC_HEADER_STAT): @cvindex{STAT_MACROS_BROKEN}, not @acindex. 2004-12-17 Stepan Kasal * bin/autoscan.in: Open autoscan.log only after ``parse_args''; so that eg. ``autoscan --help'' doesn't truncate it. 2004-12-15 Nicolas Joly * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Remove generated conftest files. 2004-12-13 Noah Misch * lib/autotest/general.m4 (_AT_CHECK) [--trace]: Do not enable shell tracing on commands with possibly-escaped newlines. * doc/autoconf.texi (Writing testsuite.at): Delete documentation of the discontinued behavior and its implications. * tests/autotest.at (BS-newline in command, ^BS-newline in command) (BSx641-newline in command, BS-BS-newline in command) (BSx640-newline in command, Newline-CODE-BS-newline in command) (Single-quote-BS-newline in command) (Single-quote-newline-BS-newline in command): New tests. 2004-12-13 Stepan Kasal * lib/m4sugar/m4sh.m4 (AS_EXECUTABLE_P): Use test -f && test -x on platforms where it works. (_AS_TEST_PREPARE): Test for ``test -x''. (_AS_BROKEN_TEST_PREPARE): Nuke. 2004-12-13 Stepan Kasal * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Move the trap commands ... * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): ... here; give only 4-letter prefix to AS_TMPDIR, comment fixed. * lib/autoconf/programs.m4 (_AC_PATH_PROG_FEATURE_CHECK): Don't create the temporary directory. (_AC_FEATURE_CHECK_LENGTH): Work in current directory. 2004-12-12 Kelley Cook * bin/autoheader.in: Exit if no AC_CONFIG_HEADERS was found. (trivial change) 2004-12-12 Alexandre Duret-Lutz * doc/autoconf.texi (Limitations of Usual Tools) : Typo. 2004-12-11 Noah Misch * lib/autotest/general.m4 (_AT_CHECK) [--trace]: Rework a shell pattern to avoid using a negated character class. Reported by Nicolas Joly. * tests/local.at (AT_CHECK_SHELL_SYNTAX): Check for similar constructs. 2004-12-10 Paul Eggert * man/Makefile.am (autoconf.1, autoheader.1, autom4te.1, autoreconf.1, autoscan.1, autoupdate.1, ifnames.1, config.guess.1, config.sub.1): Don't depend on .x file explicitly, since "make" does that for us. Suggested by Stepan Kasal. * bin/Makefile.am (MOSTLYCLEANFILES): Renamed from CLEANFILES. Add *.tmp. (autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate, ifnames): Factor common code. And they said it couldn't be done! 2004-12-09 Paul Eggert * bin/.cvsignore: Add autoconf.in. * tests/.cvsignore: Add wrapper.in. * lib/autotest/general.m4: Escape '$' in case pattern. 2004-12-09 Noah Misch * man/Makefile.am (autoconf.1): Regenerate when `autoconf.as' changes. * lib/autotest/general.m4 [--trace] (AT_INIT): Do not `set -v'. * tests/autotest.at: New file. * tests/suite.at: Include it. * tests/Makefile.am: Distribute it. * lib/autotest/general.m4 [--trace] (_AT_CHECK): Do not enable shell tracing on a command that could contain multiple lines. * doc/autoconf.text: Document that fact and its implications. * lib/m4sugar/m4sh.m4 (AS_ESCAPE_FOR_EXPAND): New macro. * tests/autotest.at (Multiline backquote command substitution, Multiline parameter expansion, Literal multiline command, Multiline parenthetical command substitution): Remove XFAIL. 2004-12-09 Paul Eggert * doc/autoconf.texi (Libraries): Clarify problems with AC_CHECK_LIB and suggest AC_SEARCH_LIBS. Suggested by Noah Misch and Stepan Kasal. 2004-12-08 Noah Misch * configure.ac (test suite): Cease to generate wrapper scripts. * configure: Regenerate. * lib/freeze.mk (MY_AUTOM4TE): Wrap the uninstalled autom4te directly. (m4f_dependencies): Adjust accordingly. * tests/Makefile.am (Wrappers): Generate wrapper scripts. (wrapper.in): Generate it in the build directory. (MAINTAINERCLEANFILES): Delete wrapper.in. (CLEANFILES): Add wrapper.in. * tests/wrapper.as: Move AS_INIT to very top, preserving copyright in the output. Replace each $as_me with a @wrap_program@. * tests/wrapper.in: Delete it; we always build it. * bin/Makefile.am (autoconf.in): Generate it in the build directory. (EXTRA_DIST): Remove autoconf.in. (CLEANFILES): Add autoconf.in. (autoconf): Find autoconf.in in the build directory. * bin/autoconf.in: Delete it; we always build it. 2004-12-08 Noah Misch * lib/autotest/general.m4 (AT_INIT): Replace a `tr' with a `sed'. Join PATH members so as to not prepend an empty element. Move a comment. * Makefile.am (SUBDIRS): Build in `tests' last. * tests/Makefile.am (installcheck-local): Add check-local dependencies. 2004-12-08 Paul Eggert * lib/mdate-sh: Don't use "set - x`$ls_command /`", as zsh mishandles the spaces inside $ls_command. Problem reported by Loulou Pouchet in . Don't use "set - x"; plain "set x" is enough, and simplifies debugging. 2004-12-07 Stepan Kasal * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Fix typo in previous patch: extra "-l"s. 2004-12-06 Paul Eggert * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Check libc before looking elsewhere for getmntent. Problem reported by Mark D. Baushke. * doc/autoconf.texi (Particular Functions): Mention new behavior. 2004-12-03 Stepan Kasal * lib/autoconf/general.m4 (AC_DEFINE, AC_DEFINE_UNQUOTED): Factor out the common code to ... (_AC_DEFINE_Q): ... a new macro; simplify the condition about the value of the #define--default to 1, iff the macro was called with exactly one parameter. 2004-12-02 Paul Eggert * lib/autoconf/functions.m4 (AC_FUNC_MEMCMP): Use "char c = '\200';" rather than "char c = 0x80;" as the latter doesn't conform to the strict C standard due to overflow on signed char hosts. * lib/autoconf/c.m4 (_AC_PROG_CC_STDC): Prefer -qlanglvl=extc89 to -qlanglvl=ansi. We don't want to disable extensions. 2004-11-29 Paul Eggert * doc/autoconf.texi (Particular Programs): @code{$PATH} -> @env{PATH}. (Using Autotest, testsuite Scripts, Writing testsuite.at): Reword slightly to avoid some English-language problems noted by Ralf Wildenhues in: http://lists.gnu.org/archive/html/autoconf-patches/2004-11/msg00027.html 2004-11-29 Stepan Kasal * NEWS: Add ^L above each release. 2004-11-28 Paul Eggert Fix documentation problems reported by Russ Boylan in , along with some nearby cruft. * doc/autoconf.texi (Libtool): Libtool can be used without Automake (not without Autoconf). (Introduction): Mention lists.gnu.org. * BUGS: Don't mention bugs.gnu.org. Remove mention of ancient libtool compatibility problem. * NEWS: Mention that bugs.gnu.org is kaput. * README: Likewise. Mention where mailing list archives can be found. 2004-11-28 Stepan Kasal * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): A typo in the comment. 2004-11-26 Paul Eggert * doc/autoconf.texi (Pretty Help Strings): Go back to single-quoting assignments to cache variables. 2004-11-23 Stepan Kasal * doc/autoconf.texi (Pretty Help Strings): Fix quoting issues with the examples; fix the bug in MY_ARG_WITH example reported by Alexandre Duret-Lutz. * lib/autoconf/general.m4 (AC_ARG_ENABLE, AC_ARG_ENABLE): Enable expansion of $1 in the comment emitted to configure. 2004-11-23 Paul Eggert * doc/autoconf.texi (Pretty Help Strings): Fix typo in my editing of the previous patch. Problem reported by Alexandre Duret-Lutz. 2004-11-22 Stepan Kasal * doc/autoconf.texi (Autoconf Language): Explain that ``descriptions'' may not be double quotes. (Quotation Rule Of Thumb): Likewise. (Pretty Help Strings): Likewise; remove the wrong comment; simplify the examples and improve their quoting. 2004-11-13 Stepan Kasal * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Don't check the $1_found variable, don't test whether the file is executable; Both things are checked ... (_AC_PATH_PROG_FEATURE_CHECK): ... here; AS_EXECUTABLE_P replaces the former ``test -f''. * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Fix a typo. 2004-11-10 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Avoid cp -r; use cp -R instead. 2004-11-10 Derek R. Price * doc/autoconf.texi (Limitations of Usual Tools): Note `cp -r' limitations. Reorder paragraphs for clarity. 2004-10-11 Paul Eggert * doc/autoconf.texi: Standardize spelling of "Posix" (as opposed to "POSIX" or "@acronym{POSIX}"), and similarly for "DOS variants", "Unix", and some related minor wording fixups. (Shellology, Special Shell Variables): Document that the Zsh problem with NULLCMD was fixed in zsh 3.1.6-dev-18. Thanks to Alexandre Duret-Lutz for this info. 2004-10-10 Alexandre Duret-Lutz * doc/autoconf.texi (One-Shot Macros): New node. 2004-09-28 Paul Eggert * doc/autoconf.texi (Function Portability): Fix misdescription of putenv. Problem reported by Michael Wardle. 2004-09-22 Paul Eggert * doc/autoconf.texi (auindex): New macro. (AU_DEFUN): Use it to fix the bug when the index contained AC_AU_DEFUN. Problem reported by Stepan Kasal. 2004-09-05 Paul Eggert Fix problems reported by Andreas Buening in: http://lists.gnu.org/archive/html/autoconf-patches/2004-04/msg00004.html * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Set SHELL=/bin/sh in test makefile. * lib/autotest/general.m4 (AT_INIT): Don't assume /dev/null is readable; it's not true in OS/2-emx. 2004-09-04 Paul Eggert * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): If xmkmf returns "/usr/include", clear ac_x_includes instead of leaving it as "no" (trivial change). Problem and patch reported by Andrew Church in: http://lists.gnu.org/archive/html/bug-autoconf/2004-04/msg00016.html 2004-09-03 Paul Eggert * doc/autoconf.texi: Give AC_DEFINE and AC_DEFINE_UNQUOTED three args in examples. Problem reported by Frederik Fouvry in: http://lists.gnu.org/archive/html/bug-autoconf/2004-09/msg00017.html Also, fix some minor spacing and punctuation bugs. 2004-09-02 Akim Demaille * doc/autoconf.texi (Limitations of Builtins): Swap "cd" and "case" to restore ordering. Reported by Stepan Kasal. 2004-08-26 Akim Demaille * doc/autoconf.texi: Minor typos and stylos. 2004-08-20 Paul Eggert * configure.ac (AC_INIT): Bump to 2.59c. 2004-08-20 Paul Eggert Version 2.59b. * README: Add advice about m4 1.4.2. * Makefile.cfg (wget_files): Remove config.guess, config.sub, texinfo.tex for now (done by hand now). * Makefile.maint (wget_files, cvs_files): Remove ansi2knr.c; nobody uses it. (ansi2knr.c-url_prefix): Remove. (cvs-update): Fix test for failure. I don't know why it ever worked... * doc/autoconf.texi: Update URLs, some of which went stale. Use @uref rather than @href. * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Have configure handle "--" as per POSIX. Suggested by Paul Pogonyshev. * config/config.guess, config/config.sub, config/elisp-comp, config/install-sh, config/mkinstalldirs, config/texinfo.tex, doc/fdl.texi, doc/standards.texi: Sync with master copy. * NEWS, TODO, configure.ac, bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in, doc/autoconf.texi, doc/install.texi, lib/Autom4te/Configure_ac.pm, lib/Autom4te/FileUtils.pm, lib/autoconf/general.m4, lib/autoconf/programs.m4, lib/autoconf/status.m4, lib/autotest/general.m4, lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4, tests/local.at, tests/m4sh.at, tests/tools.at, tests/torture.at: Use "file name" rather than "filename" or "path", to be consistent with the terminology of the GNU coding standards. 2004-08-19 Paul Eggert * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C), AC_C_LONG_DOUBLE): Undo 2004-06-04 change, as it didn't work with HP-UX 11.23 cc/aCC or Tru64 4.0 cc. Problem reported by Noah Misch in . More fixes to support spaces in the name of the build directory. This isn't a complete fix but it's an improvement. * bin/autoconf.as (autom4te_options): New var. Use it instead of appending to AUTOM4TE, so that we can allow spaces in the build directory's absolute name. * bin/autoheader.in ($autoconf): Allow spaces in file names. * lib/autotest/general.m4 (AT_INIT, AT_CLEANUP, _AT_CHECK, AT_CHECK_NOESCAPE): Likewise. * tests/wrapper.as (testdir, AUTOM4TE_CFG, autom4te_perllibdir, main program): Likewise. 2004-08-18 Paul Eggert * lib/autoconf/general.m4 (_AC_INIT_HELP): Quote $ac_popdir uses. From Ralf Corsepius in: http://lists.gnu.org/archive/html/autoconf-patches/2004-08/msg00014.html 2004-08-12 Paul Eggert * doc/autoconf.texi (Function Portability): Document isinf and and isnan. From a suggestion by Kevin Ryde. * lib/Autom4te/General.pm (END): Return correct exit status even if unlink succeeds and sets $?. Needed with Solaris 8's perl 5.00503. 2004-08-09 Paul Eggert * tests/torture.at (Deep Package): Use configure.in, not configure.ac, for compatibility with Automake 1.4. Reported by J C Fitzgerald in . 2004-08-04 Alexandre Duret-Lutz * lib/autoconf/general.m4 (AC_REQUIRE_AUX_FILE): New empty macro. (AC_CANONICAL_BUILD): Call it to require config.sub and config.guess. * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Likewise for install-sh. * doc/autoconf.texi (Input): Document AC_REQUIRE_AUX_FILE. * lib/autom4te.in (Automake-preselections): Preselect AC_REQUIRE_AUX_FILE. Automake 1.10 will trace it. 2004-08-02 Alexandre Duret-Lutz * lib/autom4te.in (Automake-preselections): Preselect AC_CANONICAL_BUILD and AC_CANONICAL_TARGET. Automake 1.9.1 will trace them. 2004-07-29 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Set BIN_SH, for Tru64. * doc/autoconf.texi (Shellology): Mention BIN_SH. Document problem with "`""`" in pdksh POSIX mode. 2004-07-27 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Use "set -o posix" with pdksh, too. Problem reported by Patrick Welche via Gary V. Vaughan. * doc/autoconf.texi (Shellology): Note that set -o posix is useful for pkdsh, too. 2004-06-24 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Require _AS_UNSET_PREPARE, so that we can use $as_unset directly. Don't fail if ENV or BASH_ENV is readonly. (AS_SHELL_SANITIZE): Don't fail if ENV, MAIL, MAILPATH, LC_ALL, etc. are read only. Problem reported by Ludovic Courtes. 2004-06-23 Noah Misch * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): If the shell is zsh, disable GLOB_SUBST to avoid backslash handling problems. (trivial change) 2004-06-04 Paul Eggert * doc/autoconf.texi (File System Conventions): Warn about names like "aux". Problem reported by Eric Blake. * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY (C)): Use division by zero instead of array size, so that we can use any arithmetic constant expression (instead of requiring an integer constant expression). This allows us to test expressions like DBL_MAX < LDBL_MAX, which didn't conform to the C standard using the old method. (AC_C_LONG_DOUBLE): Put back in the tests for LDBL_MAX and LDBL_EPSILON, now that we can do floating-point tests at compile time. 2004-06-02 Paul Eggert * lib/autoconf/c.m4 (AC_C_LONG_DOUBLE): Don't check LDBL_MAX and LDBL_EPSILON, as the resulting expression isn't an integer constant expression and violates the C standard. Problem reported by Nelson H. F. Beebe. Also, check for "L" suffix, and check that long double doesn't have worse range or precision than double, that mixed-mode arithmetic doesn't generate a diagnostic, that double constants fit in long double. 2004-06-03 Kevin Ryde * doc/autoconf.texi (Function Portability): Add notes on free(NULL), malloc(0) and realloc(NULL,size). * doc/autoconf.texi (Shell Substitutions): Spelling error reported by Bob Proulx. 2004-05-31 Paul Eggert * lib/autoconf/headers.m4 (HAVE_STDBOOL_H): Detect _Bool bug in HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. Problem reported by Jim Meyering. 2004-05-26 Paul Eggert * doc/autoconf.texi (Limitations of Builtins): Mention that ! COMMAND can be rewritten using if-then-else. Suggested by Bruno Haible. 2004-05-25 Paul Eggert * doc/autoconf.texi (testsuite Scripts): Fix typo. Problem reported by Stepan Kasal. 2004-05-24 Paul Eggert * tests/Makefile.am (autoconfdir): Fix to match comment (trivial change). Patch reported by Ralf Wildenhues in . * lib/autoconf/functions.m4 (AC_FUNC_MBRTOWC): Don't assume that a function F exists if the compiler and linker let you compile an expression like (F != 0). Recent versions of GCC optimize away the reference to F in that case, since every function address must be nonzero, so the link succeeds even if F does not exist. Problem reported by Manu in . * doc/autoconf.texi (Systemology): Standardize on the spelling of "Unix". Many uses changed. (Limitations of Builtins): Explain better why the ! command isn't portable. 2004-05-22 Alexandre Duret-Lutz * lib/autom4te.in (Automake-preselections): Preselect LT_SUPPORTED_TAG in lieu of AC_LIBTOOL_TAGS. 2004-05-19 Kevin Ryde * doc/autoconf.texi (Function Portability): Add strerror_r, cross referencing AC_FUNC_STRERROR_R. * doc/autoconf.texi (Particular Functions): In AC_FUNC_CLOSEDIR_VOID, note pessimistic assumption when cross compiling. 2004-05-16 Paul Eggert * doc/autoconf.texi (Limitations of Make): Note that BSD make (until 2004) invoked subcommands with sh -e, contra POSIX. Reported by Kevin Ryde. 2004-05-10 Eric Sunshine * programs.m4 (_AC_PROG_GREP): Fixed bug where PATH argument handed to _AC_PATH_PROG_FEATURE_CHECK contained leading whitespace (i.e. " $PATH:/usr/xpg4/bin"). This resulted in bogus tests, such as `test -f " /usr/bin/grep"', which _always_ failed. (AC_PROG_SED): Ditto bogus PATH fix. * autoconf.texi (AC_PROG_GREP): Properly document that this macro requires that grep correctly supports _multiple_ `-e' options, rather than stating only that grep should accept `-e'. 2004-05-03 Paul Eggert Port to C99, which requires that 'exit' be declared. * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Use AC_INCLUDES_DEFAULT to ensure that stdlib.h is included. * lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_SETPGRP, AC_FUNC_STRTOD, AC_FUNC_SETVBUF_REVERSED, AC_FUNC_FORK, _AC_FUNC_FORK, _AC_FUNC_VFORK, AC_FUNC_WAIT3): Likewise. * lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise. * lib/autoconf/types.m4 (AC_TYPE_GETGROUPS): Likewise. * lib/autoconf/headers.m4 (AC_HEADER_STDC): Include when using 'exit' in a test; C99 requires that 'exit' be declared. 2004-05-02 Paul Eggert * doc/autoconf.texi (Particular Programs): AC_PROG_GREP now prefers 'grep' implementations that accept -e. (Limitations of Usual Tools): Describe problems of traditional egrep and fgrep with long input lines, and of traditional grep with -e. * lib/autoconf/programs.m4 (AC_PROG_GREP): Check for -e, too. (_AC_PROG_GREP): Assume 3rd arg is properly quoted for the shell. All callers changed. Append /usr/xpg4/bin to the PATH, for Solaris. (_AC_FEATURE_CHECK_LENGTH): Discard stderr, so we don't bother the user with complaints about multiple -e options. * tests/local.at (AC_STATE_SAVE): Use $GREP, not grep. Define it with AC_PROG_GREP. * configure.ac (AC_PROG_GREP): Add. * lib/freeze.mk (GREP): New macro. 2004-05-02 Eric Sunshine * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Consult $SHELL as a possible candidate only after all others fail, rather than consulting it first. This improves backward compatibility by better reflecting the way shell selection occurred in previous versions of Autoconf, and should help to avoid triggering latent problems in other packages, such as the one in Automake where zsh is not handled robustly: http://mail.gnu.org/archive/html/automake/2004-04/msg00095.html Although it is not Autoconf's responsibility to work around problems in Automake, it nevertheless makes sense to avoid introducing unnecessary incompatibilites. 2004-04-22 Albert Chin-A-Young , Gary V. Vaughan * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Don't guess how deeply nested we are when a suitable tool is found, set the ac_path_TOOL_found flag. (_AC_PATH_PROG_FEATURE_CHECK): Encapsulate knowledge of how deeply nested we are in this macro. Break out of all 3 nested loops if ac_path_TOOL_found is set. 2004-04-21 Gary V. Vaughan * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Break out of the _AS_PATH_WALK loop too if GNU flavor is found. 2004-04-21 Alexandre Duret-Lutz * doc/autoconf.texi (Limitations of Make): Update documentation for `$<'. New entry `Long lines', based on a report from Simon Josefsson. Augment the documentation for SHELL = @SHELL@ with a paragraph about DJGPP, based on a mail from Richard Dawe. 2004-04-20 Paul Eggert * tests/c.at (C keywords): Don't assume that GCC supports "restrict" and "inline", as sufficiently-old GCC versions do not (also, GCC configured to be in pedantic C89 mode does not). Problem reported by Sumit Pandya in: http://mail.gnu.org/archive/html/autoconf/2004-04/msg00092.html * lib/autoconf/c.m4 (_AC_PROG_CC_G, _AC_PROG_CXX_G): Don't consider -g to work if it generates warnings when plain compiles don't. Problem reported by Braden McDaniel in: http://mail.gnu.org/archive/html/autoconf-patches/2003-07/msg00014.html * doc/autoconf.texi (Slashes): New section, to document a problem reported by Jim Meyering in: http://mail.gnu.org/archive/html/bug-coreutils/2004-02/msg00060.html * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Remove potential linker output files before linking, to work around IRIX 6 linker bug. Problem reported by Rainer Orth in: http://mail.gnu.org/archive/html/autoconf-patches/2004-02/msg00007.html 2004-04-20 Gary V. Vaughan * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Make the best tool so far counter rely on the tool path variable name to avoid checks for one tool being affected by the results of running the length check on a previous tool. * lib/autoconf/programs.m4 (_AC_PROG_GREP): Take an additional match expression argument, as different greps have different regular expression flavours. (AC_PROG_FGREP): Pass 'FGREP'. fgrep treats all match chars as literals. (AC_PROG_EGREP): Pass 'EGREP$'. (AC_PROG_GREP): Pass 'GREP$'. 2004-04-20 Albert Chin-A-Young * lib/autoconf/programs.m4 (AC_PROG_GREP): Cache variable is `ac_cv_path_GREP', not `oc_cv_path_GREP'. 2004-03-29 Paul Eggert * doc/autoconf.texi (Particular Headers, Particular Types, Generic Types, Specific Compiler Characteristics, System Services, Obsolete Macros): Use 'long int', 'short int', 'unsigned int' etc. consistently instead of 'long', 'short', 'unsigned' etc. * lib/autoconf/c.m4 (AC_LANG_INT_SAVE(C), AC_C_BIGENDIAN): Likewise. * lib/autoconf/functions.m4 (AC_FUNC_MMAP, AC_FUNC_SELECT_ARGTYPES): Likewise. * lib/autoconf/headers.m4 (AC_HEADER_SYS_WAIT): Likewise. * lib/autoconf/types.m4 (AC_TYPE_GETGROUPS, AC_TYPE_SIZE_T, AC_TYPE_OFF_T): Likewise. * tests/semantics.at (AC_CHECK_TYPES: backward compatibility): Likewise. * tests/foreign.at (Libtool): Create an empty aclocal.m4, to pacify libtool 1.5.2. Fix quoting problems in sed command. 2004-03-28 Paul Eggert * doc/autoconf.texi (Particular Structures): AC_STRUCT_TIMEZONE now defines HAVE_DECL_TZNAME if it is declared, when HAVE_STRUCT_TM_TM_ZONE is not defined. * lib/autoconf/types.m4 (AC_STRUCT_TIMEZONE): Implement this. Do not assume atoi. Rely on HAVE_DECL_TZNAME when testing for HAVE_TZNAME. 2004-03-28 Steven G. Johnson * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Corrected superfluous backslashing of quotes (") in sed expressions; thanks to Paul Eggert. 2004-03-26 Steven G. Johnson * lib/autoconf/fortran.m4 (_AC_PROG_FC): new name of Intel Fortran compiler is ifort, also added pghpf; thanks to Nelson H. F. Beebe for the bug report. 2004-03-26 Steven G. Johnson * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): fix for quoted -cmdline argument in Portland Group compiler (bug reported by Jeffrey J. Barteet). 2004-03-25 Kevin Ryde * doc/autoconf.texi (Specifying Names): Move cross_compiling ovindex to (Run Time): ... here, where it's now mentioned. 2004-03-19 Alexandre Duret-Lutz * doc/autoconf.texi (autom4te Invocation): Language Autoconf inherits from language Autoconf-without-aclocal-m4. (Customizing autom4te): Adjust example; the cache must now be disabled for language Autoconf-without-aclocal-m4. 2004-03-16 Paolo Bonzini Nathanael Nerode * lib/autoconf/programs.m4 (AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Warn if a cross-tool is found without a prefix. (AC_PATH_TARGET_TOOL, AC_CHECK_TARGET_TOOL, AC_CHECK_TARGET_TOOLS): New macros. * doc/autoconf.texi (Generic Programs): Document (AC_PATH_TARGET_TOOL, AC_CHECK_TARGET_TOOL, AC_CHECK_TARGET_TOOLS, and warn for future changes in the behavior of AC_PATH_TOOL, AC_CHECK_TOOL and AC_CHECK_TOOLS. (Specifying Names): Document the reason for these future behavioral changes. * tests/mktests.sh: Do not generate tests for the new macros. * NEWS: Document these changes. * doc/autoconf.texi: Avoid macros with unbraced arguments, they make TeX hang up. 2004-03-15 Paul Eggert * NEWS: New macro AC_CHECK_ALIGNOF. * doc/autoconf.texi (Generic Compiler Characteristics): Document it. * lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Use long int rather than int; avoid "a `$1'" since this isn't grammatical if $1 begins with a vowel. (AC_CHECK_ALIGNOF): New macro. * tests/mktests.sh (ac_exclude_list): Exclude AC_CHECK_ALIGNOF. * tests/semantics.at (AC_CHECK_ALIGNOF): Add tests similar to those for sizeof. 2004-03-03 Paul Eggert * bin/Makefile.am (edit): Don't use $< in a context where POSIX doesn't require support for it. Use $@.in instead. Problem reported by Anthony N. Frasso in . * bin/autoscan.in, bin/autoupdate.in: Add @configure_input@ comment. 2004-02-23 Gary V. Vaughan * bin/autoreconf.in (autoreconf_current_directory): Recognize LT_INIT from the next generation of Libtool. * lib/autom4te.in (Autoreconf-preselections): Ditto. 2004-02-20 Alexandre Duret-Lutz * doc/autoconf.texi (Limitations of Usual Tools) : `mkdir -p' is not always thread-safe. Report from Nathanael Nerode. 2004-02-18 Paul Eggert Fix a dependencies problem, stemming from a Autoconf 2.59 build problem on QNX reported by Stephen Rasku in . * bin/Makefile.am ($(srcdir)/autoconf.in): Depend on $(m4sh_m4f_dependencies); this removes a FIXME. * tests/Makefile.am ($(srcdir)/wrapper.in): Likewise. (MAINTAINERCLEANFILES): Split into pieces, one per related section. Add $(srcdir)/wrapper.in. 2004-02-09 Paul Eggert * doc/autoconf.texi (Setting Output Variables): Emphasize that AC_SUBST provides no portable way to escape literal newlines. * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Ignore all flags of the form -lcrt*.o, not just -lcrt[01].o and -lcrtbegin.o. Darwin uses -lcrt2.o and there's little point to cataloging all the system variants. Partial fix reported by Andreas Waechter in: http://mail.gnu.org/archive/html/autoconf-patches/2004-02/msg00006.html for bug reported by Nelson H. F. Beebe in: http://mail.gnu.org/archive/html/bug-autoconf/2003-12/msg00090.html 2004-02-04 Paolo Bonzini * doc/autoconf.texi (AU_DEFUN): Fix English, suggested by Paul Eggert. * lib/autoconf/autoupdate.m4: Correct reference to acobsolete.m4, suggested by Alexandre Duret-Lutz. 2004-02-02 Paolo Bonzini * bin/autoupdate.in: Define __file__ so that warnings refer to the correct file. * doc/autoconf.texi (AU_DEFUN): Describe more correctly the behavior of the third argument. * lib/autoconf/autoupdate.m4 (AU_DEFUN): Describe more correctly the behavior of the third argument. Document what the three macros that AU_DEFUN defines do. Fix warning message when the third argument includes $0 (reported by Alexandre Duret-Lutz). 2004-01-30 Paolo Bonzini Eric Sunshine Paul Eggert * lib/m4sugar/m4sh.m4 (M4SH-SANITIZE): New diversion. (AS_INIT): Output shell initialization there. Removed optional parameter. Expand _AS_SHELL_FN_SPY. (AS_INIT_WITH_SHELL_FN): Removed. (_AS_SHELL_FN_SPY): New macro. (AS_DETECT_REQUIRED, AS_DETECT_SUGGESTED): New macros. (AS_SHELL_SANITIZE): Remove loop to find better shell and documentation for the parameter. (_AS_DETECT_BETTER_SHELL): Move it here. (_AS_SHELL_FN_WORK): Remove shell invocation, reformat. (_AS_RUN): Move it here, support testing with eval. (AS_REQUIRE_SHELL_FN): Require shell functions when it is used. (_AS_LINENO_WORKS): Put around braces, we do not trigger the bash bug anymore. * lib/autotest/general.m4: Document M4SH-SANITIZE, do not use AS_INIT_WITH_SHELL_FN. * bin/autoconf.in, tests/wrapper.in: Regenerated. 2004-01-30 Paolo Bonzini * bin/autoupdate.in: Trace AU_DEFINE instead of AU_DEFUN. * doc/autoconf.texi: Don't say that the third parameter is broken. * lib/autoconf/autoupdate.m4 (AU_DEFINE): New dummy macro. (AU_DEFUN): Honor the third parameter, create autoupdate macros with AU_DEFINE. * lib/autoconf/headers.m4 (AC_USG, AC_MEMORY_H, AC_DIR_HEADER): Use AU_DEFUN's third parameter. * lib/autoconf/lang.m4 (AC_LANG_SAVE): Likewise. * lib/autoconf/programs.m4 (AC_RSH): Likewise. * lib/autoconf/specific.m4 (AC_HAVE_POUNDBANG, AC_ARG_ARRAY, AC_CYGWIN, AC_EMXOS2, AC_MINGW32, AC_XENIX_DIR): Likewise. * lib/autoconf/types.m4 (AC_INT_16_BITS, AC_LONG_64_BITS, AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV): Likewise. * lib/autoconf/status.m4: Remove FIXME. * tests/local.at (AT_CHECK_AU_MACRO): Ignore stderr, check that the macro is not present anymore in the updated configure.ac. * tests/tools.at (autoupdate AC_LINK_FILES): Ignore stderr of autoupdate. 2004-01-28 Paul Eggert * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Add 2004 to copyright years. * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Add 1992 thorugh 2003 (except 1997) to the list of copyright years. This undoes the 2003-05-22 change, which removed the older years from the list. * lib/autoconf/status.m4 (AC_OUTPUT): Update copyright date to 2004. 2004-01-27 Gary V. Vaughan Albert Chin-A-Young * lib/autoconf/programs.m4 (AC_PROG_GREP): New macro to test for a grep or ggrep program in PATH that accepts as long lines as possible. * lib/autoconf/programs.m4 (_AC_PROG_GREP): Factor out the core of AC_PROG_GREP. (AC_PROG_EGREP, AC_PROG_FGREP): Use it to find best available egrep and fgrep respectively if $GREP -E/-F don't work. (_AC_PATH_PROG_FEATURE_CHECK): Factor out the common core of _AC_PROG_GREP, and AC_PROG_SED. (_AC_FEATURE_CHECK_LENGTH): New helper macro for finding the longest input length accepted by a command. (AC_PROG_SED): Use it. * doc/autoconf.texi (Particular Programs): Document the changes. * NEWS: Updated. 2004-01-27 Paul Eggert * bin/autoconf.as ($version): Update copyright from 2003 to 2004. * bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in: Likewise. * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Likewise. * Makefile.in, aclocal.m4, configure, bin/Makefile.in, bin/autoconf.in, config/Makefile.in, config/config.guess, config/config.sub, config/install-sh, config/mdate-sh, config/mkinstalldirs, config/texinfo.tex, 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, man/autoconf.1, man/autoheader.1, man/autom4te.1, man/autoreconf.1, man/autoscan.1, man/autoupdate.1, man/config.guess.1, man/config.sub.1, man/ifnames.1, tests/Makefile.in, tests/acc.at, tests/acfortran.at, tests/acfunctions.at, tests/acgeneral.at, tests/acheaders.at, tests/aclang.at, tests/aclibs.at, tests/acspecific.at, tests/acstatus.at, tests/actypes.at: Regenerate and/or sync with original sources. 2004-01-26 Paul Eggert * doc/autoconf.texi (Default Includes): Include even if HAVE_INTTYPES_H is defined. This is needed on Tru64 5.1b with Compac C V6.5-207 (dtk), which defines uintmax_t in but not . Problem reported by Tim Mooney in . * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Likewise. * lib/autoconf/programs.m4 (AC_PROG_SED): Use diff, not sed; otherwise "make check" fails because it forbids cmp (I guess because cmp treats files as binary on DOS-like systems). * tests/mktests.sh: Update copyright date to 2004, since some tests have changed in 2004. 2004-01-23 Gary V. Vaughan * lib/autoconf/programs.m4 (AC_PROG_SED): New macro to test for a non-truncating sed or gsed program in PATH. * tests/acprograms.at: Add it. * doc/autoconf.texi (Particular Programs): Document it. * NEWS: Updated. 2004-01-15 Paul Eggert * lib/autoconf/c.m4 (_AC_PROG_CC_STDC): Try -std, not -std1, since -std1 disables some useful extensions on Tru64. Problem reported by N. Lichtmaier in . 2004-01-14 Paul Eggert * doc/autoconf.texi (Programming in M4sh): Document that AS_MKDIR_P succeeds if the destination is a symbolic link to an existing directory. (Limitations of Usual Tools): Note that mkdir -p might not succeed on symlinks to directories. 2004-01-13 Paul Hilfinger * lib/autoconf/autoupdate.m4 (AU_DEFUN): Grammar fix in comment. * bin/autoheader.in: Grammar fix in message. * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Test for dir before calling mkdir -p. (trivial changes) 2004-01-13 Eric Blake * doc/autoconf.texi (Obsolete Macros): In AC_TRY_COMPILE and AC_TRY_LINK, s/AC_LANG_SOURCE/AC_LANG_PROGRAM/. (trivial change) 2004-01-10 Jim Meyering * doc/autoconf.texi (Running the Preprocessor): Correct grammar. 2004-01-09 Paul Eggert * lib/autoconf/general.m4: Fix bug: AC_CHECK_SIZEOF evokes a warning with `autoconf -Wall,error'. Bug reported by Eric Blake in: http://mail.gnu.org/archive/html/autoconf-patches/2004-01/msg00000.html (_AC_COMPUTE_INT_COMPILE): Invoke _AC_COMPILE_IFELSE, not AC_COMPILE_IFELSE, since we now assume our caller invokes AC_LANG_COMPILER_REQUIRE, for symmetry with _AC_COMPUTE_INT_RUN. (_AC_COMPUTE_INT_RUN): Likewise, for _AC_RUN_IFELSE instead of AC_RUN_IFELSE; this avoids the warning mentioned above. (_AC_COMPUTE_INT): Invoke AC_LANG_COMPILER_REQUIRE. 2004-01-07 Paul Eggert * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Avoid \$ inside `"'...'"`, as it's confusing (and I suspect it may not work on some platforms). The code was incorrect anyway, as it assumed that \$ evaluated to itself in that context. Reported by Alexandre Duret-Lutz. 2004-01-07 Alexandre Duret-Lutz * lib/autom4te.in (Automake-preselections): Preselect AC_LIBTOOL_TAGS and _LT_AC_TAGCONFIG. 2004-01-06 Paul Eggert * doc/autoconf.texi (One Macro Call): Fix an incorrect example, and add more examples. Reported by Eric Sunshine. 2004-01-05 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Remove warning against "rm -fr" introduced yesterday; it was a false alarm. * bin/Makefile.am (autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate, ifnames): Don't use chmod -w. * lib/Makefile.am (autom4te.cfg): Likewise. * doc/autoconf.texi (Limitations of Usual Tools): Warn against "chmod -w". 2004-01-04 Paul Eggert Paolo Bonzini * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Speed up sed scripts by doing lineno substitution only on lines containing "$LINENO". 2004-01-04 Paul Eggert * lib/autoconf/general.m4 (AC_ARG_PROGRAM): Use "rm -f" to remove conftest.sed, not plain "rm". Bug reported by David Relson in . * Makefile.am (autom4te-update): Replace "rm -rf" and "rm -fr" with "rm -f -r", as POSIX requires. * Makefile.maint (my-distcheck, do-po-update): Likewise. * doc/autoconf.texi (Guidelines): Likewise. * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Likewise. * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Likewise. * lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Likewise. * lib/autotest/general.m4 (AT_INIT): Likewise. * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Likewise. * tests/Makefile.am (clean-local): Likewise. * tests/tortue.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS, srcdir): Likewise. * doc/autoconf.texi (Limitations of Usual Tools): Warn against "rm -fr". 2004-01-03 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools): Mention that cc -c -o might not work. From a suggestion by Kevin Ryde. (C Compiler, Generating Sources, Limitations of Usual Tools, Limitations of Make, Making testsuite Scripts): Don't put '-o' after non-options, as POSIX doesn't allow this. Mention that cc's name might be gcc or c89 or whatever. 2004-01-04 Kevin Ryde * doc/autoconf.texi: Add various further index entries. 2003-12-29 Paul Eggert * bin/autoreconf.in (autoreconf_current_directory): Fix typo: mkdir without umask arg. 2003-12-27 Alexandre Duret-Lutz * doc/autoconf.texi (Limitations of Make) : Documents OSF1/Tru64 make behavior. Replace `VPATH = ../src' by `VPATH = ../pkg/src' in examples to make the OSF1/Tru64 make explanation clearer. 2003-12-24 Andreas Schwab * doc/autoconf.texi (Default Includes): Fix misspelling of AC_INCLUDES_DEFAULT. 2003-12-03 Paolo Bonzini * configure.ac: Test if sh -n works. * configure: Regenerate. * tests/atlocal.in: Store the result here. * tests/local.at (AT_CHECK_SHELL_SYNTAX): Extracted from tools.at, looking in atlocal's ac_cv_sh_n_works instead of explicitly testing. (AT_CHECK_PERL_SYNTAX): Moved from tools.at. (AT_CHECK_AUTOCONF): Test for the configure script syntax. * tests/tools.at (Syntax of the shell scripts): Simplify using AT_CHECK_SHELL_SYNTAX. (Syntax of the Perl scripts): Remove definition of AT_CHECK_PERL_SYNTAX. 2003-12-03 Paolo Bonzini * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK): Redirect stderr to /dev/null. * bin/autoconf.in: Regenerate. * bin/wrapper.in: Regenerate. 2003-11-26 Paolo Bonzini * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Extracted from AS_SHELL_SANITIZE. (_AS_SHELL_FN_WORK, AS_INIT_WITH_SHELL_FN): New macros. (AS_SHELL_SANITIZE): Move reinvocation code from _AS_LINENO_WORKS, use it to find out if shell functions work. (_AS_LINENO_WORKS): Don't find another shell if $LINENO does not work. (AS_INIT): Pass parameter down to AS_SHELL_SANITIZE. (AS_REQUIRE_SHELL_FN): Test that AS_INIT_WITH_SHELL_FN was called. * lib/autotest/general.m4: Use AS_INIT_WITH_SHELL_FN. * bin/autoconf.in: Regenerate. * tests/wrapper.in: Regenerate. * tests/tools.at: Test the syntax of tests/autoconf and tests/testsuite. 2003-11-24 Akim Demaille * config/announce-gen (&print_locations, &print_signatures) (&sizes): New. Use them. No longer rely on Gnus to inline the list of signatures: compute them on the fly. 2003-11-24 Akim Demaille * doc/autoconf.texi (Particular Programs): AC_PROG_LEX can override some files. (Input): AC_CONFIG_AUX_DIR(aux) is a bad idea on DOS. From Debian Autoconf 2.58. 2003-11-24 Akim Demaille * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Quote $ac_popdir uses. From Debian Autoconf 2.58. 2003-11-24 Paolo Bonzini * TODO: Remove already done things. Update the part about finding tools for the target. 2003-11-24 Paolo Bonzini * lib/autoconf/headers.m4 (AC_USG, AC_MEMORY_H, AC_DIR_HEADER): Make wording more consistent. * lib/autoconf/specific.m4 (AC_CYGWIN, AC_EMXOS2, AC_MINGW32): Explain the transition better. * lib/autoconf/types.m4 (AC_INT_16_BITS, AC_LONG_64_BITS): Explain the transition better. 2003-11-24 Paolo Bonzini * doc/autoconf.texi (Obsoleting Macros): Don't document the third parameter of AU_DEFUN. * lib/autoconf/autoupdate.m4 (AU_DEFINE): Remove. (AU_DEFUN): Remove the third parameter, it was not used. Use AC_DEFUN directly, not AU_DEFINE. * lib/autoconf/status.m4 (AC_LINK_FILES): Move the message into the expanded body, consistently with other macros such as AC_USG. 2003-11-17 Paul Eggert * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Put at least 14 bytes into the initial confdefs.h, to work around a bug in NextStep 3.3 patch 3 reported by Eric Sunshine. 2003-11-15 Kevin Ryde * doc/autoconf.texi (Using System Type): Revise, showing $host rather than $target since the latter is not usual, add guidelines on when to use or not use the system type. 2003-11-12 Derek Price * doc/autoconf.texi (Limitations of Usual Tools): Fix what looks like a typo misrepaired by an auto-spellcheck. 2003-11-12 Akim Demaille * bin/autoreconf.in (&parse_args): Don't call automake with --force-missing unless it actually supports it. From Debian #219336. 2003-11-12 Akim Demaille * configure.ac: Bump to 2.59a. Require 2.59. 2003-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. ----- Local Variables: coding: utf-8 End: Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 3 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, see . autoconf2.64_2.64+dfsg.orig/m4/0000755000175000017500000000000011233220565014556 5ustar smcvsmcvautoconf2.64_2.64+dfsg.orig/m4/m4.m40000644000175000017500000000611311233153352015340 0ustar smcvsmcv# m4.m4 serial 9 # Copyright (C) 2000, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without warranty of any kind. # AC_PROG_GNU_M4 # -------------- # Check for GNU M4, at least 1.4.6 (all earlier versions had bugs in # trace support and regexp support): # http://lists.gnu.org/archive/html/bug-gnu-utils/2006-11/msg00096.html # http://lists.gnu.org/archive/html/bug-autoconf/2009-07/msg00023.html # Also, check whether --error-output (through 1.4.x) or --debugfile (2.0) # is supported, and AC_SUBST M4_DEBUGFILE accordingly. AC_DEFUN([AC_PROG_GNU_M4], [AC_ARG_VAR([M4], [Location of GNU M4 1.4.6 or later. Defaults to the first program of `m4', `gm4', or `gnum4' on PATH that meets Autoconf needs.]) AC_CACHE_CHECK([for GNU M4 that supports accurate traces], [ac_cv_path_M4], [rm -f conftest.m4f ac_had_posixly_correct=${POSIXLY_CORRECT:+yes} AS_UNSET([POSIXLY_CORRECT]) AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4 gnum4], [dnl Creative quoting here to avoid raw dnl and ifdef in configure. # Root out GNU M4 1.4.5, as well as non-GNU m4 that ignore -t, -F. ac_snippet=change'quote(<,>)in''dir(,mac,bug)' ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl test -z "`$ac_path_M4 -F conftest.m4f &1`" \ && test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \ && test -f conftest.m4f \ && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=: rm -f conftest.m4f], [AC_MSG_ERROR([no acceptable m4 could be found in \$PATH. GNU M4 1.4.6 or later is required; 1.4.13 is recommended])])]) M4=$ac_cv_path_M4 AC_CACHE_CHECK([whether $ac_cv_path_M4 accepts --gnu], [ac_cv_prog_gnu_m4_gnu], [case `$M4 --help < /dev/null 2>&1` in *--gnu*) ac_cv_prog_gnu_m4_gnu=yes ;; *) ac_cv_prog_gnu_m4_gnu=no ;; esac]) if test "$ac_cv_prog_gnu_m4_gnu" = yes; then M4_GNU=--gnu else M4_GNU= fi AC_SUBST([M4_GNU]) if test x$ac_had_posixly_correct = xyes; then POSIXLY_CORRECT=: if test $ac_cv_prog_gnu_m4_gnu = no; then AC_MSG_WARN([The version of M4 that was found does not support -g.]) AC_MSG_WARN([Using it with POSIXLY_CORRECT set may cause problems.]) fi fi AC_CACHE_CHECK([how m4 supports trace files], [ac_cv_prog_gnu_m4_debugfile], [case `$M4 --help < /dev/null 2>&1` in *debugfile*) ac_cv_prog_gnu_m4_debugfile=--debugfile ;; *) ac_cv_prog_gnu_m4_debugfile=--error-output ;; esac]) AC_SUBST([M4_DEBUGFILE], [$ac_cv_prog_gnu_m4_debugfile]) ]) # Compatibility for bootstrapping with Autoconf 2.61. dnl FIXME - replace this with AC_PREREQ([2.62]) after the release. # AC_PATH_PROGS_FEATURE_CHECK was added the same time the slightly broken, # undocumented _AC_PATH_PROG_FEATURE_CHECK was deleted. m4_ifndef([AC_PATH_PROGS_FEATURE_CHECK], [m4_define([AC_PATH_PROGS_FEATURE_CHECK], [_AC_PATH_PROG_FEATURE_CHECK([$1], [$2], [$3], [$5]) ])]) autoconf2.64_2.64+dfsg.orig/m4/make-case.m40000644000175000017500000000165111204770547016661 0ustar smcvsmcv# make-case.m4 serial 1 # Copyright (C) 2008, 2009 Free Software Foundation, Inc. # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the notice and # this notice are preserved. This file is offered as-is, without # warranty of any kind. # AC_PROG_MAKE_CASE_SENSITIVE # --------------------------- # Checks whether make is configured to be case insensitive; if yes, # sets AM_CONDITIONAL MAKE_CASE_SENSITIVE. # AC_DEFUN([AC_PROG_MAKE_CASE_SENSITIVE], [AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_CACHE_CHECK([whether ${MAKE-make} is case sensitive], [ac_cv_prog_make_${ac_make}_case], [echo all: >conftest.make if ${MAKE-make} -f conftest.make ALL >/dev/null 2>&1; then ac_res=no else ac_res=yes fi eval ac_cv_prog_make_${ac_make}_case=$ac_res rm -f conftest.make]) AM_CONDITIONAL([MAKE_CASE_SENSITIVE], [eval test \$ac_cv_prog_make_${ac_make}_case = yes]) ]) autoconf2.64_2.64+dfsg.orig/bin/0000755000175000017500000000000011233220570015002 5ustar smcvsmcvautoconf2.64_2.64+dfsg.orig/bin/Makefile.am0000644000175000017500000000701011226773263017052 0ustar smcvsmcv# Make Autoconf commands. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, # 2009 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 3 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, see . include ../lib/freeze.mk bin_SCRIPTS = autom4te \ autoconf autoheader autoreconf ifnames autoscan autoupdate EXTRA_DIST = autoconf.as autoheader.in autoreconf.in autoupdate.in ifnames.in \ autoscan.in autom4te.in # Files that should be removed, but which Automake does not know. MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp # Get the release year from ../ChangeLog. RELEASE_YEAR = \ `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog` ## ------------- ## ## The scripts. ## ## ------------- ## edit = sed \ -e 's|@SHELL[@]|$(SHELL)|g' \ -e 's|@PERL[@]|$(PERL)|g' \ -e 's|@bindir[@]|$(bindir)|g' \ -e 's|@pkgdatadir[@]|$(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|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \ -e 's|@M4_GNU[@]|$(M4_GNU)|g' \ -e 's|@AWK[@]|$(AWK)|g' \ -e 's|@RELEASE_YEAR[@]|'$(RELEASE_YEAR)'|g' \ -e 's|@VERSION[@]|$(VERSION)|g' \ -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g' $(top_builddir)/bin/autom4te: autom4te # autoconf is written in M4sh. # FIXME: this target should depend on the frozen files below lib/m4sugar, # otherwise autom4te may pick up a frozen m4sh.m4f from an earlier # installation below the same $(prefix); work around this with --melt. autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies) $(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@ ## All the scripts depend on Makefile so that they are rebuilt when the ## prefix etc. changes. It took quite a while to have the rule correct, ## don't break it! ## Use chmod -w to prevent people from editing the wrong file by accident. $(bin_SCRIPTS): Makefile rm -f $@ $@.tmp srcdir=''; \ test -f ./$@.in || srcdir=$(srcdir)/; \ $(edit) $${srcdir}$@.in >$@.tmp chmod +x $@.tmp chmod a-w $@.tmp mv $@.tmp $@ autoconf: autoconf.in autoheader: $(srcdir)/autoheader.in autom4te: $(srcdir)/autom4te.in autoreconf: $(srcdir)/autoreconf.in autoscan: $(srcdir)/autoscan.in autoupdate: $(srcdir)/autoupdate.in ifnames: $(srcdir)/ifnames.in ## --------------- ## ## 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.64_2.64+dfsg.orig/bin/Makefile.in0000644000175000017500000005112311233217353017056 0ustar smcvsmcv# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # Make Autoconf commands. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, # 2009 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 3 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, see . # Freeze M4 files. # Copyright (C) 2002, 2004, 2006, 2007, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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.am \ $(srcdir)/Makefile.in subdir = bin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = ETAGS = etags CTAGS = ctags 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUFFIXES = .m4 .m4f AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg # Do not use AUTOM4TE here, since maint.mk (my-distcheck) # checks if we are independent of Autoconf by defining AUTOM4TE (and # others) to `false'. Autoconf provides autom4te, so that doesn't # apply to us. MY_AUTOM4TE = \ autom4te_perllibdir='$(top_srcdir)'/lib \ AUTOM4TE_CFG='$(AUTOM4TE_CFG)' $(top_builddir)/bin/autom4te \ -B '$(top_builddir)'/lib -B '$(top_srcdir)'/lib # keep ` ' # 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 = $(top_builddir)/bin/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/erlang.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.as autoheader.in autoreconf.in autoupdate.in ifnames.in \ autoscan.in autom4te.in # Files that should be removed, but which Automake does not know. MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp # Get the release year from ../ChangeLog. RELEASE_YEAR = \ `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog` edit = sed \ -e 's|@SHELL[@]|$(SHELL)|g' \ -e 's|@PERL[@]|$(PERL)|g' \ -e 's|@bindir[@]|$(bindir)|g' \ -e 's|@pkgdatadir[@]|$(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|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \ -e 's|@M4_GNU[@]|$(M4_GNU)|g' \ -e 's|@AWK[@]|$(AWK)|g' \ -e 's|@RELEASE_YEAR[@]|'$(RELEASE_YEAR)'|g' \ -e 's|@VERSION[@]|$(VERSION)|g' \ -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g' 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: $(srcdir)/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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/Makefile .PRECIOUS: 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 $(am__aclocal_m4_deps): install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files installcheck-binSCRIPTS: $(bin_SCRIPTS) bad=0; pid=$$$$; list="$(bin_SCRIPTS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: installcheck-binSCRIPTS 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 .MAKE: install-am install-strip .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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am \ installcheck-binSCRIPTS installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binSCRIPTS $(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 an 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 $(top_builddir)/bin/autom4te: autom4te # autoconf is written in M4sh. # FIXME: this target should depend on the frozen files below lib/m4sugar, # otherwise autom4te may pick up a frozen m4sh.m4f from an earlier # installation below the same $(prefix); work around this with --melt. autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies) $(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@ $(bin_SCRIPTS): Makefile rm -f $@ $@.tmp srcdir=''; \ test -f ./$@.in || srcdir=$(srcdir)/; \ $(edit) $${srcdir}$@.in >$@.tmp chmod +x $@.tmp chmod a-w $@.tmp mv $@.tmp $@ autoconf: autoconf.in autoheader: $(srcdir)/autoheader.in autom4te: $(srcdir)/autom4te.in autoreconf: $(srcdir)/autoreconf.in autoscan: $(srcdir)/autoscan.in autoupdate: $(srcdir)/autoupdate.in ifnames: $(srcdir)/ifnames.in # 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.64_2.64+dfsg.orig/bin/ifnames.in0000644000175000017500000001006511157462017016767 0ustar smcvsmcv#! @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, 2005, 2006, # 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # Reads from stdin if no files are given. # Writes to stdout. # Written by David MacKenzie # and Paul Eggert . BEGIN { my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; unshift @INC, $pkgdatadir; # 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; use Autom4te::FileUtils; # $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 . GNU Autoconf home page: . General help using GNU software: . "; # $VERSION # -------- $version = "ifnames (@PACKAGE_NAME@) @VERSION@ Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Paul Eggert. "; # &parse_args () # -------------- # Process any command line arguments. sub parse_args () { getopt (); } # %OCCURRENCE # ----------- my %occurrence; # &scan_file ($FILE-NAME) # ----------------------- sub scan_file ($) { my ($file_name) = @_; my $file = new Autom4te::XFile ("< " . open_quote ($file_name)); 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}{$file_name} = 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.64_2.64+dfsg.orig/bin/autoreconf.in0000644000175000017500000004767611157462017017534 0ustar smcvsmcv#! @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, 2004, 2005, 2006, # 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # Written by David J. MacKenzie. # Extended and rewritten in Perl by Akim Demaille. BEGIN { my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; unshift @INC, $pkgdatadir; # 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]... [DIRECTORY]... Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint' (formerly `gettextize'), and `libtoolize' where appropriate) repeatedly to remake the GNU Build System files in specified DIRECTORIES and their subdirectories (defaulting to `.'). By default, it only remakes those files that are older than their sources. If you install new versions of the GNU Build System, you can make `autoreconf' remake 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 --no-recursive don't rebuild sub-packages -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, M4, and MAKE are honored. Report bugs to . GNU Autoconf home page: . General help using GNU software: . "; # $VERSION # -------- $version = "autoreconf (@PACKAGE_NAME@) @VERSION@ Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. "; # 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'; my $make = $ENV{'MAKE'} || 'make'; # --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; # Does automake support --force-missing? my $automake_supports_force_missing = 0; my @prepend_include; my @include; # List of command line warning requests. my @warning; # Rerun `./configure && make'? my $run_make = 0; # Recurse into subpackages my $recursive = 1; ## ---------- ## ## 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' => \$run_make, 'recursive!' => \$recursive); # 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 2>/dev/null` =~ /--force/; $automake_supports_force_missing = `$automake --help 2>/dev/null` =~ /--force-missing/; # Dispatch autoreconf's option to the tools. # --include; $aclocal .= join (' -I ', '', map { shell_quote ($_) } @include); $autoconf .= join (' --include=', '', map { shell_quote ($_) } @include); $autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include); $autoheader .= join (' --include=', '', map { shell_quote ($_) } @include); $autoheader .= join (' --prepend-include=', '', map { shell_quote ($_) } @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' if $automake_supports_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; } # --verbose --verbose or --debug; if ($verbose > 1 || $debug) { $autoconf .= ' --verbose'; $autoheader .= ' --verbose'; $automake .= ' --verbose'; $aclocal .= ' --verbose'; } if ($debug) { $autoconf .= ' --debug'; $autoheader .= ' --debug'; $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 = find_configure_ac; # ---------------------- # # Is it using Autoconf? # # ---------------------- # my $uses_autoconf; my $uses_gettext; if (-f $configure_ac) { 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_hint ("autopoint is needed because this package uses Gettext", "$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 file systems 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_libltdl; my $uses_autoheader; my $uses_automake; 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', 'LT_INIT', 'LT_CONFIG_LTDL_DIR', 'AM_GNU_GETTEXT', 'AM_INIT_AUTOMAKE', ) . ' |'); 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|LT_INIT)/; $uses_libltdl = 1 if /LT_CONFIG_LTDL_DIR/; $uses_autoheader = 1 if /AC_CONFIG_HEADERS/; $uses_automake = 1 if /AM_INIT_AUTOMAKE/; push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/ && $recursive; } # The subdirs are *optional*, they may not exist. foreach (@subdir) { if (-d) { verb "$configure_ac: adding 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, 0755 or error "cannot create $aux_dir: $!"; } # -------------------- # # Running libtoolize. # # -------------------- # if (!$uses_libtool) { verb "$configure_ac: not using Libtool"; } elsif ($install) { if ($uses_libltdl) { $libtoolize .= " --ltdl"; } xsystem_hint ("libtoolize is needed because this package uses Libtool", $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. # # ------------------ # if (!$uses_automake) { 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 ($run_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. Unless `--no-recursive' is passed, # AC_CONFIG_SUBDIRS will be traversed in &autoreconf_current_directory. for my $directory (@ARGV) { require_configure_ac ($directory); 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.64_2.64+dfsg.orig/bin/autoheader.in0000644000175000017500000002061611157462017017471 0ustar smcvsmcv#! @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, 2004, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # Written by Roland McGrath. # Rewritten in Perl by Akim Demaille. BEGIN { my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; unshift @INC, "$pkgdatadir"; # 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 . GNU Autoconf home page: . General help using GNU software: . "; # $VERSION # -------- $version = "autoheader (@PACKAGE_NAME@) @VERSION@ Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Roland McGrath and Akim Demaille. "; ## ---------- ## ## 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 one 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 (' --include=', '', map { shell_quote ($_) } @include); $autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @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]"; my $quoted_tmp = shell_quote ($tmp); 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;\'' . " " . shell_quote ($ARGV[0]) . " >$quoted_tmp/traces.pl"); local (%verbatim, %symbol); debug "$me: \`do'ing $tmp/traces.pl:\n" . `sed 's/^/| /' $quoted_tmp/traces.pl`; do "$tmp/traces.pl"; warn "couldn't parse $tmp/traces.pl: $@" if $@; unless ($config_h) { error "error: AC_CONFIG_HEADERS not found in $ARGV[0]"; exit 1; } # 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 ("> " . open_quote ("$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 ("< " . open_quote ($config_h_top)); while ($_ = $in->getline) { print $out $_; } } # Dump `acconfig.h', except for its bottom portion. if ($acconfig_h) { my $in = new Autom4te::XFile ("< " . open_quote ($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 ("< " . open_quote ($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 ("< " . open_quote ($config_h_bot)); while ($_ = $in->getline) { print $out $_; } } $out->close; # Check that all the symbols have a template. { my $in = new Autom4te::XFile ("< " . open_quote ("$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", $force); ### 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.64_2.64+dfsg.orig/bin/autom4te.in0000644000175000017500000007621011231604725017110 0ustar smcvsmcv#! @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, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. BEGIN { my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; unshift @INC, $pkgdatadir; # 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 $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@'; # $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 object 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(=[0-9]+)?|-L[0-9]*) /; # @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. # # FIXME: Trace status of renamed builtins was fixed in M4 1.4.5, which # we now depend on; do we still need to do this mapping? # # 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 variables \`M4\' and \`WARNINGS\' are 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[:FORMAT] 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 FORMAT defaults to \`\$f:\$l:\$n:\$%\', and can use the following escapes: \$\$ literal \$ \$f file where macro was called \$l line where macro was called \$d nesting depth of macro call \$n name of the macro \$NUM argument NUM, unquoted and with newlines \$SEP\@ all arguments, with newlines, quoted, and separated by SEP \$SEP* all arguments, with newlines, unquoted, and separated by SEP \$SEP% all arguments, without newlines, unquoted, and separated by SEP SEP can be empty for the default (comma for \@ and *, colon for %), a single character for that character, or {STRING} to use a string. Report bugs to . GNU Autoconf home page: . General help using GNU software: . "; # $VERSION # -------- $version = <<"EOF"; autom4te (@PACKAGE_NAME@) @VERSION@ Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Akim Demaille. 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). # parse_args guarantees that we will see at most one frozen file, and that # if a frozen file is present, it is the first argument. sub files_to_options (@) { my (@file) = @_; my @res; foreach my $file (@file) { my $arg = shell_quote ($file); if ($file =~ /\.m4f$/) { $arg = "--reload-state=$arg"; # If the user downgraded M4 from 1.6 to 1.4.x after freezing # the file, then we ensure the frozen __m4_version__ will # not cause m4_init to make the wrong decision about the # current M4 version. $arg .= " --undefine=__m4_version__" unless grep {/__m4_version__/} @m4_builtin; } push @res, $arg; } return join ' ', @res; } # load_configuration ($FILE) # -------------------------- # Load the configuration $FILE. sub load_configuration ($) { my ($file) = @_; use Text::ParseWords; my $cfg = new Autom4te::XFile ("< " . open_quote ($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. # FIXME: Is this still needed, now that we rely on M4 1.4.5? 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 ($_ eq '-') { push @argv, $_; } elsif (/\.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 --debugfile/--error-output. unlink ($tcache . $req->id . "t"); # Run m4. # # We don't output directly to the cache files, to avoid problems # when we are interrupted (that leaves corrupted files). xsystem ("$m4 @M4_GNU@" . join (' --include=', '', map { shell_quote ($_) } @include) . ' --debug=aflq' . (!exists $ENV{'AUTOM4TE_NO_FATAL'} ? ' --fatal-warning' : '') . " @M4_DEBUGFILE@=" . shell_quote ("$tcache" . $req->id . "t") . join (' --trace=', '', map { shell_quote ($_) } sort @macro) . " " . files_to_options (@ARGV) . " > " . shell_quote ("$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 ("< " . open_quote ("$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 ("< " . open_quote ($ocache . $req->id)); my %prohibited; my $res; while ($_ = $in->getline) { s/\s+$//; s/__oline__/$./g; s/\@<:\@/[/g; s/\@:>\@/]/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"; } $out->close(); # If no forbidden words, we're done. return if ! %prohibited; # Locate the forbidden words in the last input file. # This is unsatisfying but... $exit_code = 1; if ($ARGV[$#ARGV] ne '-') { my $prohibited = '\b(' . join ('|', keys %prohibited) . ')\b'; my $file = new Autom4te::XFile ("< " . open_quote ($ARGV[$#ARGV])); while ($_ = $file->getline) { # Don't complain in comments. Well, until we have something # better, don't consider `#include' etc. to be 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 ("> " . open_quote ("$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([[[$1]]], [\\\n]), [[\n\t ]+], [ ])]) 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 ("< " . open_quote ($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 " . shell_quote ("$tmp/traces.m4") . " |"); my $out = new Autom4te::XFile ("> " . open_quote ($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/\@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; # stdin is always out of date. if (grep { $_ eq '-' } @dep) { return 0 } # 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 ("< " . open_quote ("$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 causes 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=', '', map { shell_quote ($_) } @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 user 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, if the user wants it, or if $output is old # (STDOUT is pretty old). handle_output ($req, $output) if $force || 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.64_2.64+dfsg.orig/bin/autoconf.as0000644000175000017500000001420511157462017017160 0ustar smcvsmcvAS_INIT[]dnl -*- shell-script -*- m4_divert_push([HEADER-COPYRIGHT])dnl # @configure_input@ # autoconf -- create `configure' using m4 macros # Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2003, # 2004, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. m4_divert_pop([HEADER-COPYRIGHT])dnl back to BODY AS_ME_PREPARE[]dnl 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 variables \`M4' and \`WARNINGS' are 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[:FORMAT] report the list of calls to MACRO -i, --initialization also trace Autoconf's initialization process In tracing mode, no configuration script is created. FORMAT defaults to \`\$f:\$l:\$n:\$%'; see \`autom4te --help' for information about FORMAT. Report bugs to . GNU Autoconf home page: . General help using GNU software: ."] version=["\ autoconf (@PACKAGE_NAME@) @VERSION@ Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille."] help="\ Try \`$as_me --help' for more information." exit_missing_arg=' m4_bpatsubst([AS_ERROR([option `$[1]' requires an argument$as_nl$help])], ['], ['\\''])' # restore font-lock: ' # Variables. : ${AUTOM4TE='@bindir@/@autom4te-name@'} autom4te_options= outfile= verbose=false # 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 ;; --help | -h ) AS_ECHO(["$usage"]); exit ;; --verbose | -v ) verbose=: autom4te_options="$autom4te_options $1"; shift ;; # Arguments passed as is to autom4te. --debug | -d | \ --force | -f | \ --include=* | -I?* | \ --prepend-include=* | -B?* | \ --warnings=* | -W?* ) case $1 in *\'*) arg=`AS_ECHO(["$1"]) | sed "s/'/'\\\\\\\\''/g"` ;; #' *) arg=$1 ;; esac autom4te_options="$autom4te_options '$arg'"; shift ;; # Options with separated arg passed as is to autom4te. --include | -I | \ --prepend-include | -B | \ --warnings | -W ) test $# = 1 && eval "$exit_missing_arg" case $2 in *\'*) arg=`AS_ECHO(["$2"]) | sed "s/'/'\\\\\\\\''/g"` ;; #' *) arg=$2 ;; esac autom4te_options="$autom4te_options $option '$arg'" shift; shift ;; --trace=* | -t?* ) traces="$traces --trace='"`AS_ECHO(["$optarg"]) | sed "s/'/'\\\\\\\\''/g"`"'" shift ;; --trace | -t ) test $# = 1 && eval "$exit_missing_arg" traces="$traces --trace='"`AS_ECHO(["$[2]"]) | sed "s/'/'\\\\\\\\''/g"`"'" shift; shift ;; --initialization | -i ) autom4te_options="$autom4te_options --melt" shift;; --output=* | -o?* ) outfile=$optarg shift ;; --output | -o ) test $# = 1 && eval "$exit_missing_arg" outfile=$2 shift; shift ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) exec >&2 AS_ERROR([invalid option `$[1]'$as_nl$help]) ;; #` * ) break ;; esac done # Find the input file. case $# in 0) if test -f configure.ac; then if test -f configure.in; then AS_ECHO(["$as_me: warning: both \`configure.ac' and \`configure.in' are present."]) >&2 AS_ECHO(["$as_me: warning: proceeding with \`configure.ac'."]) >&2 fi infile=configure.ac elif test -f configure.in; then infile=configure.in else AS_ERROR([no input file]) fi test -z "$traces" && test -z "$outfile" && outfile=configure;; 1) infile=$1 ;; *) exec >&2 AS_ERROR([invalid number of arguments$as_nl$help]) ;; esac # Unless specified, the output is stdout. test -z "$outfile" && outfile=- # Run autom4te with expansion. eval set x "$autom4te_options" \ --language=autoconf --output=\"\$outfile\" "$traces" \"\$infile\" shift $verbose && AS_ECHO(["$as_me: running $AUTOM4TE $*"]) >&2 exec "$AUTOM4TE" "$@" autoconf2.64_2.64+dfsg.orig/bin/autoupdate.in0000644000175000017500000010211511157462017017516 0ustar smcvsmcv#! @PERL@ -w # -*- perl -*- # @configure_input@ # autoupdate - modernize an Autoconf file. # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, # 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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 $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; unshift @INC, $pkgdatadir; # 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 = ('@pkgdatadir@'); my $force = 0; # m4. my $m4 = $ENV{"M4"} || '@M4@'; # $HELP # ----- $help = "Usage: $0 [OPTION]... [TEMPLATE-FILE]... Update each 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 . GNU Autoconf home page: . General help using GNU software: . "; # $VERSION # -------- $version = "autoupdate (@PACKAGE_NAME@) @VERSION@ Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. "; ## ---------- ## ## 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; } } # ----------------- # # Autoconf macros. # # ----------------- # my (%ac_macros, %au_macros, %m4_builtins); # HANDLE_AUTOCONF_MACROS () # ------------------------- # @M4_BUILTINS -- M4 builtins and a useful comment. sub handle_autoconf_macros () { # Get the builtins. xsystem ("echo dumpdef | $m4 2>" . shell_quote ("$tmp/m4.defs") . " >/dev/null"); my $m4_defs = new Autom4te::XFile "< " . open_quote ("$tmp/m4.defs"); while ($_ = $m4_defs->getline) { $m4_builtins{$1} = 1 if /^(\w+):/; } $m4_defs->close; my $macros = new Autom4te::XFile ("$autoconf" . " --trace AU_DEFINE:'AU:\$f:\$1'" . " --trace define:'AC:\$f:\$1'" . " --melt /dev/null |"); while ($_ = $macros->getline) { chomp; my ($domain, $file, $macro) = /^(AC|AU):(.*):([^:]*)$/ or next; if ($domain eq "AU") { $au_macros{$macro} = 1; } elsif ($file =~ /(^|\/)m4sugar\/(m4sugar|version)\.m4$/) { # Add the m4sugar macros to m4_builtins. $m4_builtins{$macro} = 1; } else { # Autoconf, aclocal, and m4sh macros. $ac_macros{$macro} = 1; } } $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 (keys %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 "> " . open_quote ("$tmp/ac.m4"); print $ac_m4 "# ac.m4 -- autoquoting definitions of the AC macros.\n"; my $unac_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/unac.m4"); print $unac_m4 "# unac.m4 -- undefine the AC macros.\n"; foreach (sort keys %ac_macros) { print $ac_m4 "_au_m4_define([$_], [m4_if(\$#, 0, [[\$0]], [[\$0(\$\@)]])])\n"; print $unac_m4 "_au_m4_undefine([$_])\n"; } # m4save.m4 -- save the m4 builtins. # unm4.m4 -- disable the m4 builtins. # m4.m4 -- enable the m4 builtins. my $m4save_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/m4save.m4"); print $m4save_m4 "# m4save.m4 -- save the m4 builtins.\n"; my $unm4_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/unm4.m4"); print $unm4_m4 "# unm4.m4 -- disable the m4 builtins.\n"; my $m4_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/m4.m4"); print $m4_m4 "# m4.m4 -- enable the m4 builtins.\n"; foreach (sort keys %m4_builtins) { print $m4save_m4 "_au__save([$_])\n"; print $unm4_m4 "_au__undefine([$_])\n"; print $m4_m4 "_au__restore([$_])\n"; } } ## -------------- ## ## Main program. ## ## -------------- ## parse_args; $autoconf .= " --debug" if $debug; $autoconf .= " --force" if $force; $autoconf .= " --verbose" if $verbose; $autoconf .= join (' --include=', '', map { shell_quote ($_) } @include); $autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include); mktmpdir ('au'); handle_autoconf_macros; # $au_changequote -- enable the quote `[', `]' right before any AU macro. my $au_changequote = 's/\b(' . join ('|', keys %au_macros) . ')\b/_au_m4_changequote([,])$1/g'; # au.m4 -- definitions the AU macros. xsystem ("$autoconf --trace AU_DEFINE:'_au_defun(\@<:\@\$1\@:>\@, \@<:\@\$2\@:>\@)' --melt /dev/null " . ">" . shell_quote ("$tmp/au.m4")); ## ------------------- ## ## Process the files. ## ## ------------------- ## foreach my $file (@ARGV) { # We need an actual file. if ($file eq '-') { $file = "$tmp/stdin"; system "cat >" . shell_quote ($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([,]) # Define our special macros: define([_au__defn], defn([defn])) define([_au__divert], defn([divert])) define([_au__ifdef], defn([ifdef])) define([_au__include], defn([include])) define([_au___undefine], defn([undefine])) define([_au__undefine], [_au__ifdef([$1], [_au___undefine([$1])])]) define([_au__save], [m4_ifdef([$1], [m4_define([_au_$1], _m4_defn([$1]))])]) define([_au__restore], [_au_m4_ifdef([_au_$1], [_au_m4_define([$1], _au__defn([_au_$1]))])]) # Set up m4sugar. include(m4sugar/m4sugar.m4) # Redefine __file__ to make warnings nicer; $file is replaced below. m4_define([__file__], [$file]) # Redefine m4_location to fix the line number. m4_define([m4_location], [__file__:m4_eval(__line__ - _au__first_line)]) # Move all the builtins into the `_au_' pseudo namespace m4_include([m4save.m4]) # _au_defun(NAME, BODY) # --------------------- # Define NAME to BODY, plus AU activation/deactivation. _au_m4_define([_au_defun], [_au_m4_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, m4sugar, and the autoquoting AC macros. _au_m4_define([__au_enable], [_au__divert(-1) # Enable special characters. _au_m4_changecom([#]) _au__include([m4.m4]) _au__include([ac.m4]) _au__divert(0)]) # _au_enable # ---------- # Called at the beginning of all the obsolete macros. If this is the # outermost level, call __au_enable. _au_m4_define([_au_enable], [_au_m4_ifdef([_au_enabled], [], [__au_enable()])_au_dnl _au_m4_pushdef([_au_enabled])]) # __au_disable # ------------ # Disable the AC autoquoting macros, m4sugar, and m4. _au_m4_define([__au_disable], [_au__divert(-1) _au__include([unac.m4]) _au__include([unm4.m4]) # Disable special characters. _au_m4_changequote() _au_m4_changecom() _au__divert(0)]) # _au_disable # ----------- # Called at the end of all the obsolete macros. If we are at the # outermost level, call __au_disable. _au_m4_define([_au_disable], [_au_m4_popdef([_au_enabled])_au_dnl _au_m4_ifdef([_au_enabled], [], [__au_disable()])]) ## ------------------------------- ## ## Disable, and process the file. ## ## ------------------------------- ## # The AC autoquoting macros are not loaded yet, hence invoking # `_au_disable' would be wrong. _au__include([unm4.m4]) # Disable special characters, and set the first line number. _au_m4_changequote() _au_m4_changecom() _au_m4_define(_au__first_line, _au___line__)_au__divert(0)_au_dnl EOF $input_m4 =~ s/^ //mg; $input_m4 =~ s/\$file/$file/g; # prepared input -- input, but reenables the quote before each AU macro. open INPUT_M4, "> " . open_quote ("$tmp/input.m4") or error "cannot open: $!"; open FILE, "< " . open_quote ($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=" . shell_quote ($tmp) . join (' --include=', '', map { shell_quote ($_) } reverse (@prepend_include)) . join (' --include=', '', map { shell_quote ($_) } @include) . " " . shell_quote ("$tmp/input.m4") . " > " . shell_quote ("$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 fifth 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' has 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 were 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.64_2.64+dfsg.orig/bin/autoscan.in0000644000175000017500000004141711157462017017167 0ustar smcvsmcv#! @PERL@ -w # -*- perl -*- # @configure_input@ # autoscan - Create configure.scan (a preliminary configure.ac) for a package. # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, # 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # Written by David MacKenzie . eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' if 0; BEGIN { my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; unshift @INC, $pkgdatadir; # 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 @subdirs %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; # Autoconf and lib files. my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; my $autoconf = "$autom4te --language=autoconf"; my @prepend_include; my @include = ('@pkgdatadir@'); # $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 . GNU Autoconf home page: . General help using GNU software: . "; # $version # -------- $version = "autoscan (@PACKAGE_NAME@) @VERSION@ Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. "; ## ------------------------ ## ## 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 "< " . open_quote ($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 ($FILE-NAME) # ------------------------ sub scan_c_file ($) { my ($file_name) = @_; push @cfiles, $File::Find::name; # Nonzero if in a multiline comment. my $in_comment = 0; my $file = new Autom4te::XFile "< " . open_quote ($file_name); 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 ($file_name) = @_; push @makefiles, $File::Find::name; my $file = new Autom4te::XFile "< " . open_quote ($file_name); 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 ($file_name) = @_; push @shfiles, $File::Find::name; my $file = new Autom4te::XFile "< " . open_quote ($file_name); 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 file name 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 ($_ ne '.' and -d $_ and -f "$_/configure.in" || -f "$_/configure.ac" || -f "$_/configure.gnu" || -f "$_/configure") { $File::Find::prune = 1; push @subdirs, $File::Find::name; } 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 "> " . open_quote ($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_HEADERS([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'); print $file "\n"; if (@makefiles) { # Change DIR/Makefile.in to DIR/Makefile. foreach my $m (@makefiles) { $m =~ s/\.(?:in|am)$//; $unique_makefiles{$m}++; } print $file ("AC_CONFIG_FILES([", join ("\n ", sort keys %unique_makefiles), "])\n"); } if (@subdirs) { print $file ("AC_CONFIG_SUBDIRS([", join ("\n ", sort @subdirs), "])\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; $log = new Autom4te::XFile "> " . open_quote ("$me.log"); $autoconf .= " --debug" if $debug; $autoconf .= " --verbose" if $verbose; $autoconf .= join (' --include=', '', map { shell_quote ($_) } @include); $autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include); my $configure_ac = find_configure_ac; init_tables; scan_files; output ('configure.scan'); if (-f $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.64_2.64+dfsg.orig/build-aux/0000755000175000017500000000000011233220566016131 5ustar smcvsmcvautoconf2.64_2.64+dfsg.orig/build-aux/config.guess0000755000175000017500000013105411233203257020453 0ustar smcvsmcv#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-10' # 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, 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, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # 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 "$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 ; set_cc_for_build= ;' # 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 ;; sh5el) machine=sh5le-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 -q __ELF__ 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 ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # 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 Pn.n version is a patched version. # 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/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; 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 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; 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 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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 ;; 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 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; 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 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # 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 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; 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 && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; 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 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????: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 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; 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 ;; *: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 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi 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 ;; *:AIX:*:[456]) 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 ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 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 eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 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 && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; 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 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; 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 ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; 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 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; 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 -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; 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 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; 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" ;; 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 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; 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 ;; 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 ;; 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 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; 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 ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. 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 ;; 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 ;; 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 i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; 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 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*: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 | S7501*:*: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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' 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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *: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 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; 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 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *: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 ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *: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 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; 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\n"); 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 && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # 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 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; 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.64_2.64+dfsg.orig/build-aux/missing0000755000175000017500000002623311233202134017525 0ustar smcvsmcv#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 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, see . # 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=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # 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 ;; -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' autom4te touch the output file, or create a stub one 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] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) 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*) 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*) 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*) 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*) 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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) 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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) 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." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: autoconf2.64_2.64+dfsg.orig/build-aux/gnupload0000755000175000017500000002557011233202134017670 0ustar smcvsmcv#!/bin/sh # Sign files and upload them. scriptversion=2009-04-28.21; # UTC # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation # # 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, see . # Originally written by Alexandre Duret-Lutz . set -e GPG='gpg --batch --no-tty' conffile=.gnuploadrc to= dry_run=false symlink_files= delete_files= delete_symlinks= collect_var= dbg= usage="Usage: $0 [OPTIONS]... [COMMAND] FILES... [[COMMAND] FILES...] Sign all FILES, and upload them to selected destinations, according to . Commands: --delete delete FILES from destination --symlink create symbolic links --rmsymlink remove symbolic links -- treat the remaining arguments as files to upload Options: --help print this help text and exit --to DEST specify one destination for FILES (multiple --to options are allowed) --user NAME sign with key NAME --symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names --dry-run do nothing, show what would have been done --version output version information and exit If --symlink-regex is given without EXPR, then the link target name is created by replacing the version information with \`-latest', e.g.: foo-1.3.4.tar.gz -> foo-latest.tar.gz Recognized destinations are: alpha.gnu.org:DIRECTORY savannah.gnu.org:DIRECTORY savannah.nongnu.org:DIRECTORY ftp.gnu.org:DIRECTORY build directive files and upload files by FTP download.gnu.org.ua:{alpha|ftp}/DIRECTORY build directive files and upload files by SFTP [user@]host:DIRECTORY upload files with scp Options and commands are applied in order. If the file $conffile exists in the current working directory, its contents are prepended to the actual command line options. Use this to keep your defaults. Comments (#) and empty lines in $conffile are allowed. Examples: 1. Upload automake-1.8.2b.tar.gz and automake-1.8.2b.tar.bz2 to two sites: gnupload --to sources.redhat.com:~ftp/pub/automake \\ --to alpha.gnu.org:automake \\ automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2 2. Same as above, but also create symbolic links to automake-latest.tar.*: gnupload --to sources.redhat.com:~ftp/pub/automake \\ --to alpha.gnu.org:automake \\ --symlink-regex \\ automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2 3. Symlink automake-1.8.2b.tar.gz to automake-latest.tar.gz and automake-1.8.2b.tar.bz2 to automake-latest.tar.bz2 on both sites: gnupload --to sources.redhat.com:~ftp/pub/automake \\ --to alpha.gnu.org:automake \\ --symlink automake-1.8.2b.tar.gz automake-latest.tar.gz \\ automake-1.8.2b.tar.bz2 automake-latest.tar.bz2 4. Delete automake-1.8.2a.tar.gz and .bz2, remove symlink automake-latest.tar.gz and upload automake-1.8.2b.tar.gz: gnupload --to sources.redhat.com:~ftp/pub/automake \\ --to alpha.gnu.org:automake \\ --delete automake-1.8.2a.tar.gz automake-1.8.2a.tar.bz2 \\ --rmsymlink automake-latest.tar.gz \\ -- \\ automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2 Report bugs to . Send patches to ." # Read local configuration file if test -r "$conffile"; then echo "$0: Reading configuration file $conffile" eval set x "`sed 's/#.*$//;/^$/d' \"$conffile\" | tr '\012\015' ' '` \"\$@\"" shift fi while test -n "$1"; do case $1 in -*) collect_var= case $1 in --help) echo "$usage" exit $? ;; --to) if test -z "$2"; then echo "$0: Missing argument for --to" 1>&2 exit 1 else to="$to $2" shift fi ;; --user) if test -z "$2"; then echo "$0: Missing argument for --user" 1>&2 exit 1 else GPG="$GPG --local-user $2" shift fi ;; --delete) collect_var=delete_files ;; --rmsymlink) collect_var=delete_symlinks ;; --symlink-regex=*) symlink_expr=`expr "$1" : '[^=]*=\(.*\)'` ;; --symlink-regex) symlink_expr='s|-[0-9][0-9\.]*\(-[0-9][0-9]*\)\{0,1\}\.|-latest.|' ;; --symlink) collect_var=symlink_files ;; --dry-run|-n) dry_run=: ;; --version) echo "gnupload $scriptversion" exit $? ;; --) shift break ;; -*) echo "$0: Unknown option \`$1', try \`$0 --help'" 1>&2 exit 1 ;; esac ;; *) if test -z "$collect_var"; then break else eval "$collect_var=\"\$$collect_var $1\"" fi ;; esac shift done dprint() { echo "Running $*..." } if $dry_run; then dbg=dprint fi if test -z "$to"; then echo "$0: Missing destination sites" >&2 exit 1 fi if test -n "$symlink_files"; then x=`echo "$symlink_files" | sed 's/[^ ]//g;s/ //g'` if test -n "$x"; then echo "$0: Odd number of symlink arguments" >&2 exit 1 fi fi if test $# = 0; then if test -z "${symlink_files}${delete_files}${delete_symlinks}"; then echo "$0: No file to upload" 1>&2 exit 1 fi else # Make sure all files exist. We don't want to ask # for the passphrase if the script will fail. for file do if test ! -f $file; then echo "$0: Cannot find \`$file'" 1>&2 exit 1 elif test -n "$symlink_expr"; then linkname=`echo $file | sed "$symlink_expr"` if test -z "$linkname"; then echo "$0: symlink expression produces empty results" >&2 exit 1 elif test "$linkname" = $file; then echo "$0: symlink expression does not alter file name" >&2 exit 1 fi fi done fi # Make sure passphrase is not exported in the environment. unset passphrase # Reset PATH to be sure that echo is a built-in. We will later use # `echo $passphrase' to output the passphrase, so it is important that # it is a built-in (third-party programs tend to appear in `ps' # listings with their arguments...). # Remember this script runs with `set -e', so if echo is not built-in # it will exit now. PATH=/empty echo -n "Enter GPG passphrase: " stty -echo read -r passphrase stty echo echo if test $# -ne 0; then for file do echo "Signing $file..." rm -f $file.sig echo "$passphrase" | $dbg $GPG --passphrase-fd 0 -ba -o $file.sig $file done fi # mkdirective DESTDIR BASE FILE STMT # Arguments: See upload, below mkdirective () { stmt="$4" if test -n "$3"; then stmt=" filename: $3$stmt" fi cat >${2}.directive<&2 fi $dbg ncftpput savannah.gnu.org /incoming/savannah/$destdir $files ;; savannah.nongnu.org:*) if test -z "$files"; then echo "$0: warning: standalone directives not applicable for $dest" >&2 fi $dbg ncftpput savannah.nongnu.org /incoming/savannah/$destdir $files ;; download.gnu.org.ua:alpha/*|download.gnu.org.ua:ftp/*) destdir_p1=`echo "$destdir" | sed 's,^[^/]*/,,'` destdir_topdir=`echo "$destdir" | sed 's,/.*,,'` mkdirective "$destdir_p1" "$base" "$file" "$stmt" echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive for f in $files $base.directive.asc do echo put $f done | $dbg sftp -b - puszcza.gnu.org.ua:/incoming/$destdir_topdir ;; /*) dest_host=`echo "$dest" | sed 's,:.*,,'` mkdirective "$destdir" "$base" "$file" "$stmt" echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive $dbg cp $files $base.directive.asc $dest_host ;; *) if test -z "$files"; then echo "$0: warning: standalone directives not applicable for $dest" >&2 fi $dbg scp $files $dest ;; esac rm -f $base.directive $base.directive.asc } ##### # Process any standalone directives stmt= if test -n "$symlink_files"; then stmt="$stmt `mksymlink $symlink_files`" fi for file in $delete_files do stmt="$stmt archive: $file" done for file in $delete_symlinks do stmt="$stmt rmsymlink: $file" done if test -n "$stmt"; then for dest in $to do destdir=`echo $dest | sed 's/[^:]*://'` upload "$dest" "$destdir" "`hostname`-$$" "" "$stmt" done fi # Process actual uploads for dest in $to do for file do echo "Uploading $file to $dest..." stmt= files="$file $file.sig" destdir=`echo $dest | sed 's/[^:]*://'` if test -n "$symlink_expr"; then linkname=`echo $file | sed "$symlink_expr"` stmt="$stmt symlink: $file $linkname symlink: $file.sig $linkname.sig" fi upload "$dest" "$destdir" "$file" "$file" "$stmt" "$files" done done 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: autoconf2.64_2.64+dfsg.orig/build-aux/texinfo.tex0000644000175000017500000110005711233203257020331 0ustar smcvsmcv% 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{2009-05-24.17} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008, 2009 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 3 of the % License, 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 program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. (This has been our intent since Texinfo was invented.) % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org). % The texinfo.tex in any given 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. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \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} \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\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% Math-mode def from plain.tex. \let\ptexraggedright=\raggedright % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % 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{l.\the\inputlineno:\space} \fi % 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\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % 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} % @| 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 }% }% } % 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 \errorcontextlines16 }% % 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 % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % 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). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \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. % \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. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \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 \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \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 \indexdummies \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\relax \unvbox#1\relax \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{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % 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. % \gdef\sepspaces{\obeyspaces\let =\tie} % 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 \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty out of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} %% 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/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % 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 @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% \kern-.15em \TeX } % 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=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% \fi\fi } % @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} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % 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 } % % The \vtop 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. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \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 \box\groupbox \prevdepth = \dimen1 \checkinserts } % % 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 % Old definition--didn't work. %\parseargdef\need{\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 %}} \parseargdef\need{% % 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 (and is undocumented). \let\br = \par % @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. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\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 -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\next\centerH \else \let\next\centerV \fi \next{\hfil \ignorespaces#1\unskip \hfil}% } \def\centerH#1{% {% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }% } \def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space \parseargdef\sp{\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} % \parseargdef\paragraphindent{% \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. \parseargdef\exampleindent{% \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} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \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. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode`\_ = \active \gdef\mathunderscore{% \catcode`\_=\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 \mathunderscore \let\\ = \mathbackslash \mathactive % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % 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 sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } % Some math mode symbols. \def\bullet{$\ptexbullet$} \def\geq{\ifmmode \ge\else $\ge$\fi} \def\leq{\ifmmode \le\else $\le$\fi} \def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @comma{} is so commas can be inserted into text without messing up % Texinfo's parsing. % \let\comma = , % @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{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \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 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as \undefined, % borrowed from ifpdf.sty. \ifx\pdfoutput\undefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html % (and related messages, the final outcome is that it is up to the TeX % user to double the backslashes and otherwise make the string valid, so % that's what we do). % double active backslashes. % {\catcode`\@=0 \catcode`\\=\active @gdef@activebackslashdouble{% @catcode`@\=@active @let\=@doublebackslash} } % To handle parens, we must adopt a different approach, since parens are % not active characters. hyperref.dtx (which has the same problem as % us) handles it with this amazing macro to replace tokens, with minor % changes for Texinfo. It is included here under the GPL by permission % from the author, Heiko Oberdiek. % % #1 is the tokens to replace. % #2 is the replacement. % #3 is the control sequence with the string. % \def\HyPsdSubst#1#2#3{% \def\HyPsdReplace##1#1##2\END{% ##1% \ifx\\##2\\% \else #2% \HyReturnAfterFi{% \HyPsdReplace##2\END }% \fi }% \xdef#3{\expandafter\HyPsdReplace#3#1\END}% } \long\def\HyReturnAfterFi#1\fi{\fi#1} % #1 is a control sequence in which to do the replacements. \def\backslashparens#1{% \xdef#1{#1}% redefine it as its expansion; the definition is simply % \lastnode when called from \setref -> \pdfmkdest. \HyPsdSubst{(}{\realbackslash(}{#1}% \HyPsdSubst{)}{\realbackslash)}{#1}% } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros based on pdfcolor.tex. \def\cmykDarkRed{0.28 1 1 0.35} \def\cmykBlack{0 0 0 1} % % k sets the color for filling (usual text, etc.); % K sets the color for stroking (thin rules, e.g., normal _'s). \def\pdfsetcolor#1{\pdfliteral{#1 k #1 K}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\cmykBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .png, .jpg, .pdf (among % others). Let's try in that order. \let\pdfimgext=\empty \begingroup \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \closein 1 \endgroup % % without \immediate, ancient 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 \ifdim \wd0 >0pt width \imagewidth \fi \ifdim \wd2 >0pt height \imageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \activebackslashdouble \makevalueexpandable \def\pdfdestname{#1}% \backslashparens\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\cmykDarkRed} \def\linkcolor{\cmykDarkRed} \def\endlink{\setcolor{\maincolor}\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, which is what will be displayed in the % outline by the pdf viewer. #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 worth the trouble, since most documents are normally structured. \def\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else % Doubled backslashes in the name. {\activebackslashdouble \xdef\pdfoutlinedest{#3}% \backslashparens\pdfoutlinedest}% \fi % % Also double the backslashes in the display string. {\activebackslashdouble \xdef\pdfoutlinetext{#1}% \backslashparens\pdfoutlinetext}% % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % 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\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % 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}% \readdatafile{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}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % xx to do this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Right % now, I guess we'll just let the pdf reader have its way. \indexnofonts \setupdatafile \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } % \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 % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#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|\relax \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}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % 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} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\undefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % 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, #5 is the CMap % encoding (currently only OT1, OT1IT and OT1TT are allowed, pass % empty to omit). \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % emacs-page end of cmaps % 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} % Definitions for a main text size of 11pt. This is the default in % Texinfo. % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} % reset the current fonts \textfonts \rm } % end of 11pt text font size definitions % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} % reduce space between paragraphs \divide\parskip by 2 % reset the current fonts \textfonts \rm } % end of 10pt text font size definitions % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xword{10} \def\xiword{11} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% \wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % 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 because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \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 \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \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 \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rmisbold #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 \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \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 \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \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 \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \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 \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \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 \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % 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 \scriptfonts (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 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % 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 } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} \gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright \let\markupsetuplqsamp \markupsetnoligaturesquoteleft \let\markupsetuplqkbd \markupsetnoligaturesquoteleft % Allow an option to not replace quotes with a regular directed right % quote/apostrophe (char 0x27), but instead use the undirected quote % from cmtt (char 0x0d). The undirected quote is ugly, so don't make it % the default, but it works for pasting with more pdf viewers (at least % evince), the lilypond developers report. xpdf does work with the % regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 %% 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} % like \smartslanted except unconditionally uses \ttsl. % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\slanted=\smartslanted \def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} \let\dfn=\smartslanted \let\emph=\smartitalic % 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 % @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % 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\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\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}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % ctrl is no longer a Texinfo command. \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 \plainfrenchspacing #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 \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\realdash \let_\realunder \fi \codex } } \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} % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg'}% \fi\fi } % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} % @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). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle option `\txiarg'}% \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\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % @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} % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % 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 % 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} % @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} % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } \message{glyphs,} % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\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 \reducedsf error\kern-1.5pt} % \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} % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\undefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \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 \parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % 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 \let\page = \oldpage \page \null }% } \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 } %%% Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \leftline{\titlefonts\rmisbold #1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } %%% 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\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\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 -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @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{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(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, @ftable, 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\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#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. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted 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. Section titles are handled this way also. % \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 list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % % Try typesetting the item mark that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi % \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \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'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % 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 \doitemize, 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 \doitemize{#1.}\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} % @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. % 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 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 @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\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-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. \everycr resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % 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 again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % 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. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % 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 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \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\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \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} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \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}} % 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 % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % 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\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \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 \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \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. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\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. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\realdash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % 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. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @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 macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \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 \relax % 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{% \escapechar = `\\ % use backslash in output files. \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 % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#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{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % 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 % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\expansion \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\result \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sc \definedummyword\t % % Commands that take arguments. \definedummyword\acronym \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \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\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % Hopefully, all control words can become @asis. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % 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 % \def\ { }% \def\@{@}% % how to handle braces? \def\_{\normalunderscore}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \def\textdegree{o}% % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } \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. % #1 is the index name, #2 is the entry text. \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 most 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 a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Write the entry in \toks0 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 \def\backslashcurfont{\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/skips around a whatsit: % % 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 or \pdfdest 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. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{% \ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % 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 same penalty (values >10000 are used for various % signals); 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\whatsitpenalty>9999 \penalty\whatsitpenalty \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\whatsitskip \fi \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). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % 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{\backslashcurfont}% \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. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % 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}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% \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 % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % 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. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \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#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\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{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \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 these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \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 % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achive this, remember the "biggest" unnum. sec. we are currently in: \chardef\unmlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unmlevel \chardef\unmlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unmlevel \def\headtype{U}% \else \chardef\unmlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\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 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \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\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } \outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % 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 } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. \outer\parseargdef\numberedsec{\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\parseargdef\appendixsection{\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}% } \let\appendixsec\appendixsection \outer\parseargdef\unnumberedsec{\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\parseargdef\numberedsubsec{\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\parseargdef\appendixsubsec{\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\parseargdef\unnumberedsubsec{\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\parseargdef\numberedsubsubsec{\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\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\unnumberedsubsubsec{\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 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\ptexraggedright \rmisbold #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\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} %%% 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} % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% \hbox to 0pt{}% \chappager \endgroup \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 % 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\chapmacro#1#2#3{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection 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\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \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. \nobreak % Avoid page breaks at the interline glue. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % 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\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #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 {\rmisbold #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\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \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 is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: % % @section sec-whatever % @deffn def-whatever \penalty 10001 } \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 {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\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 } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \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. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \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 } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \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 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \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. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % 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} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % 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. % @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. \envdef\tex{% \setupmarkupstyle{tex}% \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 \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 \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group 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} % 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 and % \sectionheading, 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 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \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 \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \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 = t% \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of \def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \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 % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it by one command: \def\makedispenv #1#2{ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two synonyms: \def\maketwodispenvs #1#2#3{ \makedispenv{#1}{#3} \makedispenv{#2}{#3} } % @lisp: indented, narrowed, typewriter font; @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvs {lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenv {display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenv{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. \envdef\raggedright{% \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi \parsearg\quotationlabel } \envdef\quotation{% \setnormaldispenv \quotationstart } \envdef\smallquotation{% \setsmalldispenv \quotationstart } \let\Esmallquotation = \Equotation % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\undefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \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\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % 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}% \setupmarkupstyle{verb}% \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 % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % 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`\{=\other\catcode`\}=\other \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] % \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. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % 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{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % 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 specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % As a minor refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } %%% Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } %%% Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } %%% Type: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % How we'll format 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{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % (plain.tex says that \dimen1 should be used only as global.) \parshape 2 0in \dimen0 \defargsindent \dimen2 % % Put the type name to the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% return value type \ifx\temp\empty\else \tclose{\temp} \fi #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. Let's try @var for that. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % 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 = ) % 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. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \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\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \def\scanmacro#1{% \begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces % Undo catcode changes of \startcontents and \doprintindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. Previously, we had % \catcode`\\=\other instead. We'll see whether a problem appears % with macro expansion. --kasal, 19aug04 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ % ... and \example \spaceisspace % % Append \endinput to make sure that TeX does not see the ending newline. % I've verified that it is necessary both for e-TeX and for ordinary TeX % --kasal, 29nov03 \scantokens{#1\endinput}% \endgroup } \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\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 \. % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % 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\scanctxt{% \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% \scanctxt \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% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \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\definedummyword\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\definedummyword \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\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @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{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \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. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#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 % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\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\printedrefname{\ignorespaces #3}% \setbox1=\hbox{\printedmanual\unskip}% \setbox0=\hbox{\printedrefname\unskip}% \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\printedrefname{\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\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. \getfilename{#4}% % % See comments at \activebackslashdouble. {\activebackslashdouble \xdef\pdfxrefdest{#1}% \backslashparens\pdfxrefdest}% % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd0 = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % if the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd1 > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % 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. \ifdim \wd1 > 0pt \putwordSection{} ``\printedrefname'' \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 % 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 so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \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 square brackets don't work well 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 } % 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 XR#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. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \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 % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including 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 {\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) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % 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 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if 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. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @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 % 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 \closein 1 % % 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\medskip % 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 \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. On the other hand, if % it's at the top level, we don't want the normal paragraph indentation. \noindent % % 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 \medskip \fi % space after the standalone image \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{~} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guilletright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{~} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'\i} \gdef^^ee{\^\i} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \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, 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 % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \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{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % 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{673.2pt}{160mm}% that's 51 lines {\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. % \parseargdef\pagesizes{\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\relax \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.} % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % 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 \tt % (where it can probably be output as-is), 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\_} \let\realunder=_ % 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 % 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} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active @def@normalbackslash{{@tt@backslashcurfont}} % On startup, @fixbackslash assigns: % @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. % @def@normalturnoffactive{% @let\=@normalbackslash @let"=@normaldoublequote @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } % 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 turn back 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 Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @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: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore autoconf2.64_2.64+dfsg.orig/build-aux/git-version-gen0000755000175000017500000001256611233202134021075 0ustar smcvsmcv#!/bin/sh # Print a version string. scriptversion=2008-04-08.07 # Copyright (C) 2007-2008 Free Software Foundation # # 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. # It may be run two ways: # - from a git repository in which the "git describe" command below # produces useful output (thus requiring at least one signed tag) # - from a non-git-repo directory containing a .tarball-version file, which # presumes this script is invoked like "./git-version-gen .tarball-version". # In order to use intra-version strings in your project, you will need two # separate generated version string files: # # .tarball-version - present only in a distribution tarball, and not in # a checked-out repository. Created with contents that were learned at # the last time autoconf was run, and used by git-version-gen. Must not # be present in either $(srcdir) or $(builddir) for git-version-gen to # give accurate answers during normal development with a checked out tree, # but must be present in a tarball when there is no version control system. # Therefore, it cannot be used in any dependencies. GNUmakefile has # hooks to force a reconfigure at distribution time to get the value # correct, without penalizing normal development with extra reconfigures. # # .version - present in a checked-out repository and in a distribution # tarball. Usable in dependencies, particularly for files that don't # want to depend on config.h but do want to track version changes. # Delete this file prior to any autoconf run where you want to rebuild # files to pick up a version string change; and leave it stale to # minimize rebuild time after unrelated changes to configure sources. # # It is probably wise to add these two files to .gitignore, so that you # don't accidentally commit either generated file. # # Use the following line in your configure.ac, so that $(VERSION) will # automatically be up-to-date each time configure is run (and note that # since configure.ac no longer includes a version string, Makefile rules # should not depend on configure.ac for version updates). # # AC_INIT([GNU project], # m4_esyscmd([build-aux/git-version-gen .tarball-version]), # [bug-project@example]) # # Then use the following lines in your Makefile.am, so that .version # will be present for dependencies, and so that .tarball-version will # exist in distribution tarballs. # # BUILT_SOURCES = $(top_srcdir)/.version # $(top_srcdir)/.version: # echo $(VERSION) > $@-t && mv $@-t $@ # dist-hook: # echo $(VERSION) > $(distdir)/.tarball-version case $# in 1) ;; *) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version"; exit 1;; esac tarball_version_file=$1 nl=' ' # First see if there is a tarball-only version file. # then try "git describe", then default. if test -f $tarball_version_file then v=`cat $tarball_version_file` || exit 1 case $v in *$nl*) v= ;; # reject multi-line output [0-9]*) ;; *) v= ;; esac test -z "$v" \ && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2 fi if test -n "$v" then : # use $v elif test -d .git \ && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \ || git describe --abbrev=4 HEAD 2>/dev/null` \ && case $v in v[0-9]*) ;; *) (exit 1) ;; esac then # Is this a new git that lists number of commits since the last # tag or the previous older version that did not? # Newer: v6.10-77-g0f8faeb # Older: v6.10-g0f8faeb case $v in *-*-*) : git describe is okay three part flavor ;; *-*) : git describe is older two part flavor # Recreate the number of commits and rewrite such that the # result is the same as if we were using the newer version # of git describe. vtag=`echo "$v" | sed 's/-.*//'` numcommits=`git rev-list "$vtag"..HEAD | wc -l` v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`; ;; esac # Change the first '-' to a '.', so version-comparing tools work properly. # Remove the "g" in git describe's output string, to save a byte. v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; else v=UNKNOWN fi v=`echo "$v" |sed 's/^v//'` # Don't declare a version "dirty" merely because a time stamp has changed. git status > /dev/null 2>&1 dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty= case "$dirty" in '') ;; *) # Append the suffix only if there isn't one already. case $v in *-dirty) ;; *) v="$v-dirty" ;; esac ;; esac # Omit the trailing newline, so that m4_esyscmd can use the result directly. echo "$v" | tr -d '\012' # 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.64_2.64+dfsg.orig/build-aux/mdate-sh0000755000175000017500000001275111233202134017556 0ustar smcvsmcv#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009 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, see . # 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 file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No file. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE Pretty-print the modification time of FILE. Report bugs to . EOF exit $? ;; -v | --v*) echo "mdate-sh $scriptversion" exit $? ;; esac # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume `unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi 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 # Avoid user/group names that might have spaces, when possible. if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" 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 dummy x`eval "$ls_command \"\$save_arg1\""` # Remove all preceding arguments eval $command # Because of the dummy argument above, month is in $2. # # On a POSIX system, we should have # # $# = 5 # $1 = file size # $2 = month # $3 = day # $4 = year or time # $5 = filename # # On Darwin 7.7.0 and 7.6.0, we have # # $# = 4 # $1 = day # $2 = month # $3 = year or time # $4 = filename # Get the month. case $2 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 case $3 in ???*) day=$1;; *) day=$3; shift;; esac # 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 # 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: autoconf2.64_2.64+dfsg.orig/build-aux/elisp-comp0000755000175000017500000000520311233202134020116 0ustar smcvsmcv#!/bin/sh # Copyright (C) 1995, 2000, 2003, 2004, 2005, 2009 Free Software # Foundation, Inc. scriptversion=2009-04-28.21; # UTC # 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, see . # 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 file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No files. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: elisp-comp [--help] [--version] FILES... This script byte-compiles all `.el' files listed as FILES 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. Report bugs to . EOF exit $? ;; -v | --v*) echo "elisp-comp $scriptversion" exit $? ;; esac 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 'ret=$?; rm -rf "$tempdir" && exit $ret' 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 0 # 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: autoconf2.64_2.64+dfsg.orig/build-aux/announce-gen0000755000175000017500000003377711233202133020443 0ustar smcvsmcv#!/usr/bin/perl -w # Generate a release announcement message. my $VERSION = '2009-03-05 09:52'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. # Copyright (C) 2002-2009 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 3 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, see . # Written by Jim Meyering use strict; use Getopt::Long; use Digest::MD5; use Digest::SHA1; use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; my %valid_release_types = map {$_ => 1} qw (alpha beta major); my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz'); END { # Nobody ever checks the status of print()s. That's okay, because # if any do fail, we're guaranteed to get an indicator when we close() # the filehandle. # # Close stdout now, and if there were no errors, return happy status. # If stdout has already been closed by the script, though, do nothing. defined fileno STDOUT or return; close STDOUT and return; # Errors closing stdout. Indicate that, and hope stderr is OK. warn "$ME: closing standard output: $!\n"; # Don't be so arrogant as to assume that we're the first END handler # defined, and thus the last one invoked. There may be others yet # to come. $? will be passed on to them, and to the final _exit(). # # If it isn't already an error, make it one (and if it _is_ an error, # preserve the value: it might be important). $? ||= 1; } sub usage ($) { my ($exit_code) = @_; my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); if ($exit_code != 0) { print $STREAM "Try `$ME --help' for more information.\n"; } else { my @types = sort keys %valid_release_types; print $STREAM < = C Compute the sizes of the C<@file> and return them as a hash. Return C if one of the computation failed. =cut sub sizes (@) { my (@file) = @_; my $fail = 0; my %res; foreach my $f (@file) { my $cmd = "du --human $f"; my $t = `$cmd`; # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS $@ and (warn "$ME: command failed: `$cmd'\n"), $fail = 1; chomp $t; $t =~ s/^([\d.]+[MkK]).*/${1}B/; $res{$f} = $t; } return $fail ? undef : %res; } =item C dedicated to the list of <@file>, which sizes are stored in C<%size>, and which are available from the C<@url>. =cut sub print_locations ($\@\%@) { my ($title, $url, $size, @file) = @_; print "Here are the $title:\n"; foreach my $url (@{$url}) { for my $file (@file) { print " $url/$file"; print " (", $$size{$file}, ")" if exists $$size{$file}; print "\n"; } } print "\n"; } =item C. =cut sub print_checksums (@) { my (@file) = @_; print "Here are the MD5 and SHA1 checksums:\n"; print "\n"; foreach my $meth (qw (md5 sha1)) { foreach my $f (@file) { open IN, '<', $f or die "$ME: $f: cannot open for reading: $!\n"; binmode IN; my $dig = ($meth eq 'md5' ? Digest::MD5->new->addfile(*IN)->hexdigest : Digest::SHA1->new->addfile(*IN)->hexdigest); close IN; print "$dig $f\n"; } } print "\n"; } =item C addressing changes between versions C<$prev_version> and C<$curr_version>. =cut sub print_news_deltas ($$$) { my ($news_file, $prev_version, $curr_version) = @_; print "\n$news_file\n\n"; # Print all lines from $news_file, starting with the first one # that mentions $curr_version up to but not including # the first occurrence of $prev_version. my $in_items; my $re_prefix = qr/(?:\* )?(?:Noteworthy c|Major c|C)(?i:hanges)/; open NEWS, '<', $news_file or die "$ME: $news_file: cannot open for reading: $!\n"; while (defined (my $line = )) { if ( ! $in_items) { # Match lines like these: # * Major changes in release 5.0.1: # * Noteworthy changes in release 6.6 (2006-11-22) [stable] $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$curr_version\E(?:[^\d.]|$)/o or next; $in_items = 1; print $line; } else { # This regexp must not match version numbers in NEWS items. # For example, they might well say `introduced in 4.5.5', # and we don't want that to match. $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o and last; print $line; } } close NEWS; $in_items or die "$ME: $news_file: no matching lines for `$curr_version'\n"; } sub print_changelog_deltas ($$) { my ($package_name, $prev_version) = @_; # Print new ChangeLog entries. # First find all CVS-controlled ChangeLog files. use File::Find; my @changelog; find ({wanted => sub {$_ eq 'ChangeLog' && -d 'CVS' and push @changelog, $File::Find::name}}, '.'); # If there are no ChangeLog files, we're done. @changelog or return; my %changelog = map {$_ => 1} @changelog; # Reorder the list of files so that if there are ChangeLog # files in the specified directories, they're listed first, # in this order: my @dir = qw ( . src lib m4 config doc ); # A typical @changelog array might look like this: # ./ChangeLog # ./po/ChangeLog # ./m4/ChangeLog # ./lib/ChangeLog # ./doc/ChangeLog # ./config/ChangeLog my @reordered; foreach my $d (@dir) { my $dot_slash = $d eq '.' ? $d : "./$d"; my $target = "$dot_slash/ChangeLog"; delete $changelog{$target} and push @reordered, $target; } # Append any remaining ChangeLog files. push @reordered, sort keys %changelog; # Remove leading `./'. @reordered = map { s!^\./!!; $_ } @reordered; print "\nChangeLog entries:\n\n"; # print join ("\n", @reordered), "\n"; $prev_version =~ s/\./_/g; my $prev_cvs_tag = "\U$package_name\E-$prev_version"; my $cmd = "cvs -n diff -u -r$prev_cvs_tag -rHEAD @reordered"; open DIFF, '-|', $cmd or die "$ME: cannot run `$cmd': $!\n"; # Print two types of lines, making minor changes: # Lines starting with `+++ ', e.g., # +++ ChangeLog 22 Feb 2003 16:52:51 -0000 1.247 # and those starting with `+'. # Don't print the others. my $prev_printed_line_empty = 1; while (defined (my $line = )) { if ($line =~ /^\+\+\+ /) { my $separator = "*"x70 ."\n"; $line =~ s///; $line =~ s/\s.*//; $prev_printed_line_empty or print "\n"; print $separator, $line, $separator; } elsif ($line =~ /^\+/) { $line =~ s///; print $line; $prev_printed_line_empty = ($line =~ /^$/); } } close DIFF; # The exit code should be 1. # Allow in case there are no modified ChangeLog entries. $? == 256 || $? == 128 or warn "$ME: warning: `cmd' had unexpected exit code or signal ($?)\n"; } sub get_tool_versions ($$) { my ($tool_list, $gnulib_version) = @_; @$tool_list or return (); my $fail; my @tool_version_pair; foreach my $t (@$tool_list) { if ($t eq 'gnulib') { push @tool_version_pair, ucfirst $t . ' ' . $gnulib_version; next; } # Assume that the last "word" on the first line of # `tool --version` output is the version string. my ($first_line, undef) = split ("\n", `$t --version`); if ($first_line =~ /.* (\d[\w.-]+)$/) { $t = ucfirst $t; push @tool_version_pair, "$t $1"; } else { defined $first_line and $first_line = ''; warn "$ME: $t: unexpected --version output\n:$first_line"; $fail = 1; } } $fail and exit 1; return @tool_version_pair; } { # Neutralize the locale, so that, for instance, "du" does not # issue "1,2" instead of "1.2", what confuses our regexps. $ENV{LC_ALL} = "C"; my $release_type; my $package_name; my $prev_version; my $curr_version; my $gpg_key_id; my @url_dir_list; my @news_file; my $bootstrap_tools; my $gnulib_version; my $print_checksums_p = 1; GetOptions ( 'release-type=s' => \$release_type, 'package-name=s' => \$package_name, 'previous-version=s' => \$prev_version, 'current-version=s' => \$curr_version, 'gpg-key-id=s' => \$gpg_key_id, 'url-directory=s' => \@url_dir_list, 'news=s' => \@news_file, 'bootstrap-tools=s' => \$bootstrap_tools, 'gnulib-version=s' => \$gnulib_version, 'print-checksums!' => \$print_checksums_p, 'archive-suffix=s' => \@archive_suffixes, help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, ) or usage 1; my $fail = 0; # Ensure that sure each required option is specified. $release_type or (warn "$ME: release type not specified\n"), $fail = 1; $package_name or (warn "$ME: package name not specified\n"), $fail = 1; $prev_version or (warn "$ME: previous version string not specified\n"), $fail = 1; $curr_version or (warn "$ME: current version string not specified\n"), $fail = 1; $gpg_key_id or (warn "$ME: GnuPG key ID not specified\n"), $fail = 1; @url_dir_list or (warn "$ME: URL directory name(s) not specified\n"), $fail = 1; my @tool_list = split ',', $bootstrap_tools; grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version and (warn "$ME: when specifying gnulib as a tool, you must also specify\n" . "--gnulib-version=V, where V is the result of running git describe\n" . "in the gnulib source directory.\n"), $fail = 1; exists $valid_release_types{$release_type} or (warn "$ME: `$release_type': invalid release type\n"), $fail = 1; @ARGV and (warn "$ME: too many arguments:\n", join ("\n", @ARGV), "\n"), $fail = 1; $fail and usage 1; my $my_distdir = "$package_name-$curr_version"; my $xd = "$package_name-$prev_version-$curr_version.xdelta"; my @candidates = map { "$my_distdir.$_" } @archive_suffixes; my @tarballs = grep {-f $_} @candidates; @tarballs or die "$ME: none of " . join(', ', @candidates) . " were found\n"; my @sizable = @tarballs; -f $xd and push @sizable, $xd; my %size = sizes (@sizable); %size or exit 1; # The markup is escaped as <\# so that when this script is sent by # mail (or part of a diff), Gnus is not triggered. print < FIXME: put comments here EOF print_locations ("compressed sources", @url_dir_list, %size, @tarballs); -f $xd and print_locations ("xdelta diffs (useful? if so, " . "please tell bug-gnulib\@gnu.org)", @url_dir_list, %size, $xd); my @sig_files = map { "$_.sig" } @tarballs; print_locations ("GPG detached signatures[*]", @url_dir_list, %size, @sig_files); $print_checksums_p and print_checksums (@sizable); print <. # # Original author: Mohit Agarwal. # Send bug reports and any other correspondence to bug-texinfo@gnu.org. prog=`basename "$0"` srcdir=`pwd` scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh" templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template" : ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="} : ${MAKEINFO="makeinfo"} : ${TEXI2DVI="texi2dvi -t @finalout"} : ${DVIPS="dvips"} : ${DOCBOOK2HTML="docbook2html"} : ${DOCBOOK2PDF="docbook2pdf"} : ${DOCBOOK2PS="docbook2ps"} : ${DOCBOOK2TXT="docbook2txt"} : ${GENDOCS_TEMPLATE_DIR="."} : ${TEXI2HTML="texi2html"} unset CDPATH unset use_texi2html version="gendocs.sh $scriptversion Copyright 2009 Free Software Foundation, Inc. There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING." usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE Generate various output formats from PACKAGE.texinfo (or .texi or .txi) source. See the GNU Maintainers document for a more extensive discussion: http://www.gnu.org/prep/maintain_toc.html Options: -o OUTDIR write files into OUTDIR, instead of manual/. --email ADR use ADR as contact in generated web pages. --docbook convert to DocBook too (xml, txt, html, pdf and ps). --html ARG pass indicated ARG to makeinfo or texi2html for HTML targets. --texi2html use texi2html to generate HTML targets. --help display this help and exit successfully. --version display version information and exit successfully. Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\" Typical sequence: cd PACKAGESOURCE/doc wget \"$scripturl\" wget \"$templateurl\" $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\" Output will be in a new subdirectory \"manual\" (by default, use -o OUTDIR to override). Move all the new files into your web CVS tree, as explained in the Web Pages node of maintain.texi. Please use the --email ADDRESS option to specify your bug-reporting address in the generated HTML pages. MANUAL-TITLE is included as part of the HTML of the overall manual/index.html file. It should include the name of the package being documented. manual/index.html is created by substitution from the file $GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the generic template for your own purposes.) If you have several manuals, you'll need to run this script several times with different MANUAL values, specifying a different output directory with -o each time. Then write (by hand) an overall index.html with links to them all. If a manual's Texinfo sources are spread across several directories, first copy or symlink all Texinfo sources into a single directory. (Part of the script's work is to make a tar.gz of the sources.) You can set the environment variables MAKEINFO, TEXI2DVI, and DVIPS to control the programs that get executed, and GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is looked for. (With --docbook, the environment variables DOCBOOK2HTML, DOCBOOK2PDF, DOCBOOK2PS, and DOCBOOK2TXT are also respected.) By default, makeinfo is run in the default (English) locale, since that's the language of most Texinfo manuals. If you happen to have a non-English manual and non-English web site, see the SETLANG setting in the source. Email bug reports or enhancement requests to bug-texinfo@gnu.org. " calcsize() { size=`ls -ksl $1 | awk '{print $1}'` echo $size } MANUAL_TITLE= PACKAGE= EMAIL=webmasters@gnu.org # please override with --email htmlarg= outdir=manual while test $# -gt 0; do case $1 in --email) shift; EMAIL=$1;; --help) echo "$usage"; exit 0;; --version) echo "$version"; exit 0;; -o) shift; outdir=$1;; --docbook) docbook=yes;; --html) shift; htmlarg=$1;; --texi2html) use_texi2html=1;; -*) echo "$0: Unknown option \`$1'." >&2 echo "$0: Try \`--help' for more information." >&2 exit 1;; *) if test -z "$PACKAGE"; then PACKAGE=$1 elif test -z "$MANUAL_TITLE"; then MANUAL_TITLE=$1 else echo "$0: extra non-option argument \`$1'." >&2 exit 1 fi;; esac shift done if test -s "$srcdir/$PACKAGE.texinfo"; then srcfile=$srcdir/$PACKAGE.texinfo elif test -s "$srcdir/$PACKAGE.texi"; then srcfile=$srcdir/$PACKAGE.texi elif test -s "$srcdir/$PACKAGE.txi"; then srcfile=$srcdir/$PACKAGE.txi else echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2 exit 1 fi if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then echo "$0: cannot read $GENDOCS_TEMPLATE_DIR/gendocs_template." >&2 echo "$0: it is available from $templateurl." >&2 exit 1 fi case $outdir in /*) dotdot_outdir="$outdir";; *) dotdot_outdir="../$outdir";; esac echo Generating output formats for $srcfile cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\"" echo "Generating info files... ($cmd)" eval "$cmd" mkdir -p $outdir/ tar czf $outdir/$PACKAGE.info.tar.gz $PACKAGE.info* info_tgz_size=`calcsize $outdir/$PACKAGE.info.tar.gz` # do not mv the info files, there's no point in having them available # separately on the web. cmd="${TEXI2DVI} \"$srcfile\"" echo "Generating dvi ... ($cmd)" eval "$cmd" # now, before we compress dvi: echo Generating postscript... ${DVIPS} $PACKAGE -o gzip -f -9 $PACKAGE.ps ps_gz_size=`calcsize $PACKAGE.ps.gz` mv $PACKAGE.ps.gz $outdir/ # compress/finish dvi: gzip -f -9 $PACKAGE.dvi dvi_gz_size=`calcsize $PACKAGE.dvi.gz` mv $PACKAGE.dvi.gz $outdir/ cmd="${TEXI2DVI} --pdf \"$srcfile\"" echo "Generating pdf ... ($cmd)" eval "$cmd" pdf_size=`calcsize $PACKAGE.pdf` mv $PACKAGE.pdf $outdir/ cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\"" echo "Generating ASCII... ($cmd)" eval "$cmd" ascii_size=`calcsize $PACKAGE.txt` gzip -f -9 -c $PACKAGE.txt >$outdir/$PACKAGE.txt.gz ascii_gz_size=`calcsize $outdir/$PACKAGE.txt.gz` mv $PACKAGE.txt $outdir/ html_split() { opt="--split=$1 $htmlarg --node-files" cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\"" echo "Generating html by $1... ($cmd)" eval "$cmd" split_html_dir=$PACKAGE.html ( cd ${split_html_dir} || exit 1 ln -sf ${PACKAGE}.html index.html tar -czf $dotdot_outdir/${PACKAGE}.html_$1.tar.gz -- *.html ) eval html_$1_tgz_size=`calcsize $outdir/${PACKAGE}.html_$1.tar.gz` rm -f $outdir/html_$1/*.html mkdir -p $outdir/html_$1/ mv ${split_html_dir}/*.html $outdir/html_$1/ rmdir ${split_html_dir} } if test -z "$use_texi2html"; then opt="--no-split --html -o $PACKAGE.html $htmlarg" cmd="$SETLANG $MAKEINFO $opt \"$srcfile\"" echo "Generating monolithic html... ($cmd)" rm -rf $PACKAGE.html # in case a directory is left over eval "$cmd" html_mono_size=`calcsize $PACKAGE.html` gzip -f -9 -c $PACKAGE.html >$outdir/$PACKAGE.html.gz html_mono_gz_size=`calcsize $outdir/$PACKAGE.html.gz` mv $PACKAGE.html $outdir/ cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $htmlarg \"$srcfile\"" echo "Generating html by node... ($cmd)" eval "$cmd" split_html_dir=$PACKAGE.html ( cd ${split_html_dir} || exit 1 tar -czf $dotdot_outdir/${PACKAGE}.html_node.tar.gz -- *.html ) html_node_tgz_size=`calcsize $outdir/${PACKAGE}.html_node.tar.gz` rm -f $outdir/html_node/*.html mkdir -p $outdir/html_node/ mv ${split_html_dir}/*.html $outdir/html_node/ rmdir ${split_html_dir} else cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $htmlarg \"$srcfile\"" echo "Generating monolithic html... ($cmd)" rm -rf $PACKAGE.html # in case a directory is left over eval "$cmd" html_mono_size=`calcsize $PACKAGE.html` gzip -f -9 -c $PACKAGE.html >$outdir/$PACKAGE.html.gz html_mono_gz_size=`calcsize $outdir/$PACKAGE.html.gz` mv $PACKAGE.html $outdir/ html_split node html_split chapter html_split section fi echo Making .tar.gz for sources... srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` tar cvzfh $outdir/$PACKAGE.texi.tar.gz $srcfiles texi_tgz_size=`calcsize $outdir/$PACKAGE.texi.tar.gz` if test -n "$docbook"; then cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml" echo "Generating docbook XML... $(cmd)" eval "$cmd" docbook_xml_size=`calcsize $PACKAGE-db.xml` gzip -f -9 -c $PACKAGE-db.xml >$outdir/$PACKAGE-db.xml.gz docbook_xml_gz_size=`calcsize $outdir/$PACKAGE-db.xml.gz` mv $PACKAGE-db.xml $outdir/ cmd="${DOCBOOK2HTML} -o $split_html_db_dir ${outdir}/$PACKAGE-db.xml" echo "Generating docbook HTML... ($cmd)" eval "$cmd" split_html_db_dir=html_node_db ( cd ${split_html_db_dir} || exit 1 tar -czf $dotdot_outdir/${PACKAGE}.html_node_db.tar.gz -- *.html ) html_node_db_tgz_size=`calcsize $outdir/${PACKAGE}.html_node_db.tar.gz` rm -f $outdir/html_node_db/*.html mkdir -p $outdir/html_node_db mv ${split_html_db_dir}/*.html $outdir/html_node_db/ rmdir ${split_html_db_dir} cmd="${DOCBOOK2TXT} ${outdir}/$PACKAGE-db.xml" echo "Generating docbook ASCII... ($cmd)" eval "$cmd" docbook_ascii_size=`calcsize $PACKAGE-db.txt` mv $PACKAGE-db.txt $outdir/ cmd="${DOCBOOK2PS} ${outdir}/$PACKAGE-db.xml" echo "Generating docbook PS... $(cmd)" eval "$cmd" gzip -f -9 -c $PACKAGE-db.ps >$outdir/$PACKAGE-db.ps.gz docbook_ps_gz_size=`calcsize $outdir/$PACKAGE-db.ps.gz` mv $PACKAGE-db.ps $outdir/ cmd="${DOCBOOK2PDF} ${outdir}/$PACKAGE-db.xml" echo "Generating docbook PDF... ($cmd)" eval "$cmd" docbook_pdf_size=`calcsize $PACKAGE-db.pdf` mv $PACKAGE-db.pdf $outdir/ fi echo "Writing index file..." if test -z "$use_texi2html"; then CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\ /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d" else CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d" fi curdate=`$SETLANG date '+%B %d, %Y'` sed \ -e "s!%%TITLE%%!$MANUAL_TITLE!g" \ -e "s!%%EMAIL%%!$EMAIL!g" \ -e "s!%%PACKAGE%%!$PACKAGE!g" \ -e "s!%%DATE%%!$curdate!g" \ -e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \ -e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \ -e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \ -e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \ -e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \ -e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \ -e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \ -e "s!%%PDF_SIZE%%!$pdf_size!g" \ -e "s!%%PS_GZ_SIZE%%!$ps_gz_size!g" \ -e "s!%%ASCII_SIZE%%!$ascii_size!g" \ -e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \ -e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \ -e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \ -e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \ -e "s!%%DOCBOOK_PS_GZ_SIZE%%!$docbook_ps_gz_size!g" \ -e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \ -e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \ -e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \ -e "s,%%SCRIPTURL%%,$scripturl,g" \ -e "s!%%SCRIPTNAME%%!$prog!g" \ -e "$CONDS" \ $GENDOCS_TEMPLATE_DIR/gendocs_template >$outdir/index.html echo "Done, see $outdir/ subdirectory for new files." # 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.64_2.64+dfsg.orig/build-aux/install-sh����������������������������������������������������0000755�0001750�0001750�00000032537�11233202134�020136� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $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_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # 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 if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # 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 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$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 $cpprog $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 $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # 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. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: �����������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/build-aux/config.sub����������������������������������������������������0000755�0001750�0001750�00000102425�11233203257�020116� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-11' # 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, 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 <config-patches@gnu.org>. 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 <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # 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 ;; * ) 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 | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-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 | -knuth | -cray) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -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 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -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/'` ;; -sco5v6*) # 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 | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) 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) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*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-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # 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 ;; abacus) basic_machine=abacus-unknown ;; 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 ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; 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 ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; 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 ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; 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 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; 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 ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; 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 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; 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 ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; 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 ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; 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 ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; 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 ;; rdos) basic_machine=i386-pc os=-rdos ;; 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 ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; 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 ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; 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 ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-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 ;; mmix) basic_machine=mmix-knuth ;; 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 ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 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* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -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* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # 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* | -haiku* \ | -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 ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -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 ;; -tpf*) os=-tpf ;; -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 ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -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 score-*) os=-elf ;; spu-*) os=-elf ;; *-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 ;; mep-*) os=-elf ;; 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 ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-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 ;; -cnk*|-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 ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -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 # 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.64_2.64+dfsg.orig/cfg.mk������������������������������������������������������������������0000644�0001750�0001750�00000010104�11173340506�015323� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Customize maint.mk for Autoconf. -*- Makefile -*- # Copyright (C) 2003, 2004, 2006, 2008, 2009 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 3 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, see <http://www.gnu.org/licenses/>. # This file is '-include'd into GNUmakefile. # Build with our own versions of these tools, when possible. export PATH = $(shell echo "`pwd`/tests:$$PATH") # Remove the autoreconf-provided INSTALL, so that we regenerate it. _autoreconf = autoreconf -i -v && rm -f INSTALL # Version management. announce_gen = $(srcdir)/build-aux/announce-gen # Use alpha.gnu.org for alpha and beta releases. # Use ftp.gnu.org for major releases. gnu_ftp_host-alpha = alpha.gnu.org gnu_ftp_host-beta = alpha.gnu.org gnu_ftp_host-major = ftp.gnu.org gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE)) url_dir_list = \ ftp://$(gnu_rel_host)/gnu/autoconf # The GnuPG ID of the key used to sign the tarballs. gpg_key_ID = F4850180 # The local directory containing the checked-out copy of gnulib used in this # release. gnulib_dir = '$(abs_srcdir)'/../gnulib # Update files from gnulib. .PHONY: fetch gnulib-update autom4te-update fetch: gnulib-update autom4te-update gnulib-update: cp $(gnulib_dir)/build-aux/announce-gen $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/config.guess $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/config.sub $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/elisp-comp $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/gendocs.sh $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/git-version-gen $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/gnupload $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/install-sh $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/mdate-sh $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/missing $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/move-if-change $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/vc-list-files $(srcdir)/build-aux cp $(gnulib_dir)/build-aux/texinfo.tex $(srcdir)/build-aux cp $(gnulib_dir)/doc/fdl.texi $(srcdir)/doc cp $(gnulib_dir)/doc/gendocs_template $(srcdir)/doc cp $(gnulib_dir)/doc/gnu-oids.texi $(srcdir)/doc cp $(gnulib_dir)/doc/make-stds.texi $(srcdir)/doc cp $(gnulib_dir)/doc/standards.texi $(srcdir)/doc cp $(gnulib_dir)/top/GNUmakefile $(srcdir) WGET = wget WGETFLAGS = -C off ## Fetch the latest versions of files we care about. automake_gitweb = \ http://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;hb=HEAD; autom4te_files = \ Autom4te/Configure_ac.pm \ Autom4te/Channels.pm \ Autom4te/FileUtils.pm \ Autom4te/Struct.pm \ Autom4te/XFile.pm move_if_change = '$(abs_srcdir)'/build-aux/move-if-change autom4te-update: rm -fr Fetchdir > /dev/null 2>&1 mkdir -p Fetchdir/Autom4te for file in $(autom4te_files); do \ infile=`echo $$file | sed 's/Autom4te/Automake/g'`; \ $(WGET) $(WGET_FLAGS) \ "$(automake_gitweb)f=lib/$$infile" \ -O "Fetchdir/$$file" || exit; \ done perl -pi -e 's/Automake::/Autom4te::/g' Fetchdir/Autom4te/*.pm for file in $(autom4te_files); do \ $(move_if_change) Fetchdir/$$file $(srcdir)/lib/$$file || exit; \ done rm -fr Fetchdir > /dev/null 2>&1 @echo @echo "Please avoid committing copyright changes until GPLv3 is sorted" @echo # Tests not to run. local-checks-to-skip ?= \ changelog-check sc_unmarked_diagnostics .PHONY: web-manual web-manual: @cd $(srcdir)/doc ; \ $(SHELL) ../build-aux/gendocs.sh -o '$(abs_builddir)/doc/manual' \ --email $(PACKAGE_BUGREPORT) $(PACKAGE) \ "$(PACKAGE_NAME) - Creating Automatic Configuration Scripts" @echo " *** Upload the doc/manual directory to web-cvs." ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/INSTALL�����������������������������������������������������������������0000644�0001750�0001750�00000036231�11233217120�015265� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. 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 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. Running `configure' might take a while. 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, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. 6. 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. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. 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=c99 CFLAGS=-g 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 can use 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 `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer 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. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute path. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' 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. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/path/to/alternate' will choose an alternate location, as well as influencing all other directory configuration variables that were expressed in terms of `${prefix}' (or, put another way, all directories specified during `configure' but not in terms of the common prefix must each be overridden at install time for the entire installation to be relocated). The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/path/to/alternate' will prepend `/path/to/alternate' before all installation paths. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. For packages which support `DESTDIR', the variable should remain undefined during `configure' and `make all', and only be specified during `make install'. Optional Features ================= 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'. 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. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `<wchar.h>' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common 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 option `--target=TYPE' 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 causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--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. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/��������������������������������������������������������������������0000755�0001750�0001750�00000000000�11233220571�015001� 5����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/Makefile.am���������������������������������������������������������0000644�0001750�0001750�00000003422�11202536433�017041� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Make Autoconf-related libraries. # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 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 3 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, see <http://www.gnu.org/licenses/>. 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|@pkgdatadir[@]|$(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 a-w autom4te.tmp mv autom4te.tmp autom4te.cfg ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/�����������������������������������������������������������0000755�0001750�0001750�00000000000�11233220575�016623� 5����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/autotest.m4������������������������������������������������0000644�0001750�0001750�00000007704�11202536433�020744� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Interface with Autotest. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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 <<ATEOF @%:@ Configurable variable values for building test suites. @%:@ Generated by $[0]. @%:@ Copyright (C) m4_PACKAGE_YEAR Free Software Foundation, Inc. # The test suite will define top_srcdir=$at_top_srcdir/../.. etc. at_testdir='$1' abs_builddir='$ac_abs_builddir' at_srcdir='$ac_srcdir' abs_srcdir='$ac_abs_srcdir' at_top_srcdir='$ac_top_srcdir' abs_top_srcdir='$ac_abs_top_srcdir' at_top_build_prefix='$ac_top_build_prefix' abs_top_builddir='$ac_abs_top_builddir' # Backward compatibility with Autotest <= 2.59b: at_top_builddir=\$at_top_build_prefix AUTOTEST_PATH='m4_default([$2], [$1])' SHELL=\${CONFIG_SHELL-'$SHELL'} ATEOF ]) ])# AC_CONFIG_TESTDIR ������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/Makefile.am������������������������������������������������0000644�0001750�0001750�00000003012�11202536433�020652� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Make Autoconf library. # Copyright (C) 2001, 2002, 2006 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 3 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, see <http://www.gnu.org/licenses/>. 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 erlang.m4 fortran.m4 \ functions.m4 headers.m4 types.m4 libs.m4 programs.m4 nodist_autoconflib_DATA = autoconf.m4f CLEANFILES = $(nodist_autoconflib_DATA) ## --------------- ## ## Building TAGS. ## ## --------------- ## TAGS_FILES = $(dist_autoconflib_DATA) ETAGS_ARGS = $(ETAGS_FOR_AUTOCONF) ## -------- ## ## Checks. ## ## -------- ## check-local: check-forbidden-patterns forbidden_patterns = -e '^_*EOF' -e ' cmp ' forbidden_patterns_files = $(dist_autoconflib_DATA) ## ------------------ ## ## The frozen files. ## ## ------------------ ## autoconf.m4f: $(autoconf_m4f_dependencies) include ../freeze.mk ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/functions.m4�����������������������������������������������0000644�0001750�0001750�00000174270�11202536433�021107� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Checking for functions. # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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 functions. # 2. Functions to check with AC_CHECK_FUNCS # 3. Tests for specific functions. ## -------------------------------- ## ## 1. Generic tests for functions. ## ## -------------------------------- ## # _AC_CHECK_FUNC_BODY # ------------------- # Shell function body for AC_CHECK_FUNC. m4_define([_AC_CHECK_FUNC_BODY], [ AS_LINENO_PUSH([$[]1]) AC_CACHE_CHECK([for $[]2], [$[]3], [AC_LINK_IFELSE([AC_LANG_FUNC_LINK_TRY($[]2)], [AS_VAR_SET([$[]3], [yes])], [AS_VAR_SET([$[]3], [no])])]) AS_LINENO_POP ])# _AC_CHECK_FUNC_BODY # AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ----------------------------------------------------------------- # Check whether FUNCTION links in the current language. Set the cache # variable ac_cv_func_FUNCTION accordingly, then execute # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND. AC_DEFUN([AC_CHECK_FUNC], [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_func], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_func], [LINENO FUNC VAR], [Tests whether FUNC exists, setting the cache variable VAR accordingly])], [_$0_BODY])]dnl [AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])]dnl [ac_fn_[]_AC_LANG_ABBREV[]_check_func "$LINENO" "$1" "ac_var" AS_VAR_IF([ac_var], [yes], [$2], [$3]) AS_VAR_POPDEF([ac_var])])# AC_CHECK_FUNC # _AH_CHECK_FUNC(FUNCTION) # ------------------------ # Prepare the autoheader snippet for FUNCTION. m4_define([_AH_CHECK_FUNC], [AH_TEMPLATE(AS_TR_CPP([HAVE_$1]), [Define to 1 if you have the `$1' function.])]) # AC_CHECK_FUNCS(FUNCTION..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------- # Check for each whitespace-separated FUNCTION, and perform # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND for each function. # Additionally, make the preprocessor definition HAVE_FUNCTION # available for each found function. Either ACTION may include # `break' to stop the search. AC_DEFUN([AC_CHECK_FUNCS], [m4_map_args_w([$1], [_AH_CHECK_FUNC(], [)])]dnl [AS_FOR([AC_func], [ac_func], [$1], [AC_CHECK_FUNC(AC_func, [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_]AC_func)) $2], [$3])dnl]) ])# AC_CHECK_FUNCS # _AC_CHECK_FUNC_ONCE(FUNCTION) # ----------------------------- # Check for a single FUNCTION once. m4_define([_AC_CHECK_FUNC_ONCE], [_AH_CHECK_FUNC([$1])AC_DEFUN([_AC_Func_$1], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" $1"])]) _AC_FUNCS_EXPANSION])AC_REQUIRE([_AC_Func_$1])]) # AC_CHECK_FUNCS_ONCE(FUNCTION...) # -------------------------------- # Add each whitespace-separated name in FUNCTION to the list of functions # to check once. AC_DEFUN([AC_CHECK_FUNCS_ONCE], [m4_map_args_w([$1], [_AC_CHECK_FUNC_ONCE(], [)])]) m4_define([_AC_FUNCS_EXPANSION], [ m4_divert_text([DEFAULTS], [ac_func_list=]) AC_CHECK_FUNCS([$ac_func_list]) m4_define([_AC_FUNCS_EXPANSION], []) ]) # AC_REPLACE_FUNCS(FUNCTION...) # ----------------------------- AC_DEFUN([AC_REPLACE_FUNCS], [m4_map_args_w([$1], [AC_LIBSOURCE(], [.c)])]dnl [AC_CHECK_FUNCS([$1], , [_AC_LIBOBJ($ac_func)]) ]) # AC_TRY_LINK_FUNC(FUNC, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) # ------------------------------------------------------------ # Try to link a program that calls FUNC, handling GCC builtins. If # the link succeeds, execute ACTION-IF-FOUND; otherwise, execute # ACTION-IF-NOT-FOUND. AC_DEFUN([AC_TRY_LINK_FUNC], [AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], [$2], [$3])]) # AU::AC_FUNC_CHECK # ----------------- AU_ALIAS([AC_FUNC_CHECK], [AC_CHECK_FUNC]) # AU::AC_HAVE_FUNCS # ----------------- AU_ALIAS([AC_HAVE_FUNCS], [AC_CHECK_FUNCS]) ## ------------------------------------------- ## ## 2. Functions to check with AC_CHECK_FUNCS. ## ## ------------------------------------------- ## AN_FUNCTION([__argz_count], [AC_CHECK_FUNCS]) AN_FUNCTION([__argz_next], [AC_CHECK_FUNCS]) AN_FUNCTION([__argz_stringify], [AC_CHECK_FUNCS]) AN_FUNCTION([__fpending], [AC_CHECK_FUNCS]) AN_FUNCTION([acl], [AC_CHECK_FUNCS]) AN_FUNCTION([alarm], [AC_CHECK_FUNCS]) AN_FUNCTION([atexit], [AC_CHECK_FUNCS]) AN_FUNCTION([btowc], [AC_CHECK_FUNCS]) AN_FUNCTION([bzero], [AC_CHECK_FUNCS]) AN_FUNCTION([clock_gettime], [AC_CHECK_FUNCS]) AN_FUNCTION([doprnt], [AC_CHECK_FUNCS]) AN_FUNCTION([dup2], [AC_CHECK_FUNCS]) AN_FUNCTION([endgrent], [AC_CHECK_FUNCS]) AN_FUNCTION([endpwent], [AC_CHECK_FUNCS]) AN_FUNCTION([euidaccess], [AC_CHECK_FUNCS]) AN_FUNCTION([fchdir], [AC_CHECK_FUNCS]) AN_FUNCTION([fdatasync], [AC_CHECK_FUNCS]) AN_FUNCTION([fesetround], [AC_CHECK_FUNCS]) AN_FUNCTION([floor], [AC_CHECK_FUNCS]) AN_FUNCTION([fs_stat_dev], [AC_CHECK_FUNCS]) AN_FUNCTION([ftime], [AC_CHECK_FUNCS]) AN_FUNCTION([ftruncate], [AC_CHECK_FUNCS]) AN_FUNCTION([getcwd], [AC_CHECK_FUNCS]) AN_FUNCTION([getdelim], [AC_CHECK_FUNCS]) AN_FUNCTION([gethostbyaddr], [AC_CHECK_FUNCS]) AN_FUNCTION([gethostbyname], [AC_CHECK_FUNCS]) AN_FUNCTION([gethostname], [AC_CHECK_FUNCS]) AN_FUNCTION([gethrtime], [AC_CHECK_FUNCS]) AN_FUNCTION([getmntent], [AC_CHECK_FUNCS]) AN_FUNCTION([getmntinfo], [AC_CHECK_FUNCS]) AN_FUNCTION([getpagesize], [AC_CHECK_FUNCS]) AN_FUNCTION([getpass], [AC_CHECK_FUNCS]) AN_FUNCTION([getspnam], [AC_CHECK_FUNCS]) AN_FUNCTION([gettimeofday], [AC_CHECK_FUNCS]) AN_FUNCTION([getusershell], [AC_CHECK_FUNCS]) AN_FUNCTION([hasmntopt], [AC_CHECK_FUNCS]) AN_FUNCTION([inet_ntoa], [AC_CHECK_FUNCS]) AN_FUNCTION([isascii], [AC_CHECK_FUNCS]) AN_FUNCTION([iswprint], [AC_CHECK_FUNCS]) AN_FUNCTION([lchown], [AC_CHECK_FUNCS]) AN_FUNCTION([listmntent], [AC_CHECK_FUNCS]) AN_FUNCTION([localeconv], [AC_CHECK_FUNCS]) AN_FUNCTION([localtime_r], [AC_CHECK_FUNCS]) AN_FUNCTION([mblen], [AC_CHECK_FUNCS]) AN_FUNCTION([mbrlen], [AC_CHECK_FUNCS]) AN_FUNCTION([memchr], [AC_CHECK_FUNCS]) AN_FUNCTION([memmove], [AC_CHECK_FUNCS]) AN_FUNCTION([mempcpy], [AC_CHECK_FUNCS]) AN_FUNCTION([memset], [AC_CHECK_FUNCS]) AN_FUNCTION([mkdir], [AC_CHECK_FUNCS]) AN_FUNCTION([mkfifo], [AC_CHECK_FUNCS]) AN_FUNCTION([modf], [AC_CHECK_FUNCS]) AN_FUNCTION([munmap], [AC_CHECK_FUNCS]) AN_FUNCTION([next_dev], [AC_CHECK_FUNCS]) AN_FUNCTION([nl_langinfo], [AC_CHECK_FUNCS]) AN_FUNCTION([pathconf], [AC_CHECK_FUNCS]) AN_FUNCTION([pow], [AC_CHECK_FUNCS]) AN_FUNCTION([pstat_getdynamic], [AC_CHECK_FUNCS]) AN_FUNCTION([putenv], [AC_CHECK_FUNCS]) AN_FUNCTION([re_comp], [AC_CHECK_FUNCS]) AN_FUNCTION([realpath], [AC_CHECK_FUNCS]) AN_FUNCTION([regcmp], [AC_CHECK_FUNCS]) AN_FUNCTION([regcomp], [AC_CHECK_FUNCS]) AN_FUNCTION([resolvepath], [AC_CHECK_FUNCS]) AN_FUNCTION([rint], [AC_CHECK_FUNCS]) AN_FUNCTION([rmdir], [AC_CHECK_FUNCS]) AN_FUNCTION([rpmatch], [AC_CHECK_FUNCS]) AN_FUNCTION([select], [AC_CHECK_FUNCS]) AN_FUNCTION([setenv], [AC_CHECK_FUNCS]) AN_FUNCTION([sethostname], [AC_CHECK_FUNCS]) AN_FUNCTION([setlocale], [AC_CHECK_FUNCS]) AN_FUNCTION([socket], [AC_CHECK_FUNCS]) AN_FUNCTION([sqrt], [AC_CHECK_FUNCS]) AN_FUNCTION([stime], [AC_CHECK_FUNCS]) AN_FUNCTION([stpcpy], [AC_CHECK_FUNCS]) AN_FUNCTION([strcasecmp], [AC_CHECK_FUNCS]) AN_FUNCTION([strchr], [AC_CHECK_FUNCS]) AN_FUNCTION([strcspn], [AC_CHECK_FUNCS]) AN_FUNCTION([strdup], [AC_CHECK_FUNCS]) AN_FUNCTION([strerror], [AC_CHECK_FUNCS]) AN_FUNCTION([strncasecmp], [AC_CHECK_FUNCS]) AN_FUNCTION([strndup], [AC_CHECK_FUNCS]) AN_FUNCTION([strpbrk], [AC_CHECK_FUNCS]) AN_FUNCTION([strrchr], [AC_CHECK_FUNCS]) AN_FUNCTION([strspn], [AC_CHECK_FUNCS]) AN_FUNCTION([strstr], [AC_CHECK_FUNCS]) AN_FUNCTION([strtol], [AC_CHECK_FUNCS]) AN_FUNCTION([strtoul], [AC_CHECK_FUNCS]) AN_FUNCTION([strtoull], [AC_CHECK_FUNCS]) AN_FUNCTION([strtoumax], [AC_CHECK_FUNCS]) AN_FUNCTION([strverscmp], [AC_CHECK_FUNCS]) AN_FUNCTION([sysinfo], [AC_CHECK_FUNCS]) AN_FUNCTION([tzset], [AC_CHECK_FUNCS]) AN_FUNCTION([uname], [AC_CHECK_FUNCS]) AN_FUNCTION([utime], [AC_CHECK_FUNCS]) AN_FUNCTION([utmpname], [AC_CHECK_FUNCS]) AN_FUNCTION([utmpxname], [AC_CHECK_FUNCS]) AN_FUNCTION([wcwidth], [AC_CHECK_FUNCS]) AN_FUNCTION([dcgettext], [AM_GNU_GETTEXT]) AN_FUNCTION([getwd], [warn: getwd is deprecated, use getcwd instead]) ## --------------------------------- ## ## 3. Tests for specific functions. ## ## --------------------------------- ## # The macros are sorted: # # 1. AC_FUNC_* macros are sorted by alphabetical order. # # 2. Helping macros such as _AC_LIBOBJ_* are before the macro that # uses it. # # 3. Obsolete macros are right after the modern macro. # _AC_LIBOBJ_ALLOCA # ----------------- # Set up the LIBOBJ replacement of `alloca'. Well, not exactly # AC_LIBOBJ since we actually set the output variable `ALLOCA'. # Nevertheless, for Automake, AC_LIBSOURCES it. m4_define([_AC_LIBOBJ_ALLOCA], [# The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. AC_LIBSOURCES(alloca.c) AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using `alloca.c'.]) AC_CACHE_CHECK(whether `alloca.c' needs Cray hooks, ac_cv_os_cray, [AC_EGREP_CPP(webecray, [#if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif ], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func, [Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems.]) break]) done fi AC_CACHE_CHECK([stack direction for C alloca], [ac_cv_c_stack_direction], [AC_RUN_IFELSE([AC_LANG_SOURCE( [AC_INCLUDES_DEFAULT int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return 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 runtime. 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 <alloca.h>]], [[char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0;]])], [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 <alloca.h> 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 <malloc.h> # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include <alloca.h> # 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); if (p) return 0;]])], [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 <fcntl.h> ], [[ char *f = "conftest.chown"; struct stat before, after; if (creat (f, 0600) < 0) return 1; if (stat (f, &before) < 0) return 1; if (chown (f, (uid_t) -1, (gid_t) -1) == -1) return 1; if (stat (f, &after) < 0) return 1; return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); ]])], [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. 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 ], [[return 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([#include <error.h>], [error_at_line (0, 0, "", 0, "an error occurred");])], [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 <fnmatch.h> # define y(a, b, c) (fnmatch (a, b, c) == 0) # define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH) ], [return (!(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 # ------------------ 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 <sys/types.h> /* for off_t */ #include <stdio.h>]], [[int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);]]) # 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. if test $ac_cv_sys_largefile_source != unknown; 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. */ return getgroups (0, 0) == -1;]])], [ac_cv_func_getgroups_works=yes], [ac_cv_func_getgroups_works=no], [ac_cv_func_getgroups_works=no]) ]) else ac_cv_func_getgroups_works=no fi 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 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 <sys/dg_sys_info.h>.]) AC_CHECK_LIB(dgc, dg_sys_info)]) AC_CHECK_HEADER(locale.h) AC_CHECK_FUNCS(setlocale) # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it # uses stabs), but it is still SVR4. We cannot check for <elf.h> because # Irix 4.0.5F has the header but not the library. if test $ac_have_func = no && test "$ac_cv_lib_elf_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 <inq_status/cpustats.h> instead of <sys/cpustats.h>.])]) 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 <nlist.h>]) ])dnl ])# _AC_LIBOBJ_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=`AS_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=`AS_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 the standard C library on UNICOS, in -lsun on Irix 4, # -lseq on Dynix/PTX, -lgen on Unixware. AC_SEARCH_LIBS(getmntent, [sun seq gen], [ac_cv_func_getmntent=yes AC_DEFINE([HAVE_GETMNTENT], 1, [Define to 1 if you have the `getmntent' function.])], [ac_cv_func_getmntent=no]) ]) # AC_FUNC_GETPGRP # --------------- # Figure out whether getpgrp requires zero arguments. 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. */ return lstat ("conftest.sym/", &sbuf) == 0;])], [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 defined STDC_HEADERS || defined HAVE_STDLIB_H # include <stdlib.h> #else char *malloc (); #endif ]], [return ! malloc (0);])], [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_IF # 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 <wchar.h>]], [[wchar_t wc; char const s[] = ""; size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], 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 # -------------- 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 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 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) return 1; } return 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_ONCE(sys/time.h unistd.h) AC_CHECK_FUNCS_ONCE(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. */ #ifdef TIME_WITH_SYS_TIME # include <sys/time.h> # include <time.h> #else # ifdef HAVE_SYS_TIME_H # include <sys/time.h> # else # include <time.h> # endif #endif #include <limits.h> #include <stdlib.h> #ifdef HAVE_UNISTD_H # include <unistd.h> #endif #ifndef 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])) /* Return 0 if mktime fails to convert a date in the spring-forward gap. Based on a problem report from Andreas Jaeger. */ static int 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; return mktime (&tm) != (time_t) -1; } static int mktime_test1 (now) time_t now; { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int mktime_test (now) time_t now; { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) && mktime_test1 ((time_t) (time_t_min + now))); } static int 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); return tm.tm_mon == 2 && tm.tm_mday == 31; } static int 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)))) return 0; } return 1; } static int year_2050_test () { /* The correct answer for 2050-02-01 00:00:00 in Pacific time, ignoring leap seconds. */ unsigned long int answer = 2527315200UL; struct tm tm; time_t t; tm.tm_year = 2050 - 1900; tm.tm_mon = 2 - 1; tm.tm_mday = 1; tm.tm_hour = tm.tm_min = tm.tm_sec = 0; tm.tm_isdst = -1; /* 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"); t = mktime (&tm); /* Check that the result is either a failure, or close enough to the correct answer that we can assume the discrepancy is due to leap seconds. */ return (t == (time_t) -1 || (0 < t && answer - 120 <= t && t <= answer + 120)); } 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 (;;) { t = (time_t_max << 1) + 1; if (t <= time_t_max) break; time_t_max = t; } time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; 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) if (! mktime_test (t)) return 1; if (! (mktime_test ((time_t) 1) && mktime_test ((time_t) (60 * 60)) && mktime_test ((time_t) (60 * 60 * 24)))) return 1; for (j = 1; ; j <<= 1) if (! bigtime_test (j)) return 1; else if (INT_MAX / 2 < j) break; if (! bigtime_test (INT_MAX)) return 1; } return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); }]])], [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 <fcntl.h> #include <sys/mman.h> #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include <sys/param.h> # 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) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 1; if (write (fd, data, pagesize) != pagesize) return 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) return 1; data2 = (char *) malloc (2 * pagesize); if (!data2) return 1; data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 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) return 1; if (read (fd, data3, pagesize) != pagesize) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 1; close (fd); return 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([AC_INCLUDES_DEFAULT [@%:@include "obstack.h"]], [[struct obstack mem; @%:@define obstack_chunk_alloc malloc @%:@define obstack_chunk_free free obstack_init (&mem); obstack_free (&mem, 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)' is 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 defined STDC_HEADERS || defined HAVE_STDLIB_H # include <stdlib.h> #else char *realloc (); #endif ]], [return ! realloc (0, 0);])], [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)' is 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'. 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 int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT #ifdef HAVE_SYS_SELECT_H # include <sys/select.h> #endif #ifdef HAVE_SYS_SOCKET_H # include <sys/socket.h> #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 # --------------- AC_DEFUN([AC_FUNC_SETPGRP], [AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void, [AC_RUN_IFELSE( [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [/* 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. */ return setpgrp (1,1) != -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; return $1 ("", &sbuf) == 0;]])], [ac_cv_func_$1_empty_string_bug=no], [ac_cv_func_$1_empty_string_bug=yes], [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 # ---------------------------- AC_DEFUN([AC_FUNC_STAT], [_AC_FUNC_STAT(stat)]) 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([[ ]AC_INCLUDES_DEFAULT[ #ifndef strtod double strtod (); #endif 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)) return 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) return 1; } return 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 ]) # AC_FUNC_STRTOLD # --------------- AC_DEFUN([AC_FUNC_STRTOLD], [ AC_CACHE_CHECK([whether strtold conforms to C99], [ac_cv_func_strtold], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[/* On HP-UX before 11.23, strtold returns a struct instead of long double. Reject implementations like that, by requiring compatibility with the C99 prototype. */ # include <stdlib.h> static long double (*p) (char const *, char **) = strtold; static long double test (char const *nptr, char **endptr) { long double r; r = strtold (nptr, endptr); return r; }]], [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])], [ac_cv_func_strtold=yes], [ac_cv_func_strtold=no])]) if test $ac_cv_func_strtold = yes; then AC_DEFINE([HAVE_STRTOLD], 1, [Define to 1 if strtold exists and conforms to C99.]) fi ])# AC_FUNC_STRTOLD # 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); return !p || x; ]])], 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); return ! 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 # ---------------- 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_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])dnl 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) return 1; } return 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 # ------------------------ AC_DEFUN([AC_FUNC_SETVBUF_REVERSED], [AC_DIAGNOSE([obsolete], [The macro `$0' is obsolete. Remove it and all references to SETVBUF_REVERSED.])dnl AC_CACHE_VAL([ac_cv_func_setvbuf_reversed], [ac_cv_func_setvbuf_reversed=no]) ])# 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], [[return (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 # ------------------ AC_DEFUN([AC_FUNC_UTIME_NULL], [AC_CHECK_HEADERS_ONCE(utime.h) 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 #ifdef HAVE_UTIME_H # include <utime.h> #endif], [[struct stat s, t; return ! (stat ("conftest.data", &s) == 0 && utime ("conftest.data", 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='guessing yes')]) if test "x$ac_cv_func_utime_null" != xno; then ac_cv_func_utime_null=yes 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(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( [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [ /* By Ruediger Kuhlmann. */ return fork () < 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. */ ]AC_INCLUDES_DEFAULT[ #include <sys/wait.h> #ifdef HAVE_VFORK_H # include <vfork.h> #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 <vfork.h>, but some compilers (e.g. gcc -O) don't grok <vfork.h>. 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) ; return ( /* 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! 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' has been removed from POSIX. 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( [AC_INCLUDES_DEFAULT[ #include <sys/time.h> #include <sys/resource.h> #include <sys/wait.h> /* 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); return (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.64_2.64+dfsg.orig/lib/autoconf/lang.m4����������������������������������������������������0000644�0001750�0001750�00000056644�11215442605�020025� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Programming languages support. # Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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. # # 2. Producing programs in a given language. # # 3. Looking for a compiler # And possibly the associated preprocessor. # # 3a. Computing EXEEXT and OBJEXT. # # 4. Compilers' characteristics. ## ----------------------- ## ## 1. 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_shift2($@))], [m4_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_LANG_SAVE]], [Instead of using `AC_LANG', `AC_LANG_SAVE', and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.]) AC_DEFUN([AC_LANG_SAVE], [m4_pushdef([_AC_LANG], _AC_LANG)dnl AC_DIAGNOSE([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.])]) # 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)])]) # AC_LANG_DEFINE(NAME, ABBREV, PREFIX, COPY-FROM, SHELL-VARS) # ----------------------------------------------------------- # Define a language referenced by AC_LANG(NAME), with cache variable prefix # ABBREV and Makefile variable prefix PREFIX. AC_LANG(NAME) is defined # to SHELL-VARS, other macros are copied from language COPY-FROM. Even if # COPY-FROM is empty, a default definition is provided for language-specific # macros AC_LANG_SOURCE(NAME) and AC_LANG_CONFTEST(NAME). m4_define([AC_LANG_DEFINE], [m4_define([AC_LANG($1)], [$5])] [m4_define([_AC_LANG_ABBREV($1)], [$2])] [m4_define([_AC_LANG_PREFIX($1)], [$3])] [m4_copy([AC_LANG_CONFTEST($4)], [AC_LANG_CONFTEST($1)])] [m4_copy([AC_LANG_SOURCE($4)], [AC_LANG_SOURCE($1)])] [m4_ifval([$4], [m4_copy([AC_LANG_PROGRAM($4)], [AC_LANG_PROGRAM($1)])] [m4_copy([AC_LANG_CALL($4)], [AC_LANG_CALL($1)])] [m4_copy([AC_LANG_FUNC_LINK_TRY($4)], [AC_LANG_FUNC_LINK_TRY($1)])] [m4_copy([AC_LANG_BOOL_COMPILE_TRY($4)], [AC_LANG_BOOL_COMPILE_TRY($1)])] [m4_copy([AC_LANG_INT_SAVE($4)], [AC_LANG_INT_SAVE($1)])] [m4_copy([_AC_LANG_IO_PROGRAM($4)], [_AC_LANG_IO_PROGRAM($1)])])]) ## ----------------------- ## ## 2. Producing programs. ## ## ----------------------- ## # AC_LANG_CONFTEST(BODY) # ---------------------- # Save the BODY in `conftest.$ac_ext'. Add a trailing new line. AC_DEFUN([AC_LANG_CONFTEST], [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) # AC_LANG_CONFTEST()(BODY) # ------------------------ # Default implementation of AC_LANG_CONFTEST. 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_SOURCE()(BODY) # ---------------------- # Default implementation of AC_LANG_SOURCE. m4_define([AC_LANG_SOURCE()], [$1]) # 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_IO_PROGRAM # ----------------------------------- # Produce valid source for the current language that creates # a file. (This is used when detecting whether executables # work, e.g. to detect cross-compiling.) AC_DEFUN([_AC_LANG_IO_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. ## ## -------------------------------------------- ## # 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_DO_VAR(ac_link); then ac_no_link=no ]m4_defn([_AC_COMPILER_EXEEXT])[ else rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.o conftest.obj conftest.dSYM 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 # --------------------------------- # # 3a. 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. # # - *.map, *.inf # Created by the Green Hills compiler. # # - *.dSYM # Directory created on Mac OS X Leopard. # _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 | *.map | *.inf | *.dSYM]) # _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 add for # creating executables (see _AC_COMPILER_EXEEXT's comments). # # 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'. # b.out is created by i960 compilers. # # Start with the most likely output file names, but: # 1) Beware the clever `test -f' on Cygwin, try the DOS-like .exe names # before the counterparts without the extension. # 2) The algorithm is not robust to junk in `.', hence go to wildcards # (conftest.*) only as a last resort. # 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. # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. # 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=`AS_ECHO(["$ac_link"]) | sed ['s/ -o *conftest[^ ]*//']` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in _AC_COMPILER_EXEEXT_REJECT ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles AS_IF([_AC_DO_VAR(ac_link_default)], [# Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in _AC_COMPILER_EXEEXT_REJECT ) ;; [[ab]].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= ], [ac_file='']) AC_MSG_RESULT([$ac_file]) AS_IF([test -z "$ac_file"], [_AC_MSG_LOG_CONFTEST AC_MSG_FAILURE([_AC_LANG compiler cannot create executables], 77)]) ac_exeext=$ac_cv_exeext ])# _AC_COMPILER_EXEEXT_DEFAULT # _AC_COMPILER_EXEEXT_WORKS # ------------------------- # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # # It is not sufficient to run a no-op program -- this succeeds and gives # a false negative when cross-compiling for the compute nodes on the # IBM Blue Gene/L. Instead, _AC_COMPILER_EXEEXT calls _AC_LANG_IO_PROGRAM # to create a program that writes to a file, which is sufficient to # detect cross-compiling on Blue Gene. Note also that AC_COMPUTE_INT # requires programs that create files when not cross-compiling, so it # is safe and not a bad idea to check for this capability in general. m4_define([_AC_COMPILER_EXEEXT_WORKS], [# Check that 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]) # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if _AC_DO_TOKENS([./$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 that 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_DO_VAR(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" : ['[^.]*\(\..*\)']` 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 not to destroy user files. # # Must be run before _AC_COMPILER_OBJEXT because _AC_COMPILER_EXEEXT_DEFAULT # checks whether the compiler works. # # Do not rename this macro; Automake decides whether EXEEXT is used # by checking whether `_AC_COMPILER_EXEEXT' has been expanded. # # See _AC_COMPILER_EXEEXT_WORKS for why we call _AC_LANG_IO_PROGRAM. m4_define([_AC_COMPILER_EXEEXT], [AC_LANG_CONFTEST([_AC_LANG_IO_PROGRAM]) ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" _AC_COMPILER_EXEEXT_DEFAULT _AC_COMPILER_EXEEXT_WORKS rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.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_DO_VAR(ac_compile)], [for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; 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=]) ac_[]_AC_LANG_ABBREV[]_werror_flag=yes])# AC_LANG_WERROR ��������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/Makefile.in������������������������������������������������0000644�0001750�0001750�00000045475�11233217354�020710� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # Make Autoconf library. # Copyright (C) 2001, 2002, 2006 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 3 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, see <http://www.gnu.org/licenses/>. # Freeze M4 files. # Copyright (C) 2002, 2004, 2006, 2007, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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.am $(srcdir)/Makefile.in subdir = lib/autoconf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(autoconflibdir)" \ "$(DESTDIR)$(autoconflibdir)" DATA = $(dist_autoconflib_DATA) $(nodist_autoconflib_DATA) ETAGS = etags CTAGS = ctags 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ 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 erlang.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 AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg # Do not use AUTOM4TE here, since maint.mk (my-distcheck) # checks if we are independent of Autoconf by defining AUTOM4TE (and # others) to `false'. Autoconf provides autom4te, so that doesn't # apply to us. MY_AUTOM4TE = \ autom4te_perllibdir='$(top_srcdir)'/lib \ AUTOM4TE_CFG='$(AUTOM4TE_CFG)' $(top_builddir)/bin/autom4te \ -B '$(top_builddir)'/lib -B '$(top_srcdir)'/lib # keep ` ' # 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 = $(top_builddir)/bin/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/erlang.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: $(srcdir)/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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/autoconf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/autoconf/Makefile .PRECIOUS: 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 $(am__aclocal_m4_deps): install-dist_autoconflibDATA: $(dist_autoconflib_DATA) @$(NORMAL_INSTALL) test -z "$(autoconflibdir)" || $(MKDIR_P) "$(DESTDIR)$(autoconflibdir)" @list='$(dist_autoconflib_DATA)'; test -n "$(autoconflibdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(autoconflibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(autoconflibdir)" || exit $$?; \ done uninstall-dist_autoconflibDATA: @$(NORMAL_UNINSTALL) @list='$(dist_autoconflib_DATA)'; test -n "$(autoconflibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(autoconflibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(autoconflibdir)" && rm -f $$files install-nodist_autoconflibDATA: $(nodist_autoconflib_DATA) @$(NORMAL_INSTALL) test -z "$(autoconflibdir)" || $(MKDIR_P) "$(DESTDIR)$(autoconflibdir)" @list='$(nodist_autoconflib_DATA)'; test -n "$(autoconflibdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(autoconflibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(autoconflibdir)" || exit $$?; \ done uninstall-nodist_autoconflibDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_autoconflib_DATA)'; test -n "$(autoconflibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(autoconflibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(autoconflibdir)" && rm -f $$files 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: for dir in "$(DESTDIR)$(autoconflibdir)" "$(DESTDIR)$(autoconflibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-am info-am: install-data-am: install-dist_autoconflibDATA \ install-nodist_autoconflibDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-nodist_autoconflibDATA .MAKE: check-am install-am install-strip .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-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nodist_autoconflibDATA install-pdf install-pdf-am \ install-ps install-ps-am 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-nodist_autoconflibDATA check-local: check-forbidden-patterns autoconf.m4f: $(autoconf_m4f_dependencies) $(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 an 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: |" <forbidden.log >&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.64_2.64+dfsg.orig/lib/autoconf/autoheader.m4����������������������������������������������0000644�0001750�0001750�00000010031�11232571644�021206� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Interface with autoheader. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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(_m4_expand([$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 ]_m4_expand([$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.64_2.64+dfsg.orig/lib/autoconf/autoupdate.m4����������������������������������������������0000644�0001750�0001750�00000013071�11202536433�021241� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Interface with autoupdate. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2003, 2004, 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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. ## ---------------------------------- ## ## Macros to define obsolete macros. ## ## ---------------------------------- ## # AU_DEFINE(NAME, CODE) # --------------------- # Define the macro NAME so that it expand to CODE only when # autoupdate is running. This is achieved with traces in # autoupdate itself, so this macro expands to nothing. # m4_define([AU_DEFINE], []) # 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 when # autoupdate is run, emit MESSAGE as a warning and include it in # the updated configure.ac file. # # Also define NAME as a macro which code is NEW-CODE. # # This allows sharing the same code for both supporting obsoleted macros, # and to update a configure.ac. # See the end of `autoupdate.in' for a longer description. m4_define([AU_DEFUN], [# This is what autoupdate's m4 run will expand. It fires # the warning (with _au_warn_XXX), outputs it into the # updated configure.ac (with AC_DIAGNOSE), and then outputs # the replacement expansion. AU_DEFINE([$1], [m4_ifval([$3], [_au_warn_$1([$3])AC_DIAGNOSE([obsolete], [$3])d[]nl ])dnl $2]) # This is an auxiliary macro that is also run when # autoupdate runs m4. It simply calls m4_warning, but # we need a wrapper so that each warning is emitted only # once. We break the quoting in m4_warning's argument in # order to expand this macro's arguments, not AU_DEFUN's. AU_DEFINE([_au_warn_$1], [m4_warning($][@)dnl m4_define([_au_warn_$1], [])]) # Finally, this is the expansion that is picked up by # autoconf. It tells the user to run autoupdate, and # then outputs the replacement expansion. We do not care # about autoupdate's warning because that contains # information on what to do *after* running autoupdate. AC_DEFUN([$1], [AC_DIAGNOSE([obsolete], [The macro `$1' is obsolete. You should run autoupdate.])dnl $2])]) # 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. # # Moreover, we have to take care that calls without parameters are # expanded to calls without parameters, not with one empty parameter. # This is not only an aesthetical improvement of autoupdate, it also # matters with poorly written macros which test for $# = 0. # m4_define([AU_ALIAS], [AU_DEFUN([$1], _AU_ALIAS_BODY([$], [$2]))]) # The body for the AU_DEFUN above should look like: # [m4_if($#, 0, [NEW-NAME], [NEW-NAME($@)])] # Thus the helper macro is: m4_define([_AU_ALIAS_BODY], [[m4_if($1#, 0, [$2], [$2($1@)])]]) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/general.m4�������������������������������������������������0000644�0001750�0001750�00000307421�11232570162�020510� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Parameterized macros. m4_define([_AC_COPYRIGHT_YEARS], [Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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. # # - SHELL_FN # Shell functions. # # - 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(SHELL_FN)], 250) 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 shell functions. ## ## ----------------------------- ## # AC_REQUIRE_SHELL_FN(NAME-TO-CHECK, COMMENT, BODY, [DIVERSION = SHELL_FN] # ------------------------------------------------------------------------ # Same as AS_REQUIRE_SHELL_FN except that the default diversion comes # later in the script (speeding up configure --help and --version). AC_DEFUN([AC_REQUIRE_SHELL_FN], [AS_REQUIRE_SHELL_FN([$1], [$2], [$3], m4_default_quoted([$4], [SHELL_FN]))]) ## ----------------------------- ## ## Implementing Autoconf loops. ## ## ----------------------------- ## # AU::AC_FOREACH(VARIABLE, LIST, EXPRESSION) # ------------------------------------------ AU_DEFUN([AC_FOREACH], [[m4_foreach_w($@)]]) AC_DEFUN([AC_FOREACH], [m4_foreach_w($@)dnl AC_DIAGNOSE([obsolete], [The macro `AC_FOREACH' is obsolete. You should run autoupdate.])]) ## ----------------------------------- ## ## 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 view, 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], [URL]) # --------------------------------------------------------------------- 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])]) m4_ifndef([AC_PACKAGE_URL], [m4_define([AC_PACKAGE_URL], m4_if([$5], [], [m4_if(m4_index([$1], [GNU ]), [0], [[http://www.gnu.org/software/]m4_defn([AC_PACKAGE_TARNAME])[/]])], [[$5]]))]) ]) # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER], # [FILTER = m4_newline]) # ------------------------------------------------------ # Emit TEXT, a copyright notice, in the top of `configure' and in # --version output. Macros in TEXT are evaluated once. Process # the --version output through FILTER (m4_newline, m4_do, and # m4_copyright_condense are common filters). m4_define([AC_COPYRIGHT], [AS_COPYRIGHT([$1])[]]dnl [m4_divert_text(m4_default_quoted([$2], [VERSION_USER]), [m4_default([$3], [m4_newline])([$1])])])# 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_undefine([AC_PREREQ]) m4_copy([m4_version_prereq], [AC_PREREQ]) # AC_AUTOCONF_VERSION # ------------------- # The current version of Autoconf parsing this file. m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION]) ## ---------------- ## ## 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 # --------------- # Provide useful headers; override the HEADER-COMMENT created by M4sh. m4_define([_AC_INIT_NOTICE], [m4_cleardivert([HEADER-COMMENT])]dnl [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_PACKAGE_BUGREPORT>.])]) ]) # _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(m4_defn([_AC_COPYRIGHT_YEARS]), [VERSION_FSF], [ m4_copyright_condense])dnl AC_COPYRIGHT( [This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it.], [VERSION_FSF], [m4_echo])]) # File Descriptors # ---------------- # Set up the file descriptors used by `configure'. # File descriptor usage: # 0 standard input (/dev/null) # 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 # AS_ORIGINAL_STDIN_FD original standard input (still open) # # stdin is /dev/null because checks that run programs may # inadvertently run interactive ones, which would stop configuration # until someone typed an EOF. m4_define([AS_MESSAGE_FD], 6) m4_define([AS_ORIGINAL_STDIN_FD], 7) # 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 exec AS_ORIGINAL_STDIN_FD<&0 </dev/null AS_MESSAGE_FD>&1 # 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= AC_SUBST([SHELL])dnl AC_SUBST([PATH_SEPARATOR])dnl # 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 AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])])dnl m4_divert_pop([DEFAULTS])dnl m4_wrap_lifo([m4_divert_text([DEFAULTS], [ac_subst_vars='m4_set_dump([_AC_SUBST_VARS], m4_newline)' ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])' ac_user_opts=' enable_option_checking m4_ifdef([_AC_USER_OPTS], [m4_defn([_AC_USER_OPTS]) ])' m4_ifdef([_AC_PRECIOUS_VARS], [_AC_ARG_VAR_STORE[]dnl _AC_ARG_VAR_VALIDATE[]dnl ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])']) m4_ifdef([_AC_LIST_SUBDIRS], [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl ])])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 file name 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_DIRCHECK # ----------------- # Set ac_pwd, and sanity-check it and the source and installation directories. # # (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.) # AC_DEFUN([_AC_INIT_DIRCHECK], [m4_divert_push([PARSE_ARGS])dnl ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || AC_MSG_ERROR([working directory cannot be determined]) test "X$ac_ls_di" = "X$ac_pwd_ls_di" || AC_MSG_ERROR([pwd does not report name of working directory]) m4_divert_pop([PARSE_ARGS])dnl ])# _AC_INIT_DIRCHECK # _AC_INIT_SRCDIR # --------------- # Compute `srcdir' based on `$ac_unique_file'. # # (We have to AC_DEFUN it, since we use AC_REQUIRE.) # AC_DEFUN([_AC_INIT_SRCDIR], [AC_REQUIRE([_AC_INIT_DIRCHECK])dnl 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 the parent directory. ac_confdir=`AS_DIRNAME(["$as_myself"])` 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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir]) fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg]) pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac 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 ac_unrecognized_opts= ac_unrecognized_sep= # 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. # (The list follows the same order as the GNU Coding Standards.) AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl AC_SUBST([datarootdir], ['${prefix}/share'])dnl AC_SUBST([datadir], ['${datarootdir}'])dnl AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl AC_SUBST([localstatedir], ['${prefix}/var'])dnl AC_SUBST([includedir], ['${prefix}/include'])dnl AC_SUBST([oldincludedir], ['/usr/include'])dnl AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], ['${datarootdir}/doc/${PACKAGE_TARNAME}'], ['${datarootdir}/doc/${PACKAGE}'])])dnl AC_SUBST([infodir], ['${datarootdir}/info'])dnl AC_SUBST([htmldir], ['${docdir}'])dnl AC_SUBST([dvidir], ['${docdir}'])dnl AC_SUBST([pdfdir], ['${docdir}'])dnl AC_SUBST([psdir], ['${docdir}'])dnl AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl AC_SUBST([localedir], ['${datarootdir}/locale'])dnl AC_SUBST([mandir], ['${datarootdir}/man'])dnl ac_prev= ac_dashdash= 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 case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -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) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; _AC_INIT_PARSE_ENABLE([disable]) -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; _AC_INIT_PARSE_ENABLE([enable]) -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 ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$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=: ;; _AC_INIT_PARSE_ENABLE([with]) _AC_INIT_PARSE_ENABLE([without]) --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. case $ac_envvar in #( '' | [[0-9]]* | *[[!_$as_cr_alnum]]* ) AC_MSG_ERROR([invalid variable name: `$ac_envvar']) ;; esac 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 if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) AC_MSG_ERROR([unrecognized options: $ac_unrecognized_opts]) ;; *) AC_MSG_WARN( [unrecognized options: $ac_unrecognized_opts]) ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[[^/]]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [[\\/$]]* | ?:[[\\/]]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]) 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_PARSE_ENABLE(OPTION-NAME) # ---------------------------------- # A trivial front-end for _AC_INIT_PARSE_ENABLE2. # m4_define([_AC_INIT_PARSE_ENABLE], [m4_bmatch([$1], [^with], [_AC_INIT_PARSE_ENABLE2([$1], [with])], [_AC_INIT_PARSE_ENABLE2([$1], [enable])])]) # _AC_INIT_PARSE_ENABLE2(OPTION-NAME, POSITIVE-NAME) # -------------------------------------------------- # Handle an `--enable' or a `--with' option. # # OPTION-NAME is `enable', `disable', `with', or `without'. # POSITIVE-NAME is the corresponding positive variant, i.e. `enable' or `with'. # # Positive variant of the option is recognized by the condition # OPTION-NAME == POSITIVE-NAME . # m4_define([_AC_INIT_PARSE_ENABLE2], [-$1-* | --$1-*) ac_useropt=`expr "x$ac_option" : 'x-*$1-\(m4_if([$1], [$2], [[[^=]]], [.])*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : "[.*[^-+._$as_cr_alnum]]" >/dev/null && AC_MSG_ERROR( [invalid ]m4_if([$2], [with], [package], [feature])[ name: $ac_useropt]) ac_useropt_orig=$ac_useropt ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-+.]]/_/g'` case $ac_user_opts in *" "$2_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval $2_$ac_useropt=m4_if([$1], [$2], [\$ac_optarg], [no]) ;;dnl ]) # _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 \`..'] Installation directories: ]AS_HELP_STRING([--prefix=PREFIX], [install architecture-independent files in PREFIX [$ac_default_prefix]]) AS_HELP_STRING([--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] --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] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] ]AS_HELP_STRING([--docdir=DIR], [documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME], [AC_PACKAGE_TARNAME], [PACKAGE])@:>@)[ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _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 Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [<AC_PACKAGE_BUGREPORT>], [the package provider]).dnl m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [ AC_PACKAGE_NAME home page: <AC_PACKAGE_URL>.])dnl m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [ General help using GNU software: <http://www.gnu.org/gethelp/>.])]) _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue _AC_SRCDIRS(["$ac_dir"]) cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested 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 else AC_MSG_WARN([no configuration information is in $ac_dir]) fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status 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 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 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 cat >config.log <<_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 exec AS_MESSAGE_LOG_FD>>config.log 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. Initiates confdefs.h # 5. Loads site and cache files 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_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=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) AS_VAR_APPEND([ac_configure_args0], [" '$ac_arg'"]) ;; 2) AS_VAR_APPEND([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 AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"]) ;; 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: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 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=\$$ac_var case $ac_val in *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac AS_ECHO(["$ac_var='\''$ac_val'\''"]) done | sort echo if test -n "$ac_subst_files"; then AS_BOX([File substitutions.]) echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac AS_ECHO(["$ac_var='\''$ac_val'\''"]) done | sort echo fi if test -s confdefs.h; then AS_BOX([confdefs.h.]) echo cat confdefs.h echo fi test "$ac_signal" != 0 && AS_ECHO(["$as_me: caught signal $ac_signal"]) AS_ECHO(["$as_me: exit $exit_status"]) } >&AS_MESSAGE_LOG_FD rm -f core *.core core.conftest.* && rm -f -r 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 -f -r conftest* confdefs.h dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file dnl containing less than 14 bytes (including the newline). AS_ECHO(["/* confdefs.h */"]) > confdefs.h # Predefined preprocessor variables. AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"], [Define to the full name of this package.])dnl AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"], [Define to the one symbol short name of this package.])dnl AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"], [Define to the version of this package.])dnl AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"], [Define to the full name and version of this package.])dnl AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"], [Define to the address where bug reports for this package should be sent.])dnl AC_DEFINE_UNQUOTED([PACKAGE_URL], ["$PACKAGE_URL"], [Define to the home page for this package.]) # Let the site file select an alternate cache file if it wants to. AC_SITE_LOAD AC_CACHE_LOAD 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], [TARNAME], [URL]) # ---------------------------------------------------------- # Include the user macro files, prepare the diversions, and output the # preamble of the `configure' script. # # If BUG-REPORT is omitted, do without (unless the user previously # defined the m4 macro AC_PACKAGE_BUGREPORT). If TARNAME is omitted, # use PACKAGE to seed it. If URL is omitted, use # `http://www.gnu.org/software/TARNAME/' if PACKAGE begins with `GNU', # otherwise, do without. # # 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[]dnl AS_PREPARE[]dnl m4_divert_push([KILL]) m4_ifval([$2], [_AC_INIT_PACKAGE($@)]) _AC_INIT_DEFAULTS _AC_INIT_PARSE_ARGS _AC_INIT_DIRCHECK _AC_INIT_SRCDIR _AC_INIT_HELP _AC_INIT_VERSION _AC_INIT_CONFIG_LOG _AC_INIT_PREPARE _AC_INIT_NOTICE _AC_INIT_COPYRIGHT m4_divert_text([SHELL_FN], [ m4_text_box([Autoconf initialization.])]) m4_divert_pop m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl dnl 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 _AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl _AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl _AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl dnl AC_LANG_PUSH(C) ]) ## ------------------------------------------------------------- ## ## Selecting optional features, working with optional software. ## ## ------------------------------------------------------------- ## # AC_PRESERVE_HELP_ORDER # ---------------------- # Emit help strings in the order given, rather than grouping all --enable-FOO # and all --with-BAR. AC_DEFUN([AC_PRESERVE_HELP_ORDER], [m4_divert_once([HELP_ENABLE], [[ Optional Features and Packages: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]]) m4_define([_m4_divert(HELP_ENABLE)], _m4_divert(HELP_WITH)) ])# AC_PRESERVE_HELP_ORDER # _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ------------------------------------------------------------------- # Common code for AC_ARG_ENABLE and AC_ARG_WITH. # OPTION is either "enable" or "with". # m4_define([_AC_ENABLE_IF], [@%:@ Check whether --$1-$2 was given. _AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-.], [__]), [$3], [$4]) ]) m4_define([_AC_ENABLE_IF_ACTION], [m4_append_uniq([_AC_USER_OPTS], [$1_$2], [ ])dnl AS_IF([test "${$1_$2+set}" = set], [$1val=$$1_$2; $3], [$4])dnl ]) # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ------------------------------------------------------------------------ AC_DEFUN([AC_ARG_ENABLE], [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER], [], [m4_divert_once([HELP_ENABLE], [[ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --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 _AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl ])# AC_ARG_ENABLE AU_DEFUN([AC_ENABLE], [AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])]) # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE]) # -------------------------------------------------------------------- AC_DEFUN([AC_ARG_WITH], [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER], [], [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 _AC_ENABLE_IF([with], [$1], [$3], [$4])dnl ])# AC_ARG_WITH AU_DEFUN([AC_WITH], [AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])]) # AC_DISABLE_OPTION_CHECKING # -------------------------------------------------------------------- AC_DEFUN([AC_DISABLE_OPTION_CHECKING], [m4_divert_once([DEFAULTS], [enable_option_checking=no]) ])# AC_DISABLE_OPTION_CHECKING ## ----------------------------------------- ## ## Remembering variables for reconfiguring. ## ## ----------------------------------------- ## # 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_text([HELP_VAR], [AS_HELP_STRING([$1], [$2], [ ])])], [$0($1)])dnl AC_SUBST([$1])dnl _AC_ARG_VAR_PRECIOUS([$1])dnl ])# AC_ARG_VAR # _AC_ARG_VAR_PRECIOUS(VARNAME) # ----------------------------- # Declare VARNAME is precious. m4_define([_AC_ARG_VAR_PRECIOUS], [m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [ ])dnl ]) # _AC_ARG_VAR_STORE # ----------------- # 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_STORE], [m4_divert_text([PARSE_ARGS], [for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done])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], [m4_divert_text([INIT_PREPARE], [# Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; 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 # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2) ac_cache_corrupted=: else AS_MESSAGE([warning: ignoring whitespace changes in `$ac_var' since the previous run:], 2) eval $ac_var=\$ac_old_val fi AS_MESSAGE([ former value: `$ac_old_val'], 2) AS_MESSAGE([ current value: `$ac_new_val'], 2) fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`AS_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. *) AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"]) ;; esac fi done if $ac_cache_corrupted; then AS_MESSAGE([error: in `$ac_pwd':], 2) 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])dnl ])# _AC_ARG_VAR_VALIDATE ## ---------------------------- ## ## 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 $. # By default was `s,x,x', remove it if useless. [ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'] program_transform_name=`AS_ECHO(["$program_transform_name"]) | sed "$ac_script"` ])# 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 for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then AC_MSG_ERROR([cannot find install-sh, install.sh, or shtool in $1]) fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 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. AC_DEFUN([AC_CONFIG_MACRO_DIR], []) ## --------------------- ## ## Requiring aux files. ## ## --------------------- ## # AC_REQUIRE_AUX_FILE(FILE) # ------------------------- # This macro does nothing, it's a hook to be read with `autoconf --trace'. # It announces FILE is required in the auxdir. m4_define([AC_REQUIRE_AUX_FILE], [AS_LITERAL_IF([$1], [], [m4_fatal([$0: requires a literal argument])])]) ## ----------------------------------- ## ## 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], [case $ac_cv_$1 in *-*-*) ;; *) AC_MSG_ERROR([invalid value of canonical $1]);; esac AC_SUBST([$1], [$ac_cv_$1])dnl ac_save_IFS=$IFS; IFS='-' set x $ac_cv_$1 shift AC_SUBST([$1_cpu], [$[1]])dnl AC_SUBST([$1_vendor], [$[2]])dnl shift; shift [# Remember, the first character of IFS is used to create $]*, # except with old shells: $1_os=$[*] IFS=$ac_save_IFS case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac AC_SUBST([$1_os])dnl ])# _AC_CANONICAL_SPLIT # AC_CANONICAL_BUILD # ------------------ AC_DEFUN_ONCE([AC_CANONICAL_BUILD], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_REQUIRE_AUX_FILE([config.sub])dnl AC_REQUIRE_AUX_FILE([config.guess])dnl m4_divert_once([HELP_CANON], [[ System types: --build=BUILD configure for building on BUILD [guessed]]])dnl # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub]) AC_CACHE_CHECK([build system type], [ac_cv_build], [ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && AC_MSG_ERROR([cannot guess build type; you must specify one]) ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_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_once([HELP_CANON], [[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])dnl AC_CACHE_CHECK([host system type], [ac_cv_host], [if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed]) fi ]) _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_once([HELP_CANON], [[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl AC_CACHE_CHECK([target system type], [ac_cv_target], [if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed]) fi ]) _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 an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue 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, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) AC_MSG_WARN([cache variable $ac_var contains a newline]) ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) AS_UNSET([$ac_var]) ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}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 ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"] ;; esac | sort )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 [' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end 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" && AC_MSG_NOTICE([updating cache $cache_file]) cat confcache >$cache_file else AC_MSG_NOTICE([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], [AS_LITERAL_IF([$1], [m4_if(m4_index(m4_quote($1), [_cv_]), [-1], [AC_DIAGNOSE([syntax], [$0($1, ...): suspicious cache-id, must contain _cv_ to be cached])])])dnl m4_if(m4_index([$2], [AC_DEFINE]), [-1], [], [AC_DIAGNOSE([syntax], [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl [where no actions should be taken])])dnl m4_if(m4_index([$2], [AC_SUBST]), [-1], [], [AC_DIAGNOSE([syntax], [$0($1, ...): suspicious presence of an AC_SUBST 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 AS_LITERAL_IF([$2], [AC_MSG_RESULT([$$2])], [AS_VAR_COPY([ac_res], [$2]) AC_MSG_RESULT([$ac_res])])dnl ]) # _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION, # [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS]) # ------------------------------------------------------------- AC_DEFUN([_AC_CACHE_CHECK_INT], [AC_CACHE_CHECK([$1], [$2], [AC_COMPUTE_INT([$2], [$3], [$4], [$5])]) ])# _AC_CACHE_CHECK_INT ## ---------------------- ## ## Defining CPP symbols. ## ## ---------------------- ## # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL) # ------------------------------------------- # Used by --trace to collect the list of AC_DEFINEd macros. m4_define([AC_DEFINE_TRACE_LITERAL], [m4_pattern_allow([^$1$])dnl AS_IDENTIFIER_IF([$1], [], [m4_warn([syntax], [AC_DEFINE: not an identifier: $1])])dnl ])# 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. CPP-SYMBOL must not include any parameters. m4_define([AC_DEFINE_TRACE], [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL(_m4_expand([$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_Q([_$0], $@)]) # _AC_DEFINE(STRING) # ------------------ # Append the pre-expanded STRING and a newline to confdefs.h, as if by # a quoted here-doc. m4_define([_AC_DEFINE], [AS_ECHO(["AS_ESCAPE([[$1]])"]) >>confdefs.h]) # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION]) # ---------------------------------------------------- # Similar, but perform shell substitutions $ ` \ once on VALUE, as # in an unquoted here-doc. m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([_$0], $@)]) # _AC_DEFINE_UNQUOTED(STRING) # --------------------------- # Append the pre-expanded STRING and a newline to confdefs.h, as if # with an unquoted here-doc, but avoiding a fork in the common case of # no backslash, no command substitution, no complex variable # substitution, and no quadrigraphs. m4_define([_AC_DEFINE_UNQUOTED], [m4_if(m4_bregexp([$1], [\\\|`\|\$(\|\${\|@]), [-1], [AS_ECHO(["AS_ESCAPE([$1], [""])"]) >>confdefs.h], [cat >>confdefs.h <<_ACEOF [$1] _ACEOF])]) # _AC_DEFINE_Q(MACRO, VARIABLE, [VALUE], [DESCRIPTION]) # ----------------------------------------------------- # Internal function that performs common elements of AC_DEFINE{,_UNQUOTED}. # MACRO must take one argument, which is the fully expanded string to # append to confdefs.h as if by a possibly-quoted here-doc. # # m4_index is roughly 5 to 8 times faster than m4_bpatsubst, so we use # m4_format rather than regex to grab prefix up to first (). AC_name # is defined with over-quotation, so that we can avoid m4_defn; this # is only safe because the name should not contain $. # # Guarantee a match in m4_index, so as to avoid a bug with precision # -1 in m4_format in older m4. m4_define([_AC_DEFINE_Q], [m4_pushdef([AC_name], m4_format([[[%.*s]]], m4_index([$2(], [(]), [$2]))]dnl [AC_DEFINE_TRACE(AC_name)]dnl [m4_cond([m4_index([$3], [ ])], [-1], [], [AS_LITERAL_IF([$3], [m4_bregexp([[$3]], [[^\\] ], [-])])], [], [], [m4_warn([syntax], [AC_DEFINE]m4_if([$1], [_AC_DEFINE], [], [[_UNQUOTED]])[: `$3' is not a valid preprocessor define value])])]dnl [m4_ifval([$4], [AH_TEMPLATE(AC_name, [$4]) ])_m4_popdef([AC_name])]dnl [$1(m4_expand([[@%:@define] $2 ]m4_if([$#], 2, 1, [$3], [], [/**/], [[$3]]))) ]) ## -------------------------- ## ## Setting output variables. ## ## -------------------------- ## # AC_SUBST_TRACE(VARIABLE) # ------------------------ # This macro is used with --trace to collect the list of substituted variables. m4_define([AC_SUBST_TRACE]) # AC_SUBST(VARIABLE, [VALUE]) # --------------------------- # Create an output variable from a shell VARIABLE. If VALUE is given # assign it to VARIABLE. Use `""' if you want to set VARIABLE to an # empty value, not an empty second argument. # m4_define([AC_SUBST], [AS_IDENTIFIER_IF([$1], [], [m4_fatal([$0: `$1' is not a valid shell variable name])])]dnl [AC_SUBST_TRACE([$1])]dnl [m4_pattern_allow([^$1$])]dnl [m4_ifvaln([$2], [$1=$2])[]]dnl [m4_set_add([_AC_SUBST_VARS], [$1])])# AC_SUBST # AC_SUBST_FILE(VARIABLE) # ----------------------- # Read the comments of the preceding macro. m4_define([AC_SUBST_FILE], [m4_pattern_allow([^$1$])dnl 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_LOG([checking $1]) _AS_ECHO_N([checking $1... ]); }dnl ]) # AC_MSG_RESULT(RESULT) # --------------------- m4_define([AC_MSG_RESULT], [{ _AS_ECHO_LOG([result: $1]) _AS_ECHO([$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], [{ AS_MESSAGE([error: in `$ac_pwd':], 2) AC_MSG_ERROR([$1 See `config.log' for more details.], [$2]); }]) # _AC_MSG_LOG_CONFTEST # -------------------- m4_define([_AC_MSG_LOG_CONFTEST], [AS_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_MSG_RESULT_UNQUOTED(RESULT) # ---------------------------------- # No escaping, so it performed also backtick substitution. AU_DEFUN([AC_MSG_RESULT_UNQUOTED], [_AS_ECHO_UNQUOTED([$as_me:${as_lineno-$LINENO}: result: $1], AS_MESSAGE_LOG_FD) _AS_ECHO_UNQUOTED([$1])[]dnl ]) # 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. The return # code is 0 if COMMAND succeeded, so that it can be used directly in AS_IF # constructs. AC_DEFUN([_AC_RUN_LOG], [{ { $2; } >&AS_MESSAGE_LOG_FD ($1) 2>&AS_MESSAGE_LOG_FD ac_status=$? _AS_ECHO_LOG([\$? = $ac_status]) test $ac_status = 0; }]) # _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. # The return code is 0 if COMMAND succeeded, so that it can be used directly # in AS_IF constructs. AC_DEFUN([_AC_RUN_LOG_STDERR], [{ { $2; } >&AS_MESSAGE_LOG_FD ($1) 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&AS_MESSAGE_LOG_FD mv -f conftest.er1 conftest.err fi _AS_ECHO_LOG([\$? = $ac_status]) test $ac_status = 0; }]) # _AC_RUN_LOG_LIMIT(COMMAND, LOG-COMMANDS, [LINES]) # ------------------------------------------------- # Like _AC_RUN_LOG, but only log LINES lines from stderr, # defaulting to 10 lines. AC_DEFUN([_AC_RUN_LOG_LIMIT], [{ { $2; } >&AS_MESSAGE_LOG_FD ($1) 2>conftest.err ac_status=$? if test -s conftest.err; then sed 'm4_default([$3], [10])a\ ... rest of stderr output deleted ... m4_default([$3], [10])q' conftest.err >conftest.er1 cat conftest.er1 >&AS_MESSAGE_LOG_FD rm -f conftest.er1 conftest.err fi _AS_ECHO_LOG([\$? = $ac_status]) test $ac_status = 0; }]) # _AC_DO_ECHO(COMMAND) # -------------------- # Echo COMMAND. This is designed to be used just before evaluating COMMAND. AC_DEFUN([_AC_DO_ECHO], [m4_if([$1], [$ac_try], [], [ac_try="$1" ])]dnl dnl If the string contains '\"', '`', or '\\', then just echo it rather dnl than expanding it. This is a hack, but it is safer, while also dnl typically expanding simple substrings like '$CC', which is what we want. dnl dnl Much of this macro body is quoted, to work around misuses like dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))', dnl which underquotes the 3rd arg and would misbehave if we didn't quote here. dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse dnl underquoting misuses, such as dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'. dnl We normally wouldn't bother with this kind of workaround for invalid code dnl but this change was put in just before Autoconf 2.60 and we wanted to dnl minimize the integration hassle. [[case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""] AS_ECHO(["$ac_try_echo"])]) # _AC_DO(COMMAND) # --------------- # Eval COMMAND, save the exit status in ac_status, and log it. # For internal use only. AC_DEFUN([_AC_DO], [_AC_RUN_LOG([eval "$1"], [_AC_DO_ECHO([$1])])]) # _AC_DO_STDERR(COMMAND) # ---------------------- # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND. AC_DEFUN([_AC_DO_STDERR], [_AC_RUN_LOG_STDERR([eval "$1"], [_AC_DO_ECHO([$1])])]) # _AC_DO_VAR(VARIABLE) # -------------------- # Evaluate "$VARIABLE", which should be a valid shell command. # The purpose of this macro is to write "configure:123: command line" # into config.log for every test run. AC_DEFUN([_AC_DO_VAR], [_AC_DO([$$1])]) # _AC_DO_TOKENS(COMMAND) # ---------------------- # Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of # tokens of the shell command language. AC_DEFUN([_AC_DO_TOKENS], [{ ac_try='$1' _AC_DO([$ac_try]); }]) # _AC_DO_LIMIT(COMMAND, [LINES]) # ------------------------------ # Like _AC_DO, but limit the amount of stderr lines logged to LINES. # For internal use only. AC_DEFUN([_AC_DO_LIMIT], [_AC_RUN_LOG_LIMIT([eval "$1"], [_AC_DO_ECHO([$1])], [$2])]) # _AC_EVAL(COMMAND) # ----------------- # Eval COMMAND, save the exit status in ac_status, and log it. # Unlike _AC_DO, this macro mishandles quoted arguments in some cases. # It is present only for backward compatibility with previous Autoconf versions. AC_DEFUN([_AC_EVAL], [_AC_RUN_LOG([eval $1], [eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$1\""])]) # _AC_EVAL_STDERR(COMMAND) # ------------------------ # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND. # Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases. # It is present only for backward compatibility with previous Autoconf versions. AC_DEFUN([_AC_EVAL_STDERR], [_AC_RUN_LOG_STDERR([eval $1], [eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$1\""])]) # AC_TRY_EVAL(VARIABLE) # --------------------- # Evaluate $VARIABLE, which should be a valid shell command. # The purpose of this macro is to write "configure:123: command line" # into config.log for every test run. # # The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and # undocumented, and should not be used. # They may be removed or their API changed in a future release. # Autoconf itself no longer uses these two macros; they are present # only for backward compatibility with previous versions of Autoconf. # Not every shell command will work due to problems with eval # and quoting, and the rules for exactly what does work are tricky. # Worse, due to double-expansion during evaluation, arbitrary unintended # shell commands could be executed in some situations. AC_DEFUN([AC_TRY_EVAL], [_AC_EVAL([$$1])]) # AC_TRY_COMMAND(COMMAND) # ----------------------- # Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of # tokens of the shell command language. # This macro should not be used; see the comments under AC_TRY_EVAL for why. 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], [AS_ECHO(["$as_me:${as_lineno-$LINENO}: AS_ESCAPE([$1])"])])]) ## ------------------------ ## ## Examining declarations. ## ## ------------------------ ## # _AC_PREPROC_IFELSE_BODY # ----------------------- # Shell function body for _AC_PREPROC_IFELSE. m4_define([_AC_PREPROC_IFELSE_BODY], [ AS_LINENO_PUSH([$[]1]) AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null && { test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err }], [ac_retval=0], [_AC_MSG_LOG_CONFTEST ac_retval=1]) AS_LINENO_POP return $ac_retval ])# _AC_PREPROC_IFELSE_BODY # _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. # eval is necessary to expand ac_cpp. AC_DEFUN([_AC_PREPROC_IFELSE], [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_cpp], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_cpp], [LINENO], [Try to preprocess conftest.$ac_ext, and return whether this succeeded.])], [$0_BODY])]dnl [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_cpp "$LINENO"], [$2], [$3]) 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]])]) AS_IF([dnl eval is necessary to expand ac_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. (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], [$3], [$4]) 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_BODY # ----------------------- # Shell function body for _AC_COMPILE_IFELSE. m4_define([_AC_COMPILE_IFELSE_BODY], [ AS_LINENO_PUSH([$[]1]) rm -f conftest.$ac_objext AS_IF([_AC_DO_STDERR($ac_compile) && { test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext], [ac_retval=0], [_AC_MSG_LOG_CONFTEST ac_retval=1]) AS_LINENO_POP return $ac_retval ])# _AC_COMPILE_IFELSE_BODY # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ---------------------------------------------------------------- # Try to compile PROGRAM. # This macro can be used during the selection of a compiler. AC_DEFUN([_AC_COMPILE_IFELSE], [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_compile], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_compile], [LINENO], [Try to compile conftest.$ac_ext, and return whether this succeeded.])], [$0_BODY])]dnl [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_compile "$LINENO"], [$2], [$3]) rm -f core conftest.err conftest.$ac_objext[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl ])# _AC_COMPILE_IFELSE # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------- # 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-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------- AU_DEFUN([AC_TRY_COMPILE], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])]) ## --------------------- ## ## Examining libraries. ## ## --------------------- ## # _AC_LINK_IFELSE_BODY # -------------------- # Shell function body for _AC_LINK_IFELSE. m4_define([_AC_LINK_IFELSE_BODY], [ AS_LINENO_PUSH([$[]1]) rm -f conftest.$ac_objext conftest$ac_exeext AS_IF([_AC_DO_STDERR($ac_link) && { test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || AS_TEST_X([conftest$ac_exeext]) }], [ac_retval=0], [_AC_MSG_LOG_CONFTEST ac_retval=1]) # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo AS_LINENO_POP return $ac_retval ])# _AC_LINK_IFELSE_BODY # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ------------------------------------------------------------- # Try to link PROGRAM. # This macro can be used during the selection of a compiler. # # Test that resulting file is executable; see the problem reported by mwoehlke # in <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>. # But skip the test when cross-compiling, to prevent problems like the one # reported by Chris Johns in # <http://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html>. # AC_DEFUN([_AC_LINK_IFELSE], [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_link], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_link], [LINENO], [Try to link conftest.$ac_ext, and return whether this succeeded.])], [$0_BODY])]dnl [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_link "$LINENO"], [$2], [$3]) rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl ])# _AC_LINK_IFELSE # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ------------------------------------------------------------ # 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-TRUE], [ACTION-IF-FALSE]) # ------------------------------------------------ # 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-TRUE, [ACTION-IF-FALSE]) # --------------------------------------------------- AU_DEFUN([AC_COMPILE_CHECK], [m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])]) ## ------------------------------- ## ## Checking for runtime features. ## ## ------------------------------- ## # _AC_RUN_IFELSE_BODY # ------------------- # Shell function body for _AC_RUN_IFELSE. m4_define([_AC_RUN_IFELSE_BODY], [ AS_LINENO_PUSH([$[]1]) AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)], [ac_retval=0], [AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD _AC_MSG_LOG_CONFTEST ac_retval=$ac_status]) rm -rf conftest.dSYM conftest_ipa8_conftest.oo AS_LINENO_POP return $ac_retval ])# _AC_RUN_IFELSE_BODY # _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. AC_DEFUN([_AC_RUN_IFELSE], [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_run], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_run], [LINENO], [Try to link conftest.$ac_ext, and return whether this succeeded. Assumes that executables *can* be run.])], [$0_BODY])]dnl [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_run "$LINENO"], [$2], [$3]) rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam[]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 AS_IF([test "$cross_compiling" = yes], [m4_default([$4], [AC_MSG_FAILURE([cannot run test program while cross compiling])])], [_AC_RUN_IFELSE($@)]) ]) # 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_VAR_IF([ac_File], [yes], [$2], [$3]) AS_VAR_POPDEF([ac_File])dnl ])# AC_CHECK_FILE # _AC_CHECK_FILES(FILE) # --------------------- # Helper to AC_CHECK_FILES, which generates two of the three arguments # to AC_CHECK_FILE based on FILE. m4_define([_AC_CHECK_FILES], [[$1], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1], [Define to 1 if you have the file `$1'.])]]) # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ----------------------------------------------------------------- # For each word in the whitespace-separated FILE list, perform either # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND. For files that exist, also # provide the preprocessor variable HAVE_FILE. AC_DEFUN([AC_CHECK_FILES], [m4_map_args_w([$1], [AC_CHECK_FILE(_$0(], [)[$2], [$3])])]) ## ------------------------------- ## ## Checking for declared symbols. ## ## ------------------------------- ## # _AC_CHECK_DECL_BODY # ------------------- # Shell function body for AC_CHECK_DECL. m4_define([_AC_CHECK_DECL_BODY], [ AS_LINENO_PUSH([$[]1]) AC_CACHE_CHECK([whether $[]2 is declared], [$[]3], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$[]4], [@%:@ifndef $[]2 (void) $[]2; @%:@endif ])], [AS_VAR_SET([$[]3], [yes])], [AS_VAR_SET([$[]3], [no])])]) AS_LINENO_POP ])# _AC_CHECK_DECL_BODY # AC_CHECK_DECL(SYMBOL, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES = DEFAULT-INCLUDES]) # ------------------------------------------------------- # Check whether SYMBOL (a function, variable, or constant) is declared. AC_DEFUN([AC_CHECK_DECL], [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_decl], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_decl], [LINENO SYMBOL VAR], [Tests whether SYMBOL is declared, setting cache variable VAR accordingly.])], [_$0_BODY])]dnl [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])]dnl [ac_fn_[]_AC_LANG_ABBREV[]_check_decl ]dnl ["$LINENO" "$1" "ac_Symbol" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])" AS_VAR_IF([ac_Symbol], [yes], [$2], [$3]) AS_VAR_POPDEF([ac_Symbol])dnl ])# AC_CHECK_DECL # _AC_CHECK_DECLS(SYMBOL, ACTION-IF_FOUND, ACTION-IF-NOT-FOUND, # INCLUDES) # ------------------------------------------------------------- # Helper to AC_CHECK_DECLS, which generates the check for a single # SYMBOL with INCLUDES, performs the AC_DEFINE, then expands # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND. m4_define([_AC_CHECK_DECLS], [AC_CHECK_DECL([$1], [ac_have_decl=1], [ac_have_decl=0], [$4])]dnl [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_$1]), [$ac_have_decl], [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])]dnl [m4_ifvaln([$2$3], [AS_IF([test $ac_have_decl = 1], [$2], [$3])])]) # 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_map_args_sep([_$0(], [, [$2], [$3], [$4])], [], $1)]) # _AC_CHECK_DECL_ONCE(SYMBOL) # --------------------------- # Check for a single SYMBOL once. m4_define([_AC_CHECK_DECL_ONCE], [AC_DEFUN([_AC_Check_Decl_$1], [_AC_CHECK_DECLS([$1])])]dnl [AC_REQUIRE([_AC_Check_Decl_$1])]) # AC_CHECK_DECLS_ONCE(SYMBOLS) # ---------------------------- # Like AC_CHECK_DECLS(SYMBOLS), but do it at most once. AC_DEFUN([AC_CHECK_DECLS_ONCE], [m4_map_args_sep([_AC_CHECK_DECL_ONCE(], [)], [], $1)]) ## ---------------------------------- ## ## 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_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])]) # AC_LIBSOURCE(FILE-NAME) # ----------------------- # Announce we might need the file `FILE-NAME'. m4_define([AC_LIBSOURCE], []) # AC_LIBSOURCES([FILE-NAME1, ...]) # ------------------------------- # Announce we might need these files. AC_DEFUN([AC_LIBSOURCES], [m4_map_args([AC_LIBSOURCE], $1)]) # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR) # -------------------------------------------- # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'. m4_define([_AC_LIBOBJ], [AS_LITERAL_IF([$1], [AC_LIBSOURCE([$1.c])], [$2])dnl case " $LIB@&t@OBJS " in *" $1.$ac_objext "* ) ;; *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;; esac ]) # AC_LIBOBJ(FILE-NAME-NOEXT) # ------------------------- # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'. AC_DEFUN([AC_LIBOBJ], [_AC_LIBOBJ([$1], [AC_DIAGNOSE(syntax, [$0($1): you should use literals])])dnl ]) # _AC_LIBOBJS_NORMALIZE # --------------------- # Clean up LIBOBJS and 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_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`AS_ECHO(["$ac_i"]) | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. AS_VAR_APPEND([ac_libobjs], [" \${LIBOBJDIR}$ac_i\$U.$ac_objext"]) AS_VAR_APPEND([ac_ltlibobjs], [" \${LIBOBJDIR}$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, PROLOGUE, [IF-SUCCESS], # [IF-FAILURE]) # --------------------------------------------------------------------- # 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], [AS_VAR_ARITH([ac_lo], [$ac_mid + 1]) if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi AS_VAR_ARITH([ac_mid], [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], [AS_VAR_ARITH([ac_hi], ['(' $ac_mid ')' - 1]) if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi AS_VAR_ARITH([ac_mid], [2 '*' $ac_mid])]) done], [ac_lo= ac_hi=])]) # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do AS_VAR_ARITH([ac_mid], ['(' $ac_hi - $ac_lo ')' / 2 + $ac_lo]) _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])], [ac_hi=$ac_mid], [AS_VAR_ARITH([ac_lo], ['(' $ac_mid ')' + 1])]) done case $ac_lo in @%:@(( ?*) AS_VAR_SET([$2], [$ac_lo]); $4 ;; '') $5 ;; esac[]dnl ])# _AC_COMPUTE_INT_COMPILE # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-SUCCESS], # [IF-FAILURE]) # ----------------------------------------------------------------- # Store the evaluation of the integer EXPRESSION in VARIABLE. # # AC_LANG_INT_SAVE intentionally does not end the file in a newline, so # we must add one to make it a text file before passing it to read. m4_define([_AC_COMPUTE_INT_RUN], [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])], [echo >>conftest.val; read $2 <conftest.val; $4], [$5]) rm -f conftest.val ])# _AC_COMPUTE_INT_RUN # _AC_COMPUTE_INT_BODY # -------------------- # Shell function body for AC_COMPUTE_INT. m4_define([_AC_COMPUTE_INT_BODY], [ AS_LINENO_PUSH([$[]1]) if test "$cross_compiling" = yes; then _AC_COMPUTE_INT_COMPILE([$[]2], [$[]3], [$[]4], [ac_retval=0], [ac_retval=1]) else _AC_COMPUTE_INT_RUN([$[]2], [$[]3], [$[]4], [ac_retval=0], [ac_retval=1]) fi AS_LINENO_POP return $ac_retval ])# _AC_COMPUTE_INT_BODY # AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS]) # ---------------------------------------------------------- # Store into the shell variable VARIABLE the value of the integer C expression # EXPRESSION. The value should fit in an initializer in a C variable of type # `signed long'. If no PROLOGUE are specified, the default includes are used. # IF-FAILS is evaluated if the value cannot be found (which includes the # case of cross-compilation, if EXPRESSION is not computable at compile-time. AC_DEFUN([AC_COMPUTE_INT], [AC_LANG_COMPILER_REQUIRE()]dnl [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_compute_int], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_compute_int], [LINENO EXPR VAR INCLUDES], [Tries to find the compile-time value of EXPR in a program that includes INCLUDES, setting VAR accordingly. Returns whether the value could be computed])], [_$0_BODY])]dnl [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_compute_int "$LINENO" "$2" "$1" ]dnl ["AS_ESCAPE([$3], [""])"], [], [$4]) ])# AC_COMPUTE_INT # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS]) # ----------------------------------------------------------- # FIXME: this private interface was used by several packages. # Give them time to transition to AC_COMPUTE_INT and then delete this one. AC_DEFUN([_AC_COMPUTE_INT], [AC_COMPUTE_INT([$2], [$1], [$3], [$4]) AC_DIAGNOSE([obsolete], [The macro `_AC_COMPUTE_INT' is obsolete and will be deleted in a future version or Autoconf. Hence, it is suggested that you use instead the public AC_COMPUTE_INT macro. Note that the arguments are slightly different between the two.])dnl ])# _AC_COMPUTE_INT �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/status.m4��������������������������������������������������0000644�0001750�0001750�00000156244�11202536433�020423� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# 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, 2004, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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. # # # 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_SRCDIRS(BUILD-DIR-NAME) # --------------------------- # Inputs: # - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src' # - `$srcdir' is `top-build -> top-src' # # Outputs: # - `ac_builddir' is `.', for symmetry only. # - `ac_top_builddir_sub' is `build -> top_build'. # This is used for @top_builddir@. # - `ac_top_build_prefix' 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 directory names. m4_define([_AC_SRCDIRS], [ac_builddir=. case $1 in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`AS_ECHO([$1]) | sed 's|^\.[[\\/]]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`AS_ECHO(["$ac_dir_suffix"]) | sed 's|/[[^\\/]]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [[\\/]]* | ?:[[\\/]]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix ])# _AC_SRCDIRS # _AC_HAVE_TOP_BUILD_PREFIX # ------------------------- # Announce to the world (to Libtool) that we substitute @top_build_prefix@. AC_DEFUN([_AC_HAVE_TOP_BUILD_PREFIX]) ## ---------------------- ## ## Registering the tags. ## ## ---------------------- ## # _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 ])])]) # 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_FILE_DEPENDENCY_TRACE_COLON(DEST:SOURCE1[:SOURCE2...]) # ---------------------------------------------------------- # Declare that DEST depends upon SOURCE1 etc. # m4_define([_AC_FILE_DEPENDENCY_TRACE_COLON], [AC_FILE_DEPENDENCY_TRACE(m4_translit([$1], [:], [,]))]) # _AC_CONFIG_DEPENDENCY(MODE, DEST[:SOURCE1...]) # --------------------------------------------- # MODE is `FILES', `HEADERS', or `LINKS'. # # Be sure that a missing dependency is expressed as a dependency upon # `DEST.in' (except with config links). # m4_define([_AC_CONFIG_DEPENDENCY], [_AC_FILE_DEPENDENCY_TRACE_COLON([$2]_AC_CONFIG_DEPENDENCY_DEFAULT($@))dnl ]) # _AC_CONFIG_DEPENDENCY_DEFAULT(MODE, DEST[:SOURCE1...]) # ------------------------------------------------------ # Expand to `:DEST.in' if appropriate, or to empty string otherwise. # # More detailed description: # If the tag contains `:', expand to nothing. # Otherwise, for a config file or header, add `:DEST.in'. # For a config link, DEST.in is not appropriate: # - if the tag is literal, complain. # - otherwise, just expand to nothing and proceed with fingers crossed. # (We get to this case from the obsolete AC_LINK_FILES, for example.) # m4_define([_AC_CONFIG_DEPENDENCY_DEFAULT], [m4_if(m4_index([$2], [:]), [-1], [m4_if([$1], [LINKS], [AS_LITERAL_IF([$2], [m4_fatal([Invalid AC_CONFIG_LINKS tag: `$2'])])], [:$2.in])])]) # _AC_CONFIG_UNIQUE(MODE, DEST) # ----------------------------- # MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', or `SUBDIRS'. # # Verify that there is no double definition of an output file. # m4_define([_AC_CONFIG_UNIQUE], [m4_ifdef([_AC_SEEN_TAG($2)], [m4_fatal([`$2' is already registered with AC_CONFIG_]m4_defn( [_AC_SEEN_TAG($2)]).)], [m4_define([_AC_SEEN_TAG($2)], [$1])])dnl ]) # _AC_CONFIG_FOOS(MODE, TAGS..., [COMMANDS], [INIT-CMDS]) # ------------------------------------------------------- # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'. # # Associate the COMMANDS to each TAG, i.e., when config.status creates TAG, # run COMMANDS afterwards. (This is done in _AC_CONFIG_REGISTER_DEST.) # # For COMMANDS, do not m4_normalize TAGS before adding it to ac_config_commands. # This historical difference allows macro calls in TAGS. # m4_define([_AC_CONFIG_FOOS], [m4_map_args_w([$2], [_AC_CONFIG_REGISTER([$1],], [, [$3])])]dnl [m4_define([_AC_SEEN_CONFIG(ANY)])]dnl [m4_define([_AC_SEEN_CONFIG($1)])]dnl [_AC_CONFIG_COMMANDS_INIT([$4])]dnl [ac_config_[]m4_tolower([$1])="$ac_config_[]m4_tolower([$1]) ]dnl [m4_if([$1], [COMMANDS], [$2], [m4_normalize([$2])])" ]) # _AC_CONFIG_COMPUTE_DEST(STRING) # ------------------------------- # Compute the DEST from STRING by stripping any : and following # characters. Guarantee a match in m4_index, so as to avoid a bug # with precision -1 in m4_format in older m4. m4_define([_AC_CONFIG_COMPUTE_DEST], [m4_format([[%.*s]], m4_index([$1:], [:]), [$1])]) # _AC_CONFIG_REGISTER(MODE, TAG, [COMMANDS]) # ------------------------------------------ # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'. # m4_define([_AC_CONFIG_REGISTER], [m4_if([$1], [COMMANDS], [], [_AC_CONFIG_DEPENDENCY([$1], [$2])])]dnl [_AC_CONFIG_REGISTER_DEST([$1], [$2], _AC_CONFIG_COMPUTE_DEST([$2]), [$3])]) # _AC_CONFIG_REGISTER_DEST(MODE, TAG, DEST, [COMMANDS]) # ----------------------------------------------------- # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'. # TAG is in the form DEST[:SOURCE...]. # Thus parameter $3 is the first part of $2. # # With CONFIG_LINKS, reject DEST=., because it is makes it hard for ./config.status # to guess the links to establish (`./config.status .'). # # Save the name of the first config header to AH_HEADER. # m4_define([_AC_CONFIG_REGISTER_DEST], [_AC_CONFIG_UNIQUE([$1], [$3])]dnl [m4_if([$1 $3], [LINKS .], [m4_fatal([invalid destination of a config link: `.'])], [$1], [HEADERS], [m4_define_default([AH_HEADER], [$3])])]dnl dnl dnl Recognize TAG as an argument to config.status: dnl [m4_append([_AC_LIST_TAGS], [ "$3") CONFIG_$1="$CONFIG_$1 $2" ;; ])]dnl dnl dnl Register the associated commands, if any: dnl [m4_ifval([$4], [m4_append([_AC_LIST_TAG_COMMANDS], [ "$3":]m4_format([[%.1s]], [$1])[) $4 ;; ])])])# _AC_CONFIG_REGISTER_DEST ## --------------------- ## ## Configuration files. ## ## --------------------- ## # AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS]) # ------------------------------------------------- # Specify output files, i.e., files that are configured with AC_SUBST. # AC_DEFUN([AC_CONFIG_FILES], [_AC_CONFIG_FOOS([FILES], $@)]) # _AC_SED_CMD_LIMIT # ----------------- # Evaluate to an m4 number equal to the maximum number of commands to put # in any single sed program, not counting ":" commands. # # Some seds have small command number limits, like on Digital OSF/1 and HP-UX. m4_define([_AC_SED_CMD_LIMIT], dnl One cannot portably go further than 99 commands because of HP-UX. [99]) # _AC_AWK_LITERAL_LIMIT # --------------------- # Evaluate to the maximum number of characters to put in an awk # string literal, not counting escape characters. # # Some awk's have small limits, such as Solaris and AIX awk. m4_define([_AC_AWK_LITERAL_LIMIT], [148]) # _AC_OUTPUT_FILES_PREPARE # ------------------------ # Create the awk scripts needed for CONFIG_FILES. # Support multiline substitutions and make sure that the substitutions are # not evaluated recursively. # The intention is to have readable config.status and configure, even # though this m4 code might be scary. # # This code was written by Dan Manthey and rewritten by Ralf Wildenhues. # # This macro is expanded inside a here document. If the here document is # closed, it has to be reopened with # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1". # m4_define([_AC_OUTPUT_FILES_PREPARE], [# Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then dnl For AC_SUBST_FILE, check for usable getline support in awk, dnl at config.status execution time. dnl Otherwise, do the interpolation in sh, which is slower. dnl Without any AC_SUBST_FILE, omit all related code. dnl Note the expansion is double-quoted for readability. m4_ifdef([_AC_SUBST_FILES], [[if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then ac_cs_awk_getline=: ac_cs_awk_pipe_init= ac_cs_awk_read_file=' while ((getline aline < (F[key])) > 0) print(aline) close(F[key])' ac_cs_awk_pipe_fini= else ac_cs_awk_getline=false ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" ac_cs_awk_read_file=' print "|#_!!_#|" print "cat " F[key] " &&" '$ac_cs_awk_pipe_init # The final `:' finishes the AND list. ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' fi]]) ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi dnl dnl Define the pipe that does the substitution. m4_ifdef([_AC_SUBST_FILES], [m4_define([_AC_SUBST_CMDS], [| if $ac_cs_awk_getline; then $AWK -f "$tmp/subs.awk" else $AWK -f "$tmp/subs.awk" | $SHELL fi])], [m4_define([_AC_SUBST_CMDS], [| $AWK -f "$tmp/subs.awk"])])dnl echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF m4_ifdef([_AC_SUBST_FILES], [# Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F@<:@"&"@:>@="$&"/' && echo "_ACAWK" && echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || AC_MSG_ERROR([could not make $CONFIG_STATUS]) rm -f conf$$files.sh ])dnl { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || AC_MSG_ERROR([could not make $CONFIG_STATUS]) ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || AC_MSG_ERROR([could not make $CONFIG_STATUS]) dnl Do not use grep on conf$$subs.awk, since AIX grep has a line length limit. ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then AC_MSG_ERROR([could not make $CONFIG_STATUS]) else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh dnl Initialize an awk array of substitutions, keyed by variable name. dnl dnl The initial line contains the variable name VAR, then a `!'. dnl Construct `S["VAR"]=' from it. dnl The rest of the line, and potentially further lines, contain the dnl substituted value; the last of those ends with $ac_delim. We split dnl the output both along those substituted newlines and at intervals of dnl length _AC_AWK_LITERAL_LIMIT. The latter is done to comply with awk dnl string literal limitations, the former for simplicity in doing so. dnl dnl We deal with one input line at a time to avoid sed pattern space dnl limitations. We kill the delimiter $ac_delim before splitting the dnl string (otherwise we risk splitting the delimiter). And we do the dnl splitting before the quoting of awk special characters (otherwise we dnl risk splitting an escape sequence). dnl dnl Output as separate string literals, joined with backslash-newline. dnl Eliminate the newline after `=' in a second script, for readability. dnl dnl Notes to the main part of the awk script: dnl - the unusual FS value helps prevent running into the limit of 99 fields, dnl - we avoid sub/gsub because of the \& quoting issues, see dnl http://www.gnu.org/software/gawk/manual/html_node/Gory-Details.html dnl - Writing `$ 0' prevents expansion by both the shell and m4 here. dnl dnl m4-double-quote most of the scripting for readability. [cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{]_AC_AWK_LITERAL_LIMIT[\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{]_AC_AWK_LITERAL_LIMIT[\}// t nl :delim h s/\(.\{]_AC_AWK_LITERAL_LIMIT[\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{]_AC_AWK_LITERAL_LIMIT[\}// t delim ' <conf$$subs.awk | sed ' /^[^""]/{ N s/\n// } ' >>$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" ]m4_ifdef([_AC_SUBST_FILES], [ \$ac_cs_awk_pipe_init])[ } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } ]m4_ifdef([_AC_SUBST_FILES], [[ if (nfields == 3 && !substed) { key = field[2] if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { \$ac_cs_awk_read_file next } }]])[ print line } ]dnl end of double-quoted part m4_ifdef([_AC_SUBST_FILES], [\$ac_cs_awk_pipe_fini]) _ACAWK _ACEOF dnl See if CR is the EOL marker. If not, remove any EOL-related dnl ^M bytes and escape any remaining ones. If so, just use mv. dnl In case you're wondering how ^M bytes can make it into subs1.awk, dnl [from Ralf Wildenhues] one way is if you have e.g., dnl AC_SUBST([variable_that_contains_cr], [" dnl "]) dnl The original aim was that users should be able to substitute any dnl characters they like (except for \0). And the above is not so dnl unlikely if the configure script itself happens to be converted dnl to w32 text mode. cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || AC_MSG_ERROR([could not setup config files machinery]) _ACEOF # 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 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" ])# _AC_OUTPUT_FILES_PREPARE # _AC_OUTPUT_FILE_ADJUST_DIR(VAR) # ------------------------------- # Generate the sed snippet needed to output VAR relative to the # top-level directory. m4_define([_AC_OUTPUT_FILE_ADJUST_DIR], [s&@$1@&$ac_$1&;t t[]AC_SUBST_TRACE([$1])]) # _AC_OUTPUT_FILE # --------------- # Do the variable substitutions to create the Makefiles or whatever. # # This macro is expanded inside a here document. If the here document is # closed, it has to be reopened with # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1". # m4_define([_AC_OUTPUT_FILE], [ # # CONFIG_FILE # AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [ case $INSTALL in [[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ])dnl AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], [ ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [[\\/$]]* | ?:[[\\/]]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac ])dnl _ACEOF m4_ifndef([AC_DATAROOTDIR_CHECKED], [cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= m4_define([_AC_datarootdir_vars], [datadir, docdir, infodir, localedir, mandir])]dnl [m4_define([_AC_datarootdir_subst], [ s&@$][1@&$$][1&g])]dnl [ac_sed_dataroot=' /datarootdir/ { p q } m4_map_args_sep([/@], [@/p], [ ], _AC_datarootdir_vars)' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@[]m4_join([@*|*@], _AC_datarootdir_vars)@*) AC_MSG_WARN([$ac_file_inputs seems to ignore the --datarootdir setting]) _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' m4_map_args_sep([_AC_datarootdir_subst(], [)], [ ], _AC_datarootdir_vars) s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF ])dnl # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b] dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE. dnl Note if you change the s||| delimiter here, don't forget to adjust dnl ac_sed_conf_input accordingly. Using & is a bad idea if & appears in dnl the replacement string. s|@configure_input@|$ac_sed_conf_input|;t t dnl During the transition period, this is a special case: s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir]) dnl For this substitution see the witness macro _AC_HAVE_TOP_BUILD_PREFIX above. s&@top_build_prefix@&$ac_top_build_prefix&;t t[]AC_SUBST_TRACE([top_build_prefix]) m4_map_args_sep([$0_ADJUST_DIR(], [)], [ ], [srcdir], [abs_srcdir], [top_srcdir], [abs_top_srcdir], [builddir], [abs_builddir], [abs_top_builddir]AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [, [INSTALL]])AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], [, [MKDIR_P]])) m4_ifndef([AC_DATAROOTDIR_CHECKED], [$ac_datarootdir_hack ])dnl " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" m4_defn([_AC_SUBST_CMDS]) >$tmp/out \ || AC_MSG_ERROR([could not create $ac_file]) m4_ifndef([AC_DATAROOTDIR_CHECKED], [test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[[ ]]*datarootdir[[ ]]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && AC_MSG_WARN([$ac_file contains a reference to the variable `datarootdir' which seems to be undefined. Please make sure it is defined.]) ])dnl rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || AC_MSG_ERROR([could not create $ac_file]) 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"; mv "$tmp/out" "$ac_file" dnl fi ])# _AC_OUTPUT_FILE ## ----------------------- ## ## Configuration headers. ## ## ----------------------- ## # AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS]) # ------------------------------------------------------ # Specify that the HEADERS are to be created by instantiation of the # AC_DEFINEs. # AC_DEFUN([AC_CONFIG_HEADERS], [_AC_CONFIG_FOOS([HEADERS], $@)]) # AC_CONFIG_HEADER(HEADER-TO-CREATE ...) # -------------------------------------- # FIXME: Make it obsolete? AC_DEFUN([AC_CONFIG_HEADER], [AC_CONFIG_HEADERS([$1])]) # _AC_OUTPUT_HEADERS_PREPARE # -------------------------- # Create the awk scripts needed for CONFIG_HEADERS. # Support multiline #defines. # # This macro is expanded inside a here document. If the here document is # closed, it has to be reopened with # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1". # m4_define([_AC_OUTPUT_HEADERS_PREPARE], [# Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then dnl This `||' list is finished at the end of _AC_OUTPUT_HEADERS_PREPARE. cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then AC_MSG_ERROR([could not make $CONFIG_HEADERS]) else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. dnl dnl Structure of the sed script that reads confdefs.h: dnl rset: main loop, searches for `#define' lines dnl def: deal with a `#define' line dnl bsnl: deal with a `#define' line that ends with backslash-newline dnl cont: handle a continuation line dnl bsnlc: handle a continuation line that ends with backslash-newline dnl dnl Each sub part escapes the awk special characters and outputs a statement dnl inserting the macro value into the array D, keyed by name. If the macro dnl uses parameters, they are added in the array P, keyed by name. dnl dnl Long values are split into several string literals with help of ac_delim. dnl Assume nobody uses macro names of nearly 150 bytes length. dnl dnl The initial replace for `#define' lines inserts a leading space dnl in order to ease later matching; otherwise, output lines may be dnl repeatedly matched. dnl dnl m4-double-quote most of this for [, ], define, and substr: [ ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{]_AC_AWK_LITERAL_LIMIT[\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{]_AC_AWK_LITERAL_LIMIT[\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' <confdefs.h | sed ' s/'"$ac_delim"'/"\\\ "/g' >>$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #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. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } ]dnl End of double-quoted section _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 dnl finish `||' list indicating write error: AC_MSG_ERROR([could not setup config headers machinery]) fi # test -n "$CONFIG_HEADERS" ])# _AC_OUTPUT_HEADERS_PREPARE # _AC_OUTPUT_HEADER # ----------------- # # Output the code which instantiates the `config.h' files from their # `config.h.in'. # # This macro is expanded inside a here document. If the here document is # closed, it has to be reopened with # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1". # m4_define([_AC_OUTPUT_HEADER], [ # # CONFIG_HEADER # if test x"$ac_file" != x-; then { AS_ECHO(["/* $configure_input */"]) \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || AC_MSG_ERROR([could not create $ac_file]) if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then AC_MSG_NOTICE([$ac_file is unchanged]) else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || AC_MSG_ERROR([could not create $ac_file]) fi else AS_ECHO(["/* $configure_input */"]) \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || AC_MSG_ERROR([could not create -]) 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 ])# _AC_OUTPUT_HEADER ## --------------------- ## ## Configuration links. ## ## --------------------- ## # 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_CONFIG_FOOS([LINKS], $@)]) # 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_FILES_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_default([_AC_LINK_FILES_CNT], 0)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_LINKS. `autoupdate' provides a functional but inelegant update, you should probably tune the result yourself.])# AC_LINK_FILES # _AC_OUTPUT_LINK # --------------- # This macro is expanded inside a here document. If the here document is # closed, it has to be reopened with # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1". m4_define([_AC_OUTPUT_LINK], [ # # CONFIG_LINK # if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then : else # Prefer the file from the source tree if names are identical. if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then ac_source=$srcdir/$ac_source fi AC_MSG_NOTICE([linking $ac_source to $ac_file]) if test ! -r "$ac_source"; then AC_MSG_ERROR([$ac_source: file not found]) fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. case $srcdir in [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || AC_MSG_ERROR([cannot link or copy $ac_source to $ac_file]) fi ])# _AC_OUTPUT_LINK ## ------------------------ ## ## Configuration commands. ## ## ------------------------ ## # 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_CONFIG_FOOS([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_default([_AC_OUTPUT_COMMANDS_CNT], 0)dnl 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 ]) # _AC_OUTPUT_COMMAND # ------------------ # This macro is expanded inside a here document. If the here document is # closed, it has to be reopened with # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1". m4_define([_AC_OUTPUT_COMMAND], [ AC_MSG_NOTICE([executing $ac_file commands]) ]) ## -------------------------------------- ## ## Pre- and post-config.status commands. ## ## -------------------------------------- ## # 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]) ## ----------------------- ## ## Configuration subdirs. ## ## ----------------------- ## # AC_CONFIG_SUBDIRS(DIR ...) # -------------------------- # We define two variables: # - _AC_LIST_SUBDIRS # A statically built list, should contain *all* the arguments of # AC_CONFIG_SUBDIRS. The final value is assigned to ac_subdirs_all in # the `default' section, and used for --help=recursive. # It makes no sense for arguments which are sh variables. # - subdirs # Shell variable 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_DEFUN([AC_CONFIG_SUBDIRS], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])]dnl [AC_REQUIRE([AC_DISABLE_OPTION_CHECKING])]dnl [m4_map_args_w([$1], [_AC_CONFIG_UNIQUE([SUBDIRS], _AC_CONFIG_COMPUTE_DEST(], [))])]dnl [m4_append([_AC_LIST_SUBDIRS], [$1], [ ])]dnl [AS_LITERAL_IF([$1], [], [AC_DIAGNOSE([syntax], [$0: you should use literals])])]dnl [AC_SUBST([subdirs], ["$subdirs m4_normalize([$1])"])]) # _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, --srcdir, and --disable-option-checking arguments # so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg 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=*) ;; --disable-option-checking) ;; *) case $ac_arg in *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;; esac AS_VAR_APPEND([ac_sub_configure_args], [" '$ac_arg'"]) ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi # Always prepend --disable-option-checking to silence warnings, since # different subdirs can have different --enable and --with options. ac_sub_configure_args="--disable-option-checking $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="=== configuring in $ac_dir (`pwd`/$ac_dir)" _AS_ECHO_LOG([$ac_msg]) _AS_ECHO([$ac_msg]) AS_MKDIR_P(["$ac_dir"]) _AC_SRCDIRS(["$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=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/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 name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir]) # The eval makes quoting arguments work. eval "\$SHELL \"\$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. ## ## -------------------------- ## # AU::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. # m4_define([AC_OUTPUT], [dnl Dispatch the extra arguments to their native macros. m4_ifvaln([$1], [AC_CONFIG_FILES([$1])])dnl m4_ifvaln([$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}' m4_ifdef([_AC_SEEN_CONFIG(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_write_fail=0 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 test $ac_write_fail = 0 || AC_MSG_ERROR([write failure creating $CONFIG_STATUS]) 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 fi dnl config.status should not do recursion. AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then AC_MSG_WARN([unrecognized options: $ac_unrecognized_opts]) fi ])# 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]) dnl AS_MESSAGE_LOG_FD is not available yet: m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [AS_INIT_GENERATED([$CONFIG_STATUS], [# 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 ]) || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 [#] Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" 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] $[@] on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF dnl remove any newlines from these variables. m4_ifdef([_AC_SEEN_CONFIG(FILES)], [case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$[*];; esac ]) m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$[*];; esac ]) cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. m4_ifdef([_AC_SEEN_CONFIG(FILES)], [config_files="$ac_config_files" ])dnl m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [config_headers="$ac_config_headers" ])dnl m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [config_links="$ac_config_links" ])dnl m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [config_commands="$ac_config_commands" ])dnl _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $[0] [[OPTION]]... [[TAG]]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent [] do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions m4_ifdef([_AC_SEEN_CONFIG(FILES)], [AS_HELP_STRING([[ --file=FILE[:TEMPLATE]]], [instantiate the configuration file FILE], [ ]) ])dnl m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [AS_HELP_STRING([[ --header=FILE[:TEMPLATE]]], [instantiate the configuration header FILE], [ ]) ])dnl m4_ifdef([_AC_SEEN_CONFIG(FILES)], [Configuration files: $config_files ])dnl m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [Configuration headers: $config_headers ])dnl m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [Configuration links: $config_links ])dnl m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [Configuration commands: $config_commands ])dnl Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [<AC_PACKAGE_BUGREPORT>], [the package provider]).dnl m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [ AC_PACKAGE_NAME home page: <AC_PACKAGE_URL>.])dnl m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [ General help using GNU software: <http://www.gnu.org/gethelp/>.])])" _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 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 \\"`AS_ECHO(["$ac_configure_args"]) | sed 's/^ //; s/[[\\""\`\$]]/\\\\&/g'`\\" Copyright (C) m4_PACKAGE_YEAR Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [INSTALL='$INSTALL' ])dnl AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], [MKDIR_P='$MKDIR_P' ])dnl AC_PROVIDE_IFELSE([AC_PROG_AWK], [AWK='$AWK' ])dnl test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. 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 ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) AS_ECHO(["$ac_cs_version"]); exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; m4_ifdef([_AC_SEEN_CONFIG(FILES)], [dnl --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`AS_ECHO(["$ac_optarg"]) | sed "s/'/'\\\\\\\\''/g"` ;; esac AS_VAR_APPEND([CONFIG_FILES], [" '$ac_optarg'"]) ac_need_defaults=false;; ])dnl m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [dnl --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`AS_ECHO(["$ac_optarg"]) | sed "s/'/'\\\\\\\\''/g"` ;; esac AS_VAR_APPEND([CONFIG_HEADERS], [" '$ac_optarg'"]) ac_need_defaults=false;; --he | --h) # Conflict between --help and --header AC_MSG_ERROR([ambiguous option: `$[1]' Try `$[0] --help' for more information.]);; ], [ --he | --h |])dnl --help | --hel | -h ) AS_ECHO(["$ac_cs_usage"]); exit ;; -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.]) ;; *) AS_VAR_APPEND([ac_config_targets], [" $[1]"]) ac_need_defaults=false ;; 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 || ac_write_fail=1 dnl Check this before opening the log, to avoid a bug on MinGW, dnl which prohibits the recursive instance from truncating an open log. if \$ac_cs_recheck; then set X '$SHELL' '$[0]' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \AS_ECHO(["running CONFIG_SHELL=$SHELL \$[*]"]) >&AS_MESSAGE_FD CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$[@]" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 dnl Open the log: m4_popdef([AS_MESSAGE_LOG_FD])dnl exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) AS_ECHO(["$ac_log"]) } >&AS_MESSAGE_LOG_FD _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 m4_ifdef([_AC_OUTPUT_COMMANDS_INIT], [# # INIT-COMMANDS # _AC_OUTPUT_COMMANDS_INIT ])dnl _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in m4_ifdef([_AC_LIST_TAGS], [_AC_LIST_TAGS]) *) AC_MSG_ERROR([invalid argument: `$ac_config_target']);; esac done m4_ifdef([_AC_SEEN_CONFIG(ANY)], [_AC_OUTPUT_MAIN_LOOP])[]dnl AS_EXIT(0) _ACEOF ])# _AC_OUTPUT_CONFIG_STATUS # _AC_OUTPUT_MAIN_LOOP # -------------------- # The main loop in $CONFIG_STATUS. # # This macro is expanded inside a here document. If the here document is # closed, it has to be reopened with # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1". # AC_DEFUN([_AC_OUTPUT_MAIN_LOOP], [ # 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_ifdef([_AC_SEEN_CONFIG(FILES)], [ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files ])dnl m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers ])dnl m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links ])dnl m4_ifdef([_AC_SEEN_CONFIG(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 against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'AS_EXIT([1])' 1 2 13 15 } dnl The comment above AS_TMPDIR says at most 4 chars are allowed. AS_TMPDIR([conf], [.]) m4_ifdef([_AC_SEEN_CONFIG(FILES)], [_AC_OUTPUT_FILES_PREPARE])[]dnl m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [_AC_OUTPUT_HEADERS_PREPARE])[]dnl eval set X "dnl m4_ifdef([_AC_SEEN_CONFIG(FILES)], [:F $CONFIG_FILES])[]dnl m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [:H $CONFIG_HEADERS])[]dnl m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [:L $CONFIG_LINKS])[]dnl m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C $CONFIG_COMMANDS])[]dnl " shift for ac_tag do case $ac_tag in :[[FHLC]]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[[FHL]]*:*);; :L* | :C*:*) AC_MSG_ERROR([invalid tag `$ac_tag']);; :[[FH]]-) ac_tag=-:-;; :[[FH]]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$[1] shift case $ac_mode in :L) ac_source=$[1];; :[[FH]]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [[\\/$]]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || AC_MSG_ERROR([cannot find input file: `$ac_f']);; esac case $ac_f in *\'*) ac_f=`AS_ECHO(["$ac_f"]) | sed "s/'/'\\\\\\\\''/g"`;; esac AS_VAR_APPEND([ac_file_inputs], [" '$ac_f'"]) done # 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. */ configure_input='Generated from '` AS_ECHO(["$[*]"]) | sed ['s|^[^:]*/||;s|:[^:]*/|, |g'] `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" AC_MSG_NOTICE([creating $ac_file]) fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`AS_ECHO(["$configure_input"]) | sed 's/[[\\\\&|]]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || AC_MSG_ERROR([could not create $ac_file]) ;; esac ;; esac ac_dir=`AS_DIRNAME(["$ac_file"])` AS_MKDIR_P(["$ac_dir"]) _AC_SRCDIRS(["$ac_dir"]) case $ac_mode in m4_ifdef([_AC_SEEN_CONFIG(FILES)], [:F)_AC_OUTPUT_FILE ;;]) m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [:H)_AC_OUTPUT_HEADER ;;]) m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [:L)_AC_OUTPUT_LINK ;;]) m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C)_AC_OUTPUT_COMMAND ;;]) esac dnl Some shells don't like empty case/esac m4_ifdef([_AC_LIST_TAG_COMMANDS], [ case $ac_file$ac_mode in _AC_LIST_TAG_COMMANDS esac ])dnl done # for ac_tag ])# _AC_OUTPUT_MAIN_LOOP # 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. 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 branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ]])# AC_OUTPUT_MAKE_DEFS ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/types.m4���������������������������������������������������0000644�0001750�0001750�00000107330�11202536433�020234� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Type related macros: existence, sizeof, and structure members. # # Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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 = DEFAULT-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_BODY # ----------------------- # Shell function body for _AC_CHECK_TYPE_NEW. This macro implements the # former task of AC_CHECK_TYPE, with one big difference though: AC_CHECK_TYPE # used to grep in the headers, which, BTW, led to many problems until the # extended regular expression was correct and did not give 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; # # (TYPE being the second parameter to the shell function, hence $[]2 in m4). # 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!!! # # So, to filter out the last possibility, you try this too: # # sizeof ((TYPE)); # # This fails if TYPE is a type, but succeeds if TYPE is actually a variable. # # 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.). # # C++ disallows defining types inside `sizeof ()', but that's OK, # since we don't want to consider unnamed structs to be types for C++, # precisely because they don't work in cases like that. m4_define([_AC_CHECK_TYPE_NEW_BODY], [ AS_LINENO_PUSH([$[]1]) AC_CACHE_CHECK([for $[]2], [$[]3], [AS_VAR_SET([$[]3], [no]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$[]4], [if (sizeof ($[]2)) return 0;])], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$[]4], [if (sizeof (($[]2))) return 0;])], [], [AS_VAR_SET([$[]3], [yes])])])]) AS_LINENO_POP ])dnl # _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. AC_DEFUN([_AC_CHECK_TYPE_NEW], [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_type], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_type], [LINENO TYPE VAR INCLUDES], [Tests whether TYPE exists after having included INCLUDES, setting cache variable VAR accordingly.])], [$0_BODY])]dnl [AS_VAR_PUSHDEF([ac_Type], [ac_cv_type_$1])]dnl [ac_fn_[]_AC_LANG_ABBREV[]_check_type "$LINENO" "$1" "ac_Type" ]dnl ["AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])" AS_VAR_IF([ac_Type], [yes], [$2], [$3]) AS_VAR_POPDEF([ac_Type])dnl ])# _AC_CHECK_TYPE_NEW # _AC_CHECK_TYPES(TYPE) # --------------------- # Helper to AC_CHECK_TYPES, which generates two of the four arguments # to _AC_CHECK_TYPE_NEW that are based on TYPE. m4_define([_AC_CHECK_TYPES], [[$1], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1], [Define to 1 if the system has the type `$1'.])]]) # 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_map_args_sep([_AC_CHECK_TYPE_NEW(_$0(], [)[ $2], [$3], [$4])], [], $1)]) # _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 <sys/types.h> 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_cond([$#], [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])($@)])# 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. */ ]AC_INCLUDES_DEFAULT[ #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 int 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 int but getgroups modifies an array of ints. */ return n > 0 && gidset[n] != val.gval; }]])], [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 <unistd.h> 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_INTMAX_T # ----------------- AC_DEFUN([AC_TYPE_INTMAX_T], [ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_CHECK_TYPE([intmax_t], [AC_DEFINE([HAVE_INTMAX_T], 1, [Define to 1 if the system has the type `intmax_t'.])], [test $ac_cv_type_long_long_int = yes \ && ac_type='long long int' \ || ac_type='long int' AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], [Define to the widest signed integer type if <stdint.h> and <inttypes.h> do not define.])]) ]) # AC_TYPE_UINTMAX_T # ----------------- AC_DEFUN([AC_TYPE_UINTMAX_T], [ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) AC_CHECK_TYPE([uintmax_t], [AC_DEFINE([HAVE_UINTMAX_T], 1, [Define to 1 if the system has the type `uintmax_t'.])], [test $ac_cv_type_unsigned_long_long_int = yes \ && ac_type='unsigned long long int' \ || ac_type='unsigned long int' AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], [Define to the widest unsigned integer type if <stdint.h> and <inttypes.h> do not define.])]) ]) # AC_TYPE_INTPTR_T # ----------------- AC_DEFUN([AC_TYPE_INTPTR_T], [ AC_CHECK_TYPE([intptr_t], [AC_DEFINE([HAVE_INTPTR_T], 1, [Define to 1 if the system has the type `intptr_t'.])], [for ac_type in 'int' 'long int' 'long long int'; do AC_COMPILE_IFELSE( [AC_LANG_BOOL_COMPILE_TRY( [AC_INCLUDES_DEFAULT], [[sizeof (void *) <= sizeof ($ac_type)]])], [AC_DEFINE_UNQUOTED([intptr_t], [$ac_type], [Define to the type of a signed integer type wide enough to hold a pointer, if such a type exists, and if the system does not define it.]) ac_type=]) test -z "$ac_type" && break done]) ]) # AC_TYPE_UINTPTR_T # ----------------- AC_DEFUN([AC_TYPE_UINTPTR_T], [ AC_CHECK_TYPE([uintptr_t], [AC_DEFINE([HAVE_UINTPTR_T], 1, [Define to 1 if the system has the type `uintptr_t'.])], [for ac_type in 'unsigned int' 'unsigned long int' \ 'unsigned long long int'; do AC_COMPILE_IFELSE( [AC_LANG_BOOL_COMPILE_TRY( [AC_INCLUDES_DEFAULT], [[sizeof (void *) <= sizeof ($ac_type)]])], [AC_DEFINE_UNQUOTED([uintptr_t], [$ac_type], [Define to the type of an unsigned integer type wide enough to hold a pointer, if such a type exists, and if the system does not define it.]) ac_type=]) test -z "$ac_type" && break done]) ]) # AC_TYPE_LONG_DOUBLE # ------------------- AC_DEFUN([AC_TYPE_LONG_DOUBLE], [ AC_CACHE_CHECK([for long double], [ac_cv_type_long_double], [if test "$GCC" = yes; then ac_cv_type_long_double=yes else AC_COMPILE_IFELSE( [AC_LANG_BOOL_COMPILE_TRY( [[/* The Stardent Vistra knows sizeof (long double), but does not support it. */ long double foo = 0.0L;]], [[/* On Ultrix 4.3 cc, long double is 4 and double is 8. */ sizeof (double) <= sizeof (long double)]])], [ac_cv_type_long_double=yes], [ac_cv_type_long_double=no]) fi]) if test $ac_cv_type_long_double = yes; then AC_DEFINE([HAVE_LONG_DOUBLE], 1, [Define to 1 if the system has the type `long double'.]) fi ]) # AC_TYPE_LONG_DOUBLE_WIDER # ------------------------- AC_DEFUN([AC_TYPE_LONG_DOUBLE_WIDER], [ AC_CACHE_CHECK( [for long double with more range or precision than double], [ac_cv_type_long_double_wider], [AC_COMPILE_IFELSE( [AC_LANG_BOOL_COMPILE_TRY( [[#include <float.h> long double const a[] = { 0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON, LDBL_MIN, LDBL_MAX, LDBL_EPSILON }; long double f (long double x) { return ((x + (unsigned long int) 10) * (-1 / x) + a[0] + (x ? f (x) : 'c')); } ]], [[(0 < ((DBL_MAX_EXP < LDBL_MAX_EXP) + (DBL_MANT_DIG < LDBL_MANT_DIG) - (LDBL_MAX_EXP < DBL_MAX_EXP) - (LDBL_MANT_DIG < DBL_MANT_DIG))) && (int) LDBL_EPSILON == 0 ]])], ac_cv_type_long_double_wider=yes, ac_cv_type_long_double_wider=no)]) if test $ac_cv_type_long_double_wider = yes; then AC_DEFINE([HAVE_LONG_DOUBLE_WIDER], 1, [Define to 1 if the type `long double' works and has more range or precision than `double'.]) fi ])# AC_TYPE_LONG_DOUBLE_WIDER # AC_C_LONG_DOUBLE # ---------------- AU_DEFUN([AC_C_LONG_DOUBLE], [ AC_TYPE_LONG_DOUBLE_WIDER ac_cv_c_long_double=$ac_cv_type_long_double_wider if test $ac_cv_c_long_double = yes; then AC_DEFINE([HAVE_LONG_DOUBLE], 1, [Define to 1 if the type `long double' works and has more range or precision than `double'.]) fi ], [The macro `AC_C_LONG_DOUBLE' is obsolete. You should use `AC_TYPE_LONG_DOUBLE' or `AC_TYPE_LONG_DOUBLE_WIDER' instead.] ) # _AC_TYPE_LONG_LONG_SNIPPET # -------------------------- # Expands to a C program that can be used to test for simultaneous support # of 'long long' and 'unsigned long long'. We don't want to say that # 'long long' is available if 'unsigned long long' is not, or vice versa, # because too many programs rely on the symmetry between signed and unsigned # integer types (excluding 'bool'). AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], [ AC_LANG_PROGRAM( [[/* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63;]], [[/* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull));]]) ]) # AC_TYPE_LONG_LONG_INT # --------------------- AC_DEFUN([AC_TYPE_LONG_LONG_INT], [ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], [AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. dnl If cross compiling, assume the bug isn't important, since dnl nobody cross compiles for this platform as far as we know. AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[@%:@include <limits.h> @%:@ifndef LLONG_MAX @%:@ define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) @%:@ define LLONG_MAX (HALF - 1 + HALF) @%:@endif]], [[long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0;]])], [ac_cv_type_long_long_int=yes], [ac_cv_type_long_long_int=no], [ac_cv_type_long_long_int=yes])], [ac_cv_type_long_long_int=no])]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], 1, [Define to 1 if the system has the type `long long int'.]) fi ]) # AC_TYPE_UNSIGNED_LONG_LONG_INT # ------------------------------ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ AC_CACHE_CHECK([for unsigned long long int], [ac_cv_type_unsigned_long_long_int], [AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [ac_cv_type_unsigned_long_long_int=yes], [ac_cv_type_unsigned_long_long_int=no])]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1, [Define to 1 if the system has the type `unsigned long long int'.]) fi ]) # 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 <wchar.h>], [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 <wchar.h> declares mbstate_t.]) else AC_DEFINE([mbstate_t], int, [Define to a type if <wchar.h> 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 <sys/types.h> doesn't define.]) AC_DEFINE(gid_t, int, [Define to `int' if <sys/types.h> doesn't define.]) fi ]) AN_IDENTIFIER([size_t], [AC_TYPE_SIZE_T]) AC_DEFUN([AC_TYPE_SIZE_T], [AC_CHECK_TYPE(size_t, unsigned int)]) AN_IDENTIFIER([ssize_t], [AC_TYPE_SSIZE_T]) AC_DEFUN([AC_TYPE_SSIZE_T], [AC_CHECK_TYPE(ssize_t, int)]) 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 int)]) AN_IDENTIFIER([mode_t], [AC_TYPE_MODE_T]) AC_DEFUN([AC_TYPE_MODE_T], [AC_CHECK_TYPE(mode_t, int)]) AN_IDENTIFIER([int8_t], [AC_TYPE_INT8_T]) AN_IDENTIFIER([int16_t], [AC_TYPE_INT16_T]) AN_IDENTIFIER([int32_t], [AC_TYPE_INT32_T]) AN_IDENTIFIER([int64_t], [AC_TYPE_INT64_T]) AN_IDENTIFIER([uint8_t], [AC_TYPE_UINT8_T]) AN_IDENTIFIER([uint16_t], [AC_TYPE_UINT16_T]) AN_IDENTIFIER([uint32_t], [AC_TYPE_UINT32_T]) AN_IDENTIFIER([uint64_t], [AC_TYPE_UINT64_T]) AC_DEFUN([AC_TYPE_INT8_T], [_AC_TYPE_INT(8)]) AC_DEFUN([AC_TYPE_INT16_T], [_AC_TYPE_INT(16)]) AC_DEFUN([AC_TYPE_INT32_T], [_AC_TYPE_INT(32)]) AC_DEFUN([AC_TYPE_INT64_T], [_AC_TYPE_INT(64)]) AC_DEFUN([AC_TYPE_UINT8_T], [_AC_TYPE_UNSIGNED_INT(8)]) AC_DEFUN([AC_TYPE_UINT16_T], [_AC_TYPE_UNSIGNED_INT(16)]) AC_DEFUN([AC_TYPE_UINT32_T], [_AC_TYPE_UNSIGNED_INT(32)]) AC_DEFUN([AC_TYPE_UINT64_T], [_AC_TYPE_UNSIGNED_INT(64)]) # _AC_TYPE_INT_BODY # ----------------- # Shell function body for _AC_TYPE_INT. m4_define([_AC_TYPE_INT_BODY], [ AS_LINENO_PUSH([$[]1]) AC_CACHE_CHECK([for int$[]2_t], [$[]3], [AS_VAR_SET([$[]3], [no]) for ac_type in int$[]2_t 'int' 'long int' \ 'long long int' 'short int' 'signed char'; do AC_COMPILE_IFELSE( [AC_LANG_BOOL_COMPILE_TRY( [AC_INCLUDES_DEFAULT], [0 < ($ac_type) (((($ac_type) 1 << ($[]2 - 2)) - 1) * 2 + 1)])], [AC_COMPILE_IFELSE( [AC_LANG_BOOL_COMPILE_TRY( [AC_INCLUDES_DEFAULT], [($ac_type) (((($ac_type) 1 << ($[]2 - 2)) - 1) * 2 + 1) < ($ac_type) (((($ac_type) 1 << ($[]2 - 2)) - 1) * 2 + 2)])], [], [AS_CASE([$ac_type], [int$[]2_t], [AS_VAR_SET([$[]3], [yes])], [AS_VAR_SET([$[]3], [$ac_type])])])]) AS_VAR_IF([$[]3], [no], [], [break]) done]) AS_LINENO_POP ])# _AC_TYPE_INT_BODY # _AC_TYPE_INT(NBITS) # ------------------- # Set a variable ac_cv_c_intNBITS_t to `yes' if intNBITS_t is available, # `no' if it is not and no replacement types could be found, and a C type # if it is not available but a replacement signed integer type of width # exactly NBITS bits was found. In the third case, intNBITS_t is AC_DEFINEd # to type, as well. AC_DEFUN([_AC_TYPE_INT], [AC_REQUIRE_SHELL_FN([ac_fn_c_find_intX_t], [AS_FUNCTION_DESCRIBE([ac_fn_c_find_intX_t], [LINENO BITS VAR], [Finds a signed integer type with width BITS, setting cache variable VAR accordingly.])], [$0_BODY])]dnl [ac_fn_c_find_intX_t "$LINENO" "$1" "ac_cv_c_int$1_t" case $ac_cv_c_int$1_t in #( no|yes) ;; #( *) AC_DEFINE_UNQUOTED([int$1_t], [$ac_cv_c_int$1_t], [Define to the type of a signed integer type of width exactly $1 bits if such a type exists and the standard includes do not define it.]);; esac ])# _AC_TYPE_INT # _AC_TYPE_UNSIGNED_INT_BODY # -------------------------- # Shell function body for _AC_TYPE_UNSIGNED_INT. m4_define([_AC_TYPE_UNSIGNED_INT_BODY], [ AS_LINENO_PUSH([$[]1]) AC_CACHE_CHECK([for uint$[]2_t], $[]3, [AS_VAR_SET([$[]3], [no]) for ac_type in uint$[]2_t 'unsigned int' 'unsigned long int' \ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do AC_COMPILE_IFELSE( [AC_LANG_BOOL_COMPILE_TRY( [AC_INCLUDES_DEFAULT], [($ac_type) -1 >> ($[]2 - 1) == 1])], [AS_CASE([$ac_type], [uint$[]2_t], [AS_VAR_SET([$[]3], [yes])], [AS_VAR_SET([$[]3], [$ac_type])])]) AS_VAR_IF([$[]3], [no], [], [break]) done]) AS_LINENO_POP ])# _AC_TYPE_UNSIGNED_INT_BODY # _AC_TYPE_UNSIGNED_INT(NBITS) # ---------------------------- # Set a variable ac_cv_c_uintNBITS_t to `yes' if uintNBITS_t is available, # `no' if it is not and no replacement types could be found, and a C type # if it is not available but a replacement unsigned integer type of width # exactly NBITS bits was found. In the third case, uintNBITS_t is AC_DEFINEd # to type, as well. AC_DEFUN([_AC_TYPE_UNSIGNED_INT], [AC_REQUIRE_SHELL_FN([ac_fn_c_find_uintX_t], [AS_FUNCTION_DESCRIBE([ac_fn_c_find_uintX_t], [LINENO BITS VAR], [Finds an unsigned integer type with width BITS, setting cache variable VAR accordingly.])], [$0_BODY])]dnl [ac_fn_c_find_uintX_t "$LINENO" "$1" "ac_cv_c_uint$1_t" case $ac_cv_c_uint$1_t in #( no|yes) ;; #( *) m4_bmatch([$1], [^\(8\|32\|64\)$], [AC_DEFINE([_UINT$1_T], 1, [Define for Solaris 2.5.1 so the uint$1_t typedef from <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the #define below would cause a syntax error.])]) AC_DEFINE_UNQUOTED([uint$1_t], [$ac_cv_c_uint$1_t], [Define to the type of an unsigned integer type of width exactly $1 bits if such a type exists and the standard includes do not define it.]);; esac ])# _AC_TYPE_UNSIGNED_INT # AC_TYPE_SIGNAL # -------------- # Note that identifiers starting with SIG are reserved by ANSI C. # C89 requires signal handlers to return void; only K&R returned int; # modern code does not need to worry about using this macro (not to # mention that sigaction is better than signal). AU_DEFUN([AC_TYPE_SIGNAL], [AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([#include <sys/types.h> #include <signal.h> ], [return *(signal (0, 0)) (0) == 1;])], [ac_cv_type_signal=int], [ac_cv_type_signal=void])]) AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal, [Define as the return type of signal handlers (`int' or `void').]) ], [your code may safely assume C89 semantics that RETSIGTYPE is void. Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.]) ## ------------------------ ## ## Checking size of types. ## ## ------------------------ ## # ---------------- # # Generic checks. # # ---------------- # # AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES = DEFAULT-INCLUDES]) # --------------------------------------------------------------- AC_DEFUN([AC_CHECK_SIZEOF], [AS_LITERAL_IF([$1], [], [m4_fatal([$0: requires literal arguments])])]dnl [# The cast to long int 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_CACHE_CHECK_INT([size of $1], [AS_TR_SH([ac_cv_sizeof_$1])], [(long int) (sizeof ($1))], [AC_INCLUDES_DEFAULT([$3])], [if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then AC_MSG_FAILURE([cannot compute sizeof ($1)], 77) else AS_TR_SH([ac_cv_sizeof_$1])=0 fi]) AC_DEFINE_UNQUOTED(AS_TR_CPP(sizeof_$1), $AS_TR_SH([ac_cv_sizeof_$1]), [The size of `$1', as computed by sizeof.]) ])# AC_CHECK_SIZEOF # AC_CHECK_ALIGNOF(TYPE, [INCLUDES = DEFAULT-INCLUDES]) # ----------------------------------------------------- AC_DEFUN([AC_CHECK_ALIGNOF], [AS_LITERAL_IF([$1], [], [m4_fatal([$0: requires literal arguments])])]dnl [# The cast to long int works around a bug in the HP C Compiler, # see AC_CHECK_SIZEOF for more information. _AC_CACHE_CHECK_INT([alignment of $1], [AS_TR_SH([ac_cv_alignof_$1])], [(long int) offsetof (ac__type_alignof_, y)], [AC_INCLUDES_DEFAULT([$2]) #ifndef offsetof # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0) #endif typedef struct { char x; $1 y; } ac__type_alignof_;], [if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then AC_MSG_FAILURE([cannot compute alignment of $1], 77) else AS_TR_SH([ac_cv_alignof_$1])=0 fi]) AC_DEFINE_UNQUOTED(AS_TR_CPP(alignof_$1), $AS_TR_SH([ac_cv_alignof_$1]), [The normal alignment of `$1', in bytes.]) ])# AC_CHECK_ALIGNOF # AU::AC_INT_16_BITS # ------------------ # What a great name :) AU_DEFUN([AC_INT_16_BITS], [AC_CHECK_SIZEOF([int]) test $ac_cv_sizeof_int = 2 && AC_DEFINE(INT_16_BITS, 1, [Define to 1 if `sizeof (int)' = 2. Obsolete, use `SIZEOF_INT'.]) ], [your code should no longer depend upon `INT_16_BITS', but upon `SIZEOF_INT == 2'. Remove this warning and the `AC_DEFINE' when you adjust the code.]) # AU::AC_LONG_64_BITS # ------------------- AU_DEFUN([AC_LONG_64_BITS], [AC_CHECK_SIZEOF([long int]) 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'.]) ], [your code should no longer depend upon `LONG_64_BITS', but upon `SIZEOF_LONG_INT == 8'. Remove this warning and the `AC_DEFINE' when you adjust the code.]) ## -------------------------- ## ## Generic structure checks. ## ## -------------------------- ## # ---------------- # # Generic checks. # # ---------------- # # _AC_CHECK_MEMBER_BODY # --------------------- # Shell function body for AC_CHECK_MEMBER. m4_define([_AC_CHECK_MEMBER_BODY], [ AS_LINENO_PUSH([$[]1]) AC_CACHE_CHECK([for $[]2.$[]3], [$[]4], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$[]5], [static $[]2 ac_aggr; if (ac_aggr.$[]3) return 0;])], [AS_VAR_SET([$[]4], [yes])], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$[]5], [static $[]2 ac_aggr; if (sizeof ac_aggr.$[]3) return 0;])], [AS_VAR_SET([$[]4], [yes])], [AS_VAR_SET([$[]4], [no])])])]) AS_LINENO_POP ])dnl # AC_CHECK_MEMBER(AGGREGATE.MEMBER, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES = DEFAULT-INCLUDES]) # --------------------------------------------------------- # AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell # variables are not a valid argument. AC_DEFUN([AC_CHECK_MEMBER], [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_member], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_member], [LINENO AGGR MEMBER VAR INCLUDES], [Tries to find if the field MEMBER exists in type AGGR, after including INCLUDES, setting cache variable VAR accordingly.])], [_$0_BODY])]dnl [AS_LITERAL_IF([$1], [], [m4_fatal([$0: requires literal arguments])])]dnl [m4_if(m4_index([$1], [.]), -1, [m4_fatal([$0: Did not see any dot in `$1'])])]dnl [AS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])]dnl [ac_fn_[]_AC_LANG_ABBREV[]_check_member "$LINENO" ]dnl [m4_bpatsubst([$1], [^\([^.]*\)\.\(.*\)], ["\1" "\2"]) "ac_Member" ]dnl ["AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])" AS_VAR_IF([ac_Member], [yes], [$2], [$3]) AS_VAR_POPDEF([ac_Member])dnl ])# AC_CHECK_MEMBER # _AC_CHECK_MEMBERS(AGGREGATE.MEMBER) # ----------------------------------- # Helper to AC_CHECK_MEMBERS, which generates two of the four # arguments to AC_CHECK_MEMBER that are based on AGGREGATE and MEMBER. m4_define([_AC_CHECK_MEMBERS], [[$1], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1], [Define to 1 if `]m4_bpatsubst([$1], [^\([^.]*\)\.\(.*\)], [[\1' is a member of `\2]])['.])]]) # AC_CHECK_MEMBERS([AGGREGATE.MEMBER, ...], # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND] # [INCLUDES = DEFAULT-INCLUDES]) # --------------------------------------------------------- # The first argument is an m4 list. AC_DEFUN([AC_CHECK_MEMBERS], [m4_map_args_sep([AC_CHECK_MEMBER(_$0(], [)[ $2], [$3], [$4])], [], $1)]) # ------------------------------------------------------- # # 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_DIRENT(MEMBER) # ------------------------- AC_DEFUN([_AC_STRUCT_DIRENT], [ AC_REQUIRE([AC_HEADER_DIRENT]) AC_CHECK_MEMBERS([struct dirent.$1], [], [], [[ #include <sys/types.h> #ifdef HAVE_DIRENT_H # include <dirent.h> #else # define dirent direct # ifdef HAVE_SYS_NDIR_H # include <sys/ndir.h> # endif # ifdef HAVE_SYS_DIR_H # include <sys/dir.h> # endif # ifdef HAVE_NDIR_H # include <ndir.h> # endif #endif ]]) ]) # AC_STRUCT_DIRENT_D_INO # ----------------------------------- AC_DEFUN([AC_STRUCT_DIRENT_D_INO], [_AC_STRUCT_DIRENT([d_ino])]) # AC_STRUCT_DIRENT_D_TYPE # ------------------------------------ AC_DEFUN([AC_STRUCT_DIRENT_D_TYPE], [_AC_STRUCT_DIRENT([d_type])]) # AC_STRUCT_ST_BLKSIZE # -------------------- AU_DEFUN([AC_STRUCT_ST_BLKSIZE], [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.])]) ], [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_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_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.])]) ], [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_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? 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 <sys/types.h> #include <time.h> ], [struct tm tm; int *p = &tm.tm_sec; return !p;])], [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 <sys/time.h> 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 <sys/types.h> #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_CHECK_DECLS([tzname], , , [#include <time.h>]) AC_CACHE_CHECK(for tzname, ac_cv_var_tzname, [AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#include <time.h> #if !HAVE_DECL_TZNAME extern char *tzname[]; #endif ]], [[return tzname[0][0];]])], [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.64_2.64+dfsg.orig/lib/autoconf/oldnames.m4������������������������������������������������0000644�0001750�0001750�00000012135�11202536433�020670� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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.64_2.64+dfsg.orig/lib/autoconf/erlang.m4��������������������������������������������������0000644�0001750�0001750�00000025502�11232214435�020336� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Erlang/OTP language support. # Copyright (C) 2006, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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 Romain Lenglet. # Table of Contents: # # 0. Utility macros # # 1. Language selection # and routines to produce programs in a given language. # # 2. Producing programs in a given language. # # 3. Looking for a compiler # And possibly the associated preprocessor. ## ------------------- ## ## 0. Utility macros. ## ## ------------------- ## # AC_ERLANG_PATH_ERLC([VALUE-IF-NOT-FOUND], [PATH]) # ------------------------------------------------- AC_DEFUN([AC_ERLANG_PATH_ERLC], [AC_ARG_VAR([ERLC], [Erlang/OTP compiler command [autodetected]])dnl if test -n "$ERLC"; then AC_MSG_CHECKING([for erlc]) AC_MSG_RESULT([$ERLC]) else AC_PATH_TOOL(ERLC, erlc, [$1], [$2]) fi AC_ARG_VAR([ERLCFLAGS], [Erlang/OTP compiler flags [none]])dnl ]) # AC_ERLANG_NEED_ERLC([PATH]) # --------------------------- AC_DEFUN([AC_ERLANG_NEED_ERLC], [AC_ERLANG_PATH_ERLC([not found], [$1]) if test "$ERLC" = "not found"; then AC_MSG_ERROR([Erlang/OTP compiler (erlc) not found but required]) fi ]) # AC_ERLANG_PATH_ERL([VALUE-IF-NOT-FOUND], [PATH]) # ------------------------------------------------ AC_DEFUN([AC_ERLANG_PATH_ERL], [AC_ARG_VAR([ERL], [Erlang/OTP interpreter command [autodetected]])dnl if test -n "$ERL"; then AC_MSG_CHECKING([for erl]) AC_MSG_RESULT([$ERL]) else AC_PATH_TOOL(ERL, erl, [$1], [$2])[]dnl fi ]) # AC_ERLANG_NEED_ERL([PATH]) # -------------------------- AC_DEFUN([AC_ERLANG_NEED_ERL], [AC_ERLANG_PATH_ERL([not found], [$1]) if test "$ERL" = "not found"; then AC_MSG_ERROR([Erlang/OTP interpreter (erl) not found but required]) fi ]) ## ----------------------- ## ## 1. Language selection. ## ## ----------------------- ## # AC_LANG(Erlang) # --------------- AC_LANG_DEFINE([Erlang], [erl], [ERL], [], [ac_ext=erl ac_compile='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&AS_MESSAGE_LOG_FD' ac_link='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&AS_MESSAGE_LOG_FD ; echo "[#]!/bin/sh" > conftest$ac_exeext ; AS_ECHO(["\"$ERL\" -run conftest start -run init stop -noshell"]) >> conftest$ac_exeext ; chmod +x conftest$ac_exeext' ]) # AC_LANG_ERLANG # ----------------- AU_DEFUN([AC_LANG_ERLANG], [AC_LANG(Erlang)]) ## ----------------------- ## ## 2. Producing programs. ## ## ----------------------- ## # AC_LANG_PROGRAM(Erlang)([PROLOGUE], [BODY]) # ------------------------------------------- m4_define([AC_LANG_PROGRAM(Erlang)], [[-module(conftest). -export([start/0]).]] [$1 start() -> $2 . ]) # _AC_LANG_IO_PROGRAM(Erlang) # --------------------------- # Produce source that performs I/O. m4_define([_AC_LANG_IO_PROGRAM(Erlang)], [AC_LANG_PROGRAM([], [dnl ReturnValue = case file:write_file("conftest.out", "") of {error, _} -> 1; ok -> 0 end, halt(ReturnValue)])]) ## -------------------------------------------- ## ## 3. Looking for Compilers and Preprocessors. ## ## -------------------------------------------- ## # AC_LANG_PREPROC(Erlang) # ----------------------- # Find the Erlang preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. AC_DEFUN([AC_LANG_PREPROC(Erlang)], [m4_warn([syntax], [$0: No preprocessor defined for ]_AC_LANG)]) # AC_LANG_COMPILER(Erlang) # ------------------------ # Find the Erlang compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able. AC_DEFUN([AC_LANG_COMPILER(Erlang)], [AC_REQUIRE([AC_ERLANG_PATH_ERLC])]) # AC_ERLANG_CHECK_LIB(LIBRARY, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ---------------------------------------------------------------------- # Macro for checking if an Erlang library is installed, and to # determine its version. AC_DEFUN([AC_ERLANG_CHECK_LIB], [AC_REQUIRE([AC_ERLANG_PATH_ERLC])[]dnl AC_REQUIRE([AC_ERLANG_PATH_ERL])[]dnl AC_CACHE_CHECK([for Erlang/OTP '$1' library subdirectory], [ac_cv_erlang_lib_dir_$1], [AC_LANG_PUSH(Erlang)[]dnl AC_RUN_IFELSE( [AC_LANG_PROGRAM([], [dnl ReturnValue = case code:lib_dir("[$1]") of {error, bad_name} -> file:write_file("conftest.out", "not found\n"), 1; LibDir -> file:write_file("conftest.out", LibDir), 0 end, halt(ReturnValue)])], [ac_cv_erlang_lib_dir_$1=`cat conftest.out` rm -f conftest.out], [if test ! -f conftest.out; then AC_MSG_FAILURE([test Erlang program execution failed]) else ac_cv_erlang_lib_dir_$1="not found" rm -f conftest.out fi]) AC_LANG_POP(Erlang)[]dnl ]) AC_CACHE_CHECK([for Erlang/OTP '$1' library version], [ac_cv_erlang_lib_ver_$1], [AS_IF([test "$ac_cv_erlang_lib_dir_$1" = "not found"], [ac_cv_erlang_lib_ver_$1="not found"], [ac_cv_erlang_lib_ver_$1=`AS_ECHO(["$ac_cv_erlang_lib_dir_$1"]) | sed -n -e 's,^.*-\([[^/-]]*\)$,\1,p'`])[]dnl ]) AC_SUBST([ERLANG_LIB_DIR_$1], [$ac_cv_erlang_lib_dir_$1]) AC_SUBST([ERLANG_LIB_VER_$1], [$ac_cv_erlang_lib_ver_$1]) AS_IF([test "$ac_cv_erlang_lib_dir_$1" = "not found"], [$3], [$2]) ])# AC_ERLANG_CHECK_LIB # AC_ERLANG_SUBST_ROOT_DIR # ------------------------ # Determines the Erlang/OTP root directory. AC_DEFUN([AC_ERLANG_SUBST_ROOT_DIR], [AC_REQUIRE([AC_ERLANG_NEED_ERLC])[]dnl AC_REQUIRE([AC_ERLANG_NEED_ERL])[]dnl AC_CACHE_CHECK([for Erlang/OTP root directory], [ac_cv_erlang_root_dir], [AC_LANG_PUSH(Erlang)[]dnl AC_RUN_IFELSE( [AC_LANG_PROGRAM([], [dnl RootDir = code:root_dir(), file:write_file("conftest.out", RootDir), ReturnValue = 0, halt(ReturnValue)])], [ac_cv_erlang_root_dir=`cat conftest.out` rm -f conftest.out], [rm -f conftest.out AC_MSG_FAILURE([test Erlang program execution failed])]) AC_LANG_POP(Erlang)[]dnl ]) AC_SUBST([ERLANG_ROOT_DIR], [$ac_cv_erlang_root_dir]) ])# AC_ERLANG_SUBST_ROOT_DIR # AC_ERLANG_SUBST_LIB_DIR # ----------------------- AC_DEFUN([AC_ERLANG_SUBST_LIB_DIR], [AC_REQUIRE([AC_ERLANG_NEED_ERLC])[]dnl AC_REQUIRE([AC_ERLANG_NEED_ERL])[]dnl AC_CACHE_CHECK([for Erlang/OTP library base directory], [ac_cv_erlang_lib_dir], [AC_LANG_PUSH(Erlang)[]dnl AC_RUN_IFELSE( [AC_LANG_PROGRAM([], [dnl LibDir = code:lib_dir(), file:write_file("conftest.out", LibDir), ReturnValue = 0, halt(ReturnValue)])], [ac_cv_erlang_lib_dir=`cat conftest.out` rm -f conftest.out], [rm -f conftest.out AC_MSG_FAILURE([test Erlang program execution failed])]) AC_LANG_POP(Erlang)[]dnl ]) AC_SUBST([ERLANG_LIB_DIR], [$ac_cv_erlang_lib_dir]) ])# AC_ERLANG_SUBST_LIB_DIR # AC_ERLANG_SUBST_INSTALL_LIB_DIR # ------------------------------- # Directories for installing Erlang/OTP packages are separated from the # directories determined by running the Erlang/OTP installation that is used # for building. AC_DEFUN([AC_ERLANG_SUBST_INSTALL_LIB_DIR], [AC_MSG_CHECKING([for Erlang/OTP library installation base directory]) AC_ARG_VAR([ERLANG_INSTALL_LIB_DIR], [Erlang/OTP library installation base directory [LIBDIR/erlang/lib]]) if test -n "$ERLANG_INSTALL_LIB_DIR"; then AC_MSG_RESULT([$ERLANG_INSTALL_LIB_DIR]) else AC_SUBST([ERLANG_INSTALL_LIB_DIR], ['${libdir}/erlang/lib']) AC_MSG_RESULT([$libdir/erlang/lib]) fi ])# AC_ERLANG_SUBST_INSTALL_LIB_DIR # AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(PACKAGE_TARNAME, PACKAGE_VERSION) # -------------------------------------------------------------------- AC_DEFUN([AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR], [AC_REQUIRE([AC_ERLANG_SUBST_INSTALL_LIB_DIR])[]dnl AC_MSG_CHECKING([for Erlang/OTP '$1' library installation subdirectory]) AC_ARG_VAR([ERLANG_INSTALL_LIB_DIR_$1], [Erlang/OTP '$1' library installation subdirectory [ERLANG_INSTALL_LIB_DIR/$1-$2]]) if test -n "$ERLANG_INSTALL_LIB_DIR_$1"; then AC_MSG_RESULT([$ERLANG_INSTALL_LIB_DIR_$1]) else AC_SUBST([ERLANG_INSTALL_LIB_DIR_$1], ['${ERLANG_INSTALL_LIB_DIR}/$1-$2']) AC_MSG_RESULT([$ERLANG_INSTALL_LIB_DIR/$1-$2]) fi ])# AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR # AC_ERLANG_SUBST_ERTS_VER # ------------------------ # Determines the Erlang runtime system version. AC_DEFUN([AC_ERLANG_SUBST_ERTS_VER], [AC_REQUIRE([AC_ERLANG_NEED_ERLC])[]dnl AC_REQUIRE([AC_ERLANG_NEED_ERL])[]dnl AC_CACHE_CHECK([for Erlang/OTP ERTS version], [ac_cv_erlang_erts_ver], [AC_LANG_PUSH([Erlang])[]dnl AC_RUN_IFELSE( [AC_LANG_PROGRAM([], [dnl Version = erlang:system_info(version), file:write_file("conftest.out", Version), ReturnValue = 0, halt(ReturnValue)])], [ac_cv_erlang_erts_ver=`cat conftest.out` rm -f conftest.out], [rm -f conftest.out AC_MSG_FAILURE([test Erlang program execution failed])]) AC_LANG_POP([Erlang])[]dnl ]) AC_SUBST([ERLANG_ERTS_VER], [$ac_cv_erlang_erts_ver]) ])# AC_ERLANG_SUBST_ERTS_VER ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/libs.m4����������������������������������������������������0000644�0001750�0001750�00000042325�11202536433�020023� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Checking for libraries. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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], [AS_VAR_PUSHDEF([ac_Search], [ac_cv_search_$1])dnl AC_CACHE_CHECK([for library containing $1], [ac_Search], [ac_func_search_save_LIBS=$LIBS AC_LANG_CONFTEST([AC_LANG_CALL([], [$1])]) for ac_lib in '' $2; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS" fi AC_LINK_IFELSE([], [AS_VAR_SET([ac_Search], [$ac_res])]) AS_VAR_SET_IF([ac_Search], [break]) done AS_VAR_SET_IF([ac_Search], , [AS_VAR_SET([ac_Search], [no])]) rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS]) AS_VAR_COPY([ac_res], [ac_Search]) AS_IF([test "$ac_res" != no], [test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $3], [$4]) AS_VAR_POPDEF([ac_Search])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_VAR_IF([ac_Lib], [yes], [m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1)) LIBS="-l$1 $LIBS" ])], [$4]) 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], [AC_ARG_VAR(XMKMF, [Path to xmkmf, Makefile generator for X Window System])dnl rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; 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) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r 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/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /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 Xlib.h. # First, try using that file with no special directory specified. AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Xlib.h>])], [# 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/Xlib.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="-lX11 $LIBS" AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Xlib.h>], [XrmInitialize ()])], [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 `AS_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 dylib la dll; do if test -r "$ac_dir/libX11.$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 case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # 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'" esac])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 case $x_includes,$x_libraries in #( *\'*) AC_MSG_ERROR([cannot use X directory names containing ']);; #( *,NONE | NONE,*) _AC_PATH_X;; #( *) have_x=yes;; esac 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" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . AC_MSG_CHECKING([whether -R must be followed by a space]) ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_[]_AC_LANG_ABBREV[]_werror_flag=$ac_[]_AC_LANG_ABBREV[]_werror_flag ac_[]_AC_LANG_ABBREV[]_werror_flag=yes AC_LINK_IFELSE([AC_LANG_PROGRAM()], [AC_MSG_RESULT([no]) X_LIBS="$X_LIBS -R$x_libraries"], [LIBS="$ac_xsave_LIBS -R $x_libraries" AC_LINK_IFELSE([AC_LANG_PROGRAM()], [AC_MSG_RESULT([yes]) X_LIBS="$X_LIBS -R $x_libraries"], [AC_MSG_RESULT([neither works])])]) ac_[]_AC_LANG_ABBREV[]_werror_flag=$ac_xsave_[]_AC_LANG_ABBREV[]_werror_flag LIBS=$ac_xsave_LIBS 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.64_2.64+dfsg.orig/lib/autoconf/autoscan.m4������������������������������������������������0000644�0001750�0001750�00000006436�11202536433�020712� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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.64_2.64+dfsg.orig/lib/autoconf/programs.m4������������������������������������������������0000644�0001750�0001750�00000074322�11202536433�020726� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Checking for programs. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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" _AS_ECHO_LOG([found $as_dir/$ac_word$ac_exec_ext]) 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_CHECK_PROG # AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, # [VALUE-IF-FOUND], [VALUE-IF-NOT-FOUND], # [PATH], [REJECT]) # ----------------------------------------------------- AC_DEFUN([AC_CHECK_PROG], [_AC_CHECK_PROG($@) AC_SUBST([$1])dnl ]) # 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" _AS_ECHO_LOG([found $as_dir/$ac_word$ac_exec_ext]) 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 $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_PROG(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH]) # ----------------------------------------------------------------------- AC_DEFUN([AC_PATH_PROG], [_AC_PATH_PROG($@) AC_SUBST([$1])dnl ]) # 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_TOOL_WARN # ------------- AC_DEFUN([_AC_TOOL_WARN], [case $cross_compiling:$ac_tool_warned in yes:) AC_MSG_WARN([using cross tools not prefixed with host triplet]) ac_tool_warned=yes ;; esac]) # 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], [], [$4]) if test "x$ac_pt_$1" = x; then $1="$3" else _AC_TOOL_WARN $1=$ac_pt_$1 fi 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], [], [$4]) if test "x$ac_ct_$1" = x; then $1="$3" else _AC_TOOL_WARN $1=$ac_ct_$1 fi 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], [], [$4]) if test "x$ac_ct_$1" = x; then $1="$3" else _AC_TOOL_WARN $1=$ac_ct_$1 fi fi ])# AC_CHECK_TOOLS # AC_PATH_TARGET_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_TARGET_TOOL], [AC_REQUIRE([AC_CANONICAL_TARGET])dnl AC_PATH_PROG([$1], [$target_alias-$2], , [$4]) if test -z "$ac_cv_path_$1"; then if test "$build" = "$target"; then ac_pt_$1=$$1 _AC_PATH_PROG([ac_pt_$1], [$2], [$3], [$4]) $1=$ac_pt_$1 else $1="$3" fi else $1="$ac_cv_path_$1" fi ])# AC_PATH_TARGET_TOOL # AC_CHECK_TARGET_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_TARGET_TOOL], [AC_REQUIRE([AC_CANONICAL_TARGET])dnl AC_CHECK_PROG([$1], [$target_alias-$2], [$target_alias-$2], , [$4]) if test -z "$ac_cv_prog_$1"; then if test "$build" = "$target"; then ac_ct_$1=$$1 _AC_CHECK_PROG([ac_ct_$1], [$2], [$2], [$3], [$4]) $1=$ac_ct_$1 else $1="$3" fi else $1="$ac_cv_prog_$1" fi ])# AC_CHECK_TARGET_TOOL # AC_CHECK_TARGET_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_TARGET_TOOLS], [AC_REQUIRE([AC_CANONICAL_TARGET])dnl for ac_prog in $2 do AC_CHECK_PROG([$1], [$target_alias-$ac_prog], [$target_alias-$ac_prog],, [$4]) test -n "$$1" && break done if test -z "$$1"; then if test "$build" = "$target"; then ac_ct_$1=$$1 AC_CHECK_PROGS([ac_ct_$1], [$2], [$3], [$4]) $1=$ac_ct_$1 else $1="$3" fi fi ])# AC_CHECK_TARGET_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_REQUIRE([AC_PROG_GREP])dnl AC_CACHE_CHECK([for egrep], ac_cv_path_EGREP, [if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else _AC_PROG_GREP(EGREP, egrep, ['EGREP$']) fi]) EGREP="$ac_cv_path_EGREP" AC_SUBST([EGREP]) ])# AC_PROG_EGREP # AC_PROG_FGREP # ------------- AC_DEFUN([AC_PROG_FGREP], [AC_REQUIRE([AC_PROG_GREP])dnl AC_CACHE_CHECK([for fgrep], ac_cv_path_FGREP, [if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else _AC_PROG_GREP(FGREP, fgrep, [FGREP]) fi]) FGREP="$ac_cv_path_FGREP" AC_SUBST([FGREP]) ])# AC_PROG_FGREP # AC_PROG_GREP # ------------ # Check for a fully functional grep program that handles # the longest lines possible and which respects multiple -e options. # Prefer GNU grep if found. AC_DEFUN([AC_PROG_GREP], [AC_CACHE_CHECK([for grep that handles long lines and -e], ac_cv_path_GREP, [_$0(GREP, [grep ggrep], [-e 'GREP$' -e '-(cannot match)-'])]) GREP="$ac_cv_path_GREP" AC_SUBST([GREP]) ]) # _AC_PROG_GREP(VARIABLE, PROGNAME-LIST, PROG-ARGUMENTS) # ------------------------------------------------------ # Solaris 9 /usr/xpg4/bin/*grep is suitable, but /usr/bin/*grep lacks -e. # AIX silently truncates long lines before matching. # NeXT understands only one -e and truncates long lines. m4_define([_AC_PROG_GREP], [_AC_PATH_PROGS_FEATURE_CHECK([$1], [$2], [_AC_FEATURE_CHECK_LENGTH([ac_path_$1], [ac_cv_path_$1], ["$ac_path_$1" $3], [$1])], [], [$PATH$PATH_SEPARATOR/usr/xpg4/bin])dnl ]) # _AC_PATH_PROGS_FEATURE_CHECK(VARIABLE, PROGNAME-LIST, FEATURE-TEST, # [ACTION-IF-NOT-FOUND], [PATH=$PATH]) # ------------------------------------------------------------------- # FEATURE-TEST is called repeatedly with $ac_path_VARIABLE set to the # name of a program in PROGNAME-LIST found in PATH. FEATURE-TEST must set # $ac_cv_path_VARIABLE to the path of an acceptable program, or else # ACTION-IF-NOT-FOUND is executed; the default action (for internal use # only) issues a fatal error message. If a suitable $ac_path_VARIABLE is # found in the FEATURE-TEST macro, it can set $ac_path_VARIABLE_found=':' # to accept that value without any further checks. m4_define([_AC_PATH_PROGS_FEATURE_CHECK], [if test -z "$$1"; then ac_path_$1_found=false # Loop through the user's path and test for each of PROGNAME-LIST _AS_PATH_WALK([$5], [for ac_prog in $2; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_$1="$as_dir/$ac_prog$ac_exec_ext" AS_EXECUTABLE_P(["$ac_path_$1"]) || continue $3 $ac_path_$1_found && break 3 done done])dnl if test -z "$ac_cv_path_$1"; then m4_default([$4], [AC_MSG_ERROR([no acceptable m4_bpatsubst([$2], [ .*]) could be dnl found in m4_default([$5], [\$PATH])])]) fi else ac_cv_path_$1=$$1 fi ]) # AC_PATH_PROGS_FEATURE_CHECK(VARIABLE, PROGNAME-LIST, # FEATURE-TEST, [ACTION-IF-NOT-FOUND=:], # [PATH=$PATH]) # ---------------------------------------------------------------- # Designed to be used inside AC_CACHE_VAL. It is recommended, # but not required, that the user also use AC_ARG_VAR([VARIABLE]). # If VARIABLE is not empty, set the cache variable # $ac_cv_path_VARIABLE to VARIABLE without any further tests. # Otherwise, call FEATURE_TEST repeatedly with $ac_path_VARIABLE # set to the name of a program in PROGNAME-LIST found in PATH. If # no invocation of FEATURE-TEST sets $ac_cv_path_VARIABLE to the # path of an acceptable program, ACTION-IF-NOT-FOUND is executed. # FEATURE-TEST is invoked even when $ac_cv_path_VARIABLE is set, # in case a better candidate occurs later in PATH; to accept the # current setting and bypass further checks, FEATURE-TEST can set # $ac_path_VARIABLE_found=':'. Note that, unlike AC_CHECK_PROGS, # this macro does not have any side effect on the current value # of VARIABLE. m4_define([AC_PATH_PROGS_FEATURE_CHECK], [_$0([$1], [$2], [$3], m4_default([$4], [:]), [$5])dnl ]) # _AC_FEATURE_CHECK_LENGTH(PROGPATH, CACHE-VAR, CHECK-CMD, [MATCH-STRING]) # ------------------------------------------------------------------------ # For use as the FEATURE-TEST argument to _AC_PATH_PROGS_FEATURE_TEST. # On each iteration run CHECK-CMD on an input file, storing the value # of PROGPATH in CACHE-VAR if the CHECK-CMD succeeds. The input file # is always one line, starting with only 10 characters, and doubling # in length at each iteration until approx 10000 characters or the # feature check succeeds. The feature check is called at each # iteration by appending (optionally, MATCH-STRING and) a newline # to the file, and using the result as input to CHECK-CMD. m4_define([_AC_FEATURE_CHECK_LENGTH], [# Check for GNU $1 and select it if it is found. _AC_PATH_PROG_FLAVOR_GNU([$$1], [$2="$$1" $1_found=:], [ac_count=0 AS_ECHO_N([0123456789]) >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" AS_ECHO(['$4']) >> "conftest.nl" $3 < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break AS_VAR_ARITH([ac_count], [$ac_count + 1]) if test $ac_count -gt ${$1_max-0}; then # Best one so far, save it but keep looking for a better one $2="$$1" dnl # Using $1_max so that each tool feature checked gets its dnl # own variable. Don't reset it otherwise the implied search dnl # for best performing tool in a list breaks down. $1_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out])dnl ]) # _AC_PATH_PROG_FLAVOR_GNU(PROGRAM-PATH, IF-SUCCESS, [IF-FAILURE]) # ---------------------------------------------------------------- m4_define([_AC_PATH_PROG_FLAVOR_GNU], [# Check for GNU $1 case `"$1" --version 2>&1` in *GNU*) $2;; m4_ifval([$3], [*) $3;; ])esac ])# _AC_PATH_PROG_FLAVOR_GNU # AC_PROG_INSTALL # --------------- AN_MAKEVAR([INSTALL], [AC_PROG_INSTALL]) AN_PROGRAM([install], [AC_PROG_INSTALL]) AC_DEFUN_ONCE([AC_PROG_INSTALL], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_REQUIRE_AUX_FILE([install-sh])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. # Reject install programs that cannot install multiple files. 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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac ]) rm -rf conftest.one conftest.two conftest.dir ])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. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi dnl Do special magic for INSTALL instead of AC_SUBST, to get dnl relative names 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_MKDIR_P # --------------- # Check whether `mkdir -p' is known to be thread-safe, and fall back to # install-sh -d otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are vulnerable to race conditions: # if a parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to known race-free implementations. # # Automake used to define mkdir_p as `mkdir -p .', in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However we don't do # that for MKDIR_P. # 1. before we restricted the check to GNU mkdir, `mkdir -p .' was # reported to fail in read-only directories. The system where this # happened has been forgotten. # 2. in practice we call $(MKDIR_P) on directories such as # $(MKDIR_P) "$(DESTDIR)$(somedir)" # and we don't want to create $(DESTDIR) if $(somedir) is empty. # To support the latter case, we have to write # test -z "$(somedir)" || $(MKDIR_P) "$(DESTDIR)$(somedir)" # so $(MKDIR_P) always has an argument. # We will have better chances of detecting a missing test if # $(MKDIR_P) complains about missing arguments. # 3. $(MKDIR_P) is named after `mkdir -p' and we don't expect this # to accept no argument. # 4. having something like `mkdir .' in the output is unsightly. # # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create. AN_MAKEVAR([MKDIR_P], [AC_PROG_MKDIR_P]) AC_DEFUN_ONCE([AC_PROG_MKDIR_P], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_REQUIRE_AUX_FILE([install-sh])dnl AC_MSG_CHECKING([for a thread-safe mkdir -p]) if test -z "$MKDIR_P"; then AC_CACHE_VAL([ac_cv_path_mkdir], [_AS_PATH_WALK([$PATH$PATH_SEPARATOR/opt/sfw/bin], [for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]) || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done])]) if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi dnl status.m4 does special magic for MKDIR_P instead of AC_SUBST, dnl to get relative names right. However, also AC_SUBST here so dnl that Automake versions before 1.10 will pick it up (they do not dnl trace AC_SUBST_TRACE). dnl FIXME: Remove this once we drop support for Automake < 1.10. AC_SUBST([MKDIR_P])dnl AC_MSG_RESULT([$MKDIR_P]) ])# AC_PROG_MKDIR_P # 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 "x$LEX" != "x:"; then _AC_PROG_LEX_YYTEXT_DECL fi]) # _AC_PROG_LEX_YYTEXT_DECL # ------------------------ # Check for the Lex output root, the Lex library, and whether Lex # declares yytext as a char * by default. m4_define([_AC_PROG_LEX_YYTEXT_DECL], [cat >conftest.l <<_ACEOF[ %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { yyless (input () != 0); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } ]_ACEOF _AC_DO_VAR(LEX conftest.l) AC_CACHE_CHECK([lex output file root], [ac_cv_prog_lex_root], [ 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]) AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root])dnl if test -z "${LEXLIB+set}"; then AC_CACHE_CHECK([lex library], [ac_cv_lib_lex], [ ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" AC_LINK_IFELSE([`cat $LEX_OUTPUT_ROOT.c`], [ac_cv_lib_lex=$ac_lib]) test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS ]) test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi AC_SUBST(LEXLIB) 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 ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" AC_LINK_IFELSE( [#define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c`], [ac_cv_prog_lex_yytext_pointer=yes]) LIBS=$ac_save_LIBS ]) 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 rm -f conftest.l $LEX_OUTPUT_ROOT.c ])# _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 does not do so automatically. If Make # does not run the test Makefile, we assume that the Make program the user will # invoke does set $(MAKE). This is typical, and emitting `MAKE=foomake' is # always wrong if `foomake' is not available or does not work. 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 x ${MAKE-make} ac_make=`AS_ECHO(["$[2]"]) | sed 's/+/p/g; s/[[^a-zA-Z0-9_]]/_/g'` AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set, [cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make])dnl if eval test \$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], [], [$0 is no longer supported. Remove this warning when you adjust the code.]) # AC_PROG_SED # ----------- # Check for a fully functional sed program that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([AC_PROG_SED], [AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED, [dnl ac_script should not contain more than 99 commands (for HP-UX sed), dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed. ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed AS_UNSET([ac_script]) _AC_PATH_PROGS_FEATURE_CHECK(SED, [sed gsed], [_AC_FEATURE_CHECK_LENGTH([ac_path_SED], [ac_cv_path_SED], ["$ac_path_SED" -f conftest.sed])])]) SED="$ac_cv_path_SED" AC_SUBST([SED])dnl rm -f conftest.sed ])# AC_PROG_SED # AC_PROG_YACC # ------------ AN_MAKEVAR([BISON], [AC_PROG_YACC]) AN_MAKEVAR([YACC], [AC_PROG_YACC]) AN_MAKEVAR([YFLAGS], [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)dnl AC_ARG_VAR(YACC, [The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'.])dnl AC_ARG_VAR(YFLAGS, [The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications.])]) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/autoconf.m4������������������������������������������������0000644�0001750�0001750�00000011641�11202536433�020705� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Driver that loads the Autoconf macro files. # # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2006, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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/erlang.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. # In order to copy pushdef stacks, m4_copy temporarily destroys the # current pushdef stack. But these builtins are so primitive that: # 1. they should not have more than one pushdef definition # 2. undefining the pushdef stack to copy breaks m4_copy # Hence, we temporarily restore a simpler m4_copy. m4_pushdef([m4_copy], [m4_define([$2], m4_defn([$1]))]) 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]) m4_popdef([m4_copy]) # 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.64_2.64+dfsg.orig/lib/autoconf/fortran.m4�������������������������������������������������0000644�0001750�0001750�00000121753�11215442605�020551� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Fortran languages support. # Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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: # # Preamble # # 0. Utility macros # # 1. Language selection # and routines to produce programs in a given language. # # 2. Producing programs in a given language. # # 3. Looking for a compiler # And possibly the associated preprocessor. # # 4. Compilers' characteristics. ## ---------- ## ## Preamble. ## ## ---------- ## # 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. ## ------------------- ## ## 0. Utility macros. ## ## ------------------- ## # _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], , [m4_fatal([$0: missing argument 1])], [$2], , [m4_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 ## ------------------------ ## ## 1a. Language selection. ## ## ------------------------ ## # AC_LANG(Fortran 77) # ------------------- AC_LANG_DEFINE([Fortran 77], [f77], [F], [], [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_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_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. ## ## ----------------------- ## # 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_IO_PROGRAM(Fortran 77) # ------------------------------- # Produce source that performs I/O. m4_define([_AC_LANG_IO_PROGRAM(Fortran 77)], [AC_LANG_PROGRAM([], [dnl open(unit=9,file='conftest.out') close(unit=9) ])]) # 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])]) ## ------------------------ ## ## 1b. Language selection. ## ## ------------------------ ## # AC_LANG(Fortran) # ---------------- AC_LANG_DEFINE([Fortran], [fc], [FC], [Fortran 77], [ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&AS_MESSAGE_LOG_FD' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' ac_compiler_gnu=$ac_cv_fc_compiler_gnu ]) ## -------------------------------------------- ## ## 3. Looking for Compilers and Preprocessors. ## ## -------------------------------------------- ## # 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: GNU Fortran 95+ compiler (released in gcc 4.0) # g95: original gcc-based f95 compiler (gfortran is a fork) # ftn: native Fortran 95 compiler on Cray X1 # cf77: native F77 compiler under older Crays (prefer over fort77) # fort77: native F77 compiler under HP-UX (and some older Crays) # frt: Fujitsu F77 compiler # pgf77/pgf90/pghpf/pgf95: Portland Group F77/F90/F95 compilers # xlf/xlf90/xlf95: IBM (AIX) F77/F90/F95 compilers # Prefer xlf9x to the generic names because they do not reject file # with extension `.f'. # 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 # ifort, previously ifc: Intel Fortran 95 compiler for Linux/x86 # efc: Intel Fortran 95 compiler for IA64 m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn]) m4_define([_AC_F90_FC], [xlf90 f90 pgf90 pghpf epcf90]) m4_define([_AC_F77_FC], [g77 xlf f77 frt pgf77 cf77 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. _AS_ECHO_LOG([checking for _AC_LANG compiler version]) set X $ac_compile ac_compiler=$[2] for ac_option in --version -v -V -qversion; do _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) done 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_ARG_VAR_LIBS()dnl _AC_PROG_FC([Fortran 77], [$1]) if test $ac_compiler_gnu = yes; then G77=yes else G77= fi 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_ARG_VAR_LIBS()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_[]_AC_LANG_PREFIX[]FLAGS=${[]_AC_LANG_PREFIX[]FLAGS+set} ac_save_[]_AC_LANG_PREFIX[]FLAGS=$[]_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_[]_AC_LANG_PREFIX[]FLAGS" = set; then _AC_LANG_PREFIX[]FLAGS=$ac_save_[]_AC_LANG_PREFIX[]FLAGS 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/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 conftest2.$ac_objext >&AS_MESSAGE_LOG_FD' rm -f conftest2.* if _AC_DO_VAR(ac_try) && test -f conftest2.$ac_objext && _AC_DO_VAR(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. ## ## ------------------------------- ## # _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_[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS m4_default([$1], [$ac_cv_prog_[]_AC_LANG_ABBREV[]_v])" eval "set x $ac_link" shift _AS_ECHO_LOG([$[*]]) # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_[]_AC_LANG_ABBREV[]_v_output=`eval $ac_link AS_MESSAGE_LOG_FD>&1 2>&1 | grep -v 'Driving:' | grep -v "^[[_$as_cr_Letters]][[_$as_cr_alnum]]*="` AS_ECHO(["$ac_[]_AC_LANG_ABBREV[]_v_output"]) >&AS_MESSAGE_LOG_FD _AC_LANG_PREFIX[]FLAGS=$ac_save_[]_AC_LANG_PREFIX[]FLAGS rm -rf 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" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented # and (ugh) tested at some point. 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'` ;; # Portland Group compiler has singly- or doubly-quoted -cmdline argument # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". *-cmdline\ * | *-ignore\ * | *-def\ *) ac_[]_AC_LANG_ABBREV[]_v_output=`echo $ac_[]_AC_LANG_ABBREV[]_v_output | sed "\ s/-cmdline *'[[^']]*'/ /g; s/-cmdline *\"[[^\"]]*\"/ /g s/-ignore *'[[^']]*'/ /g; s/-ignore *\"[[^\"]]*\"/ /g s/-def *'[[^']]*'/ /g; s/-def *\"[[^\"]]*\"/ /g"` ;; # If we are using Cray Fortran then delete quotes. *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 runtime 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 runtime 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 _AC_LANG 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*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ |-LANG:=* | -LIST:* | -LNO:*) ;; -lkernel32) test x"$CYGWIN" != xyes && ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg" ;; -[[LRuYz]]) # 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 `AS_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") ;; -zallextract*| -zdefaultextract) 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=`AS_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 _AC_LANG 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 -rf 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 _AC_LANG 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 -rf 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 _AC_LANG 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 -rf conftest* rm -f cfortran_test*], [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_<EXT> (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 # $ac_fcflags_srcext and used automatically 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_<EXT> variable *must* go immediately before # the source file on the command line, unlike other $FCFLAGS. Ugh. AC_DEFUN([AC_FC_SRCEXT], [AC_LANG_PUSH(Fortran)dnl AC_CACHE_CHECK([for Fortran flag to compile .$1 files], ac_cv_fc_srcext_$1, [ac_ext=$1 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= ac_cv_fc_srcext_$1=unknown for ac_flag in none -qsuffix=f=$1 -Tf; do test "x$ac_flag" != xnone && ac_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 ac_fcflags_srcext=$ac_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 ac_fc_srcext=$1 if test "x$ac_cv_fc_srcext_$1" = xnone; then ac_fcflags_srcext="" FCFLAGS_[]$1[]="" else ac_fcflags_srcext=$ac_cv_fc_srcext_$1 FCFLAGS_[]$1[]=$ac_cv_fc_srcext_$1 fi AC_SUBST(FCFLAGS_[]$1) $2 fi AC_LANG_POP(Fortran)dnl ])# 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_PUSH(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_LANG_POP(Fortran)dnl ])# AC_FC_FREEFORM ���������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/headers.m4�������������������������������������������������0000644�0001750�0001750�00000076077�11216160475�020524� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Checking for headers. # # Copyright (C) 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2008, # 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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. # # The m4_indir allows for fewer expansions of $@. AC_DEFUN([AC_CHECK_HEADER], [m4_indir(m4_case([$4], [], [[_AC_CHECK_HEADER_MONGREL]], [-], [[_AC_CHECK_HEADER_PREPROC]], [[_AC_CHECK_HEADER_COMPILE]]), $@) ])# AC_CHECK_HEADER # _AC_CHECK_HEADER_MONGREL_BODY # ----------------------------- # Shell function body for _AC_CHECK_HEADER_MONGREL m4_define([_AC_CHECK_HEADER_MONGREL_BODY], [ AS_LINENO_PUSH([$[]1]) AS_VAR_SET_IF([$[]3], [AC_CACHE_CHECK([for $[]2], [$[]3], [])], [# Is the header compilable? AC_MSG_CHECKING([$[]2 usability]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([$[]4 @%:@include <$[]2>])], [ac_header_compiler=yes], [ac_header_compiler=no]) AC_MSG_RESULT([$ac_header_compiler]) # Is the header present? AC_MSG_CHECKING([$[]2 presence]) AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <$[]2>])], [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([$[]2: accepted by the compiler, rejected by the preprocessor!]) AC_MSG_WARN([$[]2: proceeding with the compiler's result]) ;; no:yes:* ) AC_MSG_WARN([$[]2: present but cannot be compiled]) AC_MSG_WARN([$[]2: check for missing prerequisite headers?]) AC_MSG_WARN([$[]2: see the Autoconf documentation]) AC_MSG_WARN([$[]2: section "Present But Cannot Be Compiled"]) AC_MSG_WARN([$[]2: proceeding with the compiler's result]) m4_ifset([AC_PACKAGE_BUGREPORT], [m4_n([( AS_BOX([Report this to ]AC_PACKAGE_BUGREPORT) ) | sed "s/^/$as_me: WARNING: /" >&2])])dnl ;; esac AC_CACHE_CHECK([for $[]2], [$[]3], [AS_VAR_SET([$[]3], [$ac_header_compiler])])]) AS_LINENO_POP ])#_AC_CHECK_HEADER_MONGREL_BODY # _AC_CHECK_HEADER_MONGREL(HEADER-FILE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES = DEFAULT-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_COMPILE and _AC_CHECK_HEADER_PREPROC # because it obfuscate the code to try to factor everything, in particular # because of the cache variables, and the `checking...' messages. AC_DEFUN([_AC_CHECK_HEADER_MONGREL], [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_header_mongrel], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_header_mongrel], [LINENO HEADER VAR INCLUDES], [Tests whether HEADER exists, giving a warning if it cannot be compiled using the include files in INCLUDES and setting the cache variable VAR accordingly.])], [$0_BODY])]dnl [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])]dnl [ac_fn_[]_AC_LANG_ABBREV[]_check_header_mongrel ]dnl ["$LINENO" "$1" "ac_Header" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])" AS_VAR_IF([ac_Header], [yes], [$2], [$3]) AS_VAR_POPDEF([ac_Header])])# _AC_CHECK_HEADER_MONGREL # _AC_CHECK_HEADER_COMPILE_BODY # ----------------------------- # Shell function body for _AC_CHECK_HEADER_COMPILE m4_define([_AC_CHECK_HEADER_COMPILE_BODY], [ AS_LINENO_PUSH([$[]1]) AC_CACHE_CHECK([for $[]2], [$[]3], [AC_COMPILE_IFELSE([AC_LANG_SOURCE([$[]4 @%:@include <$[]2>])], [AS_VAR_SET([$[]3], [yes])], [AS_VAR_SET([$[]3], [no])])]) AS_LINENO_POP ])# _AC_CHECK_HEADER_COMPILE_BODY # _AC_CHECK_HEADER_COMPILE(HEADER-FILE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES = DEFAULT-INCLUDES]) # -------------------------------------------------------------- # Check the compiler accepts HEADER-FILE. The INCLUDES are defaulted. AC_DEFUN([_AC_CHECK_HEADER_COMPILE], [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_header_compile], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_header_compile], [LINENO HEADER VAR INCLUDES], [Tests whether HEADER exists and can be compiled using the include files in INCLUDES, setting the cache variable VAR accordingly.])], [$0_BODY])]dnl [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])]dnl [ac_fn_[]_AC_LANG_ABBREV[]_check_header_compile ]dnl ["$LINENO" "$1" "ac_Header" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])" AS_VAR_IF([ac_Header], [yes], [$2], [$3]) AS_VAR_POPDEF([ac_Header])])# _AC_CHECK_HEADER_COMPILE # _AC_CHECK_HEADER_PREPROC_BODY # ----------------------------- # Shell function body for _AC_CHECK_HEADER_PREPROC. m4_define([_AC_CHECK_HEADER_PREPROC_BODY], [ AS_LINENO_PUSH([$[]1]) AC_CACHE_CHECK([for $[]2], [$[]3], [AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <$[]2>])], [AS_VAR_SET([$[]3], [yes])], [AS_VAR_SET([$[]3], [no])])]) AS_LINENO_POP ])# _AC_CHECK_HEADER_PREPROC_BODY # _AC_CHECK_HEADER_PREPROC(HEADER-FILE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # -------------------------------------------------------------- # Check the preprocessor accepts HEADER-FILE. AC_DEFUN([_AC_CHECK_HEADER_PREPROC], [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_header_preproc], [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_header_preproc], [LINENO HEADER VAR], [Tests whether HEADER is present, setting the cache variable VAR accordingly.])], [$0_BODY])]dnl [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])]dnl [ac_fn_[]_AC_LANG_ABBREV[]_check_header_preproc "$LINENO" "$1" "ac_Header" AS_VAR_IF([ac_Header], [yes], [$2], [$3]) AS_VAR_POPDEF([ac_Header])dnl ])# _AC_CHECK_HEADER_PREPROC # _AC_CHECK_HEADER_OLD(HEADER-FILE, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # _AC_CHECK_HEADER_NEW(HEADER-FILE, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # ---------------------------------------------------- # Some packages used these undocumented macros. Even worse, gcc # redefined AC_CHECK_HEADER in terms of _AC_CHECK_HEADER_OLD, so we # can't do the simpler: # AU_DEFUN([_AC_CHECK_HEADER_OLD], # [AC_CHECK_HEADER([$1], [$2], [$3], [-])]) AC_DEFUN([_AC_CHECK_HEADER_OLD], [AC_DIAGNOSE([obsolete], [The macro `$0' is obsolete. You should use AC_CHECK_HEADER with a fourth argument.])]dnl [_AC_CHECK_HEADER_PREPROC($@)]) AC_DEFUN([_AC_CHECK_HEADER_NEW], [AC_DIAGNOSE([obsolete], [The macro `$0' is obsolete. You should use AC_CHECK_HEADER with a fourth argument.])]dnl [_AC_CHECK_HEADER_COMPILE($@)]) # _AH_CHECK_HEADER(HEADER-FILE) # ----------------------------- # Prepare the autoheader snippet for HEADER-FILE. m4_define([_AH_CHECK_HEADER], [AH_TEMPLATE(AS_TR_CPP([HAVE_$1]), [Define to 1 if you have the <$1> header file.])]) # AC_CHECK_HEADERS(HEADER-FILE..., # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES]) # ---------------------------------------------------------- # Check for each whitespace-separated HEADER-FILE (omitting the <> or # ""), and perform ACTION-IF-FOUND or ACTION-IF-NOT-FOUND for each # header. INCLUDES is as for AC_CHECK_HEADER. Additionally, make the # preprocessor definition HAVE_HEADER_FILE available for each found # header. Either ACTION may include `break' to stop the search. AC_DEFUN([AC_CHECK_HEADERS], [m4_map_args_w([$1], [_AH_CHECK_HEADER(], [)])]dnl [AS_FOR([AC_header], [ac_header], [$1], [AC_CHECK_HEADER(AC_header, [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_]AC_header)) $2], [$3], [$4])dnl]) ])# AC_CHECK_HEADERS # _AC_CHECK_HEADER_ONCE(HEADER-FILE) # ---------------------------------- # Check for a single HEADER-FILE once. m4_define([_AC_CHECK_HEADER_ONCE], [_AH_CHECK_HEADER([$1])AC_DEFUN([_AC_Header_]m4_translit([[$1]], [./-], [___]), [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" $1"])]) _AC_HEADERS_EXPANSION])AC_REQUIRE([_AC_Header_]m4_translit([[$1]], [./-], [___]))]) # AC_CHECK_HEADERS_ONCE(HEADER-FILE...) # ------------------------------------- # Add each whitespace-separated name in HEADER-FILE to the list of # headers to check once. AC_DEFUN([AC_CHECK_HEADERS_ONCE], [m4_map_args_w([$1], [_AC_CHECK_HEADER_ONCE(], [)])]) m4_define([_AC_HEADERS_EXPANSION], [ m4_divert_text([DEFAULTS], [ac_header_list=]) AC_CHECK_HEADERS([$ac_header_list], [], [], [AC_INCLUDES_DEFAULT]) m4_define([_AC_HEADERS_EXPANSION], []) ]) ## --------------------- ## ## 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 <stdio.h> #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif #ifdef STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else # ifdef HAVE_STDLIB_H # include <stdlib.h> # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif #ifdef HAVE_STRINGS_H # include <strings.h> #endif #ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif #ifdef HAVE_STDINT_H # include <stdint.h> #endif #ifdef HAVE_UNISTD_H # include <unistd.h> #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 <stdio.h>' 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_HEADER_ASSERT # ---------------- # Check whether to enable assertions. AC_DEFUN_ONCE([AC_HEADER_ASSERT], [ AC_MSG_CHECKING([whether to enable assertions]) AC_ARG_ENABLE([assert], [AS_HELP_STRING([--disable-assert], [turn off assertions])], [ac_enable_assert=$enableval AS_IF(dnl [test "x$enableval" = xno], [AC_DEFINE([NDEBUG], [1], [Define to 1 if assertions should be disabled.])], [test "x$enableval" != xyes], [AC_MSG_WARN([invalid argument supplied to --enable-assert]) ac_enable_assert=yes])], [ac_enable_assert=yes]) AC_MSG_RESULT([$ac_enable_assert]) ]) # _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 <sys/types.h> #include <$1> ], [if ((DIR *) 0) return 0;])], [AS_VAR_SET([ac_Header], [yes])], [AS_VAR_SET([ac_Header], [no])])]) AS_VAR_IF([ac_Header], [yes], [$2], [$3]) AS_VAR_POPDEF([ac_Header])dnl ])# _AC_CHECK_HEADER_DIRENT # _AH_CHECK_HEADER_DIRENT(HEADERS) # -------------------------------- # Like _AH_CHECK_HEADER, but tuned to a dirent provider. m4_define([_AH_CHECK_HEADER_DIRENT], [AH_TEMPLATE(AS_TR_CPP([HAVE_$1]), [Define to 1 if you have the <$1> header file, and it defines `DIR'.])]) # AC_HEADER_DIRENT # ---------------- AC_DEFUN([AC_HEADER_DIRENT], [m4_map_args([_AH_CHECK_HEADER_DIRENT], [dirent.h], [sys/ndir.h], [sys/dir.h], [ndir.h])]dnl [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 <sys/types.h>]], [[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 <mkdev.h>.])]) 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 <sysmacros.h>.])]) fi fi ])# AC_HEADER_MAJOR # AC_HEADER_RESOLV # ---------------- # According to http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?resolver+3 # (or http://www.chemie.fu-berlin.de/cgi-bin/man/sgi_irix?resolver+3), # sys/types.h, netinet/in.h and arpa/nameser.h are required on IRIX. # netinet/in.h is needed on Cygwin, too. # With Solaris 9, netdb.h is required, to get symbols like HOST_NOT_FOUND. # AN_HEADER(resolv.h, [AC_HEADER_RESOLV]) AC_DEFUN([AC_HEADER_RESOLV], [AC_CHECK_HEADERS(sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h, [], [], [[#ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> /* inet_ functions / structs */ #endif #ifdef HAVE_ARPA_NAMESER_H # include <arpa/nameser.h> /* DNS HEADER struct */ #endif #ifdef HAVE_NETDB_H # include <netdb.h> #endif]]) ])# AC_HEADER_RESOLV # AC_HEADER_STAT # -------------- # FIXME: Shouldn't this be named AC_HEADER_SYS_STAT? AC_DEFUN([AC_HEADER_STAT], [AC_CACHE_CHECK(whether stat file-mode macros are broken, ac_cv_header_stat_broken, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h> #include <sys/stat.h> #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif ]])], ac_cv_header_stat_broken=no, ac_cv_header_stat_broken=yes)]) if test $ac_cv_header_stat_broken = yes; then AC_DEFINE(STAT_MACROS_BROKEN, 1, [Define to 1 if the `S_IS*' macros in <sys/stat.h> 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 <stdbool.h> #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]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; # if defined __xlc__ || defined __GNUC__ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 reported by James Lemley on 2005-10-05; see http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html This test is not quite right, since xlc is allowed to reject this program, as the initializer for xlcbug is not one of the forms that C requires support for. However, doing the test right would require a runtime test, and that would make cross-compilation harder. Let us hope that IBM fixes the xlc bug, and also adds support for this kind of constant expression. In the meantime, this test will reject xlc, which is OK, since our stdbool.h substitute should suffice. We also test this with GCC, where it should work, to detect more quickly whether someone messes up the test in the future. */ char digs[] = "0123456789"; int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); # endif /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; ]], [[ *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ]])], [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 # -------------- AC_DEFUN([AC_HEADER_STDC], [AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h> #include <stdarg.h> #include <string.h> #include <float.h> ]])], [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 <ctype.h> #include <stdlib.h> #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)) return 2; return 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 # ------------------ 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 <sys/types.h> #include <sys/wait.h> #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (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 <sys/wait.h> that is POSIX.1 compatible.]) fi ])# AC_HEADER_SYS_WAIT # 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 <sys/types.h> #include <sys/time.h> #include <time.h> ], [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 <sys/time.h> and <time.h>.]) 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 <sys/types.h> #include <termios.h> #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 <sys/types.h> #include <sys/ioctl.h> #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 <sys/ioctl.h>.]) 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_MSG_CHECKING([for BSD string and memory functions]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <strings.h>]], [[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 <strings.h>, index, bzero, etc... This symbol is obsolete, you should not depend upon it.])]) AC_CHECK_HEADERS(string.h)], [Remove `AC_MSG_CHECKING', `AC_LINK_IFELSE' and this warning when you adjust your code to use HAVE_STRING_H.]) # 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_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)], [Remove this warning and `AC_CHECK_HEADER(memory.h, AC_DEFINE(...))' when you adjust your code to use HAVE_STRING_H and HAVE_MEMORY_H, not NEED_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 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.])], [Remove this warning and the four `AC_DEFINE' when you adjust your code to use `AC_HEADER_DIRENT'.]) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/c.m4�������������������������������������������������������0000644�0001750�0001750�00000156357�11215442605�017330� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # Programming languages support. # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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 # Akim Demaille, Paul Eggert, # 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 # 2. and routines to produce programs in a given language. # 1a. C 2a. C # 1b. C++ # 1c. Objective C # # 3. Looking for a compiler # And possibly the associated preprocessor. # 3a. C 3b. C++ 3c. Objective C # # 4. Compilers' characteristics. # 4a. C ## ----------------------- ## ## 1a/2a. The C language. ## ## ----------------------- ## # ------------------------ # # 1a. Language selection. # # ------------------------ # # AC_LANG(C) # ---------- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. AC_LANG_DEFINE([C], [c], [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)]) # ------------------------ # # 2a. Producing programs. # # ------------------------ # # AC_LANG_CONFTEST(C)(BODY) # ----------------------- # 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_CONFTEST(C)], [cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $1 _ACEOF]) # 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_IO_PROGRAM(C) # ---------------------- # Produce source that performs I/O, necessary for proper # cross-compiler detection. m4_define([_AC_LANG_IO_PROGRAM(C)], [AC_LANG_PROGRAM([@%:@include <stdio.h>], [FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 ();])], [return $2 ();])]) # AC_LANG_FUNC_LINK_TRY(C)(FUNCTION) # ---------------------------------- # Don't include <ctype.h> because on OSF/1 3.0 it includes # <sys/types.h> which includes <sys/select.h> 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 <limits.h> declares $1. For example, HP-UX 11i <limits.h> declares gettimeofday. */ #define $1 innocuous_$1 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $1 (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since <limits.h> exists even on freestanding compilers. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif #undef $1 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif 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 #endif ], [return $1 ();])]) # AC_LANG_BOOL_COMPILE_TRY(C)(PROLOGUE, EXPRESSION) # ------------------------------------------------- # Return a program that is valid if EXPRESSION is nonzero. # EXPRESSION must be an integer constant 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 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } @%:@include <stdio.h> @%:@include <stdlib.h>], [ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ])]) ## ---------------------- ## ## 1b. The C++ language. ## ## ---------------------- ## # AC_LANG(C++) # ------------ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. AC_LANG_DEFINE([C++], [cxx], [CXX], [C], [ac_ext=cpp 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++)]) ## ------------------------------ ## ## 1c. The Objective C language. ## ## ------------------------------ ## # AC_LANG(Objective C) # -------------------- AC_LANG_DEFINE([Objective C], [objc], [OBJC], [C], [ac_ext=m ac_cpp='$OBJCPP $CPPFLAGS' ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' ac_compiler_gnu=$ac_cv_objc_compiler_gnu ]) # AC_LANG_OBJC # ------------ AU_DEFUN([AC_LANG_OBJC], [AC_LANG(Objective C)]) ## -------------------------------------------- ## ## 3. Looking for Compilers and Preprocessors. ## ## -------------------------------------------- ## # -------------------- # # 3a. The C compiler. # # -------------------- # # _AC_ARG_VAR_CPPFLAGS # -------------------- # Document and register CPPFLAGS, which is used by # AC_PROG_{CC, CPP, CXX, CXXCPP, OBJC, OBJCPP}. AC_DEFUN([_AC_ARG_VAR_CPPFLAGS], [AC_ARG_VAR([CPPFLAGS], [C/C++/Objective C preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir>])]) # _AC_ARG_VAR_LDFLAGS # ------------------- # Document and register LDFLAGS, which is used by # AC_PROG_{CC, CXX, F77, FC, OBJC}. AC_DEFUN([_AC_ARG_VAR_LDFLAGS], [AC_ARG_VAR([LDFLAGS], [linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir>])]) # _AC_ARG_VAR_LIBS # ---------------- # Document and register LIBS, which is used by # AC_PROG_{CC, CXX, F77, FC, OBJS}. AC_DEFUN([_AC_ARG_VAR_LIBS], [AC_ARG_VAR([LIBS], [libraries to pass to the linker, e.g. -l<library>])]) # 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. # 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 <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> 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 <limits.h> @%:@else @%:@ include <assert.h> @%:@endif Syntax error]])], [], [# Broken: fails on valid input. continue]) # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. _AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])], [# 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_LIBS()dnl _AC_ARG_VAR_CPPFLAGS()dnl m4_ifval([$1], [AC_CHECK_TOOLS(CC, [$1])], [AC_CHECK_TOOL(CC, gcc) if test -z "$CC"; then dnl Here we want: dnl AC_CHECK_TOOL(CC, cc) dnl but without the check for a tool without the prefix. dnl Until the check is removed from there, copy the code: if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(CC, [${ac_tool_prefix}cc], [${ac_tool_prefix}cc]) fi 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.exe) fi ]) test -z "$CC" && AC_MSG_FAILURE([no acceptable C compiler found in \$PATH]) # Provide some information about the compiler. _AS_ECHO_LOG([checking for _AC_LANG compiler version]) set X $ac_compile ac_compiler=$[2] for ac_option in --version -v -V -qversion; do _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) done m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl _AC_LANG_COMPILER_GNU if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi _AC_PROG_CC_G _AC_PROG_CC_C89 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. # Don't consider -g to work if it generates warnings when plain compiles don't. m4_define([_AC_PROG_CC_G], [ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS AC_CACHE_CHECK(whether $CC accepts -g, ac_cv_prog_cc_g, [ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_prog_cc_g=yes], [CFLAGS="" _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [], [ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_prog_cc_g=yes])])]) ac_c_werror_flag=$ac_save_c_werror_flag]) 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 # ----------------------- AC_DEFUN([AC_PROG_GCC_TRADITIONAL], [AC_REQUIRE([AC_PROG_CC])dnl 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 <sgtty.h> 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 <termio.h> 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=`AS_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 conftest2.$ac_objext >&AS_MESSAGE_LOG_FD' rm -f conftest2.* if _AC_DO_VAR(ac_try) && test -f conftest2.$ac_objext && _AC_DO_VAR(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_DO_TOKENS(cc -c conftest.$ac_ext >&AS_MESSAGE_LOG_FD); then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&AS_MESSAGE_LOG_FD' rm -f conftest2.* if _AC_DO_VAR(ac_try) && test -f conftest2.$ac_objext && _AC_DO_VAR(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 core conftest* ])dnl if eval test \$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 # ---------------------- # # 3b. 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_LIBS()dnl _AC_ARG_VAR_CPPFLAGS()dnl _AC_ARG_VAR_PRECIOUS([CCC])dnl if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else AC_CHECK_TOOLS(CXX, [m4_default([$1], [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC])], g++) fi fi # Provide some information about the compiler. _AS_ECHO_LOG([checking for _AC_LANG compiler version]) set X $ac_compile ac_compiler=$[2] for ac_option in --version -v -V -qversion; do _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) done m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl _AC_LANG_COMPILER_GNU if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi _AC_PROG_CXX_G 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. # Don't consider -g to work if it generates warnings when plain compiles don't. m4_define([_AC_PROG_CXX_G], [ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS AC_CACHE_CHECK(whether $CXX accepts -g, ac_cv_prog_cxx_g, [ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_prog_cxx_g=yes], [CXXFLAGS="" _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [], [ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_prog_cxx_g=yes])])]) ac_cxx_werror_flag=$ac_save_cxx_werror_flag]) 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_C_O # --------------- # Test if the C++ compiler accepts the options `-c' and `-o' # simultaneously, and define `CXX_NO_MINUS_C_MINUS_O' if it does not. AC_DEFUN([AC_PROG_CXX_C_O], [AC_REQUIRE([AC_PROG_CXX])dnl AC_LANG_PUSH([C++])dnl AC_CACHE_CHECK([whether $CXX understands -c and -o together], [ac_cv_prog_cxx_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='$CXX $CXXFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&AS_MESSAGE_LOG_FD' rm -f conftest2.* if _AC_DO_VAR(ac_try) && test -f conftest2.$ac_objext && _AC_DO_VAR(ac_try); then ac_cv_prog_cxx_c_o=yes else ac_cv_prog_cxx_c_o=no fi rm -f conftest*]) if test $ac_cv_prog_cxx_c_o = no; then AC_DEFINE(CXX_NO_MINUS_C_MINUS_O, 1, [Define to 1 if your C++ compiler doesn't accept -c and -o together.]) fi AC_LANG_POP([C++])dnl ])# AC_PROG_CXX_C_O # ------------------------------ # # 3c. The Objective C compiler. # # ------------------------------ # # AC_LANG_PREPROC(Objective C) # ---------------------------- # Find the Objective C preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. AC_DEFUN([AC_LANG_PREPROC(Objective C)], [AC_REQUIRE([AC_PROG_OBJCPP])]) # AC_PROG_OBJCPP # -------------- # Find a working Objective C preprocessor. AC_DEFUN([AC_PROG_OBJCPP], [AC_REQUIRE([AC_PROG_OBJC])dnl AC_ARG_VAR([OBJCPP], [Objective C preprocessor])dnl _AC_ARG_VAR_CPPFLAGS()dnl AC_LANG_PUSH(Objective C)dnl AC_MSG_CHECKING([how to run the Objective C preprocessor]) if test -z "$OBJCPP"; then AC_CACHE_VAL(ac_cv_prog_OBJCPP, [dnl # Double quotes because OBJCPP needs to be expanded for OBJCPP in "$OBJC -E" "/lib/cpp" do _AC_PROG_PREPROC_WORKS_IFELSE([break]) done ac_cv_prog_OBJCPP=$OBJCPP ])dnl OBJCPP=$ac_cv_prog_OBJCPP else ac_cv_prog_OBJCPP=$OBJCPP fi AC_MSG_RESULT([$OBJCPP]) _AC_PROG_PREPROC_WORKS_IFELSE([], [AC_MSG_FAILURE([Objective C preprocessor "$OBJCPP" fails sanity check])]) AC_SUBST(OBJCPP)dnl AC_LANG_POP(Objective C)dnl ])# AC_PROG_OBJCPP # AC_LANG_COMPILER(Objective C) # ----------------------------- # Find the Objective C compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able. AC_DEFUN([AC_LANG_COMPILER(Objective C)], [AC_REQUIRE([AC_PROG_OBJC])]) # AC_PROG_OBJC([LIST-OF-COMPILERS]) # --------------------------------- # LIST-OF-COMPILERS is a space separated list of Objective 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 # Objective C compiler. # objcc StepStone Objective-C compiler (also "standard" name for OBJC) # objc David Stes' POC. If you installed this, you likely want it. # cc Native C compiler (for instance, Apple). # CC You never know. AN_MAKEVAR([OBJC], [AC_PROG_OBJC]) AN_PROGRAM([objcc], [AC_PROG_OBJC]) AN_PROGRAM([objc], [AC_PROG_OBJC]) AC_DEFUN([AC_PROG_OBJC], [AC_LANG_PUSH(Objective C)dnl AC_ARG_VAR([OBJC], [Objective C compiler command])dnl AC_ARG_VAR([OBJCFLAGS], [Objective C compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl _AC_ARG_VAR_LIBS()dnl _AC_ARG_VAR_CPPFLAGS()dnl _AC_ARG_VAR_PRECIOUS([OBJC])dnl AC_CHECK_TOOLS(OBJC, [m4_default([$1], [gcc objcc objc cc CC])], gcc) # Provide some information about the compiler. _AS_ECHO_LOG([checking for _AC_LANG compiler version]) set X $ac_compile ac_compiler=$[2] for ac_option in --version -v -V -qversion; do _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) done m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl _AC_LANG_COMPILER_GNU if test $ac_compiler_gnu = yes; then GOBJC=yes else GOBJC= fi _AC_PROG_OBJC_G AC_LANG_POP(Objective C)dnl ])# AC_PROG_OBJC # _AC_PROG_OBJC_G # --------------- # Check whether -g works, even if OBJCFLAGS is set, in case the package # plays around with OBJCFLAGS (such as to build both debugging and # normal versions of a library), tasteless as that idea is. # Don't consider -g to work if it generates warnings when plain compiles don't. m4_define([_AC_PROG_OBJC_G], [ac_test_OBJCFLAGS=${OBJCFLAGS+set} ac_save_OBJCFLAGS=$OBJCFLAGS AC_CACHE_CHECK(whether $OBJC accepts -g, ac_cv_prog_objc_g, [ac_save_objc_werror_flag=$ac_objc_werror_flag ac_objc_werror_flag=yes ac_cv_prog_objc_g=no OBJCFLAGS="-g" _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_prog_objc_g=yes], [OBJCFLAGS="" _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [], [ac_objc_werror_flag=$ac_save_objc_werror_flag OBJCFLAGS="-g" _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_prog_objc_g=yes])])]) ac_objc_werror_flag=$ac_save_objc_werror_flag]) if test "$ac_test_OBJCFLAGS" = set; then OBJCFLAGS=$ac_save_OBJCFLAGS elif test $ac_cv_prog_objc_g = yes; then if test "$GOBJC" = yes; then OBJCFLAGS="-g -O2" else OBJCFLAGS="-g" fi else if test "$GOBJC" = yes; then OBJCFLAGS="-O2" else OBJCFLAGS= fi fi[]dnl ])# _AC_PROG_OBJC_G ## ------------------------------- ## ## 4. Compilers' characteristics. ## ## ------------------------------- ## # -------------------------------- # # 4a. C compiler characteristics. # # -------------------------------- # # _AC_PROG_CC_C89 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) # ---------------------------------------------------------------- # If the C compiler is not in ANSI C89 (ISO C90) mode by default, try # to add an option to output variable CC to make it so. This macro # tries various options that select ANSI C89 on some system or # another. It considers the compiler to be in ANSI C89 mode if it # handles function prototypes correctly. AC_DEFUN([_AC_PROG_CC_C89], [_AC_C_STD_TRY([c89], [[#include <stdarg.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 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];]], dnl Don't try gcc -ansi; that turns off useful extensions and dnl breaks some systems' header files. dnl AIX circa 2003 -qlanglvl=extc89 dnl old AIX -qlanglvl=ansi dnl Ultrix, OSF/1, Tru64 -std dnl HP-UX 10.20 and later -Ae dnl HP-UX older versions -Aa -D_HPUX_SOURCE dnl SVR4 -Xc -D__EXTENSIONS__ [-qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"], [$1], [$2])[]dnl ])# _AC_PROG_CC_C89 # _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, # ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) # -------------------------------------------------------------- # Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99') # by trying to compile a program of TEST-PROLOGUE and TEST-BODY. If this fails, # try again with each compiler option in the space-separated OPTION-LIST; if one # helps, append it to CC. If eventually successful, run ACTION-IF-AVAILABLE, # else ACTION-IF-UNAVAILABLE. AC_DEFUN([_AC_C_STD_TRY], [AC_MSG_CHECKING([for $CC option to accept ISO ]m4_translit($1, [c], [C])) AC_CACHE_VAL(ac_cv_prog_cc_$1, [ac_cv_prog_cc_$1=no ac_save_CC=$CC AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])]) for ac_arg in '' $4 do CC="$ac_save_CC $ac_arg" _AC_COMPILE_IFELSE([], [ac_cv_prog_cc_$1=$ac_arg]) test "x$ac_cv_prog_cc_$1" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ])# AC_CACHE_VAL case "x$ac_cv_prog_cc_$1" in x) AC_MSG_RESULT([none needed]) ;; xno) AC_MSG_RESULT([unsupported]) ;; *) CC="$CC $ac_cv_prog_cc_$1" AC_MSG_RESULT([$ac_cv_prog_cc_$1]) ;; esac AS_IF([test "x$ac_cv_prog_cc_$1" != xno], [$5], [$6]) ])# _AC_C_STD_TRY # _AC_PROG_CC_C99 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) # ---------------------------------------------------------------- # If the C compiler is not in ISO C99 mode by default, try to add an # option to output variable CC to make it so. This macro tries # various options that select ISO C99 on some system or another. It # considers the compiler to be in ISO C99 mode if it handles _Bool, # // comments, flexible array members, inline, long long int, mixed # code and declarations, named initialization of structs, restrict, # va_copy, varargs macros, variable declarations in for loops and # variable length arrays. AC_DEFUN([_AC_PROG_CC_C99], [_AC_C_STD_TRY([c99], [[#include <stdarg.h> #include <stdbool.h> #include <stdlib.h> #include <wchar.h> #include <stdio.h> // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } ]], [[ // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ]], dnl Try dnl GCC -std=gnu99 (unused restrictive modes: -std=c99 -std=iso9899:1999) dnl AIX -qlanglvl=extc99 (unused restrictive mode: -qlanglvl=stdc99) dnl HP cc -AC99 dnl Intel ICC -std=c99, -c99 (deprecated) dnl IRIX -c99 dnl Solaris -xc99=all (Forte Developer 7 C mishandles -xc99 on Solaris 9, dnl as it incorrectly assumes C99 semantics for library functions) dnl Tru64 -c99 dnl with extended modes being tried first. [[-std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99]], [$1], [$2])[]dnl ])# _AC_PROG_CC_C99 # AC_PROG_CC_C89 # -------------- AC_DEFUN([AC_PROG_CC_C89], [ AC_REQUIRE([AC_PROG_CC])dnl _AC_PROG_CC_C89 ]) # AC_PROG_CC_C99 # -------------- AC_DEFUN([AC_PROG_CC_C99], [ AC_REQUIRE([AC_PROG_CC])dnl _AC_PROG_CC_C99 ]) # AC_PROG_CC_STDC # --------------- AC_DEFUN([AC_PROG_CC_STDC], [ AC_REQUIRE([AC_PROG_CC])dnl AS_CASE([$ac_cv_prog_cc_stdc], [no], [ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no], [_AC_PROG_CC_C99([ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99], [_AC_PROG_CC_C89([ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89], [ac_cv_prog_cc_stdc=no])])]) AC_MSG_CHECKING([for $CC option to accept ISO Standard C]) AC_CACHE_VAL([ac_cv_prog_cc_stdc], []) AS_CASE([$ac_cv_prog_cc_stdc], [no], [AC_MSG_RESULT([unsupported])], [''], [AC_MSG_RESULT([none needed])], [AC_MSG_RESULT([$ac_cv_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_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN], # [ACTION-IF-UNIVERSAL]) # ------------------------------------------------------------------------- AC_DEFUN([AC_C_BIGENDIAN], [AH_VERBATIM([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif])dnl AC_CACHE_CHECK([whether byte ordering is bigendian], [ac_cv_c_bigendian], [ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; ]])], [ # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done]) if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <sys/types.h> #include <sys/param.h> ]], [[#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && 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 <sys/types.h> #include <sys/param.h> ]], [[#if BYTE_ORDER != BIG_ENDIAN not big endian #endif ]])], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=no])]) fi if test $ac_cv_c_bigendian = unknown; then # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <limits.h> ]], [[#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ]])], [# It does; now see whether it defined to _BIG_ENDIAN or not. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <limits.h> ]], [[#ifndef _BIG_ENDIAN not big endian #endif ]])], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=no])]) fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. AC_RUN_IFELSE( [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[ /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ]])], [ac_cv_c_bigendian=no], [ac_cv_c_bigendian=yes], [# Try to guess by grepping values from an object file. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; ]], [[return use_ascii (foo) == use_ebcdic (foo);]])], [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])]) fi]) case $ac_cv_c_bigendian in #( yes) m4_default([$1], [AC_DEFINE([WORDS_BIGENDIAN], 1)]);; #( no) $2 ;; #( universal) dnl Note that AC_APPLE_UNIVERSAL_BUILD sorts less than WORDS_BIGENDIAN; dnl this is a necessity for proper config header operation. Warn if dnl the user did not specify a config header but is relying on the dnl default behavior for universal builds. m4_default([$4], [AC_CONFIG_COMMANDS_PRE([m4_ifset([AH_HEADER], [], [AC_DIAGNOSE([obsolete], [AC_C_BIGENDIAN should be used with AC_CONFIG_HEADERS])])])dnl AC_DEFINE([AC_APPLE_UNIVERSAL_BUILD],1, [Define if building universal (internal helper macro)])]) ;; #( *) 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]) test "$ac_cv_c_inline" != no && 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 # ---------- 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 cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* 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"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 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; if (!foo) return 0; } return !cs[0] && !zero.x; #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://autoconf-archive.cryp.to/acx_restrict.html # # Determine whether the C/C++ compiler supports the "restrict" keyword # introduced in ANSI C99, or an equivalent. Define "restrict" to the alternate # spelling, if any; these are more likely to work in both C and C++ compilers of # the same family, and in the presence of varying compiler options. If only # plain "restrict" works, do nothing. 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 # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; }]], [[int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t)]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done ]) AH_VERBATIM([restrict], [/* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif]) case $ac_cv_c_restrict in restrict) ;; no) AC_DEFINE([restrict], []) ;; *) 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. 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 = (int *) 0; return !x && !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_c89" != 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 # AC_C_FLEXIBLE_ARRAY_MEMBER # -------------------------- # Check whether the C compiler supports flexible array members. AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], [ AC_CACHE_CHECK([for flexible array members], ac_cv_c_flexmember, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <stdlib.h> #include <stdio.h> #include <stddef.h> struct s { int n; double d[]; };]], [[int m = getchar (); struct s *p = malloc (offsetof (struct s, d) + m * sizeof (double)); p->d[0] = 0.0; return p->d != (double *) NULL;]])], [ac_cv_c_flexmember=yes], [ac_cv_c_flexmember=no])]) if test $ac_cv_c_flexmember = yes; then AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [], [Define to nothing if C supports flexible array members, and to 1 if it does not. That way, with a declaration like `struct s { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack can be used with pre-C99 compilers. When computing the size of such an object, don't use 'sizeof (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' instead. Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with MSVC and with C++ compilers.]) else AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], 1) fi ]) # AC_C_VARARRAYS # -------------- # Check whether the C compiler supports variable-length arrays. AC_DEFUN([AC_C_VARARRAYS], [ AC_CACHE_CHECK([for variable-length arrays], ac_cv_c_vararrays, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([], [[static int x; char a[++x]; a[sizeof a - 1] = 0; return a[0];]])], [ac_cv_c_vararrays=yes], [ac_cv_c_vararrays=no])]) if test $ac_cv_c_vararrays = yes; then AC_DEFINE([HAVE_C_VARARRAYS], 1, [Define to 1 if C supports variable-length arrays.]) fi ]) # AC_C_TYPEOF # ----------- # Check if the C compiler supports GCC's typeof syntax. # The test case provokes incompatibilities in the Sun C compilers # (both Solaris 8 and Solaris 10). AC_DEFUN([AC_C_TYPEOF], [ AC_CACHE_CHECK([for typeof syntax and keyword spelling], ac_cv_c_typeof, [ac_cv_c_typeof=no for ac_kw in typeof __typeof__ no; do test $ac_kw = no && break AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ int value; typedef struct { char a [1 + ! (($ac_kw (value)) (($ac_kw (value)) 0 < ($ac_kw (value)) -1 ? ($ac_kw (value)) - 1 : ~ (~ ($ac_kw (value)) 0 << sizeof ($ac_kw (value)))))]; } ac__typeof_type_; return (! ((void) ((ac__typeof_type_ *) 0), 0)); ]])], [ac_cv_c_typeof=$ac_kw]) test $ac_cv_c_typeof != no && break done]) if test $ac_cv_c_typeof != no; then AC_DEFINE([HAVE_TYPEOF], 1, [Define to 1 if typeof works with your compiler.]) if test $ac_cv_c_typeof != typeof; then AC_DEFINE_UNQUOTED([typeof], [$ac_cv_c_typeof], [Define to __typeof__ if your compiler spells it that way.]) fi fi ]) # _AC_LANG_OPENMP # --------------- # Expands to some language dependent source code for testing the presence of # OpenMP. AC_DEFUN([_AC_LANG_OPENMP], [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) # _AC_LANG_OPENMP(C) # ------------------ m4_define([_AC_LANG_OPENMP(C)], [ #ifndef _OPENMP choke me #endif #include <omp.h> int main () { return omp_get_num_threads (); } ]) # _AC_LANG_OPENMP(C++) # -------------------- m4_copy([_AC_LANG_OPENMP(C)], [_AC_LANG_OPENMP(C++)]) # _AC_LANG_OPENMP(Fortran 77) # --------------------------- m4_define([_AC_LANG_OPENMP(Fortran 77)], [AC_LANG_FUNC_LINK_TRY([omp_get_num_threads])]) # _AC_LANG_OPENMP(Fortran) # --------------------------- m4_copy([_AC_LANG_OPENMP(Fortran 77)], [_AC_LANG_OPENMP(Fortran)]) # AC_OPENMP # --------- # Check which options need to be passed to the C compiler to support OpenMP. # Set the OPENMP_CFLAGS / OPENMP_CXXFLAGS / OPENMP_FFLAGS variable to these # options. # The options are necessary at compile time (so the #pragmas are understood) # and at link time (so the appropriate library is linked with). # This macro takes care to not produce redundant options if $CC $CFLAGS already # supports OpenMP. It also is careful to not pass options to compilers that # misinterpret them; for example, most compilers accept "-openmp" and create # an output file called 'penmp' rather than activating OpenMP support. AC_DEFUN([AC_OPENMP], [ OPENMP_[]_AC_LANG_PREFIX[]FLAGS= AC_ARG_ENABLE([openmp], [AS_HELP_STRING([--disable-openmp], [do not use OpenMP])]) if test "$enable_openmp" != no; then AC_CACHE_CHECK([for $CC option to support OpenMP], [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp], [AC_LINK_IFELSE([_AC_LANG_OPENMP], [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp='none needed'], [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp='unsupported' dnl Try these flags: dnl GCC >= 4.2 -fopenmp dnl SunPRO C -xopenmp dnl Intel C -openmp dnl SGI C, PGI C -mp dnl Tru64 Compaq C -omp dnl IBM C (AIX, Linux) -qsmp=omp dnl If in this loop a compiler is passed an option that it doesn't dnl understand or that it misinterprets, the AC_LINK_IFELSE test dnl will fail (since we know that it failed without the option), dnl therefore the loop will continue searching for an option, and dnl no output file called 'penmp' or 'mp' is created. for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do ac_save_[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $ac_option" AC_LINK_IFELSE([_AC_LANG_OPENMP], [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp=$ac_option]) _AC_LANG_PREFIX[]FLAGS=$ac_save_[]_AC_LANG_PREFIX[]FLAGS if test "$ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp" != unsupported; then break fi done])]) case $ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp in #( "none needed" | unsupported) ;; #( *) OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp ;; esac fi AC_SUBST([OPENMP_]_AC_LANG_PREFIX[FLAGS]) ]) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoconf/specific.m4������������������������������������������������0000644�0001750�0001750�00000036406�11202536433�020662� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# 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, 2004, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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 <signal.h> /* NetBSD declares sys_siglist in unistd.h. */ #ifdef HAVE_UNISTD_H # include <unistd.h> #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 2>&1) 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], [Remove this warning when you adjust your code to use `AC_SYS_INTERPRETER'.]) AU_DEFUN([AC_ARG_ARRAY], [], [$0 is 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 <sys/types.h> /* 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, # PROLOGUE, [FUNCTION-BODY]) # ---------------------------------------------------------- m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], [AC_CACHE_CHECK([for $1 value needed for large files], [$3], [while :; do m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( [AC_LANG_PROGRAM([$5], [$6])], [$3=no; break]) m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( [AC_LANG_PROGRAM([@%:@define $1 $2 $5], [$6])], [$3=$2; break]) $3=unknown break done]) case $$3 in #( no | unknown) ;; *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);; esac rm -rf 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]) if test $ac_cv_sys_file_offset_bits = unknown; then _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 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 # $TMPDIR if set, where it might want to write temporary files # /tmp where it might want to write temporary files # /var/tmp likewise # /usr/tmp likewise for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib # in the usual case where exec_prefix is '${prefix}'. case $ac_dir in #( . | /* | ?:[[\\/]]*) ;; #( *) continue;; esac 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 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || ac_cv_sys_long_file_names=no rm -f -r "$ac_xdir" 2>/dev/null test $ac_cv_sys_long_file_names = no && break 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_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. */ AC_INCLUDES_DEFAULT #include <signal.h> #ifdef HAVE_SYS_WAIT_H # include <sys/wait.h> #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); return 0; } signal (SIGINT, ucatch); status = wait (&i); if (status == -1) wait (&i); return 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 <sys/types.h> #include <unistd.h> #include <termios.h> ]], [/* 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 # -------------- AU_DEFUN([AC_GNU_SOURCE], [AC_USE_SYSTEM_EXTENSIONS]) # AC_CYGWIN # --------- # Check for Cygwin. This is a way to set the right value for # EXEEXT. AU_DEFUN([AC_CYGWIN], [AC_CANONICAL_HOST case $host_os in *cygwin* ) CYGWIN=yes;; * ) CYGWIN=no;; esac ], [$0 is obsolete: use AC_CANONICAL_HOST and check if $host_os matches *cygwin*])# 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 case $host_os in *emx* ) EMXOS2=yes;; * ) EMXOS2=no;; esac ], [$0 is obsolete: use AC_CANONICAL_HOST and check if $host_os matches *emx*])# 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 case $host_os in *mingw32* ) MINGW32=yes;; * ) MINGW32=no;; esac ], [$0 is obsolete: use AC_CANONICAL_HOST and check if $host_os matches *mingw32*])# AC_MINGW32 # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. # # Remember that #undef in AH_VERBATIM gets replaced with #define by # AC_DEFINE. The goal here is to define all known feature-enabling # macros, then, if reports of conflicts are made, disable macros that # cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], [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 dnl Use a different key than __EXTENSIONS__, as that name broke existing dnl configure.ac when using autoheader 2.62. AH_VERBATIM([USE_SYSTEM_EXTENSIONS], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([ # define __EXTENSIONS__ 1 AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) ])# AC_USE_SYSTEM_EXTENSIONS ## -------------------------- ## ## 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 # ------ AU_DEFUN([AC_AIX], [AC_USE_SYSTEM_EXTENSIONS]) # AC_MINIX # -------- AU_DEFUN([AC_MINIX], [AC_USE_SYSTEM_EXTENSIONS]) # AC_ISC_POSIX # ------------ AU_DEFUN([AC_ISC_POSIX], [AC_SEARCH_LIBS([strerror], [cposix])]) # AC_XENIX_DIR # ------------ AU_DEFUN([AC_XENIX_DIR], [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 ], [You shouldn't need to depend upon XENIX. Remove the `AC_MSG_CHECKING', `AC_EGREP_CPP', and this warning if this part of the test is useless.]) # 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.64_2.64+dfsg.orig/lib/autoscan/�����������������������������������������������������������0000755�0001750�0001750�00000000000�11233220577�016624� 5����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autoscan/Makefile.am������������������������������������������������0000644�0001750�0001750�00000003137�11202536433�020661� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Make Autoscan library. # Copyright (C) 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 3 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, see <http://www.gnu.org/licenses/>. 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.64_2.64+dfsg.orig/lib/autoscan/Makefile.in������������������������������������������������0000644�0001750�0001750�00000037566�11233217354�020711� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # Make Autoscan library. # Copyright (C) 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 3 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, see <http://www.gnu.org/licenses/>. # Freeze M4 files. # Copyright (C) 2002, 2004, 2006, 2007, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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.am \ $(srcdir)/Makefile.in subdir = lib/autoscan ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(autoscanlibdir)" 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ autoscanlibdir = $(pkgdatadir)/autoscan EXTRA_DIST = autoscan.pre nodist_autoscanlib_DATA = autoscan.list CLEANFILES = autoscan.list SUFFIXES = .m4 .m4f AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg # Do not use AUTOM4TE here, since maint.mk (my-distcheck) # checks if we are independent of Autoconf by defining AUTOM4TE (and # others) to `false'. Autoconf provides autom4te, so that doesn't # apply to us. MY_AUTOM4TE = \ autom4te_perllibdir='$(top_srcdir)'/lib \ AUTOM4TE_CFG='$(AUTOM4TE_CFG)' $(top_builddir)/bin/autom4te \ -B '$(top_builddir)'/lib -B '$(top_srcdir)'/lib # keep ` ' # 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 = $(top_builddir)/bin/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/erlang.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: $(srcdir)/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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/autoscan/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/autoscan/Makefile .PRECIOUS: 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 $(am__aclocal_m4_deps): install-nodist_autoscanlibDATA: $(nodist_autoscanlib_DATA) @$(NORMAL_INSTALL) test -z "$(autoscanlibdir)" || $(MKDIR_P) "$(DESTDIR)$(autoscanlibdir)" @list='$(nodist_autoscanlib_DATA)'; test -n "$(autoscanlibdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(autoscanlibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(autoscanlibdir)" || exit $$?; \ done uninstall-nodist_autoscanlibDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_autoscanlib_DATA)'; test -n "$(autoscanlibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(autoscanlibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(autoscanlibdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: for dir in "$(DESTDIR)$(autoscanlibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-am info-am: install-data-am: install-nodist_autoscanlibDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-nodist_autoscanlibDATA .MAKE: install-am install-strip .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-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-nodist_autoscanlibDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-nodist_autoscanlibDATA $(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 an 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: |" <forbidden.log >&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.64_2.64+dfsg.orig/lib/autoscan/autoscan.pre�����������������������������������������������0000644�0001750�0001750�00000001524�11202536433�021150� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/Makefile.in���������������������������������������������������������0000644�0001750�0001750�00000046663�11233217354�017072� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # Make Autoconf-related libraries. # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 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 3 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, see <http://www.gnu.org/licenses/>. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkgdatadir)" DATA = $(nodist_pkgdata_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ 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|@pkgdatadir[@]|$(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: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile .PRECIOUS: 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 $(am__aclocal_m4_deps): install-nodist_pkgdataDATA: $(nodist_pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(nodist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ done uninstall-nodist_pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files # 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): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-recursive info-am: install-data-am: install-nodist_pkgdataDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: 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-nodist_pkgdataDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive distclean distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-nodist_pkgdataDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-nodist_pkgdataDATA autom4te.cfg: $(srcdir)/autom4te.in Makefile rm -f autom4te.cfg autom4te.tmp $(edit) $(srcdir)/autom4te.in >autom4te.tmp chmod a-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.64_2.64+dfsg.orig/lib/Autom4te/�����������������������������������������������������������0000755�0001750�0001750�00000000000�11233220572�016504� 5����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/Autom4te/Channels.pm������������������������������������������������0000644�0001750�0001750�00000050224�11233202315�020573� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2002, 2004, 2006, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. ############################################################### # The main copy of this file is in Automake's CVS repository. # # Updates should be sent to automake-patches@gnu.org. # ############################################################### 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; # Redirect all channels to push messages on a Thread::Queue using # the specified serialization key. setup_channel_queue $queue, $key; # Output a message pending in a Thread::Queue. pop_channel_queue $queue; # Treat all warnings as errors. $warnings_are_errors = 1; # Exit with the greatest exit 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 &setup_channel_queue &pop_channel_queue 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<exit_code> options of C<fatal> and C<error> 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<UP_NONE>, C<UP_TEXT>, C<UP_LOC_TEXT> Possible values for the C<uniq_part> options. This selects the part of the message that should be considered when filtering out duplicates. If C<UP_LOC_TEXT> is used, the location and the explanation message are used for filtering. If C<UP_TEXT> is used, only the explanation message is used (so the same message will be filtered out if it appears at different locations). C<UP_NONE> 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<US_LOCAL>, C<US_GLOBAL> Possible values for the C<uniq_scope> options. Use C<US_GLOBAL> for error messages that should be printed only once during the execution of the program, C<US_LOCAL> for message that should be printed only once per file. (Actually, C<Channels> does not do this now when files are changed, it relies on you calling C<reset_local_duplicates> 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<register_channel>, C<setup_channel>, and C<msg> functions. The possible keys, with their default value are: =over =item C<type =E<gt> '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<exit_code =E<gt> 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<file =E<gt> \*STDERR> The file where the error should be output. =item C<silent =E<gt> 0> Whether the channel should be silent. Use this do disable a category of warning, for instance. =item C<ordered =E<gt> 1> Whether, with multi-threaded execution, the message should be queued for ordered output. =item C<uniq_part =E<gt> UP_LOC_TEXT> The part of the message subject to duplicate filtering. See the documentation for the C<UP_NONE>, C<UP_TEXT>, and C<UP_LOC_TEXT> constants above. C<uniq_part> can also be set to an arbitrary string that will be used instead of the message when considering duplicates. =item C<uniq_scope =E<gt> US_LOCAL> The scope of duplicate filtering. See the documentation for the C<US_LOCAL>, and C<US_GLOBAL> constants above. =item C<header =E<gt> ''> A string to prepend to each message emitted through this channel. =item C<footer =E<gt> ''> A string to append to each message emitted through this channel. =item C<backtrace =E<gt> 0> Die with a stack backtrace after displaying the message. =item C<partial =E<gt> 0> When set, indicates a partial message that should be output along with the next message with C<partial> unset. Several partial messages can be stacked this way. Duplicate filtering will apply to the I<global> message resulting from all I<partial> messages, using the options from the last (non-partial) message. Linking associated messages is the main reason to use this option. For instance the following messages msg 'channel', 'foo:2', 'redefinition of A ...'; msg 'channel', 'foo:1', '... A previously defined here'; msg 'channel', 'foo:3', 'redefinition of A ...'; msg 'channel', 'foo:1', '... A previously defined here'; will result in foo:2: redefinition of A ... foo:1: ... A previously defined here foo:3: redefinition of A ... where the duplicate "I<... A previously defined here>" has been filtered out. Linking these messages using C<partial> as follows will prevent the fourth message to disappear. msg 'channel', 'foo:2', 'redefinition of A ...', partial => 1; msg 'channel', 'foo:1', '... A previously defined here'; msg 'channel', 'foo:3', 'redefinition of A ...', partial => 1; msg 'channel', 'foo:1', '... A previously defined here'; Note that because the stack of C<partial> messages is printed with the first non-C<partial> message, most options of C<partial> messages will be ignored. =back =cut use vars qw (%_default_options %_global_duplicate_messages %_local_duplicate_messages); # Default options for a channel. %_default_options = ( type => 'warning', exit_code => 1, file => \*STDERR, silent => 0, ordered => 1, queue => 0, queue_key => undef, uniq_scope => US_LOCAL, uniq_part => UP_LOC_TEXT, header => '', footer => '', backtrace => 0, partial => 0, ); # Filled with output messages as keys, to detect duplicates. # The value associated with each key is the number of occurrences # filtered out. %_local_duplicate_messages = (); %_global_duplicate_messages = (); sub _reset_duplicates (\%) { my ($ref) = @_; my $dup = 0; foreach my $k (keys %$ref) { $dup += $ref->{$k}; } %$ref = (); return $dup; } =head2 Functions =over 4 =item C<reset_local_duplicates ()> Reset local duplicate messages (see C<US_LOCAL>), and return the number of messages that have been filtered out. =cut sub reset_local_duplicates () { return _reset_duplicates %_local_duplicate_messages; } =item C<reset_global_duplicates ()> Reset local duplicate messages (see C<US_GLOBAL>), and return the number of messages that have been filtered out. =cut sub reset_global_duplicates () { return _reset_duplicates %_global_duplicate_messages; } sub _merge_options (\%%) { my ($hash, %options) = @_; local $_; foreach (keys %options) { if (exists $hash->{$_}) { $hash->{$_} = $options{$_} } else { confess "unknown option `$_'"; } } if ($hash->{'ordered'}) { confess "fatal messages cannot be ordered" if $hash->{'type'} eq 'fatal'; confess "backtrace cannot be output on ordered messages" if $hash->{'backtrace'}; } } =item C<register_channel ($name, [%options])> Declare channel C<$name>, and override the default options with those listed in C<%options>. =cut sub register_channel ($;%) { my ($name, %options) = @_; my %channel_opts = %_default_options; _merge_options %channel_opts, %options; $channels{$name} = \%channel_opts; } =item C<exists_channel ($name)> Returns true iff channel C<$name> has been registered. =cut sub exists_channel ($) { my ($name) = @_; return exists $channels{$name}; } =item C<channel_type ($name)> Returns the type of channel C<$name> if it has been registered. Returns the empty string otherwise. =cut sub channel_type ($) { my ($name) = @_; return $channels{$name}{'type'} if exists_channel $name; return ''; } # _format_sub_message ($LEADER, $MESSAGE) # --------------------------------------- # Split $MESSAGE at new lines and add $LEADER to each line. sub _format_sub_message ($$) { my ($leader, $message) = @_; return $leader . join ("\n" . $leader, split ("\n", $message)) . "\n"; } # _format_message ($LOCATION, $MESSAGE, %OPTIONS) # ----------------------------------------------- # Format the message. Return a string ready to print. sub _format_message ($$%) { my ($location, $message, %opts) = @_; my $msg = ''; if (ref $location) { # If $LOCATION is a reference, assume it's an instance of the # Autom4te::Location class and display contexts. my $loc = $location->get || $me; $msg = _format_sub_message ("$loc: ", $opts{'header'} . $message . $opts{'footer'}); for my $pair ($location->get_contexts) { $msg .= _format_sub_message ($pair->[0] . ": ", $pair->[1]); } } else { $location ||= $me; $msg = _format_sub_message ("$location: ", $opts{'header'} . $message . $opts{'footer'}); } return $msg; } # _enqueue ($QUEUE, $KEY, $UNIQ_SCOPE, $TO_FILTER, $MSG, $FILE) # ------------------------------------------------------------ # Push message on a queue, to be processed by another thread. sub _enqueue ($$$$$$) { my ($queue, $key, $uniq_scope, $to_filter, $msg, $file) = @_; $queue->enqueue ($key, $msg, $to_filter, $uniq_scope); confess "message queuing works only for STDERR" if $file ne \*STDERR; } # _dequeue ($QUEUE) # ----------------- # Pop a message from a queue, and print, similarly to how # _print_message would do it. Return 0 if the queue is # empty. Note that the key has already been dequeued. sub _dequeue ($) { my ($queue) = @_; my $msg = $queue->dequeue || return 0; my $to_filter = $queue->dequeue; my $uniq_scope = $queue->dequeue; my $file = \*STDERR; if ($to_filter ne '') { # Do we want local or global uniqueness? my $dups; if ($uniq_scope == US_LOCAL) { $dups = \%_local_duplicate_messages; } elsif ($uniq_scope == US_GLOBAL) { $dups = \%_global_duplicate_messages; } else { confess "unknown value for uniq_scope: " . $uniq_scope; } # Update the hash of messages. if (exists $dups->{$to_filter}) { ++$dups->{$to_filter}; return 1; } else { $dups->{$to_filter} = 0; } } print $file $msg; return 1; } # Store partial messages here. (See the 'partial' option.) use vars qw ($partial); $partial = ''; # _print_message ($LOCATION, $MESSAGE, %OPTIONS) # ---------------------------------------------- # Format the message, check duplicates, and print it. sub _print_message ($$%) { my ($location, $message, %opts) = @_; return 0 if ($opts{'silent'}); my $msg = _format_message ($location, $message, %opts); if ($opts{'partial'}) { # Incomplete message. Store, don't print. $partial .= $msg; return; } else { # Prefix with any partial message send so far. $msg = $partial . $msg; $partial = ''; } # Check for duplicate message if requested. my $to_filter; if ($opts{'uniq_part'} ne UP_NONE) { # Which part of the error should we match? if ($opts{'uniq_part'} eq UP_TEXT) { $to_filter = $message; } elsif ($opts{'uniq_part'} eq UP_LOC_TEXT) { $to_filter = $msg; } else { $to_filter = $opts{'uniq_part'}; } # Do we want local or global uniqueness? my $dups; if ($opts{'uniq_scope'} == US_LOCAL) { $dups = \%_local_duplicate_messages; } elsif ($opts{'uniq_scope'} == US_GLOBAL) { $dups = \%_global_duplicate_messages; } else { confess "unknown value for uniq_scope: " . $opts{'uniq_scope'}; } # Update the hash of messages. if (exists $dups->{$to_filter}) { ++$dups->{$to_filter}; return 0; } else { $dups->{$to_filter} = 0; } } my $file = $opts{'file'}; if ($opts{'ordered'} && $opts{'queue'}) { _enqueue ($opts{'queue'}, $opts{'queue_key'}, $opts{'uniq_scope'}, $to_filter, $msg, $file); } else { print $file $msg; } return 1; } =item C<msg ($channel, $location, $message, [%options])> Emit a message on C<$channel>, overriding some options of the channel with those specified in C<%options>. Obviously C<$channel> must have been registered with C<register_channel>. C<$message> is the text of the message, and C<$location> is a location associated to the message. For instance to complain about some unused variable C<mumble> declared at line 10 in F<foo.c>, one could do: msg 'unused', 'foo.c:10', "unused variable `mumble'"; If channel C<unused> is not silent (and if this message is not a duplicate), the following would be output: foo.c:10: unused variable `mumble' C<$location> can also be an instance of C<Autom4te::Location>. In this case, the stack of contexts will be displayed in addition. If C<$message> contains newline characters, C<$location> is prepended to each line. For instance, msg 'error', 'somewhere', "1st line\n2nd line"; becomes somewhere: 1st line somewhere: 2nd line If C<$location> is an empty string, it is replaced by the name of the program. Actually, if you don't use C<%options>, you can even elide the empty C<$location>. Thus msg 'fatal', '', 'fatal error'; msg 'fatal', 'fatal error'; both print progname: fatal error =cut use vars qw (@backlog %buffering); # See buffer_messages() and flush_messages() below. %buffering = (); # The map of channel types to buffer. @backlog = (); # The buffer of messages. sub msg ($$;$%) { my ($channel, $location, $message, %options) = @_; if (! defined $message) { $message = $location; $location = ''; } confess "unknown channel $channel" unless exists $channels{$channel}; my %opts = %{$channels{$channel}}; _merge_options (%opts, %options); if (exists $buffering{$opts{'type'}}) { push @backlog, [$channel, $location->clone, $message, %options]; return; } # Print the message if needed. if (_print_message ($location, $message, %opts)) { # Adjust exit status. if ($opts{'type'} eq 'error' || $opts{'type'} eq 'fatal' || ($opts{'type'} eq 'warning' && $warnings_are_errors)) { my $es = $opts{'exit_code'}; $exit_code = $es if $es > $exit_code; } # Die on fatal messages. confess if $opts{'backtrace'}; if ($opts{'type'} eq 'fatal') { # flush messages explicitly here, needed in worker threads. STDERR->flush; exit $exit_code; } } } =item C<setup_channel ($channel, %options)> Override the options of C<$channel> with those specified by C<%options>. =cut sub setup_channel ($%) { my ($name, %opts) = @_; confess "channel $name doesn't exist" unless exists $channels{$name}; _merge_options %{$channels{$name}}, %opts; } =item C<setup_channel_type ($type, %options)> Override the options of any channel of type C<$type> with those specified by C<%options>. =cut sub setup_channel_type ($%) { my ($type, %opts) = @_; foreach my $channel (keys %channels) { setup_channel $channel, %opts if $channels{$channel}{'type'} eq $type; } } =item C<dup_channel_setup ()>, C<drop_channel_setup ()> Sometimes it is necessary to make temporary modifications to channels. For instance one may want to disable a warning while processing a particular file, and then restore the initial setup. These two functions make it easy: C<dup_channel_setup ()> saves a copy of the current configuration for later restoration by C<drop_channel_setup ()>. You can think of this as a stack of configurations whose first entry is the active one. C<dup_channel_setup ()> duplicates the first entry, while C<drop_channel_setup ()> just deletes it. =cut use vars qw (@_saved_channels); @_saved_channels = (); sub dup_channel_setup () { my %channels_copy; foreach my $k1 (keys %channels) { $channels_copy{$k1} = {%{$channels{$k1}}}; } push @_saved_channels, \%channels_copy; } sub drop_channel_setup () { my $saved = pop @_saved_channels; %channels = %$saved; } =item C<buffer_messages (@types)>, C<flush_messages ()> By default, when C<msg> is called, messages are processed immediately. Sometimes it is necessary to delay the output of messages. For instance you might want to make diagnostics before channels have been completely configured. After C<buffer_messages(@types)> has been called, messages sent with C<msg> to a channel whose type is listed in C<@types> will be stored in a list for later processing. This backlog of messages is processed when C<flush_messages> is called, with the current channel options (not the options in effect, at the time of C<msg>). So for instance, if some channel was silenced in the meantime, messages to this channel will not be printed. C<flush_messages> cancels the effect of C<buffer_messages>. Following calls to C<msg> are processed immediately as usual. =cut sub buffer_messages (@) { foreach my $type (@_) { $buffering{$type} = 1; } } sub flush_messages () { %buffering = (); foreach my $args (@backlog) { &msg (@$args); } @backlog = (); } =item C<setup_channel_queue ($queue, $key)> Set the queue to fill for each channel that is ordered, and the key to use for serialization. =cut sub setup_channel_queue ($$) { my ($queue, $key) = @_; foreach my $channel (keys %channels) { setup_channel $channel, queue => $queue, queue_key => $key if $channels{$channel}{'ordered'}; } } =item C<pop_channel_queue ($queue)> pop a message off the $queue; the key has already been popped. =cut sub pop_channel_queue ($) { my ($queue) = @_; return _dequeue ($queue); } =back =head1 SEE ALSO L<Autom4te::Location> =head1 HISTORY Written by Alexandre Duret-Lutz E<lt>F<adl@gnu.org>E<gt>. =cut 1; ### 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.64_2.64+dfsg.orig/lib/Autom4te/Makefile.am������������������������������������������������0000644�0001750�0001750�00000000601�11202536433�020537� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to create Makefile.in perllibdir = $(pkgdatadir)/Autom4te dist_perllib_DATA = \ C4che.pm \ ChannelDefs.pm \ Channels.pm \ Configure_ac.pm \ FileUtils.pm \ General.pm \ Request.pm \ Struct.pm \ XFile.pm ## --------------- ## ## Building TAGS. ## ## --------------- ## TAGS_FILES = $(dist_perllib_DATA) ETAGS_ARGS = --lang=perl �������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/Autom4te/XFile.pm���������������������������������������������������0000644�0001750�0001750�00000016277�11233202315�020061� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2001, 2003, 2004, 2006, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # Written by Akim Demaille <akim@freefriends.org>. ############################################################### # The main copy of this file is in Automake's CVS repository. # # Updates should be sent to automake-patches@gnu.org. # ############################################################### package Autom4te::XFile; =head1 NAME Autom4te::XFile - supply object methods for filehandles with error handling =head1 SYNOPSIS use Autom4te::XFile; $fh = new Autom4te::XFile; $fh->open ("< file"); # No need to check $FH: we died if open failed. print <$fh>; $fh->close; # No need to check the return value of close: we died if it failed. $fh = new Autom4te::XFile "> file"; # No need to check $FH: we died if new failed. print $fh "bar\n"; $fh->close; $fh = new Autom4te::XFile "file", "r"; # No need to check $FH: we died if new failed. defined $fh print <$fh>; undef $fh; # automatically closes the file and checks for errors. $fh = new Autom4te::XFile "file", O_WRONLY | O_APPEND; # No need to check $FH: we died if new failed. print $fh "corge\n"; $pos = $fh->getpos; $fh->setpos ($pos); undef $fh; # automatically closes the file and checks for errors. autoflush STDOUT 1; =head1 DESCRIPTION C<Autom4te::XFile> inherits from C<IO::File>. It provides the method C<name> returning the file name. It provides dying versions of the methods C<close>, C<lock> (corresponding to C<flock>), C<new>, C<open>, C<seek>, and C<truncate>. It also overrides the C<getline> and C<getlines> methods to translate C<\r\n> to C<\n>. =head1 SEE ALSO L<perlfunc>, L<perlop/"I/O Operators">, L<IO::File> L<IO::Handle> L<IO::Seekable> =head1 HISTORY Derived from IO::File.pm by Akim Demaille E<lt>F<akim@freefriends.org>E<gt>. =cut require 5.000; use strict; use vars qw($VERSION @EXPORT @EXPORT_OK $AUTOLOAD @ISA); use Carp; use Errno; use IO::File; use File::Basename; use Autom4te::ChannelDefs; use Autom4te::Channels qw(msg); use Autom4te::FileUtils; require Exporter; require DynaLoader; @ISA = qw(IO::File Exporter DynaLoader); $VERSION = "1.2"; @EXPORT = @IO::File::EXPORT; eval { # Make all Fcntl O_XXX and LOCK_XXX constants available for importing require Fcntl; my @O = grep /^(LOCK|O)_/, @Fcntl::EXPORT, @Fcntl::EXPORT_OK; Fcntl->import (@O); # first we import what we want to export push (@EXPORT, @O); }; # Used in croak error messages. my $me = basename ($0); ################################################ ## Constructor ## sub new { my $type = shift; my $class = ref $type || $type || "Autom4te::XFile"; my $fh = $class->SUPER::new (); if (@_) { $fh->open (@_); } $fh; } ################################################ ## Open ## sub open { my $fh = shift; my ($file) = @_; # WARNING: Gross hack: $FH is a typeglob: use its hash slot to store # the `name' of the file we are opening. See the example with # io_socket_timeout in IO::Socket for more, and read Graham's # comment in IO::Handle. ${*$fh}{'autom4te_xfile_file'} = "$file"; if (!$fh->SUPER::open (@_)) { fatal "cannot open $file: $!"; } # In case we're running under MSWindows, don't write with CRLF. # (This circumvents a bug in at least Cygwin bash where the shell # parsing fails on lines ending with the continuation character '\' # and CRLF). binmode $fh if $file =~ /^\s*>/; } ################################################ ## Close ## sub close { my $fh = shift; if (!$fh->SUPER::close (@_)) { my $file = $fh->name; Autom4te::FileUtils::handle_exec_errors $file unless $!; fatal "cannot close $file: $!"; } } ################################################ ## Getline ## # Some Win32/perl installations fail to translate \r\n to \n on input # so we do that here. sub getline { local $_ = $_[0]->SUPER::getline; # Perform a _global_ replacement: $_ may can contains many lines # in slurp mode ($/ = undef). s/\015\012/\n/gs if defined $_; return $_; } ################################################ ## Getlines ## sub getlines { my @res = (); my $line; push @res, $line while $line = $_[0]->getline; return @res; } ################################################ ## Name ## sub name { my $fh = shift; return ${*$fh}{'autom4te_xfile_file'}; } ################################################ ## Lock ## sub lock { my ($fh, $mode) = @_; # Cannot use @_ here. # Unless explicitly configured otherwise, Perl implements its `flock' with the # first of flock(2), fcntl(2), or lockf(3) that works. These can fail on # NFS-backed files, with ENOLCK (GNU/Linux) or EOPNOTSUPP (FreeBSD); we # usually ignore these errors. If $ENV{MAKEFLAGS} suggests that a parallel # invocation of `make' has invoked the tool we serve, report all locking # failures and abort. # # On Unicos, flock(2) and fcntl(2) over NFS hang indefinitely when `lockd' is # not running. NetBSD NFS clients silently grant all locks. We do not # attempt to defend against these dangers. # # -j is for parallel BSD make, -P is for parallel HP-UX make. if (!flock ($fh, $mode)) { my $make_j = (exists $ENV{'MAKEFLAGS'} && " -$ENV{'MAKEFLAGS'}" =~ / (-[BdeikrRsSw]*[jP]|--[jP]|---?jobs)/); my $note = "\nforgo `make -j' or use a file system that supports locks"; my $file = $fh->name; msg ($make_j ? 'fatal' : 'unsupported', "cannot lock $file with mode $mode: $!" . ($make_j ? $note : "")) if $make_j || !($!{ENOLCK} || $!{EOPNOTSUPP}); } } ################################################ ## Seek ## sub seek { my $fh = shift; # Cannot use @_ here. if (!seek ($fh, $_[0], $_[1])) { my $file = $fh->name; fatal "$me: cannot rewind $file with @_: $!"; } } ################################################ ## Truncate ## sub truncate { my ($fh, $len) = @_; if (!truncate ($fh, $len)) { my $file = $fh->name; fatal "cannot truncate $file at $len: $!"; } } 1; ### 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.64_2.64+dfsg.orig/lib/Autom4te/Configure_ac.pm��������������������������������������������0000644�0001750�0001750�00000005662�11233202315�021432� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2003, 2005, 2006, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. ############################################################### # The main copy of this file is in Automake's CVS repository. # # Updates should be sent to automake-patches@gnu.org. # ############################################################### package Autom4te::Configure_ac; use strict; use Exporter; use Autom4te::Channels; use Autom4te::ChannelDefs; use vars qw (@ISA @EXPORT); @ISA = qw (Exporter); @EXPORT = qw (&find_configure_ac &require_configure_ac); =head1 NAME Autom4te::Configure_ac - Locate configure.ac or configure.in. =head1 SYNOPSIS use Autom4te::Configure_ac; # Try to locate configure.in or configure.ac in the current # directory. It may be absent. Complain if both files exist. my $file_name = find_configure_ac; # Likewise, but bomb out if the file does not exist. my $file_name = require_configure_ac; # Likewise, but in $dir. my $file_name = find_configure_ac ($dir); my $file_name = require_configure_ac ($dir); =cut sub find_configure_ac (;@) { my ($directory) = @_; $directory ||= '.'; my $configure_ac = File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.ac')); my $configure_in = File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.in')); if (-f $configure_ac) { if (-f $configure_in) { msg ('unsupported', "`$configure_ac' and `$configure_in' both present.\n" . "proceeding with `$configure_ac'."); } return $configure_ac } elsif (-f $configure_in) { return $configure_in; } return $configure_ac; } sub require_configure_ac (;$) { my $res = find_configure_ac (@_); fatal "`configure.ac' or `configure.in' is required" unless -f $res; return $res } 1; ### 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.64_2.64+dfsg.orig/lib/Autom4te/Makefile.in������������������������������������������������0000644�0001750�0001750�00000031107�11233217354�020557� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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/Autom4te DIST_COMMON = $(dist_perllib_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(perllibdir)" DATA = $(dist_perllib_DATA) ETAGS = etags CTAGS = ctags 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ perllibdir = $(pkgdatadir)/Autom4te dist_perllib_DATA = \ C4che.pm \ ChannelDefs.pm \ Channels.pm \ Configure_ac.pm \ FileUtils.pm \ General.pm \ Request.pm \ Struct.pm \ XFile.pm TAGS_FILES = $(dist_perllib_DATA) ETAGS_ARGS = --lang=perl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Autom4te/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Autom4te/Makefile .PRECIOUS: 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 $(am__aclocal_m4_deps): install-dist_perllibDATA: $(dist_perllib_DATA) @$(NORMAL_INSTALL) test -z "$(perllibdir)" || $(MKDIR_P) "$(DESTDIR)$(perllibdir)" @list='$(dist_perllib_DATA)'; test -n "$(perllibdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(perllibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(perllibdir)" || exit $$?; \ done uninstall-dist_perllibDATA: @$(NORMAL_UNINSTALL) @list='$(dist_perllib_DATA)'; test -n "$(perllibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(perllibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(perllibdir)" && rm -f $$files 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: for dir in "$(DESTDIR)$(perllibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-am info-am: install-data-am: install-dist_perllibDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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_perllibDATA .MAKE: install-am install-strip .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-data install-data-am install-dist_perllibDATA \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am 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_perllibDATA # 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.64_2.64+dfsg.orig/lib/Autom4te/ChannelDefs.pm���������������������������������������������0000644�0001750�0001750�00000022020�11202536433�021212� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2002, 2003, 2006, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. package Autom4te::ChannelDefs; use Autom4te::Channels; =head1 NAME Autom4te::ChannelDefs - channel definitions for Automake and helper functions =head1 SYNOPSIS use Autom4te::ChannelDefs; print Autom4te::ChannelDefs::usage (), "\n"; prog_error ($MESSAGE, [%OPTIONS]); error ($WHERE, $MESSAGE, [%OPTIONS]); error ($MESSAGE); fatal ($WHERE, $MESSAGE, [%OPTIONS]); fatal ($MESSAGE); verb ($MESSAGE, [%OPTIONS]); switch_warning ($CATEGORY); parse_WARNINGS (); parse_warnings ($OPTION, $ARGUMENT); Autom4te::ChannelDefs::set_strictness ($STRICTNESS_NAME); =head1 DESCRIPTION This package defines channels that can be used in Automake to output diagnostics and other messages (via C<msg()>). It also defines some helper function to enable or disable these channels, and some shorthand function to output on specific channels. =cut use 5.005; use strict; use Exporter; use vars qw (@ISA @EXPORT); @ISA = qw (Exporter); @EXPORT = qw (&prog_error &error &fatal &verb &switch_warning &parse_WARNINGS &parse_warnings); =head2 CHANNELS The following channels can be used as the first argument of C<Autom4te::Channel::msg>. For some of them we list a shorthand function that makes the code more readable. =over 4 =item C<fatal> Fatal errors. Use C<&fatal> to send messages over this channel. =item C<error> Common errors. Use C<&error> to send messages over this channel. =item C<error-gnu> Errors related to GNU Standards. =item C<error-gnu/warn> Errors related to GNU Standards that should be warnings in "foreign" mode. =item C<error-gnits> Errors related to GNITS Standards (silent by default). =item C<automake> Internal errors. Use C<&prog_error> to send messages over this channel. =item C<cross> Constructs compromising the cross-compilation of the package. =item C<gnu> Warnings related to GNU Coding Standards. =item C<obsolete> Warnings about obsolete features (silent by default). =item C<override> Warnings about user redefinitions of Automake rules or variables (silent by default). =item C<portability> Warnings about non-portable constructs. =item C<syntax> Warnings about weird syntax, unused variables, typos... =item C<unsupported> Warnings about unsupported (or mis-supported) features. =item C<verb> Messages output in C<--verbose> mode. Use C<&verb> to send such messages. =item C<note> Informative messages. =back =cut # Initialize our list of error/warning channels. # Do not forget to update &usage and the manual # if you add or change a warning channel. register_channel 'fatal', type => 'fatal', ordered => 0; register_channel 'error', type => 'error'; register_channel 'error-gnu', type => 'error'; register_channel 'error-gnu/warn', type => 'error'; register_channel 'error-gnits', type => 'error', silent => 1; register_channel 'automake', type => 'fatal', backtrace => 1, header => ("####################\n" . "## Internal Error ##\n" . "####################\n"), footer => "\nPlease contact <bug-automake\@gnu.org>.", ordered => 0; register_channel 'cross', type => 'warning', silent => 1; register_channel 'gnu', type => 'warning'; register_channel 'obsolete', type => 'warning', silent => 1; register_channel 'override', type => 'warning', silent => 1; register_channel 'portability', type => 'warning', silent => 1; register_channel 'syntax', type => 'warning'; register_channel 'unsupported', type => 'warning'; register_channel 'verb', type => 'debug', silent => 1, ordered => 0; register_channel 'note', type => 'debug', silent => 0; =head2 FUNCTIONS =over 4 =item C<usage ()> Return the warning category descriptions. =cut sub usage () { return "Warning categories include: `cross' cross compilation issues `gnu' GNU coding standards (default in gnu and gnits modes) `obsolete' obsolete features or constructions `override' user redefinitions of Automake rules or variables `portability' portability issues (default in gnu and gnits modes) `syntax' dubious syntactic constructs (default) `unsupported' unsupported or incomplete features (default) `all' all the warnings `no-CATEGORY' turn off warnings in CATEGORY `none' turn off all the warnings `error' treat warnings as errors"; } =item C<prog_error ($MESSAGE, [%OPTIONS])> Signal a programming error (on channel C<automake>), display C<$MESSAGE>, and exit 1. =cut sub prog_error ($;%) { my ($msg, %opts) = @_; msg 'automake', '', $msg, %opts; } =item C<error ($WHERE, $MESSAGE, [%OPTIONS])> =item C<error ($MESSAGE)> Uncategorized errors. =cut sub error ($;$%) { my ($where, $msg, %opts) = @_; msg ('error', $where, $msg, %opts); } =item C<fatal ($WHERE, $MESSAGE, [%OPTIONS])> =item C<fatal ($MESSAGE)> Fatal errors. =cut sub fatal ($;$%) { my ($where, $msg, %opts) = @_; msg ('fatal', $where, $msg, %opts); } =item C<verb ($MESSAGE, [%OPTIONS])> C<--verbose> messages. =cut sub verb ($;%) { my ($msg, %opts) = @_; msg 'verb', '', $msg, %opts; } =item C<switch_warning ($CATEGORY)> If C<$CATEGORY> is C<mumble>, turn on channel C<mumble>. If it is C<no-mumble>, turn C<mumble> off. Else handle C<all> and C<none> for completeness. =cut sub switch_warning ($) { my ($cat) = @_; my $has_no = 0; if ($cat =~ /^no-(.*)$/) { $cat = $1; $has_no = 1; } if ($cat eq 'all') { setup_channel_type 'warning', silent => $has_no; } elsif ($cat eq 'none') { setup_channel_type 'warning', silent => ! $has_no; } elsif ($cat eq 'error') { $warnings_are_errors = ! $has_no; # Set exit code if Perl warns about something # (like uninitialized variables). $SIG{"__WARN__"} = $has_no ? 'DEFAULT' : sub { print STDERR @_; $exit_code = 1; }; } elsif (channel_type ($cat) eq 'warning') { setup_channel $cat, silent => $has_no; } else { return 1; } return 0; } =item C<parse_WARNINGS ()> Parse the WARNINGS environment variable. =cut sub parse_WARNINGS () { if (exists $ENV{'WARNINGS'}) { # Ignore unknown categories. This is required because WARNINGS # should be honored by many tools. switch_warning $_ foreach (split (',', $ENV{'WARNINGS'})); } } =item C<parse_warnings ($OPTION, @ARGUMENT)> Parse the argument of C<--warning=CATEGORY> or C<-WCATEGORY>. C<$OPTIONS> is C<"--warning"> or C<"-W">, C<@ARGUMENT> is a list of C<CATEGORY>. This can be used as an argument to C<Getopt>. =cut sub parse_warnings ($@) { my ($opt, @categories) = @_; foreach my $cat (map { split ',' } @categories) { msg 'unsupported', "unknown warning category `$cat'" if switch_warning $cat; } } =item C<set_strictness ($STRICTNESS_NAME)> Configure channels for strictness C<$STRICTNESS_NAME>. =cut sub set_strictness ($) { my ($name) = @_; if ($name eq 'gnu') { setup_channel 'error-gnu', silent => 0; setup_channel 'error-gnu/warn', silent => 0, type => 'error'; setup_channel 'error-gnits', silent => 1; setup_channel 'portability', silent => 0; setup_channel 'gnu', silent => 0; } elsif ($name eq 'gnits') { setup_channel 'error-gnu', silent => 0; setup_channel 'error-gnu/warn', silent => 0, type => 'error'; setup_channel 'error-gnits', silent => 0; setup_channel 'portability', silent => 0; setup_channel 'gnu', silent => 0; } elsif ($name eq 'foreign') { setup_channel 'error-gnu', silent => 1; setup_channel 'error-gnu/warn', silent => 0, type => 'warning'; setup_channel 'error-gnits', silent => 1; setup_channel 'portability', silent => 1; setup_channel 'gnu', silent => 1; } else { prog_error "level `$name' not recognized\n"; } } =back =head1 SEE ALSO L<Autom4te::Channels> =head1 HISTORY Written by Alexandre Duret-Lutz E<lt>F<adl@gnu.org>E<gt>. =cut ### 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.64_2.64+dfsg.orig/lib/Autom4te/Struct.pm��������������������������������������������������0000644�0001750�0001750�00000046336�11233202315�020335� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# autoconf -- create `configure' using m4 macros # Copyright (C) 2001, 2002, 2006, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # This file is basically Perl 5.6's Class::Struct, but made compatible # with Perl 5.5. If someday this has to be updated, be sure to rename # all the occurrences of Class::Struct into Autom4te::Struct, otherwise # if we `use' a Perl module (e.g., File::stat) that uses Class::Struct, # we would have two packages defining the same symbols. Boom. ############################################################### # The main copy of this file is in Automake's CVS repository. # # Updates should be sent to automake-patches@gnu.org. # ############################################################### package Autom4te::Struct; ## See POD after __END__ use 5.005_03; use strict; use vars qw(@ISA @EXPORT $VERSION); use Carp; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(struct); $VERSION = '0.58'; ## Tested on 5.002 and 5.003 without class membership tests: my $CHECK_CLASS_MEMBERSHIP = ($] >= 5.003_95); my $print = 0; sub printem { if (@_) { $print = shift } else { $print++ } } { package Autom4te::Struct::Tie_ISA; sub TIEARRAY { my $class = shift; return bless [], $class; } sub STORE { my ($self, $index, $value) = @_; Autom4te::Struct::_subclass_error(); } sub FETCH { my ($self, $index) = @_; $self->[$index]; } sub FETCHSIZE { my $self = shift; return scalar(@$self); } sub DESTROY { } } sub struct { # Determine parameter list structure, one of: # struct( class => [ element-list ]) # struct( class => { element-list }) # struct( element-list ) # Latter form assumes current package name as struct name. my ($class, @decls); my $base_type = ref $_[1]; if ( $base_type eq 'HASH' ) { $class = shift; @decls = %{shift()}; _usage_error() if @_; } elsif ( $base_type eq 'ARRAY' ) { $class = shift; @decls = @{shift()}; _usage_error() if @_; } else { $base_type = 'ARRAY'; $class = (caller())[0]; @decls = @_; } _usage_error() if @decls % 2 == 1; # Ensure we are not, and will not be, a subclass. my $isa = do { no strict 'refs'; \@{$class . '::ISA'}; }; _subclass_error() if @$isa; tie @$isa, 'Autom4te::Struct::Tie_ISA'; # Create constructor. croak "function 'new' already defined in package $class" if do { no strict 'refs'; defined &{$class . "::new"} }; my @methods = (); my %refs = (); my %arrays = (); my %hashes = (); my %classes = (); my $got_class = 0; my $out = ''; $out = "{\n package $class;\n use Carp;\n sub new {\n"; $out .= " my (\$class, \%init) = \@_;\n"; $out .= " \$class = __PACKAGE__ unless \@_;\n"; my $cnt = 0; my $idx = 0; my( $cmt, $name, $type, $elem ); if( $base_type eq 'HASH' ){ $out .= " my(\$r) = {};\n"; $cmt = ''; } elsif( $base_type eq 'ARRAY' ){ $out .= " my(\$r) = [];\n"; } while( $idx < @decls ){ $name = $decls[$idx]; $type = $decls[$idx+1]; push( @methods, $name ); if( $base_type eq 'HASH' ){ $elem = "{'${class}::$name'}"; } elsif( $base_type eq 'ARRAY' ){ $elem = "[$cnt]"; ++$cnt; $cmt = " # $name"; } if( $type =~ /^\*(.)/ ){ $refs{$name}++; $type = $1; } my $init = "defined(\$init{'$name'}) ? \$init{'$name'} :"; if( $type eq '@' ){ $out .= " croak 'Initializer for $name must be array reference'\n"; $out .= " if defined(\$init{'$name'}) && ref(\$init{'$name'}) ne 'ARRAY';\n"; $out .= " \$r->$elem = $init [];$cmt\n"; $arrays{$name}++; } elsif( $type eq '%' ){ $out .= " croak 'Initializer for $name must be hash reference'\n"; $out .= " if defined(\$init{'$name'}) && ref(\$init{'$name'}) ne 'HASH';\n"; $out .= " \$r->$elem = $init {};$cmt\n"; $hashes{$name}++; } elsif ( $type eq '$') { $out .= " \$r->$elem = $init undef;$cmt\n"; } elsif( $type =~ /^\w+(?:::\w+)*$/ ){ $init = "defined(\$init{'$name'}) ? \%{\$init{'$name'}} : ()"; $out .= " croak 'Initializer for $name must be hash reference'\n"; $out .= " if defined(\$init{'$name'}) && ref(\$init{'$name'}) ne 'HASH';\n"; $out .= " \$r->$elem = '${type}'->new($init);$cmt\n"; $classes{$name} = $type; $got_class = 1; } else{ croak "'$type' is not a valid struct element type"; } $idx += 2; } $out .= " bless \$r, \$class;\n }\n"; # Create accessor methods. my( $pre, $pst, $sel ); $cnt = 0; foreach $name (@methods){ if ( do { no strict 'refs'; defined &{$class . "::$name"} } ) { carp "function '$name' already defined, overrides struct accessor method"; } else { $pre = $pst = $cmt = $sel = ''; if( defined $refs{$name} ){ $pre = "\\("; $pst = ")"; $cmt = " # returns ref"; } $out .= " sub $name {$cmt\n my \$r = shift;\n"; if( $base_type eq 'ARRAY' ){ $elem = "[$cnt]"; ++$cnt; } elsif( $base_type eq 'HASH' ){ $elem = "{'${class}::$name'}"; } if( defined $arrays{$name} ){ $out .= " my \$i;\n"; $out .= " \@_ ? (\$i = shift) : return \$r->$elem;\n"; $sel = "->[\$i]"; } elsif( defined $hashes{$name} ){ $out .= " my \$i;\n"; $out .= " \@_ ? (\$i = shift) : return \$r->$elem;\n"; $sel = "->{\$i}"; } elsif( defined $classes{$name} ){ if ( $CHECK_CLASS_MEMBERSHIP ) { $out .= " croak '$name argument is wrong class' if \@_ && ! UNIVERSAL::isa(\$_[0], '$classes{$name}');\n"; } } $out .= " croak 'Too many args to $name' if \@_ > 1;\n"; $out .= " \@_ ? ($pre\$r->$elem$sel = shift$pst) : $pre\$r->$elem$sel$pst;\n"; $out .= " }\n"; } } $out .= "}\n1;\n"; print $out if $print; my $result = eval $out; carp $@ if $@; } sub _usage_error { confess "struct usage error"; } sub _subclass_error { croak 'struct class cannot be a subclass (@ISA not allowed)'; } 1; # for require __END__ =head1 NAME Autom4te::Struct - declare struct-like datatypes as Perl classes =head1 SYNOPSIS use Autom4te::Struct; # declare struct, based on array: struct( CLASS_NAME => [ ELEMENT_NAME => ELEMENT_TYPE, ... ]); # declare struct, based on hash: struct( CLASS_NAME => { ELEMENT_NAME => ELEMENT_TYPE, ... }); package CLASS_NAME; use Autom4te::Struct; # declare struct, based on array, implicit class name: struct( ELEMENT_NAME => ELEMENT_TYPE, ... ); package Myobj; use Autom4te::Struct; # declare struct with four types of elements: struct( s => '$', a => '@', h => '%', c => 'My_Other_Class' ); $obj = new Myobj; # constructor # scalar type accessor: $element_value = $obj->s; # element value $obj->s('new value'); # assign to element # array type accessor: $ary_ref = $obj->a; # reference to whole array $ary_element_value = $obj->a(2); # array element value $obj->a(2, 'new value'); # assign to array element # hash type accessor: $hash_ref = $obj->h; # reference to whole hash $hash_element_value = $obj->h('x'); # hash element value $obj->h('x', 'new value'); # assign to hash element # class type accessor: $element_value = $obj->c; # object reference $obj->c->method(...); # call method of object $obj->c(new My_Other_Class); # assign a new object =head1 DESCRIPTION C<Autom4te::Struct> exports a single function, C<struct>. Given a list of element names and types, and optionally a class name, C<struct> creates a Perl 5 class that implements a "struct-like" data structure. The new class is given a constructor method, C<new>, for creating struct objects. Each element in the struct data has an accessor method, which is used to assign to the element and to fetch its value. The default accessor can be overridden by declaring a C<sub> of the same name in the package. (See Example 2.) Each element's type can be scalar, array, hash, or class. =head2 The C<struct()> function The C<struct> function has three forms of parameter-list. struct( CLASS_NAME => [ ELEMENT_LIST ]); struct( CLASS_NAME => { ELEMENT_LIST }); struct( ELEMENT_LIST ); The first and second forms explicitly identify the name of the class being created. The third form assumes the current package name as the class name. An object of a class created by the first and third forms is based on an array, whereas an object of a class created by the second form is based on a hash. The array-based forms will be somewhat faster and smaller; the hash-based forms are more flexible. The class created by C<struct> must not be a subclass of another class other than C<UNIVERSAL>. It can, however, be used as a superclass for other classes. To facilitate this, the generated constructor method uses a two-argument blessing. Furthermore, if the class is hash-based, the key of each element is prefixed with the class name (see I<Perl Cookbook>, Recipe 13.12). A function named C<new> must not be explicitly defined in a class created by C<struct>. The I<ELEMENT_LIST> has the form NAME => TYPE, ... Each name-type pair declares one element of the struct. Each element name will be defined as an accessor method unless a method by that name is explicitly defined; in the latter case, a warning is issued if the warning flag (B<-w>) is set. =head2 Element Types and Accessor Methods The four element types -- scalar, array, hash, and class -- are represented by strings -- C<'$'>, C<'@'>, C<'%'>, and a class name -- optionally preceded by a C<'*'>. The accessor method provided by C<struct> for an element depends on the declared type of the element. =over =item Scalar (C<'$'> or C<'*$'>) The element is a scalar, and by default is initialized to C<undef> (but see L<Initializing with new>). The accessor's argument, if any, is assigned to the element. If the element type is C<'$'>, the value of the element (after assignment) is returned. If the element type is C<'*$'>, a reference to the element is returned. =item Array (C<'@'> or C<'*@'>) The element is an array, initialized by default to C<()>. With no argument, the accessor returns a reference to the element's whole array (whether or not the element was specified as C<'@'> or C<'*@'>). With one or two arguments, the first argument is an index specifying one element of the array; the second argument, if present, is assigned to the array element. If the element type is C<'@'>, the accessor returns the array element value. If the element type is C<'*@'>, a reference to the array element is returned. =item Hash (C<'%'> or C<'*%'>) The element is a hash, initialized by default to C<()>. With no argument, the accessor returns a reference to the element's whole hash (whether or not the element was specified as C<'%'> or C<'*%'>). With one or two arguments, the first argument is a key specifying one element of the hash; the second argument, if present, is assigned to the hash element. If the element type is C<'%'>, the accessor returns the hash element value. If the element type is C<'*%'>, a reference to the hash element is returned. =item Class (C<'Class_Name'> or C<'*Class_Name'>) The element's value must be a reference blessed to the named class or to one of its subclasses. The element is initialized to the result of calling the C<new> constructor of the named class. The accessor's argument, if any, is assigned to the element. The accessor will C<croak> if this is not an appropriate object reference. If the element type does not start with a C<'*'>, the accessor returns the element value (after assignment). If the element type starts with a C<'*'>, a reference to the element itself is returned. =back =head2 Initializing with C<new> C<struct> always creates a constructor called C<new>. That constructor may take a list of initializers for the various elements of the new struct. Each initializer is a pair of values: I<element name>C< =E<gt> >I<value>. The initializer value for a scalar element is just a scalar value. The initializer for an array element is an array reference. The initializer for a hash is a hash reference. The initializer for a class element is also a hash reference, and the contents of that hash are passed to the element's own constructor. See Example 3 below for an example of initialization. =head1 EXAMPLES =over =item Example 1 Giving a struct element a class type that is also a struct is how structs are nested. Here, C<timeval> represents a time (seconds and microseconds), and C<rusage> has two elements, each of which is of type C<timeval>. use Autom4te::Struct; struct( rusage => { ru_utime => timeval, # seconds ru_stime => timeval, # microseconds }); struct( timeval => [ tv_secs => '$', tv_usecs => '$', ]); # create an object: my $t = new rusage; # $t->ru_utime and $t->ru_stime are objects of type timeval. # set $t->ru_utime to 100.0 sec and $t->ru_stime to 5.0 sec. $t->ru_utime->tv_secs(100); $t->ru_utime->tv_usecs(0); $t->ru_stime->tv_secs(5); $t->ru_stime->tv_usecs(0); =item Example 2 An accessor function can be redefined in order to provide additional checking of values, etc. Here, we want the C<count> element always to be nonnegative, so we redefine the C<count> accessor accordingly. package MyObj; use Autom4te::Struct; # declare the struct struct ( 'MyObj', { count => '$', stuff => '%' } ); # override the default accessor method for 'count' sub count { my $self = shift; if ( @_ ) { die 'count must be nonnegative' if $_[0] < 0; $self->{'count'} = shift; warn "Too many args to count" if @_; } return $self->{'count'}; } package main; $x = new MyObj; print "\$x->count(5) = ", $x->count(5), "\n"; # prints '$x->count(5) = 5' print "\$x->count = ", $x->count, "\n"; # prints '$x->count = 5' print "\$x->count(-5) = ", $x->count(-5), "\n"; # dies due to negative argument! =item Example 3 The constructor of a generated class can be passed a list of I<element>=>I<value> pairs, with which to initialize the struct. If no initializer is specified for a particular element, its default initialization is performed instead. Initializers for non-existent elements are silently ignored. Note that the initializer for a nested struct is specified as an anonymous hash of initializers, which is passed on to the nested struct's constructor. use Autom4te::Struct; struct Breed => { name => '$', cross => '$', }; struct Cat => [ name => '$', kittens => '@', markings => '%', breed => 'Breed', ]; my $cat = Cat->new( name => 'Socks', kittens => ['Monica', 'Kenneth'], markings => { socks=>1, blaze=>"white" }, breed => { name=>'short-hair', cross=>1 }, ); print "Once a cat called ", $cat->name, "\n"; print "(which was a ", $cat->breed->name, ")\n"; print "had two kittens: ", join(' and ', @{$cat->kittens}), "\n"; =back =head1 Author and Modification History Modified by Akim Demaille, 2001-08-03 Rename as Autom4te::Struct to avoid name clashes with Class::Struct. Make it compatible with Perl 5.5. Modified by Damian Conway, 1999-03-05, v0.58. Added handling of hash-like arg list to class ctor. Changed to two-argument blessing in ctor to support derivation from created classes. Added classname prefixes to keys in hash-based classes (refer to "Perl Cookbook", Recipe 13.12 for rationale). Corrected behavior of accessors for '*@' and '*%' struct elements. Package now implements documented behavior when returning a reference to an entire hash or array element. Previously these were returned as a reference to a reference to the element. Renamed to C<Class::Struct> and modified by Jim Miner, 1997-04-02. members() function removed. Documentation corrected and extended. Use of struct() in a subclass prohibited. User definition of accessor allowed. Treatment of '*' in element types corrected. Treatment of classes as element types corrected. Class name to struct() made optional. Diagnostic checks added. Originally C<Class::Template> by Dean Roehrich. # Template.pm --- struct/member template builder # 12mar95 # Dean Roehrich # # changes/bugs fixed since 28nov94 version: # - podified # changes/bugs fixed since 21nov94 version: # - Fixed examples. # changes/bugs fixed since 02sep94 version: # - Moved to Class::Template. # changes/bugs fixed since 20feb94 version: # - Updated to be a more proper module. # - Added "use strict". # - Bug in build_methods, was using @var when @$var needed. # - Now using my() rather than local(). # # Uses perl5 classes to create nested data types. # This is offered as one implementation of Tom Christiansen's "structs.pl" # idea. =cut ### 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.64_2.64+dfsg.orig/lib/Autom4te/General.pm�������������������������������������������������0000644�0001750�0001750�00000022734�11202536433�020431� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# autoconf -- create `configure' using m4 macros # Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. package Autom4te::General; =head1 NAME Autom4te::General - general support functions for Autoconf and Automake =head1 SYNOPSIS use Autom4te::General =head1 DESCRIPTION This perl module provides various general purpose support functions used in several executables of the Autoconf and Automake packages. =cut use 5.005_03; use Exporter; use Autom4te::ChannelDefs; use Autom4te::Channels; use File::Basename; use File::Path (); use File::stat; use IO::File; use Carp; use strict; use vars qw (@ISA @EXPORT); @ISA = qw (Exporter); # Variables we define and export. my @export_vars = qw ($debug $force $help $me $tmp $verbose $version); # Functions we define and export. my @export_subs = qw (&debug &getopt &shell_quote &mktmpdir &uniq); # Functions we forward (coming from modules we use). my @export_forward_subs = qw (&basename &dirname &fileparse); @EXPORT = (@export_vars, @export_subs, @export_forward_subs); # Variable we share with the main package. Be sure to have a single # copy of them: using `my' together with multiple inclusion of this # package would introduce several copies. =head2 Global Variables =over 4 =item C<$debug> Set this variable to 1 if debug messages should be enabled. Debug messages are meant for developpers only, or when tracking down an incorrect execution. =cut use vars qw ($debug); $debug = 0; =item C<$force> Set this variable to 1 to recreate all the files, or to consider all the output files are obsolete. =cut use vars qw ($force); $force = undef; =item C<$help> Set to the help message associated to the option C<--help>. =cut use vars qw ($help); $help = undef; =item C<$me> The name of this application, as should be used in diagostic messages. =cut use vars qw ($me); $me = basename ($0); =item C<$tmp> The name of the temporary directory created by C<mktmpdir>. Left C<undef> otherwise. =cut # Our tmp dir. use vars qw ($tmp); $tmp = undef; =item C<$verbose> Enable verbosity messages. These messages are meant for ordinary users, and typically make explicit the steps being performed. =cut use vars qw ($verbose); $verbose = 0; =item C<$version> Set to the version message associated to the option C<--version>. =cut use vars qw ($version); $version = undef; =back =cut ## ----- ## ## END. ## ## ----- ## =head2 Functions =over 4 =item C<END> Filter Perl's exit codes, delete any temporary directory (unless C<$debug>), and exit nonzero whenever closing C<STDOUT> fails. =cut # END # --- sub END { # $? contains the exit status we will return. # It was set using one of the following ways: # # 1) normal termination # this sets $? = 0 # 2) calling `exit (n)' # this sets $? = n # 3) calling die or friends (croak, confess...): # a) when $! is non-0 # this set $? = $! # b) when $! is 0 but $? is not # this sets $? = ($? >> 8) (i.e., the exit code of the # last program executed) # c) when both $! and $? are 0 # this sets $? = 255 # # Cases 1), 2), and 3b) are fine, but we prefer $? = 1 for 3a) and 3c). my $status = $?; $status = 1 if ($! && $! == $?) || $? == 255; # (Note that we cannot safely distinguish calls to `exit (n)' # from calls to die when `$! = n'. It's not big deal because # we only call `exit (0)' or `exit (1)'.) if (!$debug && defined $tmp && -d $tmp) { local $SIG{__WARN__} = sub { $status = 1; warn $_[0] }; File::Path::rmtree $tmp; } # This is required if the code might send any output to stdout # E.g., even --version or --help. So it's best to do it unconditionally. if (! close STDOUT) { print STDERR "$me: closing standard output: $!\n"; $? = 1; return; } $? = $status; } ## ----------- ## ## Functions. ## ## ----------- ## =item C<debug (@message)> If the debug mode is enabled (C<$debug> and C<$verbose>), report the C<@message> on C<STDERR>, signed with the name of the program. =cut # &debug(@MESSAGE) # ---------------- # Messages displayed only if $DEBUG and $VERBOSE. sub debug (@) { print STDERR "$me: ", @_, "\n" if $verbose && $debug; } =item C<getopt (%option)> Wrapper around C<Getopt::Long>. In addition to the user C<option>s, support C<-h>/C<--help>, C<-V>/C<--version>, C<-v>/C<--verbose>, C<-d>/C<--debug>, C<-f>/C<--force>. Conform to the GNU Coding Standards for error messages. Try to work around a weird behavior from C<Getopt::Long> to preserve C<-> as an C<@ARGV> instead of rejecting it as a broken option. =cut # getopt (%OPTION) # ---------------- # Handle the %OPTION, plus all the common options. # Work around Getopt bugs wrt `-'. sub getopt (%) { my (%option) = @_; use Getopt::Long; # F*k. Getopt seems bogus and dies when given `-' with `bundling'. # If fixed some day, use this: '' => sub { push @ARGV, "-" } my $stdin = grep /^-$/, @ARGV; @ARGV = grep !/^-$/, @ARGV; %option = ("h|help" => sub { print $help; exit 0 }, "V|version" => sub { print $version; exit 0 }, "v|verbose" => sub { ++$verbose }, "d|debug" => sub { ++$debug }, 'f|force' => \$force, # User options last, so that they have precedence. %option); Getopt::Long::Configure ("bundling", "pass_through"); GetOptions (%option) or exit 1; foreach (grep { /^-./ } @ARGV) { print STDERR "$0: unrecognized option `$_'\n"; print STDERR "Try `$0 --help' for more information.\n"; exit (1); } push @ARGV, '-' if $stdin; setup_channel 'note', silent => !$verbose; setup_channel 'verb', silent => !$verbose; } =item C<shell_quote ($file_name)> Quote C<$file_name> for the shell. =cut # $FILE_NAME # shell_quote ($FILE_NAME) # ------------------------ # If the string $S is a well-behaved file name, simply return it. # If it contains white space, quotes, etc., quote it, and return # the new string. sub shell_quote($) { my ($s) = @_; if ($s =~ m![^\w+/.,-]!) { # Convert each single quote to '\'' $s =~ s/\'/\'\\\'\'/g; # Then single quote the string. $s = "'$s'"; } return $s; } =item C<mktmpdir ($signature)> Create a temporary directory which name is based on C<$signature>. Store its name in C<$tmp>. C<END> is in charge of removing it, unless C<$debug>. =cut # mktmpdir ($SIGNATURE) # --------------------- sub mktmpdir ($) { my ($signature) = @_; my $TMPDIR = $ENV{'TMPDIR'} || '/tmp'; my $quoted_tmpdir = shell_quote ($TMPDIR); # If mktemp supports dirs, use it. $tmp = `(umask 077 && mktemp -d $quoted_tmpdir/"${signature}XXXXXX") 2>/dev/null`; chomp $tmp; if (!$tmp || ! -d $tmp) { $tmp = "$TMPDIR/$signature" . int (rand 10000) . ".$$"; mkdir $tmp, 0700 or croak "$me: cannot create $tmp: $!\n"; } print STDERR "$me:$$: working in $tmp\n" if $debug; } =item C<uniq (@list)> Return C<@list> with no duplicates, keeping only the first occurrences. =cut # @RES # uniq (@LIST) # ------------ sub uniq (@) { my @res = (); my %seen = (); foreach my $item (@_) { if (! exists $seen{$item}) { $seen{$item} = 1; push (@res, $item); } } return wantarray ? @res : "@res"; } =item C<handle_exec_errors ($command)> Display an error message for C<$command>, based on the content of C<$?> and C<$!>. =cut # handle_exec_errors ($COMMAND) # ----------------------------- sub handle_exec_errors ($) { my ($command) = @_; $command = (split (' ', $command))[0]; if ($!) { error "failed to run $command: $!"; } else { use POSIX qw (WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG); if (WIFEXITED ($?)) { my $status = WEXITSTATUS ($?); # WIFEXITED and WEXITSTATUS can alter $!, reset it so that # error() actually propagates the command's exit status, not $!. $! = 0; error "$command failed with exit status: $status"; } elsif (WIFSIGNALED ($?)) { my $signal = WTERMSIG ($?); # In this case we prefer to exit with status 1. $! = 1; error "$command terminated by signal: $signal"; } else { error "$command exited abnormally"; } } } =back =head1 SEE ALSO L<Autom4te::XFile> =head1 HISTORY Written by Alexandre Duret-Lutz E<lt>F<adl@gnu.org>E<gt> and Akim Demaille E<lt>F<akim@freefriends.org>E<gt>. =cut 1; # for require ### 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.64_2.64+dfsg.orig/lib/Autom4te/FileUtils.pm�����������������������������������������������0000644�0001750�0001750�00000023711�11233202315�020741� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. ############################################################### # The main copy of this file is in Automake's CVS repository. # # Updates should be sent to automake-patches@gnu.org. # ############################################################### package Autom4te::FileUtils; =head1 NAME Autom4te::FileUtils - handling files =head1 SYNOPSIS use Autom4te::FileUtils =head1 DESCRIPTION This perl module provides various general purpose file handling functions. =cut use strict; use Exporter; use File::stat; use IO::File; use Autom4te::Channels; use Autom4te::ChannelDefs; use vars qw (@ISA @EXPORT); @ISA = qw (Exporter); @EXPORT = qw (&open_quote &contents &find_file &mtime &update_file &up_to_date_p &xsystem &xsystem_hint &xqx &dir_has_case_matching_file &reset_dir_cache &set_dir_cache_file); =item C<open_quote ($file_name)> Quote C<$file_name> for open. =cut # $FILE_NAME # open_quote ($FILE_NAME) # ----------------------- # If the string $S is a well-behaved file name, simply return it. # If it starts with white space, prepend `./', if it ends with # white space, add `\0'. Return the new string. sub open_quote($) { my ($s) = @_; if ($s =~ m/^\s/) { $s = "./$s"; } if ($s =~ m/\s$/) { $s = "$s\0"; } return $s; } =item C<find_file ($file_name, @include)> Return the first path for a C<$file_name> in the C<include>s. We match exactly the behavior of GNU M4: first look in the current directory (which includes the case of absolute file names), and then, if the file name is not absolute, look in C<@include>. If the file is flagged as optional (ends with C<?>), then return undef if absent, otherwise exit with error. =cut # $FILE_NAME # find_file ($FILE_NAME, @INCLUDE) # ------------------------------- sub find_file ($@) { use File::Spec; my ($file_name, @include) = @_; my $optional = 0; $optional = 1 if $file_name =~ s/\?$//; return File::Spec->canonpath ($file_name) if -e $file_name; if (!File::Spec->file_name_is_absolute ($file_name)) { foreach my $path (@include) { return File::Spec->canonpath (File::Spec->catfile ($path, $file_name)) if -e File::Spec->catfile ($path, $file_name) } } fatal "$file_name: no such file or directory" unless $optional; return undef; } =item C<mtime ($file)> Return the mtime of C<$file>. Missing files, or C<-> standing for C<STDIN> or C<STDOUT> are ``obsolete'', i.e., as old as possible. =cut # $MTIME # MTIME ($FILE) # ------------- sub mtime ($) { my ($file) = @_; return 0 if $file eq '-' || ! -f $file; my $stat = stat ($file) or fatal "cannot stat $file: $!"; return $stat->mtime; } =item C<update_file ($from, $to, [$force])> Rename C<$from> as C<$to>, preserving C<$to> timestamp if it has not changed, unless C<$force> is true (defaults to false). Recognize C<$to> = C<-> standing for C<STDIN>. C<$from> is always removed/renamed. =cut # &update_file ($FROM, $TO; $FORCE) # --------------------------------- sub update_file ($$;$) { my ($from, $to, $force) = @_; $force = 0 unless defined $force; my $SIMPLE_BACKUP_SUFFIX = $ENV{'SIMPLE_BACKUP_SUFFIX'} || '~'; use File::Compare; use File::Copy; if ($to eq '-') { my $in = new IO::File ("< " . open_quote ($from)); my $out = new IO::File (">-"); while ($_ = $in->getline) { print $out $_; } $in->close; unlink ($from) || fatal "cannot remove $from: $!"; return; } if (!$force && -f "$to" && compare ("$from", "$to") == 0) { # File didn't change, so don't update its mod time. msg 'note', "`$to' is unchanged"; unlink ($from) or fatal "cannot remove $from: $!"; return } if (-f "$to") { # Back up and install the new one. move ("$to", "$to$SIMPLE_BACKUP_SUFFIX") or fatal "cannot backup $to: $!"; move ("$from", "$to") or fatal "cannot rename $from as $to: $!"; msg 'note', "`$to' is updated"; } else { move ("$from", "$to") or fatal "cannot rename $from as $to: $!"; msg 'note', "`$to' is created"; } } =item C<up_to_date_p ($file, @dep)> Is C<$file> more recent than C<@dep>? =cut # $BOOLEAN # &up_to_date_p ($FILE, @DEP) # --------------------------- sub up_to_date_p ($@) { my ($file, @dep) = @_; my $mtime = mtime ($file); foreach my $dep (@dep) { if ($mtime < mtime ($dep)) { verb "up_to_date ($file): outdated: $dep"; return 0; } } verb "up_to_date ($file): up to date"; return 1; } =item C<handle_exec_errors ($command, [$expected_exit_code = 0], [$hint])> Display an error message for C<$command>, based on the content of C<$?> and C<$!>. Be quiet if the command exited normally with C<$expected_exit_code>. If C<$hint> is given, display that as well if the command failed to run at all. =cut sub handle_exec_errors ($;$$) { my ($command, $expected, $hint) = @_; $expected = 0 unless defined $expected; if (defined $hint) { $hint = "\n" . $hint; } else { $hint = ''; } $command = (split (' ', $command))[0]; if ($!) { fatal "failed to run $command: $!" . $hint; } else { use POSIX qw (WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG); if (WIFEXITED ($?)) { my $status = WEXITSTATUS ($?); # Propagate exit codes. fatal ('', "$command failed with exit status: $status", exit_code => $status) unless $status == $expected; } elsif (WIFSIGNALED ($?)) { my $signal = WTERMSIG ($?); fatal "$command terminated by signal: $signal"; } else { fatal "$command exited abnormally"; } } } =item C<xqx ($command)> Same as C<qx> (but in scalar context), but fails on errors. =cut # xqx ($COMMAND) # -------------- sub xqx ($) { my ($command) = @_; verb "running: $command"; $! = 0; my $res = `$command`; handle_exec_errors $command if $?; return $res; } =item C<xsystem (@argv)> Same as C<system>, but fails on errors, and reports the C<@argv> in verbose mode. =cut sub xsystem (@) { my (@command) = @_; verb "running: @command"; $! = 0; handle_exec_errors "@command" if system @command; } =item C<xsystem_hint ($msg, @argv)> Same as C<xsystem>, but allows to pass a hint that will be displayed in case the command failed to run at all. =cut sub xsystem_hint (@) { my ($hint, @command) = @_; verb "running: @command"; $! = 0; handle_exec_errors "@command", 0, $hint if system @command; } =item C<contents ($file_name)> Return the contents of C<$file_name>. =cut # contents ($FILE_NAME) # --------------------- sub contents ($) { my ($file) = @_; verb "reading $file"; local $/; # Turn on slurp-mode. my $f = new Autom4te::XFile "< " . open_quote ($file); my $contents = $f->getline; $f->close; return $contents; } =item C<dir_has_case_matching_file ($DIRNAME, $FILE_NAME)> Return true iff $DIR contains a file name that matches $FILE_NAME case insensitively. We need to be cautious on case-insensitive case-preserving file systems (e.g. Mac OS X's HFS+). On such systems C<-f 'Foo'> and C<-f 'foO'> answer the same thing. Hence if a package distributes its own F<CHANGELOG> file, but has no F<ChangeLog> file, automake would still try to distribute F<ChangeLog> (because it thinks it exists) in addition to F<CHANGELOG>, although it is impossible for these two files to be in the same directory (the two file names designate the same file). =cut use vars '%_directory_cache'; sub dir_has_case_matching_file ($$) { # Note that print File::Spec->case_tolerant returns 0 even on MacOS # X (with Perl v5.8.1-RC3 at least), so do not try to shortcut this # function using that. my ($dirname, $file_name) = @_; return 0 unless -f "$dirname/$file_name"; # The file appears to exist, however it might be a mirage if the # system is case insensitive. Let's browse the directory and check # whether the file is really in. We maintain a cache of directories # so Automake doesn't spend all its time reading the same directory # again and again. if (!exists $_directory_cache{$dirname}) { error "failed to open directory `$dirname'" unless opendir (DIR, $dirname); $_directory_cache{$dirname} = { map { $_ => 1 } readdir (DIR) }; closedir (DIR); } return exists $_directory_cache{$dirname}{$file_name}; } =item C<reset_dir_cache ($dirname)> Clear C<dir_has_case_matching_file>'s cache for C<$dirname>. =cut sub reset_dir_cache ($) { delete $_directory_cache{$_[0]}; } =item C<set_dir_cache_file ($dirname, $file_name)> State that C<$dirname> contains C<$file_name> now. =cut sub set_dir_cache_file ($$) { my ($dirname, $file_name) = @_; $_directory_cache{$dirname}{$file_name} = 1 if exists $_directory_cache{$dirname}; } 1; # for require ### 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.64_2.64+dfsg.orig/lib/Autom4te/C4che.pm���������������������������������������������������0000644�0001750�0001750�00000011537�11202536433�020001� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# autoconf -- create `configure' using m4 macros # Copyright (C) 2003, 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. package Autom4te::C4che; =head1 NAME Autom4te::C4che - a single m4 run request =head1 SYNOPSIS use Autom4te::C4che; =head1 DESCRIPTION This Perl module handles the cache of M4 runs used by autom4te. =cut use Data::Dumper; use Autom4te::Request; use Carp; use strict; =over 4 =item @request List of requests. We cannot declare it "my" as the loading, performed via "do", would refer to another scope, and @request would not be updated. It used to work with "my" vars, and I do not know whether the current behavior (5.6) is wanted or not. =cut use vars qw(@request); =item C<$req = Autom4te::C4che-E<gt>retrieve (%attr)> Find a request with the same path and input. =cut sub retrieve($%) { my ($self, %attr) = @_; foreach (@request) { # Same path. next if join ("\n", @{$_->path}) ne join ("\n", @{$attr{path}}); # Same inputs. next if join ("\n", @{$_->input}) ne join ("\n", @{$attr{input}}); # Found it. return $_; } return undef; } =item C<$req = Autom4te::C4che-E<gt>register (%attr)> Create and register a request for these path and input. =cut # $REQUEST-OBJ # register ($SELF, %ATTR) # ----------------------- # NEW should not be called directly. # Private. sub register ($%) { my ($self, %attr) = @_; # path and input are the only ID for a request object. my $obj = new Autom4te::Request ('path' => $attr{path}, 'input' => $attr{input}); push @request, $obj; # Assign an id for cache file. $obj->id ("$#request"); return $obj; } =item C<$req = Autom4te::C4che-E<gt>request (%request)> Get (retrieve or create) a request for the path C<$request{path}> and the input C<$request{input}>. =cut # $REQUEST-OBJ # request($SELF, %REQUEST) # ------------------------ sub request ($%) { my ($self, %request) = @_; my $req = Autom4te::C4che->retrieve (%request) || Autom4te::C4che->register (%request); # If there are new traces to produce, then we are not valid. foreach (@{$request{'macro'}}) { if (! exists ${$req->macro}{$_}) { ${$req->macro}{$_} = 1; $req->valid (0); } } # It would be great to have $REQ check that it is up to date wrt # its dependencies, but that requires getting traces (to fetch the # included files), which is out of the scope of Request (currently?). return $req; } =item C<$string = Autom4te::C4che-E<gt>marshall ()> Serialize all the current requests. =cut # marshall($SELF) # --------------- sub marshall ($) { my ($caller) = @_; my $res = ''; my $marshall = Data::Dumper->new ([\@request], [qw (*request)]); $marshall->Indent(2)->Terse(0); $res = $marshall->Dump . "\n"; return $res; } =item C<Autom4te::C4che-E<gt>save ($file)> Save the cache in the C<$file> file object. =cut # SAVE ($FILE) # ------------ sub save ($$) { my ($self, $file) = @_; confess "cannot save a single request\n" if ref ($self); $file->seek (0, 0); $file->truncate (0); print $file "# This file was generated.\n", "# It contains the lists of macros which have been traced.\n", "# It can be safely removed.\n", "\n", $self->marshall; } =item C<Autom4te::C4che-E<gt>load ($file)> Load the cache from the C<$file> file object. =cut # LOAD ($FILE) # ------------ sub load ($$) { my ($self, $file) = @_; my $fname = $file->name; confess "cannot load a single request\n" if ref ($self); my $contents = join "", $file->getlines; eval $contents; confess "cannot eval $fname: $@\n" if $@; } =head1 SEE ALSO L<Autom4te::Request> =head1 HISTORY Written by Akim Demaille E<lt>F<akim@freefriends.org>E<gt>. =cut 1; # for require ### 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.64_2.64+dfsg.orig/lib/Autom4te/Request.pm�������������������������������������������������0000644�0001750�0001750�00000005060�11202536433�020475� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# autoconf -- create `configure' using m4 macros # 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. package Autom4te::Request; =head1 NAME Autom4te::Request - a single m4 run request =head1 SYNOPSIS use Autom4te::Request; =head1 DESCRIPTION This perl module provides various general purpose support functions used in several executables of the Autoconf and Automake packages. =cut use strict; use Autom4te::Struct; use Carp; use Data::Dumper; struct ( # The key of the cache files. 'id' => "\$", # True iff %MACRO contains all the macros we want to trace. 'valid' => "\$", # The include path. 'path' => '@', # The set of input files. 'input' => '@', # The set of macros currently traced. 'macro' => '%', ); # Serialize a request or all the current requests. sub marshall($) { my ($caller) = @_; my $res = ''; # CALLER is an object: instance method. my $marshall = Data::Dumper->new ([$caller]); $marshall->Indent(2)->Terse(0); $res = $marshall->Dump . "\n"; return $res; } # includes_p ($SELF, @MACRO) # -------------------------- # Does this request covers all the @MACRO. sub includes_p { my ($self, @macro) = @_; foreach (@macro) { return 0 if ! exists ${$self->macro}{$_}; } return 1; } =head1 SEE ALSO L<Autom4te::C4che> =head1 HISTORY Written by Akim Demaille E<lt>F<akim@freefriends.org>E<gt>. =cut 1; # for require ### 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.64_2.64+dfsg.orig/lib/autom4te.in���������������������������������������������������������0000644�0001750�0001750�00000010771�11202536433�017104� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Definition of Autom4te option sets. -*- Makefile -*- # # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # 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., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. ## -------------------------- ## ## Autoheader preselections. ## ## -------------------------- ## begin-language: "Autoheader-preselections" args: --preselect AC_CONFIG_HEADERS args: --preselect AH_OUTPUT args: --preselect AC_DEFINE_TRACE_LITERAL end-language: "Autoheader-preselections" ## ------------------------ ## ## Automake-preselections. ## ## ------------------------ ## begin-language: "Automake-preselections" args: --preselect AC_CANONICAL_BUILD args: --preselect AC_CANONICAL_HOST # AC_CANONICAL_SYSTEM was traced from Automake 1.7 to Automake 1.9. # Later versions trace AC_CANONICAL_TARGET instead. args: --preselect AC_CANONICAL_SYSTEM args: --preselect AC_CANONICAL_TARGET args: --preselect AC_CONFIG_AUX_DIR args: --preselect AC_CONFIG_FILES args: --preselect AC_CONFIG_HEADERS args: --preselect AC_CONFIG_LIBOBJ_DIR args: --preselect AC_CONFIG_LINKS args: --preselect AC_FC_FREEFORM args: --preselect AC_FC_SRCEXT args: --preselect AC_INIT args: --preselect AC_LIBSOURCE args: --preselect AC_REQUIRE_AUX_FILE # Automake < 1.10 traces AC_SUBST. Automake >= 1.10 traces AC_SUBST_TRACE. args: --preselect AC_SUBST args: --preselect AC_SUBST_TRACE args: --preselect AM_AUTOMAKE_VERSION args: --preselect AM_CONDITIONAL args: --preselect AM_ENABLE_MULTILIB args: --preselect AM_GNU_GETTEXT args: --preselect AM_GNU_GETTEXT_INTL_SUBDIR args: --preselect AM_INIT_AUTOMAKE args: --preselect AM_MAINTAINER_MODE args: --preselect AM_PROG_CC_C_O args: --preselect AM_PROG_CXX_C_O args: --preselect AM_PROG_F77_C_O args: --preselect AM_PROG_FC_C_O args: --preselect AM_SILENT_RULES args: --preselect _AM_SUBST_NOTMAKE args: --preselect _AM_COND_IF args: --preselect _AM_COND_ELSE args: --preselect _AM_COND_ENDIF args: --preselect LT_SUPPORTED_TAG args: --preselect _LT_AC_TAGCONFIG args: --preselect m4_include args: --preselect m4_sinclude end-language: "Automake-preselections" ## -------------------------- ## ## Autoreconf-preselections. ## ## -------------------------- ## begin-language: "Autoreconf-preselections" args: --preselect AC_CONFIG_AUX_DIR args: --preselect AC_CONFIG_HEADERS args: --preselect AC_CONFIG_SUBDIRS args: --preselect AC_INIT args: --preselect AC_PROG_LIBTOOL args: --preselect LT_INIT args: --preselect LT_CONFIG_LTDL_DIR args: --preselect AM_GNU_GETTEXT end-language: "Autoreconf-preselections" ## ----------------------------- ## ## Autoconf without aclocal.m4. ## ## ----------------------------- ## # This intermediate language is used by aclocal to build aclocal.m4. begin-language: "Autoconf-without-aclocal-m4" args: --prepend-include '@pkgdatadir@' args: --cache=autom4te.cache args: autoconf/autoconf.m4f args: acsite.m4? args: --mode 777 args: --language M4sh end-language: "Autoconf-without-aclocal-m4" ## ---------- ## ## Autoconf. ## ## ---------- ## begin-language: "Autoconf" args: --language Autoheader-preselections args: --language Automake-preselections args: --language Autoreconf-preselections args: --language Autoconf-without-aclocal-m4 args: aclocal.m4? end-language: "Autoconf" ## -------- ## ## Autotest ## ## -------- ## begin-language: "Autotest" args: --prepend-include '@pkgdatadir@' args: autotest/autotest.m4f args: package.m4? args: local.at? args: --mode 777 args: --language M4sh end-language: "Autotest" ## ---- ## ## M4sh ## ## ---- ## begin-language: "M4sh" args: --prepend-include '@pkgdatadir@' args: m4sugar/m4sh.m4f args: --mode 777 args: --language M4sugar end-language: "M4sh" ## ------- ## ## M4sugar ## ## ------- ## begin-language: "M4sugar" args: --prepend-include '@pkgdatadir@' args: m4sugar/m4sugar.m4f args: --warnings syntax end-language: "M4sugar" �������autoconf2.64_2.64+dfsg.orig/lib/m4sugar/������������������������������������������������������������0000755�0001750�0001750�00000000000�11233220573�016365� 5����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/m4sugar/m4sugar.m4��������������������������������������������������0000644�0001750�0001750�00000355305�11215442626�020231� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������divert(-1)# -*- Autoconf -*- # This file is part of Autoconf. # Base M4 layer. # Requires GNU M4. # # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, # 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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. # # Set the quotes, whatever the current quoting system. changequote() changequote([, ]) # Some old m4's don't support m4exit. But they provide # equivalent functionality by core dumping because of the # long macros we define. ifdef([__gnu__], , [errprint(M4sugar requires GNU M4. Install it before installing M4sugar or set the M4 environment variable to its absolute file name.) m4exit(2)]) ## ------------------------------- ## ## 1. Simulate --prefix-builtins. ## ## ------------------------------- ## # m4_define # m4_defn # m4_undefine define([m4_define], defn([define])) define([m4_defn], defn([defn])) define([m4_undefine], defn([undefine])) m4_undefine([define]) m4_undefine([defn]) m4_undefine([undefine]) # m4_copy(SRC, DST) # ----------------- # Define DST as the definition of SRC. # What's the difference between: # 1. m4_copy([from], [to]) # 2. m4_define([to], [from($@)]) # Well, obviously 1 is more expensive in space. Maybe 2 is more expensive # in time, but because of the space cost of 1, it's not that obvious. # Nevertheless, one huge difference is the handling of `$0'. If `from' # uses `$0', then with 1, `to''s `$0' is `to', while it is `from' in 2. # The user would certainly prefer to see `to'. # # This definition is in effect during m4sugar initialization, when # there are no pushdef stacks; later on, we redefine it to something # more powerful for all other clients to use. m4_define([m4_copy], [m4_define([$2], m4_defn([$1]))]) # m4_rename(SRC, DST) # ------------------- # Rename the macro SRC to DST. m4_define([m4_rename], [m4_copy([$1], [$2])m4_undefine([$1])]) # m4_rename_m4(MACRO-NAME) # ------------------------ # Rename MACRO-NAME to m4_MACRO-NAME. m4_define([m4_rename_m4], [m4_rename([$1], [m4_$1])]) # m4_copy_unm4(m4_MACRO-NAME) # --------------------------- # Copy m4_MACRO-NAME to MACRO-NAME. m4_define([m4_copy_unm4], [m4_copy([$1], m4_bpatsubst([$1], [^m4_\(.*\)], [[\1]]))]) # Some m4 internals have names colliding with tokens we might use. # Rename them a` la `m4 --prefix-builtins'. Conditionals first, since # some subsequent renames are conditional. m4_rename_m4([ifdef]) m4_rename([ifelse], [m4_if]) m4_rename_m4([builtin]) m4_rename_m4([changecom]) m4_rename_m4([changequote]) m4_ifdef([changeword],dnl conditionally available in 1.4.x [m4_undefine([changeword])]) m4_rename_m4([debugfile]) m4_rename_m4([debugmode]) m4_rename_m4([decr]) m4_rename_m4([divnum]) m4_rename_m4([dumpdef]) m4_rename_m4([errprint]) m4_rename_m4([esyscmd]) m4_rename_m4([eval]) m4_rename_m4([format]) m4_undefine([include]) m4_rename_m4([incr]) m4_rename_m4([index]) m4_rename_m4([indir]) m4_rename_m4([len]) m4_rename([m4exit], [m4_exit]) m4_undefine([m4wrap]) m4_ifdef([mkstemp],dnl added in M4 1.4.8 [m4_rename_m4([mkstemp]) m4_copy([m4_mkstemp], [m4_maketemp]) m4_undefine([maketemp])], [m4_rename_m4([maketemp]) m4_copy([m4_maketemp], [m4_mkstemp])]) m4_rename([patsubst], [m4_bpatsubst]) m4_rename_m4([popdef]) m4_rename_m4([pushdef]) m4_rename([regexp], [m4_bregexp]) m4_rename_m4([shift]) m4_undefine([sinclude]) m4_rename_m4([substr]) m4_ifdef([symbols],dnl present only in alpha-quality 1.4o [m4_rename_m4([symbols])]) m4_rename_m4([syscmd]) m4_rename_m4([sysval]) m4_rename_m4([traceoff]) m4_rename_m4([traceon]) m4_rename_m4([translit]) # _m4_defn(ARG) # ------------- # _m4_defn is for internal use only - it bypasses the wrapper, so it # must only be used on one argument at a time, and only on macros # known to be defined. Make sure this still works if the user renames # m4_defn but not _m4_defn. m4_copy([m4_defn], [_m4_defn]) # _m4_divert_raw(NUM) # ------------------- # _m4_divert_raw is for internal use only. Use this instead of # m4_builtin([divert], NUM), so that tracing diversion flow is easier. m4_rename([divert], [_m4_divert_raw]) # _m4_popdef(ARG...) # ------------------ # _m4_popdef is for internal use only - it bypasses the wrapper, so it # must only be used on macros known to be defined. Make sure this # still works if the user renames m4_popdef but not _m4_popdef. m4_copy([m4_popdef], [_m4_popdef]) # _m4_undefine(ARG...) # -------------------- # _m4_undefine is for internal use only - it bypasses the wrapper, so # it must only be used on macros known to be defined. Make sure this # still works if the user renames m4_undefine but not _m4_undefine. m4_copy([m4_undefine], [_m4_undefine]) # _m4_undivert(NUM...) # -------------------- # _m4_undivert is for internal use only, and should always be given # arguments. Use this instead of m4_builtin([undivert], NUM...), so # that tracing diversion flow is easier. m4_rename([undivert], [_m4_undivert]) ## ------------------- ## ## 2. Error messages. ## ## ------------------- ## # m4_location # ----------- # Output the current file, colon, and the current line number. m4_define([m4_location], [__file__:__line__]) # m4_errprintn(MSG) # ----------------- # Same as `errprint', but with the missing end of line. m4_define([m4_errprintn], [m4_errprint([$1 ])]) # m4_warning(MSG) # --------------- # Warn the user. m4_define([m4_warning], [m4_errprintn(m4_location[: warning: $1])]) # m4_fatal(MSG, [EXIT-STATUS]) # ---------------------------- # Fatal the user. :) m4_define([m4_fatal], [m4_errprintn(m4_location[: error: $1] m4_expansion_stack)m4_exit(m4_if([$2],, 1, [$2]))]) # m4_assert(EXPRESSION, [EXIT-STATUS = 1]) # ---------------------------------------- # This macro ensures that EXPRESSION evaluates to true, and exits if # EXPRESSION evaluates to false. m4_define([m4_assert], [m4_if(m4_eval([$1]), 0, [m4_fatal([assert failed: $1], [$2])])]) ## ------------- ## ## 3. Warnings. ## ## ------------- ## # _m4_warn(CATEGORY, MESSAGE, STACK-TRACE) # ---------------------------------------- # Report a MESSAGE to the user if the CATEGORY of warnings is enabled. # This is for traces only. # The STACK-TRACE is a \n-separated list of "LOCATION: MESSAGE". # # Within m4, the macro is a no-op. This macro really matters # when autom4te post-processes the trace output. m4_define([_m4_warn], []) # m4_warn(CATEGORY, MESSAGE) # -------------------------- # Report a MESSAGE to the user if the CATEGORY of warnings is enabled. m4_define([m4_warn], [_m4_warn([$1], [$2], m4_ifdef([_m4_expansion_stack], [m4_expansion_stack]))]) ## ------------------- ## ## 4. File inclusion. ## ## ------------------- ## # We also want to neutralize include (and sinclude for symmetry), # but we want to extend them slightly: warn when a file is included # several times. This is, in general, a dangerous operation, because # too many people forget to quote the first argument of m4_define. # # For instance in the following case: # m4_define(foo, [bar]) # then a second reading will turn into # m4_define(bar, [bar]) # which is certainly not what was meant. # m4_include_unique(FILE) # ----------------------- # Declare that the FILE was loading; and warn if it has already # been included. m4_define([m4_include_unique], [m4_ifdef([m4_include($1)], [m4_warn([syntax], [file `$1' included several times])])dnl m4_define([m4_include($1)])]) # m4_include(FILE) # ---------------- # Like the builtin include, but warns against multiple inclusions. m4_define([m4_include], [m4_include_unique([$1])dnl m4_builtin([include], [$1])]) # m4_sinclude(FILE) # ----------------- # Like the builtin sinclude, but warns against multiple inclusions. m4_define([m4_sinclude], [m4_include_unique([$1])dnl m4_builtin([sinclude], [$1])]) ## ------------------------------------ ## ## 5. Additional branching constructs. ## ## ------------------------------------ ## # Both `m4_ifval' and `m4_ifset' tests against the empty string. The # difference is that `m4_ifset' is specialized on macros. # # In case of arguments of macros, eg. $1, it makes little difference. # In the case of a macro `FOO', you don't want to check `m4_ifval(FOO, # TRUE)', because if `FOO' expands with commas, there is a shifting of # the arguments. So you want to run `m4_ifval([FOO])', but then you just # compare the *string* `FOO' against `', which, of course fails. # # So you want the variation `m4_ifset' that expects a macro name as $1. # If this macro is both defined and defined to a non empty value, then # it runs TRUE, etc. # m4_ifblank(COND, [IF-BLANK], [IF-TEXT]) # m4_ifnblank(COND, [IF-TEXT], [IF-BLANK]) # ---------------------------------------- # If COND is empty, or consists only of blanks (space, tab, newline), # then expand IF-BLANK, otherwise expand IF-TEXT. This differs from # m4_ifval only if COND has just whitespace, but it helps optimize in # spite of users who mistakenly leave trailing space after what they # thought was an empty argument: # macro( # [] # ) # # Writing one macro in terms of the other causes extra overhead, so # we inline both definitions. m4_define([m4_ifblank], [m4_if(m4_translit([[$1]], [ ][ ][ ]), [], [$2], [$3])]) m4_define([m4_ifnblank], [m4_if(m4_translit([[$1]], [ ][ ][ ]), [], [$3], [$2])]) # m4_ifval(COND, [IF-TRUE], [IF-FALSE]) # ------------------------------------- # If COND is not the empty string, expand IF-TRUE, otherwise IF-FALSE. # Comparable to m4_ifdef. m4_define([m4_ifval], [m4_if([$1], [], [$3], [$2])]) # m4_n(TEXT) # ---------- # If TEXT is not empty, return TEXT and a new line, otherwise nothing. m4_define([m4_n], [m4_if([$1], [], [], [$1 ])]) # m4_ifvaln(COND, [IF-TRUE], [IF-FALSE]) # -------------------------------------- # Same as `m4_ifval', but add an extra newline to IF-TRUE or IF-FALSE # unless that argument is empty. m4_define([m4_ifvaln], [m4_if([$1], [], [m4_n([$3])], [m4_n([$2])])]) # m4_ifset(MACRO, [IF-TRUE], [IF-FALSE]) # -------------------------------------- # If MACRO has no definition, or of its definition is the empty string, # expand IF-FALSE, otherwise IF-TRUE. m4_define([m4_ifset], [m4_ifdef([$1], [m4_ifval(_m4_defn([$1]), [$2], [$3])], [$3])]) # m4_ifndef(NAME, [IF-NOT-DEFINED], [IF-DEFINED]) # ----------------------------------------------- m4_define([m4_ifndef], [m4_ifdef([$1], [$3], [$2])]) # m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT) # ----------------------------------------------------------- # m4 equivalent of # switch (SWITCH) # { # case VAL1: # IF-VAL1; # break; # case VAL2: # IF-VAL2; # break; # ... # default: # DEFAULT; # break; # }. # All the values are optional, and the macro is robust to active # symbols properly quoted. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_case], [m4_if([$#], 0, [], [$#], 1, [], [$#], 2, [$2], [$1], [$2], [$3], [$0([$1], m4_shift3($@))])]) # m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT) # ----------------------------------------------------- # m4 equivalent of # # if (SWITCH =~ RE1) # VAL1; # elif (SWITCH =~ RE2) # VAL2; # elif ... # ... # else # DEFAULT # # All the values are optional, and the macro is robust to active symbols # properly quoted. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_bmatch], [m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])], [$#], 1, [m4_fatal([$0: too few arguments: $#: $1])], [$#], 2, [$2], [m4_if(m4_bregexp([$1], [$2]), -1, [$0([$1], m4_shift3($@))], [$3])])]) # m4_argn(N, ARGS...) # ------------------- # Extract argument N (greater than 0) from ARGS. Example: # m4_define([b], [B]) # m4_argn([2], [a], [b], [c]) => b # # Rather than using m4_car(m4_shiftn([$1], $@)), we exploit the fact that # GNU m4 can directly reference any argument, through an indirect macro. m4_define([m4_argn], [m4_assert([0 < $1])]dnl [m4_pushdef([_$0], [_m4_popdef([_$0])]m4_dquote([$]m4_incr([$1])))_$0($@)]) # m4_car(ARGS...) # m4_cdr(ARGS...) # --------------- # Manipulate m4 lists. m4_car returns the first argument. m4_cdr # bundles all but the first argument into a quoted list. These two # macros are generally used with list arguments, with quoting removed # to break the list into multiple m4 ARGS. m4_define([m4_car], [[$1]]) m4_define([m4_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) # _m4_cdr(ARGS...) # ---------------- # Like m4_cdr, except include a leading comma unless only one argument # remains. Why? Because comparing a large list against [] is more # expensive in expansion time than comparing the number of arguments; so # _m4_cdr can be used to reduce the number of arguments when it is time # to end recursion. m4_define([_m4_cdr], [m4_if([$#], 1, [], [, m4_dquote(m4_shift($@))])]) # m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT]) # ------------------------------------------------------------------- # Similar to m4_if, except that each TEST is expanded when encountered. # If the expansion of TESTn matches the string VALn, the result is IF-VALn. # The result is DEFAULT if no tests passed. This macro allows # short-circuiting of expensive tests, where it pays to arrange quick # filter tests to run first. # # For an example, consider a previous implementation of _AS_QUOTE_IFELSE: # # m4_if(m4_index([$1], [\]), [-1], [$2], # m4_eval(m4_index([$1], [\\]) >= 0), [1], [$2], # m4_eval(m4_index([$1], [\$]) >= 0), [1], [$2], # m4_eval(m4_index([$1], [\`]) >= 0), [1], [$3], # m4_eval(m4_index([$1], [\"]) >= 0), [1], [$3], # [$2]) # # Here, m4_index is computed 5 times, and m4_eval 4, even if $1 contains # no backslash. It is more efficient to do: # # m4_cond([m4_index([$1], [\])], [-1], [$2], # [m4_eval(m4_index([$1], [\\]) >= 0)], [1], [$2], # [m4_eval(m4_index([$1], [\$]) >= 0)], [1], [$2], # [m4_eval(m4_index([$1], [\`]) >= 0)], [1], [$3], # [m4_eval(m4_index([$1], [\"]) >= 0)], [1], [$3], # [$2]) # # In the common case of $1 with no backslash, only one m4_index expansion # occurs, and m4_eval is avoided altogether. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_cond], [m4_if([$#], [0], [m4_fatal([$0: cannot be called without arguments])], [$#], [1], [$1], m4_eval([$# % 3]), [2], [m4_fatal([$0: missing an argument])], [_$0($@)])]) m4_define([_m4_cond], [m4_if(($1), [($2)], [$3], [$#], [3], [], [$#], [4], [$4], [$0(m4_shift3($@))])]) ## ---------------------------------------- ## ## 6. Enhanced version of some primitives. ## ## ---------------------------------------- ## # m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...) # ---------------------------------------------------- # m4 equivalent of # # $_ = STRING; # s/RE1/SUBST1/g; # s/RE2/SUBST2/g; # ... # # All the values are optional, and the macro is robust to active symbols # properly quoted. # # I would have liked to name this macro `m4_bpatsubst', unfortunately, # due to quotation problems, I need to double quote $1 below, therefore # the anchors are broken :( I can't let users be trapped by that. # # Recall that m4_shift3 always results in an argument. Hence, we need # to distinguish between a final deletion vs. ending recursion. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_bpatsubsts], [m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])], [$#], 1, [m4_fatal([$0: too few arguments: $#: $1])], [$#], 2, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2]))], [$#], 3, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2], [$3]))], [_$0($@m4_if(m4_eval($# & 1), 0, [,]))])]) m4_define([_m4_bpatsubsts], [m4_if([$#], 2, [$1], [$0(m4_builtin([patsubst], [[$1]], [$2], [$3]), m4_shift3($@))])]) # m4_copy(SRC, DST) # ----------------- # Define the pushdef stack DST as a copy of the pushdef stack SRC; # give an error if DST is already defined. This is particularly nice # for copying self-modifying pushdef stacks, where the top definition # includes one-shot initialization that is later popped to the normal # definition. This version intentionally does nothing if SRC is # undefined. # # Some macros simply can't be renamed with this method: namely, anything # involved in the implementation of m4_stack_foreach_sep. m4_define([m4_copy], [m4_ifdef([$2], [m4_fatal([$0: won't overwrite defined macro: $2])], [m4_stack_foreach_sep([$1], [m4_pushdef([$2],], [)])])]dnl [m4_ifdef([m4_location($1)], [m4_define([m4_location($2)], m4_location)])]) # m4_copy_force(SRC, DST) # m4_rename_force(SRC, DST) # ------------------------- # Like m4_copy/m4_rename, except blindly overwrite any existing DST. # Note that m4_copy_force tolerates undefined SRC, while m4_rename_force # does not. m4_define([m4_copy_force], [m4_ifdef([$2], [_m4_undefine([$2])])m4_copy($@)]) m4_define([m4_rename_force], [m4_ifdef([$2], [_m4_undefine([$2])])m4_rename($@)]) # m4_define_default(MACRO, VALUE) # ------------------------------- # If MACRO is undefined, set it to VALUE. m4_define([m4_define_default], [m4_ifndef([$1], [m4_define($@)])]) # m4_default(EXP1, EXP2) # m4_default_nblank(EXP1, EXP2) # ----------------------------- # Returns EXP1 if not empty/blank, otherwise EXP2. Expand the result. # # m4_default is called on hot paths, so inline the contents of m4_ifval, # for one less round of expansion. m4_define([m4_default], [m4_if([$1], [], [$2], [$1])]) m4_define([m4_default_nblank], [m4_ifblank([$1], [$2], [$1])]) # m4_default_quoted(EXP1, EXP2) # m4_default_nblank_quoted(EXP1, EXP2) # ------------------------------------ # Returns EXP1 if non empty/blank, otherwise EXP2. Leave the result quoted. # # For comparison: # m4_define([active], [ACTIVE]) # m4_default([active], [default]) => ACTIVE # m4_default([], [active]) => ACTIVE # -m4_default([ ], [active])- => - - # -m4_default_nblank([ ], [active])- => -ACTIVE- # m4_default_quoted([active], [default]) => active # m4_default_quoted([], [active]) => active # -m4_default_quoted([ ], [active])- => - - # -m4_default_nblank_quoted([ ], [active])- => -active- # # m4_default macro is called on hot paths, so inline the contents of m4_ifval, # for one less round of expansion. m4_define([m4_default_quoted], [m4_if([$1], [], [[$2]], [[$1]])]) m4_define([m4_default_nblank_quoted], [m4_ifblank([$1], [[$2]], [[$1]])]) # m4_defn(NAME) # ------------- # Like the original, except guarantee a warning when using something which is # undefined (unlike M4 1.4.x). This replacement is not a full-featured # replacement: if any of the defined macros contain unbalanced quoting, but # when pasted together result in a well-quoted string, then only native m4 # support is able to get it correct. But that's where quadrigraphs come in # handy, if you really need unbalanced quotes inside your macros. # # This macro is called frequently, so minimize the amount of additional # expansions by skipping m4_ifndef. Better yet, if __m4_version__ exists, # (added in M4 1.6), then let m4 do the job for us (see m4_init). m4_define([m4_defn], [m4_if([$#], [0], [[$0]], [$#], [1], [m4_ifdef([$1], [_m4_defn([$1])], [m4_fatal([$0: undefined macro: $1])])], [m4_map_args([$0], $@)])]) # m4_dumpdef(NAME...) # ------------------- # In m4 1.4.x, dumpdef writes to the current debugfile, rather than # stderr. This in turn royally confuses autom4te; so we follow the # lead of newer m4 and always dump to stderr. Unlike the original, # this version requires an argument, since there is no convenient way # in m4 1.4.x to grab the names of all defined macros. Newer m4 # always dumps to stderr, regardless of the current debugfile; it also # provides m4symbols as a way to grab all current macro names. But # dumpdefs is not frequently called, so we don't need to worry about # conditionally using these newer features. Also, this version # doesn't sort multiple arguments. # # If we detect m4 1.6 or newer, then provide an alternate definition, # installed during m4_init, that allows builtins through. # Unfortunately, there is no nice way in m4 1.4.x to dump builtins. m4_define([m4_dumpdef], [m4_if([$#], [0], [m4_fatal([$0: missing argument])], [$#], [1], [m4_ifdef([$1], [m4_errprintn( [$1: ]m4_dquote(_m4_defn([$1])))], [m4_fatal([$0: undefined macro: $1])])], [m4_map_args([$0], $@)])]) m4_define([_m4_dumpdef], [m4_if([$#], [0], [m4_fatal([$0: missing argument])], [$#], [1], [m4_builtin([dumpdef], [$1])], [m4_map_args_sep([m4_builtin([dumpdef],], [)], [], $@)])]) # m4_dumpdefs(NAME...) # -------------------- # Similar to `m4_dumpdef(NAME)', but if NAME was m4_pushdef'ed, display its # value stack (most recent displayed first). Also, this version silently # ignores undefined macros, rather than erroring out. # # This macro cheats, because it relies on the current definition of NAME # while the second argument of m4_stack_foreach_lifo is evaluated (which # would be undefined according to the API). m4_define([m4_dumpdefs], [m4_if([$#], [0], [m4_fatal([$0: missing argument])], [$#], [1], [m4_stack_foreach_lifo([$1], [m4_dumpdef([$1])m4_ignore])], [m4_map_args([$0], $@)])]) # m4_esyscmd_s(COMMAND) # --------------------- # Like m4_esyscmd, except strip any trailing newlines, thus behaving # more like shell command substitution. m4_define([m4_esyscmd_s], [m4_chomp_all(m4_esyscmd([$1]))]) # m4_popdef(NAME) # --------------- # Like the original, except guarantee a warning when using something which is # undefined (unlike M4 1.4.x). # # This macro is called frequently, so minimize the amount of additional # expansions by skipping m4_ifndef. Better yet, if __m4_version__ exists, # (added in M4 1.6), then let m4 do the job for us (see m4_init). m4_define([m4_popdef], [m4_if([$#], [0], [[$0]], [$#], [1], [m4_ifdef([$1], [_m4_popdef([$1])], [m4_fatal([$0: undefined macro: $1])])], [m4_map_args([$0], $@)])]) # m4_shiftn(N, ...) # ----------------- # Returns ... shifted N times. Useful for recursive "varargs" constructs. # # Autoconf does not use this macro, because it is inherently slower than # calling the common cases of m4_shift2 or m4_shift3 directly. But it # might as well be fast for other clients, such as Libtool. One way to # do this is to expand $@ only once in _m4_shiftn (otherwise, for long # lists, the expansion of m4_if takes twice as much memory as what the # list itself occupies, only to throw away the unused branch). The end # result is strictly equivalent to # m4_if([$1], 1, [m4_shift(,m4_shift(m4_shift($@)))], # [_m4_shiftn(m4_decr([$1]), m4_shift(m4_shift($@)))]) # but with the final `m4_shift(m4_shift($@)))' shared between the two # paths. The first leg uses a no-op m4_shift(,$@) to balance out the (). # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_shiftn], [m4_assert(0 < $1 && $1 < $#)_$0($@)]) m4_define([_m4_shiftn], [m4_if([$1], 1, [m4_shift(], [$0(m4_decr([$1])]), m4_shift(m4_shift($@)))]) # m4_shift2(...) # m4_shift3(...) # ----------------- # Returns ... shifted twice, and three times. Faster than m4_shiftn. m4_define([m4_shift2], [m4_shift(m4_shift($@))]) m4_define([m4_shift3], [m4_shift(m4_shift(m4_shift($@)))]) # _m4_shift2(...) # _m4_shift3(...) # --------------- # Like m4_shift2 or m4_shift3, except include a leading comma unless shifting # consumes all arguments. Why? Because in recursion, it is nice to # distinguish between 1 element left and 0 elements left, based on how many # arguments this shift expands to. m4_define([_m4_shift2], [m4_if([$#], [2], [], [, m4_shift(m4_shift($@))])]) m4_define([_m4_shift3], [m4_if([$#], [3], [], [, m4_shift(m4_shift(m4_shift($@)))])]) # m4_undefine(NAME) # ----------------- # Like the original, except guarantee a warning when using something which is # undefined (unlike M4 1.4.x). # # This macro is called frequently, so minimize the amount of additional # expansions by skipping m4_ifndef. Better yet, if __m4_version__ exists, # (added in M4 1.6), then let m4 do the job for us (see m4_init). m4_define([m4_undefine], [m4_if([$#], [0], [[$0]], [$#], [1], [m4_ifdef([$1], [_m4_undefine([$1])], [m4_fatal([$0: undefined macro: $1])])], [m4_map_args([$0], $@)])]) # _m4_wrap(PRE, POST) # ------------------- # Helper macro for m4_wrap and m4_wrap_lifo. Allows nested calls to # m4_wrap within wrapped text. Use _m4_defn and _m4_popdef for speed. m4_define([_m4_wrap], [m4_ifdef([$0_text], [m4_define([$0_text], [$1]_m4_defn([$0_text])[$2])], [m4_builtin([m4wrap], [m4_unquote( _m4_defn([$0_text])_m4_popdef([$0_text]))])m4_define([$0_text], [$1$2])])]) # m4_wrap(TEXT) # ------------- # Append TEXT to the list of hooks to be executed at the end of input. # Whereas the order of the original may be LIFO in the underlying m4, # this version is always FIFO. m4_define([m4_wrap], [_m4_wrap([], [$1[]])]) # m4_wrap_lifo(TEXT) # ------------------ # Prepend TEXT to the list of hooks to be executed at the end of input. # Whereas the order of m4_wrap may be FIFO in the underlying m4, this # version is always LIFO. m4_define([m4_wrap_lifo], [_m4_wrap([$1[]])]) ## ------------------------- ## ## 7. Quoting manipulation. ## ## ------------------------- ## # m4_apply(MACRO, LIST) # --------------------- # Invoke MACRO, with arguments provided from the quoted list of # comma-separated quoted arguments. If LIST is empty, invoke MACRO # without arguments. The expansion will not be concatenated with # subsequent text. m4_define([m4_apply], [m4_if([$2], [], [$1], [$1($2)])[]]) # _m4_apply(MACRO, LIST) # ---------------------- # Like m4_apply, except do nothing if LIST is empty. m4_define([_m4_apply], [m4_if([$2], [], [], [$1($2)[]])]) # m4_count(ARGS) # -------------- # Return a count of how many ARGS are present. m4_define([m4_count], [$#]) # m4_curry(MACRO, ARG...) # ----------------------- # Perform argument currying. The expansion of this macro is another # macro that takes exactly one argument, appends it to the end of the # original ARG list, then invokes MACRO. For example: # m4_curry([m4_curry], [m4_reverse], [1])([2])([3]) => 3, 2, 1 # Not quite as practical as m4_incr, but you could also do: # m4_define([add], [m4_eval(([$1]) + ([$2]))]) # m4_define([add_one], [m4_curry([add], [1])]) # add_one()([2]) => 3 m4_define([m4_curry], [$1(m4_shift($@,)_$0]) m4_define([_m4_curry], [[$1])]) # m4_do(STRING, ...) # ------------------ # This macro invokes all its arguments (in sequence, of course). It is # useful for making your macros more structured and readable by dropping # unnecessary dnl's and have the macros indented properly. No concatenation # occurs after a STRING; use m4_unquote(m4_join(,STRING)) for that. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_do], [m4_if([$#], 0, [], [$#], 1, [$1[]], [$1[]$0(m4_shift($@))])]) # m4_dquote(ARGS) # --------------- # Return ARGS as a quoted list of quoted arguments. m4_define([m4_dquote], [[$@]]) # m4_dquote_elt(ARGS) # ------------------- # Return ARGS as an unquoted list of double-quoted arguments. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_dquote_elt], [m4_if([$#], [0], [], [$#], [1], [[[$1]]], [[[$1]],$0(m4_shift($@))])]) # m4_echo(ARGS) # ------------- # Return the ARGS, with the same level of quoting. Whitespace after # unquoted commas are consumed. m4_define([m4_echo], [$@]) # m4_expand(ARG) # _m4_expand(ARG) # --------------- # Return the expansion of ARG as a single string. Unlike # m4_quote($1), this preserves whitespace following single-quoted # commas that appear within ARG. It also deals with shell case # statements. # # m4_define([active], [ACT, IVE]) # m4_define([active2], [[ACT, IVE]]) # m4_quote(active, active2) # => ACT,IVE,ACT, IVE # m4_expand([active, active2]) # => ACT, IVE, ACT, IVE # # Unfortunately, due to limitations in m4, ARG must expand to # something with balanced quotes (use quadrigraphs to get around # this), and should not contain the unlikely delimiters -=<{( or # )}>=-. It is possible to have unbalanced quoted `(' or `)', as well # as unbalanced unquoted `)'. m4_expand can handle unterminated # comments or dnl on the final line, at the expense of speed; it also # aids in detecting attempts to incorrectly change the current # diversion inside ARG. Meanwhile, _m4_expand is faster but must be # given a terminated expansion, and has no safety checks for # mis-diverted text. # # Exploit that extra unquoted () will group unquoted commas and the # following whitespace. m4_bpatsubst can't handle newlines inside $1, # and m4_substr strips quoting. So we (ab)use m4_changequote, using # temporary quotes to remove the delimiters that conveniently included # the unquoted () that were added prior to the changequote. # # Thanks to shell case statements, too many people are prone to pass # underquoted `)', so we try to detect that by passing a marker as a # fourth argument; if the marker is not present, then we assume that # we encountered an early `)', and re-expand the first argument, but # this time with one more `(' in the second argument and in the # open-quote delimiter. We must also ignore the slop from the # previous try. The final macro is thus half line-noise, half art. m4_define([m4_expand], [m4_pushdef([m4_divert], _m4_defn([_m4_divert_unsafe]))]dnl [m4_pushdef([m4_divert_push], _m4_defn([_m4_divert_unsafe]))]dnl [m4_chomp(_$0([$1 ]))_m4_popdef([m4_divert], [m4_divert_push])]) m4_define([_m4_expand], [$0_([$1], [(], -=<{($1)}>=-, [}>=-])]) m4_define([_m4_expand_], [m4_if([$4], [}>=-], [m4_changequote([-=<{$2], [)}>=-])$3m4_changequote([, ])], [$0([$1], [($2], -=<{($2$1)}>=-, [}>=-])m4_ignore$2])]) # m4_ignore(ARGS) # --------------- # Expands to nothing. Useful for conditionally ignoring an arbitrary # number of arguments (see _m4_list_cmp for an example). m4_define([m4_ignore]) # m4_make_list(ARGS) # ------------------ # Similar to m4_dquote, this creates a quoted list of quoted ARGS. This # version is less efficient than m4_dquote, but separates each argument # with a comma and newline, rather than just comma, for readability. # When developing an m4sugar algorithm, you could temporarily use # m4_pushdef([m4_dquote],m4_defn([m4_make_list])) # around your code to make debugging easier. m4_define([m4_make_list], [m4_join([, ], m4_dquote_elt($@))]) # m4_noquote(STRING) # ------------------ # Return the result of ignoring all quotes in STRING and invoking the # macros it contains. Amongst other things, this is useful for enabling # macro invocations inside strings with [] blocks (for instance regexps # and help-strings). On the other hand, since all quotes are disabled, # any macro expanded during this time that relies on nested [] quoting # will likely crash and burn. This macro is seldom useful; consider # m4_unquote or m4_expand instead. m4_define([m4_noquote], [m4_changequote([-=<{(],[)}>=-])$1-=<{()}>=-m4_changequote([,])]) # m4_quote(ARGS) # -------------- # Return ARGS as a single argument. Any whitespace after unquoted commas # is stripped. There is always output, even when there were no arguments. # # It is important to realize the difference between `m4_quote(exp)' and # `[exp]': in the first case you obtain the quoted *result* of the # expansion of EXP, while in the latter you just obtain the string # `exp'. m4_define([m4_quote], [[$*]]) # _m4_quote(ARGS) # --------------- # Like m4_quote, except that when there are no arguments, there is no # output. For conditional scenarios (such as passing _m4_quote as the # macro name in m4_mapall), this feature can be used to distinguish between # one argument of the empty string vs. no arguments. However, in the # normal case with arguments present, this is less efficient than m4_quote. m4_define([_m4_quote], [m4_if([$#], [0], [], [[$*]])]) # m4_reverse(ARGS) # ---------------- # Output ARGS in reverse order. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_reverse], [m4_if([$#], [0], [], [$#], [1], [[$1]], [$0(m4_shift($@)), [$1]])]) # m4_unquote(ARGS) # ---------------- # Remove one layer of quotes from each ARG, performing one level of # expansion. For one argument, m4_unquote([arg]) is more efficient than # m4_do([arg]), but for multiple arguments, the difference is that # m4_unquote separates arguments with commas while m4_do concatenates. # Follow this macro with [] if concatenation with subsequent text is # undesired. m4_define([m4_unquote], [$*]) ## -------------------------- ## ## 8. Implementing m4 loops. ## ## -------------------------- ## # m4_for(VARIABLE, FIRST, LAST, [STEP = +/-1], EXPRESSION) # -------------------------------------------------------- # Expand EXPRESSION defining VARIABLE to FROM, FROM + 1, ..., TO with # increments of STEP. Both limits are included, and bounds are # checked for consistency. The algorithm is robust to indirect # VARIABLE names. Changing VARIABLE inside EXPRESSION will not impact # the number of iterations. # # Uses _m4_defn for speed, and avoid dnl in the macro body. Factor # the _m4_for call so that EXPRESSION is only parsed once. m4_define([m4_for], [m4_pushdef([$1], m4_eval([$2]))]dnl [m4_cond([m4_eval(([$3]) > ([$2]))], 1, [m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4], 1)))m4_assert(_m4_step > 0)_$0(_m4_defn([$1]), m4_eval((([$3]) - ([$2])) / _m4_step * _m4_step + ([$2])), _m4_step,], [m4_eval(([$3]) < ([$2]))], 1, [m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4], -1)))m4_assert(_m4_step < 0)_$0(_m4_defn([$1]), m4_eval((([$2]) - ([$3])) / -(_m4_step) * _m4_step + ([$2])), _m4_step,], [m4_pushdef([_m4_step])_$0(_m4_defn([$1]), _m4_defn([$1]), 0,])]dnl [[m4_define([$1],], [)$5])m4_popdef([_m4_step], [$1])]) # _m4_for(COUNT, LAST, STEP, PRE, POST) # ------------------------------------- # Core of the loop, no consistency checks, all arguments are plain # numbers. Expand PRE[COUNT]POST, then alter COUNT by STEP and # iterate if COUNT is not LAST. m4_define([_m4_for], [$4[$1]$5[]m4_if([$1], [$2], [], [$0(m4_eval([$1 + $3]), [$2], [$3], [$4], [$5])])]) # Implementing `foreach' loops in m4 is much more tricky than it may # seem. For example, the old M4 1.4.4 manual had an incorrect example, # which looked like this (when translated to m4sugar): # # | # foreach(VAR, (LIST), STMT) # | m4_define([foreach], # | [m4_pushdef([$1])_foreach([$1], [$2], [$3])m4_popdef([$1])]) # | m4_define([_arg1], [$1]) # | m4_define([_foreach], # | [m4_if([$2], [()], , # | [m4_define([$1], _arg1$2)$3[]_foreach([$1], (m4_shift$2), [$3])])]) # # But then if you run # # | m4_define(a, 1) # | m4_define(b, 2) # | m4_define(c, 3) # | foreach([f], [([a], [(b], [c)])], [echo f # | ]) # # it gives # # => echo 1 # => echo (2,3) # # which is not what is expected. # # Of course the problem is that many quotes are missing. So you add # plenty of quotes at random places, until you reach the expected # result. Alternatively, if you are a quoting wizard, you directly # reach the following implementation (but if you really did, then # apply to the maintenance of m4sugar!). # # | # foreach(VAR, (LIST), STMT) # | m4_define([foreach], [m4_pushdef([$1])_foreach($@)m4_popdef([$1])]) # | m4_define([_arg1], [[$1]]) # | m4_define([_foreach], # | [m4_if($2, [()], , # | [m4_define([$1], [_arg1$2])$3[]_foreach([$1], [(m4_shift$2)], [$3])])]) # # which this time answers # # => echo a # => echo (b # => echo c) # # Bingo! # # Well, not quite. # # With a better look, you realize that the parens are more a pain than # a help: since anyway you need to quote properly the list, you end up # with always using an outermost pair of parens and an outermost pair # of quotes. Rejecting the parens both eases the implementation, and # simplifies the use: # # | # foreach(VAR, (LIST), STMT) # | m4_define([foreach], [m4_pushdef([$1])_foreach($@)m4_popdef([$1])]) # | m4_define([_arg1], [$1]) # | m4_define([_foreach], # | [m4_if($2, [], , # | [m4_define([$1], [_arg1($2)])$3[]_foreach([$1], [m4_shift($2)], [$3])])]) # # # Now, just replace the `$2' with `m4_quote($2)' in the outer `m4_if' # to improve robustness, and you come up with a nice implementation # that doesn't require extra parentheses in the user's LIST. # # But wait - now the algorithm is quadratic, because every recursion of # the algorithm keeps the entire LIST and merely adds another m4_shift to # the quoted text. If the user has a lot of elements in LIST, you can # bring the system to its knees with the memory m4 then requires, or trip # the m4 --nesting-limit recursion factor. The only way to avoid # quadratic growth is ensure m4_shift is expanded prior to the recursion. # Hence the design below. # # The M4 manual now includes a chapter devoted to this issue, with # the lessons learned from m4sugar. And still, this design is only # optimal for M4 1.6; see foreach.m4 for yet more comments on why # M4 1.4.x uses yet another implementation. # m4_foreach(VARIABLE, LIST, EXPRESSION) # -------------------------------------- # # Expand EXPRESSION assigning each value of the LIST to VARIABLE. # LIST should have the form `item_1, item_2, ..., item_n', i.e. the # whole list must *quoted*. Quote members too if you don't want them # to be expanded. # # This macro is robust to active symbols: # | m4_define(active, [ACT, IVE]) # | m4_foreach(Var, [active, active], [-Var-]) # => -ACT--IVE--ACT--IVE- # # | m4_foreach(Var, [[active], [active]], [-Var-]) # => -ACT, IVE--ACT, IVE- # # | m4_foreach(Var, [[[active]], [[active]]], [-Var-]) # => -active--active- # # This macro is called frequently, so avoid extra expansions such as # m4_ifval and dnl. Also, since $2 might be quite large, try to use it # as little as possible in _m4_foreach; each extra use requires that much # more memory for expansion. So, rather than directly compare $2 against # [] and use m4_car/m4_cdr for recursion, we instead unbox the list (which # requires swapping the argument order in the helper), insert an ignored # third argument, and use m4_shift3 to detect when recursion is complete, # at which point this looks very much like m4_map_args. m4_define([m4_foreach], [m4_if([$2], [], [], [m4_pushdef([$1])_$0([m4_define([$1],], [)$3], [], $2)m4_popdef([$1])])]) # _m4_foreach(PRE, POST, IGNORED, ARG...) # --------------------------------------- # Form the common basis of the m4_foreach and m4_map macros. For each # ARG, expand PRE[ARG]POST[]. The IGNORED argument makes recursion # easier, and must be supplied rather than implicit. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([_m4_foreach], [m4_if([$#], [3], [], [$1[$4]$2[]$0([$1], [$2], m4_shift3($@))])]) # m4_foreach_w(VARIABLE, LIST, EXPRESSION) # ---------------------------------------- # Like m4_foreach, but the list is whitespace separated. Depending on # EXPRESSION, it may be more efficient to use m4_map_args_w. # # This macro is robust to active symbols: # m4_foreach_w([Var], [ active # b act\ # ive ], [-Var-])end # => -active--b--active-end # # This used to use a slower implementation based on m4_foreach: # m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3]) m4_define([m4_foreach_w], [m4_pushdef([$1])m4_map_args_w([$2], [m4_define([$1],], [)$3])m4_popdef([$1])]) # m4_map(MACRO, LIST) # m4_mapall(MACRO, LIST) # ---------------------- # Invoke MACRO($1), MACRO($2) etc. where $1, $2... are the elements of # LIST. $1, $2... must in turn be lists, appropriate for m4_apply. # If LIST contains an empty sublist, m4_map skips the expansion of # MACRO, while m4_mapall expands MACRO with no arguments. # # Since LIST may be quite large, we want to minimize how often it # appears in the expansion. Rather than use m4_car/m4_cdr iteration, # we unbox the list, and use _m4_foreach for iteration. For m4_map, # an empty list behaves like an empty sublist and gets ignored; for # m4_mapall, we must special-case the empty list. m4_define([m4_map], [_m4_foreach([_m4_apply([$1],], [)], [], $2)]) m4_define([m4_mapall], [m4_if([$2], [], [], [_m4_foreach([m4_apply([$1],], [)], [], $2)])]) # m4_map_sep(MACRO, [SEPARATOR], LIST) # m4_mapall_sep(MACRO, [SEPARATOR], LIST) # --------------------------------------- # Invoke MACRO($1), SEPARATOR, MACRO($2), ..., MACRO($N) where $1, # $2... $N are the elements of LIST, and are in turn lists appropriate # for m4_apply. SEPARATOR is expanded, in order to allow the creation # of a list of arguments by using a single-quoted comma as the # separator. For each empty sublist, m4_map_sep skips the expansion # of MACRO and SEPARATOR, while m4_mapall_sep expands MACRO with no # arguments. # # For m4_mapall_sep, merely expand the first iteration without the # separator, then include separator as part of subsequent recursion; # but avoid extra expansion of LIST's side-effects via a helper macro. # For m4_map_sep, things are trickier - we don't know if the first # list element is an empty sublist, so we must define a self-modifying # helper macro and use that as the separator instead. m4_define([m4_map_sep], [m4_pushdef([m4_Sep], [m4_define([m4_Sep], _m4_defn([m4_unquote]))])]dnl [_m4_foreach([_m4_apply([m4_Sep([$2])[]$1],], [)], [], $3)m4_popdef([m4_Sep])]) m4_define([m4_mapall_sep], [m4_if([$3], [], [], [_$0([$1], [$2], $3)])]) m4_define([_m4_mapall_sep], [m4_apply([$1], [$3])_m4_foreach([m4_apply([$2[]$1],], [)], m4_shift2($@))]) # m4_map_args(EXPRESSION, ARG...) # ------------------------------- # Expand EXPRESSION([ARG]) for each argument. More efficient than # m4_foreach([var], [ARG...], [EXPRESSION(m4_defn([var]))]) # Shorthand for m4_map_args_sep([EXPRESSION(], [)], [], ARG...). m4_define([m4_map_args], [m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])], [$#], [1], [], [$#], [2], [$1([$2])[]], [_m4_foreach([$1(], [)], $@)])]) # m4_map_args_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...) # ------------------------------------------------------------- # Perform a pairwise grouping of consecutive ARGs, by expanding # EXPRESSION([ARG1], [ARG2]). If there are an odd number of ARGs, the # final argument is expanded with END-EXPR([ARGn]). # # For example: # m4_define([show], [($*)m4_newline])dnl # m4_map_args_pair([show], [], [a], [b], [c], [d], [e])dnl # => (a,b) # => (c,d) # => (e) # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_map_args_pair], [m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])], [$#], [1], [m4_fatal([$0: too few arguments: $#: $1])], [$#], [2], [], [$#], [3], [m4_default([$2], [$1])([$3])[]], [$#], [4], [$1([$3], [$4])[]], [$1([$3], [$4])[]$0([$1], [$2], m4_shift(m4_shift3($@)))])]) # m4_map_args_sep([PRE], [POST], [SEP], ARG...) # --------------------------------------------- # Expand PRE[ARG]POST for each argument, with SEP between arguments. m4_define([m4_map_args_sep], [m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])], [$#], [1], [], [$#], [2], [], [$#], [3], [], [$#], [4], [$1[$4]$2[]], [$1[$4]$2[]_m4_foreach([$3[]$1], [$2], m4_shift3($@))])]) # m4_map_args_w(STRING, [PRE], [POST], [SEP]) # ------------------------------------------- # Perform the expansion of PRE[word]POST[] for each word in STRING # separated by whitespace. More efficient than: # m4_foreach_w([var], [STRING], [PRE[]m4_defn([var])POST]) # Additionally, expand SEP between words. # # As long as we have to use m4_bpatsubst to split the string, we might # as well make it also apply PRE and POST; this avoids iteration # altogether. But we must be careful of any \ in PRE or POST. # _m4_strip returns a quoted string, but that's okay, since it also # supplies an empty leading and trailing argument due to our # intentional whitespace around STRING. We use m4_substr to strip the # empty elements and remove the extra layer of quoting. m4_define([m4_map_args_w], [_$0(_m4_split([ ]m4_flatten([$1])[ ], [[ ]+], m4_if(m4_index([$2$3$4], [\]), [-1], [[$3[]$4[]$2]], [m4_bpatsubst([[$3[]$4[]$2]], [\\], [\\\\])])), m4_len([[]$3[]$4]), m4_len([$4[]$2[]]))]) m4_define([_m4_map_args_w], [m4_substr([$1], [$2], m4_eval(m4_len([$1]) - [$2] - [$3]))]) # m4_stack_foreach(MACRO, FUNC) # m4_stack_foreach_lifo(MACRO, FUNC) # ---------------------------------- # Pass each stacked definition of MACRO to the one-argument macro FUNC. # m4_stack_foreach proceeds in FIFO order, while m4_stack_foreach_lifo # processes the topmost definitions first. In addition, FUNC should # not push or pop definitions of MACRO, and should not expect anything about # the active definition of MACRO (it will not be the topmost, and may not # be the one passed to FUNC either). # # Some macros simply can't be examined with this method: namely, # anything involved in the implementation of _m4_stack_reverse. m4_define([m4_stack_foreach], [_m4_stack_reverse([$1], [m4_tmp-$1])]dnl [_m4_stack_reverse([m4_tmp-$1], [$1], [$2(_m4_defn([m4_tmp-$1]))])]) m4_define([m4_stack_foreach_lifo], [_m4_stack_reverse([$1], [m4_tmp-$1], [$2(_m4_defn([m4_tmp-$1]))])]dnl [_m4_stack_reverse([m4_tmp-$1], [$1])]) # m4_stack_foreach_sep(MACRO, [PRE], [POST], [SEP]) # m4_stack_foreach_sep_lifo(MACRO, [PRE], [POST], [SEP]) # ------------------------------------------------------ # Similar to m4_stack_foreach and m4_stack_foreach_lifo, in that every # definition of a pushdef stack will be visited. But rather than # passing the definition as a single argument to a macro, this variant # expands the concatenation of PRE[]definition[]POST, and expands SEP # between consecutive expansions. Note that m4_stack_foreach([a], [b]) # is equivalent to m4_stack_foreach_sep([a], [b(], [)]). m4_define([m4_stack_foreach_sep], [_m4_stack_reverse([$1], [m4_tmp-$1])]dnl [_m4_stack_reverse([m4_tmp-$1], [$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])]) m4_define([m4_stack_foreach_sep_lifo], [_m4_stack_reverse([$1], [m4_tmp-$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])]dnl [_m4_stack_reverse([m4_tmp-$1], [$1])]) # _m4_stack_reverse(OLD, NEW, [ACTION], [SEP]) # -------------------------------------------- # A recursive worker for pushdef stack manipulation. Destructively # copy the OLD stack into the NEW, and expanding ACTION for each # iteration. After the first iteration, SEP is promoted to the front # of ACTION (note that SEP should include a trailing [] if it is to # avoid interfering with ACTION). The current definition is examined # after the NEW has been pushed but before OLD has been popped; this # order is important, as ACTION is permitted to operate on either # _m4_defn([OLD]) or _m4_defn([NEW]). Since the operation is # destructive, this macro is generally used twice, with a temporary # macro name holding the swapped copy. m4_define([_m4_stack_reverse], [m4_ifdef([$1], [m4_pushdef([$2], _m4_defn([$1]))$3[]_m4_popdef([$1])$0([$1], [$2], [$4$3])])]) ## --------------------------- ## ## 9. More diversion support. ## ## --------------------------- ## # m4_cleardivert(DIVERSION-NAME...) # --------------------------------- # Discard any text in DIVERSION-NAME. # # This works even inside m4_expand. m4_define([m4_cleardivert], [m4_if([$#], [0], [m4_fatal([$0: missing argument])], [_m4_divert_raw([-1])m4_undivert($@)_m4_divert_raw( _m4_divert(_m4_defn([_m4_divert_diversion])))])]) # _m4_divert(DIVERSION-NAME or NUMBER) # ------------------------------------ # If DIVERSION-NAME is the name of a diversion, return its number, # otherwise if it is a NUMBER return it. m4_define([_m4_divert], [m4_ifdef([_m4_divert($1)], [m4_indir([_m4_divert($1)])], [$1])]) # KILL is only used to suppress output. m4_define([_m4_divert(KILL)], -1) # The empty diversion name is a synonym for 0. m4_define([_m4_divert()], 0) # m4_divert_stack # ------------------ # Print the diversion stack, if it's nonempty. The caller is # responsible for any leading or trailing newline. m4_define([m4_divert_stack], [m4_stack_foreach_sep_lifo([_m4_divert_stack], [], [], [ ])]) # m4_divert_stack_push(MACRO-NAME, DIVERSION-NAME) # ------------------------------------------------ # Form an entry of the diversion stack from caller MACRO-NAME and # entering DIVERSION-NAME and push it. m4_define([m4_divert_stack_push], [m4_pushdef([_m4_divert_stack], m4_location[: $1: $2])]) # m4_divert(DIVERSION-NAME) # ------------------------- # Change the diversion stream to DIVERSION-NAME. m4_define([m4_divert], [m4_popdef([_m4_divert_stack])]dnl [m4_define([_m4_divert_diversion], [$1])]dnl [m4_divert_stack_push([$0], [$1])]dnl [_m4_divert_raw(_m4_divert([$1]))]) # m4_divert_push(DIVERSION-NAME) # ------------------------------ # Change the diversion stream to DIVERSION-NAME, while stacking old values. m4_define([m4_divert_push], [m4_divert_stack_push([$0], [$1])]dnl [m4_pushdef([_m4_divert_diversion], [$1])]dnl [_m4_divert_raw(_m4_divert([$1]))]) # m4_divert_pop([DIVERSION-NAME]) # ------------------------------- # Change the diversion stream to its previous value, unstacking it. # If specified, verify we left DIVERSION-NAME. # When we pop the last value from the stack, we divert to -1. m4_define([m4_divert_pop], [m4_if([$1], [], [], [$1], _m4_defn([_m4_divert_diversion]), [], [m4_fatal([$0($1): diversion mismatch: ]m4_divert_stack)])]dnl [_m4_popdef([_m4_divert_stack], [_m4_divert_diversion])]dnl [m4_ifdef([_m4_divert_diversion], [], [m4_fatal([too many m4_divert_pop])])]dnl [_m4_divert_raw(_m4_divert(_m4_defn([_m4_divert_diversion])))]) # m4_divert_text(DIVERSION-NAME, CONTENT) # --------------------------------------- # Output CONTENT into DIVERSION-NAME (which may be a number actually). # An end of line is appended for free to CONTENT. m4_define([m4_divert_text], [m4_divert_push([$1])$2 m4_divert_pop([$1])]) # m4_divert_once(DIVERSION-NAME, CONTENT) # --------------------------------------- # Output CONTENT into DIVERSION-NAME once, if not already there. # An end of line is appended for free to CONTENT. m4_define([m4_divert_once], [m4_expand_once([m4_divert_text([$1], [$2])])]) # _m4_divert_unsafe(DIVERSION-NAME) # --------------------------------- # Issue a warning that the attempt to change the current diversion to # DIVERSION-NAME is unsafe, because this macro is being expanded # during argument collection of m4_expand. m4_define([_m4_divert_unsafe], [m4_fatal([$0: cannot change diversion to `$1' inside m4_expand])]) # m4_undivert(DIVERSION-NAME...) # ------------------------------ # Undivert DIVERSION-NAME. Unlike the M4 version, this requires at # least one DIVERSION-NAME; also, due to support for named diversions, # this should not be used to undivert files. m4_define([m4_undivert], [m4_if([$#], [0], [m4_fatal([$0: missing argument])], [$#], [1], [_m4_undivert(_m4_divert([$1]))], [m4_map_args([$0], $@)])]) ## --------------------------------------------- ## ## 10. Defining macros with bells and whistles. ## ## --------------------------------------------- ## # `m4_defun' is basically `m4_define' but it equips the macro with the # needed machinery for `m4_require'. A macro must be m4_defun'd if # either it is m4_require'd, or it m4_require's. # # Two things deserve attention and are detailed below: # 1. Implementation of m4_require # 2. Keeping track of the expansion stack # # 1. Implementation of m4_require # =============================== # # Of course m4_defun calls m4_provide, so that a macro which has # been expanded is not expanded again when m4_require'd, but the # difficult part is the proper expansion of macros when they are # m4_require'd. # # The implementation is based on three ideas, (i) using diversions to # prepare the expansion of the macro and its dependencies (by Franc,ois # Pinard), (ii) expand the most recently m4_require'd macros _after_ # the previous macros (by Axel Thimm), and (iii) track instances of # provide before require (by Eric Blake). # # # The first idea: why use diversions? # ----------------------------------- # # When a macro requires another, the other macro is expanded in new # diversion, GROW. When the outer macro is fully expanded, we first # undivert the most nested diversions (GROW - 1...), and finally # undivert GROW. To understand why we need several diversions, # consider the following example: # # | m4_defun([TEST1], [Test...m4_require([TEST2])1]) # | m4_defun([TEST2], [Test...m4_require([TEST3])2]) # | m4_defun([TEST3], [Test...3]) # # Because m4_require is not required to be first in the outer macros, we # must keep the expansions of the various levels of m4_require separated. # Right before executing the epilogue of TEST1, we have: # # GROW - 2: Test...3 # GROW - 1: Test...2 # GROW: Test...1 # BODY: # # Finally the epilogue of TEST1 undiverts GROW - 2, GROW - 1, and # GROW into the regular flow, BODY. # # GROW - 2: # GROW - 1: # GROW: # BODY: Test...3; Test...2; Test...1 # # (The semicolons are here for clarification, but of course are not # emitted.) This is what Autoconf 2.0 (I think) to 2.13 (I'm sure) # implement. # # # The second idea: first required first out # ----------------------------------------- # # The natural implementation of the idea above is buggy and produces # very surprising results in some situations. Let's consider the # following example to explain the bug: # # | m4_defun([TEST1], [m4_require([TEST2a])m4_require([TEST2b])]) # | m4_defun([TEST2a], []) # | m4_defun([TEST2b], [m4_require([TEST3])]) # | m4_defun([TEST3], [m4_require([TEST2a])]) # | # | AC_INIT # | TEST1 # # The dependencies between the macros are: # # 3 --- 2b # / \ is m4_require'd by # / \ left -------------------- right # 2a ------------ 1 # # If you strictly apply the rules given in the previous section you get: # # GROW - 2: TEST3 # GROW - 1: TEST2a; TEST2b # GROW: TEST1 # BODY: # # (TEST2a, although required by TEST3 is not expanded in GROW - 3 # because is has already been expanded before in GROW - 1, so it has # been AC_PROVIDE'd, so it is not expanded again) so when you undivert # the stack of diversions, you get: # # GROW - 2: # GROW - 1: # GROW: # BODY: TEST3; TEST2a; TEST2b; TEST1 # # i.e., TEST2a is expanded after TEST3 although the latter required the # former. # # Starting from 2.50, we use an implementation provided by Axel Thimm. # The idea is simple: the order in which macros are emitted must be the # same as the one in which macros are expanded. (The bug above can # indeed be described as: a macro has been m4_provide'd before its # dependent, but it is emitted after: the lack of correlation between # emission and expansion order is guilty). # # How to do that? You keep the stack of diversions to elaborate the # macros, but each time a macro is fully expanded, emit it immediately. # # In the example above, when TEST2a is expanded, but it's epilogue is # not run yet, you have: # # GROW - 2: # GROW - 1: TEST2a # GROW: Elaboration of TEST1 # BODY: # # The epilogue of TEST2a emits it immediately: # # GROW - 2: # GROW - 1: # GROW: Elaboration of TEST1 # BODY: TEST2a # # TEST2b then requires TEST3, so right before the epilogue of TEST3, you # have: # # GROW - 2: TEST3 # GROW - 1: Elaboration of TEST2b # GROW: Elaboration of TEST1 # BODY: TEST2a # # The epilogue of TEST3 emits it: # # GROW - 2: # GROW - 1: Elaboration of TEST2b # GROW: Elaboration of TEST1 # BODY: TEST2a; TEST3 # # TEST2b is now completely expanded, and emitted: # # GROW - 2: # GROW - 1: # GROW: Elaboration of TEST1 # BODY: TEST2a; TEST3; TEST2b # # and finally, TEST1 is finished and emitted: # # GROW - 2: # GROW - 1: # GROW: # BODY: TEST2a; TEST3; TEST2b: TEST1 # # The idea is simple, but the implementation is a bit involved. If # you are like me, you will want to see the actual functioning of this # implementation to be convinced. The next section gives the full # details. # # # The Axel Thimm implementation at work # ------------------------------------- # # We consider the macros above, and this configure.ac: # # AC_INIT # TEST1 # # You should keep the definitions of _m4_defun_pro, _m4_defun_epi, and # m4_require at hand to follow the steps. # # This implementation tries not to assume that the current diversion is # BODY, so as soon as a macro (m4_defun'd) is expanded, we first # record the current diversion under the name _m4_divert_dump (denoted # DUMP below for short). This introduces an important difference with # the previous versions of Autoconf: you cannot use m4_require if you # are not inside an m4_defun'd macro, and especially, you cannot # m4_require directly from the top level. # # We have not tried to simulate the old behavior (better yet, we # diagnose it), because it is too dangerous: a macro m4_require'd from # the top level is expanded before the body of `configure', i.e., before # any other test was run. I let you imagine the result of requiring # AC_STDC_HEADERS for instance, before AC_PROG_CC was actually run.... # # After AC_INIT was run, the current diversion is BODY. # * AC_INIT was run # DUMP: undefined # diversion stack: BODY |- # # * TEST1 is expanded # The prologue of TEST1 sets _m4_divert_dump, which is the diversion # where the current elaboration will be dumped, to the current # diversion. It also m4_divert_push to GROW, where the full # expansion of TEST1 and its dependencies will be elaborated. # DUMP: BODY # BODY: empty # diversions: GROW, BODY |- # # * TEST1 requires TEST2a # _m4_require_call m4_divert_pushes another temporary diversion, # GROW - 1, and expands TEST2a in there. # DUMP: BODY # BODY: empty # GROW - 1: TEST2a # diversions: GROW - 1, GROW, BODY |- # Then the content of the temporary diversion is moved to DUMP and the # temporary diversion is popped. # DUMP: BODY # BODY: TEST2a # diversions: GROW, BODY |- # # * TEST1 requires TEST2b # Again, _m4_require_call pushes GROW - 1 and heads to expand TEST2b. # DUMP: BODY # BODY: TEST2a # diversions: GROW - 1, GROW, BODY |- # # * TEST2b requires TEST3 # _m4_require_call pushes GROW - 2 and expands TEST3 here. # (TEST3 requires TEST2a, but TEST2a has already been m4_provide'd, so # nothing happens.) # DUMP: BODY # BODY: TEST2a # GROW - 2: TEST3 # diversions: GROW - 2, GROW - 1, GROW, BODY |- # Then the diversion is appended to DUMP, and popped. # DUMP: BODY # BODY: TEST2a; TEST3 # diversions: GROW - 1, GROW, BODY |- # # * TEST1 requires TEST2b (contd.) # The content of TEST2b is expanded... # DUMP: BODY # BODY: TEST2a; TEST3 # GROW - 1: TEST2b, # diversions: GROW - 1, GROW, BODY |- # ... and moved to DUMP. # DUMP: BODY # BODY: TEST2a; TEST3; TEST2b # diversions: GROW, BODY |- # # * TEST1 is expanded: epilogue # TEST1's own content is in GROW... # DUMP: BODY # BODY: TEST2a; TEST3; TEST2b # GROW: TEST1 # diversions: BODY |- # ... and it's epilogue moves it to DUMP and then undefines DUMP. # DUMP: undefined # BODY: TEST2a; TEST3; TEST2b; TEST1 # diversions: BODY |- # # # The third idea: track macros provided before they were required # --------------------------------------------------------------- # # Using just the first two ideas, Autoconf 2.50 through 2.63 still had # a subtle bug for more than seven years. Let's consider the # following example to explain the bug: # # | m4_defun([TEST1], [1]) # | m4_defun([TEST2], [2[]m4_require([TEST1])]) # | m4_defun([TEST3], [3 TEST1 m4_require([TEST2])]) # | TEST3 # # After the prologue of TEST3, we are collecting text in GROW with the # intent of dumping it in BODY during the epilogue. Next, we # encounter the direct invocation of TEST1, which provides the macro # in place in GROW. From there, we encounter a requirement for TEST2, # which must be collected in a new diversion. While expanding TEST2, # we encounter a requirement for TEST1, but since it has already been # expanded, the Axel Thimm algorithm states that we can treat it as a # no-op. But that would lead to an end result of `2 3 1', meaning # that we have once again output a macro (TEST2) prior to its # requirements (TEST1). # # The problem can only occur if a single defun'd macro first provides, # then later indirectly requires, the same macro. Note that directly # expanding then requiring a macro is okay: because the dependency was # met, the require phase can be a no-op. For that matter, the outer # macro can even require two helpers, where the first helper expands # the macro, and the second helper indirectly requires the macro. # Out-of-order expansion is only present if the inner macro is # required by something that will be hoisted in front of where the # direct expansion occurred. In other words, we must be careful not # to warn on: # # | m4_defun([TEST4], [4]) # | m4_defun([TEST5], [5 TEST4 m4_require([TEST4])]) # | TEST5 => 5 4 # # or even the more complex: # # | m4_defun([TEST6], [6]) # | m4_defun([TEST7], [7 TEST6]) # | m4_defun([TEST8], [8 m4_require([TEST6])]) # | m4_defun([TEST9], [9 m4_require([TEST8])]) # | m4_defun([TEST10], [10 m4_require([TEST7]) m4_require([TEST9])]) # | TEST10 => 7 6 8 9 10 # # So, to detect whether a require was direct or indirect, m4_defun and # m4_require track the name of the macro that caused a diversion to be # created (using the stack _m4_diverting, coupled with an O(1) lookup # _m4_diverting([NAME])), and m4_provide stores the name associated # with the diversion at which a macro was provided. A require call is # direct if it occurs within the same diversion where the macro was # provided, or if the diversion associated with the providing context # has been collected. # # The implementation of the warning involves tracking the set of # macros which have been provided since the start of the outermost # defun'd macro (the set is named _m4_provide). When starting an # outermost macro, the set is emptied; when a macro is provided, it is # added to the set; when require expands the body of a macro, it is # removed from the set; and when a macro is indirectly required, the # set is checked. If a macro is in the set, then it has been provided # before it was required, and we satisfy dependencies by expanding the # macro as if it had never been provided; in the example given above, # this means we now output `1 2 3 1'. Meanwhile, a warning is issued # to inform the user that her macros trigger the bug in older autoconf # versions, and that her output file now contains redundant contents # (and possibly new problems, if the repeated macro was not # idempotent). Meanwhile, macros defined by m4_defun_once instead of # m4_defun are idempotent, avoiding any warning or duplicate output. # # # 2. Keeping track of the expansion stack # ======================================= # # When M4 expansion goes wrong it is often extremely hard to find the # path amongst macros that drove to the failure. What is needed is # the stack of macro `calls'. One could imagine that GNU M4 would # maintain a stack of macro expansions, unfortunately it doesn't, so # we do it by hand. This is of course extremely costly, but the help # this stack provides is worth it. Nevertheless to limit the # performance penalty this is implemented only for m4_defun'd macros, # not for define'd macros. # # Each time we enter an m4_defun'd macros, we add a definition in # _m4_expansion_stack, and when we exit the macro, we remove it (thanks # to pushdef/popdef). m4_stack_foreach is used to print the expansion # stack in the rare cases when it's needed. # # In addition, we want to detect circular m4_require dependencies. # Each time we expand a macro FOO we define _m4_expanding(FOO); and # m4_require(BAR) simply checks whether _m4_expanding(BAR) is defined. # m4_expansion_stack # ------------------ # Expands to the entire contents of the expansion stack. The caller # must supply a trailing newline. This macro always prints a # location; check whether _m4_expansion_stack is defined to filter out # the case when no defun'd macro is in force. m4_define([m4_expansion_stack], [m4_stack_foreach_sep_lifo([_$0], [_$0_entry(], [) ])m4_location[: the top level]]) # _m4_expansion_stack_entry(MACRO) # -------------------------------- # Format an entry for MACRO found on the expansion stack. m4_define([_m4_expansion_stack_entry], [_m4_defn([m4_location($1)])[: $1 is expanded from...]]) # m4_expansion_stack_push(MACRO) # ------------------------------ # Form an entry of the expansion stack on entry to MACRO and push it. m4_define([m4_expansion_stack_push], [m4_pushdef([_m4_expansion_stack], [$1])]) # _m4_divert(GROW) # ---------------- # This diversion is used by the m4_defun/m4_require machinery. It is # important to keep room before GROW because for each nested # AC_REQUIRE we use an additional diversion (i.e., two m4_require's # will use GROW - 2. More than 3 levels has never seemed to be # needed.) # # ... # - GROW - 2 # m4_require'd code, 2 level deep # - GROW - 1 # m4_require'd code, 1 level deep # - GROW # m4_defun'd macros are elaborated here. m4_define([_m4_divert(GROW)], 10000) # _m4_defun_pro(MACRO-NAME) # ------------------------- # The prologue for Autoconf macros. # # This is called frequently, so minimize the number of macro invocations # by avoiding dnl and m4_defn overhead. m4_define([_m4_defun_pro], [m4_ifdef([_m4_expansion_stack], [], [_m4_defun_pro_outer([$1])])]dnl [m4_expansion_stack_push([$1])m4_pushdef([_m4_expanding($1)])]) m4_define([_m4_defun_pro_outer], [m4_set_delete([_m4_provide])]dnl [m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])]dnl [m4_pushdef([_m4_divert_dump], m4_divnum)m4_divert_push([GROW])]) # _m4_defun_epi(MACRO-NAME) # ------------------------- # The Epilogue for Autoconf macros. MACRO-NAME only helps tracing # the PRO/EPI pairs. # # This is called frequently, so minimize the number of macro invocations # by avoiding dnl and m4_popdef overhead. m4_define([_m4_defun_epi], [_m4_popdef([_m4_expanding($1)], [_m4_expansion_stack])]dnl [m4_ifdef([_m4_expansion_stack], [], [_m4_defun_epi_outer([$1])])]dnl [m4_provide([$1])]) m4_define([_m4_defun_epi_outer], [_m4_popdef([_m4_divert_dump], [_m4_diverting([$1])], [_m4_diverting])]dnl [m4_divert_pop([GROW])m4_undivert([GROW])]) # _m4_divert_dump # --------------- # If blank, we are outside of any defun'd macro. Otherwise, expands # to the diversion number (not name) where require'd macros should be # moved once completed. m4_define([_m4_divert_dump]) # m4_divert_require(DIVERSION, NAME-TO-CHECK, [BODY-TO-EXPAND]) # -------------------------------------------------------------- # Same as m4_require, but BODY-TO-EXPAND goes into the named DIVERSION; # requirements still go in the current diversion though. # m4_define([m4_divert_require], [m4_ifdef([_m4_expanding($2)], [m4_fatal([$0: circular dependency of $2])])]dnl [m4_if(_m4_divert_dump, [], [m4_fatal([$0($2): cannot be used outside of an m4_defun'd macro])])]dnl [m4_provide_if([$2], [], [_m4_require_call([$2], [$3], _m4_divert([$1]))])]) # m4_defun(NAME, EXPANSION, [MACRO = m4_define]) # ---------------------------------------------- # Define a macro NAME which automatically provides itself. Add # machinery so the macro automatically switches expansion to the # diversion stack if it is not already using it, prior to EXPANSION. # In this case, once finished, it will bring back all the code # accumulated in the diversion stack. This, combined with m4_require, # achieves the topological ordering of macros. We don't use this # macro to define some frequently called macros that are not involved # in ordering constraints, to save m4 processing. # # MACRO is an undocumented argument; when set to m4_pushdef, and NAME # is already defined, the new definition is added to the pushdef # stack, rather than overwriting the current definition. It can thus # be used to write self-modifying macros, which pop themselves to a # previously m4_define'd definition so that subsequent use of the # macro is faster. m4_define([m4_defun], [m4_define([m4_location($1)], m4_location)]dnl [m4_default([$3], [m4_define])([$1], [_m4_defun_pro(]m4_dquote($[0])[)$2[]_m4_defun_epi(]m4_dquote($[0])[)])]) # m4_defun_init(NAME, INIT, COMMON) # --------------------------------- # Like m4_defun, but split EXPANSION into two portions: INIT which is # done only the first time NAME is invoked, and COMMON which is # expanded every time. # # For now, the COMMON definition is always m4_define'd, giving an even # lighter-weight definition. m4_defun allows self-providing, but once # a macro is provided, m4_require no longer cares if it is m4_define'd # or m4_defun'd. m4_defun also provides location tracking to identify # dependency bugs, but once the INIT has been expanded, we know there # are no dependency bugs. However, if a future use needs COMMON to be # m4_defun'd, we can add a parameter, similar to the third parameter # to m4_defun. m4_define([m4_defun_init], [m4_define([$1], [$3])m4_defun([$1], [$2[]_m4_popdef(]m4_dquote($[0])[)m4_indir(]m4_dquote($[0])dnl [m4_if(]m4_dquote($[#])[, [0], [], ]m4_dquote([,$]@)[))], [m4_pushdef])]) # m4_defun_once(NAME, EXPANSION) # ------------------------------ # Like m4_defun, but guarantee that EXPANSION only happens once # (thereafter, using NAME is a no-op). # # If _m4_divert_dump is empty, we are called at the top level; # otherwise, we must ensure that we are required in front of the # current defun'd macro. Use a helper macro so that EXPANSION need # only occur once in the definition of NAME, since it might be large. m4_define([m4_defun_once], [m4_define([m4_location($1)], m4_location)]dnl [m4_define([$1], [_m4_defun_once([$1], [$2], m4_if(_m4_divert_dump, [], [[_m4_defun_pro([$1])m4_unquote(], [)_m4_defun_epi([$1])]], m4_ifdef([_m4_diverting([$1])], [-]), [-], [[m4_unquote(], [)]], [[_m4_require_call([$1],], [, _m4_divert_dump)]]))])]) m4_define([_m4_defun_once], [m4_pushdef([$1])$3[$2[]m4_provide([$1])]$4]) # m4_pattern_forbid(ERE, [WHY]) # ----------------------------- # Declare that no token matching the forbidden extended regular # expression ERE should be seen in the output unless... m4_define([m4_pattern_forbid], []) # m4_pattern_allow(ERE) # --------------------- # ... that token also matches the allowed extended regular expression ERE. # Both used via traces. m4_define([m4_pattern_allow], []) ## --------------------------------- ## ## 11. Dependencies between macros. ## ## --------------------------------- ## # m4_before(THIS-MACRO-NAME, CALLED-MACRO-NAME) # --------------------------------------------- # Issue a warning if CALLED-MACRO-NAME was called before THIS-MACRO-NAME. m4_define([m4_before], [m4_provide_if([$2], [m4_warn([syntax], [$2 was called before $1])])]) # m4_require(NAME-TO-CHECK, [BODY-TO-EXPAND = NAME-TO-CHECK]) # ----------------------------------------------------------- # If NAME-TO-CHECK has never been expanded (actually, if it is not # m4_provide'd), expand BODY-TO-EXPAND *before* the current macro # expansion; follow the expansion with a newline. Once expanded, emit # it in _m4_divert_dump. Keep track of the m4_require chain in # _m4_expansion_stack. # # The normal cases are: # # - NAME-TO-CHECK == BODY-TO-EXPAND # Which you can use for regular macros with or without arguments, e.g., # m4_require([AC_PROG_CC], [AC_PROG_CC]) # m4_require([AC_CHECK_HEADERS(limits.h)], [AC_CHECK_HEADERS(limits.h)]) # which is just the same as # m4_require([AC_PROG_CC]) # m4_require([AC_CHECK_HEADERS(limits.h)]) # # - BODY-TO-EXPAND == m4_indir([NAME-TO-CHECK]) # In the case of macros with irregular names. For instance: # m4_require([AC_LANG_COMPILER(C)], [indir([AC_LANG_COMPILER(C)])]) # which means `if the macro named `AC_LANG_COMPILER(C)' (the parens are # part of the name, it is not an argument) has not been run, then # call it.' # Had you used # m4_require([AC_LANG_COMPILER(C)], [AC_LANG_COMPILER(C)]) # then m4_require would have tried to expand `AC_LANG_COMPILER(C)', i.e., # call the macro `AC_LANG_COMPILER' with `C' as argument. # # You could argue that `AC_LANG_COMPILER', when it receives an argument # such as `C' should dispatch the call to `AC_LANG_COMPILER(C)'. But this # `extension' prevents `AC_LANG_COMPILER' from having actual arguments that # it passes to `AC_LANG_COMPILER(C)'. # # This is called frequently, so minimize the number of macro invocations # by avoiding dnl and other overhead on the common path. m4_define([m4_require], [m4_ifdef([_m4_expanding($1)], [m4_fatal([$0: circular dependency of $1])])]dnl [m4_if(_m4_divert_dump, [], [m4_fatal([$0($1): cannot be used outside of an ]dnl m4_if([$0], [m4_require], [[m4_defun]], [[AC_DEFUN]])['d macro])])]dnl [m4_provide_if([$1], [m4_set_contains([_m4_provide], [$1], [_m4_require_check([$1], _m4_defn([m4_provide($1)]), [$0])], [m4_ignore])], [_m4_require_call])([$1], [$2], _m4_divert_dump)]) # _m4_require_call(NAME-TO-CHECK, [BODY-TO-EXPAND = NAME-TO-CHECK], # DIVERSION-NUMBER) # ----------------------------------------------------------------- # If m4_require decides to expand the body, it calls this macro. The # expansion is placed in DIVERSION-NUMBER. # # This is called frequently, so minimize the number of macro invocations # by avoiding dnl and other overhead on the common path. m4_define([_m4_require_call], [m4_pushdef([_m4_divert_grow], m4_decr(_m4_divert_grow))]dnl [m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])]dnl [m4_divert_push(_m4_divert_grow)]dnl [m4_if([$2], [], [$1], [$2]) m4_provide_if([$1], [m4_set_remove([_m4_provide], [$1])], [m4_warn([syntax], [$1 is m4_require'd but not m4_defun'd])])]dnl [_m4_divert_raw($3)_m4_undivert(_m4_divert_grow)]dnl [m4_divert_pop(_m4_divert_grow)_m4_popdef([_m4_divert_grow], [_m4_diverting([$1])], [_m4_diverting])]) # _m4_require_check(NAME-TO-CHECK, OWNER, CALLER) # ----------------------------------------------- # NAME-TO-CHECK has been identified as previously expanded in the # diversion owned by OWNER. If this is a problem, warn on behalf of # CALLER and return _m4_require_call; otherwise return m4_ignore. m4_define([_m4_require_check], [m4_if(_m4_defn([_m4_diverting]), [$2], [m4_ignore], m4_ifdef([_m4_diverting([$2])], [-]), [-], [m4_warn([syntax], [$3: `$1' was expanded before it was required])_m4_require_call], [m4_ignore])]) # _m4_divert_grow # --------------- # The counter for _m4_require_call. m4_define([_m4_divert_grow], _m4_divert([GROW])) # m4_expand_once(TEXT, [WITNESS = TEXT]) # -------------------------------------- # If TEXT has never been expanded, expand it *here*. Use WITNESS as # as a memory that TEXT has already been expanded. m4_define([m4_expand_once], [m4_provide_if(m4_default_quoted([$2], [$1]), [], [m4_provide(m4_default_quoted([$2], [$1]))[]$1])]) # m4_provide(MACRO-NAME) # ---------------------- m4_define([m4_provide], [m4_ifdef([m4_provide($1)], [], [m4_set_add([_m4_provide], [$1], [m4_define([m4_provide($1)], m4_ifdef([_m4_diverting], [_m4_defn([_m4_diverting])]))])])]) # m4_provide_if(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ------------------------------------------------------- # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED. # The purpose of this macro is to provide the user with a means to # check macros which are provided without letting her know how the # information is coded. m4_define([m4_provide_if], [m4_ifdef([m4_provide($1)], [$2], [$3])]) ## --------------------- ## ## 12. Text processing. ## ## --------------------- ## # m4_cr_letters # m4_cr_LETTERS # m4_cr_Letters # ------------- m4_define([m4_cr_letters], [abcdefghijklmnopqrstuvwxyz]) m4_define([m4_cr_LETTERS], [ABCDEFGHIJKLMNOPQRSTUVWXYZ]) m4_define([m4_cr_Letters], m4_defn([m4_cr_letters])dnl m4_defn([m4_cr_LETTERS])dnl ) # m4_cr_digits # ------------ m4_define([m4_cr_digits], [0123456789]) # m4_cr_alnum # ----------- m4_define([m4_cr_alnum], m4_defn([m4_cr_Letters])dnl m4_defn([m4_cr_digits])dnl ) # m4_cr_symbols1 # m4_cr_symbols2 # ------------------------------- m4_define([m4_cr_symbols1], m4_defn([m4_cr_Letters])dnl _) m4_define([m4_cr_symbols2], m4_defn([m4_cr_symbols1])dnl m4_defn([m4_cr_digits])dnl ) # m4_cr_all # --------- # The character range representing everything, with `-' as the last # character, since it is special to m4_translit. Use with care, because # it contains characters special to M4 (fortunately, both ASCII and EBCDIC # have [] in order, so m4_defn([m4_cr_all]) remains a valid string). It # also contains characters special to terminals, so it should never be # displayed in an error message. Also, attempts to map [ and ] to other # characters via m4_translit must deal with the fact that m4_translit does # not add quotes to the output. # # It is mainly useful in generating inverted character range maps, for use # in places where m4_translit is faster than an equivalent m4_bpatsubst; # the regex `[^a-z]' is equivalent to: # m4_translit(m4_dquote(m4_defn([m4_cr_all])), [a-z]) m4_define([m4_cr_all], m4_translit(m4_dquote(m4_format(m4_dquote(m4_for( ,1,255,,[[%c]]))m4_for([i],1,255,,[,i]))), [-])-) # _m4_define_cr_not(CATEGORY) # --------------------------- # Define m4_cr_not_CATEGORY as the inverse of m4_cr_CATEGORY. m4_define([_m4_define_cr_not], [m4_define([m4_cr_not_$1], m4_translit(m4_dquote(m4_defn([m4_cr_all])), m4_defn([m4_cr_$1])))]) # m4_cr_not_letters # m4_cr_not_LETTERS # m4_cr_not_Letters # m4_cr_not_digits # m4_cr_not_alnum # m4_cr_not_symbols1 # m4_cr_not_symbols2 # ------------------ # Inverse character sets _m4_define_cr_not([letters]) _m4_define_cr_not([LETTERS]) _m4_define_cr_not([Letters]) _m4_define_cr_not([digits]) _m4_define_cr_not([alnum]) _m4_define_cr_not([symbols1]) _m4_define_cr_not([symbols2]) # m4_newline([STRING]) # -------------------- # Expands to a newline, possibly followed by STRING. Exists mostly for # formatting reasons. m4_define([m4_newline], [ $1]) # m4_re_escape(STRING) # -------------------- # Escape RE active characters in STRING. m4_define([m4_re_escape], [m4_bpatsubst([$1], [[][*+.?\^$]], [\\\&])]) # m4_re_string # ------------ # Regexp for `[a-zA-Z_0-9]*' # m4_dquote provides literal [] for the character class. m4_define([m4_re_string], m4_dquote(m4_defn([m4_cr_symbols2]))dnl [*]dnl ) # m4_re_word # ---------- # Regexp for `[a-zA-Z_][a-zA-Z_0-9]*' m4_define([m4_re_word], m4_dquote(m4_defn([m4_cr_symbols1]))dnl m4_defn([m4_re_string])dnl ) # m4_tolower(STRING) # m4_toupper(STRING) # ------------------ # These macros convert STRING to lowercase or uppercase. # # Rather than expand the m4_defn each time, we inline them up front. m4_define([m4_tolower], [m4_translit([$1], ]m4_dquote(m4_defn([m4_cr_LETTERS]))[, ]m4_dquote(m4_defn([m4_cr_letters]))[)]) m4_define([m4_toupper], [m4_translit([$1], ]m4_dquote(m4_defn([m4_cr_letters]))[, ]m4_dquote(m4_defn([m4_cr_LETTERS]))[)]) # m4_split(STRING, [REGEXP]) # -------------------------- # Split STRING into an m4 list of quoted elements. The elements are # quoted with [ and ]. Beginning spaces and end spaces *are kept*. # Use m4_strip to remove them. # # REGEXP specifies where to split. Default is [\t ]+. # # If STRING is empty, the result is an empty list. # # Pay attention to the m4_changequotes. When m4 reads the definition of # m4_split, it still has quotes set to [ and ]. Luckily, these are matched # in the macro body, so the definition is stored correctly. Use the same # alternate quotes as m4_noquote; it must be unlikely to appear in $1. # # Also, notice that $1 is quoted twice, since we want the result to # be quoted. Then you should understand that the argument of # patsubst is -=<{(STRING)}>=- (i.e., with additional -=<{( and )}>=-). # # This macro is safe on active symbols, i.e.: # m4_define(active, ACTIVE) # m4_split([active active ])end # => [active], [active], []end # # Optimize on regex of ` ' (space), since m4_foreach_w already guarantees # that the list contains single space separators, and a common case is # splitting a single-element list. This macro is called frequently, # so avoid unnecessary dnl inside the definition. m4_define([m4_split], [m4_if([$1], [], [], [$2], [ ], [m4_if(m4_index([$1], [ ]), [-1], [[[$1]]], [_$0([$1], [$2], [, ])])], [$2], [], [_$0([$1], [[ ]+], [, ])], [_$0([$1], [$2], [, ])])]) m4_define([_m4_split], [m4_changequote([-=<{(],[)}>=-])]dnl [[m4_bpatsubst(-=<{(-=<{($1)}>=-)}>=-, -=<{($2)}>=-, -=<{(]$3[)}>=-)]m4_changequote([, ])]) # m4_chomp(STRING) # m4_chomp_all(STRING) # -------------------- # Return STRING quoted, but without a trailing newline. m4_chomp # removes at most one newline, while m4_chomp_all removes all # consecutive trailing newlines. Embedded newlines are not touched, # and a trailing backslash-newline leaves just a trailing backslash. # # m4_bregexp is slower than m4_index, and we don't always want to # remove all newlines; hence the two variants. We massage characters # to give a nicer pattern to match, particularly since m4_bregexp is # line-oriented. Both versions must guarantee a match, to avoid bugs # with precision -1 in m4_format in older m4. m4_define([m4_chomp], [m4_format([[%.*s]], m4_index(m4_translit([[$1]], [ /.], [/ ])[./.], [/.]), [$1])]) m4_define([m4_chomp_all], [m4_format([[%.*s]], m4_bregexp(m4_translit([[$1]], [ /], [/ ]), [/*$]), [$1])]) # m4_flatten(STRING) # ------------------ # If STRING contains end of lines, replace them with spaces. If there # are backslashed end of lines, remove them. This macro is safe with # active symbols. # m4_define(active, ACTIVE) # m4_flatten([active # act\ # ive])end # => active activeend # # In m4, m4_bpatsubst is expensive, so first check for a newline. m4_define([m4_flatten], [m4_if(m4_index([$1], [ ]), [-1], [[$1]], [m4_translit(m4_bpatsubst([[[$1]]], [\\ ]), [ ], [ ])])]) # m4_strip(STRING) # ---------------- # Expands into STRING with tabs and spaces singled out into a single # space, and removing leading and trailing spaces. # # This macro is robust to active symbols. # m4_define(active, ACTIVE) # m4_strip([ active <tab> <tab>active ])end # => active activeend # # First, notice that we guarantee trailing space. Why? Because regular # expressions are greedy, and `.* ?' would always group the space into the # .* portion. The algorithm is simpler by avoiding `?' at the end. The # algorithm correctly strips everything if STRING is just ` '. # # Then notice the second pattern: it is in charge of removing the # leading/trailing spaces. Why not just `[^ ]'? Because they are # applied to over-quoted strings, i.e. more or less [STRING], due # to the limitations of m4_bpatsubsts. So the leading space in STRING # is the *second* character; equally for the trailing space. m4_define([m4_strip], [m4_bpatsubsts([$1 ], [[ ]+], [ ], [^. ?\(.*\) .$], [[[\1]]])]) # m4_normalize(STRING) # -------------------- # Apply m4_flatten and m4_strip to STRING. # # The argument is quoted, so that the macro is robust to active symbols: # # m4_define(active, ACTIVE) # m4_normalize([ act\ # ive # active ])end # => active activeend m4_define([m4_normalize], [m4_strip(m4_flatten([$1]))]) # m4_join(SEP, ARG1, ARG2...) # --------------------------- # Produce ARG1SEPARG2...SEPARGn. Avoid back-to-back SEP when a given ARG # is the empty string. No expansion is performed on SEP or ARGs. # # Since the number of arguments to join can be arbitrarily long, we # want to avoid having more than one $@ in the macro definition; # otherwise, the expansion would require twice the memory of the already # long list. Hence, m4_join merely looks for the first non-empty element, # and outputs just that element; while _m4_join looks for all non-empty # elements, and outputs them following a separator. The final trick to # note is that we decide between recursing with $0 or _$0 based on the # nested m4_if ending with `_'. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift2($@))])]) m4_define([_m4_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift2($@))])]) # m4_joinall(SEP, ARG1, ARG2...) # ------------------------------ # Produce ARG1SEPARG2...SEPARGn. An empty ARG results in back-to-back SEP. # No expansion is performed on SEP or ARGs. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_joinall], [[$2]_$0([$1], m4_shift($@))]) m4_define([_m4_joinall], [m4_if([$#], [2], [], [[$1$3]$0([$1], m4_shift2($@))])]) # m4_combine([SEPARATOR], PREFIX-LIST, [INFIX], SUFFIX...) # -------------------------------------------------------- # Produce the pairwise combination of every element in the quoted, # comma-separated PREFIX-LIST with every element from the SUFFIX arguments. # Each pair is joined with INFIX, and pairs are separated by SEPARATOR. # No expansion occurs on SEPARATOR, INFIX, or elements of either list. # # For example: # m4_combine([, ], [[a], [b], [c]], [-], [1], [2], [3]) # => a-1, a-2, a-3, b-1, b-2, b-3, c-1, c-2, c-3 # # This definition is a bit hairy; the thing to realize is that we want # to construct m4_map_args_sep([[prefix$3]], [], [[$1]], m4_shift3($@)) # as the inner loop, using each prefix generated by the outer loop, # and without recalculating m4_shift3 every outer iteration. m4_define([m4_combine], [m4_if([$2], [], [], m4_eval([$# > 3]), [1], [m4_map_args_sep([m4_map_args_sep(m4_dquote(], [)[[$3]], [], [[$1]],]]]dnl [m4_dquote(m4_dquote(m4_shift3($@)))[[)], [[$1]], $2)])]) # m4_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR`'STRING' # at the end. It is valid to use this macro with MACRO-NAME undefined, # in which case no SEPARATOR is added. Be aware that the criterion is # `not being defined', and not `not being empty'. # # Note that neither STRING nor SEPARATOR are expanded here; rather, when # you expand MACRO-NAME, they will be expanded at that point in time. # # This macro is robust to active symbols. It can be used to grow # strings. # # | m4_define(active, ACTIVE)dnl # | m4_append([sentence], [This is an])dnl # | m4_append([sentence], [ active ])dnl # | m4_append([sentence], [symbol.])dnl # | sentence # | m4_undefine([active])dnl # | sentence # => This is an ACTIVE symbol. # => This is an active symbol. # # It can be used to define hooks. # # | m4_define(active, ACTIVE)dnl # | m4_append([hooks], [m4_define([act1], [act2])])dnl # | m4_append([hooks], [m4_define([act2], [active])])dnl # | m4_undefine([active])dnl # | act1 # | hooks # | act1 # => act1 # => # => active # # It can also be used to create lists, although this particular usage was # broken prior to autoconf 2.62. # | m4_append([list], [one], [, ])dnl # | m4_append([list], [two], [, ])dnl # | m4_append([list], [three], [, ])dnl # | list # | m4_dquote(list) # => one, two, three # => [one],[two],[three] # # Note that m4_append can benefit from amortized O(n) m4 behavior, if # the underlying m4 implementation is smart enough to avoid copying existing # contents when enlarging a macro's definition into any pre-allocated storage # (m4 1.4.x unfortunately does not implement this optimization). We do # not implement m4_prepend, since it is inherently O(n^2) (pre-allocated # storage only occurs at the end of a macro, so the existing contents must # always be moved). # # Use _m4_defn for speed. m4_define([m4_append], [m4_define([$1], m4_ifdef([$1], [_m4_defn([$1])[$3]])[$2])]) # m4_append_uniq(MACRO-NAME, STRING, [SEPARATOR], [IF-UNIQ], [IF-DUP]) # -------------------------------------------------------------------- # Like `m4_append', but append only if not yet present. Additionally, # expand IF-UNIQ if STRING was appended, or IF-DUP if STRING was already # present. Also, warn if SEPARATOR is not empty and occurs within STRING, # as the algorithm no longer guarantees uniqueness. # # Note that while m4_append can be O(n) (depending on the quality of the # underlying M4 implementation), m4_append_uniq is inherently O(n^2) # because each append operation searches the entire string. m4_define([m4_append_uniq], [m4_ifval([$3], [m4_if(m4_index([$2], [$3]), [-1], [], [m4_warn([syntax], [$0: `$2' contains `$3'])])])_$0($@)]) m4_define([_m4_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]_m4_defn([$1])[$3], [$3$2$3]), [-1], [m4_append([$1], [$2], [$3])$4], [$5])], [m4_define([$1], [$2])$4])]) # m4_append_uniq_w(MACRO-NAME, STRINGS) # ------------------------------------- # For each of the words in the whitespace separated list STRINGS, append # only the unique strings to the definition of MACRO-NAME. # # Use _m4_defn for speed. m4_define([m4_append_uniq_w], [m4_map_args_w([$2], [_m4_append_uniq([$1],], [, [ ])])]) # m4_text_wrap(STRING, [PREFIX], [FIRST-PREFIX], [WIDTH]) # ------------------------------------------------------- # Expands into STRING wrapped to hold in WIDTH columns (default = 79). # If PREFIX is given, each line is prefixed with it. If FIRST-PREFIX is # specified, then the first line is prefixed with it. As a special case, # if the length of FIRST-PREFIX is greater than that of PREFIX, then # FIRST-PREFIX will be left alone on the first line. # # No expansion occurs on the contents STRING, PREFIX, or FIRST-PREFIX, # although quadrigraphs are correctly recognized. More precisely, # you may redefine m4_qlen to recognize whatever escape sequences that # you will post-process. # # Typical outputs are: # # m4_text_wrap([Short string */], [ ], [/* ], 20) # => /* Short string */ # # m4_text_wrap([Much longer string */], [ ], [/* ], 20) # => /* Much longer # => string */ # # m4_text_wrap([Short doc.], [ ], [ --short ], 30) # => --short Short doc. # # m4_text_wrap([Short doc.], [ ], [ --too-wide ], 30) # => --too-wide # => Short doc. # # m4_text_wrap([Super long documentation.], [ ], [ --too-wide ], 30) # => --too-wide # => Super long # => documentation. # # FIXME: there is no checking of a longer PREFIX than WIDTH, but do # we really want to bother with people trying each single corner # of a software? # # This macro does not leave a trailing space behind the last word of a line, # which complicates it a bit. The algorithm is otherwise stupid and simple: # all the words are preceded by m4_Separator which is defined to empty for # the first word, and then ` ' (single space) for all the others. # # The algorithm uses a helper that uses $2 through $4 directly, rather than # using local variables, to avoid m4_defn overhead, or expansion swallowing # any $. It also bypasses m4_popdef overhead with _m4_popdef since no user # macro expansion occurs in the meantime. Also, the definition is written # with m4_do, to avoid time wasted on dnl during expansion (since this is # already a time-consuming macro). m4_define([m4_text_wrap], [_$0([$1], [$2], m4_default_quoted([$3], [$2]), m4_default_quoted([$4], [79]))]) m4_define([_m4_text_wrap], m4_do(dnl set up local variables, to avoid repeated calculations [[m4_pushdef([m4_Indent], m4_qlen([$2]))]], [[m4_pushdef([m4_Cursor], m4_qlen([$3]))]], [[m4_pushdef([m4_Separator], [m4_define([m4_Separator], [ ])])]], dnl expand the first prefix, then check its length vs. regular prefix dnl same length: nothing special dnl prefix1 longer: output on line by itself, and reset cursor dnl prefix1 shorter: pad to length of prefix, and reset cursor [[[$3]m4_cond([m4_Cursor], m4_Indent, [], [m4_eval(m4_Cursor > m4_Indent)], [1], [ [$2]m4_define([m4_Cursor], m4_Indent)], [m4_format([%*s], m4_max([0], m4_eval(m4_Indent - m4_Cursor)), [])m4_define([m4_Cursor], m4_Indent)])]], dnl now, for each word, compute the curser after the word is output, then dnl check if the cursor would exceed the wrap column dnl if so, reset cursor, and insert newline and prefix dnl if not, insert the separator (usually a space) dnl either way, insert the word [[m4_map_args_w([$1], [$0_word(], [, [$2], [$4])])]], dnl finally, clean up the local variables [[_m4_popdef([m4_Separator], [m4_Cursor], [m4_Indent])]])) m4_define([_m4_text_wrap_word], [m4_define([m4_Cursor], m4_eval(m4_Cursor + m4_qlen([$1]) + 1))]dnl [m4_if(m4_eval(m4_Cursor > ([$3])), [1], [m4_define([m4_Cursor], m4_eval(m4_Indent + m4_qlen([$1]) + 1)) [$2]], [m4_Separator[]])[$1]]) # m4_text_box(MESSAGE, [FRAME-CHARACTER = `-']) # --------------------------------------------- # Turn MESSAGE into: # ## ------- ## # ## MESSAGE ## # ## ------- ## # using FRAME-CHARACTER in the border. # # Quadrigraphs are correctly recognized. More precisely, you may # redefine m4_qlen to recognize whatever escape sequences that you # will post-process. m4_define([m4_text_box], [m4_pushdef([m4_Border], m4_translit(m4_format([%*s], m4_decr(m4_qlen(_m4_expand([$1 ]))), []), [ ], m4_default_quoted([$2], [-])))]dnl [[##] m4_Border [##] [##] $1 [##] [##] m4_Border [##]_m4_popdef([m4_Border])]) # m4_qlen(STRING) # --------------- # Expands to the length of STRING after autom4te converts all quadrigraphs. # # If you use some other means of post-processing m4 output rather than # autom4te, then you may redefine this macro to recognize whatever # escape sequences your post-processor will handle. For that matter, # m4_define([m4_qlen], m4_defn([m4_len])) is sufficient if you don't # do any post-processing. # # Avoid bpatsubsts for the common case of no quadrigraphs. Cache # results, as configure scripts tend to ask about lengths of common # strings like `/*' and `*/' rather frequently. Minimize the number # of times that $1 occurs in m4_qlen, so there is less text to parse # on a cache hit. m4_define([m4_qlen], [m4_ifdef([$0-$1], [_m4_defn([$0-]], [_$0(])[$1])]) m4_define([_m4_qlen], [m4_define([m4_qlen-$1], m4_if(m4_index([$1], [@]), [-1], [m4_len([$1])], [m4_len(m4_bpatsubst([[$1]], [@\(\(<:\|:>\|S|\|%:\|\{:\|:\}\)\(@\)\|&t@\)], [\3]))]))_m4_defn([m4_qlen-$1])]) # m4_copyright_condense(TEXT) # --------------------------- # Condense the copyright notice in TEXT to only display the final # year, wrapping the results to fit in 80 columns. m4_define([m4_copyright_condense], [m4_text_wrap(m4_bpatsubst(m4_flatten([[$1]]), [(C)[- ,0-9]*\([1-9][0-9][0-9][0-9]\)], [(C) \1]))]) ## ----------------------- ## ## 13. Number processing. ## ## ----------------------- ## # m4_cmp(A, B) # ------------ # Compare two integer expressions. # A < B -> -1 # A = B -> 0 # A > B -> 1 m4_define([m4_cmp], [m4_eval((([$1]) > ([$2])) - (([$1]) < ([$2])))]) # m4_list_cmp(A, B) # ----------------- # # Compare the two lists of integer expressions A and B. For instance: # m4_list_cmp([1, 0], [1]) -> 0 # m4_list_cmp([1, 0], [1, 0]) -> 0 # m4_list_cmp([1, 2], [1, 0]) -> 1 # m4_list_cmp([1, 2, 3], [1, 2]) -> 1 # m4_list_cmp([1, 2, -3], [1, 2]) -> -1 # m4_list_cmp([1, 0], [1, 2]) -> -1 # m4_list_cmp([1], [1, 2]) -> -1 # m4_define([xa], [oops])dnl # m4_list_cmp([[0xa]], [5+5]) -> 0 # # Rather than face the overhead of m4_case, we use a helper function whose # expansion includes the name of the macro to invoke on the tail, either # m4_ignore or m4_unquote. This is particularly useful when comparing # long lists, since less text is being expanded for deciding when to end # recursion. The recursion is between a pair of macros that alternate # which list is trimmed by one element; this is more efficient than # calling m4_cdr on both lists from a single macro. Guarantee exactly # one expansion of both lists' side effects. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_list_cmp], [_$0_raw(m4_dquote($1), m4_dquote($2))]) m4_define([_m4_list_cmp_raw], [m4_if([$1], [$2], [0], [_m4_list_cmp_1([$1], $2)])]) m4_define([_m4_list_cmp], [m4_if([$1], [], [0m4_ignore], [$2], [0], [m4_unquote], [$2m4_ignore])]) m4_define([_m4_list_cmp_1], [_m4_list_cmp_2([$2], [m4_shift2($@)], $1)]) m4_define([_m4_list_cmp_2], [_m4_list_cmp([$1$3], m4_cmp([$3+0], [$1+0]))( [_m4_list_cmp_1(m4_dquote(m4_shift3($@)), $2)])]) # m4_max(EXPR, ...) # m4_min(EXPR, ...) # ----------------- # Return the decimal value of the maximum (or minimum) in a series of # integer expressions. # # M4 1.4.x doesn't provide ?:. Hence this huge m4_eval. Avoid m4_eval # if both arguments are identical, but be aware of m4_max(0xa, 10) (hence # the use of <=, not just <, in the second multiply). # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_max], [m4_if([$#], [0], [m4_fatal([too few arguments to $0])], [$#], [1], [m4_eval([$1])], [$#$1], [2$2], [m4_eval([$1])], [$#], [2], [_$0($@)], [_m4_minmax([_$0], $@)])]) m4_define([_m4_max], [m4_eval((([$1]) > ([$2])) * ([$1]) + (([$1]) <= ([$2])) * ([$2]))]) m4_define([m4_min], [m4_if([$#], [0], [m4_fatal([too few arguments to $0])], [$#], [1], [m4_eval([$1])], [$#$1], [2$2], [m4_eval([$1])], [$#], [2], [_$0($@)], [_m4_minmax([_$0], $@)])]) m4_define([_m4_min], [m4_eval((([$1]) < ([$2])) * ([$1]) + (([$1]) >= ([$2])) * ([$2]))]) # _m4_minmax(METHOD, ARG1, ARG2...) # --------------------------------- # Common recursion code for m4_max and m4_min. METHOD must be _m4_max # or _m4_min, and there must be at least two arguments to combine. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([_m4_minmax], [m4_if([$#], [3], [$1([$2], [$3])], [$0([$1], $1([$2], [$3]), m4_shift3($@))])]) # m4_sign(A) # ---------- # The sign of the integer expression A. m4_define([m4_sign], [m4_eval((([$1]) > 0) - (([$1]) < 0))]) ## ------------------------ ## ## 14. Version processing. ## ## ------------------------ ## # m4_version_unletter(VERSION) # ---------------------------- # Normalize beta version numbers with letters to numeric expressions, which # can then be handed to m4_eval for the purpose of comparison. # # Nl -> (N+1).-1.(l#) # # for example: # [2.14a] -> [0,2,14+1,-1,[0r36:a]] -> 2.15.-1.10 # [2.14b] -> [0,2,15+1,-1,[0r36:b]] -> 2.15.-1.11 # [2.61aa.b] -> [0,2.61,1,-1,[0r36:aa],+1,-1,[0r36:b]] -> 2.62.-1.370.1.-1.11 # [08] -> [0,[0r10:0]8] -> 8 # # This macro expects reasonable version numbers, but can handle double # letters and does not expand any macros. Original version strings can # use both `.' and `-' separators. # # Inline constant expansions, to avoid m4_defn overhead. # _m4_version_unletter is the real workhorse used by m4_version_compare, # but since [0r36:a] and commas are less readable than 10 and dots, we # provide a wrapper for human use. m4_define([m4_version_unletter], [m4_substr(m4_map_args([.m4_eval], m4_unquote(_$0([$1]))), [3])]) m4_define([_m4_version_unletter], [m4_bpatsubst(m4_bpatsubst(m4_translit([[[[0,$1]]]], [.-], [,,]),]dnl m4_dquote(m4_dquote(m4_defn([m4_cr_Letters])))[[+], [+1,-1,[0r36:\&]]), [,0], [,[0r10:0]])]) # m4_version_compare(VERSION-1, VERSION-2) # ---------------------------------------- # Compare the two version numbers and expand into # -1 if VERSION-1 < VERSION-2 # 0 if = # 1 if > # # Since _m4_version_unletter does not output side effects, we can # safely bypass the overhead of m4_version_cmp. m4_define([m4_version_compare], [_m4_list_cmp_raw(_m4_version_unletter([$1]), _m4_version_unletter([$2]))]) # m4_PACKAGE_NAME # m4_PACKAGE_TARNAME # m4_PACKAGE_VERSION # m4_PACKAGE_STRING # m4_PACKAGE_BUGREPORT # -------------------- # If m4sugar/version.m4 is present, then define version strings. This # file is optional, provided by Autoconf but absent in Bison. m4_sinclude([m4sugar/version.m4]) # m4_version_prereq(VERSION, [IF-OK], [IF-NOT = FAIL]) # ---------------------------------------------------- # Check this Autoconf version against VERSION. m4_define([m4_version_prereq], m4_ifdef([m4_PACKAGE_VERSION], [[m4_if(m4_version_compare(]m4_dquote(m4_defn([m4_PACKAGE_VERSION]))[, [$1]), [-1], [m4_default([$3], [m4_fatal([Autoconf version $1 or higher is required], [63])])], [$2])]], [[m4_fatal([m4sugar/version.m4 not found])]])) ## ------------------ ## ## 15. Set handling. ## ## ------------------ ## # Autoconf likes to create arbitrarily large sets; for example, as of # this writing, the configure.ac for coreutils tracks a set of more # than 400 AC_SUBST. How do we track all of these set members, # without introducing duplicates? We could use m4_append_uniq, with # the set NAME residing in the contents of the macro NAME. # Unfortunately, m4_append_uniq is quadratic for set creation, because # it costs O(n) to search the string for each of O(n) insertions; not # to mention that with m4 1.4.x, even using m4_append is slow, costing # O(n) rather than O(1) per insertion. Other set operations, not used # by Autoconf but still possible by manipulation of the definition # tracked in macro NAME, include O(n) deletion of one element and O(n) # computation of set size. Because the set is exposed to the user via # the definition of a single macro, we cannot cache any data about the # set without risking the cache being invalidated by the user # redefining NAME. # # Can we do better? Yes, because m4 gives us an O(1) search function # for free: ifdef. Additionally, even m4 1.4.x gives us an O(1) # insert operation for free: pushdef. But to use these, we must # represent the set via a group of macros; to keep the set consistent, # we must hide the set so that the user can only manipulate it through # accessor macros. The contents of the set are maintained through two # access points; _m4_set([name]) is a pushdef stack of values in the # set, useful for O(n) traversal of the set contents; while the # existence of _m4_set([name],value) with no particular value is # useful for O(1) querying of set membership. And since the user # cannot externally manipulate the set, we are free to add additional # caching macros for other performance improvements. Deletion can be # O(1) per element rather than O(n), by reworking the definition of # _m4_set([name],value) to be 0 or 1 based on current membership, and # adding _m4_set_cleanup(name) to defer the O(n) cleanup of # _m4_set([name]) until we have another reason to do an O(n) # traversal. The existence of _m4_set_cleanup(name) can then be used # elsewhere to determine if we must dereference _m4_set([name],value), # or assume that definition implies set membership. Finally, size can # be tracked in an O(1) fashion with _m4_set_size(name). # # The quoting in _m4_set([name],value) is chosen so that there is no # ambiguity with a set whose name contains a comma, and so that we can # supply the value via _m4_defn([_m4_set([name])]) without needing any # quote manipulation. # m4_set_add(SET, VALUE, [IF-UNIQ], [IF-DUP]) # ------------------------------------------- # Add VALUE as an element of SET. Expand IF-UNIQ on the first # addition, and IF-DUP if it is already in the set. Addition of one # element is O(1), such that overall set creation is O(n). # # We do not want to add a duplicate for a previously deleted but # unpruned element, but it is just as easy to check existence directly # as it is to query _m4_set_cleanup($1). m4_define([m4_set_add], [m4_ifdef([_m4_set([$1],$2)], [m4_if(m4_indir([_m4_set([$1],$2)]), [0], [m4_define([_m4_set([$1],$2)], [1])_m4_set_size([$1], [m4_incr])$3], [$4])], [m4_define([_m4_set([$1],$2)], [1])m4_pushdef([_m4_set([$1])], [$2])_m4_set_size([$1], [m4_incr])$3])]) # m4_set_add_all(SET, VALUE...) # ----------------------------- # Add each VALUE into SET. This is O(n) in the number of VALUEs, and # can be faster than calling m4_set_add for each VALUE. # # Implement two recursion helpers; the check variant is slower but # handles the case where an element has previously been removed but # not pruned. The recursion helpers ignore their second argument, so # that we can use the faster m4_shift2 and 2 arguments, rather than # _m4_shift2 and one argument, as the signal to end recursion. # # Please keep foreach.m4 in sync with any adjustments made here. m4_define([m4_set_add_all], [m4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1]) + m4_len(m4_ifdef([_m4_set_cleanup($1)], [_$0_check], [_$0])([$1], $@))))]) m4_define([_m4_set_add_all], [m4_if([$#], [2], [], [m4_ifdef([_m4_set([$1],$3)], [], [m4_define([_m4_set([$1],$3)], [1])m4_pushdef([_m4_set([$1])], [$3])-])$0([$1], m4_shift2($@))])]) m4_define([_m4_set_add_all_check], [m4_if([$#], [2], [], [m4_set_add([$1], [$3])$0([$1], m4_shift2($@))])]) # m4_set_contains(SET, VALUE, [IF-PRESENT], [IF-ABSENT]) # ------------------------------------------------------ # Expand IF-PRESENT if SET contains VALUE, otherwise expand IF-ABSENT. # This is always O(1). m4_define([m4_set_contains], [m4_ifdef([_m4_set_cleanup($1)], [m4_if(m4_ifdef([_m4_set([$1],$2)], [m4_indir([_m4_set([$1],$2)])], [0]), [1], [$3], [$4])], [m4_ifdef([_m4_set([$1],$2)], [$3], [$4])])]) # m4_set_contents(SET, [SEP]) # --------------------------- # Expand to a single string containing all the elements in SET, # separated by SEP, without modifying SET. No provision is made for # disambiguating set elements that contain non-empty SEP as a # sub-string, or for recognizing a set that contains only the empty # string. Order of the output is not guaranteed. If any elements # have been previously removed from the set, this action will prune # the unused memory. This is O(n) in the size of the set before # pruning. # # Use _m4_popdef for speed. The existence of _m4_set_cleanup($1) # determines which version of _1 helper we use. m4_define([m4_set_contents], [m4_set_map_sep([$1], [], [], [[$2]])]) # _m4_set_contents_1(SET) # _m4_set_contents_1c(SET) # _m4_set_contents_2(SET, [PRE], [POST], [SEP]) # --------------------------------------------- # Expand to a list of quoted elements currently in the set, each # surrounded by PRE and POST, and moving SEP in front of PRE on # recursion. To avoid nesting limit restrictions, the algorithm must # be broken into two parts; _1 destructively copies the stack in # reverse into _m4_set_($1), producing no output; then _2 # destructively copies _m4_set_($1) back into the stack in reverse. # If no elements were deleted, then this visits the set in the order # that elements were inserted. Behavior is undefined if PRE/POST/SEP # tries to recursively list or modify SET in any way other than # calling m4_set_remove on the current element. Use _1 if all entries # in the stack are guaranteed to be in the set, and _1c to prune # removed entries. Uses _m4_defn and _m4_popdef for speed. m4_define([_m4_set_contents_1], [_m4_stack_reverse([_m4_set([$1])], [_m4_set_($1)])]) m4_define([_m4_set_contents_1c], [m4_ifdef([_m4_set([$1])], [m4_set_contains([$1], _m4_defn([_m4_set([$1])]), [m4_pushdef([_m4_set_($1)], _m4_defn([_m4_set([$1])]))], [_m4_popdef([_m4_set([$1],]_m4_defn( [_m4_set([$1])])[)])])_m4_popdef([_m4_set([$1])])$0([$1])], [_m4_popdef([_m4_set_cleanup($1)])])]) m4_define([_m4_set_contents_2], [_m4_stack_reverse([_m4_set_($1)], [_m4_set([$1])], [$2[]_m4_defn([_m4_set_($1)])$3], [$4[]])]) # m4_set_delete(SET) # ------------------ # Delete all elements in SET, and reclaim any memory occupied by the # set. This is O(n) in the set size. # # Use _m4_defn and _m4_popdef for speed. m4_define([m4_set_delete], [m4_ifdef([_m4_set([$1])], [_m4_popdef([_m4_set([$1],]_m4_defn([_m4_set([$1])])[)], [_m4_set([$1])])$0([$1])], [m4_ifdef([_m4_set_cleanup($1)], [_m4_popdef([_m4_set_cleanup($1)])])m4_ifdef( [_m4_set_size($1)], [_m4_popdef([_m4_set_size($1)])])])]) # m4_set_difference(SET1, SET2) # ----------------------------- # Produce a LIST of quoted elements that occur in SET1 but not SET2. # Output a comma prior to any elements, to distinguish the empty # string from no elements. This can be directly used as a series of # arguments, such as for m4_join, or wrapped inside quotes for use in # m4_foreach. Order of the output is not guaranteed. # # Short-circuit the idempotence relation. m4_define([m4_set_difference], [m4_if([$1], [$2], [], [m4_set_map_sep([$1], [_$0([$2],], [)])])]) m4_define([_m4_set_difference], [m4_set_contains([$1], [$2], [], [,[$2]])]) # m4_set_dump(SET, [SEP]) # ----------------------- # Expand to a single string containing all the elements in SET, # separated by SEP, then delete SET. In general, if you only need to # list the contents once, this is faster than m4_set_contents. No # provision is made for disambiguating set elements that contain # non-empty SEP as a sub-string. Order of the output is not # guaranteed. This is O(n) in the size of the set before pruning. # # Use _m4_popdef for speed. Use existence of _m4_set_cleanup($1) to # decide if more expensive recursion is needed. m4_define([m4_set_dump], [m4_ifdef([_m4_set_size($1)], [_m4_popdef([_m4_set_size($1)])])m4_ifdef([_m4_set_cleanup($1)], [_$0_check], [_$0])([$1], [], [$2])]) # _m4_set_dump(SET, [SEP], [PREP]) # _m4_set_dump_check(SET, [SEP], [PREP]) # -------------------------------------- # Print SEP and the current element, then delete the element and # recurse with empty SEP changed to PREP. The check variant checks # whether the element has been previously removed. Use _m4_defn and # _m4_popdef for speed. m4_define([_m4_set_dump], [m4_ifdef([_m4_set([$1])], [[$2]_m4_defn([_m4_set([$1])])_m4_popdef([_m4_set([$1],]_m4_defn( [_m4_set([$1])])[)], [_m4_set([$1])])$0([$1], [$2$3])])]) m4_define([_m4_set_dump_check], [m4_ifdef([_m4_set([$1])], [m4_set_contains([$1], _m4_defn([_m4_set([$1])]), [[$2]_m4_defn([_m4_set([$1])])])_m4_popdef( [_m4_set([$1],]_m4_defn([_m4_set([$1])])[)], [_m4_set([$1])])$0([$1], [$2$3])], [_m4_popdef([_m4_set_cleanup($1)])])]) # m4_set_empty(SET, [IF-EMPTY], [IF-ELEMENTS]) # -------------------------------------------- # Expand IF-EMPTY if SET has no elements, otherwise IF-ELEMENTS. m4_define([m4_set_empty], [m4_ifdef([_m4_set_size($1)], [m4_if(m4_indir([_m4_set_size($1)]), [0], [$2], [$3])], [$2])]) # m4_set_foreach(SET, VAR, ACTION) # -------------------------------- # For each element of SET, define VAR to the element and expand # ACTION. ACTION should not recursively list SET's contents, add # elements to SET, nor delete any element from SET except the one # currently in VAR. The order that the elements are visited in is not # guaranteed. This is faster than the corresponding m4_foreach([VAR], # m4_indir([m4_dquote]m4_set_listc([SET])), [ACTION]) m4_define([m4_set_foreach], [m4_pushdef([$2])m4_set_map_sep([$1], [m4_define([$2],], [)$3])]) # m4_set_intersection(SET1, SET2) # ------------------------------- # Produce a LIST of quoted elements that occur in both SET1 or SET2. # Output a comma prior to any elements, to distinguish the empty # string from no elements. This can be directly used as a series of # arguments, such as for m4_join, or wrapped inside quotes for use in # m4_foreach. Order of the output is not guaranteed. # # Iterate over the smaller set, and short-circuit the idempotence # relation. m4_define([m4_set_intersection], [m4_if([$1], [$2], [m4_set_listc([$1])], m4_eval(m4_set_size([$2]) < m4_set_size([$1])), [1], [$0([$2], [$1])], [m4_set_map_sep([$1], [_$0([$2],], [)])])]) m4_define([_m4_set_intersection], [m4_set_contains([$1], [$2], [,[$2]])]) # m4_set_list(SET) # m4_set_listc(SET) # ----------------- # Produce a LIST of quoted elements of SET. This can be directly used # as a series of arguments, such as for m4_join or m4_set_add_all, or # wrapped inside quotes for use in m4_foreach or m4_map. With # m4_set_list, there is no way to distinguish an empty set from a set # containing only the empty string; with m4_set_listc, a leading comma # is output if there are any elements. m4_define([m4_set_list], [m4_set_map_sep([$1], [], [], [,])]) m4_define([m4_set_listc], [m4_set_map_sep([$1], [,])]) # m4_set_map(SET, ACTION) # ----------------------- # For each element of SET, expand ACTION with a single argument of the # current element. ACTION should not recursively list SET's contents, # add elements to SET, nor delete any element from SET except the one # passed as an argument. The order that the elements are visited in # is not guaranteed. This is faster than either of the corresponding # m4_map_args([ACTION]m4_set_listc([SET])) # m4_set_foreach([SET], [VAR], [ACTION(m4_defn([VAR]))]) m4_define([m4_set_map], [m4_set_map_sep([$1], [$2(], [)])]) # m4_set_map_sep(SET, [PRE], [POST], [SEP]) # ----------------------------------------- # For each element of SET, expand PRE[value]POST[], and expand SEP # between elements. m4_define([m4_set_map_sep], [m4_ifdef([_m4_set_cleanup($1)], [_m4_set_contents_1c], [_m4_set_contents_1])([$1])_m4_set_contents_2($@)]) # m4_set_remove(SET, VALUE, [IF-PRESENT], [IF-ABSENT]) # ---------------------------------------------------- # If VALUE is an element of SET, delete it and expand IF-PRESENT. # Otherwise expand IF-ABSENT. Deleting a single value is O(1), # although it leaves memory occupied until the next O(n) traversal of # the set which will compact the set. # # Optimize if the element being removed is the most recently added, # since defining _m4_set_cleanup($1) slows down so many other macros. # In particular, this plays well with m4_set_foreach and m4_set_map. m4_define([m4_set_remove], [m4_set_contains([$1], [$2], [_m4_set_size([$1], [m4_decr])m4_if(_m4_defn([_m4_set([$1])]), [$2], [_m4_popdef([_m4_set([$1],$2)], [_m4_set([$1])])], [m4_define([_m4_set_cleanup($1)])m4_define( [_m4_set([$1],$2)], [0])])$3], [$4])]) # m4_set_size(SET) # ---------------- # Expand to the number of elements currently in SET. This operation # is O(1), and thus more efficient than m4_count(m4_set_list([SET])). m4_define([m4_set_size], [m4_ifdef([_m4_set_size($1)], [m4_indir([_m4_set_size($1)])], [0])]) # _m4_set_size(SET, ACTION) # ------------------------- # ACTION must be either m4_incr or m4_decr, and the size of SET is # changed accordingly. If the set is empty, ACTION must not be # m4_decr. m4_define([_m4_set_size], [m4_define([_m4_set_size($1)], m4_ifdef([_m4_set_size($1)], [$2(m4_indir([_m4_set_size($1)]))], [1]))]) # m4_set_union(SET1, SET2) # ------------------------ # Produce a LIST of double quoted elements that occur in either SET1 # or SET2, without duplicates. Output a comma prior to any elements, # to distinguish the empty string from no elements. This can be # directly used as a series of arguments, such as for m4_join, or # wrapped inside quotes for use in m4_foreach. Order of the output is # not guaranteed. # # We can rely on the fact that m4_set_listc prunes SET1, so we don't # need to check _m4_set([$1],element) for 0. Short-circuit the # idempotence relation. m4_define([m4_set_union], [m4_set_listc([$1])m4_if([$1], [$2], [], [m4_set_map_sep([$2], [_$0([$1],], [)])])]) m4_define([_m4_set_union], [m4_ifdef([_m4_set([$1],$2)], [], [,[$2]])]) ## ------------------- ## ## 16. File handling. ## ## ------------------- ## # It is a real pity that M4 comes with no macros to bind a diversion # to a file. So we have to deal without, which makes us a lot more # fragile than we should. # m4_file_append(FILE-NAME, CONTENT) # ---------------------------------- m4_define([m4_file_append], [m4_syscmd([cat >>$1 <<_m4eof $2 _m4eof ]) m4_if(m4_sysval, [0], [], [m4_fatal([$0: cannot write: $1])])]) ## ------------------------ ## ## 17. Setting M4sugar up. ## ## ------------------------ ## # _m4_divert_diversion should be defined. m4_divert_push([KILL]) # m4_init # ------- # Initialize the m4sugar language. m4_define([m4_init], [# All the M4sugar macros start with `m4_', except `dnl' kept as is # for sake of simplicity. m4_pattern_forbid([^_?m4_]) m4_pattern_forbid([^dnl$]) # If __m4_version__ is defined, we assume that we are being run by M4 # 1.6 or newer, thus $@ recursion is linear, and debugmode(+do) # is available for faster checks of dereferencing undefined macros # and forcing dumpdef to print to stderr regardless of debugfile. # But if it is missing, we assume we are being run by M4 1.4.x, that # $@ recursion is quadratic, and that we need foreach-based # replacement macros. Also, m4 prior to 1.4.8 loses track of location # during m4wrap text; __line__ should never be 0. # # Use the raw builtin to avoid tripping up include tracing. # Meanwhile, avoid m4_copy, since it temporarily undefines m4_defn. m4_ifdef([__m4_version__], [m4_debugmode([+do]) m4_define([m4_defn], _m4_defn([_m4_defn])) m4_define([m4_dumpdef], _m4_defn([_m4_dumpdef])) m4_define([m4_popdef], _m4_defn([_m4_popdef])) m4_define([m4_undefine], _m4_defn([_m4_undefine]))], [m4_builtin([include], [m4sugar/foreach.m4]) m4_wrap_lifo([m4_if(__line__, [0], [m4_pushdef([m4_location], ]]m4_dquote(m4_dquote(m4_dquote(__file__:__line__)))[[)])])]) # Rewrite the first entry of the diversion stack. m4_divert([KILL]) # Check the divert push/pop perfect balance. # Some users are prone to also use m4_wrap to register last-minute # m4_divert_text; so after our diversion cleanups, we restore # KILL as the bottom of the diversion stack. m4_wrap([m4_popdef([_m4_divert_diversion])m4_ifdef( [_m4_divert_diversion], [m4_fatal([$0: unbalanced m4_divert_push: ]m4_divert_stack)])_m4_popdef([_m4_divert_stack])m4_divert_push([KILL])]) ]) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/m4sugar/Makefile.am�������������������������������������������������0000644�0001750�0001750�00000004650�11202536434�020430� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Make Autoconf library for M4sugar. # Copyright (C) 2001, 2002, 2006, 2007, 2008, 2009 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 3 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, see <http://www.gnu.org/licenses/>. m4sugarlibdir = $(pkgdatadir)/m4sugar dist_m4sugarlib_DATA = m4sugar.m4 foreach.m4 m4sh.m4 nodist_m4sugarlib_DATA = version.m4 m4sugar.m4f m4sh.m4f CLEANFILES = $(nodist_m4sugarlib_DATA) # Get the release year from ../ChangeLog. RELEASE_YEAR = \ `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog` ## ------------ ## ## version.m4. ## ## ------------ ## # The `:;' works around a redirected compound command bash exit status bug. version.m4: Makefile :;{ \ echo '# This file is part of -*- Autoconf -*-.' && \ echo '# Version of Autoconf.' && \ echo '# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2007, 2009' && \ echo '# Free Software Foundation, Inc.' && \ echo &&\ echo 'm4_define([m4_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \ echo 'm4_define([m4_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \ echo 'm4_define([m4_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \ echo 'm4_define([m4_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \ echo 'm4_define([m4_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \ echo 'm4_define([m4_PACKAGE_URL], [$(PACKAGE_URL)])' && \ echo 'm4_define([m4_PACKAGE_YEAR], ['$(RELEASE_YEAR)'])'; \ } > $@-t mv $@-t $@ ## --------------- ## ## Building TAGS. ## ## --------------- ## TAGS_FILES = $(dist_m4sugarlib_DATA) ETAGS_ARGS = $(ETAGS_FOR_AUTOCONF) ## -------- ## ## Checks. ## ## -------- ## check-local: check-forbidden-patterns forbidden_patterns = -e '^_*EOF' -e ' cmp ' forbidden_patterns_files = $(dist_m4sugarlib_DATA) ## ------------------ ## ## The frozen files. ## ## ------------------ ## m4sugar.m4f: $(m4sugar_m4f_dependencies) m4sh.m4f: $(m4sh_m4f_dependencies) include ../freeze.mk ����������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/m4sugar/Makefile.in�������������������������������������������������0000644�0001750�0001750�00000047162�11233217355�020450� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # Make Autoconf library for M4sugar. # Copyright (C) 2001, 2002, 2006, 2007, 2008, 2009 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 3 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, see <http://www.gnu.org/licenses/>. # Freeze M4 files. # Copyright (C) 2002, 2004, 2006, 2007, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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_m4sugarlib_DATA) $(srcdir)/../freeze.mk \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in subdir = lib/m4sugar ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(m4sugarlibdir)" \ "$(DESTDIR)$(m4sugarlibdir)" DATA = $(dist_m4sugarlib_DATA) $(nodist_m4sugarlib_DATA) ETAGS = etags CTAGS = ctags 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ m4sugarlibdir = $(pkgdatadir)/m4sugar dist_m4sugarlib_DATA = m4sugar.m4 foreach.m4 m4sh.m4 nodist_m4sugarlib_DATA = version.m4 m4sugar.m4f m4sh.m4f CLEANFILES = $(nodist_m4sugarlib_DATA) # Get the release year from ../ChangeLog. RELEASE_YEAR = \ `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog` TAGS_FILES = $(dist_m4sugarlib_DATA) ETAGS_ARGS = $(ETAGS_FOR_AUTOCONF) forbidden_patterns = -e '^_*EOF' -e ' cmp ' forbidden_patterns_files = $(dist_m4sugarlib_DATA) SUFFIXES = .m4 .m4f AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg # Do not use AUTOM4TE here, since maint.mk (my-distcheck) # checks if we are independent of Autoconf by defining AUTOM4TE (and # others) to `false'. Autoconf provides autom4te, so that doesn't # apply to us. MY_AUTOM4TE = \ autom4te_perllibdir='$(top_srcdir)'/lib \ AUTOM4TE_CFG='$(AUTOM4TE_CFG)' $(top_builddir)/bin/autom4te \ -B '$(top_builddir)'/lib -B '$(top_srcdir)'/lib # keep ` ' # 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 = $(top_builddir)/bin/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/erlang.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: $(srcdir)/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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/m4sugar/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/m4sugar/Makefile .PRECIOUS: 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 $(am__aclocal_m4_deps): install-dist_m4sugarlibDATA: $(dist_m4sugarlib_DATA) @$(NORMAL_INSTALL) test -z "$(m4sugarlibdir)" || $(MKDIR_P) "$(DESTDIR)$(m4sugarlibdir)" @list='$(dist_m4sugarlib_DATA)'; test -n "$(m4sugarlibdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4sugarlibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(m4sugarlibdir)" || exit $$?; \ done uninstall-dist_m4sugarlibDATA: @$(NORMAL_UNINSTALL) @list='$(dist_m4sugarlib_DATA)'; test -n "$(m4sugarlibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(m4sugarlibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(m4sugarlibdir)" && rm -f $$files install-nodist_m4sugarlibDATA: $(nodist_m4sugarlib_DATA) @$(NORMAL_INSTALL) test -z "$(m4sugarlibdir)" || $(MKDIR_P) "$(DESTDIR)$(m4sugarlibdir)" @list='$(nodist_m4sugarlib_DATA)'; test -n "$(m4sugarlibdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4sugarlibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(m4sugarlibdir)" || exit $$?; \ done uninstall-nodist_m4sugarlibDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_m4sugarlib_DATA)'; test -n "$(m4sugarlibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(m4sugarlibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(m4sugarlibdir)" && rm -f $$files 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: for dir in "$(DESTDIR)$(m4sugarlibdir)" "$(DESTDIR)$(m4sugarlibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-am info-am: install-data-am: install-dist_m4sugarlibDATA \ install-nodist_m4sugarlibDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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_m4sugarlibDATA \ uninstall-nodist_m4sugarlibDATA .MAKE: check-am install-am install-strip .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_m4sugarlibDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nodist_m4sugarlibDATA install-pdf install-pdf-am \ install-ps install-ps-am 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_m4sugarlibDATA uninstall-nodist_m4sugarlibDATA # The `:;' works around a redirected compound command bash exit status bug. version.m4: Makefile :;{ \ echo '# This file is part of -*- Autoconf -*-.' && \ echo '# Version of Autoconf.' && \ echo '# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2007, 2009' && \ echo '# Free Software Foundation, Inc.' && \ echo &&\ echo 'm4_define([m4_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \ echo 'm4_define([m4_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \ echo 'm4_define([m4_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \ echo 'm4_define([m4_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \ echo 'm4_define([m4_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \ echo 'm4_define([m4_PACKAGE_URL], [$(PACKAGE_URL)])' && \ echo 'm4_define([m4_PACKAGE_YEAR], ['$(RELEASE_YEAR)'])'; \ } > $@-t mv $@-t $@ check-local: check-forbidden-patterns m4sugar.m4f: $(m4sugar_m4f_dependencies) m4sh.m4f: $(m4sh_m4f_dependencies) $(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 an 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: |" <forbidden.log >&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.64_2.64+dfsg.orig/lib/m4sugar/foreach.m4��������������������������������������������������0000644�0001750�0001750�00000037343�11202536434�020252� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- Autoconf -*- # This file is part of Autoconf. # foreach-based replacements for recursive functions. # Speeds up GNU M4 1.4.x by avoiding quadratic $@ recursion, but penalizes # GNU M4 1.6 by requiring more memory and macro expansions. # # Copyright (C) 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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 Eric Blake. # # In M4 1.4.x, every byte of $@ is rescanned. This means that an # algorithm on n arguments that recurses with one less argument each # iteration will scan n * (n + 1) / 2 arguments, for O(n^2) time. In # M4 1.6, this was fixed so that $@ is only scanned once, then # back-references are made to information stored about the scan. # Thus, n iterations need only scan n arguments, for O(n) time. # Additionally, in M4 1.4.x, recursive algorithms did not clean up # memory very well, requiring O(n^2) memory rather than O(n) for n # iterations. # # This file is designed to overcome the quadratic nature of $@ # recursion by writing a variant of m4_foreach that uses m4_for rather # than $@ recursion to operate on the list. This involves more macro # expansions, but avoids the need to rescan a quadratic number of # arguments, making these replacements very attractive for M4 1.4.x. # On the other hand, in any version of M4, expanding additional macros # costs additional time; therefore, in M4 1.6, where $@ recursion uses # fewer macros, these replacements actually pessimize performance. # Additionally, the use of $10 to mean the tenth argument violates # POSIX; although all versions of m4 1.4.x support this meaning, a # future m4 version may switch to take it as the first argument # concatenated with a literal 0, so the implementations in this file # are not future-proof. Thus, this file is conditionally included as # part of m4_init(), only when it is detected that M4 probably has # quadratic behavior (ie. it lacks the macro __m4_version__). # # Please keep this file in sync with m4sugar.m4. # _m4_foreach(PRE, POST, IGNORED, ARG...) # --------------------------------------- # Form the common basis of the m4_foreach and m4_map macros. For each # ARG, expand PRE[ARG]POST[]. The IGNORED argument makes recursion # easier, and must be supplied rather than implicit. # # This version minimizes the number of times that $@ is evaluated by # using m4_for to generate a boilerplate into _m4_f then passing $@ to # that temporary macro. Thus, the recursion is done in m4_for without # reparsing any user input, and is not quadratic. For an idea of how # this works, note that m4_foreach(i,[1,2],[i]) calls # _m4_foreach([m4_define([i],],[)i],[],[1],[2]) # which defines _m4_f: # $1[$4]$2[]$1[$5]$2[]_m4_popdef([_m4_f]) # then calls _m4_f([m4_define([i],],[)i],[],[1],[2]) for a net result: # m4_define([i],[1])i[]m4_define([i],[2])i[]_m4_popdef([_m4_f]). m4_define([_m4_foreach], [m4_if([$#], [3], [], [m4_pushdef([_m4_f], _m4_for([4], [$#], [1], [$0_([1], [2],], [)])[_m4_popdef([_m4_f])])_m4_f($@)])]) m4_define([_m4_foreach_], [[$$1[$$3]$$2[]]]) # m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT) # ----------------------------------------------------------- # Find the first VAL that SWITCH matches, and expand the corresponding # IF-VAL. If there are no matches, expand DEFAULT. # # Use m4_for to create a temporary macro in terms of a boilerplate # m4_if with final cleanup. If $# is even, we have DEFAULT; if it is # odd, then rounding the last $# up in the temporary macro is # harmless. For example, both m4_case(1,2,3,4,5) and # m4_case(1,2,3,4,5,6) result in the intermediate _m4_case being # m4_if([$1],[$2],[$3],[$1],[$4],[$5],_m4_popdef([_m4_case])[$6]) m4_define([m4_case], [m4_if(m4_eval([$# <= 2]), [1], [$2], [m4_pushdef([_$0], [m4_if(]_m4_for([2], m4_eval([($# - 1) / 2 * 2]), [2], [_$0_(], [)])[_m4_popdef( [_$0])]m4_dquote($m4_eval([($# + 1) & ~1]))[)])_$0($@)])]) m4_define([_m4_case_], [$0_([1], [$1], m4_incr([$1]))]) m4_define([_m4_case__], [[[$$1],[$$2],[$$3],]]) # m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT) # ----------------------------------------------------- # m4 equivalent of # # if (SWITCH =~ RE1) # VAL1; # elif (SWITCH =~ RE2) # VAL2; # elif ... # ... # else # DEFAULT # # We build the temporary macro _m4_b: # m4_define([_m4_b], _m4_defn([_m4_bmatch]))_m4_b([$1], [$2], [$3])... # _m4_b([$1], [$m-1], [$m])_m4_b([], [], [$m+1]_m4_popdef([_m4_b])) # then invoke m4_unquote(_m4_b($@)), for concatenation with later text. m4_define([m4_bmatch], [m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])], [$#], 1, [m4_fatal([$0: too few arguments: $#: $1])], [$#], 2, [$2], [m4_pushdef([_m4_b], [m4_define([_m4_b], _m4_defn([_$0]))]_m4_for([3], m4_eval([($# + 1) / 2 * 2 - 1]), [2], [_$0_(], [)])[_m4_b([], [],]m4_dquote([$]m4_eval( [($# + 1) / 2 * 2]))[_m4_popdef([_m4_b]))])m4_unquote(_m4_b($@))])]) m4_define([_m4_bmatch], [m4_if(m4_bregexp([$1], [$2]), [-1], [], [[$3]m4_define([$0])])]) m4_define([_m4_bmatch_], [$0_([1], m4_decr([$1]), [$1])]) m4_define([_m4_bmatch__], [[_m4_b([$$1], [$$2], [$$3])]]) # m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT]) # ------------------------------------------------------------------- # Similar to m4_if, except that each TEST is expanded when encountered. # If the expansion of TESTn matches the string VALn, the result is IF-VALn. # The result is DEFAULT if no tests passed. This macro allows # short-circuiting of expensive tests, where it pays to arrange quick # filter tests to run first. # # m4_cond already guarantees either 3*n or 3*n + 1 arguments, 1 <= n. # We only have to speed up _m4_cond, by building the temporary _m4_c: # m4_define([_m4_c], _m4_defn([m4_unquote]))_m4_c([m4_if(($1), [($2)], # [[$3]m4_define([_m4_c])])])_m4_c([m4_if(($4), [($5)], # [[$6]m4_define([_m4_c])])])..._m4_c([m4_if(($m-2), [($m-1)], # [[$m]m4_define([_m4_c])])])_m4_c([[$m+1]]_m4_popdef([_m4_c])) # We invoke m4_unquote(_m4_c($@)), for concatenation with later text. m4_define([_m4_cond], [m4_pushdef([_m4_c], [m4_define([_m4_c], _m4_defn([m4_unquote]))]_m4_for([2], m4_eval([$# / 3 * 3 - 1]), [3], [$0_(], [)])[_m4_c(]m4_dquote(m4_dquote( [$]m4_eval([$# / 3 * 3 + 1])))[_m4_popdef([_m4_c]))])m4_unquote(_m4_c($@))]) m4_define([_m4_cond_], [$0_(m4_decr([$1]), [$1], m4_incr([$1]))]) m4_define([_m4_cond__], [[_m4_c([m4_if(($$1), [($$2)], [[$$3]m4_define([_m4_c])])])]]) # m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...) # ---------------------------------------------------- # m4 equivalent of # # $_ = STRING; # s/RE1/SUBST1/g; # s/RE2/SUBST2/g; # ... # # m4_bpatsubsts already validated an odd number of arguments; we only # need to speed up _m4_bpatsubsts. To avoid nesting, we build the # temporary _m4_p: # m4_define([_m4_p], [$1])m4_define([_m4_p], # m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$2], [$3]))m4_define([_m4_p], # m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$4], [$5]))m4_define([_m4_p],... # m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$m-1], [$m]))m4_unquote( # _m4_defn([_m4_p])_m4_popdef([_m4_p])) m4_define([_m4_bpatsubsts], [m4_pushdef([_m4_p], [m4_define([_m4_p], ]m4_dquote([$]1)[)]_m4_for([3], [$#], [2], [$0_(], [)])[m4_unquote(_m4_defn([_m4_p])_m4_popdef([_m4_p]))])_m4_p($@)]) m4_define([_m4_bpatsubsts_], [$0_(m4_decr([$1]), [$1])]) m4_define([_m4_bpatsubsts__], [[m4_define([_m4_p], m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$$1], [$$2]))]]) # m4_shiftn(N, ...) # ----------------- # Returns ... shifted N times. Useful for recursive "varargs" constructs. # # m4_shiftn already validated arguments; we only need to speed up # _m4_shiftn. If N is 3, then we build the temporary _m4_s, defined as # ,[$5],[$6],...,[$m]_m4_popdef([_m4_s]) # before calling m4_shift(_m4_s($@)). m4_define([_m4_shiftn], [m4_if(m4_incr([$1]), [$#], [], [m4_pushdef([_m4_s], _m4_for(m4_eval([$1 + 2]), [$#], [1], [[,]m4_dquote($], [)])[_m4_popdef([_m4_s])])m4_shift(_m4_s($@))])]) # m4_do(STRING, ...) # ------------------ # This macro invokes all its arguments (in sequence, of course). It is # useful for making your macros more structured and readable by dropping # unnecessary dnl's and have the macros indented properly. # # Here, we use the temporary macro _m4_do, defined as # $1[]$2[]...[]$n[]_m4_popdef([_m4_do]) m4_define([m4_do], [m4_if([$#], [0], [], [m4_pushdef([_$0], _m4_for([1], [$#], [1], [$], [[[]]])[_m4_popdef([_$0])])_$0($@)])]) # m4_dquote_elt(ARGS) # ------------------- # Return ARGS as an unquoted list of double-quoted arguments. # # _m4_foreach to the rescue. m4_define([m4_dquote_elt], [m4_if([$#], [0], [], [[[$1]]_m4_foreach([,m4_dquote(], [)], $@)])]) # m4_reverse(ARGS) # ---------------- # Output ARGS in reverse order. # # Invoke _m4_r($@) with the temporary _m4_r built as # [$m], [$m-1], ..., [$2], [$1]_m4_popdef([_m4_r]) m4_define([m4_reverse], [m4_if([$#], [0], [], [$#], [1], [[$1]], [m4_pushdef([_m4_r], [[$$#]]_m4_for(m4_decr([$#]), [1], [-1], [[, ]m4_dquote($], [)])[_m4_popdef([_m4_r])])_m4_r($@)])]) # m4_map_args_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...) # ------------------------------------------------------------- # Perform a pairwise grouping of consecutive ARGs, by expanding # EXPRESSION([ARG1], [ARG2]). If there are an odd number of ARGs, the # final argument is expanded with END-EXPR([ARGn]). # # Build the temporary macro _m4_map_args_pair, with the $2([$m+1]) # only output if $# is odd: # $1([$3], [$4])[]$1([$5], [$6])[]...$1([$m-1], # [$m])[]m4_default([$2], [$1])([$m+1])[]_m4_popdef([_m4_map_args_pair]) m4_define([m4_map_args_pair], [m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])], [$#], [1], [m4_fatal([$0: too few arguments: $#: $1])], [$#], [2], [], [$#], [3], [m4_default([$2], [$1])([$3])[]], [m4_pushdef([_$0], _m4_for([3], m4_eval([$# / 2 * 2 - 1]), [2], [_$0_(], [)])_$0_end( [1], [2], [$#])[_m4_popdef([_$0])])_$0($@)])]) m4_define([_m4_map_args_pair_], [$0_([1], [$1], m4_incr([$1]))]) m4_define([_m4_map_args_pair__], [[$$1([$$2], [$$3])[]]]) m4_define([_m4_map_args_pair_end], [m4_if(m4_eval([$3 & 1]), [1], [[m4_default([$$2], [$$1])([$$3])[]]])]) # m4_join(SEP, ARG1, ARG2...) # --------------------------- # Produce ARG1SEPARG2...SEPARGn. Avoid back-to-back SEP when a given ARG # is the empty string. No expansion is performed on SEP or ARGs. # # Use a self-modifying separator, since we don't know how many # arguments might be skipped before a separator is first printed, but # be careful if the separator contains $. _m4_foreach to the rescue. m4_define([m4_join], [m4_pushdef([_m4_sep], [m4_define([_m4_sep], _m4_defn([m4_echo]))])]dnl [_m4_foreach([_$0([$1],], [)], $@)_m4_popdef([_m4_sep])]) m4_define([_m4_join], [m4_if([$2], [], [], [_m4_sep([$1])[$2]])]) # m4_joinall(SEP, ARG1, ARG2...) # ------------------------------ # Produce ARG1SEPARG2...SEPARGn. An empty ARG results in back-to-back SEP. # No expansion is performed on SEP or ARGs. # # A bit easier than m4_join. _m4_foreach to the rescue. m4_define([m4_joinall], [[$2]m4_if(m4_eval([$# <= 2]), [1], [], [_m4_foreach([$1], [], m4_shift($@))])]) # m4_list_cmp(A, B) # ----------------- # Compare the two lists of integer expressions A and B. # # m4_list_cmp takes care of any side effects; we only override # _m4_list_cmp_raw, where we can safely expand lists multiple times. # First, insert padding so that both lists are the same length; the # trailing +0 is necessary to handle a missing list. Next, create a # temporary macro to perform pairwise comparisons until an inequality # is found. For example, m4_list_cmp([1], [1,2]) creates _m4_cmp as # m4_if(m4_eval([($1) != ($3)]), [1], [m4_cmp([$1], [$3])], # m4_eval([($2) != ($4)]), [1], [m4_cmp([$2], [$4])], # [0]_m4_popdef([_m4_cmp])) # then calls _m4_cmp([1+0], [0*2], [1], [2+0]) m4_define([_m4_list_cmp_raw], [m4_if([$1], [$2], 0, [_m4_list_cmp($1+0_m4_list_pad(m4_count($1), m4_count($2)), $2+0_m4_list_pad(m4_count($2), m4_count($1)))])]) m4_define([_m4_list_pad], [m4_if(m4_eval($1 < $2), [1], [_m4_for(m4_incr([$1]), [$2], [1], [,0*])])]) m4_define([_m4_list_cmp], [m4_pushdef([_m4_cmp], [m4_if(]_m4_for( [1], m4_eval([$# >> 1]), [1], [$0_(], [,]m4_eval([$# >> 1])[)])[ [0]_m4_popdef([_m4_cmp]))])_m4_cmp($@)]) m4_define([_m4_list_cmp_], [$0_([$1], m4_eval([$1 + $2]))]) m4_define([_m4_list_cmp__], [[m4_eval([($$1) != ($$2)]), [1], [m4_cmp([$$1], [$$2])], ]]) # m4_max(EXPR, ...) # m4_min(EXPR, ...) # ----------------- # Return the decimal value of the maximum (or minimum) in a series of # integer expressions. # # _m4_foreach to the rescue; we only need to replace _m4_minmax. Here, # we need a temporary macro to track the best answer so far, so that # the foreach expression is tractable. m4_define([_m4_minmax], [m4_pushdef([_m4_best], m4_eval([$2]))_m4_foreach( [m4_define([_m4_best], $1(_m4_best,], [))], m4_shift($@))]dnl [_m4_best[]_m4_popdef([_m4_best])]) # m4_set_add_all(SET, VALUE...) # ----------------------------- # Add each VALUE into SET. This is O(n) in the number of VALUEs, and # can be faster than calling m4_set_add for each VALUE. # # _m4_foreach to the rescue. If no deletions have occurred, then # avoid the speed penalty of m4_set_add. m4_define([m4_set_add_all], [m4_if([$#], [0], [], [$#], [1], [], [m4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1]) + m4_len(_m4_foreach(m4_ifdef([_m4_set_cleanup($1)], [[m4_set_add]], [[_$0]])[([$1],], [)], $@))))])]) m4_define([_m4_set_add_all], [m4_ifdef([_m4_set([$1],$2)], [], [m4_define([_m4_set([$1],$2)], [1])m4_pushdef([_m4_set([$1])], [$2])-])]) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/m4sugar/m4sh.m4�����������������������������������������������������0000644�0001750�0001750�00000213565�11232454271�017521� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # M4 sugar for common shell constructs. # Requires GNU M4 and M4sugar. # # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, # 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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, Pavel Roskin, Alexandre Oliva, Lars J. Aas # and many other people. # We heavily use m4's diversions both for the initializations and for # required macros, because in both cases we have to issue soon in # output something which is discovered late. # # # KILL is only used to suppress output. # # - BINSH # AC_REQUIRE'd #! /bin/sh line # - HEADER-REVISION # RCS keywords etc. # - HEADER-COMMENT # Purpose of the script etc. # - HEADER-COPYRIGHT # Copyright notice(s) # - M4SH-SANITIZE # M4sh's shell setup # - M4SH-INIT-FN # M4sh initialization (shell functions) # - M4SH-INIT # M4sh initialization (detection code) # - BODY # The body of the script. # _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'! m4_define([_m4_divert(BINSH)], 0) m4_define([_m4_divert(HEADER-REVISION)], 1) m4_define([_m4_divert(HEADER-COMMENT)], 2) m4_define([_m4_divert(HEADER-COPYRIGHT)], 3) m4_define([_m4_divert(M4SH-SANITIZE)], 4) m4_define([_m4_divert(M4SH-INIT-FN)], 5) m4_define([_m4_divert(M4SH-INIT)], 6) m4_define([_m4_divert(BODY)], 1000) # Aaarg. Yet it starts with compatibility issues... Libtool wants to # use NOTICE to insert its own LIBTOOL-INIT stuff. People should ask # before diving into our internals :( m4_copy([_m4_divert(M4SH-INIT)], [_m4_divert(NOTICE)]) ## ------------------------- ## ## 1. Sanitizing the shell. ## ## ------------------------- ## # Please maintain lexicographic sorting of this section, ignoring leading _. # AS_BOURNE_COMPATIBLE # -------------------- # Try to be as Bourne and/or POSIX as possible. # # This does not set BIN_SH, due to the problems described in # <http://lists.gnu.org/archive/html/autoconf-patches/2006-03/msg00081.html>. # People who need BIN_SH should set it in their environment before invoking # configure; apparently this would include UnixWare, as described in # <http://lists.gnu.org/archive/html/bug-autoconf/2006-06/msg00025.html>. m4_define([AS_BOURNE_COMPATIBLE], [# Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh _$0 ]) # _AS_BOURNE_COMPATIBLE # --------------------- # This is the part of AS_BOURNE_COMPATIBLE which has to be repeated inside # each instance. m4_define([_AS_BOURNE_COMPATIBLE], [AS_IF([test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1], [emulate sh NULLCMD=: [#] Pre-4.2 versions of Zsh do word splitting on ${1+"$[@]"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$[@]"}'='"$[@]"' setopt NO_GLOB_SUBST], [AS_CASE([`(set -o) 2>/dev/null`], [*posix*], [set -o posix])]) ]) # _AS_CLEANUP # ----------- # Expanded as the last thing before m4sugar cleanup begins. Macros # may append m4sh cleanup hooks to this as appropriate. m4_define([_AS_CLEANUP], [m4_divert_text([M4SH-SANITIZE], [_AS_DETECT_BETTER_SHELL])]) # AS_COPYRIGHT(TEXT) # ------------------ # Emit TEXT, a copyright notice, as a shell comment near the top of the # script. TEXT is evaluated once; to accomplish that, we do not prepend # `# ' but `@%:@ '. m4_define([AS_COPYRIGHT], [m4_divert_text([HEADER-COPYRIGHT], [m4_bpatsubst([ $1], [^], [@%:@ ])])]) # _AS_DETECT_EXPAND(VAR, SET) # --------------------------- # Assign the contents of VAR from the contents of SET, expanded in such # a manner that VAR can be passed to _AS_RUN. In order to make # _AS_LINENO_WORKS operate correctly, we must specially handle the # first instance of $LINENO within any line being expanded (the first # instance is important to tests using the current shell, leaving # remaining instances for tests using a candidate shell). Bash loses # track of line numbers if a double quote contains a newline, hence, # we must piece-meal the assignment of VAR such that $LINENO expansion # occurs in a single line. m4_define([_AS_DETECT_EXPAND], [$1="m4_bpatsubst(m4_dquote(AS_ESCAPE(_m4_expand(m4_set_contents([$2], [ ])))), [\\\$LINENO\(.*\)$], [";$1=$$1$LINENO;$1=$$1"\1])"]) # _AS_DETECT_REQUIRED(TEST) # ------------------------- # Refuse to execute under a shell that does not pass the given TEST. # Does not do AS_REQUIRE for the better-shell detection code. # # M4sh should never require something not required by POSIX, although # other clients are free to do so. m4_defun([_AS_DETECT_REQUIRED], [m4_set_add([_AS_DETECT_REQUIRED_BODY], [$1 || AS_EXIT])]) # _AS_DETECT_SUGGESTED(TEST) # -------------------------- # Prefer to execute under a shell that passes the given TEST. # Does not do AS_REQUIRE for the better-shell detection code. # # M4sh should never suggest something not required by POSIX, although # other clients are free to do so. m4_defun([_AS_DETECT_SUGGESTED], [m4_set_add([_AS_DETECT_SUGGESTED_BODY], [$1 || AS_EXIT])]) # _AS_DETECT_SUGGESTED_PRUNE(TEST) # -------------------------------- # If TEST is also a required test, remove it from the set of suggested tests. m4_define([_AS_DETECT_SUGGESTED_PRUNE], [m4_set_contains([_AS_DETECT_REQUIRED_BODY], [$1], [m4_set_remove([_AS_DETECT_SUGGESTED_BODY], [$1])])]) # _AS_DETECT_BETTER_SHELL # ----------------------- # The real workhorse for detecting a shell with the correct # features. # # In previous versions, we prepended /usr/posix/bin to the path, but that # caused a regression on OpenServer 6.0.0 # <http://lists.gnu.org/archive/html/bug-autoconf/2006-06/msg00017.html> # and on HP-UX 11.11, see the failure of test 120 in # <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00003.html> # # FIXME: The code should test for the OSF bug described in # <http://lists.gnu.org/archive/html/autoconf-patches/2006-03/msg00081.html>. # # This code is run outside any trap 0 context, hence we can simplify AS_EXIT. m4_defun([_AS_DETECT_BETTER_SHELL], dnl Remove any tests from suggested that are also required [m4_set_map([_AS_DETECT_SUGGESTED_BODY], [_AS_DETECT_SUGGESTED_PRUNE])]dnl [m4_pushdef([AS_EXIT], [exit m4_default(]m4_dquote([$][1])[, 1)])]dnl [if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="AS_ESCAPE(_m4_expand([_AS_BOURNE_COMPATIBLE]))" _AS_DETECT_EXPAND([as_required], [_AS_DETECT_REQUIRED_BODY]) _AS_DETECT_EXPAND([as_suggested], [_AS_DETECT_SUGGESTED_BODY]) AS_IF([_AS_RUN(["$as_required"])], [as_have_required=yes], [as_have_required=no]) AS_IF([test x$as_have_required = xyes && _AS_RUN(["$as_suggested"])], [], [_AS_PATH_WALK([/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH], [case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base AS_IF([{ test -f "$as_shell" || test -f "$as_shell.exe"; } && _AS_RUN(["$as_required"], ["$as_shell"])], [CONFIG_SHELL=$as_shell as_have_required=yes m4_set_empty([_AS_DETECT_SUGGESTED_BODY], [break 2], [AS_IF([_AS_RUN(["$as_suggested"], ["$as_shell"])], [break 2])])]) done;; esac], [AS_IF([{ test -f "$SHELL" || test -f "$SHELL.exe"; } && _AS_RUN(["$as_required"], ["$SHELL"])], [CONFIG_SHELL=$SHELL as_have_required=yes])]) AS_IF([test "x$CONFIG_SHELL" != x], [# We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$[@]"}]) dnl Unfortunately, $as_me isn't available here. AS_IF([test x$as_have_required = xno], [AS_ECHO(["$[]0: This script requires a shell more modern than all"]) AS_ECHO(["$[]0: the shells that I found on your system."]) if test x${ZSH_VERSION+set} = xset ; then AS_ECHO(["$[]0: In particular, zsh $ZSH_VERSION has bugs and should"]) AS_ECHO(["$[]0: be upgraded to zsh 4.3.4 or later."]) else AS_ECHO("m4_text_wrap([Please tell ]_m4_defn([m4_PACKAGE_BUGREPORT]) m4_ifset([AC_PACKAGE_BUGREPORT], [m4_if(_m4_defn([m4_PACKAGE_BUGREPORT]), _m4_defn([AC_PACKAGE_BUGREPORT]), [], [and _m4_defn([AC_PACKAGE_BUGREPORT])])]) [about your system, including any error possibly output before this message. Then install a modern shell, or manually run the script under such a shell if you do have one.], [$[]0: ], [], [62])") fi AS_EXIT])]) fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS _m4_popdef([AS_EXIT])])# _AS_DETECT_BETTER_SHELL # _AS_PREPARE # ----------- # This macro has a very special status. Normal use of M4sh relies # heavily on AS_REQUIRE, so that needed initializations (such as # _AS_TEST_PREPARE) are performed on need, not on demand. But # Autoconf is the first client of M4sh, and for two reasons: configure # and config.status. Relying on AS_REQUIRE is of course fine for # configure, but fails for config.status (which is created by # configure). So we need a means to force the inclusion of the # various _AS_*_PREPARE on top of config.status. That's basically why # there are so many _AS_*_PREPARE below, and that's also why it is # important not to forget some: config.status needs them. # List any preparations that create shell functions first, then # topologically sort the others by their dependencies. # # Special case: we do not need _AS_LINENO_PREPARE, because the # parent will have substituted $LINENO for us when processing its # own invocation of _AS_LINENO_PREPARE. # # Special case: the full definition of _AS_ERROR_PREPARE is not output # unless AS_MESSAGE_LOG_FD is non-empty, although the value of # AS_MESSAGE_LOG_FD is not relevant. m4_defun([_AS_PREPARE], [m4_pushdef([AS_REQUIRE])]dnl [m4_pushdef([AS_REQUIRE_SHELL_FN], _m4_defn([_AS_REQUIRE_SHELL_FN]) )]dnl [m4_pushdef([AS_MESSAGE_LOG_FD], [-1])]dnl [_AS_ERROR_PREPARE _m4_popdef([AS_MESSAGE_LOG_FD])]dnl [_AS_EXIT_PREPARE _AS_UNSET_PREPARE _AS_VAR_APPEND_PREPARE _AS_VAR_ARITH_PREPARE _AS_EXPR_PREPARE _AS_BASENAME_PREPARE _AS_DIRNAME_PREPARE _AS_ME_PREPARE _AS_CR_PREPARE _AS_ECHO_N_PREPARE _AS_LN_S_PREPARE _AS_MKDIR_P_PREPARE _AS_TEST_PREPARE _AS_TR_CPP_PREPARE _AS_TR_SH_PREPARE _m4_popdef([AS_REQUIRE], [AS_REQUIRE_SHELL_FN])]) # AS_PREPARE # ---------- # Output all the M4sh possible initialization into the initialization # diversion. We do not use _AS_PREPARE so that the m4_provide symbols for # AS_REQUIRE and AS_REQUIRE_SHELL_FN are defined properly, and so that # shell functions are placed in M4SH-INIT-FN. m4_defun([AS_PREPARE], [m4_divert_push([KILL]) m4_append_uniq([_AS_CLEANUP], [m4_divert_text([M4SH-INIT-FN], [_AS_ERROR_PREPARE[]])]) AS_REQUIRE([_AS_EXPR_PREPARE]) AS_REQUIRE([_AS_BASENAME_PREPARE]) AS_REQUIRE([_AS_DIRNAME_PREPARE]) AS_REQUIRE([_AS_ME_PREPARE]) AS_REQUIRE([_AS_CR_PREPARE]) AS_REQUIRE([_AS_LINENO_PREPARE]) AS_REQUIRE([_AS_ECHO_N_PREPARE]) AS_REQUIRE([_AS_EXIT_PREPARE]) AS_REQUIRE([_AS_LN_S_PREPARE]) AS_REQUIRE([_AS_MKDIR_P_PREPARE]) AS_REQUIRE([_AS_TEST_PREPARE]) AS_REQUIRE([_AS_TR_CPP_PREPARE]) AS_REQUIRE([_AS_TR_SH_PREPARE]) AS_REQUIRE([_AS_UNSET_PREPARE]) AS_REQUIRE([_AS_VAR_APPEND_PREPARE], [], [M4SH-INIT-FN]) AS_REQUIRE([_AS_VAR_ARITH_PREPARE], [], [M4SH-INIT-FN]) m4_divert_pop[]]) # AS_REQUIRE(NAME-TO-CHECK, [BODY-TO-EXPAND = NAME-TO-CHECK], # [DIVERSION = M4SH-INIT]) # ----------------------------------------------------------- # BODY-TO-EXPAND is some initialization which must be expanded in the # given diversion when expanded (required or not). The expansion # goes in the named diversion or an earlier one. # # Since $2 can be quite large, this is factored for faster execution, giving # either m4_require([$1], [$2]) or m4_divert_require(desired, [$1], [$2]). m4_defun([AS_REQUIRE], [m4_define([_m4_divert_desired], [m4_default_quoted([$3], [M4SH-INIT])])]dnl [m4_if(m4_eval(_m4_divert_dump - 0 <= _m4_divert(_m4_divert_desired)), 1, [m4_require(], [m4_divert_require(_m4_divert_desired,]) [$1], [$2])]) # _AS_REQUIRE_SHELL_FN(NAME-TO-CHECK, COMMENT, BODY-TO-EXPAND) # ------------------------------------------------------------ # Core of AS_REQUIRE_SHELL_FN, but without diversion support. m4_define([_AS_REQUIRE_SHELL_FN], [ m4_n([$2])$1 () { $3 } @%:@ $1[]]) # AS_REQUIRE_SHELL_FN(NAME-TO-CHECK, COMMENT, BODY-TO-EXPAND, # [DIVERSION = M4SH-INIT-FN]) # ----------------------------------------------------------- # BODY-TO-EXPAND is the body of a shell function to be emitted in the # given diversion when expanded (required or not). Unlike other # xx_REQUIRE macros, BODY-TO-EXPAND is mandatory. If COMMENT is # provided (often via AS_FUNCTION_DESCRIBE), it is listed with a # newline before the function name. m4_define([AS_REQUIRE_SHELL_FN], [m4_provide_if([AS_SHELL_FN_$1], [], [AS_REQUIRE([AS_SHELL_FN_$1], [m4_provide([AS_SHELL_FN_$1])_$0($@)], m4_default_quoted([$4], [M4SH-INIT-FN]))])]) # _AS_RUN(TEST, [SHELL]) # ---------------------- # Run TEST under the current shell (if one parameter is used) # or under the given SHELL, protecting it from syntax errors. # Set as_run in order to assist _AS_LINENO_WORKS. m4_define([_AS_RUN], [m4_ifval([$2], [{ $as_echo "$as_bourne_compatible"$1 | as_run=a $2; }], [(eval $1)]) 2>/dev/null]) # _AS_SHELL_FN_WORK # ----------------- # This is a spy to detect "in the wild" shells that do not support shell # functions correctly. It is based on the m4sh.at Autotest testcases. m4_define([_AS_SHELL_FN_WORK], [as_fn_return () { (exit [$]1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } AS_IF([( set x; as_fn_ret_success y && test x = "[$]1" )], [], [exitcode=1; echo positional parameters were not saved.]) test x$exitcode = x0[]])# _AS_SHELL_FN_WORK # _AS_SHELL_SANITIZE # ------------------ # This is the prolog that is emitted by AS_INIT and AS_INIT_GENERATED; # it is executed prior to shell function definitions, hence the # temporary redefinition of AS_EXIT. m4_defun([_AS_SHELL_SANITIZE], [m4_pushdef([AS_EXIT], [exit m4_default(]m4_dquote([$][1])[, 1)])]dnl [m4_text_box([M4sh Initialization.]) AS_BOURNE_COMPATIBLE _AS_ECHO_PREPARE _AS_PATH_SEPARATOR_PREPARE # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $[0] in @%:@(( *[[\\/]]* ) as_myself=$[0] ;; *) _AS_PATH_WALK([], [test -r "$as_dir/$[0]" && as_myself=$as_dir/$[0] && break]) ;; 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 AS_ECHO(["$as_myself: error: cannot find myself; rerun with an absolute file name"]) >&2 AS_EXIT fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH _m4_popdef([AS_EXIT])])# _AS_SHELL_SANITIZE # AS_SHELL_SANITIZE # ----------------- # This is only needed for the sake of Libtool, which screws up royally # in its usage of M4sh internals. m4_define([AS_SHELL_SANITIZE], [_AS_SHELL_SANITIZE m4_provide_if([AS_INIT], [], [m4_provide([AS_INIT]) _AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK]) _AS_DETECT_BETTER_SHELL _AS_UNSET_PREPARE ])]) ## ----------------------------- ## ## 2. Wrappers around builtins. ## ## ----------------------------- ## # This section is lexicographically sorted. # AS_CASE(WORD, [PATTERN1], [IF-MATCHED1]...[DEFAULT]) # ---------------------------------------------------- # Expand into # | case WORD in #( # | PATTERN1) IF-MATCHED1 ;; #( # | ... # | *) DEFAULT ;; # | esac # The shell comments are intentional, to work around people who don't # realize the impacts of using insufficient m4 quoting. This macro # always uses : and provides a default case, to work around Solaris # /bin/sh bugs regarding the exit status. m4_define([_AS_CASE], [ [@%:@(] $1[)] : $2 ;;]) m4_define([_AS_CASE_DEFAULT], [ [@%:@(] *[)] : $1 ;;]) m4_defun([AS_CASE], [case $1 in[]m4_map_args_pair([_$0], [_$0_DEFAULT], m4_shift($@m4_if(m4_eval([$# & 1]), [1], [,]))) esac])# AS_CASE # _AS_EXIT_PREPARE # ---------------- # Ensure AS_EXIT and AS_SET_STATUS will work. # # We cannot simply use "exit N" because some shells (zsh and Solaris sh) # will not set $? to N while running the code set by "trap 0" # Some shells fork even for (exit N), so we use a helper function # to set $? prior to the exit. # Then there are shells that don't inherit $? correctly into the start of # a shell function, so we must always be given an argument. # Other shells don't use `$?' as default for `exit', hence just repeating # the exit value can only help improving portability. m4_defun([_AS_EXIT_PREPARE], [AS_REQUIRE_SHELL_FN([as_fn_set_status], [AS_FUNCTION_DESCRIBE([as_fn_set_status], [STATUS], [Set $? to STATUS, without forking.])], [ return $[]1])]dnl [AS_REQUIRE_SHELL_FN([as_fn_exit], [AS_FUNCTION_DESCRIBE([as_fn_exit], [STATUS], [Exit the shell with STATUS, even in a "trap 0" or "set -e" context.])], [ set +e as_fn_set_status $[1] exit $[1]])])#_AS_EXIT_PREPARE # AS_EXIT([EXIT-CODE = $?]) # ------------------------- # Exit, with status set to EXIT-CODE in the way that it's seen # within "trap 0", and without interference from "set -e". If # EXIT-CODE is omitted, then use $?. m4_defun([AS_EXIT], [AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_exit m4_ifval([$1], [$1], [$][?])]) # AS_FOR(MACRO, SHELL-VAR, [LIST = "$@"], [BODY = :]) # --------------------------------------------------- # Expand to a shell loop that assigns SHELL-VAR to each of the # whitespace-separated entries in LIST (or "$@" if LIST is empty), # then executes BODY. BODY may call break to abort the loop, or # continue to proceed with the next element of LIST. Requires that # IFS be set to the normal space-tab-newline. As an optimization, # BODY should access MACRO rather than $SHELL-VAR. Normally, MACRO # expands to $SHELL-VAR, but if LIST contains only a single element # that needs no additional shell quoting, then MACRO will expand to # that element, thus providing a direct value rather than a shell # variable indirection. # # Only use the optimization if LIST can be used without additional # shell quoting in either a literal or double-quoted context (that is, # we give up on default IFS chars, parameter expansion, command # substitution, shell quoting, globs, or quadrigraphs). Inline the # m4_defn for speed. m4_defun([AS_FOR], [m4_pushdef([$1], m4_if([$3], [], [[$$2]], m4_translit([$3], ]dnl m4_dquote(_m4_defn([m4_cr_symbols2]))[[%+=:,./-]), [], [[$3]], [[$$2]]))]dnl [for $2[]m4_ifval([$3], [ in $3]) do : $4 done[]_m4_popdef([$1])]) # AS_IF(TEST1, [IF-TRUE1 = :]...[IF-FALSE = :]) # --------------------------------------------- # Expand into # | if TEST1; then # | IF-TRUE1 # | elif TEST2; then # | IF-TRUE2 # [...] # | else # | IF-FALSE # | fi # with simplifications if IF-TRUE1 and/or IF-FALSE is empty. # m4_define([_AS_IF], [elif $1; then : $2 ]) m4_define([_AS_IF_ELSE], [m4_ifnblank([$1], [else $1 ])]) m4_defun([AS_IF], [if $1; then : $2 m4_map_args_pair([_$0], [_$0_ELSE], m4_shift2($@))]dnl [fi[]])# AS_IF # AS_SET_STATUS(STATUS) # --------------------- # Set the shell status ($?) to STATUS, without forking. m4_defun([AS_SET_STATUS], [AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_set_status $1]) # _AS_UNSET_PREPARE # ----------------- # Define $as_unset to execute AS_UNSET, for backwards compatibility # with older versions of M4sh. m4_defun([_AS_UNSET_PREPARE], [AS_FUNCTION_DESCRIBE([as_fn_unset], [VAR], [Portably unset VAR.]) as_fn_unset () { AS_UNSET([$[1]]) } as_unset=as_fn_unset]) # AS_UNSET(VAR) # ------------- # Unset the env VAR, working around shells that do not allow unsetting # a variable that is not already set. You should not unset MAIL and # MAILCHECK, as that triggers a bug in Bash 2.01. m4_defun([AS_UNSET], [{ AS_LITERAL_IF([$1], [], [eval ])$1=; unset $1;}]) ## ------------------------------------------ ## ## 3. Error and warnings at the shell level. ## ## ------------------------------------------ ## # AS_MESSAGE_FD # ------------- # Must expand to the fd where messages will be sent. Defaults to 1, # although a script may reassign this value and use exec to either # copy stdout to the new fd, or open the new fd on /dev/null. m4_define([AS_MESSAGE_FD], [1]) # AS_MESSAGE_LOG_FD # ----------------- # Must expand to either the empty string (when no logging is # performed), or to the fd of a log file. Defaults to empty, although # a script may reassign this value and use exec to open a log. When # not empty, messages to AS_MESSAGE_FD are duplicated to the log, # along with a LINENO reference. m4_define([AS_MESSAGE_LOG_FD]) # AS_ORIGINAL_STDIN_FD # -------------------- # Must expand to the fd of the script's original stdin. Defaults to # 0, although the script may reassign this value and use exec to # shuffle fd's. m4_define([AS_ORIGINAL_STDIN_FD], [0]) # AS_ESCAPE(STRING, [CHARS = `\"$]) # --------------------------------- # Add backslash escaping to the CHARS in STRING. In an effort to # optimize use of this macro inside double-quoted shell constructs, # the behavior is intentionally undefined if CHARS is longer than 4 # bytes, or contains bytes outside of the set [`\"$]. However, # repeated bytes within the set are permissible (AS_ESCAPE([$1], [""]) # being a common way to be nice to syntax highlighting). # # Avoid the m4_bpatsubst if there are no interesting characters to escape. # _AS_ESCAPE bypasses argument defaulting. m4_define([AS_ESCAPE], [_$0([$1], m4_if([$2], [], [[`], [\"$]], [m4_substr([$2], [0], [1]), [$2]]))]) # _AS_ESCAPE(STRING, KEY, SET) # ---------------------------- # Backslash-escape all instances of the single byte KEY or up to four # bytes in SET occurring in STRING. Although a character can occur # multiple times, optimum efficiency occurs when KEY and SET are # distinct, and when SET does not exceed two bytes. These particular # semantics allow for the fewest number of parses of STRING, as well # as taking advantage of the optimizations in m4 1.4.13+ when # m4_translit is passed SET of size 2 or smaller. m4_define([_AS_ESCAPE], [m4_if(m4_index(m4_translit([[$1]], [$3], [$2$2$2$2]), [$2]), [-1], [$0_], [m4_bpatsubst])([$1], [[$2$3]], [\\\&])]) m4_define([_AS_ESCAPE_], [$1]) # _AS_QUOTE(STRING) # ----------------- # If there are quoted (via backslash) backquotes, output STRING # literally and warn; otherwise, output STRING with ` and " quoted. # # Compatibility glue between the old AS_MSG suite which did not # quote anything, and the modern suite which quotes the quotes. # If STRING contains `\\' or `\$', it's modern. # If STRING contains `\"' or `\`', it's old. # Otherwise it's modern. # # Profiling shows that m4_index is 5 to 8x faster than m4_bregexp. The # slower implementation used: # m4_bmatch([$1], # [\\[\\$]], [$2], # [\\[`"]], [$3], # [$2]) # The current implementation caters to the common case of no backslashes, # to minimize m4_index expansions (hence the nested if). m4_define([_AS_QUOTE], [m4_cond([m4_index([$1], [\])], [-1], [_AS_QUOTE_MODERN], [m4_eval(m4_index(m4_translit([[$1]], [$], [\]), [\\]) >= 0)], [1], [_AS_QUOTE_MODERN], [m4_eval(m4_index(m4_translit([[$1]], ["], [`]), [\`]) >= 0)],dnl" [1], [_AS_QUOTE_OLD], [_AS_QUOTE_MODERN])([$1])]) m4_define([_AS_QUOTE_MODERN], [_AS_ESCAPE([$1], [`], [""])]) m4_define([_AS_QUOTE_OLD], [m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $1])$1]) # _AS_ECHO_UNQUOTED(STRING, [FD = AS_MESSAGE_FD]) # ----------------------------------------------- # Perform shell expansions on STRING and echo the string to FD. m4_define([_AS_ECHO_UNQUOTED], [AS_ECHO(["$1"]) >&m4_default([$2], [AS_MESSAGE_FD])]) # _AS_ECHO(STRING, [FD = AS_MESSAGE_FD]) # -------------------------------------- # Protect STRING from backquote expansion, echo the result to FD. m4_define([_AS_ECHO], [_AS_ECHO_UNQUOTED([_AS_QUOTE([$1])], [$2])]) # _AS_ECHO_LOG(STRING) # -------------------- # Log the string to AS_MESSAGE_LOG_FD. m4_defun_init([_AS_ECHO_LOG], [AS_REQUIRE([_AS_LINENO_PREPARE])], [_AS_ECHO([$as_me:${as_lineno-$LINENO}: $1], AS_MESSAGE_LOG_FD)]) # _AS_ECHO_N_PREPARE # ------------------ # Check whether to use -n, \c, or newline-tab to separate # checking messages from result messages. # Don't try to cache, since the results of this macro are needed to # display the checking message. In addition, caching something used once # has little interest. # Idea borrowed from dist 3.0. Use `*c*,', not `*c,' because if `\c' # failed there is also a newline to match. Use `xy' because `\c' echoed # in a command substitution prints only the first character of the output # with ksh version M-11/16/88f on AIX 6.1; it needs to be reset by another # backquoted echo. m4_defun([_AS_ECHO_N_PREPARE], [ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac ])# _AS_ECHO_N_PREPARE # _AS_ECHO_N(STRING, [FD = AS_MESSAGE_FD]) # ---------------------------------------- # Same as _AS_ECHO, but echo doesn't return to a new line. m4_define([_AS_ECHO_N], [AS_ECHO_N(["_AS_QUOTE([$1])"]) >&m4_default([$2], [AS_MESSAGE_FD])]) # AS_MESSAGE(STRING, [FD = AS_MESSAGE_FD]) # ---------------------------------------- # Output "`basename $0`: STRING" to the open file FD, and if logging # is enabled, copy it to the log with a reference to LINENO. m4_defun_init([AS_MESSAGE], [AS_REQUIRE([_AS_ME_PREPARE])], [m4_ifval(AS_MESSAGE_LOG_FD, [{ _AS_ECHO_LOG([$1]) _AS_ECHO([$as_me: $1], [$2]);}], [_AS_ECHO([$as_me: $1], [$2])])[]]) # AS_WARN(PROBLEM) # ---------------- # Output "`basename $0`: WARNING: PROBLEM" to stderr. m4_define([AS_WARN], [AS_MESSAGE([WARNING: $1], [2])])# AS_WARN # _AS_ERROR_PREPARE # ----------------- # Output the shell function used by AS_ERROR. This is designed to be # expanded during the m4_wrap cleanup. # # If AS_MESSAGE_LOG_FD is non-empty at the end of the script, then # make this function take optional parameters that use LINENO at the # points where AS_ERROR was expanded with non-empty AS_MESSAGE_LOG_FD; # otherwise, assume the entire script does not do logging. m4_define([_AS_ERROR_PREPARE], [AS_REQUIRE_SHELL_FN([as_fn_error], [AS_FUNCTION_DESCRIBE([as_fn_error], [ERROR]m4_ifval(AS_MESSAGE_LOG_FD, [[ [[LINENO LOG_FD]]]]), [Output "`basename @S|@0`: error: ERROR" to stderr.] m4_ifval(AS_MESSAGE_LOG_FD, [[If LINENO and LOG_FD are provided, also output the error to LOG_FD, referencing LINENO.]]) [Then exit the script with status $?, using 1 if that was 0.])], [ as_status=$?; test $as_status -eq 0 && as_status=1 m4_ifval(AS_MESSAGE_LOG_FD, [m4_pushdef([AS_MESSAGE_LOG_FD], [$[3]])dnl if test "$[3]"; then AS_LINENO_PUSH([$[2]]) _AS_ECHO_LOG([error: $[1]]) fi m4_define([AS_MESSAGE_LOG_FD])], [m4_pushdef([AS_MESSAGE_LOG_FD])])dnl AS_MESSAGE([error: $[1]], [2]) _m4_popdef([AS_MESSAGE_LOG_FD])dnl AS_EXIT([$as_status])])]) # AS_ERROR(ERROR, [EXIT-STATUS = max($?/1)]) # ------------------------------------------ # Output "`basename $0`: error: ERROR" to stderr, then exit the # script with EXIT-STATUS. m4_defun_init([AS_ERROR], [m4_append_uniq([_AS_CLEANUP], [m4_divert_text([M4SH-INIT-FN], [_AS_ERROR_PREPARE[]])])], [m4_ifvaln([$2], [{ AS_SET_STATUS([$2])])]dnl [as_fn_error "_AS_QUOTE([$1])"m4_ifval(AS_MESSAGE_LOG_FD, [ "$LINENO" AS_MESSAGE_LOG_FD])[]m4_ifval([$2], [; }])]) # AS_LINENO_PUSH([LINENO]) # ------------------------ # If this is the outermost call to AS_LINENO_PUSH, make sure that # AS_MESSAGE will print LINENO as the line number. m4_defun([AS_LINENO_PUSH], [as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack]) # AS_LINENO_POP([LINENO]) # ------------------------ # If this is call balances the outermost call to AS_LINENO_PUSH, # AS_MESSAGE will restart printing $LINENO as the line number. m4_defun([AS_LINENO_POP], [eval $as_lineno_stack; test "x$as_lineno_stack" = x && AS_UNSET([as_lineno])]) ## -------------------------------------- ## ## 4. Portable versions of common tools. ## ## -------------------------------------- ## # This section is lexicographically sorted. # AS_BASENAME(FILE-NAME) # ---------------------- # Simulate the command 'basename FILE-NAME'. Not all systems have basename. # Also see the comments for AS_DIRNAME. m4_defun([_AS_BASENAME_EXPR], [$as_expr X/[]$1 : '.*/\([[^/][^/]*]\)/*$' \| \ X[]$1 : 'X\(//\)$' \| \ X[]$1 : 'X\(/\)' \| .]) m4_defun([_AS_BASENAME_SED], [AS_ECHO([X/[]$1]) | sed ['/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q']]) m4_defun_init([AS_BASENAME], [AS_REQUIRE([_$0_PREPARE])], [$as_basename -- $1 || _AS_BASENAME_EXPR([$1]) 2>/dev/null || _AS_BASENAME_SED([$1])]) # _AS_BASENAME_PREPARE # -------------------- # Avoid Solaris 9 /usr/ucb/basename, as `basename /' outputs an empty line. # Also, traditional basename mishandles --. Require here _AS_EXPR_PREPARE, # to avoid problems when _AS_BASENAME is called from the M4SH-INIT diversion. m4_defun([_AS_BASENAME_PREPARE], [AS_REQUIRE([_AS_EXPR_PREPARE])]dnl [if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi ])# _AS_BASENAME_PREPARE # AS_DIRNAME(FILE-NAME) # --------------------- # Simulate the command 'dirname FILE-NAME'. Not all systems have dirname. # This macro must be usable from inside ` `. # # Prefer expr to echo|sed, since expr is usually faster and it handles # backslashes and newlines correctly. However, older expr # implementations (e.g. SunOS 4 expr and Solaris 8 /usr/ucb/expr) have # a silly length limit that causes expr to fail if the matched # substring is longer than 120 bytes. So fall back on echo|sed if # expr fails. m4_defun_init([_AS_DIRNAME_EXPR], [AS_REQUIRE([_AS_EXPR_PREPARE])], [$as_expr X[]$1 : 'X\(.*[[^/]]\)//*[[^/][^/]]*/*$' \| \ X[]$1 : 'X\(//\)[[^/]]' \| \ X[]$1 : 'X\(//\)$' \| \ X[]$1 : 'X\(/\)' \| .]) m4_defun([_AS_DIRNAME_SED], [AS_ECHO([X[]$1]) | sed ['/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q']]) m4_defun_init([AS_DIRNAME], [AS_REQUIRE([_$0_PREPARE])], [$as_dirname -- $1 || _AS_DIRNAME_EXPR([$1]) 2>/dev/null || _AS_DIRNAME_SED([$1])]) # _AS_DIRNAME_PREPARE # -------------------- m4_defun([_AS_DIRNAME_PREPARE], [AS_REQUIRE([_AS_EXPR_PREPARE])]dnl [if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ])# _AS_DIRNAME_PREPARE # AS_ECHO(WORD) # ------------- # Output WORD followed by a newline. WORD must be a single shell word # (typically a quoted string). The bytes of WORD are output as-is, even # if it starts with "-" or contains "\". m4_defun_init([AS_ECHO], [AS_REQUIRE([_$0_PREPARE])], [$as_echo $1]) # AS_ECHO_N(WORD) # ------------- # Like AS_ECHO(WORD), except do not output the trailing newline. m4_defun_init([AS_ECHO_N], [AS_REQUIRE([_AS_ECHO_PREPARE])], [$as_echo_n $1]) # _AS_ECHO_PREPARE # ----------------- # Arrange for $as_echo 'FOO' to echo FOO without escape-interpretation; # and similarly for $as_echo_n, which omits the trailing newline. # 'FOO' is an optional single argument; a missing FOO is treated as empty. m4_defun([_AS_ECHO_PREPARE], [[as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$][1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$][1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$][1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi ]])# _AS_ECHO_PREPARE # AS_TEST_X # --------- # Check whether a file has executable or search permissions. m4_defun_init([AS_TEST_X], [AS_REQUIRE([_AS_TEST_PREPARE])], [$as_test_x $1[]])# AS_TEST_X # AS_EXECUTABLE_P # --------------- # Check whether a file is a regular file that has executable permissions. m4_defun_init([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])], [{ test -f $1 && AS_TEST_X([$1]); }])# AS_EXECUTABLE_P # _AS_EXPR_PREPARE # ---------------- # QNX 4.25 expr computes and issue the right result but exits with failure. # Tru64 expr mishandles leading zeros in numeric strings. # Detect these flaws. m4_defun([_AS_EXPR_PREPARE], [if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi ])# _AS_EXPR_PREPARE # _AS_ME_PREPARE # -------------- # Define $as_me to the basename of the executable file's name. m4_defun([AS_ME_PREPARE], [AS_REQUIRE([_$0])]) m4_defun([_AS_ME_PREPARE], [AS_REQUIRE([_AS_BASENAME_PREPARE])]dnl [as_me=`AS_BASENAME("$[0]")` ]) # _AS_LINENO_WORKS # --------------- # Succeed if the currently executing shell supports LINENO. # This macro does not expand to a single shell command, so be careful # when using it. Surrounding the body of this macro with {} would # cause "bash -c '_ASLINENO_WORKS'" to fail (with Bash 2.05, anyway), # but that bug is irrelevant to our use of LINENO. We can't use # AS_VAR_ARITH, as this is expanded prior to shell functions. # # Testing for LINENO support is hard; we use _AS_LINENO_WORKS inside # _AS_RUN, which sometimes eval's its argument (pdksh gives false # negatives if $LINENO is expanded by eval), and sometimes passes the # argument to another shell (if the current shell supports LINENO, # then expanding $LINENO prior to the string leads to false # positives). Hence, we perform two tests, and coordinate with # _AS_DETECT_EXPAND (which ensures that only the first of two LINENO # is expanded in advance) and _AS_RUN (which sets $as_run to 'a' when # handing the test to another shell), so that we know which test to # trust. m4_define([_AS_LINENO_WORKS], [ as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"']) # _AS_LINENO_PREPARE # ------------------ # If LINENO is not supported by the shell, produce a version of this # script where LINENO is hard coded. # Comparing LINENO against _oline_ is not a good solution, since in # the case of embedded executables (such as config.status within # configure) you'd compare LINENO wrt config.status vs. _oline_ wrt # configure. # # AS_ERROR normally uses LINENO if logging, but AS_LINENO_PREPARE uses # AS_ERROR. Besides, if the logging fd is open, we don't want to use # $LINENO in the log complaining about broken LINENO. We break the # circular require by changing AS_ERROR and AS_MESSAGE_LOG_FD. m4_defun([AS_LINENO_PREPARE], [AS_REQUIRE([_$0])]) m4_defun([_AS_LINENO_PREPARE], [AS_REQUIRE([_AS_CR_PREPARE])]dnl [AS_REQUIRE([_AS_ME_PREPARE])]dnl [_AS_DETECT_SUGGESTED([_AS_LINENO_WORKS])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [m4_pushdef([AS_ERROR], [{ AS_MESSAGE(]m4_dquote([error: $][1])[, [2]); AS_EXIT([1]); }])]dnl dnl Create $as_me.lineno as a copy of $as_myself, but with $LINENO dnl uniformly replaced by the line number. The first 'sed' inserts a dnl line-number line after each line using $LINENO; the second 'sed' dnl does the real work. The second script uses 'N' to pair each dnl line-number line with the line containing $LINENO, and appends dnl trailing '-' during substitution so that $LINENO is not a special dnl case at line end. (Raja R Harinath suggested sed '=', and Paul dnl Eggert wrote the scripts with optimization help from Paolo Bonzini). [_AS_LINENO_WORKS || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[[$]]LINENO/= ' <$as_myself | sed ' s/[[$]]LINENO.*/&-/ t lineno b :lineno N :loop s/[[$]]LINENO\([[^'$as_cr_alnum'_]].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || AS_ERROR([cannot create $as_me.lineno; rerun with a POSIX shell]) # 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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } _m4_popdef([AS_MESSAGE_LOG_FD], [AS_ERROR])])# _AS_LINENO_PREPARE # _AS_LN_S_PREPARE # ---------------- # Don't use conftest.sym to avoid file name issues on DJGPP, where this # would yield conftest.sym.exe for DJGPP < 2.04. And don't use `conftest' # as base name to avoid prohibiting concurrency (e.g., concurrent # config.statuses). On read-only media, assume 'cp -p' and hope we # are just running --help anyway. m4_defun([_AS_LN_S_PREPARE], [rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null ])# _AS_LN_S_PREPARE # AS_LN_S(FILE, LINK) # ------------------- # FIXME: Should we add the glue code to handle properly relative symlinks # simulated with `ln' or `cp'? m4_defun_init([AS_LN_S], [AS_REQUIRE([_AS_LN_S_PREPARE])], [$as_ln_s $1 $2]) # _AS_MKDIR_P # ----------- # Emit code that can be used to emulate `mkdir -p` with plain `mkdir'; # the code assumes that "$as_dir" contains the directory to create. # $as_dir is normalized, so there is no need to worry about using --. m4_define([_AS_MKDIR_P], [case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`AS_ECHO(["$as_dir"]) | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`AS_DIRNAME("$as_dir")` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || AS_ERROR([cannot create directory $as_dir]) ]) # AS_MKDIR_P(DIR) # --------------- # Emulate `mkdir -p' with plain `mkdir' if needed. m4_defun_init([AS_MKDIR_P], [AS_REQUIRE([_$0_PREPARE])], [as_dir=$1; as_fn_mkdir_p])# AS_MKDIR_P # _AS_MKDIR_P_PREPARE # ------------------- m4_defun([_AS_MKDIR_P_PREPARE], [AS_REQUIRE_SHELL_FN([as_fn_mkdir_p], [AS_FUNCTION_DESCRIBE([as_fn_mkdir_p], [], [Create "$as_dir" as a directory, including parents if necessary.])], [ _AS_MKDIR_P ])]dnl [if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi ])# _AS_MKDIR_P_PREPARE # _AS_PATH_SEPARATOR_PREPARE # -------------------------- # Compute the path separator. m4_defun([_AS_PATH_SEPARATOR_PREPARE], [# The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ])# _AS_PATH_SEPARATOR_PREPARE # _AS_PATH_WALK([PATH = $PATH], BODY, [IF-NOT-FOUND]) # --------------------------------------------------- # Walk through PATH running BODY for each `as_dir'. If BODY never does a # `break', evaluate IF-NOT-FOUND. # # Still very private as its interface looks quite bad. # # `$as_dummy' forces splitting on constant user-supplied paths. # POSIX.2 field splitting is done only on the result of word # expansions, not on literal text. This closes a longstanding sh security # hole. Optimize it away when not needed, i.e., if there are no literal # path separators. m4_defun_init([_AS_PATH_WALK], [AS_REQUIRE([_AS_PATH_SEPARATOR_PREPARE])], [as_save_IFS=$IFS; IFS=$PATH_SEPARATOR m4_ifvaln([$3], [as_found=false])dnl m4_bmatch([$1], [[:;]], [as_dummy="$1" for as_dir in $as_dummy], [for as_dir in m4_default([$1], [$PATH])]) do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. m4_ifvaln([$3], [as_found=:])dnl $2 m4_ifvaln([$3], [as_found=false])dnl done m4_ifvaln([$3], [$as_found || { $3; }])dnl IFS=$as_save_IFS ]) # AS_SET_CATFILE(VAR, DIR-NAME, FILE-NAME) # ---------------------------------------- # Set VAR to DIR-NAME/FILE-NAME. # Optimize the common case where $2 or $3 is '.'. m4_define([AS_SET_CATFILE], [case $2 in @%:@(( .) $1=$3;; *) case $3 in @%:@((( .) $1=$2;; [[\\/]]* | ?:[[\\/]]* ) $1=$3;; *) $1=$2/$3;; esac;; esac[]])# AS_SET_CATFILE # _AS_TEST_PREPARE # ---------------- # Find out whether `test -x' works. If not, prepare a substitute # that should work well enough for most scripts. # # Here are some of the problems with the substitute. # The 'ls' tests whether the owner, not the current user, can execute/search. # The eval means '*', '?', and '[' cause inadvertent file name globbing # after the 'eval', so jam together as many tokens as we can to minimize # the likelihood that the inadvertent globbing will actually do anything. # Luckily, this gorp is needed only on really ancient hosts. # m4_defun([_AS_TEST_PREPARE], [if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$[]1"; then test -d "$[]1/."; else case $[]1 in @%:@( -*)set "./$[]1";; esac; case `ls -ld'$as_ls_L_option' "$[]1" 2>/dev/null` in @%:@(( ???[[sx]]*):;;*)false;;esac;fi '\'' sh ' fi dnl as_executable_p is present for backward compatibility with Libtool dnl 1.5.22, but it should go away at some point. as_executable_p=$as_test_x ])# _AS_TEST_PREPARE ## ------------------ ## ## 5. Common idioms. ## ## ------------------ ## # This section is lexicographically sorted. # AS_BOX(MESSAGE, [FRAME-CHARACTER = `-']) # ---------------------------------------- # Output MESSAGE, a single line text, framed with FRAME-CHARACTER (which # must not be `/'). m4_define([AS_BOX], [AS_LITERAL_IF([$1], [_AS_BOX_LITERAL($@)], [_AS_BOX_INDIR($@)])]) # _AS_BOX_LITERAL(MESSAGE, [FRAME-CHARACTER = `-']) # ------------------------------------------------- m4_define([_AS_BOX_LITERAL], [cat <<\_ASBOX m4_text_box($@) _ASBOX]) # _AS_BOX_INDIR(MESSAGE, [FRAME-CHARACTER = `-']) # ----------------------------------------------- m4_define([_AS_BOX_INDIR], [sed 'h;s/./m4_default([$2], [-])/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ $1 @%:@@%:@ _ASBOX]) # _AS_CLEAN_DIR(DIR) # ------------------ # Remove all contents from within DIR, including any unwritable # subdirectories, but leave DIR itself untouched. m4_define([_AS_CLEAN_DIR], [if test -d $1; then find $1 -type d ! -perm -700 -exec chmod u+rwx {} \; rm -fr $1/* $1/.[[!.]] $1/.??* fi]) # AS_FUNCTION_DESCRIBE(NAME, [ARGS], DESCRIPTION, [WRAP-COLUMN = 79]) # ------------------------------------------------------------------- # Output a shell comment describing NAME and its arguments ARGS, then # a separator line, then the DESCRIPTION wrapped at a decimal # WRAP-COLUMN. The output resembles: # # NAME ARGS # # --------- # # Wrapped DESCRIPTION text # NAME and ARGS are expanded, while DESCRIPTION is treated as a # whitespace-separated list of strings that are not expanded. m4_define([AS_FUNCTION_DESCRIBE], [@%:@ $1[]m4_ifval([$2], [ $2]) @%:@ m4_translit(m4_format([%*s], m4_decr(m4_qlen(_m4_expand([$1[]m4_ifval([$2], [ $2]) ]))), []), [ ], [-]) m4_text_wrap([$3], [@%:@ ], [], [$4])]) # AS_HELP_STRING(LHS, RHS, [INDENT-COLUMN = 26], [WRAP-COLUMN = 79]) # ------------------------------------------------------------------ # # Format a help string so that it looks pretty when the user executes # "script --help". This macro takes up to four arguments, a # "left hand side" (LHS), a "right hand side" (RHS), a decimal # INDENT-COLUMN which is the column where wrapped lines should begin # (the default of 26 is recommended), and a decimal WRAP-COLUMN which is # the column where lines should wrap (the default of 79 is recommended). # LHS is expanded, RHS is not. # # For backwards compatibility not documented in the manual, INDENT-COLUMN # can also be specified as a string of white spaces, whose width # determines the indentation column. Using TABs in INDENT-COLUMN is not # recommended, since screen width of TAB is not computed. # # The resulting string is suitable for use in other macros that require # a help string (e.g. AC_ARG_WITH). # # Here is the sample string from the Autoconf manual (Node: External # Software) which shows the proper spacing for help strings. # # --with-readline support fancy command line editing # ^ ^ ^ # | | | # | column 2 column 26 # | # column 0 # # A help string is made up of a "left hand side" (LHS) and a "right # hand side" (RHS). In the example above, the LHS is # "--with-readline", while the RHS is "support fancy command line # editing". # # If the LHS contains more than (INDENT-COLUMN - 3) characters, then the # LHS is terminated with a newline so that the RHS starts on a line of its # own beginning at INDENT-COLUMN. In the default case, this corresponds to an # LHS with more than 23 characters. # # Therefore, in the example, if the LHS were instead # "--with-readline-blah-blah-blah", then the AS_HELP_STRING macro would # expand into: # # # --with-readline-blah-blah-blah # ^ ^ support fancy command line editing # | | ^ # | column 2 | # column 0 column 26 # # # m4_text_wrap hacks^Wworks around the fact that m4_format does not # know quadrigraphs. # m4_define([AS_HELP_STRING], [m4_text_wrap([$2], m4_cond([[$3]], [], [ ], [m4_eval([$3]+0)], [0], [[$3]], [m4_format([[%*s]], [$3], [])]), m4_expand([ $1 ]), [$4])])# AS_HELP_STRING # AS_IDENTIFIER_IF(EXPRESSION, IF-IDENT, IF-NOT-IDENT) # ---------------------------------------------------- # If EXPRESSION serves as an identifier (ie, after removal of @&t@, it # matches the regex `^[a-zA-Z_][a-zA-Z_0-9]*$'), execute IF-IDENT, # otherwise IF-NOT-IDENT. # # This is generally faster than the alternative: # m4_bmatch(m4_bpatsubst([[$1]], [@&t@]), ^m4_defn([m4_re_word])$, # [$2], [$3]) # # Rather than expand m4_defn every time AS_IDENTIFIER_IF is expanded, we # inline its expansion up front. Only use a regular expression if we # detect a potential quadrigraph. # # First, check if the entire string matches m4_cr_symbol2. Only then do # we worry if the first character also matches m4_cr_symbol1 (ie. does not # match m4_cr_digit). m4_define([AS_IDENTIFIER_IF], [m4_if(m4_index([$1], [@]), [-1], [_$0($@)], [_$0(m4_bpatsubst([[$1]], [@&t@]), [$2], [$3])])]) m4_define([_AS_IDENTIFIER_IF], [m4_cond([[$1]], [], [$3], [m4_eval(m4_len(m4_translit([[$1]], ]]dnl m4_dquote(m4_dquote(m4_defn([m4_cr_symbols2])))[[)) > 0)], [1], [$3], [m4_len(m4_translit(m4_format([[%.1s]], [$1]), ]]dnl m4_dquote(m4_dquote(m4_defn([m4_cr_symbols1])))[[))], [0], [$2], [$3])]) # AS_LITERAL_IF(EXPRESSION, IF-LITERAL, IF-NOT-LITERAL) # ----------------------------------------------------- # If EXPRESSION has shell indirections ($var or `expr`), expand # IF-LITERAL, else IF-NOT-LITERAL. # This is an *approximation*: for instance EXPRESSION = `\$' is # definitely a literal, but will not be recognized as such. # # Why do we reject EXPRESSION expanding with `[' or `]' as a literal? # Because AS_TR_SH is MUCH faster if it can use m4_translit on literals # instead of m4_bpatsubst; but m4_translit is much tougher to do safely # if `[' is translated. # # Note that the quadrigraph @S|@ can result in non-literals, but outright # rejecting all @ would make AC_INIT complain on its bug report address. # # We used to use m4_bmatch(m4_quote($1), [[`$]], [$3], [$2]), but # profiling shows that it is faster to use m4_translit. # # Because the translit is stripping quotes, it must also neutralize anything # that might be in a macro name, as well as comments and commas. All the # problem characters are unified so that a single m4_index can scan the # result. # # Rather than expand m4_defn every time AS_LITERAL_IF is expanded, we # inline its expansion up front. m4_define([AS_LITERAL_IF], [m4_cond([m4_eval(m4_index(m4_quote($1), [@S|@]) == -1)], [0], [$3], [m4_index(m4_translit(m4_quote($1), [[]`,#]]]dnl m4_dquote(m4_dquote(m4_defn([m4_cr_symbols2])))[[, [$$$]), [$])], [-1], [$2], [$3])]) # AS_TMPDIR(PREFIX, [DIRECTORY = $TMPDIR [= /tmp]]) # ------------------------------------------------- # Create as safely as possible a temporary directory in DIRECTORY # which name is inspired by PREFIX (should be 2-4 chars max). m4_define([AS_TMPDIR], [# Create a (secure) tmp directory for tmp files. m4_if([$2], [], [: ${TMPDIR=/tmp}]) { tmp=`(umask 077 && mktemp -d "m4_default([$2], [$TMPDIR])/$1XXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=m4_default([$2], [$TMPDIR])/$1$$-$RANDOM (umask 077 && mkdir "$tmp") } || AS_ERROR([cannot create a temporary directory in m4_default([$2], [$TMPDIR])])])# AS_TMPDIR # AS_UNAME # -------- # Try to describe this machine. Meant for logs. m4_define([AS_UNAME], [{ cat <<_ASUNAME m4_text_box([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` /usr/bin/hostinfo = `(/usr/bin/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_PATH_WALK([$PATH], [AS_ECHO(["PATH: $as_dir"])]) }]) # _AS_VERSION_COMPARE_PREPARE # --------------------------- # Output variables for comparing version numbers. m4_defun([_AS_VERSION_COMPARE_PREPARE], [[as_awk_strverscmp=' # Use only awk features that work with 7th edition Unix awk (1978). # My, what an old awk you have, Mr. Solaris! END { while (length(v1) && length(v2)) { # Set d1 to be the next thing to compare from v1, and likewise for d2. # Normally this is a single character, but if v1 and v2 contain digits, # compare them as integers and fractions as strverscmp does. if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { # Split v1 and v2 into their leading digit string components d1 and d2, # and advance v1 and v2 past the leading digit strings. for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1) d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1) if (d1 ~ /^0/) { if (d2 ~ /^0/) { # Compare two fractions. while (d1 ~ /^0/ && d2 ~ /^0/) { d1 = substr(d1, 2); len1-- d2 = substr(d2, 2); len2-- } if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) { # The two components differ in length, and the common prefix # contains only leading zeros. Consider the longer to be less. d1 = -len1 d2 = -len2 } else { # Otherwise, compare as strings. d1 = "x" d1 d2 = "x" d2 } } else { # A fraction is less than an integer. exit 1 } } else { if (d2 ~ /^0/) { # An integer is greater than a fraction. exit 2 } else { # Compare two integers. d1 += 0 d2 += 0 } } } else { # The normal case, without worrying about digits. d1 = substr(v1, 1, 1); v1 = substr(v1, 2) d2 = substr(v2, 1, 1); v2 = substr(v2, 2) } if (d1 < d2) exit 1 if (d1 > d2) exit 2 } # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10), # which mishandles some comparisons of empty strings to integers. if (length(v2)) exit 1 if (length(v1)) exit 2 } ']])# _AS_VERSION_COMPARE_PREPARE # AS_VERSION_COMPARE(VERSION-1, VERSION-2, # [ACTION-IF-LESS], [ACTION-IF-EQUAL], [ACTION-IF-GREATER]) # ----------------------------------------------------------------------------- # Compare two strings possibly containing shell variables as version strings. # # This usage is portable even to ancient awk, # so don't worry about finding a "nice" awk version. m4_defun_init([AS_VERSION_COMPARE], [AS_REQUIRE([_$0_PREPARE])], [as_arg_v1=$1 as_arg_v2=$2 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null AS_CASE([$?], [1], [$3], [0], [$4], [2], [$5])])# AS_VERSION_COMPARE ## --------------------------------------- ## ## 6. Common m4/sh character translation. ## ## --------------------------------------- ## # The point of this section is to provide high level macros comparable # to m4's `translit' primitive, but m4/sh polymorphic. # Transliteration of literal strings should be handled by m4, while # shell variables' content will be translated at runtime (tr or sed). # _AS_CR_PREPARE # -------------- # Output variables defining common character ranges. # See m4_cr_letters etc. m4_defun([_AS_CR_PREPARE], [# 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 ]) # _AS_TR_SH_PREPARE # ----------------- m4_defun([_AS_TR_SH_PREPARE], [AS_REQUIRE([_AS_CR_PREPARE])]dnl [# Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[[^_$as_cr_alnum]]%_%g'" ]) # AS_TR_SH(EXPRESSION) # -------------------- # Transform EXPRESSION into a valid shell variable name. # sh/m4 polymorphic. # Be sure to update the definition of `$as_tr_sh' if you change this. # # AS_LITERAL_IF guarantees that a literal does not have any nested quotes, # once $1 is expanded. m4_translit silently uses only the first occurrence # of a character that appears multiple times in argument 2, since we know # that m4_cr_not_symbols2 also contains [ and ]. m4_translit also silently # ignores characters in argument 3 that do not match argument 2; we use this # fact to skip worrying about the length of m4_cr_not_symbols2. # # For speed, we inline the literal definitions that can be computed up front. m4_defun_init([AS_TR_SH], [AS_REQUIRE([_$0_PREPARE])], [AS_LITERAL_IF([$1], [m4_translit([$1], [*+[]]]]dnl m4_dquote(m4_dquote(m4_defn([m4_cr_not_symbols2])))[[, [pp[]]]]dnl m4_dquote(m4_dquote(m4_for(,1,255,,[[_]])))[[)], [`AS_ECHO(["_AS_ESCAPE(m4_dquote(m4_expand([$1])), [`], [\])"]) | $as_tr_sh`])]) # _AS_TR_CPP_PREPARE # ------------------ m4_defun([_AS_TR_CPP_PREPARE], [AS_REQUIRE([_AS_CR_PREPARE])]dnl [# 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'" ]) # AS_TR_CPP(EXPRESSION) # --------------------- # Map EXPRESSION to an upper case string which is valid as rhs for a # `#define'. sh/m4 polymorphic. Be sure to update the definition # of `$as_tr_cpp' if you change this. # # See implementation comments in AS_TR_SH. m4_defun_init([AS_TR_CPP], [AS_REQUIRE([_$0_PREPARE])], [AS_LITERAL_IF([$1], [m4_translit([$1], [*[]]]]dnl m4_dquote(m4_dquote(m4_defn([m4_cr_letters])m4_defn([m4_cr_not_symbols2])))[[, [P[]]]]dnl m4_dquote(m4_dquote(m4_defn([m4_cr_LETTERS])m4_for(,1,255,,[[_]])))[[)], [`AS_ECHO(["$1"]) | $as_tr_cpp`])]) # _AS_TR_PREPARE # -------------- m4_defun([_AS_TR_PREPARE], [AS_REQUIRE([_AS_TR_SH_PREPARE])AS_REQUIRE([_AS_TR_CPP_PREPARE])]) ## ------------------------------------------------------ ## ## 7. Common m4/sh handling of variables (indirections). ## ## ------------------------------------------------------ ## # The purpose of this section is to provide a uniform API for # reading/setting sh variables with or without indirection. # Typically, one can write # AS_VAR_SET(var, val) # or # AS_VAR_SET(as_$var, val) # and expect the right thing to happen. In the descriptions below, # a literal name matches the regex [a-zA-Z_][a-zA-Z0-9_]*, an # indirect name is a shell expression that produces a literal name # when passed through eval, and a polymorphic name is either type. # _AS_VAR_APPEND_PREPARE # ---------------------- # Define as_fn_append to the optimum definition for the current # shell (bash and zsh provide the += assignment operator to avoid # quadratic append growth over repeated appends). m4_defun([_AS_VAR_APPEND_PREPARE], [AS_FUNCTION_DESCRIBE([as_fn_append], [VAR VALUE], [Append the text in VALUE to the end of the definition contained in VAR. Take advantage of any shell optimizations that allow amortized linear growth over repeated appends, instead of the typical quadratic growth present in naive implementations.]) AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_APPEND_WORKS))"])], [eval 'as_fn_append () { eval $[]1+=\$[]2 }'], [as_fn_append () { eval $[]1=\$$[]1\$[]2 }]) # as_fn_append ]) # _AS_VAR_APPEND_WORKS # -------------------- # Output a shell test to discover whether += works. m4_define([_AS_VAR_APPEND_WORKS], [as_var=1; as_var+=2; test x$as_var = x12]) # AS_VAR_APPEND(VAR, VALUE) # ------------------------- # Append the shell expansion of VALUE to the end of the existing # contents of the polymorphic shell variable VAR, taking advantage of # any shell optimizations that allow repeated appends to result in # amortized linear scaling rather than quadratic behavior. This macro # is not worth the overhead unless the expected final size of the # contents of VAR outweigh the typical VALUE size of repeated appends. # Note that unlike AS_VAR_SET, VALUE must be properly quoted to avoid # field splitting and file name expansion. m4_defun_init([AS_VAR_APPEND], [AS_REQUIRE([_AS_VAR_APPEND_PREPARE], [], [M4SH-INIT-FN])], [as_fn_append $1 $2]) # _AS_VAR_ARITH_PREPARE # --------------------- # Define as_fn_arith to the optimum definition for the current # shell (using POSIX $(()) where supported). m4_defun([_AS_VAR_ARITH_PREPARE], [AS_FUNCTION_DESCRIBE([as_fn_arith], [ARG...], [Perform arithmetic evaluation on the ARGs, and store the result in the global $as_val. Take advantage of shells that can avoid forks. The arguments must be portable across $(()) and expr.]) AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_ARITH_WORKS))"])], [eval 'as_fn_arith () { as_val=$(( $[]* )) }'], [as_fn_arith () { as_val=`expr "$[]@" || test $? -eq 1` }]) # as_fn_arith ]) # _AS_VAR_ARITH_WORKS # ------------------- # Output a shell test to discover whether $(()) works. m4_define([_AS_VAR_ARITH_WORKS], [test $(( 1 + 1 )) = 2]) # AS_VAR_ARITH(VAR, EXPR) # ----------------------- # Perform the arithmetic evaluation of the arguments in EXPR, and set # contents of the polymorphic shell variable VAR to the result, taking # advantage of any shell optimizations that perform arithmetic without # forks. Note that numbers occuring within EXPR must be written in # decimal, and without leading zeroes; variables containing numbers # must be expanded prior to arithmetic evaluation; the first argument # must not be a negative number; there is no portable equality # operator; and operators must be given as separate arguments and # properly quoted. m4_defun_init([AS_VAR_ARITH], [_AS_DETECT_SUGGESTED([_AS_VAR_ARITH_WORKS])]dnl [AS_REQUIRE([_AS_VAR_ARITH_PREPARE], [], [M4SH-INIT-FN])], [as_fn_arith $2 && AS_VAR_SET([$1], [$as_val])]) # AS_VAR_COPY(DEST, SOURCE) # ------------------------- # Set the polymorphic shell variable DEST to the contents of the polymorphic # shell variable SOURCE. m4_define([AS_VAR_COPY], [AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) # AS_VAR_GET(VARIABLE) # -------------------- # Get the value of the shell VARIABLE. # Evaluates to $VARIABLE if there is no indirection in VARIABLE, # else to the appropriate `eval' sequence. # This macro is deprecated because it sometimes mishandles trailing newlines; # use AS_VAR_COPY instead. m4_define([AS_VAR_GET], [AS_LITERAL_IF([$1], [$$1], [`eval 'as_val=${'_AS_ESCAPE([[$1]], [`], [\])'};AS_ECHO(["$as_val"])'`])]) # AS_VAR_IF(VARIABLE, VALUE, IF-TRUE, IF-FALSE) # --------------------------------------------- # Implement a shell `if test $VARIABLE = VALUE; then-else'. # Polymorphic, and avoids sh expansion error upon interrupt or term signal. m4_define([AS_VAR_IF], [AS_LITERAL_IF([$1], [AS_IF([test "x$$1" = x""$2], [$3], [$4])], [AS_VAR_COPY([as_val], [$1]) AS_IF([test "x$as_val" = x""$2], [$3], [$4])])]) # AS_VAR_PUSHDEF and AS_VAR_POPDEF # -------------------------------- # # Sometimes we may have to handle literals (e.g. `stdlib.h'), while at # other moments, the same code may have to get the value from a # variable (e.g., `ac_header'). To have a uniform handling of both # cases, when a new value is about to be processed, declare a local # variable, e.g.: # # AS_VAR_PUSHDEF([header], [ac_cv_header_$1]) # # and then in the body of the macro, use `header' as is. It is of # first importance to use `AS_VAR_*' to access this variable. # # If the value `$1' was a literal (e.g. `stdlib.h'), then `header' is # in fact the value `ac_cv_header_stdlib_h'. If `$1' was indirect, # then `header's value in m4 is in fact `$as_header', the shell # variable that holds all of the magic to get the expansion right. # # At the end of the block, free the variable with # # AS_VAR_POPDEF([header]) # AS_VAR_POPDEF(VARNAME) # ---------------------- # Free the shell variable accessor VARNAME. To be dnl'ed. m4_define([AS_VAR_POPDEF], [m4_popdef([$1])]) # AS_VAR_PUSHDEF(VARNAME, VALUE) # ------------------------------ # Define the m4 macro VARNAME to an accessor to the shell variable # named VALUE. VALUE does not need to be a valid shell variable name: # the transliteration is handled here. To be dnl'ed. # # AS_TR_SH attempts to play with diversions if _AS_TR_SH_PREPARE has # not been expanded. However, users are expected to do subsequent # calls that trigger AS_LITERAL_IF([VARNAME]), and that macro performs # expansion inside an argument collection context, where diversions # don't work. Therefore, we must require the preparation ourselves. m4_defun_init([AS_VAR_PUSHDEF], [AS_REQUIRE([_AS_TR_SH_PREPARE])], [AS_LITERAL_IF([$2], [m4_pushdef([$1], [AS_TR_SH($2)])], [as_$1=AS_TR_SH($2) m4_pushdef([$1], [$as_[$1]])])]) # AS_VAR_SET(VARIABLE, VALUE) # --------------------------- # Set the contents of the polymorphic shell VARIABLE to the shell # expansion of VALUE. VALUE is immune to field splitting and file # name expansion. m4_define([AS_VAR_SET], [AS_LITERAL_IF([$1], [$1=$2], [eval "$1=AS_ESCAPE([$2])"])]) # AS_VAR_SET_IF(VARIABLE, IF-TRUE, IF-FALSE) # ------------------------------------------ # Implement a shell `if-then-else' depending whether VARIABLE is set # or not. Polymorphic. m4_define([AS_VAR_SET_IF], [AS_IF([AS_VAR_TEST_SET([$1])], [$2], [$3])]) # AS_VAR_TEST_SET(VARIABLE) # ------------------------- # Expands into the `test' expression which is true if VARIABLE # is set. Polymorphic. m4_define([AS_VAR_TEST_SET], [AS_LITERAL_IF([$1], [test "${$1+set}" = set], [{ as_var=$1; eval "test \"\${$as_var+set}\" = set"; }])]) ## -------------------- ## ## 8. Setting M4sh up. ## ## -------------------- ## # AS_INIT_GENERATED(FILE, [COMMENT]) # ---------------------------------- # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_defun([AS_INIT_GENERATED], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [as_write_fail=0 cat >$1 <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || as_write_fail=1 _AS_SHELL_SANITIZE _AS_PREPARE m4_if(AS_MESSAGE_FD, [1], [], [exec AS_MESSAGE_FD>&1 ])]dnl [m4_text_box([Main body of $1 script.]) _ASEOF test $as_write_fail = 0 && chmod +x $1[]dnl _m4_popdef([AS_MESSAGE_LOG_FD])])# AS_INIT_GENERATED # AS_INIT # ------- # Initialize m4sh. m4_define([AS_INIT], [# Wrap our cleanup prior to m4sugar's cleanup. m4_wrap([_AS_CLEANUP]) m4_init m4_provide([AS_INIT]) # Forbidden tokens and exceptions. m4_pattern_forbid([^_?AS_]) # Bangshe and minimal initialization. m4_divert_text([BINSH], [@%:@! /bin/sh]) m4_divert_text([HEADER-COMMENT], [@%:@ Generated from __file__ by m4_PACKAGE_STRING.]) m4_divert_text([M4SH-SANITIZE], [_AS_SHELL_SANITIZE]) m4_divert_text([M4SH-INIT-FN], [m4_text_box([M4sh Shell Functions.])]) # Let's go! m4_divert([BODY])dnl m4_text_box([Main body of script.]) _AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK])dnl AS_REQUIRE([_AS_UNSET_PREPARE], [], [M4SH-INIT-FN])dnl ]) �������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/freeze.mk�����������������������������������������������������������0000644�0001750�0001750�00000010251�11202536434�016615� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Freeze M4 files. # Copyright (C) 2002, 2004, 2006, 2007, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. ## ----------------- ## ## Freeze M4 files. ## ## ----------------- ## SUFFIXES = .m4 .m4f AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg $(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg # Do not use AUTOM4TE here, since maint.mk (my-distcheck) # checks if we are independent of Autoconf by defining AUTOM4TE (and # others) to `false'. Autoconf provides autom4te, so that doesn't # apply to us. MY_AUTOM4TE = \ autom4te_perllibdir='$(top_srcdir)'/lib \ AUTOM4TE_CFG='$(AUTOM4TE_CFG)' $(top_builddir)/bin/autom4te \ -B '$(top_builddir)'/lib -B '$(top_srcdir)'/lib # keep ` ' # 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 an end of line, hence # force an end of line when reporting errors. .m4.m4f: $(MY_AUTOM4TE) \ --language=$* \ --freeze \ --output=$@ # 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 = $(top_builddir)/bin/autom4te $(AUTOM4TE_CFG) # For parallel builds. $(build_libdir)/m4sugar/version.m4: cd $(build_libdir)/m4sugar && $(MAKE) $(AM_MAKEFLAGS) version.m4 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/erlang.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 ## --------------------------- ## ## Run ETAGS on some M4 code. ## ## --------------------------- ## 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/' ## -------------------------------- ## ## Looking for forbidden patterns. ## ## -------------------------------- ## 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: |" <forbidden.log >&2; \ echo >&2; \ exit 1; \ else \ rm -f forbidden.log; \ fi �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/emacs/��������������������������������������������������������������0000755�0001750�0001750�00000000000�11233220600�016062� 5����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/emacs/autoconf-mode.el����������������������������������������������0000644�0001750�0001750�00000010411�11233153352�021152� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; autoconf-mode.el --- autoconf code editing commands for Emacs ;; Author: Martin Buchholz (martin@xemacs.org) ;; Maintainer: Martin Buchholz ;; Keywords: languages, faces, m4, configure ;; This file is part of Autoconf ;; Copyright (C) 2001, 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA ;; 02110-1301, USA. ;; A major mode for editing autoconf input (like configure.in). ;; Derived from m4-mode.el by Andrew Csillag (drew@staff.prodigy.com) ;;; Your should add the following to your Emacs configuration file: ;; (autoload 'autoconf-mode "autoconf-mode" ;; "Major mode for editing autoconf files." t) ;; (setq auto-mode-alist ;; (cons '("\\.ac\\'\\|configure\\.in\\'" . autoconf-mode) ;; auto-mode-alist)) ;;; Code: ;;thank god for make-regexp.el! (defvar autoconf-font-lock-keywords `(("\\bdnl \\(.*\\)" 1 font-lock-comment-face t) ("\\$[0-9*#@]" . font-lock-variable-name-face) ("\\b\\(m4_\\)?\\(builtin\\|change\\(com\\|quote\\|word\\)\\|d\\(e\\(bug\\(file\\|mode\\)\\|cr\\|f\\(ine\\|n\\)\\)\\|iv\\(ert\\|num\\)\\|nl\\|umpdef\\)\\|e\\(rrprint\\|syscmd\\|val\\)\\|f\\(ile\\|ormat\\)\\|gnu\\|i\\(f\\(def\\|else\\)\\|n\\(c\\(lude\\|r\\)\\|d\\(ex\\|ir\\)\\)\\)\\|l\\(en\\|ine\\)\\|m\\(4\\(exit\\|wrap\\)\\|aketemp\\|kstemp\\)\\|p\\(atsubst\\|opdef\\|ushdef\\)\\|regexp\\|s\\(hift\\|include\\|ubstr\\|ys\\(cmd\\|val\\)\\)\\|tra\\(ceo\\(ff\\|n\\)\\|nslit\\)\\|un\\(d\\(efine\\|ivert\\)\\|ix\\)\\)\\b" . font-lock-keyword-face) ("^\\(\\(m4_\\)?define\\(_default\\)?\\|A._DEFUN\\|m4_defun\\(_once\\|_init\\)?\\)(\\[?\\([A-Za-z0-9_]+\\)" 5 font-lock-function-name-face) "default font-lock-keywords") ) (defvar autoconf-mode-syntax-table nil "syntax table used in autoconf mode") (setq autoconf-mode-syntax-table (make-syntax-table)) (modify-syntax-entry ?\" "\"" autoconf-mode-syntax-table) ;;(modify-syntax-entry ?\' "\"" autoconf-mode-syntax-table) (modify-syntax-entry ?# "<\n" autoconf-mode-syntax-table) (modify-syntax-entry ?\n ">#" autoconf-mode-syntax-table) (modify-syntax-entry ?\( "()" autoconf-mode-syntax-table) (modify-syntax-entry ?\) ")(" autoconf-mode-syntax-table) (modify-syntax-entry ?\[ "(]" autoconf-mode-syntax-table) (modify-syntax-entry ?\] ")[" autoconf-mode-syntax-table) (modify-syntax-entry ?* "." autoconf-mode-syntax-table) (modify-syntax-entry ?_ "_" autoconf-mode-syntax-table) (defvar autoconf-mode-map (let ((map (make-sparse-keymap))) (define-key map '[(control c) (\;)] 'comment-region) map)) (defun autoconf-current-defun () "Autoconf value for `add-log-current-defun-function'. This tells add-log.el how to find the current macro." (save-excursion (if (re-search-backward "^\\(m4_define\\(_default\\)?\\|m4_defun\\(_once\\|_init\\)?\\|A._DEFUN\\)(\\[*\\([A-Za-z0-9_]+\\)" nil t) (buffer-substring (match-beginning 4) (match-end 4)) nil))) ;;;###autoload (defun autoconf-mode () "A major-mode to edit Autoconf files like configure.ac. \\{autoconf-mode-map} " (interactive) (kill-all-local-variables) (use-local-map autoconf-mode-map) (make-local-variable 'add-log-current-defun-function) (setq add-log-current-defun-function 'autoconf-current-defun) (make-local-variable 'comment-start) (setq comment-start "# ") (make-local-variable 'parse-sexp-ignore-comments) (setq parse-sexp-ignore-comments t) (make-local-variable 'font-lock-defaults) (setq major-mode 'autoconf-mode) (setq mode-name "Autoconf") (setq font-lock-defaults `(autoconf-font-lock-keywords nil)) (set-syntax-table autoconf-mode-syntax-table) (run-hooks 'autoconf-mode-hook)) (provide 'autoconf-mode) ;;; autoconf-mode.el ends here �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/emacs/Makefile.am���������������������������������������������������0000644�0001750�0001750�00000000123�11202536433�020124� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Make Autoconf Emacs library. dist_lisp_LISP = autoconf-mode.el autotest-mode.el ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/emacs/Makefile.in���������������������������������������������������0000644�0001750�0001750�00000030054�11233217355�020146� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # Make Autoconf Emacs library. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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/emacs DIST_COMMON = $(dist_lisp_LISP) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(lispdir)" dist_lispLISP_INSTALL = $(INSTALL_DATA) LISP = $(dist_lisp_LISP) am__ELFILES = autoconf-mode.el autotest-mode.el am__ELCFILES = $(am__ELFILES:.el=.elc) ELCFILES = $(LISP:.el=.elc) elisp_comp = $(top_srcdir)/build-aux/elisp-comp 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_lisp_LISP = autoconf-mode.el autotest-mode.el all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/emacs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/emacs/Makefile .PRECIOUS: 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 $(am__aclocal_m4_deps): elc-stamp: $(LISP) @echo 'WARNING: Warnings can be ignored. :-)' @rm -f elc-temp && touch elc-temp if test "$(EMACS)" != no; then \ set x; \ list='$(LISP)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ set x "$$@" "$$d$$p"; shift; \ done; \ shift; \ EMACS="$(EMACS)" $(SHELL) $(elisp_comp) "$$@" || exit 1; \ else : ; fi @mv -f elc-temp $@ $(am__ELCFILES): elc-stamp @if test "$(EMACS)" != no && test ! -f $@; then \ trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \ if mkdir elc-lock 2>/dev/null; then \ rm -f elc-stamp; \ $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \ rmdir elc-lock; \ else \ while test -d elc-lock; do sleep 1; done; \ test -f elc-stamp; exit $$?; \ fi; \ else : ; fi install-dist_lispLISP: $(dist_lisp_LISP) $(ELCFILES) @$(NORMAL_INSTALL) @if test "$(EMACS)" != no && test -n "$(lispdir)"; then \ $(MKDIR_P) "$(DESTDIR)$(lispdir)"; \ list='$(dist_lisp_LISP)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ echo " $(dist_lispLISP_INSTALL) '$$d$$p' '$(DESTDIR)$(lispdir)/$$f'"; \ $(dist_lispLISP_INSTALL) "$$d$$p" "$(DESTDIR)$(lispdir)/$$f" || exit $$?; \ if test -f $${p}c; then \ echo " $(dist_lispLISP_INSTALL) '$${p}c' '$(DESTDIR)$(lispdir)/$${f}c'"; \ $(dist_lispLISP_INSTALL) "$${p}c" "$(DESTDIR)$(lispdir)/$${f}c" || exit $$?; \ else : ; fi; \ done; \ else : ; fi uninstall-dist_lispLISP: @$(NORMAL_UNINSTALL) @test "$(EMACS)" != no && test -n "$(lispdir)" || exit 0; \ list='$(dist_lisp_LISP)'; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ echo " ( cd '$(DESTDIR)$(lispdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(lispdir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(lispdir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(lispdir)" && rm -f $$filesc clean-lisp: -rm -f elc-stamp $(ELCFILES) tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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 $(LISP) $(ELCFILES) installdirs: for dir in "$(DESTDIR)$(lispdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 clean-lisp mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_lispLISP install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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_lispLISP .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-lisp \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dist_lispLISP install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-dist_lispLISP # 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.64_2.64+dfsg.orig/lib/emacs/autotest-mode.el����������������������������������������������0000644�0001750�0001750�00000007425�11202536434�021221� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; autotest-mode.el --- autotest code editing commands for Emacs ;; Author: Akim Demaille (akim@freefriends.org) ;; Keywords: languages, faces, m4, Autotest ;; This file is part of Autoconf ;; Copyright (C) 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., 51 Franklin Street, Fifth Floor, Boston, MA ;; 02110-1301, USA. ;;; Commentary: ;; A major mode for editing autotest input (like testsuite.at). ;; Derived from autoconf-mode.el, by Martin Buchholz (martin@xemacs.org). ;;; Your should add the following to your Emacs configuration file: ;; (autoload 'autotest-mode "autotest-mode" ;; "Major mode for editing autotest files." t) ;; (setq auto-mode-alist ;; (cons '("\\.at\\'" . autotest-mode) auto-mode-alist)) ;;; Code: (defvar autotest-font-lock-keywords `(("\\bdnl\\b\\(.*\\)" 1 font-lock-comment-face t) ("\\$[0-9*#@]" . font-lock-variable-name-face) ("^\\(m4_define\\|m4_defun\\)(\\[*\\([A-Za-z0-9_]+\\)" 2 font-lock-function-name-face) ("^AT_SETUP(\\[+\\([^]]+\\)" 1 font-lock-function-name-face) ("^AT_DATA(\\[+\\([^]]+\\)" 1 font-lock-variable-name-face) ("\\b\\(_?m4_[_a-z0-9]*\\|_?A[ST]_[_A-Z0-9]+\\)\\b" . font-lock-keyword-face) "default font-lock-keywords") ) (defvar autotest-mode-syntax-table nil "syntax table used in autotest mode") (setq autotest-mode-syntax-table (make-syntax-table)) (modify-syntax-entry ?\" "\"" autotest-mode-syntax-table) ;;(modify-syntax-entry ?\' "\"" autotest-mode-syntax-table) (modify-syntax-entry ?# "<\n" autotest-mode-syntax-table) (modify-syntax-entry ?\n ">#" autotest-mode-syntax-table) (modify-syntax-entry ?\( "()" autotest-mode-syntax-table) (modify-syntax-entry ?\) ")(" autotest-mode-syntax-table) (modify-syntax-entry ?\[ "(]" autotest-mode-syntax-table) (modify-syntax-entry ?\] ")[" autotest-mode-syntax-table) (modify-syntax-entry ?* "." autotest-mode-syntax-table) (modify-syntax-entry ?_ "_" autotest-mode-syntax-table) (defvar autotest-mode-map (let ((map (make-sparse-keymap))) (define-key map '[(control c) (\;)] 'comment-region) map)) (defun autotest-current-defun () "Autotest value for `add-log-current-defun-function'. This tells add-log.el how to find the current test group/macro." (save-excursion (if (re-search-backward "^\\(m4_define\\|m4_defun\\|AT_SETUP\\)(\\[+\\([^]]+\\)" nil t) (buffer-substring (match-beginning 2) (match-end 2)) nil))) ;;;###autoload (defun autotest-mode () "A major-mode to edit Autotest files like testsuite.at. \\{autotest-mode-map} " (interactive) (kill-all-local-variables) (use-local-map autotest-mode-map) (make-local-variable 'add-log-current-defun-function) (setq add-log-current-defun-function 'autotest-current-defun) (make-local-variable 'comment-start) (setq comment-start "# ") (make-local-variable 'parse-sexp-ignore-comments) (setq parse-sexp-ignore-comments t) (make-local-variable 'font-lock-defaults) (setq major-mode 'autotest-mode) (setq mode-name "Autotest") (setq font-lock-defaults `(autotest-font-lock-keywords nil)) (set-syntax-table autotest-mode-syntax-table) (run-hooks 'autotest-mode-hook)) (provide 'autotest-mode) ;;; autotest-mode.el ends here �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autotest/�����������������������������������������������������������0000755�0001750�0001750�00000000000�11233220576�016656� 5����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autotest/autotest.m4������������������������������������������������0000644�0001750�0001750�00000004727�11202536433�021000� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # M4 macros used in building test suites. # 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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. m4_include([autotest/general.m4]) �����������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autotest/Makefile.am������������������������������������������������0000644�0001750�0001750�00000002506�11202536433�020713� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Make Autotest library. # Copyright (C) 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 3 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, see <http://www.gnu.org/licenses/>. autotestlibdir = $(pkgdatadir)/autotest dist_autotestlib_DATA = autotest.m4 general.m4 nodist_autotestlib_DATA = autotest.m4f CLEANFILES = $(nodist_autotestlib_DATA) ## --------------- ## ## Building TAGS. ## ## --------------- ## TAGS_FILES = $(dist_autotestlib_DATA) ETAGS_ARGS = $(ETAGS_FOR_AUTOCONF) ## -------- ## ## Checks. ## ## -------- ## check-local: check-forbidden-patterns forbidden_patterns = -e '^_*EOF' -e ' cmp ' forbidden_patterns_files = $(dist_autotestlib_DATA) ## ------------------ ## ## The frozen files. ## ## ------------------ ## autotest.m4f: $(autotest_m4f_dependencies) include ../freeze.mk ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/lib/autotest/Makefile.in������������������������������������������������0000644�0001750�0001750�00000045172�11233217355�020735� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # Make Autotest library. # Copyright (C) 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 3 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, see <http://www.gnu.org/licenses/>. # Freeze M4 files. # Copyright (C) 2002, 2004, 2006, 2007, 2008 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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_autotestlib_DATA) $(srcdir)/../freeze.mk \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in subdir = lib/autotest ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/m4.m4 \ $(top_srcdir)/m4/make-case.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(autotestlibdir)" \ "$(DESTDIR)$(autotestlibdir)" DATA = $(dist_autotestlib_DATA) $(nodist_autotestlib_DATA) ETAGS = etags CTAGS = ctags 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@ EGREP = @EGREP@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ 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@ M4_DEBUGFILE = @M4_DEBUGFILE@ M4_GNU = @M4_GNU@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ ac_cv_sh_n_works = @ac_cv_sh_n_works@ ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ autotestlibdir = $(pkgdatadir)/autotest dist_autotestlib_DATA = autotest.m4 general.m4 nodist_autotestlib_DATA = autotest.m4f CLEANFILES = $(nodist_autotestlib_DATA) TAGS_FILES = $(dist_autotestlib_DATA) ETAGS_ARGS = $(ETAGS_FOR_AUTOCONF) forbidden_patterns = -e '^_*EOF' -e ' cmp ' forbidden_patterns_files = $(dist_autotestlib_DATA) SUFFIXES = .m4 .m4f AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg # Do not use AUTOM4TE here, since maint.mk (my-distcheck) # checks if we are independent of Autoconf by defining AUTOM4TE (and # others) to `false'. Autoconf provides autom4te, so that doesn't # apply to us. MY_AUTOM4TE = \ autom4te_perllibdir='$(top_srcdir)'/lib \ AUTOM4TE_CFG='$(AUTOM4TE_CFG)' $(top_builddir)/bin/autom4te \ -B '$(top_builddir)'/lib -B '$(top_srcdir)'/lib # keep ` ' # 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 = $(top_builddir)/bin/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/erlang.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: $(srcdir)/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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/autotest/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/autotest/Makefile .PRECIOUS: 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 $(am__aclocal_m4_deps): install-dist_autotestlibDATA: $(dist_autotestlib_DATA) @$(NORMAL_INSTALL) test -z "$(autotestlibdir)" || $(MKDIR_P) "$(DESTDIR)$(autotestlibdir)" @list='$(dist_autotestlib_DATA)'; test -n "$(autotestlibdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(autotestlibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(autotestlibdir)" || exit $$?; \ done uninstall-dist_autotestlibDATA: @$(NORMAL_UNINSTALL) @list='$(dist_autotestlib_DATA)'; test -n "$(autotestlibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(autotestlibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(autotestlibdir)" && rm -f $$files install-nodist_autotestlibDATA: $(nodist_autotestlib_DATA) @$(NORMAL_INSTALL) test -z "$(autotestlibdir)" || $(MKDIR_P) "$(DESTDIR)$(autotestlibdir)" @list='$(nodist_autotestlib_DATA)'; test -n "$(autotestlibdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(autotestlibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(autotestlibdir)" || exit $$?; \ done uninstall-nodist_autotestlibDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_autotestlib_DATA)'; test -n "$(autotestlibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(autotestlibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(autotestlibdir)" && rm -f $$files 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: for dir in "$(DESTDIR)$(autotestlibdir)" "$(DESTDIR)$(autotestlibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-am info-am: install-data-am: install-dist_autotestlibDATA \ install-nodist_autotestlibDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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_autotestlibDATA \ uninstall-nodist_autotestlibDATA .MAKE: check-am install-am install-strip .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_autotestlibDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nodist_autotestlibDATA install-pdf install-pdf-am \ install-ps install-ps-am 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_autotestlibDATA \ uninstall-nodist_autotestlibDATA check-local: check-forbidden-patterns autotest.m4f: $(autotest_m4f_dependencies) $(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 an 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: |" <forbidden.log >&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.64_2.64+dfsg.orig/lib/autotest/general.m4�������������������������������������������������0000644�0001750�0001750�00000215606�11227003457�020547� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is part of Autoconf. -*- Autoconf -*- # M4 macros used in building test suites. m4_define([_AT_COPYRIGHT_YEARS], [Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, 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. # _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-SANITIZE # 5. M4SH-INIT # 1000. BODY # # Defined below: # - DEFAULTS # Overall initialization, value of $at_groups_all. # - PARSE_ARGS_BEGIN # Setup defaults required for option processing. # - PARSE_ARGS # Option processing. After AT_INIT, user options can be entered here as # cases of a case statement. # - PARSE_ARGS_END # Finish up the option processing. # # - HELP # Start printing the help message. # - HELP_MODES # Modes help text. Additional modes can be appended as self-contained # cat'd here-docs as generated by AS_HELP_STRING. # - HELP_TUNING # Tuning help text. Additional tuning options can be appended as # self-contained cat'd here-docs as generated by AS_HELP_STRING. # - HELP_OTHER # User help can be appended to this as self-contained cat'd here-docs. # - HELP_END # Finish up the help texts. # # - VERSION # Head of the handling of --version. # - VERSION_NOTICES # Copyright notices for --version. # - VERSION_END # Tail of the handling of --version. # # - BANNERS # Output shell initialization for the associative array of banner text. # - TESTS_BEGIN # Like DEFAULTS but run after argument processing for purposes of # optimization. Do anything else that needs to be done to prepare for # tests. Sets up verbose and log file descriptors. Sets and logs PATH. # - PREPARE_TESTS # Declares functions shared among the tests. Perform any user # initialization to be shared among all tests. # - TESTS # The core of the test suite. # # - TEST_SCRIPT # The collector for code for each test, the ``normal'' diversion, but # undiverted into other locations before final output. # # - TEST_GROUPS # Contents of each test group. The tests deliberately occur after the # end of the shell script, so that the shell need not spend time parsing # commands it will not execute. m4_define([_m4_divert(DEFAULTS)], 100) m4_define([_m4_divert(PARSE_ARGS_BEGIN)], 200) m4_define([_m4_divert(PARSE_ARGS)], 201) m4_define([_m4_divert(PARSE_ARGS_END)], 202) m4_define([_m4_divert(HELP)], 300) m4_define([_m4_divert(HELP_MODES)], 301) m4_define([_m4_divert(HELP_TUNING)], 302) m4_define([_m4_divert(HELP_OTHER)], 303) m4_define([_m4_divert(HELP_END)], 304) m4_define([_m4_divert(VERSION)], 350) m4_define([_m4_divert(VERSION_NOTICES)], 351) m4_define([_m4_divert(VERSION_END)], 352) m4_define([_m4_divert(BANNERS)], 400) m4_define([_m4_divert(TESTS_BEGIN)], 401) m4_define([_m4_divert(PREPARE_TESTS)], 402) m4_define([_m4_divert(TESTS)], 403) m4_define([_m4_divert(TEST_SCRIPT)], 450) m4_define([_m4_divert(TEST_GROUPS)], 500) # AT_LINE # ------- # Return the current file sans directory, a colon, and the current # line. Be sure to return a _quoted_ file name, so if, for instance, # the user is lunatic enough to have a file named `dnl' (and I, for # one, love to be brainless and stubborn sometimes), then we return a # quoted name. # # Gee, we can't use simply # # m4_bpatsubst(__file__, [^.*/\(.*\)], [[\1]]) # # since then, since `dnl' doesn't match the pattern, it is returned # with once quotation level less, so you lose! And since GNU M4 # is one of the biggest junk in the whole universe wrt regexp, don't # even think about using `?' or `\?'. Bah, `*' will do. # Pleeeeeeeease, Gary, provide us with dirname and ERE! # # M4 recompiles the regular expression for every m4_bpatsubst, but __file__ # rarely changes. Be fast - only compute the dirname when necessary; for # autoconf alone, this shaves off several seconds in building testsuite. m4_define([_AT_LINE_file]) m4_define([_AT_LINE_base]) m4_define([AT_LINE], [m4_if(m4_defn([_AT_LINE_file]), __file__, [], [m4_do([m4_define([_AT_LINE_file], __file__)], [m4_define([_AT_LINE_base], m4_bregexp(/__file__, [/\([^/]*\)$], [[\1]]))])])dnl m4_defn([_AT_LINE_base]):__line__]) # _AT_LINE_ESCAPED # ---------------- # Same as AT_LINE, but already escaped for the shell. m4_define([_AT_LINE_ESCAPED], ["AS_ESCAPE(m4_dquote(AT_LINE))"]) # _AT_NORMALIZE_TEST_GROUP_NUMBER(SHELL-VAR) # ------------------------------------------ # Normalize SHELL-VAR so that its value has the same number of digits as # all the other test group numbers. m4_define([_AT_NORMALIZE_TEST_GROUP_NUMBER], [ eval 'while :; do case $$1 in #( '"$at_format"'*) break;; esac $1=0$$1 done' ]) # _AT_DEFINE_INIT(NAME, [DEFINITION]) # ----------------------------------- # Define macro NAME to die if invoked prior to AT_INIT, and to DEFINITION # after AT_INIT. m4_define([_AT_DEFINE_INIT], [m4_define($@)m4_pushdef([$1], [m4_fatal([$1: missing AT_INIT detected])])dnl m4_append([_AT_DEFINE_INIT_LIST], [[$1]], [,])]) # _AT_DEFINE_SETUP(NAME, [DEFINITION]) # ----------------------------------- # Define macro NAME to die if invoked outside AT_SETUP/AT_CLEANUP, and # to DEFINITION otherwise. m4_define([_AT_DEFINE_SETUP], [m4_define([$1], [m4_ifndef([AT_ingroup], [m4_fatal([$1: missing AT_SETUP detected])])$2])]) # AT_INIT([TESTSUITE-NAME]) # ------------------------- # Begin test suite. m4_define([AT_INIT], [m4_pushdef([AT_INIT], [m4_fatal([$0: invoked multiple times])])] [m4_pattern_forbid([^_?AT_])] [m4_pattern_allow([^_ATEOF$])] [m4_ifndef([AT_PACKAGE_BUGREPORT], [m4_fatal( [$1: AT_PACKAGE_BUGREPORT is missing, consider writing package.m4])])] [m4_define([AT_TESTSUITE_NAME], m4_defn([AT_PACKAGE_STRING])[ test suite]m4_ifval([$1], [m4_expand([: $1])]))] [m4_define([AT_ordinal], 0)] [m4_define([AT_banner_ordinal], 0)] [m4_define([AT_groups_all], [])] [m4_define([AT_help_all], [])] [m4_map_args([_m4_popdef], _AT_DEFINE_INIT_LIST)] [m4_wrap([_AT_FINISH])] [AS_INIT[]]dnl dnl We don't use m4sh's BODY diversion, but AS_INIT sticks a banner there. dnl This trick removes that banner, since it adds nothing to autotest. [m4_cleardivert([BODY])]dnl [AS_ME_PREPARE[]]dnl [m4_divert_push([DEFAULTS])]dnl [AT_COPYRIGHT(m4_defn([_AT_COPYRIGHT_YEARS]), [ m4_copyright_condense])] [AT_COPYRIGHT( [This test suite is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it.], [m4_echo])] [AS_PREPARE SHELL=${CONFIG_SHELL-/bin/sh} # How were we run? at_cli_args="$[@]" m4_divert_push([BANNERS])dnl # Should we print banners? at_groups is space-separated for entire test, # newline-separated if only a subset of the testsuite is run. case $at_groups in *' '*' '* | *"$as_nl"*"$as_nl"* ) at_print_banners=: ;; * ) at_print_banners=false ;; esac # Text for banner N, set to empty once printed. m4_divert_pop([BANNERS])dnl back to DEFAULTS m4_divert_push([PREPARE_TESTS])dnl m4_text_box([Autotest shell functions.]) AS_FUNCTION_DESCRIBE([at_fn_banner], [NUMBER], [Output banner NUMBER, provided the testsuite is running multiple groups and this particular banner has not yet been printed.]) at_fn_banner () { $at_print_banners || return 0 eval at_banner_text=\$at_banner_text_$[1] test "x$at_banner_text" = x && return 0 eval at_banner_text_$[1]= AS_ECHO(["$as_nl$at_banner_text$as_nl"]) } # at_fn_banner AS_FUNCTION_DESCRIBE([at_fn_check_prepare_notrace], [REASON LINE], [Perform AT_CHECK preparations for the command at LINE for an untraceable command; REASON is the reason for disabling tracing.]) at_fn_check_prepare_notrace () { $at_trace_echo "Not enabling shell tracing (command contains $[1])" AS_ECHO(["$[2]"]) >"$at_check_line_file" at_check_trace=: at_check_filter=: : >"$at_stdout"; : >"$at_stderr" } AS_FUNCTION_DESCRIBE([at_fn_check_prepare_trace], [LINE], [Perform AT_CHECK preparations for the command at LINE for a traceable command.]) at_fn_check_prepare_trace () { AS_ECHO(["$[1]"]) >"$at_check_line_file" at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace : >"$at_stdout"; : >"$at_stderr" } AS_FUNCTION_DESCRIBE([at_fn_check_prepare_dynamic], [COMMAND LINE], [Decide if COMMAND at LINE is traceable at runtime, and call the appropriate preparation function.]) at_fn_check_prepare_dynamic () { case $[1] in *$as_nl*) at_fn_check_prepare_notrace 'an embedded newline' "$[2]" ;; *) at_fn_check_prepare_trace "$[2]" ;; esac } AS_FUNCTION_DESCRIBE([at_fn_filter_trace], [], [Remove the lines in the file "$at_stderr" generated by "set -x" and print them to stderr.]) at_fn_filter_trace () { mv "$at_stderr" "$at_stder1" grep '^ *+' "$at_stder1" >&2 grep -v '^ *+' "$at_stder1" >"$at_stderr" } AS_FUNCTION_DESCRIBE([at_fn_log_failure], [FILE-LIST], [Copy the files in the list on stdout with a "> " prefix, and exit the shell with a failure exit code.]) at_fn_log_failure () { for file do AS_ECHO(["$file:"]); sed 's/^/> /' "$file"; done echo 1 > "$at_status_file" exit 1 } AS_FUNCTION_DESCRIBE([at_fn_check_skip], [EXIT-CODE LINE], [Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit the test group subshell with that same exit code. Use LINE in any report about test failure.]) at_fn_check_skip () { case $[1] in 99) echo 99 > "$at_status_file"; at_failed=: AS_ECHO(["$[2]: hard failure"]); exit 99;; 77) echo 77 > "$at_status_file"; exit 77;; esac } AS_FUNCTION_DESCRIBE([at_fn_check_status], [EXPECTED EXIT-CODE LINE], [Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing. Otherwise, if it is 77 or 99, exit the test group subshell with that same exit code; if it is anything else print an error message referring to LINE, and fail the test.]) at_fn_check_status () { dnl This order ensures that we don't `skip' if we are precisely checking dnl $? = 77 or $? = 99. case $[2] in $[1] ) ;; 77) echo 77 > "$at_status_file"; exit 77;; 99) echo 99 > "$at_status_file"; at_failed=: AS_ECHO(["$[3]: hard failure"]); exit 99;; *) AS_ECHO(["$[3]: exit code was $[2], expected $[1]"]) at_failed=:;; esac } AS_FUNCTION_DESCRIBE([at_fn_diff_devnull], [FILE], [Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff invocations.]) at_fn_diff_devnull () { test -s "$[1]" || return 0 $at_diff "$at_devnull" "$[1]" } AS_FUNCTION_DESCRIBE([at_fn_test], [NUMBER], [Parse out test NUMBER from the tail of this file.]) at_fn_test () { eval at_sed=\$at_sed$[1] sed "$at_sed" "$at_myself" > "$at_test_source" } AS_FUNCTION_DESCRIBE([at_fn_create_debugging_script], [], [Create the debugging script $at_group_dir/run which will reproduce the current test group.]) at_fn_create_debugging_script () { { echo "#! /bin/sh" && echo 'test "${ZSH_VERSION+set}" = set dnl && alias -g '\''${1+"$[@]"}'\''='\''"$[@]"'\''' && AS_ECHO(["cd '$at_dir'"]) && AS_ECHO(["exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d ]dnl [$at_debug_args $at_group \${1+\"\$[@]\"}"]) && echo 'exit 1' } >"$at_group_dir/run" && chmod +x "$at_group_dir/run" } m4_text_box([End of autotest shell functions.]) m4_divert_pop([PREPARE_TESTS])dnl back to DEFAULTS # Not all shells have the 'times' builtin; the subshell is needed to make # sure we discard the 'times: not found' message from the shell. at_times_p=false (times) >/dev/null 2>&1 && at_times_p=: # CLI Arguments to pass to the debugging scripts. at_debug_args= # -e sets to true at_errexit_p=false # Shall we be verbose? ':' means no, empty means yes. at_verbose=: at_quiet= # Running several jobs in parallel, 0 means as many as test groups. at_jobs=1 at_traceon=: at_trace_echo=: at_check_filter_trace=: # Shall we keep the debug scripts? Must be `:' when the suite is # run by a debug script, so that the script doesn't remove itself. at_debug_p=false # Display help message? at_help_p=false # Display the version message? at_version_p=false # List test groups? at_list_p=false # --clean at_clean=false # Test groups to run at_groups= # Whether a write failure occurred at_write_fail=0 # The directory we run the suite in. Default to . if no -C option. at_dir=`pwd` # An absolute reference to this testsuite script. dnl m4-double quote, to preserve [] [case $as_myself in [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;; * ) at_myself=$at_dir/$as_myself ;; esac] # Whether -C is in effect. at_change_dir=false m4_divert_pop([DEFAULTS])dnl m4_define([_AT_FINISH], [m4_ifdef([AT_ingroup], [m4_fatal([missing AT_CLEANUP detected])])dnl m4_divert_text([DEFAULTS], [ # List of the tested programs. at_tested='m4_ifdef([AT_tested], [m4_translit(m4_dquote(m4_defn([AT_tested])), [ ], m4_newline)])' # List of the all the test groups. at_groups_all='AT_groups_all' # As many question marks as there are digits in the last test group number. # Used to normalize the test group numbers so that `ls' lists them in # numerical order. at_format='m4_bpatsubst(m4_defn([AT_ordinal]), [.], [?])' # Description of all the test groups. at_help_all="AS_ESCAPE(m4_dquote(m4_defn([AT_help_all])))" AS_FUNCTION_DESCRIBE([at_fn_validate_ranges], [NAME...], [Validate and normalize the test group number contained in each variable NAME. Leading zeroes are treated as decimal.]) at_fn_validate_ranges () { for at_grp do eval at_value=\$$at_grp if test $at_value -lt 1 || test $at_value -gt AT_ordinal; then AS_ECHO(["invalid test group: $at_value"]) >&2 exit 1 fi case $at_value in 0*) # We want to treat leading 0 as decimal, like expr and test, but # AS_VAR_ARITH treats it as octal if it uses $(( )). # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the # expr fork, but it is not worth the effort to determine if the # shell supports XSI when the user can just avoid leading 0. eval $at_grp='`expr $at_value + 0`' ;; esac done }])])dnl m4_divert_push([PARSE_ARGS])dnl at_prev= for at_option do # If the previous option needs an argument, assign it. if test -n "$at_prev"; then at_option=$at_prev=$at_option at_prev= fi case $at_option in *=*) at_optarg=`expr "x$at_option" : 'x[[^=]]*=\(.*\)'` ;; *) at_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $at_option in --help | -h ) at_help_p=: ;; --list | -l ) at_list_p=: ;; --version | -V ) at_version_p=: ;; --clean | -c ) at_clean=: ;; --debug | -d ) at_debug_p=: ;; --errexit | -e ) at_debug_p=: at_errexit_p=: ;; --verbose | -v ) at_verbose=; at_quiet=: ;; --trace | -x ) at_traceon='set -x' at_trace_echo=echo at_check_filter_trace=at_fn_filter_trace ;; [[0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]]) at_fn_validate_ranges at_option AS_VAR_APPEND([at_groups], ["$at_option "]) ;; # Ranges [[0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-]) at_range_start=`echo $at_option |tr -d X-` at_fn_validate_ranges at_range_start at_range=`AS_ECHO([" $at_groups_all "]) | \ sed -e 's/^.* \('$at_range_start' \)/\1/'` AS_VAR_APPEND([at_groups], ["$at_range "]) ;; [-[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]]) at_range_end=`echo $at_option |tr -d X-` at_fn_validate_ranges at_range_end at_range=`AS_ECHO([" $at_groups_all "]) | \ sed -e 's/\( '$at_range_end'\) .*$/\1/'` AS_VAR_APPEND([at_groups], ["$at_range "]) ;; [[0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9]] | \ [[0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9]] | \ [[0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9]] | \ [[0-9][0-9][0-9]-[0-9][0-9][0-9]] | \ [[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]] | \ [[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]] ) at_range_start=`expr $at_option : '\(.*\)-'` at_range_end=`expr $at_option : '.*-\(.*\)'` if test $at_range_start -gt $at_range_end; then at_tmp=$at_range_end at_range_end=$at_range_start at_range_start=$at_tmp fi at_fn_validate_ranges at_range_start at_range_end at_range=`AS_ECHO([" $at_groups_all "]) | \ sed -e 's/^.*\( '$at_range_start' \)/\1/' \ -e 's/\( '$at_range_end'\) .*$/\1/'` AS_VAR_APPEND([at_groups], ["$at_range "]) ;; # Directory selection. --directory | -C ) at_prev=--directory ;; --directory=* ) at_change_dir=: at_dir=$at_optarg ;; # Parallel execution. --jobs | -j ) at_jobs=0 ;; --jobs=* | -j[[0-9]]* ) if test -n "$at_optarg"; then at_jobs=$at_optarg else at_jobs=`expr X$at_option : 'X-j\(.*\)'` fi case $at_jobs in *[[!0-9]]*) at_optname=`echo " $at_option" | sed 's/^ //; s/[[0-9=]].*//'` AS_ERROR([non-numeric argument to $at_optname: $at_jobs]) ;; esac ;; # Keywords. --keywords | -k ) at_prev=--keywords ;; --keywords=* ) at_groups_selected=$at_help_all at_save_IFS=$IFS IFS=, set X $at_optarg shift IFS=$at_save_IFS for at_keyword do at_invert= case $at_keyword in '!'*) at_invert="-v" at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'` ;; esac # It is on purpose that we match the test group titles too. at_groups_selected=`AS_ECHO(["$at_groups_selected"]) | grep -i $at_invert ["^[1-9][^;]*;.*[; ]$at_keyword[ ;]"]` done # Smash the newlines. at_groups_selected=`AS_ECHO(["$at_groups_selected"]) | sed 's/;.*//' | tr "$as_nl" ' ' ` AS_VAR_APPEND([at_groups], ["$at_groups_selected "]) ;; m4_divert_pop([PARSE_ARGS])dnl dnl Process *=* last to allow for user specified --option=* type arguments. m4_divert_push([PARSE_ARGS_END])dnl *=*) at_envvar=`expr "x$at_option" : 'x\([[^=]]*\)='` # Reject names that are not valid shell variable names. case $at_envvar in '' | [[0-9]]* | *[[!_$as_cr_alnum]]* ) AS_ERROR([invalid variable name: `$at_envvar']) ;; esac at_value=`AS_ECHO(["$at_optarg"]) | sed "s/'/'\\\\\\\\''/g"` # Export now, but save eval for later and for debug scripts. export $at_envvar AS_VAR_APPEND([at_debug_args], [" $at_envvar='$at_value'"]) ;; *) AS_ECHO(["$as_me: invalid option: $at_option"]) >&2 AS_ECHO(["Try \`$[0] --help' for more information."]) >&2 exit 1 ;; esac done # Verify our last option didn't require an argument AS_IF([test -n "$at_prev"], [AS_ERROR([`$at_prev' requires an argument.])]) # Selected test groups. if test -z "$at_groups"; then at_groups=$at_groups_all else # Sort the tests, removing duplicates. at_groups=`AS_ECHO(["$at_groups"]) | tr ' ' "$as_nl" | sort -nu` fi m4_divert_pop([PARSE_ARGS_END])dnl m4_divert_push([HELP])dnl # Help message. if $at_help_p; then cat <<_ATEOF || at_write_fail=1 Usage: $[0] [[OPTION]... [VARIABLE=VALUE]... [TESTS]] Run all the tests, or the selected TESTS, given by numeric ranges, and save a detailed log file. Upon failure, create debugging scripts. Do not change environment variables directly. Instead, set them via command line arguments. Set \`AUTOTEST_PATH' to select the executables to exercise. Each relative directory is expanded as build and source directories relative to the top level of this distribution. E.g., from within the build directory /tmp/foo-1.0, invoking this: $ $[0] AUTOTEST_PATH=bin is equivalent to the following, assuming the source directory is /src/foo-1.0: PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $[0] _ATEOF m4_divert_pop([HELP])dnl m4_divert_push([HELP_MODES])dnl cat <<_ATEOF || at_write_fail=1 Operation modes: -h, --help print the help message, then exit -V, --version print version number, then exit -c, --clean remove all the files this test suite might create and exit -l, --list describes all the tests, or the selected TESTS _ATEOF m4_divert_pop([HELP_MODES])dnl m4_divert_push([HELP_TUNING])dnl cat <<_ATEOF || at_write_fail=1 dnl extra quoting prevents emacs whitespace mode from putting tabs in output Execution tuning: -C, --directory=DIR [ change to directory DIR before starting] -j, --jobs[[=N]] [ Allow N jobs at once; infinite jobs with no arg (default 1)] -k, --keywords=KEYWORDS [ select the tests matching all the comma-separated KEYWORDS] [ multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD] -e, --errexit abort as soon as a test fails; implies --debug -v, --verbose force more detailed output [ default for debugging scripts] -d, --debug inhibit clean up and top-level logging [ default for debugging scripts] -x, --trace enable tests shell tracing _ATEOF m4_divert_pop([HELP_TUNING])dnl m4_divert_push([HELP_END])dnl cat <<_ATEOF || at_write_fail=1 Report bugs to <AT_PACKAGE_BUGREPORT>.dnl m4_ifdef([AT_PACKAGE_NAME], [m4_ifset([AT_PACKAGE_URL], [ m4_defn([AT_PACKAGE_NAME]) home page: <AT_PACKAGE_URL>.])dnl m4_if(m4_index(m4_defn([AT_PACKAGE_NAME]), [GNU ]), [0], [ General help using GNU software: <http://www.gnu.org/gethelp/>.])]) _ATEOF exit $at_write_fail fi # List of tests. if $at_list_p; then cat <<_ATEOF || at_write_fail=1 AT_TESTSUITE_NAME test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME KEYWORDS _ATEOF # Passing at_groups is tricky. We cannot use it to form a literal string # or regexp because of the limitation of AIX awk. And Solaris' awk # doesn't grok more than 99 fields in a record, so we have to use `split'. # at_groups needs to be space-separated for this script to work. case $at_groups in *"$as_nl"* ) at_groups=`AS_ECHO(["$at_groups"]) | tr "$as_nl" ' '` ;; esac AS_ECHO(["$at_groups$as_nl$at_help_all"]) | awk 'BEGIN { FS = ";" } NR == 1 { for (n = split ($ 0, a, " "); n; n--) selected[[a[n]]] = 1 next } NF > 0 { if (selected[[$ 1]]) { printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 if ($ 4) { lmax = 79 indent = " " line = indent len = length (line) n = split ($ 4, a, " ") for (i = 1; i <= n; i++) { l = length (a[[i]]) + 1 if (i > 1 && len + l > lmax) { print line line = indent " " a[[i]] len = length (line) } else { line = line " " a[[i]] len += l } } if (n) print line } } }' || at_write_fail=1 exit $at_write_fail fi m4_divert_pop([HELP_END])dnl m4_divert_push([VERSION])dnl if $at_version_p; then AS_ECHO(["$as_me (AT_PACKAGE_STRING)"]) && cat <<\_ATEOF || at_write_fail=1 m4_divert_pop([VERSION])dnl m4_divert_push([VERSION_END])dnl _ATEOF exit $at_write_fail fi m4_divert_pop([VERSION_END])dnl m4_divert_push([TESTS_BEGIN])dnl # Take any -C into account. if $at_change_dir ; then if test x- = "x$at_dir" ; then at_dir=./- fi test x != "x$at_dir" && cd "$at_dir" \ || AS_ERROR([unable to change directory]) at_dir=`pwd` fi # Load the config files for any default variable assignments. for at_file in atconfig atlocal do test -r $at_file || continue . ./$at_file || AS_ERROR([invalid content: $at_file]) done # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: : ${at_top_build_prefix=$at_top_builddir} # Perform any assignments requested during argument parsing. eval "$at_debug_args" # atconfig delivers names relative to the directory the test suite is # in, but the groups themselves are run in testsuite-dir/group-dir. if test -n "$at_top_srcdir"; then builddir=../.. for at_dir_var in srcdir top_srcdir top_build_prefix do AS_VAR_COPY([at_val], [at_$at_dir_var]) case $at_val in [[\\/$]]* | ?:[[\\/]]* ) at_prefix= ;; *) at_prefix=../../ ;; esac AS_VAR_SET([$at_dir_var], [$at_prefix$at_val]) done fi m4_text_box([Directory structure.]) # This is the set of directories and files used by this script # (non-literals are capitalized): # # TESTSUITE - the testsuite # TESTSUITE.log - summarizes the complete testsuite run # TESTSUITE.dir/ - created during a run, remains after -d or failed test # + at-groups/ - during a run: status of all groups in run # | + NNN/ - during a run: meta-data about test group NNN # | | + check-line - location (source file and line) of current AT_CHECK # | | + status - exit status of current AT_CHECK # | | + stdout - stdout of current AT_CHECK # | | + stder1 - stderr, including trace # | | + stderr - stderr, with trace filtered out # | | + test-source - portion of testsuite that defines group # | | + times - timestamps for computing duration # | | + pass - created if group passed # | | + xpass - created if group xpassed # | | + fail - created if group failed # | | + xfail - created if group xfailed # | | + skip - created if group skipped # + at-stop - during a run: end the run if this file exists # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction # + 0..NNN/ - created for each group NNN, remains after -d or failed test # | + TESTSUITE.log - summarizes the group results # | + ... - files created during the group # The directory the whole suite works in. # Should be absolute to let the user `cd' at will. at_suite_dir=$at_dir/$as_me.dir # The file containing the suite. at_suite_log=$at_dir/$as_me.log # The directory containing helper files per test group. at_helper_dir=$at_suite_dir/at-groups # Stop file: if it exists, do not start new jobs. at_stop_file=$at_suite_dir/at-stop # The fifo used for the job dispatcher. at_job_fifo=$at_suite_dir/at-job-fifo if $at_clean; then test -d "$at_suite_dir" && find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; rm -f -r "$at_suite_dir" "$at_suite_log" exit $? fi # Don't take risks: use only absolute directories in PATH. # # For stand-alone test suites (ie. atconfig was not found), # AUTOTEST_PATH is relative to `.'. # # For embedded test suites, AUTOTEST_PATH is relative to the top level # of the package. Then expand it into build/src parts, since users # may create executables in both places. AUTOTEST_PATH=`AS_ECHO(["$AUTOTEST_PATH"]) | sed "s|:|$PATH_SEPARATOR|g"` at_path= _AS_PATH_WALK([$AUTOTEST_PATH $PATH], [test -n "$at_path" && AS_VAR_APPEND([at_path], [$PATH_SEPARATOR]) case $as_dir in [[\\/]]* | ?:[[\\/]]* ) AS_VAR_APPEND([at_path], ["$as_dir"]) ;; * ) if test -z "$at_top_build_prefix"; then # Stand-alone test suite. AS_VAR_APPEND([at_path], ["$as_dir"]) else # Embedded test suite. AS_VAR_APPEND([at_path], ["$at_top_build_prefix$as_dir$PATH_SEPARATOR"]) AS_VAR_APPEND([at_path], ["$at_top_srcdir/$as_dir"]) fi ;; esac]) # Now build and simplify PATH. # # There might be directories that don't exist, but don't redirect # builtins' (eg., cd) stderr directly: Ultrix's sh hates that. at_new_path= _AS_PATH_WALK([$at_path], [test -d "$as_dir" || continue case $as_dir in [[\\/]]* | ?:[[\\/]]* ) ;; * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;; esac case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; *) AS_VAR_APPEND([at_new_path], ["$PATH_SEPARATOR$as_dir"]) ;; esac]) PATH=$at_new_path export PATH # Setting up the FDs. m4_define([AS_MESSAGE_LOG_FD], [5]) m4_define([AT_JOB_FIFO_FD], [6]) [#] AS_MESSAGE_LOG_FD is the log file. Not to be overwritten if `-d'. if $at_debug_p; then at_suite_log=/dev/null else : >"$at_suite_log" fi exec AS_MESSAGE_LOG_FD>>"$at_suite_log" # Banners and logs. AS_BOX(m4_defn([AT_TESTSUITE_NAME])[.]) { AS_BOX(m4_defn([AT_TESTSUITE_NAME])[.]) echo AS_ECHO(["$as_me: command line was:"]) AS_ECHO([" \$ $[0] $at_cli_args"]) echo # Try to find a few ChangeLogs in case it might help determining the # exact version. Use the relative dir: if the top dir is a symlink, # find will not follow it (and options to follow the links are not # portable), which would result in no output here. Prune directories # matching the package tarname, since they tend to be leftovers from # `make dist' or `make distcheck' and contain redundant or stale logs. if test -n "$at_top_srcdir"; then AS_BOX([ChangeLogs.]) echo for at_file in `find "$at_top_srcdir" m4_ifdef([AT_PACKAGE_TARNAME], [-name "AT_PACKAGE_TARNAME-*" -prune -o ])-name ChangeLog -print` do AS_ECHO(["$as_me: $at_file:"]) sed 's/^/| /;10q' $at_file echo done fi AS_UNAME echo # Contents of the config files. for at_file in atconfig atlocal do test -r $at_file || continue AS_ECHO(["$as_me: $at_file:"]) sed 's/^/| /' $at_file echo done } >&AS_MESSAGE_LOG_FD m4_divert_pop([TESTS_BEGIN])dnl m4_divert_push([PREPARE_TESTS])dnl { AS_BOX([Tested programs.]) echo } >&AS_MESSAGE_LOG_FD # Report what programs are being tested. for at_program in : $at_tested do test "$at_program" = : && continue _AS_PATH_WALK([$PATH], [test -f "$as_dir/$at_program" && break]) if test -f "$as_dir/$at_program"; then { AS_ECHO(["$at_srcdir/AT_LINE: $as_dir/$at_program --version"]) "$as_dir/$at_program" --version </dev/null echo } >&AS_MESSAGE_LOG_FD 2>&1 else AS_ERROR([cannot find $at_program]) fi done { AS_BOX([Running the tests.]) } >&AS_MESSAGE_LOG_FD at_start_date=`date` at_start_time=`date +%s 2>/dev/null` AS_ECHO(["$as_me: starting at: $at_start_date"]) >&AS_MESSAGE_LOG_FD m4_divert_pop([PREPARE_TESTS])dnl m4_divert_push([TESTS])dnl # Create the master directory if it doesn't already exist. AS_MKDIR_P(["$at_suite_dir"]) || AS_ERROR([cannot create `$at_suite_dir']) # Can we diff with `/dev/null'? DU 5.0 refuses. if diff /dev/null /dev/null >/dev/null 2>&1; then at_devnull=/dev/null else at_devnull=$at_suite_dir/devnull >"$at_devnull" fi # Use `diff -u' when possible. if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff" then at_diff='diff -u' else at_diff=diff fi # Get the last needed group. for at_group in : $at_groups; do :; done # Extract the start and end lines of each test group at the tail # of this file awk ' BEGIN { FS="" } /^@%:@AT_START_/ { start = NR } /^@%:@AT_STOP_/ { test = substr ($ 0, 10) print "at_sed" test "=\"1," start "d;" (NR-1) "q\"" if (test == "'"$at_group"'") exit }' "$at_myself" > "$at_suite_dir/at-source-lines" && . "$at_suite_dir/at-source-lines" || AS_ERROR([cannot create test line number cache]) rm -f "$at_suite_dir/at-source-lines" # Set number of jobs for `-j'; avoid more jobs than test groups. set X $at_groups; shift; at_max_jobs=$[@%:@] if test $at_max_jobs -eq 0; then at_jobs=1 fi if test $at_jobs -ne 1 && { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then at_jobs=$at_max_jobs fi # If parallel mode, don't output banners, don't split summary lines. if test $at_jobs -ne 1; then at_print_banners=false at_quiet=: fi # Set up helper dirs. rm -rf "$at_helper_dir" && mkdir "$at_helper_dir" && cd "$at_helper_dir" && { test -z "$at_groups" || mkdir $at_groups; } || AS_ERROR([testsuite directory setup failed]) # Functions for running a test group. We leave the actual # test group execution outside of a shell function in order # to avoid hitting zsh 4.x exit status bugs. AS_FUNCTION_DESCRIBE([at_fn_group_prepare], [], [Prepare running a test group.]) at_fn_group_prepare () { # The directory for additional per-group helper files. at_job_dir=$at_helper_dir/$at_group # The file containing the location of the last AT_CHECK. at_check_line_file=$at_job_dir/check-line # The file containing the exit status of the last command. at_status_file=$at_job_dir/status # The files containing the output of the tested commands. at_stdout=$at_job_dir/stdout at_stder1=$at_job_dir/stder1 at_stderr=$at_job_dir/stderr # The file containing the code for a test group. at_test_source=$at_job_dir/test-source # The file containing dates. at_times_file=$at_job_dir/times # Be sure to come back to the top test directory. cd "$at_suite_dir" # Clearly separate the test groups when verbose. $at_first || $at_verbose echo at_group_normalized=$at_group _AT_NORMALIZE_TEST_GROUP_NUMBER(at_group_normalized) # Create a fresh directory for the next test group, and enter. # If one already exists, the user may have invoked ./run from # within that directory; we remove the contents, but not the # directory itself, so that we aren't pulling the rug out from # under the shell's notion of the current directory. at_group_dir=$at_suite_dir/$at_group_normalized at_group_log=$at_group_dir/$as_me.log _AS_CLEAN_DIR("$at_group_dir") || AS_WARN([test directory for $at_group_normalized could not be cleaned.]) # Be tolerant if the above `rm' was not able to remove the directory. AS_MKDIR_P(["$at_group_dir"]) echo 0 > "$at_status_file" # In verbose mode, append to the log file *and* show on # the standard output; in quiet mode only write to the log. if test -z "$at_verbose"; then at_tee_pipe='tee -a "$at_group_log"' else at_tee_pipe='cat >> "$at_group_log"' fi } AS_FUNCTION_DESCRIBE([at_fn_group_postprocess], [], [Perform cleanup after running a test group.]) at_fn_group_postprocess () { # Be sure to come back to the suite directory, in particular # since below we might `rm' the group directory we are in currently. cd "$at_suite_dir" if test ! -f "$at_check_line_file"; then sed "s/^ */$as_me: WARNING: /" <<_ATEOF A failure happened in a test group before any test could be run. This means that test suite is improperly designed. Please report this failure to <AT_PACKAGE_BUGREPORT>. _ATEOF AS_ECHO(["$at_setup_line"]) >"$at_check_line_file" at_status=99 fi $at_verbose AS_ECHO_N(["$at_group. $at_setup_line: "]) AS_ECHO_N(["$at_group. $at_setup_line: "]) >> "$at_group_log" case $at_xfail:$at_status in *:99) at_msg='FAILED ('`cat "$at_check_line_file"`')' at_res=fail at_errexit=$at_errexit_p ;; yes:0) at_msg="UNEXPECTED PASS" at_res=xpass at_errexit=$at_errexit_p ;; no:0) at_msg="ok" at_res=pass at_errexit=false ;; *:77) at_msg='skipped ('`cat "$at_check_line_file"`')' at_res=skip at_errexit=false ;; yes:*) at_msg='expected failure ('`cat "$at_check_line_file"`')' at_res=xfail at_errexit=false ;; no:*) at_msg='FAILED ('`cat "$at_check_line_file"`')' at_res=fail at_errexit=$at_errexit_p ;; esac echo "$at_res" > "$at_job_dir/$at_res" # In parallel mode, output the summary line only afterwards. if test $at_jobs -ne 1 && test -n "$at_verbose"; then AS_ECHO(["$at_desc_line $at_msg"]) else # Make sure there is a separator even with long titles. AS_ECHO([" $at_msg"]) fi at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" case $at_status in 0|77) # $at_times_file is only available if the group succeeded. # We're not including the group log, so the success message # is written in the global log separately. But we also # write to the group log in case they're using -d. if test -f "$at_times_file"; then at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')' rm -f "$at_times_file" fi AS_ECHO(["$at_log_msg"]) >> "$at_group_log" AS_ECHO(["$at_log_msg"]) >&AS_MESSAGE_LOG_FD # Cleanup the group directory, unless the user wants the files. if $at_debug_p; then at_fn_create_debugging_script else if test -d "$at_group_dir"; then find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; rm -fr "$at_group_dir" fi rm -f "$at_test_source" fi ;; *) # Upon failure, include the log into the testsuite's global # log. The failure message is written in the group log. It # is later included in the global log. AS_ECHO(["$at_log_msg"]) >> "$at_group_log" # Upon failure, keep the group directory for autopsy, and create # the debugging script. With -e, do not start any further tests. at_fn_create_debugging_script if $at_errexit; then echo stop > "$at_stop_file" fi ;; esac } m4_text_box([Driver loop.]) dnl Catching signals correctly: dnl dnl The first idea was: trap the signal, send it to all spawned jobs, dnl then reset the handler and reraise the signal for ourselves. dnl However, before exiting, ksh will then send the signal to all dnl process group members, potentially killing the outer testsuite dnl and/or the 'make' process driving us. dnl So now the strategy is: trap the signal, send it to all spawned jobs, dnl then exit the script with the right status. dnl dnl In order to let the jobs know about the signal, we cannot just send it dnl to the current process group (kill $SIG 0), for the same reason as above. dnl Also, it does not reliably stop the suite to send the signal to the dnl spawned processes, because they might not transport it further dnl (maybe this can be fixed?). dnl dnl So what we do is enable shell job control if available, which causes the dnl shell to start each parallel task as its own shell job, thus as a new dnl process group leader. We then send the signal to all new process groups. dnl Do we have job control? if (set -m && set +m && set +b) >/dev/null 2>&1; then set +b at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=- else at_job_control_on=: at_job_control_off=: at_job_group= fi for at_signal in 1 2 15; do dnl This signal handler is not suitable for PIPE: it causes writes. dnl The code that was interrupted may have the errexit, monitor, or xtrace dnl flags enabled, so sanitize. trap 'set +x; set +e $at_job_control_off at_signal='"$at_signal"' dnl Safety belt: even with runaway processes, prevent starting new jobs. echo stop > "$at_stop_file" dnl Do not enter this area multiple times, do not kill self prematurely. trap "" $at_signal dnl Gather process group IDs of currently running jobs. at_pgids= for at_pgid in `jobs -p 2>/dev/null`; do at_pgids="$at_pgids $at_job_group$at_pgid" done dnl Ignore `kill' errors, as some jobs may have finished in the meantime. test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null dnl wait until all jobs have exited. wait dnl Status output. Do this after waiting for the jobs, for ordered output. dnl Avoid scribbling onto the end of a possibly incomplete line. if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then echo >&2 fi at_signame=`kill -l $at_signal 2>&1 || echo $at_signal` set x $at_signame test $# -gt 2 && at_signame=$at_signal AS_WARN([caught signal $at_signame, bailing out]) dnl Do not reinstall the default handler here and reraise the signal to dnl let the default handler do its job, see the note about ksh above. dnl trap - $at_signal dnl kill -$at_signal $$ dnl Instead, exit with appropriate status. AS_VAR_ARITH([exit_status], [128 + $at_signal]) AS_EXIT([$exit_status])' $at_signal done rm -f "$at_stop_file" at_first=: if test $at_jobs -ne 1 && rm -f "$at_job_fifo" && test -n "$at_job_group" && ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null then # FIFO job dispatcher. dnl Since we use job control, we need to propagate TSTP. dnl This handler need not be used for serial execution. dnl Again, we should stop all processes in the job groups, otherwise dnl the stopping will not be effective while one test group is running. dnl Apparently ksh does not honor the TSTP trap. dnl As a safety measure, not use the same variable names as in the dnl termination handlers above, one might get called during execution dnl of the other. trap 'at_pids= for at_pid in `jobs -p`; do at_pids="$at_pids $at_job_group$at_pid" done dnl Send it to all spawned jobs, ignoring those finished meanwhile. if test -n "$at_pids"; then dnl Unfortunately, ksh93 fork-bombs when we send TSTP, so send STOP dnl if this might be ksh (STOP prevents possible TSTP handlers inside dnl AT_CHECKs from running). Then stop ourselves. at_sig=TSTP test "${TMOUT+set}" = set && at_sig=STOP kill -$at_sig $at_pids 2>/dev/null fi kill -STOP $$ dnl We got a CONT, so let's go again. Passing this to all processes dnl in the groups is necessary (because we stopped them), but it may dnl cause changed test semantics; e.g., a sleep will be interrupted. test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP echo # Turn jobs into a list of numbers, starting from 1. at_joblist=`AS_ECHO([" $at_groups_all "]) | \ sed 's/\( '$at_jobs'\) .*/\1/'` set X $at_joblist shift for at_group in $at_groups; do dnl Enable job control only for spawning the test group: dnl Let the jobs to run in separate process groups, but dnl avoid all the status output by the shell. $at_job_control_on 2>/dev/null ( # Start one test group. $at_job_control_off exec AT_JOB_FIFO_FD>"$at_job_fifo" dnl When a child receives PIPE, be sure to write back the token, dnl so the master does not hang waiting for it. dnl errexit and xtrace should not be set in this shell instance, dnl except as debug measures. However, shells such as dash may dnl optimize away the _AT_CHECK subshell, so normalize here. trap 'set +x; set +e dnl Ignore PIPE signals that stem from writing back the token. trap "" PIPE echo stop > "$at_stop_file" echo token >&AT_JOB_FIFO_FD dnl Do not reraise the default PIPE handler. dnl It wreaks havoc with ksh, see above. dnl trap - 13 dnl kill -13 $$ AS_EXIT([141])' PIPE at_fn_group_prepare if cd "$at_group_dir" && at_fn_test $at_group && . "$at_test_source" # AT_JOB_FIFO_FD>&- then :; else AS_WARN([unable to parse test group: $at_group]) at_failed=: fi at_fn_group_postprocess echo token >&AT_JOB_FIFO_FD ) & $at_job_control_off if $at_first; then at_first=false exec AT_JOB_FIFO_FD<"$at_job_fifo" fi shift # Consume one token. if test $[@%:@] -gt 0; then :; else read at_token <&AT_JOB_FIFO_FD || break set x $[*] fi test -f "$at_stop_file" && break done # Read back the remaining ($at_jobs - 1) tokens. set X $at_joblist shift if test $[@%:@] -gt 0; then shift for at_job do read at_token done <&AT_JOB_FIFO_FD fi exec AT_JOB_FIFO_FD<&- wait else # Run serially, avoid forks and other potential surprises. for at_group in $at_groups; do at_fn_group_prepare if cd "$at_group_dir" && at_fn_test $at_group && . "$at_test_source"; then :; else AS_WARN([unable to parse test group: $at_group]) at_failed=: fi at_fn_group_postprocess test -f "$at_stop_file" && break at_first=false done fi # Wrap up the test suite with summary statistics. cd "$at_helper_dir" # Use ?..???? when the list must remain sorted, the faster * otherwise. at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'` at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'` at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'` at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do echo $f; done | sed '/?/d; s,/xpass,,'` at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do echo $f; done | sed '/?/d; s,/fail,,'` set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list shift; at_group_count=$[@%:@] set X $at_xpass_list; shift; at_xpass_count=$[@%:@]; at_xpass_list=$[*] set X $at_xfail_list; shift; at_xfail_count=$[@%:@] set X $at_fail_list; shift; at_fail_count=$[@%:@]; at_fail_list=$[*] set X $at_skip_list; shift; at_skip_count=$[@%:@] AS_VAR_ARITH([at_run_count], [$at_group_count - $at_skip_count]) AS_VAR_ARITH([at_unexpected_count], [$at_xpass_count + $at_fail_count]) AS_VAR_ARITH([at_total_fail_count], [$at_xfail_count + $at_fail_count]) # Back to the top directory. cd "$at_dir" rm -rf "$at_helper_dir" # Compute the duration of the suite. at_stop_date=`date` at_stop_time=`date +%s 2>/dev/null` AS_ECHO(["$as_me: ending at: $at_stop_date"]) >&AS_MESSAGE_LOG_FD case $at_start_time,$at_stop_time in [[0-9]*,[0-9]*]) AS_VAR_ARITH([at_duration_s], [$at_stop_time - $at_start_time]) AS_VAR_ARITH([at_duration_m], [$at_duration_s / 60]) AS_VAR_ARITH([at_duration_h], [$at_duration_m / 60]) AS_VAR_ARITH([at_duration_s], [$at_duration_s % 60]) AS_VAR_ARITH([at_duration_m], [$at_duration_m % 60]) at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" AS_ECHO(["$as_me: test suite duration: $at_duration"]) >&AS_MESSAGE_LOG_FD ;; esac echo AS_BOX([Test results.]) echo { echo AS_BOX([Test results.]) echo } >&AS_MESSAGE_LOG_FD dnl dnl FIXME: this code is as far from i18n-cleanness as man dnl could imagine... dnl if test $at_run_count = 1; then at_result="1 test" at_were=was else at_result="$at_run_count tests" at_were=were fi if $at_errexit_p && test $at_unexpected_count != 0; then if test $at_xpass_count = 1; then at_result="$at_result $at_were run, one passed" else at_result="$at_result $at_were run, one failed" fi at_result="$at_result unexpectedly and inhibited subsequent tests." else # Don't you just love exponential explosion of the number of cases? case $at_xpass_count:$at_fail_count:$at_xfail_count in # So far, so good. 0:0:0) at_result="$at_result $at_were successful." ;; 0:0:*) at_result="$at_result behaved as expected." ;; # Some unexpected failures 0:*:0) at_result="$at_result $at_were run, $at_fail_count failed unexpectedly." ;; # Some failures, both expected and unexpected 0:*:1) at_result="$at_result $at_were run, $at_total_fail_count failed ($at_xfail_count expected failure)." ;; 0:*:*) at_result="$at_result $at_were run, $at_total_fail_count failed ($at_xfail_count expected failures)." ;; # No unexpected failures, but some xpasses *:0:*) at_result="$at_result $at_were run, $at_xpass_count passed unexpectedly." ;; # No expected failures, but failures and xpasses *:1:0) at_result="$at_result $at_were run, $at_unexpected_count did not behave as expected dnl ($at_fail_count unexpected failure)." ;; *:*:0) at_result="$at_result $at_were run, $at_unexpected_count did not behave as expected dnl ($at_fail_count unexpected failures)." ;; # All of them. *:*:1) at_result="$at_result $at_were run, $at_xpass_count passed unexpectedly, $at_total_fail_count failed ($at_xfail_count expected failure)." ;; *:*:*) at_result="$at_result $at_were run, $at_xpass_count passed unexpectedly, $at_total_fail_count failed ($at_xfail_count expected failures)." ;; esac if test $at_skip_count = 0 && test $at_run_count -gt 1; then at_result="All $at_result" fi fi # Now put skips in the mix. case $at_skip_count in 0) ;; 1) at_result="$at_result 1 test was skipped." ;; *) at_result="$at_result $at_skip_count tests were skipped." ;; esac if test $at_unexpected_count = 0; then echo "$at_result" echo "$at_result" >&AS_MESSAGE_LOG_FD else echo "ERROR: $at_result" >&2 echo "ERROR: $at_result" >&AS_MESSAGE_LOG_FD { echo AS_BOX([Summary of the failures.]) # Summary of failed and skipped tests. if test $at_fail_count != 0; then echo "Failed tests:" $SHELL "$at_myself" $at_fail_list --list echo fi if test $at_skip_count != 0; then echo "Skipped tests:" $SHELL "$at_myself" $at_skip_list --list echo fi if test $at_xpass_count != 0; then echo "Unexpected passes:" $SHELL "$at_myself" $at_xpass_list --list echo fi if test $at_fail_count != 0; then AS_BOX([Detailed failed tests.]) echo for at_group in $at_fail_list do at_group_normalized=$at_group _AT_NORMALIZE_TEST_GROUP_NUMBER(at_group_normalized) cat "$at_suite_dir/$at_group_normalized/$as_me.log" echo done echo fi if test -n "$at_top_srcdir"; then AS_BOX([${at_top_build_prefix}config.log]) sed 's/^/| /' ${at_top_build_prefix}config.log echo fi } >&AS_MESSAGE_LOG_FD AS_BOX([$as_me.log was created.]) echo AS_ECHO(["Please send \`${at_testdir+${at_testdir}/}$as_me.log' ]dnl [and all information you think might help: To: <AT_PACKAGE_BUGREPORT> Subject: @<:@AT_PACKAGE_STRING@:>@ $as_me: dnl $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}dnl $at_xpass_list${at_xpass_list:+ passed unexpectedly} "]) if test $at_debug_p = false; then echo echo 'You may investigate any problem if you feel able to do so, in which' echo 'case the test suite provides a good starting point. Its output may' AS_ECHO(["be found below \`${at_testdir+${at_testdir}/}$as_me.dir'."]) echo fi exit 1 fi exit 0 m4_text_box([Actual tests.]) m4_divert_pop([TESTS])dnl dnl End of AT_INIT: divert to KILL, only test groups are to be dnl output, the rest is ignored. Current diversion is BODY, inherited dnl from M4sh. m4_divert([KILL]) ])# AT_INIT # _AT_ARG_OPTION(OPTIONS,HELP-TEXT,[ARGS],[ACTION-IF-GIVEN], # [ACTION-IF-NOT-GIVEN]) # --------------------------------------------------------------------------- # Internal implementation of AT_ARG_OPTION & AT_ARG_OPTION_ARG m4_defun([_AT_ARG_OPTION], [m4_divert_once([HELP_OTHER], [cat <<_ATEOF || at_write_fail=1 Other options: _ATEOF ])dnl m4_divert_once HELP_OTHER m4_divert_text([HELP_OTHER], [cat <<_ATEOF || at_write_fail=1 $2 _ATEOF])dnl dnl Turn our options into our desired strings m4_ifdef([AT_first_option],[m4_undefine([AT_first_option])])dnl m4_ifdef([AT_case],[m4_undefine([AT_case])])dnl m4_ifdef([AT_case_no],[m4_undefine([AT_case_no])])dnl m4_ifdef([AT_case_arg],[m4_undefine([AT_case_arg])])dnl m4_foreach([AT_option], m4_split(m4_normalize([$1]),[[ \|]+]), [m4_define_default([AT_first_option],AT_option)dnl m4_append([AT_case],m4_if(m4_len(AT_option),1,[],[-])[-]AT_option, [ | ])dnl m4_append([AT_case_no],[--no]AT_option, [ | ])dnl m4_append([AT_case_arg], m4_if(m4_len(AT_option),1,[],[-])[-]AT_option[=*], [ | ])dnl ])dnl m4_foreach AT_option dnl keep track so we or the user may process ACTION-IF-NOT-GIVEN m4_divert_once([PARSE_ARGS_BEGIN], [ ## ## Set up package specific options. ## ])dnl m4_divert_text([PARSE_ARGS_BEGIN], [dnl Provide a default value for options without arguments. m4_ifvaln([$3],,[at_arg_[]m4_bpatsubst([AT_first_option], -, _)=false])dnl at_arg_given_[]m4_bpatsubst([AT_first_option], -, _)=false ])dnl m4_divert_text DEFAULTS m4_divert_text([PARSE_ARGS], [dnl Parse the options and args when necessary. m4_ifvaln([$3], [ AT_case ) at_prev=--m4_bpatsubst([AT_first_option], -, _) ;; AT_case_arg ) at_arg_[]m4_bpatsubst([AT_first_option], -, _)=$at_optarg at_arg_given_[]m4_bpatsubst([AT_first_option], -, _)=: $4 ;;], [ AT_case ) at_optarg=: at_arg_[]m4_bpatsubst([AT_first_option], -, _)=: at_arg_given_[]m4_bpatsubst([AT_first_option], -, _)=: m4_ifval([$4],[$4])dnl ;; AT_case_no ) at_optarg=false at_arg_[]m4_bpatsubst([AT_first_option], -, _)=false at_arg_given_[]m4_bpatsubst([AT_first_option], -, _)=: m4_ifval([$4],[$4])dnl ;;])dnl m4_ifvaln $3 ])dnl m4_divert_text PARSE_ARGS m4_ifvaln([$5], [m4_divert_once([PARSE_ARGS_END], [ ## ## Process package specific options when _not_ supplied. ##])dnl m4_divert_once PARSE_ARGS_END m4_divert_text([PARSE_ARGS_END], [ AS_IF([$at_arg_given_[]m4_bpatsubst([AT_first_option], -, _)],,[$5])dnl ])dnl m4_divert_text PARSE_ARGS_END ])dnl m4_ifvaln $5 ])dnl _AT_ARG_OPTION # AT_ARG_OPTION(OPTIONS,HELP-TEXT,[ACTION-IF-GIVEN],[ACTION-IF-NOT-GIVEN]) # ------------------------------------------------------------------------ # Accept a set of OPTIONS with arguments. Add HELP-TEXT to the HELP_OTHER # diversion. # # Preceding dashes should not be passed into OPTIONS. Users will be required # to pass `--' before long options and `-' before single character options. # # $at_arg_OPTION will be set to `:' if this option is received, `false' if # if --noOPTION is received, and `false' by default. # # Run ACTION-IF-GIVEN each time an option in OPTIONS is encountered with # $at_optarg set to `:' or `false' as appropriate. $at_optarg is actually # just a copy of $at_arg_OPTION. # # ACTION-IF-NOT-GIVEN will be run once after option parsing is complete # if no option from OPTIONS was found. m4_defun([AT_ARG_OPTION],[_AT_ARG_OPTION([$1],[$2],,[$3],[$4])]) # AT_ARG_OPTION_ARG(OPTIONS,HELP-TEXT,[ACTION-IF-GIVEN],[ACTION-IF-NOT-GIVEN]) # --------------------------------------------------------------------------- # Accept a set of OPTIONS with arguments, seperated by commas. Add HELP-TEXT # to the HELP_OTHER diversion. # # Preceding dashes should not be passed into OPTIONS. Users will be required # to pass `--' before long options and `-' before single character options. # # By default, any argument to these options will be assigned to the shell # variable $at_arg_OPTION, where OPTION is the first option in OPTIONS with # any `-' characters replaced with `_'. # # Run ACTION-IF-GIVEN each time an option in OPTIONS is encountered with # $at_optarg set. $at_optarg is actually just a copy of $at_arg_OPTION. # # ACTION-IF-NOT-GIVEN will be run once after option parsing is complete # if no option from OPTIONS was found. m4_defun([AT_ARG_OPTION_ARG],[_AT_ARG_OPTION([$1],[$2],1,[$3],[$4])]) # AT_TESTED(PROGRAMS) # ------------------- # Specify the list of programs exercised by the test suite. Their # versions are logged, and in the case of embedded test suite, they # must correspond to the version of the package. PATH should be # already preset so the proper executable will be selected. m4_define([AT_TESTED], [m4_append_uniq_w([AT_tested], [$1])]) # AT_COPYRIGHT(TEXT, [FILTER = m4_newline]) # ----------------------------------------- # Emit TEXT, a copyright notice, in the top of the test suite and in # --version output. Macros in TEXT are evaluated once. Process # the --version output through FILTER (m4_newline, m4_do, and # m4_copyright_condense are common filters). m4_define([AT_COPYRIGHT], [AS_COPYRIGHT([$1])[]]dnl [m4_divert_text([VERSION_NOTICES], [m4_default([$2], [m4_newline])([$1])])])# AT_COPYRIGHT # AT_SETUP(DESCRIPTION) # --------------------- # Start a group of related tests, all to be executed in the same subshell. # The group is testing what DESCRIPTION says. _AT_DEFINE_INIT([AT_SETUP], [m4_ifdef([AT_ingroup], [m4_fatal([$0: nested AT_SETUP detected])], [m4_define([AT_ingroup], [AS_ECHO(["$at_setup_line"]) >"$at_check_line_file" ])]) m4_ifdef([AT_keywords], [m4_undefine([AT_keywords])]) m4_define([AT_capture_files], []) m4_define([AT_line], AT_LINE) m4_define([AT_xfail], [at_xfail=no]) m4_define([AT_description], m4_expand([$1])) m4_define([AT_ordinal], m4_incr(AT_ordinal)) m4_append([AT_groups_all], [ ]m4_defn([AT_ordinal])) m4_divert_push([TEST_GROUPS])dnl [#AT_START_]AT_ordinal @%:@ AT_ordinal. m4_defn([AT_line]): m4_defn([AT_description]) at_setup_line='m4_defn([AT_line])' m4_if(AT_banner_ordinal, [0], [], [at_fn_banner AT_banner_ordinal ])dnl at_desc="AS_ESCAPE(m4_dquote(m4_defn([AT_description])))" at_desc_line=m4_format(["%3d: $at_desc%*s"], AT_ordinal, m4_max(0, m4_eval(47 - m4_qlen(m4_defn([AT_description])))), []) $at_quiet AS_ECHO_N(["$at_desc_line"]) m4_divert_push([TEST_SCRIPT])dnl ]) # AT_FAIL_IF(SHELL-EXPRESSION) # ----------------------------- # Make the test die with hard failure if SHELL-EXPRESSION evaluates to # true (exitcode = 0). _AT_DEFINE_SETUP([AT_FAIL_IF], [dnl dnl Try to limit the amount of conditionals that we emit. m4_case([$1], [], [], [false], [], [:], [_AT_CHECK_EXIT([], [99])], [true], [_AT_CHECK_EXIT([], [99])], [_AT_CHECK_EXIT([$1], [99])])]) # AT_SKIP_IF(SHELL-EXPRESSION) # ----------------------------- # Skip the rest of the group if SHELL-EXPRESSION evaluates to true # (exitcode = 0). _AT_DEFINE_SETUP([AT_SKIP_IF], [dnl dnl Try to limit the amount of conditionals that we emit. m4_case([$1], [], [], [false], [], [:], [_AT_CHECK_EXIT([], [77])], [true], [_AT_CHECK_EXIT([], [77])], [_AT_CHECK_EXIT([$1], [77])])]) # AT_XFAIL_IF(SHELL-EXPRESSION) # ----------------------------- # Set up the test to be expected to fail if SHELL-EXPRESSION evaluates to # true (exitcode = 0). _AT_DEFINE_SETUP([AT_XFAIL_IF], [dnl dnl Try to limit the amount of conditionals that we emit. m4_case([$1], [], [], [false], [], [:], [m4_define([AT_xfail], [at_xfail=yes])], [true], [m4_define([AT_xfail], [at_xfail=yes])], [m4_append([AT_xfail], [ $1 && at_xfail=yes])])]) # AT_KEYWORDS(KEYWORDS) # --------------------- # Declare a list of keywords associated to the current test group. # Since the -k option is case-insensitive, the list is stored in lower case # to avoid duplicates that differ only by case. _AT_DEFINE_SETUP([AT_KEYWORDS], [m4_append_uniq_w([AT_keywords], m4_tolower(m4_dquote(_m4_expand([$1 ]))))]) # AT_CAPTURE_FILE(FILE) # --------------------- # If the current test group does not behave as expected, save the contents of # FILE in the test suite log. _AT_DEFINE_SETUP([AT_CAPTURE_FILE], [m4_append_uniq([AT_capture_files], ["$1"], [ \ ])]) # AT_CLEANUP # ---------- # Complete a group of related tests. _AT_DEFINE_INIT([AT_CLEANUP], [m4_ifdef([AT_ingroup], [AT_ingroup[]_m4_undefine([AT_ingroup])], [m4_fatal([$0: missing AT_SETUP detected])])dnl m4_append([AT_help_all], m4_defn([AT_ordinal]);m4_defn([AT_line]);m4_defn([AT_description]);dnl m4_ifdef([AT_keywords], [m4_defn([AT_keywords])]); )dnl m4_divert_pop([TEST_SCRIPT])dnl Back to TEST_GROUPS AT_xfail echo "# -*- compilation -*-" >> "$at_group_log" ( AS_ECHO(["AT_ordinal. m4_defn([AT_line]): testing $1..."]) $at_traceon m4_undivert([TEST_SCRIPT])dnl Insert the code here set +x $at_times_p && times >"$at_times_file" ) AS_MESSAGE_LOG_FD>&1 2>&1 | eval $at_tee_pipe read at_status <"$at_status_file" [#AT_STOP_]AT_ordinal m4_divert_pop([TEST_GROUPS])dnl Back to KILL. ])# AT_CLEANUP # AT_BANNER([TEXT]) # ----------------- # Start a category of related test groups. If multiple groups are executed, # output TEXT as a banner without any shell expansion, prior to any test # from the category. If TEXT is empty, no banner is printed. _AT_DEFINE_INIT([AT_BANNER], [m4_ifdef([AT_ingroup], [m4_fatal([$0: nested AT_SETUP detected])])dnl m4_define([AT_banner_ordinal], m4_incr(AT_banner_ordinal)) m4_divert_text([BANNERS], [@%:@ Banner AT_banner_ordinal. AT_LINE @%:@ Category starts at test group m4_incr(AT_ordinal). at_banner_text_[]AT_banner_ordinal="AS_ESCAPE([$1])"])dnl ])# AT_BANNER # AT_DATA(FILE, CONTENTS) # ----------------------- # Initialize an input data FILE with given CONTENTS, which should end with # an end of line. # This macro is not robust to active symbols in CONTENTS *on purpose*. # If you don't want CONTENTS to be evaluated, quote it twice. _AT_DEFINE_SETUP([AT_DATA], [cat >$1 <<'_ATEOF' $2[]_ATEOF ]) # AT_CHECK(COMMANDS, [STATUS = 0], STDOUT, STDERR, # [RUN-IF-FAIL], [RUN-IF-PASS]) # ------------------------------------------------ # Execute a test by performing given shell COMMANDS. These commands # should normally exit with STATUS, while producing expected STDOUT and # STDERR contents. Shell metacharacters in STDOUT and STDERR are # _not_ processed by the shell, but are treated as string literals. # # STATUS, STDOUT, and STDERR are not checked if equal to `ignore'. # # If STDOUT is `expout', then stdout is compared to the content of the file # `expout'. Likewise for STDERR and `experr'. # # If STDOUT is `stdout', then the stdout is left in the file `stdout', # likewise for STDERR and `stderr'. Don't do this: # # AT_CHECK([command >out]) # # Some checks on `out' # # do this instead: # # AT_CHECK([command], [], [stdout]) # # Some checks on `stdout' # # You might wonder why you can't just use `ignore', then directly use stdout # and stderr left by the test suite: # # AT_CHECK([command], [], [ignore]) # AT_CHECK([check stdout]) # # If the test suite always captured data in the file `stdout', then the # second command would be trying to read and write from the same file, with # undefined behavior. Therefore, the test suite actually captures data in # an internal file of a different name, and only creates `stdout' when # explicitly requested. # # Any line of stderr starting with leading blanks and a `+' are filtered # out, since most shells when tracing include subshell traces in stderr. # This may cause spurious failures when the test suite is run with `-x'. # _AT_DEFINE_SETUP([AT_CHECK], [_AT_CHECK(m4_expand([$1]), [$2], AS_ESCAPE(m4_dquote(m4_expand([$3]))), AS_ESCAPE(m4_dquote(m4_expand([$4]))), [$5], [$6])]) # AT_CHECK_UNQUOTED(COMMANDS, [STATUS = 0], STDOUT, STDERR, # [RUN-IF-FAIL], [RUN-IF-PASS]) # --------------------------------------------------------- # Like AT_CHECK, but do not AS_ESCAPE shell metacharacters in the STDOUT # and STDERR arguments before running the comparison. _AT_DEFINE_SETUP([AT_CHECK_UNQUOTED], [_AT_CHECK(m4_expand([$1]), [$2], AS_ESCAPE(m4_dquote(m4_expand([$3])), [""]), AS_ESCAPE(m4_dquote(m4_expand([$4])), [""]), [$5], [$6])]) # AT_CHECK_NOESCAPE(COMMANDS, [STATUS = 0], STDOUT, STDERR, # [RUN-IF-FAIL], [RUN-IF-PASS]) # --------------------------------------------------------- # Obsolete spelling of AT_CHECK_UNQUOTED. m4_define([AT_CHECK_NOESCAPE], [m4_warn([obsolete], [consider using AT_CHECK_UNQUOTED instead of $0])]dnl [_AT_CHECK(m4_expand([$1]), [$2], m4_expand([$3]), m4_expand([$4]), [$5], [$6])]) # _AT_DECIDE_TRACEABLE(COMMANDS) # ------------------------------ # Worker for _AT_CHECK that expands to shell code. If COMMANDS are safe to # trace with `set -x', the shell code will evaluate to true. Otherwise, # the shell code will print a message stating an aspect of COMMANDS that makes # tracing them unsafe, and evaluate to false. # # Tracing COMMANDS is not safe if they contain a command that spans multiple # lines. When the test suite user passes `-x' or `--trace', the test suite # precedes every command with a `set -x'. Since most tests expect a specific # stderr, if only to confirm that it is empty, the test suite filters ^+ from # the captured stderr before comparing with the expected stderr. If a command # spans multiple lines, so will its trace, but a `+' only prefixes the first # line of that trace: # # $ echo 'foo # bar' # => stdout # foo # bar # => stderr # + foo # bar # # In a subset of cases, one could filter such extended shell traces from # stderr. Since test commands spanning several lines are rare, I chose # instead to simply not trace COMMANDS that could yield multiple trace lines. # Distinguishing such COMMANDS became the task at hand. # # These features may cause a shell command to span multiple lines: # # (a) A quoted literal newline. # Example: # echo foo' # 'bar # M4 is a hostile language for the job of parsing COMMANDS to determine whether # each literal newline is quoted, so we simply disable tracing for all COMMANDS # that bear literal newlines. # # (b) A command substitution not subject to word splitting. # Example: # var=$(printf 'foo\nbar') # Example: # echo "`printf 'foo\\nbar`" # One cannot know in general the number of lines a command substitution will # yield without executing the substituted command. As such, we disable tracing # for all COMMANDS containing these constructs. # # (c) A parameter expansion not subject to word splitting. # Example: # var=foo' # 'bar # echo "$var" # Parameter expansions appear in COMMANDS with much greater frequency than do # newlines and command substitutions, so disabling tracing for all such # COMMANDS would much more substantially devalue `testsuite -x'. To determine # which parameter expansions yield multiple lines, we escape all ``', `"', # and `\' in a copy of COMMANDS and expand that string within double quotes # at runtime. If the result of that expansion contains multiple lines, the # test suite disables tracing for the command in question. # # This method leads the test suite to expand some parameters that the shell # itself will never expand due to single-quotes or backslash escapes. This is # not a problem for `$foo' expansions, which will simply yield the empty string # or some unrelated value. A `${...}' expansion could actually form invalid # shell code, however; consider `${=foo}'. Therefore, we disable tracing for # all COMMANDS containing `${...}'. This affects few COMMANDS. # # This macro falls in a very hot path; the Autoconf test suite expands it 1640 # times as of this writing. To give a sense of the impact of the heuristics I # just described, the test suite preemptively disables tracing for 31 of those, # and 268 contain parameter expansions that require runtime evaluation. The # balance are always safe to trace. m4_define([_AT_DECIDE_TRACEABLE], dnl Utility macro. dnl dnl Examine COMMANDS for a reason to never trace COMMANDS. [m4_pushdef([at_reason], m4_cond([m4_eval(m4_index([$1], [`]) >= 0)], [1], [[a `...` command substitution]], [m4_eval(m4_index([$1], [$(]) >= 0)], [1], [[a $(...) command substitution]], [m4_eval(m4_index([$1], [${]) >= 0)], [1], [[a ${...} parameter expansion]], [m4_eval(m4_index([$1], m4_newline) >= 0)], [1], [[an embedded newline]], []))]dnl No reason. [m4_if(m4_index(_m4_defn([at_reason]), [a]), [0],]dnl dnl We know at build time that tracing COMMANDS is never safe. [[at_fn_check_prepare_notrace '_m4_defn([at_reason])'], m4_index([$1], [$]), [-1],]dnl dnl We know at build time that tracing COMMANDS is always safe. [[at_fn_check_prepare_trace],]dnl dnl COMMANDS may contain parameter expansions; expand them at runtime. [[at_fn_check_prepare_dynamic "AS_ESCAPE([[$1]], [`\"])"])[]]dnl [_m4_popdef([at_reason])]) # AT_DIFF_STDERR/AT_DIFF_STDOUT # ----------------------------- # These are subroutines of AT_CHECK. Using indirect dispatch is a tad # faster than using m4_case, and these are called very frequently. m4_define([AT_DIFF_STDERR(stderr)], [echo stderr:; tee stderr <"$at_stderr"]) m4_define([AT_DIFF_STDERR(stderr-nolog)], [echo stderr captured; cp "$at_stderr" stderr]) m4_define([AT_DIFF_STDERR(ignore)], [echo stderr:; cat "$at_stderr"]) m4_define([AT_DIFF_STDERR(ignore-nolog)]) m4_define([AT_DIFF_STDERR(experr)], [$at_diff experr "$at_stderr" || at_failed=:]) m4_define([AT_DIFF_STDERR()], [at_fn_diff_devnull "$at_stderr" || at_failed=:]) m4_define([AT_DIFF_STDOUT(stdout)], [echo stdout:; tee stdout <"$at_stdout"]) m4_define([AT_DIFF_STDOUT(stdout-nolog)], [echo stdout captured; cp "$at_stdout" stdout]) m4_define([AT_DIFF_STDOUT(ignore)], [echo stdout:; cat "$at_stdout"]) m4_define([AT_DIFF_STDOUT(ignore-nolog)]) m4_define([AT_DIFF_STDOUT(expout)], [$at_diff expout "$at_stdout" || at_failed=:]) m4_define([AT_DIFF_STDOUT()], [at_fn_diff_devnull "$at_stdout" || at_failed=:]) # _AT_CHECK(COMMANDS, [STATUS = 0], STDOUT, STDERR, # [RUN-IF-FAIL], [RUN-IF-PASS]) # ------------------------------------------------- # Worker for AT_CHECK and AT_CHECK_UNQUOTED, with COMMANDS, STDOUT, and # STDERR pre-expanded. # # Implementation Details # ---------------------- # Ideally, we would like to run # # ( $at_traceon; COMMANDS >at-stdout 2> at-stderr ) # # but we must group COMMANDS as it is not limited to a single command, and # then the shells will save the traces in at-stderr. So we have to filter # them out when checking stderr, and we must send them into the test suite's # stderr to honor -x properly. Since only the first line of the trace of a # multiline command starts with a `+', and I know of no straightforward way to # filter out the unadorned trace lines, we disable shell tracing entirely for # commands that could span multiple lines. # # Limiting COMMANDS to a single command is not good either, since then # the user herself would use {} or (), and then we face the same problem. # # But then, there is no point in running # # ( $at_traceon { $1 ; } >at-stdout 2>at-stder1 ) # # instead of the simpler # # ( $at_traceon; $1 ) >at-stdout 2>at-stder1 # # Note that we truncate and append to the output files, to avoid losing # output from multiple concurrent processes, e.g., an inner testsuite # with parallel jobs. m4_define([_AT_CHECK], [m4_define([AT_ingroup])]dnl [{ set +x AS_ECHO(["$at_srcdir/AT_LINE: AS_ESCAPE([[$1]])"]) _AT_DECIDE_TRACEABLE([$1]) _AT_LINE_ESCAPED ( $at_check_trace; [$1] ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter m4_ifdef([AT_DIFF_STDERR($4)], [m4_indir([AT_DIFF_STDERR($4)])], [echo >>"$at_stderr"; AS_ECHO([["$4"]]) | \ $at_diff - "$at_stderr" || at_failed=:]) m4_ifdef([AT_DIFF_STDOUT($3)], [m4_indir([AT_DIFF_STDOUT($3)])], [echo >>"$at_stdout"; AS_ECHO([["$3"]]) | \ $at_diff - "$at_stdout" || at_failed=:]) m4_if([$2], [ignore], [at_fn_check_skip], [at_fn_check_status m4_default([$2], [0])]) $at_status "$at_srcdir/AT_LINE" m4_ifvaln([$5$6], [AS_IF($at_failed, [$5], [$6])])]dnl [$at_failed && at_fn_log_failure AT_capture_files $at_traceon; } ])# _AT_CHECK # _AT_CHECK_EXIT(COMMANDS, [EXIT-STATUS-IF-PASS]) # ----------------------------------------------- # Minimal version of _AT_CHECK for AT_SKIP_IF and AT_FAIL_IF. m4_define([_AT_CHECK_EXIT], [m4_define([AT_ingroup])]dnl [AS_ECHO(_AT_LINE_ESCAPED) >"$at_check_line_file" m4_ifval([$1], [($1) \ && ])at_fn_check_skip $2 "$at_srcdir/AT_LINE"])# _AT_CHECK_EXIT ��������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/GNUmakefile�������������������������������������������������������������0000644�0001750�0001750�00000011136�11233202135�016303� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Having a separate GNUmakefile lets me `include' the dynamically # generated rules created via cfg.mk (package-local configuration) # as well as maint.mk (generic maintainer rules). # This makefile is used only if you run GNU Make. # It is necessary if you want to build targets usually of interest # only to the maintainer. # Copyright (C) 2001, 2003, 2006-2009 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 3 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, see <http://www.gnu.org/licenses/>. # Systems where /bin/sh is not the default shell need this. The $(shell) # command below won't work with e.g. stock DOS/Windows shells. ifeq ($(wildcard /bin/s[h]),/bin/sh) SHELL = /bin/sh else # will be used only with the next shell-test line, then overwritten # by a configured-in value SHELL = sh endif # If the user runs GNU make but has not yet run ./configure, # give them a diagnostic. _have-Makefile := $(shell test -f Makefile && echo yes) ifeq ($(_have-Makefile),yes) # Make tar archive easier to reproduce. export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner # Allow the user to add to this in the Makefile. ALL_RECURSIVE_TARGETS = include Makefile # Some projects override e.g., _autoreconf here. -include $(srcdir)/cfg.mk include $(srcdir)/maint.mk # Allow cfg.mk to override these. _build-aux ?= build-aux _autoreconf ?= autoreconf # Ensure that $(VERSION) is up to date for dist-related targets, but not # for others: rerunning autoreconf and recompiling everything isn't cheap. _have-git-version-gen := \ $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes) ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL)) _is-dist-target ?= $(filter-out %clean, \ $(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS))) _is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS))) ifneq (,$(_is-dist-target)$(_is-install-target)) _curr-ver := $(shell cd $(srcdir) \ && $(_build-aux)/git-version-gen .tarball-version) ifneq ($(_curr-ver),$(VERSION)) ifeq ($(_curr-ver),UNKNOWN) $(info WARNING: unable to verify if $(VERSION) is the correct version) else ifneq (,$(_is-install-target)) # GNU Coding Standards state that 'make install' should not cause # recompilation after 'make all'. But as long as changing the version # string alters config.h, the cost of having 'make all' always have an # up-to-date version is prohibitive. So, as a compromise, we merely # warn when installing a version string that is out of date; the user # should run 'autoreconf' (or something like 'make distcheck') to # fix the version, 'make all' to propagate it, then 'make install'. $(info WARNING: version string $(VERSION) is out of date;) $(info run '$(MAKE) _version' to fix it) else $(info INFO: running autoreconf for new version string: $(_curr-ver)) _dummy := $(shell $(MAKE) $(AM_MAKEFLAGS) _version) endif endif endif endif endif .PHONY: _version _version: cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf) else .DEFAULT_GOAL := abort-due-to-no-makefile srcdir = . # The package can override .DEFAULT_GOAL to run actions like autoreconf. -include ./cfg.mk include ./maint.mk ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile) $(MAKECMDGOALS): abort-due-to-no-makefile endif abort-due-to-no-makefile: @echo There seems to be no Makefile in this directory. 1>&2 @echo "You must run ./configure before running \`make'." 1>&2 @exit 1 endif # Tell version 3.79 and up of GNU make to not build goals in this # directory in parallel, in case someone tries to build multiple # targets, and one of them can cause a recursive target to be invoked. # Only set this if Automake doesn't provide it. AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) \ dist distcheck tags ctags ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS) ifneq ($(word 2, $(MAKECMDGOALS)), ) ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), ) .NOTPARALLEL: endif endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoconf2.64_2.64+dfsg.orig/ChangeLog.2�������������������������������������������������������������0000644�0001750�0001750�00001507756�11204770547�016205� 0����������������������������������������������������������������������������������������������������ustar �smcv����������������������������smcv�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2001-05-21 Akim Demaille <akim@epita.fr> Version 2.50. 2001-05-19 Akim Demaille <akim@epita.fr> * tests/tools.at: s/undefined macro/possibly undefined macro/. 2001-05-19 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_SEARCH_LIBS): Unobfuscate. 2001-05-19 Akim Demaille <akim@epita.fr> * autoconf.sh: s/undefined macro/possibly undefined macro/. 2001-05-19 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Particular Programs): Explain the `AC_PROG_LEX invoked multiple times' message. Reported by Rainer Orth as PR Autoconf/177. 2001-05-19 Akim Demaille <akim@epita.fr> * autoheader.sh: Fix file names used in error messages. Reported by Rainer Orth as PR Autoconf/178. 2001-05-19 Akim Demaille <akim@epita.fr> * tests/compile.at (AC_PROG_CPP via CC): Invoke AC_PROG_CC instead if using `cc'. 2001-05-19 Akim Demaille <akim@epita.fr> * tests/compile.at (GNU Fortran 77): Don't AS_EXIT when using AT_CHECK_MACRO since it skips tests embedded in configure.ac. Remove files which might have been created when invoking the compiler. Reported by Nicolas Joly. 2001-05-14 Pavel Roskin <proski@gnu.org> * doc/autoconf.texi (Shellology): Document a quirk in here-document handling on OpenBSD. 2001-05-11 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_PROG_PREPROC_WORKS_IFELSE): No longer use the `maybe' strategy: first try cpp's exit status, then its stderr. (AC_PROG_CPP, AC_PROG_CXXCPP): Adjust. * tests/compile.at (AC_PROG_CPP via CC): Simplify mycc. Remove unrelated code. 2001-05-10 Akim Demaille <akim@epita.fr> * tests/compile.at (AC_PROG_CPP via CC): New. From Daniel Carroll. 2001-04-27 Akim Demaille <akim@epita.fr> If AC_PROG_CC is invoked but not AC_PROG_CPP, then CPPFLAGS is not AC_SUBST'ed. Reported by Ralf Corsepius. * aclang.m4 (_AC_ARG_VAR_CPPFLAGS, _AC_ARG_VAR_LDFLAGS): New. (AC_PROG_CC, AC_PROG_CPP, AC_PROG_CXX, AC_PROG_CXXCPP) (AC_PROG_F77): Use them. 2001-04-27 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_PROG_PREPROC_WORKS): Rename and extend as... (_AC_PROG_PREPROC_WORKS_IFELSE): this. Adjust to admit (AC_PROG_CPP, AC_PROG_CXXCPP): Use it. Reported by Daniel Carroll. 2001-04-26 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use two backslashes before double quotes in the copyright notice, since the native OpenBSD shell removes single backslashes in here-documents with unquoted delimiters. 2001-04-25 Nicolas Joly <njoly@pasteur.fr> * acgeneral.m4 (_AC_RUN_IFELSE): Clean `core' files. 2001-04-24 Steven G. Johnson <stevenj@alum.mit.edu> * doc/autoconf.texi (The GNU build system): Add this chapter introducing Autoconf+Automake+Libtool, and fix references in the introduction. 2001-04-24 Akim Demaille <akim@epita.fr> On HP-UX 10 `ranlib --version' creates `./--version'. Reported by Bob Proulx and Jim Meyering. * acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG): Do not invoke the program with --version. 2001-04-22 Jim Meyering <meyering@lucent.com> * acfunctions.m4 (AC_FUNC_MEMCMP): Remove `int main () {' and the trailing `}', since AC_LANG_PROGRAM provides them. 2001-04-20 Akim Demaille <akim@epita.fr> * configure.in: Bump to 2.49f. 2001-04-20 Akim Demaille <akim@epita.fr> Version 2.49e. 2001-04-20 Akim Demaille <akim@epita.fr> * tests/foreign.at (Libtool): Ignore configure's stderr. 2001-04-20 Tim Van Holder <tim.van.holder@pandora.be> * acgeneral.m4 (AC_OUTPUT): Close the descriptor before running config.status so config.log is properly created on MS-DOS. 2001-04-20 Nicolas Joly <njoly@pasteur.fr> * tests/atspecific.m4 (AT_CHECK_AUTOUPDATE): Be robust to missing or broken autoupdate. * tests/tools.at: Likewise. * tests/Makefile.am (CLEANFILES): Also clean Libtool files. 2001-04-18 Tim Van Holder <tim.van.holder@pandora.be> * acgeneral.m4 (_AC_INIT_SRCDIR): Handle backslashes (DOS paths) for $ac_confdir and $srcdir. 2001-04-17 Akim Demaille <akim@epita.fr> Don't mess with FDs. * acgeneral.m4 (_AC_INIT_DEFAULTS_FDS): Remove, replace with inline setting up of AS_MESSAGE_FD. (AS_MESSAGE_LOG_FD): Do not define, so that AS_MESSAGE does not output in it before... (_AC_INIT_CONFIG_LOG): here, which is run after the handling of options. 2001-04-18 Steven G. Johnson <stevenj@alum.mit.edu> * doc/autoconf.texi: Replace documentation for obsolete AC_LIBOBJ_DECL with clearer documentation for AC_LIBSOURCE and AC_LIBSOURCES, improving the AC_LIBOBJ docs as well. 2001-04-17 Steven G. Johnson <stevenj@alum.mit.edu> * doc/autoconf.texi: Fixes for punctuation and grammar.. Replace "..." with "@dots{}" except when "..." is in literal code. 2001-04-17 Nicolas Joly <njoly@pasteur.fr> * acgeneral.m4 (_AC_LINK_IFELSE): Be sure to remove temporary `conftest.$ac_objext', as some compilers may forget it. 2001-04-16 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_INIT_VERSION): Use AC_PACKAGE_NAME and AC_PACKAGE_VERSION only if they are defined. (_AC_OUTPUT_CONFIG_STATUS): Likewise. 2001-04-15 Lars J. Aas <larsa@sim.no> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Alter response on `config.status --version' to be more compliant with the GNU Coding Standards. 2001-04-13 Steven G. Johnson <stevenj@alum.mit.edu> * doc/autoconf.texi: Still more minor modifications for clarity, felicity, and grammar. 2001-04-11 Steven G. Johnson <stevenj@alum.mit.edu> * doc/autoconf.texi (AC_F77_WRAPPERS): Mention C++ as well as C. In the example, don't #ifdef F77_FUNC before using it, as that would push any errors to link-time rather than compile-time; note that the user can test this to invoke alternative behavior. 2001-04-11 Akim Demaille <akim@epita.fr> * autoconf.sh (Task script): Be sure that `forbidden.rx' and `allowed.rx' exist when AWK loads then. Reported by Rainer Orth. 2001-04-11 Steven G. Johnson <stevenj@alum.mit.edu> * doc/autoconf.texi: A few more minor modifications for clarity, grammar, and formatting. 2001-04-10 Lars J. Aas <larsa@sim.no> * Makefile.am: AC_SUBST fixes for PACKAGE_NAME, VERSION, PACKAGE... * configure.in: Moved here. Suggested by Akim Demaille and Raja R Harinath. 2001-04-10 Lars J. Aas <larsa@sim.no> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Re-enable logging to `config.log' from `config.status', but delay logging till after command line option processing. 2001-04-10 Lars J. Aas <larsa@sim.no> * autoupdate.in (print_usage): print "\ at end of line does not work as expected, so change block to here-doc instead. (print_version): Same. 2001-04-09 Steven G. Johnson <stevenj@alum.mit.edu> * doc/autoconf.texi: Replace all tab characters with (8) spaces, lest the formatting of example code, etcetera, be messed up. 2001-04-09 Steven G. Johnson <stevenj@alum.mit.edu> * doc/autoconf.texi: Rephrase various parts for clarity, felicity, and/or grammar. 2001-04-09 Steven G. Johnson <stevenj@alum.mit.edu> * doc/autoconf.texi: Clean up cache documentation: Document --config-cache/-C option, and recommend instead of --cache-file. Indent example AC_CACHE_VAL macros for clarity. Add new "Cache Checkpointing" section for AC_CACHE_SAVE (and AC_CACHE_LOAD), so that the "Cache Files" section focuses solely on features visible to end-users (e.g. to better fit the cross references). Various minor rewordings for clarity, felicity, and/or grammar. 2001-04-09 Steven G. Johnson <stevenj@alum.mit.edu> * doc/autoconf.texi: Revert to "configure.in" in the history, since "configure.ac" wasn't used in the past, and in any case it is probably a good idea to preserve this section verbatim. 2001-04-09 Steven G. Johnson <stevenj@alum.mit.edu> * AUTHORS: Fix grammar. 2001-04-09 Lars J. Aas <larsa@sim.no> * Makefile.am: Manual addition of @PACKAGE@ substitution variable needed by dist rules. Added explanatory comment. Problem reported and comment suggested by Raja R Harinath. 2001-04-06 Lars J. Aas <larsa@sim.no> * Makefile.am: Manual addition of @VERSION@ substitution variable as a temporary Automake fix. Reported by Raja R Harinath. 2001-04-04 Lars J. Aas <larsa@sim.no> * acgeneral (_AC_INIT_CONFIG_LOG): New macro for setting up the config.log file. (_AC_INIT_DEFAULTS_FDS): Log to /dev/null instead of config.log. (AC_INIT): Invoke _AC_INIT_CONFIG_LOG after _AC_INIT_VERSION. 2001-04-04 Lars J. Aas <larsa@sim.no> * acgeneral.m4 (_AC_INIT_DEFAULTS): Produce better version information for config.log header. (_AC_INIT_VERSION): Produce better version information for `configure --version'. 2001-03-30 Steven G. Johnson <stevenj@alum.mit.edu> * doc/autoconf.texi: Use "invalid" instead of "illegal," as suggested by the GNU coding standards. 2001-03-30 Tim Van Holder <tim.van.holder@pandora.be> * m4sh.m4 (AS_BASENAME): New. (AS_SHELL_SANITIZE): Set `$as_me'. * acgeneral.m4: Don't set as_me; AS_SHELL_SANITIZE now does this. * tests/atgeneral.m4: Likewise. (AT_INIT): Use $PATH_SEPARATOR for walking the path. * autoconf.sh: Be DOS-friendly when setting as_me and M4. Add quotes to support spaces in $tmp. Work around problem in DJGPP port of awk by using a temporary file. * autoheader.sh: Be DOS-friendly when setting as_me. * autoreconf.sh: Be DOS-friendly when setting as_me, dir and template_dir. 2001-03-27 Lars J. Aas <larsa@sim.no> * acgeneral.m4 (AC_INIT_VERSION): Improved version information string for `configure --version'. 2001-03-27 Akim Demaille <akim@epita.fr> * autoheader.sh (config_h): Be robust to new lines when extracting the first argument of AC_CONFIG_HEADERS. Reported by Lars J. Aas. 2001-03-27 Tim Van Holder <tim.van.holder@pandora.be> * doc/autoconf.texi: Minor tweaks. 2001-03-27 Tim Van Holder <tim.van.holder@pandora.be> * Makefile.am, configure.in: autoupdate is a Perl script. 2001-03-20 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Usual Tools): Some about `touch'. From Jim Meyering, Volker Borchert, and Peter Eisentraut. 2001-03-20 Akim Demaille <akim@epita.fr> * tests/foreign.at (Libtool): Don't skip 1.3.5. Invoke AC_CANONICAL_SYSTEM ---for some reason AC_CANONICAL_HOST is not enough for 1.3.5. From Lars J. Aas. 2001-03-20 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4: s/Testing suite/Test suite/g. From Jim. (AT_INIT): Adjust the error message on invalid options. * tests/foreign.at (Libtool): Skip Libtool 1.3 too. 2001-03-20 Kevin Ryde <user42@zip.com.au> * doc/autoconf.texi: A couple of grammatical tweaks. 2001-03-19 Akim Demaille <akim@epita.fr> * configure.in: Bump to 2.49e. 2001-03-19 Akim Demaille <akim@epita.fr> Version 2.49d. 2001-03-19 Akim Demaille <akim@epita.fr> * tests/tools.at (AWK portability): Don't rely on `empty'. 2001-03-19 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_INIT): Fix the at_diff test. Reported by Nicolas Joly. 2001-03-19 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_PREPROC_IFELSE): Redirect stdout out of the _AC_EVAL_STDERR invocation to avoid `illegal io' on Ultrix. Reported by Harlan Stenn, and fixed by Jim Meyering. 2001-03-19 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Don't hard code `/bin/sh', use $SHELL. From Paul Eggert. 2001-03-19 Akim Demaille <akim@epita.fr> * acfunctions.m4 (AC_FUNC_STRERROR_R): Update to fileutils-4.0.42's. 2001-03-19 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_INIT): Don't always create `empty', rather do it only when diffing `/dev/null' is not supported. And use `at-devnull' instead of `empty'. 2001-03-13 Akim Demaille <akim@epita.fr> * autoscan.pl, autoupdate.in: Use `use' instead of `require' to require some version of Perl, so that the test is performed at compile time, not run time. Suggested by Nicolas Joly. 2001-03-13 Tim Van Holder <tim.van.holder@pandora.be> * tests/aclocal.m4: Fix some typos. Also ignore $PATH_SEPARATOR. * tests/atconfig.in: Set PATH_SEPARATOR to the proper path separator. Set SHELL here... * tests/atgeneral.m4: ... instead of here. Use $PATH_SEPARATOR when setting AUTOTEST_PATH. Don't default tests to "all" before deciding whether the help text is needed. * tests/semantics.at: Use the correct path separator. 2001-03-13 Tim Van Holder <tim.van.holder@pandora.be> * doc/autoconf.texi: Expand section on DOS issues. Add link to the `doschk' package. Fix minor typo. Clean up white spaces. 2001-03-13 Steven G. Johnson <stevenj@alum.mit.edu> * aclang.m4 (AC_PROG_F77_C_O): define F77_NO_MINUS_C_MINUS_O when test fails, not when it succeeds(!). 2001-03-13 Akim Demaille <akim@epita.fr> * tests/tools.at (AWK portability): Use AT_CHECK to check for GNU AWK so that there is always a AT_CHECK between AT_SETUP/AT_CLEANUP. Reported by Nicolas Joly. 2001-03-13 Akim Demaille <akim@epita.fr> * tests/tools.at: Be sure to remove configure.ac~. 2001-03-13 Raja R Harinath <harinath@cs.umn.edu> * autoupdate.in (File::Basename): Use package. (%ac_macros, %au_macros): Save only base filenames. 2001-03-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT): In the AU_DEFUN definition, don't try to issue an obsolete message, it can't work for macros being defined both with AC_DEFUN and AU_DEFUN. Hence do it in the AC_DEFUN definition. 2001-03-06 Pavel Roskin <proski@gnu.org> * tests/base.at (AC_TRY_*): Escape `^' - it's a pipe command separator on Tru64 v5.1. Reported by Nicolas Joly. 2001-03-05 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_INIT): Register at-setup-line and at-check-line for removal. Check for the presence of at-check-line only when $at_test was really a test. Reported by Pavel. 2001-03-04 Pavel Roskin <proski@gnu.org> * tests/atgeneral.m4 (AT_INIT): s/am_me/as_me/. Quote AT_CHECK in the error message. 2001-03-02 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_INIT_PREPARE): Quote `$$*' correctly. 2001-02-28 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_INIT): Warn when at-check-line is missing. * tests/tools.at (Syntax of the scripts): Use AT_CHECK to test /bin/sh -n. Exit 77 on failure. Reported by Harlan Stenn. 2001-02-28 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PREPARE_FS_SEPARATORS): Use `.;.' instead of `.;`pwd`': if pwd is c:/foo, we might walk through `.:c' (fails), and then `/foo' which might succeed, resulting in believing `;' is the right path separator. 2001-02-26 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AH_VERBATIM, AH_TEMPLATE): New, use AS_ESCAPE, not _AS_QUOTE. (_AH_VERBATIM_OLD, _AH_TEMPLATE_OLD): New, used for bugward compatibility in... (AC_DEFINE, AC_DEFINE_UNQUOTED): here. 2001-02-26 Pavel Roskin <proski@gnu.org> * autoupdate.in (&mktmpdir): Strip the newline from the output of mktemp. 2001-02-26 Pavel Roskin <proski@gnu.org> * man/Makefile.am: autoupdate.1 now depends on autoupdate.in. 2001-02-25 Tim Van Holder <tim.van.holder@pandora.be> * autoupdate.in: Support DOS paths. Initialize $tmp to avoid warnings. Default $autoconf to 'autoconf'. 2001-02-25 Akim Demaille <akim@epita.fr> * autoupdate.in (&END): Try to preserve the exit status. Use backquotes where more readable. Internal details should be dumped when $debug, not when $verbose. 2001-02-25 Akim Demaille <akim@epita.fr> * autoupdate.in (&mktmpdir): New. (&END): Remove $tmp. (&parse_args): Handle -d and -l. 2001-02-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PREPARE): Remove conf$$* on exit. * m4sh.m4 (_AS_LN_S_PREPARE, _AS_BROKEN_TEST_PREPARE): s/conftest/conf$$/ to avoid race conditions. From Lars J. Aas. 2001-02-25 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_PROG_INSTALL): Use ac_path_separator. Restore the IFS earlier. Suggested by Tim Van Holder. 2001-02-25 Akim Demaille <akim@epita.fr> * m4sh.m4 (_AS_TEST_PREPARE): Rename as... (_AS_BROKEN_TEST_PREPARE): this. (_AS_TEST_PREPARE): New dummy but working version of this macro. * acspecific.m4 (AC_PROG_INSTALL): Use AS_EXECUTABLE_P. 2001-02-25 Akim Demaille <akim@epita.fr> * autoupdate.in (&parse_args): Support `-'. 2001-02-25 Akim Demaille <akim@epita.fr> * autoupdate.in: Less Bournisms, more Wallisms. 2001-02-23 Jim Meyering <meyering@lucent.com> * acgeneral.m4 (_AC_INIT_PREPARE_FS_SEPARATORS): Fix typo: s/;/:/ * acgeneral.m4 (_AC_INIT_PREPARE_FS_SEPARATORS): Revert that change. There was no typo. 2001-02-22 Akim Demaille <akim@epita.fr> * doc/autoconf.texi: Typos and formatting changes. 2001-02-21 Lars J. Aas <larsa@sim.no> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use `AS_EXIT(0)' instead of `exit 0' when exiting config.status. 2001-02-21 Tim Van Holder <tim.van.holder@pandora.be> * doc/autoconf.texi: Add new node discussing issues related to file systems (DOS, specifically). Document DJGPP's bash's special handling of $PATH_SEPARATOR. 2001-02-21 Akim Demaille <akim@epita.fr> * autoupdate.in: New. Replaces autoupdate.sh. 2001-02-21 Akim Demaille <akim@epita.fr> * autoscan.pl (&find_configure_ac): New. 2001-02-20 Paul Martinolich <martinol@datasync.com> * autoscan.pl (check_configure_ac): Pretty missing macro warnings output. 2001-02-19 Paul Eggert <eggert@twinsun.com> * aclang.m4 (AC_C_INLINE): Define "inline" to empty if the compiler doesn't support 'static inline'. This is needed for Encore Umax-3.0.9.16b. 2001-02-19 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_LANG_COMPILER_WORKS): Rename as... (_AC_COMPILER_EXEEXT_WORKS): this. Use the `a.out' or `a.exe' left by _AC_COMPILER_EXEEXT_DEFAULT to check if the compiler works. (_AC_COMPILER_EXEEXT_CROSS): Extract from the above macro. (_AC_COMPILER_EXEEXT): Use them. Adjust all the compiler looking macros to check for EXEEXT *first*, then OBJEXT. Set ac_exeext yourself. (_AC_COMPILER_EXEEXT_O): Don't. 2001-02-07 Pavel Roskin <proski@gnu.org> * tests/atspecific.m4 (AT_CONFIGURE_AC): Double quote constant part of the second argument to AT_DATA. * tests/compile.at (AC_PROG_CPP with warnings): Fix underquoting in a call to _AT_CHECK_AC_MACRO. (AC_PROG_CPP without warnings): Likewise. 2001-02-11 Jim Meyering <meyering@lucent.com> Ensure that even `autoscan --version' fails when e.g., writing to a full disk. * autoscan.pl (END): New function. * autoscan.pl: Misc. clean-up: Move declarations of variables into the scope where they're used. Use `qw'. Don't use `$_'. 2001-02-06 Paul Eggert <eggert@twinsun.com> * acspecific.m4 (AC_SYS_LARGEFILE_TEST_INCLUDES): Don't reject C++ compilers that are masquerading as C compilers, and that incorrectly reject large integers. 2001-02-07 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (AC_OUTPUT): Remove $(srcdir), ${srcdir} and @srcdir@ from VPATH if srcdir is "." and replace blank VPATH lines with empty lines to preserve line numbers. Original version by Derek Price. 2001-02-07 Derek Price <derek.price@openavenue.com> * acgeneral.m4 (_AC_LIBOBJ): Call AC_LIBSOURCE with '.c' extension appended to function name. 2001-02-06 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_RUN_LOG, _AC_RUN_LOG_STDERR, AC_RUN_LOG): New. (_AC_EVAL_STDERR, _AC_EVAL): Use them. (_AC_INIT_PREPARE_FS_SEPARATORS): Use AC_RUN_LOG. 2001-02-05 Derek Price <derek.price@openavenue.com> * autoheader.sh: Only set config_h for the first call to AC_CONFIG_HEADERS. 2001-02-05 Jim Meyering <meyering@lucent.com> * acspecific.m4 (AC_SYS_LARGEFILE): Add ULL suffix to the integer constants. 2001-02-05 Akim Demaille <akim@epita.fr> acfunctions.m4 was still using the old AC_LIBOBJ_DECL. Reported by Derek R. Price. * tests/semantics.at (AC_REPLACE_FUNCS): New test. * acfunctions.m4 (AC_REPLACE_FUNCS, _AC_LIBOBJ_ALLOCA): Use AC_LIBSOURCES. 2001-02-03 Pavel Roskin <proski@gnu.org> * tests/base.at (AC_TRY_COMMAND): Add a colon between "then" and "else". Separate commands inside AC_TRY_COMMAND with semicolons. From Nicolas Joly. 2001-02-03 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_LOG_COMPLETE): Removed, dead code. 2001-02-03 Akim Demaille <akim@epita.fr> * acfunctions.m4 (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK): Use AC_LIBSOURCES. 2001-02-03 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_LIBOBJ_DECL): Remove. (AC_LIBSOURCES, AC_LIBSOURCE): New. 2001-02-02 Akim Demaille <akim@epita.fr> * tests/base.at (AC_TRY_COMMAND): Fix the test. From Nicolas Joly. The following patch went into Autoconf between the two previous entries: * acgeneral.m4 (AC_TRY_COMMAND): Use the old code, using a tmp variable, to recover multiline robustness. Reported by Tim Van Holder. * tests/base.at (AC_TRY_COMMAND): New. 2001-02-02 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_COMPUTE_INT_COMPILE): Rename all occurences of ac_try to ac_mid to avoid a name clash. 2001-02-02 Pavel Roskin <proski@gnu.org> * autoscan.pl (scan_c_file): When in verbose mode, don't print out hashes common for the whole package. Do it in scan_files() instead. (scan_makefile): Likewise. (scan_sh_file): Likewise. Thanks to Jim Meyering for improved implementation. 2001-02-01 Pavel Roskin <proski@gnu.org> * autoreconf.sh: Fix the case when the verbose output was not redirected to stderr as everywhere else. 2001-01-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de> * acgeneral.m4 (_AC_OUTPUT_SUBDIRS): Remove configure.ac from check for ac_sub_configure. 2001-01-30 Akim Demaille <akim@epita.fr> The recent addition of `exit's prototype in confdefs.h causes AC_OUTPUT_MAKE_DEFS to include junky -D switches. Reported by Wolfgang Mueller. * tests/torture.at (#define header templates): Include trash in confdefs.h. * tests/atgeneral.at (AT_INIT): Don't expect `find' to support -maxdepth, hence don't use -follow either. Reported by Nicolas Joly. * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS) <confdef2opt.sed>: In the `quote' section, `p'rint the result. If neither `#define' pattern match, just call `d' to start a new cycle. Invoke this sed program with -n. 2001-01-30 Akim Demaille <akim@epita.fr> * tests/compile.at: New test. * tests/atspecific.at (AT_CHECK): When given 77 as expected exit status, don't include the `skip' mechanism. 2001-01-30 Akim Demaille <akim@epita.fr> * tests/base.at (AC_CACHE_CHECK): Typo and clean up. Check only --quiet. 2001-01-30 Paul Eggert <eggert@twinsun.com> * autoheader.sh: Don't pass a string to 'echo' that might possibly contain backslashes. 2001-01-29 Pavel Roskin <proski@gnu.org> Don't use filenames that can be reduced to "conftest" on DOS. * acfunctions.m4 (AC_FUNC_MMAP): Use conftest.mmap, not conftestmmap. (AC_FUNC_UTIME_NULL): Use conftest.data, not conftestdata. * acspecific.m4 (AC_PROG_MAKE_SET): Use conftest.make, not conftestmake. (_AC_PATH_X_XMKMF): Use conftest.dir, not conftestdir. * acgeneral.m4 (AC_ARG_PROGRAM): Use conftest.sed, not conftestsed. * m4/sanity.m4: Use conftest.file, not conftestfile. * doc/autoconf.texi (Guidelines for Test Programs): Suggest using conftest.data, not conftestdata. 2001-01-29 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4: Don't redirect builtins' stderr as Ultrix hates this: use a subshell. 2001-01-29 Assar Westerlund <assar@sics.se> * m4sh.m4 (_AS_TEST_PREPARE): Discard output when testing `test -x' and `test -f' to avoid confusing users with error messages. (AS_MKDIR_P): Invert order of separators in IFS to avoid problem with some shells adding backslash between fields and parsing the result for escapes. * doc/autoconf.texi (Special Shell Variables): Document IFS. 2001-01-29 Steven G. Johnson <stevenj@alum.mit.edu> * aclang.m4 (AC_PROG_F77): Improve documentation of the compilers that are tried, add a few new ones (cft77, af77, epcf90, xlf95, g95), and put pgf90 in the right place (before the F95 compilers). 2001-01-29 Jim Meyering <meyering@lucent.com> * autoscan.pl: Do scan `configure.ac' when you claim it. From Raja R Harinath. (@kinds): Use `qw', rather than lots of quotes and commas. (%generic_macro): Use single quotes around literals. ($configure_scan): Define global, and use it instead of the literal. Use `warn' in place of `printf STDERR'. 2001-01-29 Akim Demaille <akim@epita.fr> * autoscan.pl: `Formatting++' changes: prototypes all the functions, no longer use `&' to call functions as it disables prototype checking, topological sort so that functions are defined before being used, and put an Autoconf like nice comment to describe the functions. (output): Accept a CONFIGURE_SCAN parameter, and open CONF. 2001-01-29 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_SITE_LOAD): Let config.log know what you load. 2001-01-27 Akim Demaille <akim@epita.fr> Follow Tim Van Holder's suggestions for a uniform handling of symlinks. * m4sh.m4: Stay in `as_', not `ac_'. (_AS_LN_S_PREPARE): Eve out from... * acspecific.m4 (AC_PROG_LN_S): here. Adjust. * m4sh.m4 (AS_LN_S): New. (AS_SHELL_PREPARE): Call _AS_LN_S_PREPARE. 2001-01-26 Assar Westerlund <assar@sics.se> * autoreconf.sh (find): Fix precedence. (aclocal): Same as below for autoheader. 2001-01-26 Akim Demaille <akim@epita.fr> * autoreconf.sh (autoheader): Run it when there is no template, as there is no risk to override a handwritten template. From Assar Westerlund. 2001-01-26 Akim Demaille <akim@epita.fr> * aclang.m4: dnl AC_ARG_VAR's newline. (AC_PROG_CC, AC_PROG_F77, AC_PROG_CXX): AC_ARG_VAR(LDFLAGS). * acgeneral.m4 (AC_CHECK_LIB): Don't do it. 2001-01-26 Akim Demaille <akim@epita.fr> * tests/mktests.sh: Handle DOS issues: directory separator, single dot in file names, and one actual bug: when set -e, running (false; true) will of course fail, use (false || true). From Tim Van Holder. 2001-01-26 Tim Van Holder <tim.van.holder@pandora.be> * tests/Makefile.am (testsuite): Use testsuite.tmp, not testsuite-tmp as temporary file. 2001-01-25 Assar Westerlund <assar@sics.se> * autoreconf.sh: Also find configure.in. 2001-01-24 Akim Demaille <akim@epita.fr> * configure.in: Bump to 2.49d. 2001-01-24 Akim Demaille <akim@epita.fr> Version 2.49c. 2001-01-24 Jim Meyering <meyering@lucent.com> * autoscan.pl (output): Detect/report a close failure. 2001-01-24 Akim Demaille <akim@epita.fr> Preserve INSTALL too. * acgeneral.m4 (_AC_OUTPUT_FILES): Use ac_INSTALL for internal computations, and therefore use INSTALL where ac_given_INSTALL was used. (_AC_OUTPUT_SUBDIRS): There is no point in computing INSTALL in here. It's not even used. 2001-01-24 Akim Demaille <akim@epita.fr> While preserved in configure, srcdir is trashed in config.status. Reported by Ralf Corsepius. * tests/aclocal.m4 (AC_STATE_SAVE): It is ok to modify CONFIG_STATUS, DEFS, prefix and exec_prefix. It is OK to produce config.* files. * tests/atspecific.m4 (AT_CONFIGURE_AC): Save the env *after* AC_OUTPUT to check that it doesn't break anything by itself. * tests/torture.m4 (srcdir): New test, from Ralf Corsepius. * acgeneral.m4 (_AC_OUTPUT_FILES): Use ac_top_srcdir and ac_srcdir to preserve srcdir and top_srcdir. Remove any use of `ac_given_srcdir' as `$srcdir' being preserved is usable. 2001-01-24 Alexandre Duret-Lutz <duret_g@epita.fr> configure -q did not work since 2000-11-03. * acgeneral.m4 (_AC_INIT_DEFAULTS_FDS): Don't check for $silent, tie AS_MESSAGE_FD to stdout unconditionally. (_AC_INIT_PARSE_ARGS): If $silent redirect AS_MESSAGE_FD to /dev/null. * tests/base.at (AC_CACHE_CHECK): New test. 2001-01-24 Tim Van Holder <tim.van.holder@pandora.be> * m4sh.m4 (AS_EXECUTABLE_P, _AS_TEST_PREPARE): New macros. (AS_SANITIZE_SHELL): Call _AS_TEST_PREPARE. * acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG): Use AS_EXECUTABLE_P instead of test -f. 2001-01-24 Akim Demaille <akim@epita.fr> * autoscan.pl (generic_macro): s/AC_CHECK_FUNCTIONS/AC_CHECK_FUNCS/. * acfunctions: Just like the previous patch. 2001-01-24 Akim Demaille <akim@epita.fr> * autoscan.pl (@kinds, %generic_macro): New. (&init_tables): Use them. * acheaders: Run `autoconf -t AC_CHECK_HEADERS:'$1'' on the fileutils, and include all these headers in here. Don't specify `AC_CHECK_HEADERS' as it's the default. 2001-01-24 Akim Demaille <akim@epita.fr> * autoscan.pl: Just like the previous patch, but for AC_CHECK_FUNCS, AC_CHECK_TYPES, and AC_CHECK_MEMBERS. 2001-01-24 Akim Demaille <akim@epita.fr> * autoscan.pl (print_unique): Push all the macro invocation locations. (output_headers): For headers that need to be checked, push either the specialized macro, or the generic macro call. (check_configure_ac): Handle AC_CHECK_HEADERS. 2001-01-24 Raja R Harinath <harinath@cs.umn.edu> Some non-srcdir build fixes. * configure.in (BUGS): Look for file in $srcdir. * tests/Makefile.am (MACRO_FILES): Use '..', not '$(top_srcdir)'. 2001-01-24 Akim Demaille <akim@epita.fr> Don't AC_SUBST too much, as it makes Automake include those variables in Makefiles, and drives autoscan to require unneeded programs. * acgeneral.m4 (_AC_INIT_PREPARE): Don't AC_SUBST CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS. (AC_ARG_VAR): AC_SUBST the var. Document it only once, even if there are several different docs. * aclang.m4 (AC_PROG_CPP): Declare CPP and CPPFLAGS to AC_ARG_VAR. (AC_PROG_CXXCPP): Declare CXXCPP and CPPFLAGS. 2001-01-24 Akim Demaille <akim@epita.fr> * m4sugar.m4 (m4_expand_once): Accept a witness. 2001-01-23 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_EXPAND_ONCE): Remove, use m4_expand_once. (AC_DIVERT_ONCE): Move to... * m4sugar.m4 (m4_expand_once): here. 2001-01-23 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_LANG_SET): Turn off optimizations. 2001-01-23 Akim Demaille <akim@epita.fr> * configure.in: If this is a beta, dump the core of BUGS. * tests/base.at (AC_REQUIRE & AC_LANG): New test, currently failing. 2001-01-23 Akim Demaille <akim@epita.fr> * autoscan.pl: Don't use `defined' to check whether an array is defined. Don't use parens with `defined'. 2001-01-23 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PREPARE): Be sure to quote hashes to avoid M4 thinking it's comments. 2001-01-23 Tim Van Holder <tim.van.holder@pandora.be> * aclang.m4 (_AC_COMPILER_EXEEXT_O): Use AS_IF([AC_TRY_EVAL(ac_link)]) instead of AC_LINK_IFELSE to avoid depending on ac_exeext before it's found. (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Check for the executable extension BEFORE checking whether the compiler works, as that test depends on a correct ac_exeext. 2001-01-23 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PREPARE) <trap>: Typo. 2001-01-22 Pavel Roskin <proski@gnu.org> * autoscan.pl: Use "use strict". Declare all global variables or make them private. Make all local variables private. (find_autoconf): New, moved some code from the top level. Use %ENV outside quotes to eliminate a warning. 2001-01-22 Tim Van Holder <tim.van.holder@pandora.be> * acspecific.m4 (AC_PROG_LN_S): Detect DJGPP < 2.04, which only supports 'ln -s' for executables. 2001-01-22 Akim Demaille <akim@epita.fr> * autoscan.pl ($dir, $autoconf): New. 2001-01-22 Akim Demaille <akim@epita.fr> * autoscan.pl ($headers, $functions, $identifiers, $libraries): Also register locations of their requirement instead of a simple counter. (&check_configure_ac): Close TRACES. 2001-01-22 Akim Demaille <akim@epita.fr> * autoscan.pl: Formatting changes. Check `configure.ac' or `configure.in' if present. 2001-01-22 Akim Demaille <akim@epita.fr> * autoscan.pl (&wanted): Don't register `Makefile' when `Makefile.in' is present. Factor the simplification of $name. (&scan_makefile, &scan_sh_file): Instead of counting the number of occurrences where a program/makevar is wanted, register file:line. Adjust the verbose output. (&check_configure_ac): Report the location where the macro is required. 2001-01-22 Akim Demaille <akim@epita.fr> * autoscan.pl: Instead of undefined globals, set them to empty values. (%needed_macros): New. (&check_configure_ac): New. Call it. (&output_libraries): Eve out from &output_programs. (&print_unique): For the time being register in %needed_macros only argument less macros. 2001-01-22 Lars J. Aas <larsa@sim.no> * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): First try no declaration, then '#include <stdlib.h>', before trying the explicit declarations. 2001-01-22 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_COMPILE_IFELSE): Wrap the test -s in AC_TRY_COMMAND to improve config.log. (_AC_INIT_DEFAULTS): Don't define ac_exeext and ac_objext to highlight failures. 2001-01-22 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Work around a currently impossible to describe bug of SunOS 4.1.3 which causes a shell crash when using `VAR=${VAR="$default"}'. Reported and diagnosed by Kevin Ryde. 2001-01-22 Akim Demaille <akim@epita.fr> * acfunctions.m4 (AC_FUNC_GETGROUPS): Typo :(. 2001-01-22 Lars J. Aas <larsa@sim.no> * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O): Export ac_cv_exeext so ltconfig believes the value is cached and skips its own faulty test. 2001-01-22 Jim Meyering <meyering@lucent.com> * actypes.m4 (AC_TYPE_GETGROUPS): Double quote the test program body. 2001-01-22 Tim Van Holder <tim.van.holder@pandora.be> * aclang.m4 (AC_LANG_INT_SAVE, AC_LANG_INT_SAVE(C)): Use conftest.val, not conftestval. * acgeneral.m4 (_AC_COMPUTE_INT_RUN, _AC_COMPUTE_INT): Likewise. 2001-01-22 Akim Demaille <akim@epita.fr> Create actypes.m4. * acgeneral.m4 (AC_CHECK_SIZEOF, _AC_CHECK_TYPE_NEW) (AC_CHECK_TYPES, _AC_CHECK_TYPE_OLD) (_AC_CHECK_TYPE_REPLACEMENT_TYPE_P, _AC_CHECK_TYPE_MAYBE_TYPE_P) (AC_CHECK_TYPE, AC_CHECK_MEMBER, AC_CHECK_MEMBERS): Move into... * actypes.m4: here. * acgeneral.m4 (AC_TYPE_GETGROUPS, AM_TYPE_PTRDIFF_T) (AC_TYPE_UID_T, AC_TYPE_SIZE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T) (AC_TYPE_MODE_T, AC_INT_16_BITS, AC_LONG_64_BITS, AC_TYPE_SIGNAL) (AC_STRUCT_TM, AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLKSIZE) (AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_RDEV): Move into... * actypes.m4: here. Adjust the test suite. 2001-01-22 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_INIT): Include a default case for non existing tests. * tests/atspecific.m4 (AT_CONFIGURE_AC, AT_CHECK_ENV) (AT_CHECK_AUTOUPDATE, AT_CHECK_AU_MACRO): New. Spread their use. (AT_CHECK_MACRO): Pass `-W obsolete' to autoconf. * tests/semantics.at (AC_HAVE_FUNCS): Obsolete, don't check. * tests/mktest.sh: Create one test file per Autoconf source file instead of separating syntax/update. 2001-01-22 Akim Demaille <akim@epita.fr> * doc/autoconf.texi: Some about diff and cmp. 2001-01-22 Akim Demaille <akim@epita.fr> * sh.m4 (AS_ESCAPE): New. (_AS_QUOTE_IFELSE): Use it. * tests/atgeneral.m4 (AT_INIT) <SHELL>: Define and use. <--help> Don't display the options help when tests were selected. Document -d. <at_skip_list>: New. <testsuite.log>: Give a banner, include ChangeLog snippets, list the failed and skipped tests. Remove useless $at_traceoff in sub shells, this improves the readability of the traces by removing testsuite's implementation details. (AT_CHECK): Filter out the shell traces from the tested command's stderr. Use AS_ESCAPE. Don't register experr and expout for clean up, as it's hairy and easier to do from... Support STDOUT = stdout, and STDERR = stderr. Force the output of shell traces. (AT_INIT): Here. 2001-01-22 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INIT, AC_OUTPUT): Don't take care of completing the log. (_AC_INIT_PREPARE): Do it in the trap 0. 2001-01-22 Akim Demaille <akim@epita.fr> * autoscan.pl: Instead of undefined globals, set them to empty values. (%needed_macros): New. (&check_configure_ac): New. Call it. (&output_libraries): Eve out from &output_programs. (&print_unique): For the time being register in %needed_macros only argument less macros. 2001-01-22 Raja R Harinath <harinath@cs.umn.edu>, Tim Van Holder <tim.van.holder@pandora.be>, Jim Meyering <jim@meyering.net> * acspecific.m4 (AC_AIX): Fix typo: s/@\$/@%/. 2001-01-19 Akim Demaille <akim@epita.fr> Catch only used patterns. Reported by the whole Autoconf community. * m4sh.m4 (AS_INIT): New. * acgeneral.m4 (AC_PLAIN_SCRIPT): Use it. Forbid only AC, AU, AH and AM. 2001-01-19 Akim Demaille <akim@epita.fr> Optimizing AC_LANG was broken. Test and fix. * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): Don't use _AC_LANG_ABBREV so that you don't depend upon _AC_LANG. (_AC_LANG_SET): New. (AC_LANG, AC_LANG_PUSH, AC_LANG_POP): Use it. * tests/compile.at: Test AC_LANG, AC_LANG_PUSH & AC_LANG_POP. 2001-01-19 Akim Demaille <akim@epita.fr> * sugar.m4 (m4_require): Missing dnl. 2001-01-18 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_PLAIN_SCRIPT): AF_INET, AF_UNIX, AR_FLAGS, AS_FLAGS are OK. 2001-01-18 Tim Van Holder <tim.van.holder@pandora.be> * m4sh.m4 (AS_MKDIR_P): Properly support DOS-style paths. 2001-01-18 Akim Demaille <akim@epita.fr> * tests/foreign.at (Autoconf & Libtool): `configure.in', not `.ac' since Libtool does not yet support it. Let the test suite be more verbose about at-path. From Patrick Welche. 2001-01-18 Akim Demaille <akim@epita.fr> * tests/atspecific.m4 (AT_CHECK_DEFINES): Discard STDLIB|INTTYPES|MEMORY|STRING|UNISTD. * tests/semantics.at (AC_CHECK_SIZEOF): Don't check the presence of default headers, as it's machine dependent. Reported by Jim Meyering and Nicolas Joly. 2001-01-18 Akim Demaille <akim@epita.fr> * acgeneral.m4: Don't leave macro names in comments. * aclang.m4: Likewise. * configure.in: Likewise. * tests/semantics.at: Likewise. * tests/tools.at: Likewise. 2001-01-18 Akim Demaille <akim@epita.fr> Medium term goal: AC_ macros can be tested with -W obsolete. * acgeneral.m4 (AC_RUN_IFELSE): Accept IF-CROSS-COMPILING. (AC_TRY_RUN): Use it. * acfunctions.m4: Start ousting AC_TRY_RUN and AC_TRY_COMPILE. * acspecific.m4 (AC_AIX, AC_MINIX, AC_ISC_POSIX): AC_BEFORE on AC_COMPILE_IFELSE and AC_RUN_IFELSE. 2001-01-18 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INCLUDES_DEFAULT): Force the newline to avoid bad surprises. Reported by Jim. 2001-01-18 Akim Demaille <akim@epita.fr> Require a perfect divert push/pop balance. * m4sugar.m4 (m4_divert, m4_divert_push, m4_divert_pop): Keep track of them in m4_divert_stack. (m4_divert_pop): Accept the expected current diversion as argument and m4_fatal if incorrect, or if there is nothing to pop. (globally): Specify the known m4_divert_pop. Preserve symbolic values when possible. * acgeneral.m4: No longer push the first diversion. Specify the known m4_divert_pop. (AC_PLAIN_SCRIPT): When m4_divert_push a diversion, m4_wrap its pop. (AC_INIT): Run AC_PLAIN_SCRIPT first, not last. * tests/m4sh.at (AS_DIRNAME & AS_DIRNAME_SED): Can't use m4_defun without m4_init. * m4sugar.m4: Likewise. 2001-01-18 Akim Demaille <akim@epita.fr> * m4sugar.m4 (m4_defn, m4_undefine, m4_popdef): Unlike the builtin, fail on undefined symbols. * tests/torture.at (Torturing config.status): Stop playing nasty tricks with changequote. (AC_DEFUBST): Move here from... * tests/aclocal.m4: there. 2001-01-18 Akim Demaille <akim@epita.fr> Various cleanups and consistency checks. * m4sugar.m4: Formatting changes. * acgeneral.m4 (AC_DIVERT_PUSH, AC_DIVERT_POP, AC_REQUIRE) (AC_DIAGNOSE, AC_FATAL, AC_MSG_WARN, AC_MSG_NOTICE, AC_MSG_ERROR): Use m4_copy to define them, in order to keep a good $0. (AC_INIT): AC_LANG_PUSH C, not AC_LANG, to initialize the stack. * aclang.m4 (AC_LANG_PUSH): Dont't use m4_defn on undefined macros. (AC_LANG_POP): Admit an argument specifying the language we quit when popping. Adjust Autoconf's AC_LANG_POPs. * tests/tools.at (AWK portability): Don't depend on AC_INIT. (autoconf --trace: user macros): Obviously I meant TRACE1, not AC_TRACE1. 2001-01-17 Akim Demaille <akim@epita.fr> * m4sugar.m4 (m4_undefine, m4_popdef): Don't tolerate undefined arguments. (_m4_expansion_stack): Rename as... (m4_expansion_stack): this, and change its value: instead of using the pushdef stack to stack each *line* of the stack, each definition contains the whole stack. I.e., to display the whole stack, instead of popdefing and displaying each definition, just display the current definition. (m4_expansion_stack_push, m4_expansion_stack_pop): New. * tests/atspecific.m4 (AT_CHECK_AUTOCONF): Let $2 be the expected exit status. * tests/m4sugar.m4 (m4_require: circular dependencies): New test. 2001-01-17 Pavel Roskin <proski@gnu.org> * m4sugar.m4 (m4_normalize): New macro - superposition of m4_flatten and m4_strip. (m4_join): Use m4_normalize. * acgeneral.m4 (AC_FOREACH): Use m4_normalize. (AC_CONFIG_HEADERS): Normalize the first argument. (AC_CONFIG_LINKS): Likewise. (AC_CONFIG_SUBDIRS): Likewise. 2001-01-17 Tim Van Holder <tim.van.holder@pandora.be> * acgeneral.m4 (_AC_OUTPUT_SUBDIRS): Quote $ac_sub_srcdir uses. 2001-01-16 Akim Demaille <akim@epita.fr> Work around the Ultrix limitations on ``multiple redirections''. Reported by Harlan Stenn. * acgeneral.m4 (_AC_EVAL_STDERR): New. (_AC_PREPROC_IFELSE): Use it. 2001-01-16 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_data_files): Fix the computation of PATH. 2001-01-16 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_LOG_COMPLETE): Eve out from AC_OUTPUT. (_AC_INIT_DEFAULTS, AC_OUTPUT): Use it. 2001-01-16 Akim Demaille <akim@epita.fr> * doc/autoconf.texi: Lots of additions and changes. (File Descriptors): New. (Limitations of Make): New. 2001-01-16 Akim Demaille <akim@epita.fr> * m4sh.m4 (AS_EXIT): Don't rely on exit == exit $?. Reported by Tim Van Holder. 2001-01-16 Akim Demaille <akim@epita.fr> * Makefile.am (editpl, editsh): Merge into... (edit). * m4sh.m4 (AS_UNAME): Eved out from... * acgeneral.m4 (_AC_INIT_DEFAULTS): here. (_AC_INIT_PACKAGE): Define AC_PACKAGE_NAME. (_AC_INIT_PARSE_ARGS): AC_SUBST the PACKAGE_ variables. Propagate their use in the executables and the test suite. * tests/atgeneral.m4 (PATH): Include only absolute paths. (AT_INIT): Use AS_UNAME. 2001-01-16 Akim Demaille <akim@epita.fr> When default headers are used, check for their presence. Suggested by Jim. * acgeneral.m4 (_AC_INIT_DEFAULTS): Don't define ac_includes_default, since... (_AC_INCLUDES_DEFAULT_REQUIREMENTS): this new macro does. (AC_INCLUDES_DEFAULT): Require the former when default includes are used. (AC_CHECK_MEMBERS, _AC_CHECK_TYPE_NEW): Don't require AC_HEADERS_STDC, that's a job for stupendous AC_INCLUDES_DEFAULT. * acfunctions.m4 (AC_FUNC_MALLOC): Check for stdlib.h. 2001-01-15 Akim Demaille <akim@epita.fr> * doc/autoconf.texi: Normalize sh samples. 2001-01-15 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_INIT): Simplify the hairy display of the identity of the tests. 2001-01-15 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_INIT): When the suite failed, complain before creating the debug scripts. Create a log file. When ignoring a test, display a reassuring `ok' for stressed users, and say `skipped' instead. Simply run `testsuite' with the failed tests instead of running the debug scripts, this avoids having zillions of banners `Testing Blabla 2.13' (another means to avoid these banners is to have the test suite succeed :-). 2001-01-15 Akim Demaille <akim@epita.fr> * sh.m4 (AS_BOX, _AS_BOX_LITERAL, _AS_BOX_INDIR): New. * tests/atgeneral.m4: Use it. 2001-01-15 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_VAR_INDIR_IFELSE): Move as... * m4sh.m4 (AS_LITERAL_IF): this. (AS_IFELSE): Rename as... (AS_IF): this. 2001-01-12 Akim Demaille <akim@epita.fr> With `expr's that return `0' on failures, the executable suffix is `0'. Test and fix. Reported by Assar Westerlund. * Makefile.am (maintainer-check): New target. * tests/Makefile.am (maintainer-check, maintainer-check-posix) (maintainer-check-c++, expr): Likewise. * configure.in (EXPR): Look for it. * tests/atgeneral.m4 (AT_CHECK): Propagate $2's default value. * tests/compile.at (Extensions): New test. * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O): Distinguish files with or without a dot. 2001-01-12 Akim Demaille <akim@epita.fr> * acgeneral.m4: Last changes for `configure.ac'. (_AC_INIT_HELP, _AC_OUTPUT_SUBDIRS): Take `configure.ac' into account. * autoreconf.sh: Likewise. 2001-01-11 Motoyuki Kasahara <m-kasahr@sra.co.jp> * acfunctions.m4 (AC_FUNC_MEMCMP): Missing comma in AC_TRY_RUN invocation. 2001-01-11 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): New. (AC_PROG_CC, AC_PROG_CXX): Use it. (AC_PROG_CC_STDC): Be sure to remove tmp files. * tests/compile.at (AC_TRY_LINK_FUNC): Don't use exit to test it, since it produces a prototype which conflicts with the one computed by _AC_PROG_CXX_EXIT_DECLARATION. * tests/semantics.at (AC_CHECK_FUNCS, AC_HAVE_FUNCS): Likewise. (AC_HAVE_FUNCS): Test AC_HAVE_FUNCS! 2001-01-11 Kevin Ryde <user42@zip.com.au> * autoconf.texi (Shellology): Fix an @end itemize, and a typo. 2001-01-11 Kelly Anderson <tgcorp@attglobal.net> * autoconf.sh (M4): Handle PC drive letters. * autoupdate.sh: Likewise. 2001-01-11 Steven G. Johnson <stevenj@alum.mit.edu> * aclang.m4 (AC_PROG_F77): Add pgf90 to the list of compilers to look for, after the other Fortran 90 compilers. 2001-01-11 Akim Demaille <akim@epita.fr> * aclang.m4: Use m4_copy to duplicate macros. (AC_LANG_PUSH): In order to have AC_LANG's simplifications effective, be sure to let _AC_LANG be the old language before calling AC_LANG. 2000-12-25 Pavel Roskin <proski@gnu.org> * autoreconf.sh: s/localddir/localdir/. Reported by Motoyuki Kasahara. 2000-12-23 Akim Demaille <akim@epita.fr> * autoconf.sh: Promote `configure.ac' over `configure.in'. * autoreconf.sh: Likewise. * autoheader.sh: Ditto. * autoupdate.sh: Similarly. * doc/autoconf.texi: Adjust. * tests/atspecific.m4: Be sure to remove configure.in. Adjust the test suite to use `configure.ac'. 2000-12-22 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_EVAL, AC_TRY_EVAL, AC_TRY_COMMAND): Be a single statement, so that one can make pipes with AC_TRYs, just as in 2.13. 2000-12-20 Lars J. Aas <larsa@sim.no> * aclang.m4 (_AC_COMPILER_OBJEXT, _AC_COMPILER_EXEEXT_O): Make the order of arguments for ls count by splitting the ls command into a sequence of ls commands. 2000-12-20 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_LANG_COMPILER_GNU): Be sure to have `choke me' on the seventh column so that the SGI Fortran compiler really chokes on it. From Ezra Peisach. 2000-12-20 Akim Demaille <akim@epita.fr> * tests/foreign.at (Autoconf & Libtool): Ignore Libtool version 1.3.[0-5]. * tests/compile.at (GNU Fortran 77): Use AS_EXIT. 2000-12-20 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_CLEANUP_FILE_IFELSE): Fix the regexp: the pattern ` state* ' was added many times for `*' was improperly escaped. (AT_INIT): Remove the data files before running the tests. Define AT_data_files and output it. (AT_SETUP): Don't. (_m4_divert(TEST)): Remove, now useless. 2000-12-20 Akim Demaille <akim@epita.fr> * aclang.m4: `dnl' the AC_LANG_PUSH and AC_LANG_POP. (AC_PROG_CXXCPP, AC_PROG_CPP): Set the current language instead of just asserting it, since these macros can be called directly. Reported by Raja R. Harinath. 2000-12-19 Pavel Roskin <proski@gnu.org> * doc/autoconf.texi (Installation Directory Variables): More info on prefix and exec_prefix. 2000-12-19 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_COMPILER_OBJEXT): Don't rely on _AC_COMPILE_IFELSE which uses ac_objext in a `test -s'. Reported by Lars J. Aas. 2000-12-19 Akim Demaille <akim@epita.fr> * tests/compile.at (AC_PROG_CPP without warnings, GNU Fortran 77): Use AC_TRY_COMMAND when running commands, to enrich the logs. 2000-12-19 Akim Demaille <akim@epita.fr>, Mo DeJong <mdejong@cygnus.com> * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): New. (_AC_COMPILER_EXEEXT_O): Extracted from... (_AC_COMPILER_EXEEXT): here. Adjust. 2000-12-19 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_CHECK): Make exit status report more visible. * tests/atspecific.m4 (AT_CHECK_AUTOCONF): Support FLAGS, STDOUT and STDERR. (AT_CHECK_CONFIGURE): Support plenty, cleanup defs when needed. Spread their use in the whole suite. Simplify a few AT_CLEANUPs. 2000-12-19 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_CHECK): Accept if-failed and if-not-failed. * tests/atspecific.m4 (AT_CHECK_CONFIGURE): Use it in order to dump config.log when configure failed. Before, the log was reported only on success. 2000-12-19 Akim Demaille <akim@epita.fr> * tests/foreign.at: New file. 2000-12-19 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_BANNER, AT_CLEANUP): Formatting changes. 2000-12-18 Pavel Roskin <proski@gnu.org> * Makefile.am: Add a comment explaining why suffix rules are not used there. 2000-12-15 Pavel Roskin <proski@gnu.org> * autoconf.sh: If the "allowed" pattern is not defined set it to "^$". * tests/tools.at (autoconf: forbidden tokens, basic): New test. (autoconf: forbidden tokens): Renamed to ... (autoconf: forbidden tokens, exceptions): ... this. 2000-12-15 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_PROG_CXXCPP, AC_PROG_CPP): Require AC_PROG_CXX/CC. 2000-12-15 Akim Demaille <akim@epita.fr> * tests/compile.at (GNU Fortran 77): G77 is a `yes'/`' var. Reported by Ezra Peisach. 2000-12-15 Akim Demaille <akim@epita.fr> * tests/compile.at (GNU Fortran 77): s/g77/G77/. Reported by Ezra Peisach. 2000-12-15 Akim Demaille <akim@epita.fr> * man/Makefile.am (.x.1): Fix to work properly with builddir != srcdir. 2000-12-15 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)) (AC_PROG_CPP, AC_PROG_CXXCPP, AC_PROG_GCC_TRADITIONAL) (_AC_PROG_CC_G, AC_PROG_CC_C_O, _AC_PROG_CXX_G, AC_PROG_CC_STDC): Don't use `${CC-cc}' since now the AC_REQUIRE machinery guarantees that $CC is defined. And if not, it's a bug which must be observable. * acspecific.m4 (AC_SYS_LARGEFILE): Likewise. 2000-12-15 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_PREPROC_IFELSE): Use ac_status as set by AC_TRY_EVAL. (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE): More alike, using AS_IFELSE, and systematically AC_TRY_COMMAND when testing something (for the logs). 2000-12-15 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_PROG_PREPROC_WORKS): Use _AC_PREPROC_IFELSE. * acgeneral.m4 (_AC_TRY_CPP): Its last use was that above, so inline it into... (_AC_PREPROC_IFELSE): here. 2000-12-15 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_INIT): Forget about `-n'. Adjust so that `./testsuite -h 1 2' explains only tests 1 & 2. 2000-12-15 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_EVAL): New. (AC_TRY_EVAL, AC_TRY_COMMAND): Use it. 2000-12-15 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_PREPROC_IFELSE, AC_PREPROC_IFELSE): New. (AC_TRY_CPP): Use AC_PREPROC_IFELSE. (AC_CHECK_MEMBER, AC_CHECK_DECL, _AC_CHECK_TYPE_NEW): Quote properly. * acheaders.m4 (AC_CHECK_HEADER): Quote properly, use AC_PREPROC_IFELSE. * acspecific.m4 (_AC_PATH_X_DIRECT): Use AC_PREPROC_IFELSE. 2000-12-15 Akim Demaille <akim@epita.fr> * m4sugar.m4 (m4_init): Catch `dnl'. 2000-12-15 Pavel Roskin <proski@gnu.org> * m4sh.sh (AS_ERROR): Restore dnl at the end of the macro. 2000-12-14 Pavel Roskin <proski@gnu.org> * tests/semantics.at (AC_CHECK_TYPES): There are two tests with this name. Rename the second one to "AC_CHECK_TYPES: backward compatibility" (AC_TRY_LINK_FUNC): Removed. It's now in tests/compile.at. (C keywords): Likewise. (AC_PROG_CPP with warnings): Likewise. (AC_PROG_CPP without warnings): Likewise. 2000-12-14 Akim Demaille <akim@epita.fr> Put back AC_CYGWIN etc. under the responsibility of the configure.in maintainer, but discourage its use. * acspecific.m4 (_AC_CYGWIN, _AC_MINGW32, _AC_EMXOS2): Rename as... (AC_CYGWIN, AC_MINGW32, AC_EMXOS2): these. AU defined on top of AC_CANONICAL_HOST and $host_os. * tests/mktests.sh (update_exclude_list): Add AC_CYGWIN, AC_MINGW32, and AC_EMXOS2. 2000-12-13 Pavel Roskin <proski@gnu.org> * m4sugar.m4 (m4_file_append): Add a newline after _m4eof, otherwise _m4eof is appended to the output on FreeBSD 4.0. * tests/atgeneral.m4 (AT_INIT): Avoid using unbalanced "y" in sed, use "s" instead. * tests/mktests.sh: Don't use \? in sed - it's a GNU extension. Use separate patterns for A[CU]_DEFUN and AC_DEFUN_ONCE. 2000-12-13 Akim Demaille <akim@epita.fr> EXEEXT and OBJEXT don't need to know $CYGWIN etc. * acspecific.m4 (AC_EXEEXT, AC_OBJEXT, _AC_EXEEXT, _AC_OBJEXT): Move as... * aclang.m4 (AC_EXEEXT, AC_OBJEXT, _AC_COMPILER_EXEEXT) (_AC_COMPILER_OBJEXT): these. (_AC_COMPILER_EXEEXT): Use _AC_LINK_IFELSE. Don't depend upon $CYGWIN and the like. (_AC_COMPILER_OBJEXT): Model after _AC_COMPILER_EXEEXT. Skip more extensions. Use _AC_COMPILE_IFELSE. 2000-12-12 Pavel Roskin <proski@gnu.org> * Makefile.am: Don't use suffix rules for perl and shell scripts. Use explicit rules instead. 2000-12-12 Pavel Roskin <proski@gnu.org> * autoscan.pl (init_tables): Allow spaces on the right hand side in autoscan tables. Die if there are no spaces at all. (scan_c_file): Use \b instead of \W so that keywords match at the beginning and the end of the line. (scan_sh_file): Likewise. (scan_makefile): Likewise. Use \B to match before `-l'. (output): Suggest AC_CONFIG_HEADER if any C/C++ sources are found. * acidentifiers: Update macros for structure members st_blksize and st_rdev. 2000-12-12 Akim Demaille <akim@epita.fr> * tests/compile.at (GNU Fortran 77): Be robust to compilers that choke on `--version'. 2000-12-12 Akim Demaille <akim@epita.fr> * tests/suite.at: Run `tools.at' first. 2000-12-12 Akim Demaille <akim@epita.fr> * tests/aclocal.m4 (AC_STATE_SAVE): Use a more precise regexp to keep envvars. 2000-12-12 Akim Demaille <akim@epita.fr> AS_ERROR was not properly saving data in the log file. * sh.m4 (AS_WARN, AS_ERROR): Use AS_MESSAGE. (_AS_ECHO): Fix quotation. (AS_MESSAGE): Use `as_me'. * acgeneral.m4: More banners in the log. (_AC_INIT_DEFAULTS): Compute as_me before using it. 2000-12-08 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (System Services) <AC_PATH_XTRA>: Adjust the documentation about X_DISPLAY_MISSING to the code. 2000-12-07 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_INIT): More robust computation of ac_tests_pattern. Reported by Andrej Borsenkow. 2000-12-07 Akim Demaille <akim@epita.fr> * acspecific.m4 (_AC_EXEEXT): Skip *.pdb. From Paul Berrevoets. 2000-12-07 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_CHECK): Bad typo: assign `exit 1' to at_continue if something failed, not `:'. * tests/semantics.at (AC_PATH_XTRA): New. * acspecific.m4 (_AC_PATH_X): New, extracted form AC_PATH_X. 2000-12-06 Akim Demaille <akim@epita.fr> * configure.in: Bump version to 2.49c. 2000-12-06 Akim Demaille <akim@epita.fr> Version 2.49b. 2000-12-06 Akim Demaille <akim@epita.fr> Stop playing with FDs in Autotest. * tests/atgeneral.m4 (AT_INIT): Set up FD 5. (AT_CHECK): Instead of using exec to globally change the FDs of `testsuite', enclose the body of the test into a `(..) >stdout 2>stderr'. In every case, when verbose, display the differences between expected and observed (stdout, stderr, exit status). Let `0' be the default for EXIT-STATUS. Support EXIT-STATUS == `ignore'. 2000-12-06 Akim Demaille <akim@epita.fr> * tests/tools.at (autoconf: forbidden tokens): Adjust expected result. 2000-12-06 Akim Demaille <akim@epita.fr> * man/config.guess.x: New file. * man/config.sub.x: New file. 2000-12-06 Akim Demaille <akim@epita.fr> * tests/aclocal.m4 (AT_STATE_SAVE): Don't even try to preserve egrep error messages, AT_CHECK will find them. 2000-12-06 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Usual Tools) <awk>: `for' on arrays is nondeterministic across AWK implementations. * tests/tools.at (autoconf: forbidden tokens): Sort the error message to guarantee its uniqueness. 2000-12-06 Akim Demaille <akim@epita.fr> The SunOS' egrep fails to process properly the `egrep' invocations of the test suite. * tests/aclocal.m4 (AC_STATE_SAVE): If egrep fails, remove the output file. * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Don't check `state-*' if the files are not present. * m4sugar.m4 (m4_join): Rename as... (m4_smash): this. * tests/aclocal.m4 (join): Move as... * m4sugar.m4 (m4_flatten): this. * autoconf.sh (trace.m4): Rename m4_smash as m4_flatten. 2000-12-06 Akim Demaille <akim@epita.fr> * autoconf.sh (task trace): s/m4/$M4/. * autoheader.sh: When loading trace.sh, catch errors and exit with a decent error message. * tests/tools.at: Be sure to test autoconf --trace before autoheader. 2000-12-06 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_CHECK): Fix the m4_ifval invocation. 2000-12-06 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_LANG): Be `smart': don't issue the sh code if the current language did not change. (AC_LANG_ASSERT): New. (AC_PROG_CPP, AC_PROG_CXXCPP): Assert the language. (_AC_PROG_F77_V, _AC_F77_NAME_MANGLING): Don't require AC_PROG_F77, the code you include does it. (AC_F77_LIBRARY_LDFLAGS): Set the language. 2000-12-06 Akim Demaille <akim@epita.fr> * m4sugar.m4 (ifelse): Rename as... (m4_if): this. * autoconf.m4 (ifelse): Restore. 2000-12-06 Akim Demaille <akim@epita.fr> * m4sugar.m4 (m4_dquote, m4_pattern_forbid, m4_pattern_allow) (m4_cr_letters, m4_cr_LETTERS, m4_cr_Letters, m4_cr_digits) (m4_cr_symbols1, m4_cr_symbols2, m4_re_string, m4_re_word) (m4_init): New macros. (m4_token_allow): Remove. * acgeneral.m4: Don't push BODY into the diversion stack. (AC_PLAIN_SCRIPT): Do it. Call m4_init, define the Autoconf patterns. (AC_INIT): Use AC_PLAIN_SCRIPT. Remove the useless `dnl' (those where the current diversion is KILL). * autoconf.sh (m4_common): Fix quotation. (finalize.awk): Load forbidden.rx and allowed.rx. Split the line into tokens, and check their validity. * tests/tools.at (Forbidden tokens): Adjust. 2000-12-05 Bob Wilson <bwilson@tensilica.com> * acspecific.m4 (_AC_OBJEXT, _AC_EXEEXT): Ignore .d files produced by CFLAGS=-MD. 2000-12-05 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_PROG_F77): Temporarily set ac_ext to F to run _AC_LANG_COMPILER_GNU. From Steven G. Johnson. * tests/compile.at (GNU Fortran 77): New test. 2000-12-05 Akim Demaille <akim@epita.fr> * tests/tools.at (autoupdate): Strengthen and check autoupdate's idempotency. 2000-12-05 Akim Demaille <akim@epita.fr> * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): s/cp -f/mv -f/. 2000-12-01 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Don't escape backquotes in AC_MSG_ERROR. Fix error message. 2000-12-01 Pavel Roskin <proski@gnu.org> * tests/atgeneral.m4 (AT_INIT): Use ${CONFIG_SHELL-/bin/sh} to run the testsuite from the debug scripts. Suggested by Alexandre Oliva. 2000-11-30 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Assignments): Don't use $? from an assignment. 2000-11-30 Akim Demaille <akim@epita.fr> * sh.m4 (AS_EXIT): Don't rely on false exiting 1. Actually, always use `(exit $val); exit', don't try to be tricky. * doc/autoconf.texi (Limitations of Builtins) <false>: new. 2000-11-30 Akim Demaille <akim@epita.fr> * sh.m4 (_AS_EXPR_PREPARE): Don't rely on the exit status of a back quote evaluation since the very system for which the test was written does not propagate it. Groumph! 2000-11-30 Akim Demaille <akim@epita.fr> * acspecific.m4 (_AC_EXEEXT): Also remove conftest$ac_exeext. Reported by Pavel. 2000-11-30 Akim Demaille <akim@epita.fr> * acspecific.m4 (_AC_EXEEXT, _AC_OBJEXT): Make the two macros more alike: a loop over a sorted list of possible files. Don't cleanup on errors, the trap will do it. Cleanup when there are no errors. (_AC_EXEEXT): Use the empty string instead of `no' as the cached value. Be sure to prefer `.exe' to `' when the two are observable. Suggested by Lars and Earnie. 2000-11-30 Akim Demaille <akim@epita.fr> When using Cygwin, in spite of all their efforts, it may happen that `confestval' be read in binary mode. The shell then fails to properly strip the \r\n. Reported by Lars J. Aas. * aclang.m4 (AC_LANG_INT_SAVE): Don't add any trailing new line, and close the file. Suggested by Peter Eisentraut. 2000-11-30 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Systemology): New section. Some about QNX 4. 2000-11-30 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Special Shell Variables): Document RANDOM. 2000-11-30 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Usual Tools): Some about cp and mv, thanks to Ian. 2000-11-29 Akim Demaille <akim@epita.fr> * acspecific.m4 (_AC_OBJEXT): Skip *.tds, special case .o and .obj. Suggested by Lars. 2000-11-29 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix the portability of the default assignment of CONFIG_FILES, CONFIG_HEADERS, CONFIG_LINKS and CONFIG_COMMANDS. 2000-11-29 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CACHE_SAVE): Use the `clear' trick to work around broken seds. (_AC_OUTPUT_HEADERS, _AC_OUTPUT_FILES): Rename the sed labels to match the Autoconf documentation. 2000-11-29 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Shell Substitutions): More on the variations around ${foo=bar}. (Assignments): Rewrite as a summary of the previous section. * acgeneral.m4 (AC_CACHE_SAVE): Be protected against the Solaris' `${foo='${bar}'}' bug. 2000-11-29 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_OUTPUT_HEADERS, _AC_OUTPUT_FILES): Don't use `... echo "error: \\\`$f'" ...` as it's not portable to BSDI 1.3. Do this instead: `... echo "error: $f" ...` Reported by Daniele Arena. 2000-11-29 Akim Demaille <akim@epita.fr> QNX 4.2.5's expr always exits 1 when `:' is used with parens. * doc/autoconf.texi (Limitations of Usual Tools) <expr>: More information, thanks to Paul Berrevoets, Paul Eggert and David Morgan. * sh.m4 (_AS_EXPR_PREPARE): New. (AS_DIRNAME): Use it. 2000-11-29 Akim Demaille <akim@epita.fr> sizeof (struct {char a,b; }) is not required to be 2. Reported by Johan Danielsson. * tests/semantics.at (AC_CHECK_SIZEOF): Define charchar as an array of 2 chars. Suggested by Alexandre. 2000-11-29 Akim Demaille <akim@epita.fr> Provide a means to display banners in the test suite. * tests/atgeneral.m4 (AT_INIT): Initialize `AT_banner_ordinal'. Execute the epilogue of the tests only if a test was run. Don't build the value of `at_tests_all' with a for loop: expand `AT_TESTS_ALL'. (AT_SETUP): Build `AT_TESTS_ALL'. (AT_BANNER): New. Adjust all the former banners to use it. (AT_CHECK): Don't trace the decoding of `$?'. 2000-11-29 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_DEFINE, AT_UNDEFINE, AT_SHIFT) (AT_INCLUDE): Remove, use the m4_ macros. 2000-11-29 Akim Demaille <akim@epita.fr> * m4sugar.m4 (ifval, ifset, ifdef, ifndef, m4_ifvanl): Rename as... (m4_ifval, m4_ifset, m4_ifdef, m4_ifndef, m4_ifvaln): this. (m4_n): New macro. (m4_ifvaln): Use it. * autoconf.m4 (ifdef): Restore it. 2000-11-29 Akim Demaille <akim@epita.fr> * m4sugar.m4 (m4_errprint, divnum, errprint, esyscmd): Rename as... (m4_errprintn, m4_divnum, m4_errprint, m4_esyscmd): this. * autoconf.m4: Restore them. 2000-11-28 Pavel Roskin <proski@gnu.org> * doc/autoconf.texi (Fortran 77 Compiler Characteristics): Don't suggest obsolete AC_LANG_FORTRAN77. (Language Choice): Better preamble. 2000-11-28 Pavel Roskin <proski@gnu.org> * doc/install.texi: Minor changes to eliminate TeX warnings. * doc/autoconf.texi: Likewise. Typo fixes. 2000-11-23 Akim Demaille <akim@epita.fr> * tests/atconfig.in: Move code into... * tests/atgeneral.m4 (AT_INIT): here. Use AS_SHELL_SANITIZE. 2000-11-23 Akim Demaille <akim@epita.fr> Have the test suite list of the test groups and their references. * tests/atgeneral.m4 (_m4_divert(SUITE_PRO)): Remove, replaced by... (_m4_divert(DEFAULT), _m4_divert(OPTIONS), _m4_divert(HELP)) (_m4_divert(SETUP)): these. (_m4_divert(SUITE_EPI)): Rename as... (_m4_divert(TAIL)): this. (AT_INIT): Adjust to the new diversions. Insert the magic number. Accept test groups as cli argument. List the test groups. Rename TESTS, test, and tests as at_tests_all, at_test, and at_tests. Have the debug scripts pass options to test suite. Remove their banner. * tests/atspecific.m4: Don't divert to 0. * suite.at: Don't insert the magic number. 2000-11-23 Akim Demaille <akim@epita.fr> * m4sugar.m4 (m4_divert, m4_undivert): Support named diversions. * tests/atgeneral.m4 (_m4_divert(SUITE_PRO), _m4_divert(TESTS)) (_m4_divert(SUITE_EPI), _m4_divert(TEST)): New diversions. Push the first two diversions. (AT_INIT): Don't. (AT_INIT, AT_SETUP, AT_CLEANUP): Adjust to use the named diversions. 2000-11-23 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_CLEANUP): Factor the computation of at_test_count into... (AT_INIT): here. Use an sh variable, at_data_files, instead of an hard coded list. 2000-11-23 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_CLEAN_FILE_IFELSE, AT_CLEANUP_FILE) (AT_CLEANUP_FILES): New macros. (AT_SETUP, AT_CHECK, AT_CLEANUP): Use them. (AT_CHECK): Fix a use of at_verbose. * tests/atspecific.m4 (AT_CHECK_AUTOCONF, AT_CHECK_AUTOHEADER) (AT_CHECK_CONFIGURE): New macros. 2000-11-23 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_INIT) <at_verbose>: Be a :/echo variable. <at_silent>: Remove. (AT_CLEANUP): Clean up the diversion use. 2000-11-23 Akim Demaille <akim@epita.fr> Factor part of the prologue of the tests. * tests/atgeneral.m4 (AT_SETUP, AT_CLEANUP): No longer handle at_stop_on_error. (AT_INIT): After having checked whether the test failed, break out of the loop if requested (-e). 2000-11-23 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_SETUP): Don't build at-check-line, that's AT_CHECK's job. Remove the code depending upon `at_skip_mode': it's unused. 2000-11-23 Akim Demaille <akim@epita.fr> * tests/atconfig.in: Remove the `snippet' marks, there are no longer used. * tests/atgeneral.m4: Likewise. 2000-11-23 Akim Demaille <akim@epita.fr> Factor the epilogue of the tests. * tests/atgeneral.m4 (AT_CLEANUP): Move the reading of at_status into... (AT_INIT): here, at the end of the `case'. 2000-11-23 Akim Demaille <akim@epita.fr> The debug scripts are only wrapper around testsuite, asking for a specific test. * tests/atgeneral.m4 (AC_INIT) <at_debug>: New variable, new option, -d, to disable the creation of the debug scripts (when testsuite was already launched from one). <at_test_count>: Really compute it instead of using the number of the last test run. 2000-11-23 Akim Demaille <akim@epita.fr> Transform Autotest's body into a `for test; case $test'. As a known side effect, currently any code outside AT_SETUP/AT_CLEANUP is discarded. * acgeneral.m4 (_m4_divert(KILL)): Move to... * m4sugar.m4: here. * tests/atgeneral.m4 (AT_INIT): Use m4_divert_push/pop instead of m4_divert. Put all the tests inside a for;case. Define TESTS. (AT_SETUP, AT_CLEANUP): Open/close each case. 2000-11-23 Akim Demaille <akim@epita.fr> Move divert and undivert into m4_. * m4sugar.m4 (m4_divert, divert, undivert): Rename as... (m4_divert_text, m4_divert, m4_undivert): this. * autoconf.m4 (divert, undivert): Restore them for user macros only. 2000-11-23 Akim Demaille <akim@epita.fr> Move Autotest on top of M4sh. * tests/atgeneral.m4: Import M4sh. Adjust the differences on the names of the builtins (define etc.). (AT_CASE): Remove, use m4_case. (AT_SETUP): Don't use `AT_group_description', `$1' is OK. * tests/atspecific.m4 (m4_for, m4_foreach): Remove, use those of M4sugar. * tests/m4sugar.at: Strengthen the quotation and adjust to the new macro names. * tests/m4sh.at: Ditto. * tests/torture.at: Ditto. * tests/base.at: Ditto. * m4sh.m4: Import M4sugar. * autoconf.m4: Don't import M4sugar, M4sh does. 2000-11-20 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_RUN_IFELSE): `==' in test is not portable, replace with `='. 2000-11-17 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_DEFAULTS): Also include `PATH' and `/bin/machine' in the log. 2000-11-17 Akim Demaille <akim@epita.fr> Let AC_TRY_RUN be more verbose * acgeneral.m4 (_AC_RUN_IFELSE): Instead of canceling the output of the test program, save it into the log. Save the exit status, and report it in the log when non zero. Just use `(./conftest)' instead of `(./conftest; exit)'. 2000-11-17 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_DEFAULTS) <ac_includes_default>: Include sys/stat.h. * acspecific.m4 (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_BLOCKS) (AC_STRUCT_ST_RDEV): Simplify. * acfunctions.m4 (AC_FUNC_MMAP): Include sys/stat.h unconditionally. * doc/autoconf.texi (Default Includes): Adjust. (Particular Structures) <AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV>: Adjust. 2000-11-16 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Usual Tools) <expr>: expr 'a' : '\(b\)'. From Paul Eggert. 2000-11-16 Akim Demaille <akim@epita.fr> Reorder the test suite so that low level features are tested before high level ones. * tests/semantics.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): (missing templates): Move to... * tests/torture.at: here. Reorder the file so that the torture test is last. * tests/semantics.at (AC_TRY_LINK_FUNC, AC_PROG_CPP with warnings) (AC_PROG_CPP without warnings): Move to... * tests/compile.at: here, new file. * tests/suite.at: Run `torture' and then `compile' before `semantics'. 2000-11-16 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_SYS_LARGEFILE): _AC_SYS_LARGEFILE_SOURCE no longer exist. 2000-11-16 Akim Demaille <akim@epita.fr> POSIX doesn't require s/[^/]// to work. From Paul Eggert and Johan Danielsson. * doc/autoconf.texi (Limitations of Usual Tools) <sed>: Reorganize. Document this issue. * autoupdate.sh (dir): Use `,' as separator instead of `/' * autoreconf.sh: Likewise. * autoupdate.sh: Ditto. 2000-11-16 Paul Eggert <eggert@twinsun.com> * m4/largefile.m4 (_AC_SYS_LARGEFILE_SOURCE): Remove, replaced by... (_AC_SYS_LARGEFILE_TEST_INCLUDES): this. (AC_SYS_LARGEFILE_MACRO_VALUE): Use AC_LANG_PROGRAM instead of _AC_SYS_LARGEFILE_SOURCE, i.e., don't pass _AC_SYS_LARGEFILE_TEST_INCLUDES by default: this isn't desirable when checking for fseeko. (AC_SYS_LARGEFILE): Pass AC_SYS_LARGEFILE_TEST_INCLUDES to _AC_SYS_LARGEFILE_MACRO_VALUE, since it no longer does this for us. 2000-11-16 Akim Demaille <akim@epita.fr> Provide a means for escaping the forbidden patterns test. * tests/tools.at (Forbidden tokens): Test m4_token_allow. * m4sugar.m4 (m4_file_append, m4_token_allow): New macros. * autoconf.sh (task script): Pass `tmp' and `verbose' to finalize.awk. (finalize.awk::check_patterns): Eve out from the body. (finalize.awk): Read `$tmp/tokens_allowed', and don't complain for these exceptions. 2000-11-14 Paul Eggert <eggert@twinsun.com> * acspecific.m4 (AC_SYS_LARGEFILE): Don't worry about whether fseeko and ftello are properly declared. * acfunctions.m4 (AC_FUNC_FSEEKO): New macro, which worries about fseeko (and presumably ftello). Do not set _XOPEN_SOURCE; that causes too many problems in practice. * acfunctions (fteelo, fseeko): Trigger AC_FUNC_FSEEKO. * doc/autoconf.texi: Adjust. 2000-11-14 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Builtins): Comment `true'. 2000-11-14 Akim Demaille <akim@epita.fr> * BUGS: New file. Be sure to read this file if you're using a non released Autoconf. * tests/tools.at (Syntax of the scripts): The non built tools are in `$top_srcdir', not `..'. (autoconf --trace): When using `-i' we need the src tree, not the build tree. 2000-11-14 Akim Demaille <akim@epita.fr> A single m4_require is enough. * m4sugar.m4 (_m4_require): $2 defaults to $1. Rename as... (m4_require): this. * acgeneral.m4 (_AC_REQUIRE): Remove, use m4_require if you want to get into the gory details. 2000-11-14 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_DEFAULTS_ENVIRONMENT): Rename as... * m4sh.m4 (AS_SHELL_SANITIZE): this. 2000-11-14 Akim Demaille <akim@epita.fr> * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Don't neutralize autoconf's warnings. 2000-11-14 Akim Demaille <akim@epita.fr> Set AC_LANG_PREPROC_REQUIRE which replaces AC_REQUIRE_CPP. The main difference is that the former requires AC_LANG_COMPILER. * aclang (AC_LANG_PREPROC, AC_LANG_PREPROC(C), AC_LANG_PREPROC(C++)) (AC_LANG_PREPROC(Fortran 77), AC_LANG_PREPROC_REQUIRE): New macros. Issue a warning when looking for the Fortran 77 preprocessor instead of an error. (AC_LANG_COMPILER): Check that it is run before the corresponding AC_LANG_PREPROC. (AC_PROG_C (AC_LANG_COMPILER_REQUIRE): Don't call directly AC_LANG_COMPILER(_AC_LANG), rather invoke AC_LANG_COMPILER so that the generic code in AC_LANG_COMPILER is run. (AC_REQUIRE_CPP): Use AC_LANG_PREPROC_REQUIRE. (AC_PROG_CC, AC_PROG_CXX): Don't require being run before the corresponding AC_LANG_PREPROC: AC_LANG_COMPILER does it. Propagate AC_LANG_PREPROC_REQUIRE. * acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP): Use it instead of AC_REQUIRE_CPP. * acspecific.m4 (_AC_DECL_YYTEXT, AC_PATH_X): Don't AC_REQUIRE_CPP, inner macro will do it. * aclang.m4 (AC_PROG_GCC_TRADITIONAL, AC_C_STRINGIZE) (AC_C_PROTOTYPES): Likewise. (AC_C_STRINGIZE): Yeeks! The body of AC_CACHE_CHECK was not quoted. Use @%:@ do assist Emacs. For some reason (don't ask), this revamping revealed that AC_PROG_CC_STDC, because of the `break', does not clean its tmp files. * aclang.m4 (AC_PROG_CC_STDC): Extract the creation of conftest.c out of AC_COMPILE_IFELSE. Be sure to clean the tmp files. 2000-11-14 Akim Demaille <akim@epita.fr> * tests/m4sh.at (AS_DIRNAME & AS_DIRNAME_SED): Simplify. 2000-11-14 Akim Demaille <akim@epita.fr> * acfunctions.m4 (AC_FUNC_ALLOCA): Don't require AC_PROG_CPP, since (i) you actually need a compiler, (ii) AC_TRY_LINK handles it. * acheaders.m4 (AC_HEADER_STDC): Don't require AC_PROG_CPP, AC_TRY_CPP does it. 2000-11-14 Akim Demaille <akim@epita.fr> Create acheaders.m4. * acgeneral.m4 (AC_CHECK_HEADER, AC_CHECK_HEADERS) (AH_CHECK_HEADERS): Move to... * acheaders.m4: here, a new file. * acspecific.m4 (_AC_CHECK_HEADER_DIRENT, AH_CHECK_HEADERS_DIRENT) (AC_HEADER_DIRENT, AC_HEADER_MAJOR, AC_HEADER_STAT, AC_HEADER_STDC) (AC_HEADER_SYS_WAIT, AC_HEADER_TIME) (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H) (_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL, AC_HEADER_TIOCGWINSZ): Move to... * acheaders.m4: here. 2000-11-14 Akim Demaille <akim@epita.fr> Move AC_MSG_* into M4sh. * acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move to... * m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here. (AS_MESSAGE, AS_WARN, AS_ERROR): New. * acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them. (AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of... (AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new. Adjust all dependencies. 2000-11-14 Akim Demaille <akim@epita.fr> * acgeneral.m4: Spread some AS_EXIT and AC_MSG_ERROR. (AC_OUTPUT): Don't play with trap, use ac_clean_files. 2000-11-14 Akim Demaille <akim@epita.fr> Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0 instead of hard coded `configure'. * acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/. (_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating it. No longer insert the configure banner. (_AC_INIT_DEFAULTS): Create config.log with the banner. Define `as_me'. (_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE) (AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED) (AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP) (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE) (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use `$as_me' instead of `configure'. (AC_OUTPUT): Get rid of the UCA, and of the empty line when dumping confdefs.h into config.log. (_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS. Print a banner. Use AC_MSG_ERROR and AC_MSG_NOTICE. * acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS) (_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE. * tests/semantics.at (missing templates): Adjust. 2000-11-14 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (autoconf Invocation): Explain `-W error' gives back traces. 2000-11-11 Pavel Roskin <proski@gnu.org> * acfunctions.m4 (AC_CHECK_FUNCS): Add missing m4 quotes. (AC_FUNC_GETPGRP): Likewise. * acspecific.m4 (AC_AIX): Likewise. * m4/init.m4 (AM_INIT_AUTOMAKE): Likewise. * m4/missing.m4 (AM_MISSING_PROG): Likewise. * m4/sanity.m4 (AM_SANITY_CHECK): Likewise. 2000-11-11 Pavel Roskin <proski@gnu.org> * acfunctions.m4: Always quote first argument of AC_MSG_ERROR, AC_MSG_WARN, AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED. * acgeneral.m4: Likewise. * aclang.m4: Likewise. * acspecific.m4: Likewise. * configure.in: Likewise. * doc/autoconf.texi: Likewise. 2000-11-10 Pavel Roskin <proski@gnu.org> * doc/autoconf.texi (Particular Structures): Fix examples for AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV. 2000-11-10 Pavel Roskin <proski@gnu.org> * doc/autoconf.texi (Limitations of Usual Tools): Don't use uncommon abbreviations. 2000-11-10 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Builtins): Some information about `trap'. Document the FreeBSD bug observed by Pavel. 2000-11-10 Pavel Roskin <proski@gnu.org> * autoscan.pl (scan_files): Eliminate a warning if no C files are found. (output): Likewise. Use AC_CONFIG_SRCDIR and AC_CONFIG_FILES instead of old-style arguments for AC_INIT and AC_OUTPUT. 2000-11-10 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Usual Tools): `&' in sed's rhs is portable. 2000-11-10 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Shell Substitutions): Some information about Solaris' sh handling of ``foo=${foo='}'}'' collected by Alexandre, reported by David Taylor. 2000-11-10 Akim Demaille <akim@epita.fr> * tests/m4sh.at (Negated classes in globbing): New test. 2000-11-10 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Builtins): `for i; do'. 2000-11-10 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Shellology): Some about /usr/xpg4/bin/sh on Solaris. Sort the entries. Some words about POSIX vs Bourne shell. From Russ Allbery and Robert Lipe. 2000-11-10 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Shell Substitutions): Split into... (Shell Substitutions, Assignments): these. Move them before `Special Shell Variables'. (Shell Substitutions): Include information on `$()' from Russ Allbery. 2000-11-10 Akim Demaille <akim@epita.fr> When running AC_INIT AC_PROG_CC AC_LANG_COMPILER_REQUIRE AC_PROG_CC is expanded twice, because AC_PROG_CC provides `AC_PROG_CC', and not `AC_LANG_COMPILER(C)' as expected by AC_LANG_COMPILER_REQUIRE. * aclang.m4 (AC_LANG_COMPILER(C)): Instead of calling AC_PROG_CC, require it. (AC_LANG_COMPILER(C++), AC_LANG_COMPILER(Fortran 77)): Likewise. 2000-11-10 Akim Demaille <akim@epita.fr> * m4sh.m4 (AS_MKDIR_P, AS_DIRNAME_SED): Don't shell quote $1. Adjust callers. Reported by Paul Eggert. * tests/m4sh.at: Sort. 2000-11-09 Pavel Roskin <proski@gnu.org> * install-sh: Use ":" instead of "true". 2000-11-09 Pavel Roskin <proski@gnu.org> * tests/tools.at (Syntax of the scripts): Check "autoreconf" only once. Check "install-sh", "mkinstalldirs" and "missing". 2000-11-09 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_COMPUTE_INT_COMPILE): Use ":" instead of "true". * tests/atgeneral.m4 (AT_INIT): Likewise. * tests/tools.at (Syntax of the scripts): Likewise. 2000-11-09 Pavel Roskin <proski@gnu.org> * tests/m4sugar.at (m4_warn): Adjusted to accept stack dump when -Werror is used. 2000-11-08 Akim Demaille <akim@epita.fr> * m4sugar.m4 (_m4_expansion_stack_dump): Really rename as... (m4_expansion_stack_dump): this. 2000-11-08 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_LANG_PROGRAM(Fortran 77): Complain about $1 having a value. Reported by Paul Martinolich. (_AC_LANG_COMPILER_GNU): Pass the test as the body of AC_LANG_PROGRAM, not the prologue. 2000-11-07 Pavel Roskin <proski@gnu.org> * autoconf.sh: Temporarily disable recognizing of abbreviated long options - it's hard to maintain them by hand. * autoheader.sh: Likewise. * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * ifnames.sh: Likewise. 2000-11-07 Akim Demaille <akim@epita.fr> * aclang.m4 (ac_cv_prog_gcc, ac_cv_prog_gxx, ac_cv_prog_g77): Be AU_DEFUN'd, not AU_ALIAS'd. Reported by Ralf Corsepius. * tests/mktests.sh (exclude_list): Skip these variables. 2000-11-07 Akim Demaille <akim@epita.fr> m4_syscmd was reestablished as `syscd' intead of `syscmd' because instead of `s/^m4_//', m4_copy_unm4 was running `s/[m4_]//'. * m4sugar.m4 (m4_copy_unm4): Fix. 2000-11-07 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECKING): Is not an alias of AC_MSG_NOTICE, hence use AU_DEFUN, not AU_ALIAS. 2000-11-03 Jim Meyering <meyering@lucent.com> * acfunctions.m4 (AC_FUNC_FNMATCH): Add a test to detect the d*/*1 vs d/s/1 bug. Add a couple more test cases to catch bugs in glibc 2.1.95. Include fnmatch.h unconditionally Mention the GNU C library. From Paul Eggert. 2000-11-03 Akim Demaille <akim@epita.fr> AC_CONFIG_AUX_DIR_DEFAULTS overrides AC_CONFIG_AUX_DIR. Ouch. Reported by Paul Martinolich. * acgeneral.m4 (AC_PROVIDE): Don't forget to `m4_provide'!!! Tss, novice... * tests/base.at (AC_REQUIRE & AC_PROVIDE): New test. 2000-11-03 Akim Demaille <akim@epita.fr> * m4sugar.m4 (m4_location): When using its value, don't use `m4_defn', since m4_location is not a variable, it's a macro which expands to __file__:__line__. * tests/m4sugar.at (m4_warn): New test. 2000-11-03 Akim Demaille <akim@epita.fr> * tests/tools.at (unexpanded macros): Strengthen. * autoconf.sh (finalize.awk): Use `sub' instead of `index' + `substr'. More comments. 2000-11-03 Akim Demaille <akim@epita.fr> * Makefile.am (.m4.m4f): Check that processing produces only comments and empty lines. Check that freezing produced no output. * m4sugar.m4: Commentize what was not. * m4sh.m4: Likewise. * aclang.m4: Formatting changes. 2000-11-03 Akim Demaille <akim@epita.fr> * autoconf.m4 (define): Reestablish only after having read the `ac' files. Adjust all the Autoconf code to use `m4_define', not `define'. 2000-11-03 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AU_ALIAS): Don't forget to pass the arguments to the new macro... Reported by Ezra Peisach. * tests/semantics.m4 (AC_HAVE_FUNCS): New test. * tests/tools.at (autoupdate): As a benign side effect, updating a macro that takes no argument produces `UPDATED([])', no longer `UPDATED()'. Adjust the test. 2000-11-03 Akim Demaille <akim@epita.fr> * autoconf.m4: Instead of reactivating the macros before reading Autoconf's files, do it afterwards, so that Autoconf promotes the right use, but users still can use the old names. Of course this revealed numerous non updated uses of old macros in Autoconf's files. Adjust them. But for the time being, keep `define' alive for Autoconf. 2000-11-03 Akim Demaille <akim@epita.fr> AC_REQUIRE and AC_DEFUN_ONCE don't work properly together. This caused strange messages about AC_ARG_PROGRAM. Reported by Jim Meyering. * acgeneral.m4 (AC_DEFUN_ONCE): Fix the indirection to m4_defun_once. * m4sugar.m4 (m4_defun_once): Also define `m4_location(MACRO-NAME)'. s/ac_warn/m4_warn/. Use `m4_defn' to read `m4_location'. * tests/base.at (AC_REQUIRE & AC_DEFUN_ONCE): Two new tests. 2000-11-03 Akim Demaille <akim@epita.fr> Set up config.log earlier so that AC_MSG_ERROR and AC_MSG_WARN can be used early. * acgeneral.m4 (_AC_INIT_DEFAULTS): Call `_AC_INIT_PREPARE_FDS'. (_AC_INIT_PREPARE): Don't. (_AC_INIT_PREPARE_ENVIRONMENT, _AC_INIT_PREPARE_FDS): Rename as... (_AC_INIT_DEFAULTS_ENVIRONMENT, _AC_INIT_DEFAULTS_FDS): these, since they are called from `_AC_INIT_DEFAULTS', not `_AC_INIT_PREPARE'. (_AC_INIT_DEFAULTS_FDS): Dump `$@' in config.log, not `$ac_configure_args' which is not computed yet. 2000-11-03 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PARSE_ARGS): TRIPLET can include `_' and `-'. Reported by Andreas Jaeger. 2000-11-03 Akim Demaille <akim@epita.fr> * m4sh.m4 (_AS_UNSET_PREPARE): New macro, eved from _AC_INIT_PREPARE_ENVIRONMENT, and fixed: set `FOO' before trying to unset it: `unset' exits 1 if the variable is not defined. (AS_UNSET): Require it. Use `as_unset' not `ac_unset'. * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): Use it. 2000-11-03 Akim Demaille <akim@epita.fr> * m4sugar.m4 (builtin, changecom, changequote, decr, dumpdef) (incr, index, indir, len, syscmd, sysval, traceoff, traceon): Rename as... (m4_builtin, m4_changecom, m4_changequote, m4_decr, m4_dumpdef) (m4_incr, m4_index, m4_indir, m4_len, m4_syscmd, m4_sysval) (m4_traceoff, m4_traceon): these. * autoconf.m4 (builtin, changecom, decr, incr, index, indir, len) (syscmd, sysval, traceoff, traceon): Reactivate. 2000-11-03 Akim Demaille <akim@epita.fr> * m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros. Use them. (debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp) (substr, translit, m4_wrap): Rename as... (m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp) (m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these. Adjust all dependencies. * acgeneral.m4: Adjust. * tests/m4sugar.at: Adjust. * autoconf.m4 (m4exit, patsubst, regexp, substr, translit): Reestablish them. 2000-11-02 Akim Demaille <akim@epita.fr> The documentation is not clear about the obsoleteness of `acconfig.h', `config.h.top', and `config.h.bot'. Reported by Aharon Robbins. * doc/autoconf.texi (Making configure Scripts) (Automatic Remaking, Defining Symbols, Distributing): Forget about these files. (acconfig.h): Reword. Display the old scheme presenting the dependencies between input and output files. (Changed File Names): Clarify. 2000-11-02 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Usual Tools): Some about dirname. 2000-11-02 Pavel Roskin <proski@gnu.org> * ifnames.sh: Put the opening brace on the same line with patterns. Reported by Paul Martinolich. * tests/tools.at (AWK portability): Check ifnames. (ifnames): New test for ifnames. * THANKS: Updated. 2000-11-02 Pavel Roskin <proski@gnu.org> * m4/atconfig.m4 (AT_CONFIG): s/AT_TESTPATH/AUTOTEST_PATH/ because AT_TESTPATH looks like a macro. * tests/atconfig.in: Likewise. 2000-11-02 Akim Demaille <akim@epita.fr> * autoconf.sh (trace.m4): Move all the M4 builtins into `at_'. Catch the failures of the big pipe. 2000-11-02 Akim Demaille <akim@epita.fr> * tests/tools.at (Tracing M4 builtins): New test. * autoconf.sh (trace_format): Fix its computation. 2000-11-02 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_CHECK): Check stderr first, since if both stdout and stderr fail, differences on the latter are probably more significant than on the former. 2000-11-02 Akim Demaille <akim@epita.fr> * autoconf.sh (task trace) [debug]: Instead of a long pipe, extend trace.m4. 2000-11-02 Akim Demaille <akim@epita.fr> * autoupdate.sh (m4.txt): Use `dumpdef' and m4 to build it. 2000-11-02 Akim Demaille <akim@epita.fr> * m4sugar.m4 (popdef, pushdef): Rename as... (m4_popdef, m4_pushdef): these. Adjust dependencies. * acgeneral.m4: Adjust. * aclang.m4: Likewise. * autoconf.m4 (popdef, pushdef): Reactivate them. 2000-11-02 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_CHECK, AT_CLEANUP): Be more verbose when `-v' is passed. 2000-11-01 Pavel Roskin <proski@gnu.org> * autoconf.sh: Using trap-safe "exit". * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * tests/base.at: Use AS_EXIT instead of exit in configure.in. * tests/m4sh.at: Likewise. * tests/semantics.at: Likewise. 2000-11-01 Akim Demaille <akim@epita.fr> In M4sugar, move `define', `undefine', and `defn' into the `m4_' name space. * m4sugar.m4 (m4_define, m4_defn, m4_undefine): New macros. (define, defn, undefine): Undefine. Adjust all uses. * m4sh.m4: Adjust. * autoconf.m4: Reenable these builtins. * m4sugar.m4 (m4_expansion_stack_dump): Use m4_copy. 2000-11-01 Akim Demaille <akim@epita.fr> GNU M4 1.4 improperly handle the traces of copies of builtins. * autoconf.sh (task trace): When tracing `BUILTIN' also trace `m4_BUILTIN'. 2000-11-01 Akim Demaille <akim@epita.fr> Autoupdate should not depend upon foreign macros. * autoupdate.sh (ac.m4): Use `_au_define', not `define'. (input.m4): Use `_au_BUILTIN' not `BUILTIN'. 2000-11-01 Akim Demaille <akim@epita.fr> * m4sugar.m4 (m4_fatal): Dump the expansion stack. * acgeneral.m4 (AC_FATAL): Use m4_fatal. 2000-11-01 Akim Demaille <akim@epita.fr> Move the `defun' handling into M4sugar. * m4sugar.m4 (_m4_divert(GROW), _m4_expansion_stack_dump) _m4_defun_pro, _m4_defun_epi, m4_defun, $1, m4_defun_once) m4_before, _m4_require, m4_require, m4_expand_once, m4_provide) m4_provide_ifelse): New macros. * acgeneral.m4 (_AC_EXPANSION_STACK_DUMP, _AC_DEFUN_PRO) _AC_DEFUN_EPI): Removed. (AC_DEFUN, AC_DEFUN_ONCE, _AC_REQUIRE, AC_REQUIRE) AC_PROVIDE_IFELSE, AC_FATAL): Reimplement atop M4sugar. 2000-11-01 Raja R Harinath <harinath@cs.umn.edu> * tests/tools.at (autoupdating AC_LINK_FILES): Invoke autoconf like in the rest of the tests. 2000-11-01 Pavel Roskin <proski@gnu.org> * autoconf.sh: Typo: s/m4__warnings/m4_warnings/. 2000-10-31 Pavel Roskin <proski@gnu.org> * autoupdate.sh: Check that $sed understands the meaning of "\b" instead of checking "--version". 2000-10-31 Akim Demaille <akim@epita.fr> Move the handling of classified warnings into M4sugar. * m4sugar.m4 (m4_diagnose): Remove. (m4_warning): New. * acgeneral.m4 (AC_WARNING_IFELSE, _AC_WARNING_IFELSE) (_AC_WARNING_ERROR_IFELSE, __AC_WARNING_ERROR_IFELSE) (_AC_DIAGNOSE, AC_DIAGNOSE): Rename as... * m4sugar.m4 (m4_warning_ifelse, _m4_warning_ifelse) (_m4_warning_error_ifelse, __m4_warning_error_ifelse) (_m4_warn, m4_warn): these. * acgeneral.m4 (AC_DIAGNOSE): Wrapper around `m4_warn'. * autoconf.sh: Define `m4_warnings' instead of `_AC_WARNINGS'. 2000-10-30 Pavel Roskin <proski@gnu.org> * acspecific.m4 (AC_PATH_XTRA): Use AC_LANG_PROGRAM() as the argument to AC_LINK_IFELSE. 2000-10-30 Pavel Roskin <proski@gnu.org> * m4sh.m4 (AS_EXIT): Use "false" for exit code 1, ":" for 0. * acgeneral.m4 (AC_MSG_ERROR): Don't use m4_default for the second argument - AS_EXIT takes care of it. 2000-10-30 Akim Demaille <akim@epita.fr> * m4sugar.m4: Formatting changes. 2000-10-30 Akim Demaille <akim@epita.fr> Move the handling of diversions into M4sugar. * acgeneral.m4 (_AC_DIVERT, AC_DIVERT, AC_DIVERT_PUSH) (AC_DIVERT_POP): Move to... * m4sugar.m4 (_m4_divert, m4_divert, m4_divert_push) (m4_divert_pop): here. * acgeneral.m4: Adjust to use only the M4sugar macros. Nevertheless... (AC_DIVERT_PUSH, AC_DIVERT_POP): New wrappers around the M4sugar macros. (_AC_DIVERT(...)): Rename all the diversions names as... (_m4_divert(...)): these. 2000-10-30 Pavel Roskin <proski@gnu.org> * m4sh.m4 (AS_EXIT): New macro that exits and makes sure that $? is set correctly within the exit trap. (AS_TMPDIR): Use it. * acgeneral.m4 (AC_MSG_ERROR): Likewise, 2000-10-29 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (AC_CHECK_TOOL): Set VARIABLE also when using the cache. From Jim Meyering. (AC_PATH_TOOL): Likewise. 2000-10-29 Pavel Roskin <proski@gnu.org> * tests/atgeneral.m4 (AT_CHECK): Warn if the expected exit status is different from what we got. Don't preserve exit status other than 77. 2000-10-29 Pavel Roskin <proski@gnu.org> * autoconf.sh: When scanning for unexpanded macros match only words beginning with "A?_" and "m4_" or containing "_A?_". Strip the comments before the matching. Don't use character ranges. 2000-10-29 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_INIT_PREPARE): Don't use a newline before accessing $? - newlines in "trap" reset $? to 0 on FreeBSD 4.0. 2000-10-29 Jim Meyering <meyering@lucent.com> * acgeneral.m4 (AC_MSG_WARN): Now that this macro expands to two stmts, enclose them in `{' ... `}'. 2000-10-28 Pavel Roskin <proski@gnu.org> * aclang.m4 (AC_REQUIRE_CPP): Don't default to C++ - call AC_FATAL for unsupported languages. 2000-10-27 Pavel Roskin <proski@gnu.org> * acfunctions.m4 (AC_FUNC_MMAP): Remove conftestmmap from the shell, not from the test program. 2000-10-27 Pavel Roskin <proski@gnu.org> * doc/autoconf.texi (Limitations of Builtins): Recommend using AC_MSG_ERROR instead of exit. (Autoconf Language): Fix examples. 2000-10-27 Pavel Roskin <proski@gnu.org> * tests/suite.at: Move "-*- Autoconf -*-" to the second line. 2000-10-27 Akim Demaille <akim@epita.fr> Use AC_MSG_ERROR in the test suite, not just `exit'. * tests/README: New file. * tests/semantics.at: Don't just `exit 1' or `exit 77' from configure.in: call AC_MSG_ERROR. * tests/base.m4: Likewise. * tests/m4sh.at: Likewise. * tests/semantics.at (AT_CHECK_PROGS_PREPARE): New macro, eved out of... (AC_CHECK_PROG & AC_PATH_PROG): here. Split into two individual tests... (AC_CHECK_PROG & AC_CHECK_PROGS, AC_PATH_PROG & AC_PATH_PROGS): these. 2000-10-27 Pavel Roskin <proski@gnu.org> * autoconf.sh: Recognize short options followed by arguments without separators. * autoheader.sh: Likewise. * autoreconf.sh: Likewise. Recognize abbreviations for "--autoconf-dir" and "--m4dir". * autoupdate.sh: Likewise. Recognize abbreviations for "--autoconf-dir". 2000-10-26 Pavel Roskin <proski@gnu.org> * autoconf.sh: Don't show obsolete options on "--help". Report obsolete options to stderr. Adjust list of options. Correct processing of options. Process options with values separated by "=" first, so that abbreviations work. Don't accept "=" with short options. * autoheader.sh: Likewise. * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * ifnames.sh: There is no "--verbose" option. * doc/autoconf.texi: Option "-A" requires an argument. (autoreconf Invocation): Document "--install", "--symlink", "--m4dir" and the options passed to Automake. 2000-10-26 Akim Demaille <akim@epita.fr> * shell.m4: Rename as... * m4sh.m4: this. * tests/m4sugar.m4, tests/shell.m4, tests/torture.m4: Rename as... * tests/m4sugar.at, tests/m4sh.at, tests/torture.at: these. * tests/semantics.m4, tests/base.m4, tests/suite.m4: Rename as... * tests/semantics.at, tests/base.at, tests/suite.at: these. * tests/tools.m4, tests/update.m4, tests/syntax.m4: Rename as... * tests/tools.at, tests/update.at, tests/syntax.at: these. * tests/mktests.sh: Adjust the output file names. 2000-10-25 Pavel Roskin <proski@gnu.org> * autoupdate.sh: Redirect stdin for sed to /dev/null to avoid hangs with non-GNU versions of sed. 2000-10-25 Akim Demaille <akim@epita.fr> Move the Autoconf independent shell macros into the file `shell.m4' and the name space `AS_*'. * acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET) (AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to... * shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P) (AS_DIRNAME): here, a new file. Adjust all dependencies. * tests/base.m4 (m4_wrap): Eve out into... * tests/shell.m4: here, new file. * tests/base.m4 (AC_SHELL_MKDIR_P) (AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into... * tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED): here, new file. Adjust the test suite. 2000-10-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_SHELL_DIRNAME): Split its code into... (AC_SHELL_DIRNAME_EXPR, AC_SHELL_DIRNAME_SED): these new macros. * tests/base.m4 (AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): New test. 2000-10-25 Pavel Roskin <proski@gnu.org> * tests/aclocal.m4 (AC_ENV_SAVE): Rename to ... (AC_STATE_SAVE): ... this. Save the list of all files in the current directory. * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Compare lists of files created by AC_ENV_SAVE. Remove state* before and after the test. 2000-10-25 Pavel Roskin <proski@gnu.org> * Makefile.am: Add acversion.m4.in to EXTRA_DIST. 2000-10-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_SHELL_DIRNAME): The sed fall back was producing twice the output for it was not using `-n' and used `p'. Remove the latter. 2000-10-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PREPARE_FDS): Give some information on the host in config.log. 2000-10-24 Pavel Roskin <proski@gnu.org> * tests/mktests.sh: Set locale to C to make sure that syntax.m4 and update.m4 are locale-independent. 2000-10-24 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_CACHE_DUMP): Add a missing separator for sed commands. 2000-10-24 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AT_FILE_DEPENDENCY): Rename as... (AC_FILE_DEPENDENCY_TRACE): this. 2000-10-24 Lars J. Aas <larsa@sim.no> * m4sugar.m4: (m4_tolower, m4_toupper): New macros. * acgeneral.m4 (AC_PREFIX_PROGRAM): Use m4_toupper(). * aclang.m4 (AC_F77_FUNC): Use m4_toupper()/m4_tolower(). 2000-10-24 Pavel Roskin <proski@gnu.org> * m4sugar.m4 (m4_quote): Comment change. 2000-10-24 Akim Demaille <akim@epita.fr> Start avoiding dependence upon character ranges. * acgeneral.m4 (_AC_INIT_DEFAULTS): Introduce `ac_cr_AZ', `ac_cr_az', `ac_cr_09', `ac_cr_alnum' and `ac_hostname'. Spread their use. 2000-10-24 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT): Don't play with `trap'. (_AC_INIT_PREPARE): Trap after having created config.log. Also trap on 0. When trapped, report why in config.log. (AC_MSG_WARN, AC_MSG_ERROR): Also output the message in config.log. 2000-10-24 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_SHELL_DIRNAME): Rename as... (AC_SHELL_DIRNAME): this. s/X$1/X[]$1/ so that when $1 is a macro, it's given a chance to be expanded. (AC_PREFIX_PROGRAM): Use AC_SHELL_DIRNAME. Quote properly. 2000-10-24 Akim Demaille <akim@epita.fr> * tests/tools.m4 (Syntax of the scripts): Specify the path to the tested program, some shells don't honor the PATH with `sh PROG'. 2000-10-23 Akim Demaille <akim@epita.fr> Since GNU M4 now comes with its libm4 (binary), to avoid ambiguities let's rename `libm4' (M4 code) as `m4sugar': Readability And Greater Understanding Stands 4 M4sugar name coined by Lars J. Aas. * libm4.m4: Rename as... * m4sugar.m4: this. All dependencies adjusted. 2000-10-23 Akim Demaille <akim@epita.fr> * tests/mktests.sh (update_exclude_list, syntax_exclude_list): Add `AC_PREREQ'. * tests/tools.m4: Globally, don't use `../' to invoke the tested tools, since the PATH is properly set, and in most cases it obfuscates the test code. (autoupdating AC_PREREQ): New tests. 2000-10-23 Akim Demaille <akim@epita.fr> In order to check that all the CPP symbols which are AC_DEFINE'd are properly templated, autoheader traces AC_DEFINE/AC_DEFINE_UNQUOTED. Only literals can be traced, and actually tracing non literals produces invalid autoheader input. Hence, provide a means to trace calls to AC_DEFINE/AC_DEFINE_UNQUOTED with literals. * acgeneral.m4 (AC_DEFINE_TRACE, AC_DEFINE_TRACE_LITERAL): New macros. (AC_DEFINE, AC_DEFINE_UNQUOTED): Use AC_DEFINE_TRACE. * autoheader.sh: Trace AC_DEFINE_TRACE_LITERAL, not AC_DEFINE/AC_DEFINE_UNQUOTED. 2000-10-23 Akim Demaille <akim@epita.fr> Let autoupdate change AC_PREREQ to require the current version of Autoconf. * acgeneral.m4 (_AC_VERSION_UNLETTER, _AC_VERSION_COMPARE): Move to... * libm4.m4 (m4_version_unletter, m4_version_compare): here. Adjust dependencies. * acgeneral.m4 (AU::AC_PREREQ): New macro. * autoupdate.sh: Fail when `m4 input.m4' fails. 2000-10-21 Pavel Roskin <proski@gnu.org> * acfunctions.m4 (AC_FUNC_CHOWN): Remove temporary files on exit. (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise. (AC_FUNC_SELECT_ARGTYPES): Likewise. (AC_FUNC_UTIME_NULL): Likewise. * acgeneral.m4 (_AC_COMPUTE_INT): Likewise. * aclang.m4 (_AC_F77_NAME_MANGLING): Likewise. * acspecific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): Likewise. 2000-10-20 Pavel Roskin <proski@gnu.org> * tests/tools.m4 (autoupdating AC_LINK FILES): Clean up "src1" and "src2" at the end of the test. 2000-10-19 Pavel Roskin <proski@gnu.org> * NEWS: Documented changes in AC_PROG_CPP and AC_TRY_CPP. * doc/autoconf.texi (Compilers and Preprocessors): Likewise. * acgeneral.m4 (AC_TRY_CPP): Comment changes. 2000-10-19 Pavel Roskin <proski@gnu.org> * doc/autoconf.texi (Shellology): Documented quirks in ash-0.2. 2000-10-18 Pavel Roskin <proski@gnu.org> * mdate-sh: Removed, its copy remains in the doc/ directory. 2000-10-18 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECK_TOOLS): Use `$' when reading a variable. 2000-10-18 Morten Eriksen <mortene@sim.no> * aclang.m4 (_AC_PROG_CC_G): Use the _AC_COMPILE_IFELSE macro instead of reinventing the wheel. This also takes care of a bug where the "-g" option was accepted if the compiler silently exits with status unequal to 0. (_AC_PROG_CXX_G): Likewise. (AC_PROG_CC): As _AC_PROG_CC_G depends on $ac_objext and $ac_exeext, move the expansion of _AC_OBJEXT and _AC_EXEEXT in front of _AC_PROG_CC_G. (AC_PROG_CXX, AC_PROG_F77): Likewise. 2000-10-18 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (AT_INIT): Avoid foo="`bar`", foo=`bar` is enough. Use grep to check the presence of a string in a stream. * m4/atconfig.m4: Quote. 2000-10-18 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_SHELL_DIRNAME): Quote the `sed' fall back. 2000-10-18 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_PROG_LN_S): If neither `ln -s' nor `ln' work, fall back to `cp'. 2000-10-17 Morten Eriksen <mortene@sim.no> * acgeneral.m4 (AC_CHECK_TOOL): As AC_CHECK_PROG first tests the value of the VARIABLE argument when looking for executables, we need to set it to the correct value from AC_CHECK_TOOL when not just passing on the incoming VARIABLE directly. (AC_CHECK_TOOLS, AC_PATH_TOOL): Likewise. 2000-10-17 Assar Westerlund <assar@sics.se> * acgeneral.m4 (_AC_INIT_PREPARE): Move the _AC_INIT_PREPARE_ENVIRONMENT invocation to... (_AC_INIT_DEFAULTS): here, so that we keep the same known environment for more of the script. 2000-10-17 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (The GNU build system): Sketch of new a chapter. 2000-10-17 Akim Demaille <akim@epita.fr> Somehow, the adjustment of `mktests.sh' claimed on 2000-10-17 by myself (`Fix autoupdate...') was not applied. * tests/mktests.sh (update_exclude_egrep): Add AC_INIT, AC_OUTPUT, AC_LINK_IFELSE. 2000-10-17 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECK_PROG, AC_CHECK_PROGS, AC_PATH_PROG) (AC_PATH_PROGS, AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Fix the quotation. (AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Check with the $ac_tool_prefix iff it is not empty. 2000-10-17 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Particular Programs): Some notes on the portability of Flex. 2000-10-17 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE) (_AC_RUN_IFELSE): Before compiling, remove the files expected to be produced. (_AC_LINK_IFELSE, _AC_RUN_IFELSE): You don't create object files, so don't remove them. 2000-10-17 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_FATAL): Use _AC_EXPANSION_STACK_DUMP. (_AC_REQUIRE): Use AC_FATAL. 2000-10-17 Akim Demaille <akim@epita.fr> Give a means to report where the macros have been defined in error messages. * libm4.m4 (m4_location): New macro. (m4_errprint): Rename as... (m4_diagnose): this. Use m4_location. Adjust dependencies. (m4_errprint): New macro, similar to `errprint' but for an additional trailing `\n'. * acgeneral.m4 (AC_DEFUN, AC_DEFUN_ONCE): Define `m4_location($1)' to the current location (i.e., that of the definition of $1). (_AC_DEFUN_PRO, _AC_REQUIRE): Also push the location of the current macro in the stack. (_AC_EXPANSION_STACK_DUMP): Adjust. 2000-10-17 Akim Demaille <akim@epita.fr> Fix autoupdate: updating `AC_OUTPUT_COMMANDS' was failing because it includes another AU defined macro. * autoupdate.sh (input.m4:_au_defun): New macro. (au.m4): Use it instead of inlining _au_enable/_au_disable invocations in the definition of all these macros. (input.m4:__au_enable, input.m4:__au_disable): New macros. (input.m4:_au_enable, input.m4:_au_disable): Use them. * tests/mktests.sh (update_exclude_list): Add `AC_OUTPUT'. Running it twice in a configure.in is not valid. Add `AC_LINK_FILES' since it requires arguments. * tests/tools.m4 (autoupdating AC_LINK_FILES): New test. 2000-10-17 Raja R Harinath <harinath@cs.umn.edu> * Makefile.am (MAINTAINERCLEANFILES): Add acversion.m4. (INSTALL.txt): Put into $(srcdir). (acversion.m4): Build here ... * configure.in (AC_OUTPUT): Not here. * tests/Makefile.am (MACRO_FILES): Don't use $(top_srcdir). (syntax.m4): Create in $(srcdir). (update.m4): Likewise. * tests/atspecific.m4 (AT_CHECK_UPDATE): Look for autoconf macros in the top source directory. 2000-10-16 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_LANG_COMPILER_GNU): New macro, which unifies... (_AC_PROG_F77_GNU, _AC_PROG_CC_GNU, _AC_PROG_CXX_GNU): Remove. Adjust dependencies. (ac_cv_prog_gcc, ac_cv_prog_gxx, ac_cv_prog_g77): AU_ALIAS'ed. 2000-10-16 Akim Demaille <akim@epita.fr> * acgeneral.m4: Adjust copyright notice. * acspecific.m4: Likewise. * acoldnames.m4: Likewise. * acversion.m4.in: Likewise. * autoconf.sh: Likewise. * autoheader.sh: Likewise. * autoreconf.sh: Likewise. * autoscan.pl: Likewise. * autoupdate.sh: Likewise. * ifnames.sh: Likewise. 2000-10-16 Pavel Roskin <proski@gnu.org> * tests/aclocal.m4: Don't consider variables @, '*', '?' and '#' in the output of `set' - they are modified by zsh. 2000-10-14 Pavel Roskin <proski@gnu.org> * m4/missing.m4 (AM_MISSING_PROG): Use $SHELL to run "missing". * configure.in: Don't add $SHELL to the path of help2man - it is already added by AM_MISSING_PROG. 2000-10-13 Akim Demaille <akim@epita.fr> * tests/mktests.sh: If ever it fails, touch the output files ``a` la missing''. 2000-10-13 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_LINKER_OPTION): Ahem, err, use `$' when consulting a variable... 2000-10-13 Akim Demaille <akim@epita.fr> * acgeneral.m4: Typos in comments spotted by Pavel. 2000-10-12 Pavel Roskin <proski@gnu.org> * acspecific.m4 (AC_PROG_LEX): Don't assume that lex exists. Don't run _AC_DECL_YYTEXT if it doesn't. Always check libl and libfl regardless of the $LEX value. 2000-10-12 Morten Eriksen <mortene@sim.no> * acgeneral.m4 (AC_CONFIG_SUBDIRS): Fixed nasty typo. 2000-10-12 Akim Demaille <akim@epita.fr> * tests/mktests.sh: Backslash the quote in the heredocs to help syntax highlighting tools. * tests/atspecific.m4 (AT_CHECK_UPDATE): Give a better AT_SETUP title. 2000-10-12 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_SH_QUOTE): Issue an `obsolete' warning for use of backquotes, instead of a `syntax' warning. 2000-10-12 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_VAR_IN_INDIR, AC_VAR_IF_SET): Rename as... (AC_VAR_INDIR_IFELSE, AC_VAR_SET_IFELSE): this. 2000-10-12 Akim Demaille <akim@epita.fr> * tests/mktests.sh: Remove tmp files. 2000-10-12 Akim Demaille <akim@epita.fr> Macros used by AC_LANG_COMPILER macros shall not AC_REQUIRE AC_LANG_COMPILER by the way of AC_COMPILE_IFELSE etc. * acspecific.m4 (_AC_EXEEXT): Use _AC_LINK_IFELSE, not AC_LINK_IFELSE to avoid AC_REQUIREing AC_PROG_CC which precisely requires _AC_EXEEXT. Don't run _AC_CYGWIN, _AC_MINGW32, _AC_EMXOS2. * aclang.m4 (_AC_PROG_F77_G): Use _AC_COMPILE_IFELSE, not AC_COMPILE_IFELSE. (_AC_LANG_COMPILER_WORKS): Use _AC_LINK_IFELSE, not AC_LINK_IFELSE. 2000-10-12 Akim Demaille <akim@epita.fr> Diagnose AC_REQUIRE circular dependencies. * acgeneral.m4 (_AC_DEFUN_PRO, _AC_DEFUN_EPI): Keep a stack of macro expansions, _AC_EXPANSION_STACK. Use `_AC_EXPANDING(FOO)' to record the fact that `FOO' is being expanded. (_AC_REQUIRE): Diagnose required macros which are already being expanded. Record in _AC_EXPANSION_STACK the AC_REQUIRE calls. (_AC_EXPANSION_STACK_DUMP): New macro. 2000-10-12 Akim Demaille <akim@epita.fr> * libm4.m4 (m4_dumpdefs, _m4_dumpdefs_up, _m4_dumpdefs_down): New macros. 2000-10-11 Pavel Roskin <proski@gnu.org> * tests/atgeneral.m4 (AT_CHECK): Make sure that $? is set to 0 if diffs have succeeded. 2000-10-11 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE) (_AC_RUN_IFELSE): New macros which are the former AC_COMPILE_IFELSE etc. without AC_LANG_COMPILER_REQUIRE. (AC_COMPILE_IFELSE, AC_LINK_IFELSE, AC_RUN_IFELSE): Use them. 2000-10-11 Morten Eriksen <mortene@sim.no> * acgeneral.m4 (AC_RUN_IFELSE): Add missing executable suffix. * aclang.m4 (_AC_LANG_COMPILER_WORKS): Likewise. * aclang.m4 (AC_PROG_CC_C_O, AC_PROG_F77_C_O): Fix typos where $objext were used instead of $ac_objext. 2000-10-05 Akim Demaille <akim@epita.fr> Check that updated scripts are valid scripts. * tests/mktests.sh: Generate `syntax.m4' directly. * tests/macros.m4: Remove. Adjust dependencies. * tests/mktests.sh: Generate `update.m4' too. * tests/update.m4: New generated file. Adjust dependencies. * tests/atspecific.m4 (AT_CHECK_UPDATE): New macro. 2000-10-05 Akim Demaille <akim@epita.fr> * tests/mktests.sh: New file, which replaces the code inlined in Makefile.am. * src/Makefile.am (macros.m4): Use `mktests.sh'. * tests/suite.m4: Reorder from low level to high level. 2000-10-02 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_LANG_ABBREV, _AC_LANG_ABBREV(C)) (_AC_LANG_ABBREV(C++), _AC_LANG_ABBREV(Fortran 77): New macros. (AC_LANG_(C), AC_LANG_(C++), AC_LANG_(Fortran 77)): Don't define AC_LANG_ABBREV. (_AC_PROG_PREPROC_WORKS): Adjust. * acgeneral.m4 (_AC_TRY_CPP): Likewise. 2000-10-02 Pavel Roskin <proski@gnu.org> * acspecific.m4 (AC_PROG_LEX): Use AC_DEFUN_ONCE. (AC_DECL_YYTEXT): Don't use AC_REQUIRE because autoupdate would place it into configure.in but it's not allowed outside AC_DEFUN. 2000-10-02 Pavel Roskin <proski@gnu.org> * tests/Makefile.am: Macros defined by AC_DEFUN_ONCE should go to macros.m4 for testing. 2000-09-28 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (AC_SHELL_UNSET): Don't rely on variable assignments changing $?. 2000-09-28 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_OUTPUT_FILES): Fixed exit status. (_AC_OUTPUT_HEADERS): Exit if the header template is missing. 2000-09-28 Pavel Roskin <proski@gnu.org> * acfunctions.m4: Formatting fixes. * acgeneral.m4: Likewise. * aclang.m4: Likewise. * acspecific.m4: Likewise. * libm4.m4: Likewise. 2000-09-27 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (AC_CHECK_PROG): Added protection against spaces in $PATH. * acspecific.m4 (AC_PROG_INSTALL): Likewise. 2000-09-27 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (AC_CHECK_LIB): only call AH_CHECK_LIB if ACTION-IF-TRUE is not given. (AH_CHECK_LIB): related comment changes. 2000-09-27 Pavel Roskin <proski@gnu.org> * aclang.m4 (_AC_LANG_COMPILER_WORKS): Remove []dnl because it resulted in invalid shell code. 2000-09-27 Lars J. Aas <larsa@sim.no> * autoconf.sh: Report full macro name for missing macros. 2000-09-27 J. David Anglin <dave@hiauly1.hia.nrc.ca> * autoheader.sh: Fix trap (EXIT) status. * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * autoconf.sh: Change `exit' to `{ (exit 1); exit; }' after m4 and awk commands to ensure exit state is in a defined state. 2000-09-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br> * tests/semantics.m4 (AC_PROG_CPP with warning): Simplified. 2000-09-25 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_PREPARE_ENVIRONMENT to make the shell running config.status sane and POSIX-compatible. 2000-09-25 Pavel Roskin <proski@gnu.org> * autoheader.sh: Don't check status of variable assignments - it's undefined in ash 0.2. * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * autoconf.sh: Likewise. Also eliminated command substitution inside variable expansion - ash 0.2 coredumps on it. 2000-09-21 Pavel Roskin <proski@gnu.org> * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Check stderr from autoconf and autoheader. Expected warnings disabled by "-W none" Preceding comment removed as no longer relevant. * tests/semantics.m4 (AC_CHECK_PROG & AC_PATH_PROG): Check stderr from autoconf. (AC_PATH_PROG & AC_PATH_PROGS): Likewise. (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Likewise. * tests/tools.m4 (autoheader): Check that autoheader prints a warning for missing templates. Check stderr from autoconf. * tests/torture.m4 (config.status under extreme conditions): Check stderr from autoconf and autoheader. (command line interface): Check stderr from autoconf. 2000-09-21 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix usage info for config.status - file arguments are optional. 2000-09-21 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_OUTPUT_FILES): Ensure that config.status exits if any input file is missing. * tests/semantics.m4 (missing templates): Test it. 2000-09-21 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_SHELL_TMPDIR): Don't check status of variable assignment - it's undefined in ash 0.2. 2000-09-21 Akim Demaille <akim@epita.fr> * src/atgeneral.m4 (AC_CHECK): Display stderr including when the test failed because of stdout. 2000-09-21 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4: Formatting changes. (AT_INIT): Let `at_stop_on_error' and `at_verbose' be `:'/`false' variables instead of `'/`1'. `at_check_stds' replaces `at_no_redirs'. Rename `Snippet 3' as `Snippet 4'. Introduce `Snippet 3' for variable initializations. Adjust the dependencies. (AT_CHECK): Don't show diff's result unless verbose. 2000-09-20 Pavel Roskin <proski@gnu.org> * tests/Makefile.am: AC_PREFIX_PROGRAM and AC_F77_FUNC excluded from testing because they require an argument. * tests/atspecific.m4: Make sure that configure doesn't write anything to stderr. 2000-09-20 Pavel Roskin <proski@gnu.org> * acspecific.m4 (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Cache variable wasn't always set inside AC_CACHE_CHECK. (_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL): Likewise. From Nicolas Joly. 2000-09-20 Pavel Roskin <proski@gnu.org> * libm4.m4 (m4_ifvanl): Don't output a newline for empty arguments. 2000-09-19 Akim Demaille <akim@epita.fr> * tests/atspecific.m4 (AT_TEST_MACRO): Rename as... (AT_CHECK_MACRO): this. All dependencies adjusted. 2000-09-19 Akim Demaille <akim@epita.fr> * tests/aclocal.m4.new (AC_ENV_SAVE): Skip POW_LIB, used by AC_FUNC_STRTOD. From Bernard Dautrevaux. 2000-09-19 Pavel Roskin <proski@gnu.org> * tests/atgeneral.m4 (AT_DATA): Use _ATEOF instead of EOF. 2000-09-19 Pavel Roskin <proski@gnu.org> * tests/semantics.m4 (AC_PROG_CPP with warnings): Minor simplification. 2000-09-19 Akim Demaille <akim@epita.fr> * autoconf.sh (optarg): More robust expr invocation. * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * autoheader.sh: Likewise. Reported by Bernard Dautrevaux. 2000-09-19 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (AU_ALIAS): Do not use `defn' since then autoupdate would replace an old macro call with the new macro body instead of the new macro call. * tests/tools.m4 (autoupdate): Test an AU_ALIAS'd macro update. 2000-09-19 Pavel Roskin <proski@gnu.org> * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): New macro. (AT_TEST_MACRO): Use it. * tests/semantics.m4 (AC_PROG_CPP with warnings, AC_PROG_CPP without warnings): New tests. 2000-09-18 Ruediger Kuhlmann <autoconf-list@ruediger-kuhlmann.de> * acgeneral.m4 (_AC_OUTPUT_SUBDIRS): Check for configure.gnu as well. (_AC_INIT_HELP): Likewise. (NEWS): Note checking for configure.gnu. * doc/autoconf.texi: Document checking for configure.gnu when recursing subdirectories. 2000-09-18 Jim Meyering <meyering@lucent.com> * acfunctions.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of LIBS. Otherwise, everyone ends up linking with -lelf for some configurations. Reported by Mike Stone. 2000-09-14 Pavel Roskin <proski@gnu.org> * aclang.m4 (AC_PROG_CPP): Use double quotes in the for loop and eliminate ac_tmp_cpp. (AC_PROG_CXXCPP): Use double quotes in the for loop and eliminate ac_tmp_cxxcpp. 2000-09-14 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_TRY_CPP): Don't filter out conftest.$ac_ext from the output - it is only printed by Visual C that gives correct exit status. * aclang.m4 (AC_PROG_CPP): Don't try '${CC-cc} -nologo -E' by the same reason. 2000-09-12 Pavel Roskin <proski@gnu.org> * aclocal.m4 (_AC_PROG_CPP_WORKS): Don't use AC_REQUIRE_CPP - it's useless here. Rename to ... (_AC_PROG_PREPROC_WORKS): ... this. 2000-09-12 Ruediger Kuhlmann <autoconf-list@ruediger-kuhlmann.de> * acspecific.m4 (AC_PROG_INSTALL): Exclude c:install on AmigaOS. 2000-09-12 Akim Demaille <akim@epita.fr> The test suite fails on some hosts because for instance AC_INIT AC_CHECK_FUNC(exit) will not look for a compiler, it will just use `cc'. Macros that need a compiler should require one. * acgeneral.m4 (_AC_REQUIRE): New macro, which is actually the previous version of AC_REQUIRE plus the possibility to distinguish the name of the symbol being AC_PROVIDE'd, and the text to expand. (AC_REQUIRE): Reimplement in terms of _AC_REQUIRE. * aclang.m4 (AC_LANG_COMPILER, AC_LANG_COMPILER_REQUIRE) (AC_LANG_COMPILER(C), AC_LANG_COMPILER(C++)) (AC_LANG_COMPILER(Fortran 77)): New macros. * acgeneral.m4 (AC_COMPILE_IFELSE, AC_LINK_IFELSE, AC_RUN_IFELSE): Require a compiler. (AC_TRY_RUN): Formatting changes. * acfunctions.m4 (AC_FUNC_SETPGRP): Quote properly. The previous changes revealed the weaknesses of this macro. 2000-09-12 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_TRY_CPP): New macro. It runs the preprocessor and checks whether it produces errors or warnings. Don't put grep output into a variable, use another grep instead. (AC_TRY_CPP): Use _AC_TRY_CPP. Copy conftest.err to config.log if the case of an error. * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): define AC_LANG_ABBREV to the short language name. (_AC_PROG_CPP_WORKS): New macro. It checks whether the current preprocessor can be used to check for existence of headers. Most code taken from ... (AC_PROG_CPP): ... here. Use _AC_PROG_CPP_WORKS. Use shell "for" to find working CPP. Use AC_LANG_PUSH(C) and AC_LANG_POP - it's a macro for C only. (AC_PROG_CXXCPP): Rewritten using _AC_PROG_CPP_WORKS. 2000-09-12 Akim Demaille <akim@epita.fr> * autoupdate.sh (sed): Look for GNU sed. (usage): Ask for GNU sed. 2000-09-12 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (AC_EGREP_CPP): Use additional quotes instead of changequote. 2000-09-12 Ruediger Kuhlmann <autoconf-list@ruediger-kuhlmann.de> * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WIDTH): Add trailing semicolon to final fi. 2000-09-11 Pavel Roskin <proski@gnu.org> * acgeneral.m4 (_AC_WARNING_ERROR_IFELSE) (__AC_WARNING_ERROR_IFELSE): New macros for checking whether warnings should be considered errors. (_AC_DIAGNOSE): Use _AC_WARNING_ERROR_IFELSE. 2000-09-11 Pavel Roskin <proski@gnu.org> * autoconf.sh: Properly report names of unexpanded macros that begin with an underscore. 2000-09-11 Pavel Roskin <proski@gnu.org> * doc/autoconf.texi (Preset Output Variables): Correctly specify what languages are affected by CPPFLAGS, LDFLAGS and LIBS. Extended description of LDFLAGS and LIBS. (Compilers and Preprocessors, C Compiler Characteristics): Recommend Automake as the source of ansi2knr. (Autoconf Language, Quotation and Nested Macros): English fixes. (Quotation and Nested Macros): Unclear example replaced with an explanation of when m4 expands quotes. Added explanation why unquoted calls are dangerous. 2000-09-08 Pavel Roskin <proski@gnu.org> * doc/autoconf.texi: Always use one space before the opening parenthesis in @defmac. 2000-09-06 Morten Eriksen <mortene@sim.no> * acspecific.m4 (_AC_OBJEXT): No longer use AC_COMPILE_IFELSE, which uses $ac_objext hence depends upon _AC_OBJEXT. * aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call _AC_OBJEXT before _AC_EXEEXT since the latter needs $ac_objext. 2000-09-06 Bernard Dautrevaux <dautrevaux@objectlive.com> * acspecific.m4 (_AC_EXEEXT): Set extension to void if linking creates both an unsuffixed file and suffixed ones. 2000-09-06 Peter Eisentraut <peter_e@gmx.net> * autoconf.texi: English and typo fixes. 2000-09-05 Pavel Roskin <proski@gnu.org> * autoconf.sh: Consider undefined macros as errors. * tests/base.m4 (unexpanded macros): Expect error, not warning. 2000-09-05 Dave Love <fx@gnu.org> * aclang.m4 (_AC_PROG_F77_GNU): Run command from standard input so that we can get some standard output. 2000-09-04 Peter Eisentraut <peter_e@gmx.net> * autoscan.pl: Repair broken Getopt::Long use. 2000-09-04 Akim Demaille <akim@epita.fr> * configure.in: Bump version to 2.49b. * Makefile.am (bin_SCRIPTS): Depend upon configure.in. 2000-08-11 Akim Demaille <akim@epita.fr> Version 2.49a. 2000-08-11 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_NO_EXECUTABLES): New macro. 2000-08-11 Akim Demaille <akim@epita.fr> * tests/base.m4 (AC_SHELL_MKDIR_P): Remove `a' too. 2000-08-11 Akim Demaille <akim@epita.fr> * configure.in: Bump version to 2.49a. 2000-08-11 J. David Anglin <dave@hiauly1.hia.nrc.ca> * autoconf.sh: Change `exit N' to `(exit N); exit' to provide the correct exit status when an exit trap is taken. 2000-08-11 Akim Demaille <akim@epita.fr> * acfunctions.m4 (AM_FUNC_ERROR_AT_LINE, AM_FUNC_FNMATCH, AM_FUNC_MKTIME, AM_FUNC_OBSTACK, AM_FUNC_STRTOD): Deactivate their AU_ALIAS definition: Automake 1.4 does not quote the name of these macros, hence when Autoconf reads Automake's definition the name is expanded with unpredictable results. 2000-08-09 Akim Demaille <akim@epita.fr> * autoreconf.sh (Installing Autoconf extensions files): Remove. 2000-08-09 Akim Demaille <akim@epita.fr> * autoconf.sh (finalize.awk): Don't leave spaces before the user function calls. Reported by John David Anglin. * doc/autoconf.texi (Limitations of Usual Tools): Start the AWK section. * tests/tools.m4 (AWK portability): New test. 2000-08-08 Pavel Roskin <proski@gnu.org> * Makefile.am: Substitute @bindir@ in shell scripts, needed by autoheader. 2000-08-07 Akim Demaille <akim@epita.fr> * acfunctions.m4 (_AC_LIBOBJ_ALLOCA, AC_REPLACE_FUNCS): Simplify ${foo} into $foo. * aclang.m4 (AC_LANG(C), AC_LANG(C++)): Move some internal comments into the header comment. * acgeneral.m4 (AC_TRY_CPP): Likewise. 2000-08-07 Akim Demaille <akim@epita.fr> * tests/tools.m4 (undefined macros): New test. 2000-08-07 Akim Demaille <akim@epita.fr> * autoconf.sh (finalize.awk): New subtool, eved from the previous literal AWK program that performed the `oline' and quadrigraphs substitution. Fix its `oline' computation which was dead wrong when there are empty lines (i.e., always). Enhance it in order to look for and report unexpanded macro. Don't let it pretend there are bugs in Autoconf (c:, the test suite makes this scenario pretty unlikely as opposed to an actual user bug. Catch `m4_' too. Remove the shell snippet which used to do this. 2000-08-07 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_MSG_NOTICE): New macro, suggested by Pavel Roskin. (AC_MSG_ERROR): Use it. 2000-08-04 Ruediger Kuhlmann <uck4@rz.uni-karlsruhe.de> * acspecific.m4 (AC_PROG_RANLIB): Use AC_CHECK_TOOL. * doc/autoconf.texi (Limitations of Usual Tools): Typos. 2000-08-04 Akim Demaille <akim@epita.fr> Solaris' /usr/ucb/expr, and SunOS' /usr/bin/expr fail with the `:' operator when \(\) is used, and matches a string longer than 120 characters. Reported by Geoff Keating. * doc/autoconf.texi (Limitations of Usual Tools): Some words about this. * acgeneral.m4 (_AC_SHELL_DIRNAME): Fall back to echo|sed if expr fails. From Paul Eggert. 2000-08-04 Akim Demaille <akim@epita.fr> * acgeneral.m4: (AC_RUN_IFELSE, AC_LINK_IFELSE, AC_COMPILE_IFELSE): Don't create the source file if none is given, and in this case, don't remove it either. 2000-08-04 Akim Demaille <akim@epita.fr> * libm4.m4 (m4_ifvanl): New macro. * acgeneral.m4: Use it. 2000-08-02 Akim Demaille <akim@epita.fr> Release Automake from being a substitute to Autoconf. * acspecific.m4 (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H, _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL, AC_HEADER_TIOCGWINSZ, AC_SYS_POSIX_TERMIOS): New macros from both Automake and the fileutils. 2000-08-02 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_PROG_CC_G, _AC_PROG_CXX_G): Recent changes inverted the results. Fix that. 2000-08-02 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Special Shell Variables): More emphasis on the dangers of character ranges. From Paul Eggert. 2000-08-01 Akim Demaille <akim@epita.fr> * autoheader.sh (_ac_warnings): Be robust to LC_COLLATE. `IFS=,; echo ,' will give a comma. Take this into account. 2000-08-01 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_PROG_CC): Also try to find $target_alias-cc. 2000-08-01 Akim Demaille <akim@epita.fr> AC_VALIDATE_CACHED_SYSTEM_TUPLE no longer works properly since the AC_CANONICAL_* revamping. Reported by Peter Eisentraut. In fact, let's just use the precious variables handling. * acgeneral.m4 (AC_VALIDATE_CACHED_SYSTEM_TUPLE): Obsoleted. (_AC_ARG_VAR_PRECIOUS): New macro, eved from... (AC_ARG_VAR): this macro. Adjust. (_AC_INIT_PREPARE): `build_alias', `host_alias', and `target_alias' are precious. * doc/autoconf.texi: Adjust. 2000-08-01 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): Neutralize also LC_COLLATE and LC_NUMERIC. * autoconf.m4: Don't rely on character ranges with tr. * doc/autoconf.texi (Special Shell Variables): Adjust. 2000-08-01 Akim Demaille <akim@epita.fr> * acfunctions.m4 (_AC_LIBOBJ_STRTOD, AC_FUNC_STRTOD, AM_FUNC_STRTOD): New macros, from Automake. * acfunctions: Adjust. 2000-08-01 Akim Demaille <akim@epita.fr> * acidentifiers: Catch ptrdiff_t. * acspecific.m4 (AM_TYPE_PTRDIFF_T): AU define. 2000-08-01 Akim Demaille <akim@epita.fr> * autoscan.pl: Be ready to handle AC_CHECK_TYPES requests. Quote properly the output. Remove useless backslashes. 2000-08-01 Akim Demaille <akim@epita.fr> * acfunctions.m4 (AC_FUNC_ONSTACK): New macro, from Automake. * doc/autoconf.texi (Particular Functions): Adjust. 2000-08-01 Akim Demaille <akim@epita.fr> * acfunctions.m4 (AC_FUNC_ERROR_AT_LINE): New macro, from Automake. * doc/autoconf.texi (Particular Functions): Adjust. 2000-08-01 Akim Demaille <akim@epita.fr> Create acfunctions.m4, in charge of the macros related to functions. * acgeneral.m4 (AC_CHECK_FUNC, AC_CHECK_FUNCS, AC_REPLACE_FUNCS): Move to... * acfunctions.m4: here, new file. * acspecific.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_ALLOCA, AC_FUNC_CHOWN, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_FNMATCH, AC_FUNC_GETGROUPS, _AC_LIBOBJ_GETLOADAVG, AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT, AC_FUNC_GETPGRP, AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, AC_FUNC_MALLOC, AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_MMAP, AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP, _AC_FUNC_STAT, AC_FUNC_STAT, AC_FUNC_LSTAT, AC_FUNC_STRERROR_R, AC_FUNC_STRFTIME, AC_FUNC_VFORK, AC_FUNC_VPRINTF, AC_FUNC_WAIT3, AC_FUNC_UTIME_NULL, AC_FUNC_STRCOLL, AC_FUNC_SETVBUF_REVERSED): Likewise. * Makefile.am: Adjust. Move also the old definitions into acfunctions.m4, and adjust the test suite. * acgeneral.m4 (AU_ALIAS): New macro. * acoldnames (AC_FUNC_CHECK, AC_HAVE_FUNCS, AC_ALLOCA, AC_GETLOADAVG, AC_MMAP, AC_SETVBUF_REVERSED, AC_STRCOLL, AC_UTIME_NULL, AC_VFORK, AC_VPRINTF, AC_WAIT3, AM_FUNC_FNMATCH, AM_FUNC_MKTIME, fp_FUNC_FNMATCH): Move to... * acfunctions.m4: here, using AU_ALIAS. * acgeneral.m4 (AC_FD_CC, AC_CANONICAL_SYSTEM): Use AU_ALIAS to define them. * acoldnames.m4: Use AU_ALIAS instead of AU_DEFUN. * tests/Makefile.am (MACRO_FILES): Adjust. 2000-08-01 Akim Demaille <akim@epita.fr> * autoscan.pl: Use Getopt::Long; * acidentifiers: Classify, sort. 2000-08-01 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_PROG_CXX_GNU, _AC_PROG_CC_GNU, _AC_PROG_F77_GNU): Use grep instead of egrep, don't redirect stderr. 2000-08-01 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_NOTICE): Adjust so that there are no empty lines in the header comments (should be `#' alone instead). Reported by Didier Verna. 2000-08-01 Greg A. Woods <woods@weird.com> * doc/autoconf.texi (Installation Directory Variables): Clarifications and typos. 2000-08-01 Didier Verna <didier@lrde.epita.fr> * acgeneral.m4 (AC_REVISION): Put a dot at the end of the line. (_AC_INIT_HELP): Output the bug report address at the end of a `configure --help' output. (_AC_INIT_NOTICE): Ditto, but at the top of `configure'. 2000-07-31 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PREPARE_FDS): New macro, pulled out of (_AC_INIT_PREPARE): here, where it is called from. * aclang.m4 (_AC_PROG_CC_G, _AC_PROG_CXX_G): Don't test -z "`foo`". 2000-07-31 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_DIVERT(INIT_PARSE_ARGS)): Rename as... (_AC_DIVERT(PARSE_ARGS)): this. Adjust dependencies. (AC_ARG_WITH): Remove spurious newline. (AC_ARG_VAR): No longer save precious variables in ac_configure_args, rather snapshot them twice (one kept unmodified, another one to be written to/overwritten by the cache file). (AC_CACHE_SAVE): Let the cache variables named `ac_cv_env_*' be overwritten when loading the cache (i.e., don't use the : ${foo=...} trick). (_AC_ARG_VAR_VALIDATE): Compare the two snapshots of the precious variables. (_AC_INIT_PREPARE): Call it after having loaded the cache file. 2000-07-28 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_LANG_CONFTEST, _AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): Use ac_ext. Use _ACEOF instead of ACEOF. 2000-07-28 Akim Demaille <akim@epita.fr> * autoconf.sh (--warnings): Catch `no-category', not `nocategory'. * autoheader.sh: Likewise. * acgeneral.m4 (_AC_WARNING_IFELSE): Adjust. 2000-07-28 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Installation Directory Variables): New section, Eved off from `Preset Output Variables', i.e., was a small part of it, grew independent, and is its equal (at least). (Coding Style): `$#' padding. * Makefile.am (editsh, editpl): Do what the doc says you do: use @datadir\@ instead of @''datadir''@. 2000-07-28 Akim Demaille <akim@epita.fr> * aclang.m4 (_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): Use ac_ext. Use ACEOF instead of EOF. (AC_LANG_CONFTEST): New macro. (_AC_PROG_CC_G, AC_PROG_CC_C_O, _AC_PROG_CXX_G, AC_PROG_F77_C_O, _AC_PROG_F77_V_OUTPUT): Use it. * acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP, AC_COMPILE_IFELSE, AC_LINK_IFELSE, AC_RUN_IFELSE): Likewise. 2000-07-24 Steven G. Johnson <stevenj@alum.mit.edu> * aclang.m4 (AC_F77_FUNC): New macro to give the user a clean way of accessing Fortran name-mangling information other than through CPP, and without having to know the different possible name-mangling schemes. * autoconf.texi: Documented AC_F77_FUNC 2000-07-24 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_CHECK_TYPE_BUILTIN_P): Add `off_t' and `size_t' which are often used too. Fix a bug which prevents recognition of `bool' and `char'. (_AC_CHECK_TYPE_MAYBE_TYPE_P): New macro. (AC_CHECK_TYPE): Use it. 2000-07-19 Peter Eisentraut <peter_e@gmx.net> * Makefile.am: Remove INSTALL.txt by maintainer-clean target. 2000-07-19 Akim Demaille <akim@epita.fr> * autoupdate.sh: Typo: s/infile/file/. 2000-07-19 Martin Wilck <martin@tropos.de> * aclang.m4 (AC_F77_NAME_MANGLING): Obsolete, becomes _AC_F77_NAME_MANGLING. (_AC_F77_NAME_MANGLING): Use independent checks for the name mangling of symbols with and without underscores. Use algorithm with for loops instead of recursive macro calls. (AC_F77_WRAPPERS): Adapt to changes in _AC_F77_NAME_MANGLING. * doc/autoconf.texi (Fortran 77 Compiler Characteristics): Remove documentation of AC_F77_NAME_MANGLING. Remove documentation of f77_case and f77_underscore. Replace AC_F77_FUNC_WRAPPER with AC_F77_WRAPPERS. 2000-07-19 Akim Demaille <akim@epita.fr> * NEWS: Fresh air. * TODO: Fresh blood. 2000-07-19 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (autoheader Invocation): Explain the purpose of autoheader. 2000-07-19 Akim Demaille <akim@epita.fr> * doc/autoconf.texi: Various English fixes from Jim. 2000-07-19 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Compilers and Preprocessors, Obsolete Macros): Don't give boring internal details. (Language Choice): Typo. (Limitations of Builtins): Some about `!', `set', `$@'. (Coding Style): Some about $[@] quotation. Some about cross-compilation. 2000-07-19 Akim Demaille <akim@epita.fr> * autoreconf.sh (dir): When verbose, say what are the tools you will use. 2000-07-19 Akim Demaille <akim@epita.fr> Warnings related to obsolete constructs should be properly classified. * acspecific.m4 (AC_RSH, AC_USG, AC_MEMORY_H, AC_DIR_HEADER, AC_INT_16_BITS, AC_LONG_64_BITS, AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV, AC_HAVE_POUNDBANG, AC_ARG_ARRAY): Use `AC_DIAGNOSE(obsolete, ...)' instead of `AC_WARNING'. 2000-07-19 Akim Demaille <akim@epita.fr> autoconf -W error does not work. * acgeneral.m4 (_AC_DIAGNOSE): use _AC_WARNING_IFELSE, _AC_WARNING_ENABLE is dead. 2000-07-19 Akim Demaille <akim@epita.fr> Martin Wilck found a Fortran 77 compiler which always exits with success. * acgeneral.m4 (AC_COMPILE_IFELSE): Also check that the output file was created and is nonempty. 2000-07-19 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Introduction): More about CVS, Gnats, the web pages, and the mailing lists. 2000-07-19 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Prerequisite Macros): Dedocument AC_PROVIDE. (Coding Style): Move some into... (Macro Definitions): here. 2000-07-19 Akim Demaille <akim@epita.fr> The --help message should have paragraphs starting with a title, the options, and then optionally a small paragraph. * acgeneral.m4 (AC_DIVERT_ONCE): New macro. (HELP_VAR_END): New diversion. (AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Use AC_DIVERT_ONCE. (AC_ARG_VAR): Follow the --help style. * acspecific.m4 (AC_PATH_X): Use AC_DIVERT_ONCE. 2000-07-19 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_PROG_CC): Don't require AC_PROG_F77, require AC_PROG_CC instead. From Martin Wilck. (AC_PROG_F77_C_O): Require AC_PROG_F77. Use a cache variable independent of $F77. 2000-07-19 Akim Demaille <akim@epita.fr> * autoreconf.sh: Accept --symbolic and -s. 2000-07-19 Akim Demaille <akim@epita.fr> Make it clear that the regular user does not need --macrodir. In fact, rename this option as -A, --autoconf-dir. * autoconf.sh: Complain when -m, --macrodir is used. Accept -A, --autoconf-dir. Use $autoconf_dir instead of $AC_MACRODIR. Adjust --help. * autoheader.sh: Likewise. * autoscan.sh: Likewise. * autoupdate.sh: Likewise. Use $optarg. * autoreconf.sh: Likewise. * doc/autoconf.texi: Adjust. * tests: Adjust the test suite. 2000-07-19 Akim Demaille <akim@epita.fr> * autoreconf.sh: Forward --debug to sub tools. Let them share the same tmp dir. 2000-07-18 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_MING32): Rename as AC_MINGW32. 2000-07-18 Steven G. Johnson <stevenj@alum.mit.edu> Fixed bug where the F77 compiler output was parsed differently when detecting the verbose flag than when scanning for linker options, and as a result the former test failed (under AIX/xlf). * aclang.m4 (_AC_PROG_F77_V_OUTPUT): New macro to get the output of linking an F77 program with a given verbose flag, and preprocess it as required to scan for linker flags. (_AC_PROG_F77_V): Use the above macro here... (AC_F77_LIBRARY_LDFLAGS): ...and here, enforcing consistency. 2000-07-17 Martin Wilck <martin@tropos.de> * autoupdate.sh (autoconf): s,$updated,$tmp/updated,. 2000-07-17 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Configuration Actions): Explain the behavior of AC_CONFIG_HEADERS and AC_CONFIG_FILES with respect to absolute and relative filenames, and stdin/stdout. (config.status invocation): Likewise. 2000-07-17 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Configuration Actions): Explain the behavior of AC_CONFIG_HEADERS and AC_CONFIG_FILES with respect to absolute and relative filenames, and stdin/stdout. (config.status invocation): Likewise. 2000-07-13 Akim Demaille <akim@epita.fr> Make it easier to trace what autoreconf does. * autoheader.sh: Be more verbose, and always report your name in verbose messages. * autoconf.sh: Likewise. * autoreconf.sh: Likewise. (update.sh): Redirect ls' stderr to /dev/null. 2000-07-13 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS): Properly handle absolute input file names. From Alexandre Oliva. 2000-07-12 Martin Wilck <martin@tropos.de> * aclang.m4 (AC_PROG_F77): Delete AC_BEFORE(AC_PROG_CPP) that leads to unnecessary warnings if both C and Fortran are checked. (AC_PROG_F77_C_O): AC_REQUIRE AC_PROG_F77 instead of pretend you need to be AC_BEFORE it. 2000-07-12 Akim Demaille <akim@epita.fr> * autoconf.sh (_ac_warnings): Fix call to tr. Reported by Johan Danielsson. 2000-07-11 Martin Wilck <martin@tropos.de> * aclang.m4 (_AC_PROG_F77_V): New macro to determine the flag that causes the compiler to output verbose linking information. (AC_F77_LIBRARY_LDFLAGS): Use _AC_PROG_F77_V instead of simply "-v" (AC_F77_LIBRARY_LDFLAGS): New algorithm to parse flags, uses set/shift shell commands. (AC_F77_LIBRARY_LDFLAGS): Set FLIBS at end, after determining ac_cv_flibs. 2000-07-11 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_DEFAULTS) <ac_max_here_lines>: Set to 38 instead of 48, to pass the test on RISC/OS 4.52. 2000-07-11 Akim Demaille <akim@epita.fr> !*^&$@ sed portability problems... The test on AC_CHECK_TYPES is failing on RISC/OS 4.52 because of the forget-to-reset-the-flag bug in its sed. * acgeneral.m4 (_AC_OUTPUT_HEADERS): Work around this bug. 2000-07-11 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_INT_16_BITS, AC_LONG_64_BITS): s/ac_check/ac_cv/. 2000-07-10 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS): Look for the input files first in $builddir, then $srcdir. Suggested by Lars J. Aas, designed by Alexandre Oliva. 2000-07-10 Lars J. Aas <larsa@sim.no> * acgeneral.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS): Accept special filename '-' for stdin and stdout. 2000-07-10 Akim Demaille <akim@epita.fr> Alexandre's suggestions. * autoreconf.sh (update.sh): Use `ls -1dt' instead of `-lt'. Use test instead of sed. <automake>: If automake is used, always run it: it has its own mechanism not to update if unneeded. 2000-07-10 Akim Demaille <akim@epita.fr> * acspecific.m4 (_AC_PROG_ECHO): Modernize. 2000-07-10 Akim Demaille <akim@epita.fr> Stop being ridiculous :*( * acgeneral.m4 (_AC_SHELL_DIRNAME): When using m4 the argument is named `$1' not `$dir'. When using m4 you ought to quote properly. When using m4, you should check that there are not too many shell quotes (inside the macro itself, and where it is called). When you do this, Autoconf, hm, works better. 2000-07-10 Steven G. Johnson <stevenj@alum.mit.edu> Improve --help documentation of important environment variables. * acgeneral.m4 (_AC_INIT_HELP): Direct reader to descriptions of useful variables at the end of the --help. (AC_ARG_VAR): Emphasize use of environment variables to override and/or help the configure script. Ensure that a given variable is only documented once in the --help. (AC_CHECK_LIB): Call AC_ARG_VAR to document and register the LDFLAGS variable, and... (AC_CHECK_HEADER): do the same for the CPPFLAGS variable. * aclang.m4 (AC_PROG_CC): Call AC_ARG_VAR to document and register the CC and CFLAGS variables, and do the same for... (AC_PROG_CXX): CXX and CXXFLAGS, and... (AC_PROG_F77): F77 and FFLAGS. 2000-07-10 Akim Demaille <akim@epita.fr> * Makefile.am (wget-update): New target. (WGET): New variable. 2000-07-10 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Coding Style): Some more constraints :). 2000-07-10 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_FUNC_STRERROR_R): Aaaaaaarg! Don't leave the AC_DEFINE inside the AC_CACHE_CHECK. 2000-07-10 Akim Demaille <akim@epita.fr> * acspecific.m4 (_AC_FUNC_STAT, AC_FUNC_STAT, AC_FUNC_LSTAT): New macros, from Jim's stat.m4 and lstat.m4 serial 6. * doc/autoconf.texi (Particular Functions): Document * acfunctions: Add them. 2000-07-10 Akim Demaille <akim@epita.fr> AC_LIBOBJ when used by AC_REPLACE_FUNCS should not complain for variables as argument. * acgeneral.m4 (_AC_LIBOBJ): Same as the former AC_LIBOBJ, but takes an additional argument: action to perform when non-literal argument. (AC_LIBOBJ): Use it. (AC_REPLACE_FUNCS): Use _AC_LIBOBJ, not AC_LIBOBJ. 2000-07-10 Akim Demaille <akim@epita.fr> LANGUAGE should be neutralized too. * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): Do it. * doc/autoconf.texi (Special Shell Variables): Mention it. 2000-07-10 Akim Demaille <akim@epita.fr> Set autoconf's default warnings to `syntax'. In fact, honor the most recent specification in the concatenation of `syntax',$WARNINGS,<options> in that order. Implement support for `none' and `noCATEGORY' so that the options may override the previous choices. Suggested by Didier Verna. * acgeneral.m4 (_AC_WARNING_IFELSE): New macro. (AC_WARNING_IFELSE): Use this macro to implement the new specs. (AC_WARNING): The empty category must not be used, default to `syntax'. * doc/autoconf.texi (autoconf Invocation, Reporting Messages): Adjust. * autoconf.sh: Adjust. Use `optarg' to fetch the arguments of options. Fix a bug in the handling of `--trace='. * acgeneral.m4 (AC_CACHE_VAL): Typo: the macro was complaining iff it shouldn't have. 2000-07-10 Akim Demaille <akim@epita.fr> * autoreconf.sh (--install, --symlink): New options. 2000-07-10 Akim Demaille <akim@epita.fr> * autoreconf.sh (dots, aclocal_m4, acconfig_h): Remove. Adjust dependencies. When using $verbose, redirect to stderr. 2000-07-10 Akim Demaille <akim@epita.fr> * autoreconf.sh: Clarify the difference between the location of `aclocal.m4' and that of the location Autoconf extensions. (-M, --m4dir): New option. (aclocal_flags): Do not use $localdir, but $m4dir. (localdir_opt): Remove, since $autoconf, $autoheader already include `-l $localdir'. 2000-07-10 Akim Demaille <akim@epita.fr> * autoconf.sh (task install): We no longer use AC_INCLUDE. 2000-07-10 Akim Demaille <akim@epita.fr> * acoldnames.m4: Remove the obsolete comments. The technology is now detailed in `autoupdate'. Quote the names being defined. Formatting changes. 2000-07-10 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_DEFUNCT): Remove. (AC_RSH, AC_UNISTD_H, AC_USG, AC_MEMORY_H, AC_DIR_HEADER, AC_INT_16_BITS, AC_LONG_64_BITS): They're alive!... * doc/autoconf.texi (Obsolete Macros): but not fresh. 2000-07-10 Akim Demaille <akim@epita.fr> * autoreconf.sh (debug): New variable. (tmp): s/ac/ar/. <options handling>: Support --debug. * doc/autoconf.texi: Adjust. 2000-07-10 Akim Demaille <akim@epita.fr> Fix the bugs recently introduced in autoreconf. * autoreconf.sh: Don't run automake when the package is not using it. When checking whether autoheader should be rerun, don't ask config.h to be newer than stamp-h and vice-versa. Remove an unbalanced `fi'. 2000-07-10 Akim Demaille <akim@epita.fr> * autoreconf.sh (run_aclocal): Rename as `uses_aclocal' to avoid the convention clash with autoconf.sh where `run_foo' is the command to run `foo'. (uses_autoheader): New variable. 2000-07-10 Akim Demaille <akim@epita.fr> * autoreconf.sh (update.sh): New sub program. Use it in the whole process. (acconfig_h): New variable. 2000-07-10 Akim Demaille <akim@epita.fr> * autoreconf.sh <run_aclocal>: Use false/: instead of no/yes. Formatting and factoring changes. 2000-07-10 Akim Demaille <akim@epita.fr> * autoreconf.sh: You too can have a $tmp dir if you wish. (alflags.sed): New sub sed program. Compute the flags of aclocal from Makefile.am instead of Makefile.in, it is unlikely that aclocal be used but not automake, while it is convenient to be able to run autoreconf even if automake was not run yet. Use `autoconf --trace' to get the list of configuration headers. 2000-07-10 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_PLAIN_SCRIPT): New macro. * tests/base.m4 (m4_wrap, AC_REQUIRE, AC_SHELL_MKDIR_P): Use it. * autoconf.sh: Properly handle the case where `$output' is `-' (i.e., stdout). Handle `-ofile', not just `-o file'. 2000-07-10 Akim Demaille <akim@epita.fr> * autoreconf.sh: Formatting changes. When verbose, display exactly what you do, not just a synopsis. When using `$verbose' don't use quotes to avoid spurious spaces for empty arguments. 2000-07-10 Akim Demaille <akim@epita.fr> * autoreconf.sh (force): Instead of yes/no, use :/false. Adjust the code. (automake_deps, automake_force): No longer used. 2000-07-10 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_SHELL_DIRNAME): Use an `expr' solution instead of echo|sed. From Paul Eggert. * doc/autoconf.texi (Limitations of Usual Tools): Include the words from Paul about `|' with expr(1). 2000-07-10 Akim Demaille <akim@epita.fr> * aclang.m4: Promote s,,, over s%%%, and `sed prog' over `sed -e prog'. * acgeneral.m4: Likewise. * acspecific.m4: Likewise. * doc/autoconf.texi (Limitations of Usual Tools, Coding Style): Likewise. 2000-07-10 Akim Demaille <akim@epita.fr> * autoconf.sh: When using `mktemp -d', be sure that the directory was created. * autoheader.sh: Likewise. * autoreconf.sh: Likewise. 2000-07-10 Akim Demaille <akim@epita.fr> * AUTHORS: Update. * doc/autoconf.texi: Free Franc,ois Pinard from iftex and ifinfo, use @,c. Don't use `@code{m4}' when you mean M4, just as you shall not say `@code{cc}' when you refer to the C language. 2000-07-10 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): Set ac_gnu_compiler. (_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): Compute ac_gnu_compiler. * acgeneral.m4 (AC_LINKER_OPTION): Adjust. 2000-07-10 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Move the code processing the result of AC_PROG_CC_G, AC_PROG_CXX_G, and AC_PROG_F77_G into them. 2000-07-10 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Multiple Cases, Quotation Rule Of Thumb): Follow the coding style. 2000-07-10 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Obsoleting Macros): Is not a subsection of `Dependencies Between Macros', but rather a section of `Writing Macros'. 2000-07-10 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Coding Style): New node. 2000-07-07 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_SHELL_MKDIR_P): s/ac_dir/ac_mkdir_dir/ to avoid clashes with the numerous ac_dir loops. Reported by Lars J. Aas. 2000-07-07 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_SHELL_DIRNAME): Return `.', not `' when there is no directory part. 2000-07-07 Franc,ois Pinard <pinard@iro.umontreal.ca> * tests/atgeneral.m4 (AT_CHECK): Fix a redirection problem. 2000-07-07 Akim Demaille <akim@epita.fr> AC_REVISION must not AC_REQUIRE AC_INIT, it leaves the diversions in a messy state. Don't even try to emulate AC_REQUIRE: just introduce a diversion just for AC_REVISION, and let the magic happen. Fixes Autoconf PR/134, from Raja R Harinath. * acgeneral.m4 (_AC_DIVERT(REVISION)): New diversion. (AC_REVISION): Don't require AC_INIT, dump in your diversion. (_AC_INIT): Delete, inline its body in... (AC_INIT): here. (_AC_INIT_NOTICE, _AC_INIT_COPYRIGHT): New macros so that... (AC_INIT): be more uniform. (AC_INIT, AC_REVISION, AC_COPYRIGHT): `define', don't AC_DEFUN. 2000-07-07 Martin Wilck <martin@tropos.de> * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Keep -lm, if a Fortran compiler needs it, it is likely to be required when linking C/C++ with Fortran. <-YP,*>: Fix the list of arguments to loop on. Don't mess with the user variable name space. <ac_ld_run_path>: Prepend LD_RUN_PATH directories with -R only when running Solaris (without this, link errors occur). 2000-07-06 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_SHELL_DIRNAME): Fix quotation. 2000-07-06 Akim Demaille <akim@epita.fr> * aclang.m4: Formatting and quotations changes. 2000-07-06 Raja R Harinath <harinath@cs.umn.edu> * aclang.m4 (AC_LANG_INT_SAVE(C++)): Be a copy of AC_LANG_INT_SAVE(C), not AC_LANG_INT_SAVE_TRY(C). Fixes Autoconf PR/133. 2000-07-06 Mo DeJong <mdejong@cygnus.com> * acgeneral.m4 (_AC_INIT_PARSE_ARGS, AC_CHECK_TOOLS): Change warning message printed when only --host is given. Fix printing of multiple compiler cache values, use PATH argument. * aclang.m4 (AC_LANG_COMPILER_WORKS): Print the cross compile status, fix problem where two results were printed at once. 2000-07-06 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_SHELL_TMPDIR): Typo. 2000-07-06 Alexandre Oliva <oliva@lsd.ic.unicamp.br> * acgeneral.m4 (_AC_SHELL_DIRNAME): Behave properly when the argument has trailing slashes, and when its depth is just one (`/tmp'). 2000-07-06 Lars J. Aas <larsa@sim.no> * acgeneral.m4 (_AC_SHELL_DIRNAME): New macro. (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_OUTPUT_LINKS): Use _AC_SHELL_DIRNAME. 2000-07-06 Martin Wilck <martin@tropos.de> * aclang.m4 (AC_PROG_F77): Add two compilers, lf95 (Lahey/Fujitsu Fortran) and pgf77 (Portland Group Fortran) (_AC_PROG_F77_G): Some Fortran compilers produce stdout/stderr output even if no errors occur - check exit status rather than output. 2000-07-05 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_SHELL_TMPDIR): When using `mktemp -d', be sure that the directory was created: under Ultrix 4.3 it just returns a name, but does not create the directory. Reported by Christian Krackowizer. 2000-07-03 Lars J. Aas <larsa@sim.no> * acgeneral.m4 (AC_SHELL_MKDIR_P): New macro. (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_OUTPUT_LINKS, AC_PROG_INSTALL): Use AC_SHELL_MKDIR_P. * tests/base.m4 (AC_SHELL_MKDIR_P): Test it. 2000-07-04 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CACHE_LOAD): Be ready to read the cache even when `.' is not in the PATH. * doc/install.texi (configure Invocation): Adjust. 2000-06-30 Jim Meyering <meyering@lucent.com> * acgeneral.m4 (AC_REQUIRE): Tweak a diagnostic. 2000-06-30 Alexandre Oliva <oliva@lsd.ic.unicamp.br> Re-enable the old behavior of --host and --build. * acgeneral.m4 (build_alias): Set to host_alias if --build is not given but --host is, and enable cross-compile auto-detection. If both are, and are different, enable cross compilation. (AC_CANONICAL_HOST): Adjust help message. (cross_compiling): Enclose in quotes when testing. * aclang.m4 (_AC_LANG_COMPILER_WORKS): If cross_compiling is maybe, set it to yes or no depending on the result of the execution test. * doc/autoconf.texi: Document the change. * doc/install.texi: Likewise. 2000-06-27 Jim Meyering <meyering@lucent.com> * acspecific.m4 (_AC_LIBOBJ_GETLOADAVG): Put quotes around use of `$ac_cv_lib_elf_elf_begin', since that variable may not be defined. From Volker Borchert. 2000-06-26 Akim Demaille <akim@epita.fr> * doc/autoconf.texi: Fix various typos. (Limitations of Usual Tools) <sed>: Anchors and groups. (Language Choice): Don't mention cross_compiling here, do it... (Specifying Names) <--host>: here. (Obsoleting Macros): Don't document AC_DEFUNCT, it's going to be removed anyway, obsoleted itself by AU_DEFUN. 2000-06-26 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CACHE_VAL): Swap the arguments of `regexp'. Reported by Alexandre Oliva. 2000-06-26 Akim Demaille <akim@epita.fr> * autoreconf.sh (automake, aclocal): New variables. Import $AUTOMAKE and $ACLOCAL. Pass --verbose to the tools. Avoid using plenty of variables, just append to existing variables. * doc/autoconf.texi: List options in the order --help, --version, --verbose, --debug, and then specific options. 2000-06-26 Akim Demaille <akim@epita.fr> * doc/autoconf.texi: Various Texinfo adjustments. (Specifying Names): When describing the system triplets, use the same names as the shell variables. (System Type Variables): Delete, merge its content into... (Canonicalizing): here. Clarify the difference between the `foo_target' and `foo' variables. 2000-06-26 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PARSE_ARGS, _AC_OUTPUT_CONFIG_STATUS): s/echo | sed/expr/. 2000-06-26 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CONFIG_LINKS, AC_CONFIG_HEADERS, AC_CONFIG_COMMANDS, AC_CONFIG_FILES): Use a shell variable instead of an m4 variable to store what must be done, so that sh conditionals are honored. (_AC_OUTPUT_LINKS, _AC_OUTPUT_HEADERS, _AC_OUTPUT_COMMANDS, _AC_OUTPUT_FILES): Adjust. * tests/semantics.m4: Test the four AC_CONFIG sisters. * doc/autoconf.texi (Configuration Actions): Promote the use of literals, show it works properly with sh conditionals. 2000-06-26 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CACHE_VAL): Too many people put AC_DEFINE in the commands-to-set-it part of it. Give them a warning. 2000-06-26 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Prerequisite Macros): More about AC_REQUIRE. 2000-06-26 Akim Demaille <akim@epita.fr> Given better names to the diversions. * acgeneral.m4 (_AC_DIVERT(NORMAL_2), _AC_DIVERT(NORMAL_3), _AC_DIVERT(NORMAL_4)): Delete, unused. (_AC_DIVERT(NORMAL_1), _AC_DIVERT(NORMAL), AC_DIVERT_DIVERSION): Rename as _AC_DIVERT(PREPARE), _AC_DIVERT(BODY), _AC_DIVERT_DIVERSION. 2000-06-26 Akim Demaille <akim@epita.fr> The current implementation of AC_REQUIRE fails on | AC_DEFUN([TEST1], [REQUIRE([TEST2a])REQUIRE([TEST2b])]) | AC_DEFUN([TEST2a], []) | AC_DEFUN([TEST2b], [REQUIRE([TEST3])]) | AC_DEFUN([TEST3], [REQUIRE([TEST2a])]) | | AC_INIT | TEST1 because it produces TEST3; TEST2a; TEST2b; TEST1. Fix this bug, implement the solution provided by Axel Thimm, and test AC_REQUIRE. * acgeneral.m4: Document this implementation. (_AC_DEFUN_PRO, _AC_DEFUN_EPI, AC_REQUIRE): Be sure that macros are emitted in the same order as they are expanded. (AC_REQUIRE): Forbid being calling out of an AC_DEFUN'd macro (in particular the top level). * tests/base.m4 (AC_REQUIRE): New test. 2000-06-26 Akim Demaille <akim@epita.fr> A macro which is not defined with AC_DEFUN should not be AC_REQUIRE'd, since it doesn't AC_PROVIDE itself. * acgeneral.m4 (AC_REQUIRE): Issue a warning when after expansion, the macro is not AC_PROVIDE'd. 2000-06-26 Akim Demaille <akim@epita.fr> Various cleanups. * acgeneral.m4 (AC_PRO, AC_EPI): Rename as _AC_DEFUN_PRO and _AC_DEFUN_EPI. Adjust dependencies. (AC_DEFUN): Remove the not-to-be-released specializing mechanism. (AC_SPECIALIZE): Remove for the same reasons. Adjust dependencies. (_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS, _AC_INIT_VERSION, _AC_INIT_PREPARE, _AC_CANONICAL_SPLIT, _AC_CHECK_TYPE_NEW, _AC_CHECK_TYPE_OLD): Define via `define' instead of `AC_DEFUN': they are not related to AC_REQUIRE in any way. * acspecific.m4 (AC_PROG_ECHO, _AC_DECL_YYTEXT, _AC_PATH_X_XMKMF, _AC_PATH_X_DIRECT): Define via `define' instead of `AC_DEFUN'. 2000-06-19 Steven G. Johnson <stevenj@alum.mit.edu> * acgeneral.m4 (AC_CHECK_TOOL): Use two variables in order to avoid cache variable conflicts between AC_CHECK_PROG invocations. (AC_PATH_TOOL): Fix same bugs as in 6/9/00 fixes to AC_CHECK_TOOL. Pass correct arguments to AC_CHECK_PATH (different from AC_CHECK_PROG). Use AC_CHECK_PATH cache variable, not AC_CHECK_PROG var, and use two variables for two invocations as above. Quote AC_CHECK_* args. 2000-06-16 Akim Demaille <akim@epita.fr> The test suite reveals AC_OUTPUT_MAKE_DEFS fails on RISC/OS. * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS) <confdef2opt.sed>: Reset the t flag between each cycle. * doc/autoconf.texi (Limitations of Usual Tools): Some about the t flag in sed. 2000-06-16 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_EXEEXT, AC_OBJEXT): Don't obsolete them, let them be empty, so that Automake still provide support for $(EXEEXT). 2000-06-15 Akim Demaille <akim@epita.fr> * autoconf.sh (option handling): Give a more understandable message when an option is missing its argument. * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * autoheader.sh: Likewise. 2000-06-13 Akim Demaille <akim@epita.fr> `./config.status -d' is buggy. * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Remove the `shift' in --debug. * doc/autoconf.texi (Limitations of Builtins): Some about shift. 2000-06-13 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Caching Results): Bigger warning about the extremely frequent action-in-commands bug. Move the documentation of AC_CACHE_SAVE and AC_CACHE_LOAD... (Cache Files): into here. 2000-06-09 Steven G. Johnson <stevenj@alum.mit.edu> * acgeneral.m4 (AC_CHECK_TOOL): Even if VALUE-IF-NOT-FOUND is not specified, we should still check whether PROG-TO-CHECK-FOR actually works before returning it when the prefixed program is not found. Also, fixed a bug where it failed to pass the PATH argument in the second call to AC_CHECK_PROG. 2000-06-09 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECK_TOOLS): Rewrite. 2000-06-09 Paul Eggert <eggert@twinsun.com> * doc/autoconf.texi: Use `@option' for options, not `@samp' nor `@code'. * doc/install.texi: Likewise. 2000-06-09 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Don't require AC_CYGWIN. (AC_F77_NAME_MANGLING): Removed useless comment. (_AC_PROG_F77_GNU): Use `.f' not `.fpp' which is not properly processed by Abysoft's Fortran compiler. 2000-06-09 Steven G. Johnson <stevenj@superjdj.mit.edu> * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Fixed bug where compiler output to stdout was not caught and interpreted. 2000-06-09 Akim Demaille <akim@epita.fr> `autoconf --trace' dies on filenames with `:'. Reported by Mark Elbrecht. * autoconf.sh <trace> (trace2m4.sed): Use `..*' instead of `[^:][^:]*' to catch file names. The rest of regex is probably precise enough to avoid incorrect parsing. 2000-06-09 Akim Demaille <akim@epita.fr> * acspecific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): Always initialize $3 to no. 2000-06-08 Paul Eggert <eggert@twinsun.com> Import AC_SYS_LARGEFILE from largefile.m4 serial 12. * acspecific.m4 (AC_SYS_LARGEFILE, _AC_SYS_LARGEFILE_MACRO_VALUE, _AC_SYS_LARGEFILE_SOURCE): New. * doc/autoconf.texi (System Services): Document AC_SYS_LARGEFILE. 2000-06-08 Steven G. Johnson <stevenj@alum.mit.edu> * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Don't override FLIBS if specified by the user. Fix a bug: use the cached value to set FLIBS. 2000-06-07 Dave Love <fx@gnu.org> * aclang.m4 (AC_PROG_F77): Check for f95 and fc too. 2000-06-07 Philippe De Muyter <phdm@macqel.be> `foo=1 foo=2 cmd' has an undefined behavior. * acgeneral.m4 (_AC_COMPUTE_INT_COMPILE): Do not put two shell variable assignments in one shell command. * doc/autoconf.texi (Shell Substitutions): Document. 2000-06-07 Steven G. Johnson <stevenj@alum.mit.edu> * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Fix problem on Cray due to confusion from the link command getting echoed in quotes. In the future, a more general fix for quoted arguments with spaces might be better. 2000-06-07 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Builtins): More on `test' and `case'. Some on `if' and `break'. 2000-06-07 Morten Eriksen <mortene@sim.no> * acspecific.m4 (_AC_PATH_X_DIRECT): Include `X11/Intrinsic.h' when trying to use `XtMalloc' to actually have a chance of succeeding. 2000-06-07 Akim Demaille <akim@epita.fr> Hard (code) X. * acspecific.m4 (_AC_PATH_X_DIRECT): Hard code `X11/Intrinsic.h' instead of using `ac_x_direct_test_include', likewise for `Xt' and `ac_x_direct_test_lib', `XtMalloc' and `ac_x_direct_test_function'. 2000-06-07 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_PATH_X): Use AC_DIVERT. Use `no', not `NO' for ac_x_includes and ac_x_libraries. Adjust dependencies. (_AC_PATH_X_DIRECT): Introduce ac_x_header_dirs to factor the list of places where headers and libs might be. (AC_PATH_XTRA): Don't quote the argument of `case'. 2000-06-07 Jim Meyering <meyering@lucent.com> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Put the expansion of AC_LIST_LINKS in an unquoted `here'-document. 2000-06-06 Akim Demaille <akim@epita.fr> * tests/aclocal.m4 (AC_ENV_SAVE): Skip `no_x'. From Mark Elbrecht. 2000-06-05 Mo DeJong <mdejong@cygnus.com> * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Move the setting of ac_tool_prefix before the call to AC_DIVERT_POP. 2000-06-05 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECK_TOOL_PREFIX): AU define it. Suggested by Mo DeJong. 2000-06-05 Steven G. Johnson <stevenj@alum.mit.edu> * aclang.m4 (AC_C_CHAR_UNSIGNED): Use the new compiler-test technology so that we can do the test via compilations only. Also use (char) -1 instead of (char) 255 to check if char is unsigned. 2000-05-28 Jim Meyering <meyering@lucent.com> * acspecific.m4 (AC_FUNC_STRERROR_R): Call strerror_r with 2nd arg of type char*, not int. Suggestion from Paul Eggert. * doc/autoconf.texi (Particular Functions): Give better description of AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. From Paul Eggert. 2000-05-26 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Usual Tools): Document `ln -s' on DJGPP, based on the comments from Mark Elbrecht. 2000-05-26 Akim Demaille <akim@epita.fr> * autoreconf.sh (autoconf, autoheader): Be more conscientious when looking for the executable. * autoupdate.sh: Likewise. * autoheader.sh: Likewise. Suggested by Alexandre Oliva. 2000-05-26 Akim Demaille <akim@epita.fr> Thanks to --program-transform-name, `autoconf' might be install as `yo-man-i-am-the-all-mighty-AVt0c0nF-eh-eh'. But when `yo-man-i-am-the-all-mighty-AVt0h3Ad3R-eh-eh' and the other tools want to trace, they might stupidly invoke the program named `autoconf' instead. Pfff, stupid scripts :) * Makefile.am (editsh): Transfer the names of the install `autoconf' and `autoheader'. * autoconf.sh: Add a missing period at the end of the comment # Parse command line Make sure to have a ChangeLog much longer than the patch. * autoheader.sh: Use the right `autoconf'. * autoupdate.sh: Likewise. * autoreconf.sh: Likewise, and for `autoheader' too. Simplify the handling of localdir and AC_MACRODIR. * ifnames.sh: Formatting changes. 2000-05-25 Steven G. Johnson <stevenj@alum.mit.edu> Don't use f2c as a possible Fortran compiler, since by itself it cannot produce object code. * aclang.m4 (AC_PROG_F77): Remove f2c from the search list. * doc/autoconf.texi: Excise mentions of f2c in AC_PROG_F77 docs. 2000-05-26 Mark Elbrecht <snowball3@bigfoot.com> Currently, AC_PROG_LN_S incorrectly reports yes with DJGPP. This is because the DJGPP `ln' emulates soft links for executables by generating a stub that in turn calls the real program. This feature also works with nonexistent files like in the Unix spec. So `ln -s X conftestdata' will generate `conftestdata.exe' which will attempt to call 'X.exe'. But this feature only works for executables. Fix it. * acspecific.m4 (AC_PROG_LN_S): Create a sample file and use it to test `ln -s'. 2000-05-26 Ossama Othman <ossama@ece.uci.edu> * aclang.m4 (AC_PROG_CXX): Look for aCC before CC. 2000-05-26 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_FUNC_STRERROR_R): New, from `strerror_r.m4', serial 2, by Jim Meyering. (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): New, from `lstat-slash.m4', serial 1, by Jim Meyering. * acfunctions: Adjust. 2000-05-26 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECK_TOOLS): Don't require AC_CHECK_TOOL_PREFIX, it's dead. 2000-05-26 Akim Demaille <akim@epita.fr> * acgeneral.m4: Simplify all the case "$switch" in into case $switch in * acspecific.m4: Likewise. * aclang.m4: Likewise. 2000-05-26 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECK_TOOL_PREFIX): Remove. Adjust dependencies. (_AC_INIT_PARSE_ARGS): Set ac_tool_prefix. 2000-05-26 Akim Demaille <akim@epita.fr> In `info', it is easier to type `autoconf <TAB>' to reach the list of options, that `Invoking autoc<TAB>'. * doc/autoconf.texi: s/Invoking foo/foo Invocation/. 2000-05-26 Akim Demaille <akim@epita.fr> Merge `Upgrading' and `Obsolete Constructs' together. * doc/autoconf.texi (Obsolete Constructs): Move right after `Recreation a Configuration. (Invoking autoupdate): Be a subsection of `Obsolete Constructs'. (Upgrading): Demote from chapter to section. Be a section of `Obsolete Constructs'. Rename as `Autoconf 1'. 2000-05-26 Akim Demaille <akim@epita.fr> Find a means to extract integers from the compiler. Use this technology to compute `sizeof' even when cross-compiling. Ideas and initial suggestion by Kaveh Ghazi. Binary search by Bruno Haible. * aclang.m4 (AC_LANG_BOOL_COMPILE_TRY, AC_LANG_BOOL_COMPILE_TRY(C), AC_LANG_BOOL_COMPILE_TRY(C++), AC_LANG_INT_SAVE, AC_LANG_INT_SAVE(C), AC_LANG_INT_SAVE(C++)): New macros. * acgeneral.m4 (_AC_COMPUTE_INT_COMPILE, _AC_COMPUTE_INT_RUN, _AC_COMPUTE_INT): New. (AC_CHECK_SIZEOF): Use them. Check whether the type exists beforehand. * tests/semantics.m4 (AC_CHECK_SIZEOF): Strengthen. 2000-05-26 Ossama Othman <ossama@ece.uci.edu> * aclang.m4 (AC_PROG_CXX): Look for aCC KCC RCC xlC_r xlC. s/c++ g++/g++ c++/. * doc/autoconf.texi (Compilers and Preprocessors): Adjust. 2000-05-26 Akim Demaille <akim@epita.fr> No library nor special privilege is needed to run `getloadavg' under FreeBSD. Reported by Alec Wolman. * acspecific.m4 (AC_FUNC_GETLOADAVG): Check for `getloadavg' without any additional library. Fixes Autoconf/109. 2000-05-26 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Usual Tools, Limitations of Builtins): Integrate comments from Paul Eggert and Jim Meyering. Add the sed limitation discovered by Philippe De Muyter. Fix a typo spotted by Pavel Roskin. 2000-05-25 Akim Demaille <akim@epita.fr> The test suite needs GNU m4. Reported by Bob Friesenhahn. * tests/atconfig.in (M4): Set it. * tests/base.m4: Use it. 2000-05-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Don't use negated character classes with `case'. Use `expr' instead. Suggested by Paul Eggert. * doc/autoconf.texi (Limitations of Builtins): Explain expr, the `x' trick, and negated character classes. 2000-05-24 Didier Verna <didier@lrde.epita.fr> * acgeneral.m4 (AC_INIT): Call _AC_PACKAGE before _AC_INIT. 2000-05-24 Ossama Othman <ossama@debian.org> * aclang.m4 (AC_LANG(C++)): Change `ac_ext' from from `C' to `cc' to avoid potential ambiguities on case-insensitive shells. 2000-05-24 Mo DeJong <mdejong@cygnus.com> Have --host=sun4 automatically look for CC=sun4-cc etc. * acgeneral.m4 (AC_CHECK_TOOLS): New. * aclang.m4 (AC_PROG_CXX, AC_PROG_CC, AC_PROG_F77): Use new AC_CHECK_TOOLS macro instead of AC_CHECK_PROGS so that a cross compiler is found by default with --host. * doc/autoconf.texi (Generic Programs, Manual Configuration): Describe new AC_CHECK_TOOLS macro. Fix unclear working about AC_CHECK_PROGS. * tests/Makefile.am (FILTER_MACROS): Adjust. 2000-05-24 Akim Demaille <akim@epita.fr> The night of the living dead... * acspecific.m4 (AC_XENIX_DIR, AC_DYNIX_SEQ, AC_IRIX_SUN, AC_SCO_INTL): Wake up a few zombies. * doc/autoconf.texi: Adjust. * tests/aclocal.m4 (AC_ENV_SAVE): Likewise. 2000-05-24 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_LANG_FUNC_LINK_TRY, AC_LANG_FUNC_LINK_TRY(C), AC_LANG_FUNC_LINK_TRY(C++)): New macros. (AC_CHECK_FUNC): Use it, together with AC_LINK_ELSE. 2000-05-24 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_FUNC_VFORK): Quote properly. (AC_FUNC_STRFTIME, AC_FUNC_VFORK, AC_FUNC_VPRINTF): Don't use AC_DEFINE, just use the AC_CHECK_*S macro. 2000-05-24 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_WHICH_A): Replace it with... (AC_SHELL_PATH_WALK): this. (AC_CHECK_PROG, AC_PATH_PROG): Use it. 2000-05-24 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Builtins): Document `unset'. (Special Shell Variables): Adjust. (Shellology): New section. Introduce bash and zsh. (Special Shell Variables): Some data on NULLCMD. (Quotation Thumb Rule): Rename as (Quotation Rule of Thumb): this. * acgeneral.m4 (AC_SHELL_UNSET): Remove. (AC_SHELL_UNSETENV): Rename as... (AC_SHELL_UNSET): this. (_AC_INIT_PREPARE_ENVIRONMENT): Prepare bash and zsh. Adjust to AC_SHELL_UNSET. 2000-05-24 Akim Demaille <akim@epita.fr> The options --build etc. used to set `$build'. *If* AC_CANONICAL_SYSTEM was run, then the value of `$build' given by the user was saved into `$build_alias', and `$build' was normalized using `config.sub'. Now, let `--build' set `$build_alias' so that scripts with or without `AC_CANONICAL_BUILD' have the same semantics. This allows to use `AC_CHECK_TOOL' without requiring `config.guess' and `config.sub' (which was bizarre anyway). * acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target set `build_alias' etc. After the option handling, set host to $host_alias etc. for bugward compatibility. (AC_CANONICALIZE): Mutate into... (_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just computes `$foo_os' etc. (_AC_CANONICAL_THING): Remove, too confusing. (AC_CANONICAL_BUILD): Adjust. Do not assign any value to `build_alias', just compute `build', and `build_{cpy, vendor, os}'. (AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise. (AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is given, not when `$host != $build'. * acgeneral.m4 (sinclude): Fix typo. 2000-05-23 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Limitations of Builtins): More details on `test -n ='. 2000-05-23 Akim Demaille <akim@epita.fr> Simplify the interface: users shouldn't need to explicitly check for special environments. * acspecific.m4 (AC_EXEEXT, AC_OBJEXT): AU defined to nothing. Replace them by... (_AC_EXEEXT, _AC_OBJEXT): this. * aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call them. (AC_PROG_CC_G, AC_PROG_CXX_G, AC_PROG_F77_G): Rename as... (_AC_PROG_CC_G, _AC_PROG_CXX_G, _AC_PROG_F77_G): this. Adjust dependencies. * tests/Makefile.am (FILTER_MACROS): Adjust. * doc/autoconf.texi (Compilers and Preprocessors): New section, move the documentation of AC_PROG_CC, AC_PROG_CC_C_O, AC_PROG_CC_STDC, AC_PROG_CPP, AC_PROG_CXX, AC_PROG_CXXCPP, AC_PROG_F77, AC_PROG_F77_C_O, AC_PROG_GCC_TRADITIONAL here. Factor the comment documentation of AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77. 2000-05-23 Akim Demaille <akim@epita.fr> Modernize AC_EXEEXT and AC_OBJEXT. Now work with other languages than C and C++. * acspecific.m4 (AC_EXEEXT, AC_OBJEXT): Use AC_COMPILE_IFELSE/AC_LINK_IFELSE and AC_LANG_PROGRAM instead of ad hoc code. Use `$ac_ext' instead of listing `.c', `.C' etc. Use AC_CACHE_CHECK. * doc/autoconf.texi (System Services): Adjust. 2000-05-23 Akim Demaille <akim@epita.fr> Simplify the interface: users shouldn't need to explicitly check for special environments. * acspecific.m4 (AC_CYGWIN, AC_EMXOS2, AC_MINGW32): AU defined to nothing. Replace them by... (_AC_CYGWIN, _AC_EMXOS2, _AC_MINGW32): these, which are automatically called by... (AC_EXEEXT): this. * doc/autoconf.texi (System Services, Obsolete Macros): Adjust. 2000-05-23 Akim Demaille <akim@epita.fr> AC_PROG_GNU_M4 should actually be private to the package Autoconf. * acspecific.m4 (AC_PROG_GNU_M4): Move to... * m4/m4.m4: here. * m4/Makefile.am (EXTRA_DIST): Adjust. * doc/autoconf.texi (Particular Programs): Adjust. 2000-05-23 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Exiting from Shell Scripts): Move contents into... (Limitations of Builtins): this new node. Document limitations of `exit', `export' and `case'. Welcome the documentation of `test' from... (Limitations of Usual Tools): here. 2000-05-22 Akim Demaille <akim@epita.fr> Load the additions *before* running AC_INIT. This is important if you want to redefine AC_INIT or some of its sub macros (eeerk!), or if you want to use user defined macros before AC_INIT. Suggested by Didier Verna. * acgeneral.m4 (_AC_INIT): Don't include `acsite.m4' and `aclocal.m4'. * autoconf.sh (run_m4, run_m4f): Do it. 2000-05-22 Akim Demaille <akim@epita.fr> Reading the ChangeLog revealed that the recent update of AC_FUNC_GETLOADAVG introduced a bug which already happened (see Mon Nov 11 18:02:58 1996 David J MacKenzie). * acgeneral.m4 (AC_CHECK_LIB): Use a less tempting name: s/ac_save_LIBS/ac_check_lib_save_LIBS/. 2000-05-22 Akim Demaille <akim@epita.fr> * acspecific.m4 (_AC_LIBOBJ_ALLOCA): New macro, extracted from... (AC_FUNC_ALLOCA): here. Adjust. 2000-05-22 Akim Demaille <akim@epita.fr> Add `configure --config-cache', `-C' as a shortcut for `--cache-file=config.cache'. * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Let `configure' support `--config-cache' and `-C'. Report them in `--help'. Fix the display of missing argument. (_AC_OUTPUT_SUBDIRS): Adjust. * doc/install.texi (Invoking configure): Rename the node as (Running configure scripts): this, the name of the chapter. (Operation Controls): Rename as... (Invoking configure): this. Document the new options. * doc/autoconf.texi (direntry): Huh? What is this `aclocal' doing here? Point to `Invoking configure'. (Cache Files): No need to document the disabling of the cache. 2000-05-22 Mark Elbrecht <snowball3@bigfoot.com>, Eli Zaretskii <eliz@gnu.org> More MS-DOS support. * acgeneral.m4 (_AC_OUTPUT_FILES): Fix the computation of `ac_file_inputs' for `$ac_given_srcdir' containing a colon. (AC_CHECK_MEMBERS, AC_PATH_PROG): s/ac_save_ifs/ac_save_IFS/. 2000-05-22 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_FUNC_CHOWN): New macro, based on Jim Meyering's `chown.m4' serial 4. (AC_FUNC_GETGROUPS): New macro, based on Jim Meyering's `getgroups.m4' serial 3. (AC_FUNC_MEMCMP): Updated, based on Jim Meyering's `memcmp.m4' serial 3. (AC_FUNC_MALLOC): New macro, based on Jim Meyering's `malloc.m4' serial 3. (AC_FUNC_MMAP): Include `stdlib.h' when `STDC_HEADERS'. * acfunctions: Sort. Add `chown' and `malloc', point `getgroups' to `AC_FUNC_GETGROUPS' instead of `AC_TYPE_GETGROUPS'. * doc/autoconf.texi (Particular Functions): Adjust. 2000-05-22 Akim Demaille <akim@epita.fr> * acgeneral.m4: Quote the names being m4-defined. * acspecific.m4: Likewise. * aclang.m4: Likewise. 2000-05-22 Akim Demaille <akim@epita.fr> Factor the AC_PROG_<compiler>_WORKS macros. * acgeneral.m4 (_AC_INIT_DEFAULTS): Set `cross_compiling'. (AC_TRY_COMPILER): Remove. * aclang.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS, AC_PROG_F77_WORKS): Removed. (_AC_LANG_COMPILER_WORKS): New macro. (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Adjust. 2000-05-22 Akim Demaille <akim@epita.fr> * aclang.m4: Formatting changes. 2000-05-22 Akim Demaille <akim@epita.fr> More than one argument to `configure' builds a broken `config.status'. Fix and test. * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use `$ac_configure_args' directly, not via a tmp variable. * tests/torture.m4 (command line interface): Test with more than one argument. 2000-05-19 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_MSG_WARN): s/warning/WARNING/. * autoheader.sh: Likewise. From Franc,ois Pinard. 2000-05-19 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_PACKAGE): Rename as _AC_INIT_PACKAGE. (AC_INIT): Dispatch arguments either to _AC_INIT_PACKAGE or to AC_CONFIG_SRCDIR. (AU::AC_INIT): New. * configure.in: Adjust. Use `#', not `dnl'. * doc/autoconf.texi (configure.in Layout): Document the new form of AC_INIT. Document AC_CONFIG_SRCDIR. (Obsolete Macros): Document the old one. 2000-05-19 Akim Demaille <akim@epita.fr> * acgeneral.m4: Simplify all the unjustified `[\$]foo' into `\$foo', the quotes are needed only for `\$[1]', `\$[@]' etc. Prefer `$$1' to `[$]$1', `$foo' to `[$]foo', `$[1]' to `[$]1' etc. * aclang.m4: Likewise. * acspecific.m4: Likewise. 2000-05-19 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_TRY_COMPILER): Fix quotation. 2000-05-19 Akim Demaille <akim@epita.fr> Fix Autoconf/123. * libm4.m4: Rename `symbols' as `m4_symbols'. 2000-05-19 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_PROG_CC_GNU, AC_PROG_CXX_GNU, AC_PROG_F77_GNU): Rename as: (_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): these. Compute the value of GCC, GXX and G77 here. Set to `no' (instead of empty) if not the GNU compiler. (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Adjust. * doc/autoconf.texi: Adjust. 2000-05-19 Akim Demaille <akim@epita.fr> Fix Autoconf/106. * aclang.m4 (AC_PROG_F77): Follow strictly the same scheme as AC_PROG_CC to compute the default FFLAGS. 2000-05-19 Akim Demaille <akim@epita.fr> Either we cross-compile the whole package, or we don't. Using --host enables cross-compilation. * acgeneral.m4 (_AC_INIT_PARSE_ARGS): `--host' enables cross compilation. (AC_CANONICAL_BUILD): The help string should explicitly mention cross compilation. * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): Don't set `cross_compiling'. (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Run your `WORK' partner only if not cross-compiling. (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS, AC_PROG_F77_WORKS): If does not work, don't assume an implicit cross-compilation: fail. * doc/autoconf.texi: Adjust. 2000-05-19 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_SHELL_UNSETENV, AC_SHELL_UNSET): Add the missing quotes. 2000-05-19 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Prefer case $foo in *[^-a-zA-Z0-9_]*) AC_ACTION;; esac over if echo "$foo" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then AC_ACTION fi 2000-05-19 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Testing Values and Files): Delete, move its content into... (Limitations of Usual Tools::test): here. Document more limitations. 2000-05-19 Akim Demaille <akim@epita.fr> * acspecific.m4 (_AC_LIBOBJ_GETLOADAVG): New macro, extracted from (AC_FUNC_GETLOADAVG): here. Use it. 2000-05-19 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_SPECIALIZE): Avoid a useless `indir'. (AC_CHECK_MEMBER, AC_CHECK_MEMBERS): Fix to work properly on `struct f.g.h'. * acspecific.m4 (AC_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS and AC_CHECK_MEMBERS instead of performing their task by hand. 2000-05-19 Akim Demaille <akim@epita.fr> Synchronize AC_FUNC_GETLOADAVG with the version of the shellutils 1.16f (serial 4). * acspecific.m4 (AC_FUNC_GETLOADAVG): Check for `pstat_getdynamic'. Define `C_GETLOADAVG' if compiling `getloadavg.c'. Check for NLS. Compute `GETLOADAVG_LIBS'. (AC_FUNC_MKTIME): Remove a forgotten `AC_SUBST(LIBOBJS)'. 2000-05-19 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_SHELL_UNSET, AC_SHELL_UNSETENV): New macro. (_AC_INIT_PREPARE_ENVIRONMENT): Use AC_SHELL_UNSETENV. Set CDPATH. Fixes Autoconf/96. * doc/autoconf.texi (Special Shell Variables): New node. Document `status', `CDPATH', `LANG', `LC_ALL', `LC_MESSAGES' and `LC_CTYPE'. 2000-05-12 Akim Demaille <akim@epita.fr> * acgeneral.m4 (sinclude): Define, some packages (binutils) need it. 2000-05-12 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Invoking config.status): Move the documentation of the envvar CONFIG_(FILES, HEADERS, COMMANDS, LINKS) to (Obsolete config.status Use): here. 2000-05-12 Paul Eggert <eggert@twinsun.com> * doc/autoconf.texi (Exiting from Shell Scripts): New node. (Autoconf Language): Follow the advice in the new node. 2000-05-12 Peter Eisentraut <peter_e@gmx.net> * doc/autoconf.texi: Fix typos. 2000-05-11 Akim Demaille <akim@epita.fr> AC_CONFIG_SUBDIRS needs two lists: one, ac_subdirs_all, which contains all the possible subdirs for `--help=recursive', and another, `subdirs' which can be built dynamically for launching sub configurations. * acgeneral.m4 (AC_CONFIG_SUBDIRS): Define `subdirs' dynamically. Define `ac_subdirs_all' statically. Warn if the argument is not a literal. (AC_LIST_SUBDIRS): Rename as... (_AC_LIST_SUBDIRS): this. (_AC_INIT_HELP): Loop over `ac_subdirs_all', not `subdirs'. (_AC_OUTPUT_SUBDIRS): Loop over `subdirs', not `AC_LIST_SUBDIRS'. * doc/autoconf.texi (Subdirectories): Adjust. * acgeneral.m4: Replace all the `test ! -d foo && bar' with `test -d foo || bar'. * Makefile.am (.m4.m4f): Stop hiding what you're doing. Don't check for GNU m4, let it die. 2000-05-11 Akim Demaille <akim@epita.fr> The Associated Rewriters are even prouder to present... . | | /-\ / \ )===( U T O U P D A T E I V // \\ ========= _//_ _\\_ The ``Eiffel Tower'' Release * autoupdate.sh: Complete rewrite. See that file for a detailed explanation. Basically, simulate the name spaces thanks to `autoconf --trace' and auxiliary files. No longer use `autoupdate.m4', remove the dependencies. Synchronize the options and `--help'. * doc/autoconf.texi (Invoking autoupdate): Humanoupdate. * autoupdate.m4: Delete. * tests/Makefile.am (FILTER_MACROS): Add `AC_OUTPUT'. Since `AC_OUTPUT' is now AU_DEFUN'd, it is extracted for testing, while it was not before. * tests/tools.m4 (autoupdate): Re-enable. Adjust the expected output with the right quotation (yeah!). Pass `-m $top_srcdir': autoupdate wants the `.m4' files, not the frozen files. * Makefile.am (nodistpkgdataDATA): Move `acversion.m4' to (distpkgdataDATA): here, so that all the `.m4' files are in the source hierarchy, not split across src and build. * acversion.m4.in: Update to today's standards. * Makefile.am: Adjust. 2000-05-11 Akim Demaille <akim@epita.fr> * libm4.m4: Be robust to multiple inclusion. Have the first `changequote' robust to the current quotation system. Always quote the first argument of `define'. 2000-05-11 Akim Demaille <akim@epita.fr> The Associated Rewriters are proud to present... ^ / \ U T O U P D A T E I I I /===\ / \ It bells, It whistles... * autoupdate.sh: Complete rewrite. See that file for a detailed explanation. * acgeneral.sh: Don't use AU_DEFINE, but AU_DEFUN. (AC_OUTPUT_COMMANDS_CNT): Renamed as... (_AC_OUTPUT_COMMANDS_CNT): this. 2000-05-11 Akim Demaille <akim@epita.fr> Get rid of the m4 name spaces. * libm4.m4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir, m4_popdef, m4_pushdef, m4_undefine, m4_namespace_push, m4_namespace_pop, m4_namespace_register, m4_namespace_define, m4_disable, m4_enable): Removed. All dependencies adjusted. * libm4.m4: Remove all the name space initialization. * acgeneral.m4: Adjust. (AU_DEFINE): Redefine as `AC_DEFUN'. * autoupdate.m4: Adjust. * tests/tools.m4: Temporarily disable the `autoupdate' test. 2000-05-11 Akim Demaille <akim@epita.fr> Eradicate AC_TRY_COMPILE. * aclang.m4 (AC_PROG_CC_STDC, AC_C_BIGENDIAN, AC_C_INLINE, AC_C_CONST, AC_C_VOLATILE, AC_F77_NAME_MANGLING): Use `AC_COMPILE_IFELSE'. * acspecific.m4 (AC_DECL_SYS_SIGLIST, _AC_CHECK_HEADER_DIRENT, AC_HEADER_SYS_WAIT, AC_HEADER_TIME, AC_TYPE_SIGNAL, AC_FUNC_GETLOADAVG, AC_FUNC_SELECT_ARGTYPES, AC_STRUCT_TM, AC_CYGWIN, AC_MINGW32, AC_EMXOS2): Likewise. * tests/semantics.m4 (C keywords): Check that AC_C_CONST, AC_C_VOLATILE, and AC_C_INLINE function properly with GCC. 2000-05-11 Akim Demaille <akim@epita.fr> Replace AC_LANG_SAVE/AC_LANG_RESTORE with AC_LANG_PUSH/AC_LANG_POP. * aclang.m4 (_AC_LANG_CURRENT, AC_LANG_STACK): You two are the same thing, which now we shall name `_AC_LANG'. All users adjusted. (AC_LANG_PUSH, AC_LANG_POP): New macros. (AC_LANG_SAVE, AC_LANG_RESTORE): AU defined. (AC_PROG_CC_WORKS, AC_PROG_CXXCPP, AC_PROG_CXX_WORKS, AC_PROG_F77_WORKS, AC_F77_LIBRARY_LDFLAGS, AC_F77_NAME_MANGLING): Use them. (AC_F77_LIBRARY_LDFLAGS): Move the requirements to its top. * doc/autoconf.texi (Language Choice): Document them. (Old Macros): Welcome AC_LANG_SAVE and AC_LANG_RESTORE. 2000-05-11 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Less adventurous use of `test'. Fixes Autoconf/108. 2000-05-11 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Particular Headers): Some more sorting. Use `@multitable'. 2000-05-11 Akim Demaille <akim@epita.fr> * acspecific.m4 (_AC_CHECK_HEADER_DIRENT): Use more modern Autoconf idioms. (_AC_CHECK_HEADERS_DIRENT): Removed, instead... (AC_HEADER_DIRENT): Handle the loop. 2000-05-11 Akim Demaille <akim@epita.fr> Provide a means to track the dependencies of files created by `configure'. * acgeneral.m4 (AT_FILE_DEPENDENCY, _AC_CONFIG_DEPENDENCY, _AC_CONFIG_DEPENDENCIES): New macros. (AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_LINKS): Use them. 2000-05-11 Akim Demaille <akim@epita.fr> Merge AC_DECL_YYTEXT into AC_PROG_LEX. * acgeneral.m4 (AC_DECL_YYTEXT): Rename as (_AC_DECL_YYTEXT): this. (AC_PROG_LEX): Use it. (AC_DECL_YYTEXT): New AU macro. * doc/autoconf.texi: Adjust. 2000-05-10 Akim Demaille <akim@epita.fr> * aclang.m4 (AC_F77_NAME_MANGLING): Use AC_COMPILE_IFELSE. Move the requirements to the top of the macro. 2000-05-10 Akim Demaille <akim@epita.fr> Update and polish the documentation. * doc/autoconf.texi: Use @sc where upper case names were used. Remove a few useless `dnl'. Convert some `dnl' into comments. Promote `$(foo)' in Makefiles, not `${foo}'. Promote `$foo' in shell scripts, not `${foo}'. Promote `foo = bar' in Makefiles, not `foo=bar'. (Language Choice): Document `AC_LANG', move `AC_LANG_C', `AC_LANG_CPLUSPLUS' and `AC_LANG_FORTRAN77' to (Old Macros): here. * doc/install.texi: Fix a typo in the specification of the system quadruples. 2000-05-10 Akim Demaille <akim@epita.fr> * libm4.m4 (m4_foreach): Rewritten so that it does not require lists in between parens. (m4_foreach_quoted): new copy of the previous `m4_foreach' which is still used by `m4_wrap'. * acgeneral.m4 (AC_INCLUDE, AC_INCLUDES): Removed. (AC_FOREACH): Don't use parens with `m4_foreach'. (AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES): Adjust the description. * acspecific.m4 (AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_RDEV): Adjust. * autoconf.texi (AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES): Adjust their documentation. (AC_INCLUDE): Undocument. * tests/semantics.m4: Adjust. * tests/actest.m4: Rename as... * tests/aclocal.m4: this. * tests/atspecific.m4: No longer include actest.m4. * tests/torture.m4: Likewise. * tests/Makefile.am: Adjust. 2000-05-10 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Obsolete Macros): Document `AU_DEFUN'. Move the documentation of `AC_OBSOLETE' from here, to... (Old Macros): here. * acspecific.m4 (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV): AU_DEFUN'd. 2000-05-10 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_LIBOBJ_DECL, AC_LIBOBJ): New macros. (AC_REPLACE_FUNCS): Use AC_LIBOBJ. * acspecific.m4 (AC_FUNC_MKTIME, AC_FUNC_MEMCMP, AC_STRUCT_ST_BLOCKS): Use AC_LIBOBJ. * doc/autoconf.texi : Adjust so that the user is not encouraged to use LIBOBJS directly. (Generic Functions): Document AC_LIBOBJ_DECL and AC_LIBOBJ. 2000-05-09 Jim Meyering <meyering@lucent.com> * acgeneral.m4 (AC_SEARCH_LIBS): Remove double quotes around `no'. 2000-05-09 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_OUTPUT_FILES): Don't automatically spit `Generated by...' in Makefiles. Fixes Autoconf/102. 2000-05-09 Akim Demaille <akim@epita.fr> Let `config.status' use a private temp dir. Suggested by Jim Meyering. * acgeneral.m4 (_AC_SHELL_TMPDIR): New macro. (_AC_OUTPUT_CONFIG_STATUS): Use it. Use more quoted here docs to improve readability. Compute `$me' and use it in the error messages. Define `$configure' and `$configure_args' to avoid continuously mixing the uses of `configure' and `config.status' evaluation in a single line. Define `$SHELL' and use it. Simplify all the unjustified `[\$]foo' into `\$foo', the quotes are needed only for `\$[1]', `\$[@]' etc. Replace all the uses of `ac_cs_root' with files in the tmp dir of `config.status'. Remove a few `rm' covered by the removal of the `$tmp' dir. Let `config.status' support `--debug'. (_AC_INIT_PREPARE): Avoid the leading space in `ac_configure_args'. * doc/autoconf.texi (Invoking config.status): Adjust. 2000-05-05 Jim Meyering <meyering@lucent.com> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Set up traps to remove temporaries upon exit, too, not just upon receipt of signal. 2000-05-05 Akim Demaille <akim@epita.fr> AC_CHECK_PROG macro fails if REJECT value is set under Digital Unix 4.0x and 5.0 because `"$@"' expands into an empty parameter (instead of nothing) when there are no positional parameters. From Nicolas Joly. * acgeneral.m4 (AC_CHECK_PROG, AC_CHECK_PROGS): Prefer `$$1' to `[$]$1', `$foo' to `[$]foo', `$[1]' to `[$]1', and `${1+"$[@]"}' to `"[$]@"'. 2000-05-04 Akim Demaille <akim@epita.fr> AC_PREREQ understands `2.14a' as `2.141'. Reported by Didier Verna. * acgeneral.m4 (AC_PREREQ): Don't quote AC_ACVERSION. 2000-05-04 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AH_TOP, AH_BOTTOM): New macros. (_AH_COUNTER): New variable. * tests/tools.m4 (autoheader): Check their proper functioning. 2000-05-04 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Obsolete Macros): Rename as... (Obsoleting Macros): this. (Old Macros): Rename as... (Obsolete Macros): this. Be a section of... (Obsolete Constructs): New chapter. (Invoking autoheader): Move the `acconfig.h' documentation to... (acconfig.h): here, new section of `Obsolete Constructs'. (Autoheader Macros): Document AH_VERBATIM, AH_TEMPLATE, AH_TOP and AH_BOTTOM. 2000-05-03 Nicolas Joly <njoly@pasteur.fr> * autoheader.sh (config_h): Sort the templates. Under NetBSD 1.4.1 /bin/sh `set' command does not return a sorted variables list. 2000-05-03 Akim Demaille <akim@epita.fr> * tests/tools.m4 (autoheader): Don't pass `-l at_srcdir' to `autoheader', since `acconfig.h' is created in the build dir. There's one empty line less in `config.h.in' than before when using `acconfig.h'. 2000-05-03 Akim Demaille <akim@epita.fr> Simplify the handling of `acconfig.h'. * autoheader.sh: No longer try to select the needed paragraphs of `acconfig.h', just dump everything into `config.h.in'. Implement support for `--warnings'. Warn the users that these auxiliary files are obsolete when `-W obsolete'. * doc/autoconf.texi (Invoking autoheader): Adjust. 2000-05-03 Akim Demaille <akim@epita.fr> Support of acconfig.h was broken. Fix and test. Reported by Jim Meyering. * autoheader.sh: Trace AC_DEFINE and AC_DEFINE_UNQUOTED to build the list of $syms which are defined. * tests/tools.m4 (autoheader): New test. 2000-05-03 Akim Demaille <akim@epita.fr> Rename the language FORTRAN77 as Fortran 77. * aclang.m4 (AC_LANG(FORTRAN77), AC_LANG_SOURCE(FORTRAN77), AC_LANG_PROGRAM(FORTRAN77), AC_LANG_CALL(FORTRAN77)): Rename as... (AC_LANG(Fortran 77), AC_LANG_SOURCE(Fortran 77), AC_LANG_PROGRAM(Fortran 77), AC_LANG_CALL(Fortran 77)): This. (AC_LANG_FORTRAN77): Adjust. 2000-05-03 Akim Demaille <akim@epita.fr> Provide a macro to canonicalize a configuration name. Suggested by Ralf Corsepius. * acgeneral.m4 (AC_CANONICALIZE): New macro. (_AC_CANONICAL_THING): Use it. Change the defaults for build, host, and target systems: build defaults to `config.guess`. host defaults to $build. target defaults to $host. Suggested by Mo DeJong, Pavel Roskin, Tom Tromey, Ian Lance Taylor, and many others. * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Set `$build', `$host' and `$target' to nothing instead of NONE. (AC_CANONICAL_SYSTEM): AU_DEFUN'd as `AC_CANONICAL_TARGET'. (_AC_CANONICAL_THING): Use an explicit m4_case to set the defaults depending upon the THING. Implement the default values. (AC_CANONICAL_TARGET): Handle the `AC_ARG_PROGRAM' part `AC_CANONICAL_SYSTEM' used to provide. * doc/autoconf.texi: Adjust. When receiving an explicit argument, consider this is a default for --build, --host and --target (unless set). Some scripts might still depend on this historical syntax. Suggested by Alexandre Oliva. * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Do that. (_AC_CANONICAL_THING): Drop the support of `$nonopt'. Documenting --build, --host and --target when configure does not handle them causes confusion. Suggested by Pavel Roskin. Nevertheless configure must not die on such an `unsupported' option: it does happen that people build an entire tree of packages, some of them expecting `--host' etc. some others not. Stressed by Tom Tromey and Ian Lance Taylor. * acgeneral.m4 (HELP_CANON): New diversion. (_AC_INIT_PARSE_ARGS): Don't document these options. (AC_CANONICAL_BUILD, AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Document your associated option. 2000-04-28 Akim Demaille <akim@epita.fr> Don't double quote in AC_MSG_*. * acgeneral.m4 (_AC_SH_QUOTE): Don't double quote. Escape the double quotes too. (_AC_ECHO_UNQUOTED): Don't double quote :). (_AC_ECHO, _AC_ECHO_N): Quote the call to _AC_SH_QUOTE. The autoheader chain needs to be adjusted. * acgeneral.m4 (AH_VERBATIM): Just pass two arguments to AH_OUTPUT instead of trying to build what `autoheader' needs: let it handle the format by itself. * autoheader.m4: Adjust. s,tmp/config.h,tmp/config.hin. The adjustment revealed that `autoconf --trace' is not robust to single quotes in its argument. * autoconf.sh: Fix this issue. Rename the escape `$*' as `$%'. Implement `$@'. * doc/autoconf.texi: Adjust. 2000-04-28 Akim Demaille <akim@epita.fr> mawk suffers a severe performance loss when using `sub' with a changing value. On the `configure' script of the fileutils: mawk '{ sub (/foo/, foo++) }' -> 14s. mawk '{ if ($0 ~ /foo/) sub (/foo/, foo++) }' -> 0.03s. mawk '{ sub (/foo/, foo) }' -> 0.03s. * autoconf.sh (task script, AWK script): Run `sub (__oline__, oline)' only in the lines that match `__oline__'. Suggested by Paul Eggert. 2000-04-28 Akim Demaille <akim@epita.fr> * autoconf.sh (options handling::-W*): Strip two leading chars, not just one. 2000-04-20 Dave Love <fx@gnu.org> * acspecific.m4 (AC_FUNC_MKTIME): Use AC_SUBST. 2000-04-12 Akim Demaille <akim@epita.fr> Provide a fine grained control over autoconf's warnings. * acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE): New macros. (AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ, AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE. * autoconf.sh: Provide support for `--warnings', `-W'. * doc/autoconf.texi (Invoking autoconf): Adjust. (Reporting Messages): New section. 2000-04-12 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_HELP): Move --srcdir in the first section. Document --help=short and recursive. Split the `Directory' section into `Installation directories' for --prefix and --exec-prefix, and all the others into `Fine tuning of the installation directories'. In the latter, don't repeat `in DIR', the user understands, and it comes out better. Default for --exec-prefix is PREFIX. Reported by Kathryn Hargreaves. Move --host before --build. Fix a test on `$ac_init_help' which was not updated. 2000-04-11 Akim Demaille <akim@epita.fr> Have `make check' succeed with CC=g++. * tests/atspecific.m4 (AT_TEST_MACRO): Don't check `env-after' if the file does not exist, which may happen when a `configure' exits brutally. * tests/semantics.m4 (AC_CHECK_MEMBERS, AC_CHECK_TYPES): ANSI C++ forbids members named like their hosting struct, so don't do it. 2000-04-11 Akim Demaille <akim@epita.fr> * autoscan.pl: Reindent using 2 spaces, not 4. Use `#' to denote Autoconf comments, not `dnl'. Put a few `\' here and there to avoid misfontification and misindentation. Use your base name when reporting errors. (parse_args::usage): Use $0, use the same order as the other executables. (parse_args): Don't dump `--help' on cmd line errors. 2000-04-11 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_PROVIDE_IF): Rename as... (AC_PROVIDE_IFELSE): this. Change all callers. Spread the use of AC_PROVIDE_IFELSE, no macro should know how AC_PROVIDE names its internal variables. 2000-04-11 Akim Demaille <akim@epita.fr> * acgeneral.m4: Simplify all the `foo="$bar"' into `foo=$bar'. * acspecific.m4: Likewise. * aclang.m4: Likewise. 2000-04-11 Akim Demaille <akim@epita.fr> Move obsolete macros' definitions out of the way. * doc/autoconf.texi (Old Macro Names): Rename as... (Old Macros): this. Change the @table enumeration into a list of @defmac. (AC_CHECKING, AC_CHECK_TYPE, AC_COMPILE_CHECK, AC_C_CROSS, AC_DYNIX_SEQ, AC_HAVE_LIBRARY, AC_IRIX_SUN, AC_LINK_FILES, AC_OUTPUT, AC_OUTPUT_COMMANDS, AC_SCO_INTL, AC_VERBOSE, AC_XENIX_DIR): Move their descriptions into here. Kill a few TeX warnings. 2000-04-11 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_MSG_ERROR_UNQUOTED): Remove. (AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED): Output to the log too. (AC_CHECKING, AC_VERBOSE): AU_ define. 2000-04-07 Akim Demaille <akim@epita.fr> * acgeneral.m4: s/1>&/>&/g. (AC_FD_LOG): New macro, replaces... (AC_FD_CC): this. Provide an AU definition. (_AC_ECHO_UNQUOTED, _AC_ECHO_N): Use m4_default. 2000-04-05 Akim Demaille <akim@epita.fr> At the end of `./configure', save the cache values, and the CPP values. * acgeneral.m4 (_AC_CACHE_DUMP): New macro. (AC_CACHE_SAVE, AC_OUTPUT): Use it. (AC_OUTPUT): Dump confdefs.h into config.log. (_AC_INIT_PREPARE::config.log): Name the package being configured if you can. 2000-04-05 Steven G. Johnson <stevenj@alum.mit.edu> Disable caching by default, so as not to cause problems when newbies accidentally use a stale cache file. * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Set cache_file to /dev/null to disable caching by default. (_AC_INIT_HELP): Adjust the --help message. (AC_CACHE_LOAD, AC_CACHE_SAVE): Don't print "loading/updating /dev/null" messages. * autoconf.texi: Note that caching is disabled, how to enable it, and that `./config.cache' is the traditional name of the cache file. * install.texi: Likewise. 2000-04-03 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PARSE_ARGS): If any option waiting for a directory receives a relative path, die (bindir, sbindir, libexecdir, datadir, sysconfdir, sharedstatedir, localstatedir, libdir, includedir, oldincludedir, infodir, mandir, exec_prefix, prefix). Fixes Autoconf 42. 2000-04-03 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Canonicalizing): Officially recognize AC_CANONICAL_TARGET and AC_CANONICAL_BUILD. 2000-04-03 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Writing configure.in): Explain what Autoconf is. Explain how to use the quotation scheme used in Autoconf. (Quoting): Update. Do not advocate changequote. 2000-03-30 Steven G. Johnson <stevenj@alum.mit.edu> Fix F77 name-mangling macros to work with cached values (so they don't break the second time you run configure). * aclang.m4 (AC_F77_NAME_MANGLING): Extract f77_case, f77_underscore from cache variable. (AC_F77_WRAPPERS): Get rid of ac_cv_f77_wrappers, it's useless. Simplify the nested case-esac into a single one. Simplify the documentation strings of CPP symbols. 2000-03-31 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix the accumulation in CONFIG_HEADERS. 2000-03-31 Akim Demaille <akim@epita.fr> * autoheader.sh: Catch up with the `mktemp -d' changes in autoconf.sh. * autoupdate.sh: Likewise. 2000-03-31 Steven G. Johnson <stevenj@alum.mit.edu> * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): bug fix in F77 test program (missing whitespace--F77 requires program statements to start in column 7). 2000-03-29 Akim Demaille <akim@epita.fr> Rewrite the autoheader chain on top of `autoconf --trace'. * autoheader.m4: Dispatch the prototypes next to there AC_ siblings. (AH_TEMPLATE, AH_VERBATIM): Move to... * acgeneral.m4: here. (AH_OUTPUT): New macro. * autoheader.sh: Run `autoconf --trace' instead of `m4 autoheader.m4'. * autoheader.m4: Remove. * Makefile.am: Adjust. * tests/tools.m4 (AH_DEFUN): Remove, no longer makes sense. * tests/actests.m4 (autoheader::AC_TATOOINE): Remove, was used by the test above. 2000-03-29 Akim Demaille <akim@epita.fr> silent.m4 depends upon the current quotation in m4, which changes if `-i' is used or not. * autoconf.sh (trace::silent.m4): Removed. (trace::run_m4_trace): Pass -Derrprint. 2000-03-29 Akim Demaille <akim@epita.fr> Use `mktemp -d' when possible to create securely a tmp work dir. * autoconf.sh: Use it when possible to create the dir $tmp. Stop using variables for tmp files, use their names in $tmp. [install]: Use the new features of autoconf --trace. 2000-03-28 Akim Demaille <akim@epita.fr> Probably all the versions of bash up to 2.04 fail on fnmatch ("/tmp", "[/\\\\]") The backslash must not be last. * acgeneral.m4 (_AC_INIT_HELP, AC_PATH_PROG, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS, _AC_OUTPUT_SUBDIRS): Always make `\\' be the first character in all the `[]' of `case' patterns. 2000-03-27 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_CHECK_TOOL_PREFIX): Rename back as AC_CHECK_TOOL_PREFIX since some packages rely on it. 2000-03-27 Akim Demaille <akim@epita.fr> Move all the language dependent macros into aclang.m4. * aclang.m4: New file. * autoconf.m4: Include it. * autoheader.m4: Likewise. * autoupdate.m4: Likewise. * Makefile.am: Adjust. * test/Makefile.am: Likewise. * acgeneral.m4 (AC_LANG_CASE,AC_LANG_SAVE, _AC_LANG_DISPATCH, AC_LANG, _AC_LANG_CURRENT, AC_LANG_SOURCE, AC_LANG_PROGRAM, AC_LANG_CALL, AC_LANG(C), AC_LANG_SOURCE(C), AC_LANG_PROGRAM(C), AC_LANG_CALL(C), AC_LANG(C++), AC_LANG_SOURCE(C++), AC_LANG_PROGRAM(C++), AC_LANG_CALL(C++), AC_LANG(FORTRAN77), AC_LANG_SOURCE(FORTRAN77), AC_LANG_PROGRAM(FORTRAN77), AC_LANG_CALL(FORTRAN77): Move to... * aclang.m4: here. * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77, AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS, AC_PROG_F77_WORKS, AC_PROG_CC_GNU, AC_PROG_CXX_GNU, AC_PROG_F77_GNU, AC_PROG_CC_G, AC_PROG_CXX_G, AC_PROG_F77_G, AC_PROG_GCC_TRADITIONAL, AC_PROG_CC_C_O, AC_PROG_F77_C_O, AC_PROG_CC_STDC, AC_PROG_CPP, AC_PROG_CXXCPP, AC_REQUIRE_CPP, AC_PROG_LEX, AC_TYPE_MODE_T, 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, AC_F77_LIBRARY_LDFLAGS, AC_F77_NAME_MANGLING, AC_F77_WRAPPERS): Move to... * aclang.m4: here. 2000-03-27 Akim Demaille <akim@epita.fr> * autoconf.sh (trace): Let translate_awk do the whole translation from `$trace' to the m4 program. 2000-03-27 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_PACKAGE): Also define AC_PACKAGE_STRING. Use it here and there. 2000-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de> * acgeneral.m4 (_AC_INIT_HELP, _AC_OUTPUT_SUBDIRS): Fix the DOS absolute path pattern: s/?:[[/\\]]/?:[[/\\]]*/. 2000-03-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_CANONICAL_TARGET, _AC_CANONICAL_BUILD): Rename as (AC_CANONICAL_TARGET, AC_CANONICAL_BUILD), although internal, too much foreign code depends upon them. 2000-03-25 Akim Demaille <akim@epita.fr> * autoconf.sh (translate_awk): `> "/dev/stderr"' is not portable to systems without a real /dev/stderr in the file system or if not using one of the three free awks. Use print message | "cat >&2" ... END { close("cat >&2") } From Aharon Robbins. 2000-03-25 Akim Demaille <akim@epita.fr> * autoheader.sh (checking completeness): Be ready to recognize patterns with a value, and spaces between `#' and the directive, e.g. # define FOO FIXME: Reported by John Fortin. 2000-03-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_RUN_IFELSE): New macro. (AC_TRY_RUN_NATIVE): Remove. (AC_TRY_RUN): Use AC_RUN_IFELSE, not AC_TRY_RUN_NATIVE. 2000-03-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECK_LIB): Ah ah! I recognized you, even masked: you are AC_TRY_LINK_FUNC. Fix quotation. (AC_SEARCH_LIBS): Use AC_SHELL_IFELSE. 2000-03-25 Akim Demaille <akim@epita.fr> * tests/semantics.m4 (AC_TRY_LINK_FUNC, AC_CHECK_LIB): New tests. 2000-03-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_LANG_CALL, AC_LANG_CALL(C), AC_LANG_CALL(C++), AC_LANG_CALL(FORTRAN77)): New macros. (AC_TRY_LINK_FUNC): Use it. (AC_TRY_CPP): Argument was output twice. (AC_COMPILE_IFELSE, AC_LINK_IFELSE): Output $3 only if needed. 2000-03-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_TRY_COMPILER): Use AC_LINK_IFELSE. (AC_TRY_LINK_FUNC, AC_CHECK_LIB, AC_CHECK_FUNC): Don't check that the current language is C++ to output `extern "C"': the CPP condition is enough. 2000-03-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_LINK_IFELSE, AC_COMPILE_IFELSE): New macros. (AC_TRY_LINK, AC_TRY_COMPILE): Use them. (AC_CHECK_MEMBER, AC_COMPILE_CHECK, AC_CHECK_DECL, _AC_CHECK_TYPE_NEW): Adjust. * acspecific.m4 (AC_DECL_YYTEXT, AC_PATH_XTRA): Adjust. 2000-03-23 Steven G. Johnson <stevenj@alum.mit.edu> * acspecific.m4 (AC_F77_NAME_MANGLING): Need to use AC_F77_LIBRARY_LDFLAGS when linking C and Fortran code. 2000-03-23 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_LANG_PROGRAM, AC_LANG_PROGRAM(C), AC_LANG_PROGRAM(C++), AC_LANG_PROGRAM(FORTRAN77)): New macros. (AC_TRY_COMPILE, AC_TRY_LINK): Use them. 2000-03-23 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Support --help={long, short, recursive}. (_AC_INIT_HELP): Propagate --help=recursive to CONFIG_SUBDIRS. Code stolen from... (AC_OUTPUT_SUBDIRS): s/ac_config_dir/ac_subdir/g. 2000-03-23 Lars J. Aas <larsa@sim.no> * libm4.m4 (m4_do): New macro. 2000-03-21 Akim Demaille <akim@epita.fr> Provide a language independent means to generate language specific programs. * acgeneral.m4 (_AC_LANG_DISPATCH): New macro. (AC_LANG): Use it. (AC_LANG_SOURCE, AC_LANG_SOURCE(C), AC_LANG_SOURCE(C++), AC_LANG_SOURCE(FORTRAN77)): New macros. (AC_TRY_COMPILER, AC_EGREP_CPP, AC_TRY_RUN_NATIVE): Use AC_LANG_SOURCE. 2000-03-21 Akim Demaille <akim@epita.fr> Fix a bug: some macros (e.g., AC_REVISION, AC_COPYRIGHT etc.) can be used before AC_INIT, but they do require it. But then, the argument of the explicit AC_INIT call is lost. * acgeneral.m4 (AC_CONFIG_SRCDIR): New macro. (_AC_INIT_SRCDIR): Adjust. (_AC_INIT): Pass your argument to AC_CONFIG_SRCDIR. 2000-03-21 Akim Demaille <akim@epita.fr> * tests/semantics.m4 (AC_PATH_PROG, AC_PATH_PROGS): New tests. 2000-03-21 Akim Demaille <akim@epita.fr> Start the language support overhaul: Introduce AC_LANG(). * acgeneral.m4 (AC_LANG): Renamed as _AC_LANG_CURRENT. (AC_LANG, AC_LANG(C), AC_LANG(C++), AC_LANG(FORTRAN77)): New macros. (AC_LANG_C, AC_LANG_CPLUSPLUS, AC_LANG_FORTRAN): AU_DEFUN'ed. Adjust all callers. * acspecific.m4 (AC_F77_NAME_MANGLING): Remove the exceeding AC_LANG_RESTORE. * tests/Makefile.am (FILTER_MACROS): Add AC_LANG. 2000-03-21 Akim Demaille <akim@epita.fr> Speed ups. * libm4.m4 (m4_append, m4_list_append): Use m4_define, not define. On my machine the former implementation takes 4mn 40s to run the test suite. Using m4_define leads to 4mn 15s. * acgeneral.m4 (_AC_SUBST): Use AC_EXPAND_ONCE (which uses m4_define, not define). 4mn. (_AC_DIVERT): Don't use m4_case. Starting from those 4mn, if you just move NORMAL* first in m4_case, the test suite is run in 3mn. If instead of using m4, you use an `associative array' plus a wrapper (current implementation), it falls to 2mn. 2000-03-21 Akim Demaille <akim@epita.fr> * tests/tools.m4 (autoconf --trace): New test. 2000-03-21 Akim Demaille <akim@epita.fr> * autoconf.sh (task trace): Pipe the output of the first m4 into the second one, instead of saving to a tmp file, so that we can trace endless configure.in expansion. 2000-03-21 Akim Demaille <akim@epita.fr> Uniform idioms. * acgeneral.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_OUTPUT_LINKS, _AC_OUTPUT_COMMANDS): Prefer for i in : $is; do test $i = : && continue over for i in .. $is; do if test $i != ..; then 2000-03-21 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PREPARE, _AC_INIT_PARSE_ARGS): Move more initializations to... (_AC_INIT_DEFAULTS): here. 2000-03-21 Akim Demaille <akim@epita.fr> Give a means to compute `srcdir' earlier in configure. * acgeneral.m4 (_AC_INIT_SRCDIR): New macro, pulled out from... (_AC_INIT_PREPARE): No longer compute `srcdir'. (_AC_INIT): Use _AC_INIT_SRCDIR. (AC_INIT): Don't forget to pass the argument to _AC_INIT. 2000-03-20 Jim Meyering <meyering@lucent.com> * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Don't test for existence of $ac_xdir. Not only is `test -e' not portable, but the test isn't necessary at all; the following mkdir ends up accomplishing the same goal. Suggestion from Alexandre Oliva. * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT) [setting IFS]: Be careful to use space, tab and new line, in precisely that order. 2000-03-20 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Rename as _AC_OUTPUT_SUBDIRS. No argument, use AC_LIST_SUBDIRS. Adjust callers. 2000-03-20 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Double quote the head of the help snippet. 2000-03-20 Akim Demaille <akim@epita.fr> Give an identity to `configure' scripts. * acgeneral.m4 (AC_PACKAGE): New macro. (_AC_COPYRIGHT_SEPARATOR): Remove. (AC_COPYRIGHT): Adjust. (_AC_INIT_HELP, _AC_INIT_VERSION): Name the package you configure when you want. (_AC_INIT): Adjust. * configure.in (AC_PACKAGE): Add. 2000-03-20 Akim Demaille <akim@epita.fr> * acgeneral.m4: Formatting changes. 2000-03-20 Akim Demaille <akim@epita.fr> Don't rely on RS = "\0" to swallow the whole input as a single record, this is not portable: mawk and nawk understand it as RS = "". gawk understands it as expected. * autoconf.sh (translate_awk::BEGIN): No longer change RS. (translate_awk::body): Move to the END. Instead, accumulate the input in `request'. 2000-03-20 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Testing Values and Files): Be a subsection of `Portable Shell Programming'. (Shell Substitutions, Limitations of Usual Tools): New subsections. 2000-03-17 Akim Demaille <akim@epita.fr> Use a single tool to reformat the raw `configure' script output by m4. Suggested by Paul Eggert. * autoconf.sh: Stop playing with 2 seds and an AWK to finalize `configure', a single AWK program is enough. 2000-03-17 Akim Demaille <akim@epita.fr> In Autoconf 2.13, although AC_OUTPUT_COMMANDS did double quote its arguments, AC_OUTPUT arguments 2 and 3 were not! Currently, AC_OUTPUT over quotes too: stop that. Reported by Martin Buchholz. * doc/autoconf.texi (Output): Don't expand on the ternary AC_OUTPUT. * acgeneral.m4 (AC_OUTPUT): Don't over quote $2 and $3. 2000-03-17 Joseph S. Myers <jsm28@cam.ac.uk> * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Security fixes: create the temp files in a private temporary directory, not directly in TMPDIR. 2000-03-17 Akim Demaille <akim@epita.fr> Install the IFS we need once for all. * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): New macro. Handle the NLS envvars, and IFS. (_AC_INIT_PREPARE): Use it, no longer set the NLS envvars. (_AC_WHICH_A, AC_PATH_PROG): Rely on the default IFS. * acspecific.m4 (AC_PROG_INSTALL, AC_FUNC_SELECT_ARGTYPES): Likewise. 2000-03-17 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP, AC_TRY_COMPILE, AC_TRY_LINK, AC_TRY_RUN_NATIVE): Simplify the removal of the contest files: don't remove them before running the actions, just remove them at the end of the macro. 2000-03-16 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): Use : ${foo='some words'} not : ${foo=some words} since this is not portable: Digital Unix v5.0: `bad substitution'. From Nicolas Joly. 2000-03-16 Lars J. Aas <larsa@sim.no> * libm4.m4 (m4_assert, m4_shiftn): New macros. (m4_case,m4_match): Rewrite to use m4_shiftn (for readability reasons). (m4_for): Add the STEP argument and some argument-verifying asserts. (m4_split): Correct spaces to tabulator in regexp. 2000-03-15 Akim Demaille <akim@epita.fr> Revamp AC_FUNC_SELECT_ARGTYPES. * acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): Use a single cache variable instead of three. Use AC_CACHE_CHECK. Shorten the name of the var loops, they are no longer cached. Include sys/types.h unconditionally. `select' returns an int, fixes Autoconf/46. Don't display parens in the user messages. 2000-03-14 Akim Demaille <akim@epita.fr> * autoheader.sh: Use run_m4f, not run_m4. 2000-03-14 John David Anglin <dave@hiauly1.hia.nrc.ca> * tests/actest.m4 (AC_ENV_SAVE): Don't consider RANDOM and LINENO which some shells update. At least ksh on HP-UX 10.20 and sh on IRIX 6.5 do change their `RANDOM' even if `read' via `set'. 2000-03-14 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): No use for @%:@ here, no need to over quote $1 in the comments. 2000-03-14 Akim Demaille <akim@epita.fr> * acgeneral.m4: Replace some ifelse with ifval or m4_default, or even nothing when not needed. * acspecific.m4: Likewise. 2000-03-14 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PREPARE): Insert the Autoconf version in config.log, and the command line which ran configure. Kill a couple of useless quote around dollars. 2000-03-14 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PREPARE): Kill a changequote in the building of `ac_configure_args'. 2000-03-14 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_DIVERT): Rename _AC_DIVERT. (AC_DIVERT): New macro. Spread its use where better than a pair of AC_DIVERT_PUSH/POP. 2000-03-14 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_BINSH): Remove, useless now that... (AC_REVISION): Require AC_INIT, not _AC_INIT_BINSH. (AC_INIT): Do what _AC_INIT_BINSH used to. Don't require _AC_INIT_VERSION, just call it. Rename as _AC_INIT. (AC_INIT): New macro, single expansion wrapper around _AC_INIT. (_AC_COPYRIGHT_SEPARATOR): New. (AC_COPYRIGHT): Use it. Require AC_INIT, not _AC_INIT_VERSION. * doc/autoconf.texi (Versions): Promote as first section of `Setup'. Rename as `Notices'. Document AC_COPYRIGHT. Don't give false reasons for placing AC_REVISION before AC_INIT, the place no longer matters. 2000-03-14 Akim Demaille <akim@epita.fr> * autoconf.sh (trace_m4::smash): Double quote, we don't want the result to be evaluated. 2000-03-14 Akim Demaille <akim@epita.fr> * acgeneral.m4: s/@%:@line __oline__/#line __oline__/g. __oline__ is not a macro, so there is just no use in avoiding `#'. 2000-03-14 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): When there were no CONFIG_FILES, we had to expand _AC_OUTPUT_FILES into the KILL diversion, because it is AC_OUTPUT_FILES which undiverted the AC_SUBST sed script at its proper place, otherwise it would have been undiverted at the end of `configure', leading to an sh syntax error. Now that we no longer use a diversion, we don't need to call AC_OUTPUT_FILES if useless. (AC_OUTPUT_FILES): Rename as _AC_OUTPUT_FILES. (AC_OUTPUT_LINKS): Rename as _AC_OUTPUT_LINKS. 2000-03-14 Akim Demaille <akim@epita.fr> AC_ARG_PROGRAM must not be expanded twice, which is likely since Automake calls it, and usually users do too. If it happens, `--program-prefix=g' actually prepend two (or more) `g'. * acgeneral.m4 (AC_DEFUN_ONCE): New macro. (AC_ARG_PROGRAM): AC_DEFUNed_ONCE. Or is it AC_DEFUN_ONCE'd? :). No longer AC_EXPAND_ONCE the help string, the macro itself is expanded at most once. Rename the here-doc tag EOF_SED as EOF. 2000-03-14 Akim Demaille <akim@epita.fr> Get rid of the ICMDS diversion. * acgeneral.m4 (AC_DIVERT): Remove ICMDS. (_AC_OUTPUT_COMMANDS_INIT): New growing string. (_AC_CONFIG_COMMANDS_INIT, _AC_OUTPUT_CONFIG_STATUS): Adjust. 2000-03-14 Akim Demaille <akim@epita.fr> Introduce AC_SUBST(VAR, VAL). * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Stop global double quoting, failed experiment. Merge all the var=val AC_SUBST(var) into AC_SUBST(var, val). (AC_SUBST): Implement support for 2nd arg. * doc/autoconf.texi (Setting Output Variables): Adjust. 2000-03-13 Akim Demaille <akim@epita.fr> Simplify the diversions naming system. Suggested by Alexandre Oliva and Lars J. Aas * libm4.m4 (ifndef): New macro. * acgeneral.m4 (AC_DIVERT): New macro, maps a diversion name to its value. The diversions now have a short name, e.g., `NOTICE', instead of the former macros which had long names, e.g., `AC_DIVERSION_NOTICE'. (AC_DIVERT_PUSH): Adjust. (AC_DIVERT_POP): Use ifndef. (AC_DIVERSION_CURRENT): Rename as `AC_DIVERT_DIVERSION' to stay within the `AC_DIVERT' name domain. Adjust all callers. * acspecific.m4: Adjust all callers. 2000-03-13 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Invoking autoconf): Update documentation of `autoconf --trace'. 2000-03-13 Akim Demaille <akim@epita.fr> * autoconf.sh (tmpbase): New var. Adjust trap code and other tmp file names. (translate_awk::BEGIN): Set RS to "\0" so that the whole file be a single record. (translate_awk::trans): Convert from array to function. (translate_awk::error): New function. (translate_awk::main action): Implement support for ${sep}@ and ${sep}*. Use trans() and error(). (translate_awk): Don't put space before user functions call, it is not portable. Remove trailing `;', this is not C :). (task trace): Quote `$traces' when you eval it, to protect the white spaces. Propagate `translate_awk' failures to `autoconf.sh'. Translate the quadrigraphs. 2000-03-13 Akim Demaille <akim@epita.fr> Trap on 0 is not executed when `exit' is called without argument. * autoheader.sh (trap 1 2 13 15): s/exit/exit $?/. * autoconf.sh: Likewise. Remove translate_awk too. * autoupdate.sh: Likewise. Handle `--debug'. 2000-03-13 Akim Demaille <akim@epita.fr> More uniform style in scripts. * autoheader.sh: s/-eq/=/. Uniform ordering of variable initializations, option handling. Don't use quotes where useless (foo=$1, not foo="$1"). Propagate `run_m4' and `run_m4f'. Use `$0' in --help. * autoconf.sh: Likewise. * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * ifnames.sh: Likewise. * autoupdate.m4: Small bug: at the end `dnl' is disabled, so use `m4_dnl'. 2000-03-13 Akim Demaille <akim@epita.fr> `autoconf --trace': faster. * autoconf.sh (initialization): New var, new option. (option loop): When you need an arg, make sure there is one. (run_m4f): New var, which content is that of the former... (run_m4): Don't use m4 frozen state files. Change all callers. Don't pass AC_LOCALDIR, not documented, and unused. (task trace): Honor `--verbose' and `--initialization'. (globally): Send `--verbose' messages in stderr. Fix random typos. 2000-03-13 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_PROG_BINSH): Removed. 2000-03-13 Akim Demaille <akim@epita.fr> Start revamping `autoconf --trace'. * autoconf.sh (debug): New var, new option. Adjust the trap code. (task trace): Instead of decoding `m4 --trace' with sed, decode it with m4 itself. ($silent_m4): New file, which disables m4's `errprint'. ($trace_m4): New file. Logistic for the m4 which is in charge of decoding the traces of the first. ($translate_awk): Transform a user trace request into $trace_m4 code. 2000-03-10 Akim Demaille <akim@epita.fr> Multiple `-e' to egrep are not portable. On IRIX 6.5 and Solaris 2.5.1 only the last one is honored: > printf "foo\nbar\n" | egrep -e 'foo' -e 'bar' bar > printf "foo\nbar\n" | egrep -e 'bar' -e 'foo' foo Reported by Nicolas Joly. An alternative would have been to use `sed', unfortunately alternation is not portable. * tests/actest.m4 (join): New macro. (AC_ENV_SAVE): Join the egrep patterns into a single big one. * tests/Makefile.am (EGREP_EXCLUDE): Rename as FILTER_MACROS. Join the egrep patterns into a single big one. 2000-03-10 Jim Meyering <meyering@lucent.com> * acgeneral.m4 (_AC_CHECK_TOOL_PREFIX): Correct typos in definition: add `_' prefix to make the function name match comments and existing uses. Remove leading prefix from _AC_CANONICAL_HOST. 2000-03-09 Ossama Othman <ossama@debian.org> * acspecific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Added some missing headers if they exist (needed for some missing prototypes) and corrects the signal handler prototype/definition. The signal handler prototype is now prepended with an `extern "C"' for C++ compilers since some platforms explicitly require an `extern "C"' signal handler. 2000-03-08 Akim Demaille <akim@epita.fr> * autoheader.m4 (autoheader::AC_CHECK_HEADERS_DIRENT): Rename as (autoheader::_AC_CHECK_HEADERS_DIRENT): to cope with the new name of the autoconf:: macro. Fixes autoconf/119, reported by Raja R Harinath. 2000-03-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_PATH_PROG, AC_OUTPUT_FILES, AC_OUTPUT_SUBDIRS): Fix quotation problems in DOS path handling. 2000-03-08 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * acspecific.m4 (AC_FUNC_MMAP, AC_FUNC_ALLOCA): Make them C++ safe: include the right headers, cast the allocations etc. 2000-03-08 Akim Demaille <akim@epita.fr> The argument of AC_COPYRIGHT should be plain text, not an sh comment. * libm4.m4 (m4_quote): s/$@/$*/. * acgeneral.m4 (AC_COPYRIGHT): Prepend `# ' to the lines that go on the top of `configure'. Actually, prepend `@%:@ ' so that there are as many evaluations on both sides. (_AC_INIT_VERSION): No longer strip `# '. 2000-03-08 Akim Demaille <akim@epita.fr> * tests/Makefile.am (all-local): Remove. It wastes time to have testsuite rebuilt each time an ac*.m4 file changes. It is enough to build it for each `make check'. 2000-03-08 Akim Demaille <akim@epita.fr> Leave a diversion exclusively for Copyright notices. * acgeneral.m4 (AC_DIVERSION_DEFAULTS): New diversion number. (_AC_INIT_NOTICE): Move definition of `ac_includes_default' from here... (_AC_INIT_PREPARE): to here. (_AC_INIT_NOTICE): Play with your diversion yourself, don't let (AC_INIT): do it for you. (_AC_INIT_DEFAULTS): New macro. (AC_INIT): Use it. 2000-03-08 Akim Demaille <akim@epita.fr> Provide a means to specify more Copyright information in `configure'. And after all, it suits to `configure --version' too. * acgeneral.m4 (AC_DIVERSION_DEFAULTS, AC_DIVERSION_INIT_PREPARE): New diversion numbers. (AC_DIVERSION_INIT): Rename as... (AC_DIVERSION_INIT_PARSE_ARGS): this. (AC_DIVERT_POP): Instead of going into wild endless loops when there are more pops than pushes, die with dignity. (AC_COPYRIGHT): New macro. (_AC_INIT_NOTICE): Move definition of `ac_includes_default' from here... (_AC_INIT_PREPARE): to here. (_AC_INIT_NOTICE): Remove. (AC_INIT): Use it to install Autoconf's Copyright. (_AC_INIT_DEFAULTS): New macro. (AC_INIT): Use it. (AC_PREFIX_DEFAULTS): Dump in AC_DIVERSION_DEFAULTS. (_AC_INIT_PARSE_ARGS): Dump in AC_DIVERSION_INIT_PREPARE. 2000-03-08 Akim Demaille <akim@epita.fr> We don't need _AC_ARG_*_HELP_PROLOGUE. * acgeneral.m4 (AC_EXPAND_ONCE): AC_PROVIDE yourself, in case there is no AC_DEFUN associated with the text to expand. (_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE, _AC_ARG_VAR_HELP_PROLOGUE): Remove, instead... (AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): do it yourself. 2000-03-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Fix copy n' paste typos in `--with-*', `--without-*' and `*' decoding. Reported by Raja R Harinath. Fixes autoconf/118. 2000-03-08 Akim Demaille <akim@epita.fr> Don't dump AC_ARG_PROGRAM help messages if not used. * acgeneral.m4 (_AC_INIT_HELP): Don't. (AC_ARG_PROGRAM): Do. 2000-03-08 Akim Demaille <akim@epita.fr> Don't dump X help messages when `configure' does not check for X. * acgeneral.m4 (_AC_INIT_HELP): Don't dump X help messages. * acspecific.m4 (AC_PATH_X): Do it. 2000-03-08 Akim Demaille <akim@epita.fr> No longer rely on /bin/sh to compose the optional parts of `configure --help'. * acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE, AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR, AC_DIVERSION_HELP_END): New diversion numbers. (AC_EXPAND_ONCE): New macro. (AC_PROVIDE_IF): New macro. (AC_BEFORE, AC_REQUIRE): Use it. (AC_REQUIRE): Don't use indir. (_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE, _AC_ARG_VAR_HELP_PROLOGUE): New macros. (AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the _HELP_PROLOGUE macro which corresponds. (_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and AC_DIVERSION_HELP_END. (_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled the optional help strings. 2000-03-08 Akim Demaille <akim@epita.fr> AC_OUTPUT_COMMANDS no longer uses a diversion. * acgeneral.m4 (AC_DIVERSION_CMDS): Removed. (_AC_OUTPUT_CONFIG_STATUS): Don't undivert it. 2000-03-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Fix quoted/non quoted here document problems. 2000-03-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INIT_BINSH, AC_INIT_NOTICE, AC_INIT_PREPARE): Rename as... (_AC_INIT_BINSH, _AC_INIT_NOTICE, _AC_INIT_PREPARE): this. All callers adjusted. 2000-03-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INIT_PARSE_ARGS): Rename as... (_AC_INIT_PARSE_ARGS): this. Move the display of help and version strings to... (_AC_INIT_HELP, _AC_INIT_VERSION): here. (AC_INIT): Adjust. Also, fix quotation. 2000-03-08 Akim Demaille <akim@epita.fr> Some tests are failing with srcdir != builddir, because they can't find config.guess, install-sh etc. Reported by Erez Zadok. * tests/atspecific.m4 (AT_TEST_MACRO): Set AC_CONFIG_AUX_DIR to top_srcdir in configure.in, and pass the value of top_srcdir to configure. 2000-03-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH, AC_PATH_PROG, AC_PATH_PROGS, AC_PATH_TOOL, AC_CHECK_TOOL, AC_PREFIX_PROGRAM, AC_EGREP_CPP, AC_TRY_LINK, AC_COMPILE_CHECK, AC_TRY_RUN_NATIVE): Use ifval instead of ifelse. 2000-03-07 Mark Elbrecht <snowball3@bigfoot.com> Support absolute DOS-style paths. Any character before the colon is accepted because network drives can be assigned characters outside the [a-zA-Z] range. DOS-style relative paths (?:foo/bar) are also considered absolute for Autoconf's purposes since the path '../?:foo/bar' is invalid. * acgeneral.m4 (AC_OUTPUT_FILES): Treat DOS-style paths (?:*') as absolute. (AC_OUTPUT_SUBDIRS): Likewise. (AC_PATH_PROG): Make pattern for matching DOS-style paths the same as that used in AC_OUTPUT_FILES and AC_OUTPUT_SUBDIRS. 2000-03-06 Akim Demaille <akim@epita.fr> * tests/atspecific.m4 (m4_match): Remove, no longer used. 2000-03-04 Jim Meyering <meyering@lucent.com> * autoheader.sh: Use `rm -f', not just `rm' when removing temporaries. Preserve exit status in trap handler. Based on suggestions from Paul Eggert. 2000-03-03 Paul Eggert <eggert@twinsun.com> Move the quadrigraphs out of the user name space. * acgeneral.m4: 's/\@BKL@/@<:@/g', 's/\@BKR@/\@:>@/g', 's/\@DLR@/\@S|@/g', 's/\@PND@/@%:@/g'. * acspecific.m4: Likewise. * autoconf.sh: Likewise. 2000-03-03 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_WHICH_A): New macro. (AC_CHECK_PROG): Use it. Use ifval. (AC_CHECK_PROGS): Use ifval. Fix the quoting. * tests/semantics.m4: Test AC_CHECK_PROG. * tests/Makefile.am (EGREP_EXCLUDE): Add /AC_CHECK_PROGS?/. 2000-03-02 Russ Allbery <rra@stanford.edu> * autoscan.pl (parse_args): Add support for -m <macrodir>. 2000-03-02 Akim Demaille <akim@epita.fr> The whole family supports -V = --version. * acgeneral.m4 (AC_INIT_PARSE_ARGS): Report and support -V. * autoconf.sh: Likewise. * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * autoheader.sh: Likewise. * autoscan.pl: Likewise. * ifnames.sh: Likewise. In addition, don't dump --help on invalid options. * doc/autoconf.texi: Adjusted. * doc/install.texi: Likewise. 2000-03-02 Lars J. Aas <larsa@sim.no> * libm4.m4 (m4_noquote): New macro. 2000-03-02 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_PATH_X_DIRECT): Moved all the shell variable into the ac_ name space. Reported by Nicolas Joly. 2000-03-02 Akim Demaille <akim@epita.fr> * acspecific.m4: Move some macros to a better place. 2000-03-02 Akim Demaille <akim@epita.fr> Internal macros are named `_AC_'. * acgeneral.m4 (AC_CANONICAL_TARGET, AC_CANONICAL_BUILD, AC_CANONICAL_THING, AC_CHECK_TOOL_PREFIX, AC_CONFIG_UNIQUE): Prepend `_' to their names. * acspecific.m4 (AC_CHECK_HEADER_DIRENT, AC_CHECK_HEADERS_DIRENT, AC_PATH_X_XMKMF, AC_PATH_X_DIRECT): Prepend `_' to their names. * doc/autoconf.texi (Macro Names): Adjusted. 2000-03-02 Akim Demaille <akim@epita.fr> * acgeneral.m4: Formatting changes. * acspecific.m4: Likewise. 2000-03-01 Akim Demaille <akim@epita.fr> The empty regexp cannot be portably used in egrep's alternation. For instance with Digital Unix v5.0: > echo "foo" | egrep -e "^(|foo|bar)$" > echo "|foo" | egrep -e "^(|foo|bar)$" |foo > echo "|bar" | egrep -e "^(|foo|bar)$" > echo "bar" | egrep -e "^(|foo|bar)$" bar > echo "bar" | egrep '^(foo|bar|)$' > echo "bar|" | egrep '^(foo|bar|)$' bar| > echo "bar" | egrep '^(foo||bar)$' > echo "|bar" | egrep '^(foo||bar)$' |bar > echo "foo" | egrep '^(foo||bar)$' foo > echo "foo|" | egrep '^(foo||bar)$' > Reported by Nicolas Joly. * src/actest.m4 (AC_ENV_SAVE): s/(|EXTRA_|PRE_)/(EXTRA_|PRE_)?/. 2000-03-01 Akim Demaille <akim@epita.fr> * acspecific.m4: Removed a few addresses, the map is... * THANKS: here. 2000-03-01 Lars Hecking <lhecking@nmrc.ucc.ie> * acspecific.m4 (AC_PATH_XTRA): On LynxOS 3.0.1/i386, gethostbyname(), getservbyname(), and inet_addr() are in -lbsd. 2000-03-01 Akim Demaille <akim@epita.fr> * tests/actest.m4 (AC_ENV_SAVE): Use multiple -e instead of multiple egrep. 2000-03-01 Akim Demaille <akim@epita.fr> * config.guess: Updated from master repository. * config.sub: Likewise. 2000-03-01 Akim Demaille <akim@epita.fr> Test suite: instead of using a full list of the AC macros and an AT macro with selects which are the AC macros to test, just produce the list of the AC macros we want to test. * tests/atspecific.m4 (TEST_MACRO): Removed. * tests/Makefile.am (EGREP_EXCLUDE): New variable, performing the selection TEST_MACRO used to do. (macros.m4): Use it. Use AT_TEST_MACRO, not TEST_MACRO. Check also AU macros. 2000-03-01 Akim Demaille <akim@epita.fr> * doc/autoconf.texi: Tune the use of quotes, add missing @noindents, remove dead FIXME:s, promote #if ! over #ifndef, simplify duplicated text. 2000-03-01 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Configuration Commands): Document AC_CONFIG_COMMANDS_PRE and _POST. 2000-02-29 Akim Demaille <akim@epita.fr> Test suite: more debugging information. * tests/atspecific.m4 (AT_TEST_MACRO): When verbose, report the content of config.log. 2000-02-29 Akim Demaille <akim@epita.fr> * Makefile.am (MAKEINFO): Removed. (INSTALL.txt): Call $(MAKEINFO) with --no-split. Reported by Nicolas Joly. 2000-02-28 Akim Demaille <akim@epita.fr> * doc/Makefile.am (MAKEINFO): s/makeinfo/@MAKEINFO@/. * missing: chmod +x. 2000-02-28 Akim Demaille <akim@epita.fr> * tests/Makefile.am (testsuite): Use $(M4), not m4. From Patrick Tullmann. 2000-02-25 Akim Demaille <akim@epita.fr> * src/acgeneral.texi (AC_INIT_NOTICE): Include inttypes.h in the ac_includes_default. * doc/autoconf.texi (Default Includes): Adjust. 2000-02-25 Akim Demaille <akim@epita.fr> Export the knowledge on disabling echo's trailing new line. * acspecific.m4 (AC_PROG_ECHO_N): Rename as... (_AC_PROG_ECHO): this. Set ECHO_N, ECHO_C, ECHO_T instead of ac_n, ac_c and ac_t. All dependencies changed. * doc/autoconf.texi (Preset Output Variables): Document ECHO_C, ECHO_N and ECHO_T. * m4/atconfig.m4 (fp_PROG_ECHO): Removed. (AT_CONFIG): Don't use it. 2000-02-24 Akim Demaille <akim@epita.fr> * autoconf.sh (AC_ACLOCALDIR): Use `(aclocal) 2>/dev/null`, not `aclocal 2>/dev/null` if you want no complaints for missing aclocal. From Nicolas Joly. 2000-02-22 Pavel Roskin <pavel_roskin@geocities.com> * configure.in (HELP2MAN): Specify the third argument of AM_MISSING_PROG. Fixes autoconf/116. 2000-02-21 Akim Demaille <akim@epita.fr> * tests/tools.m4 (syntax.sh): The logic of the previous patch was twisted. Fix it so that it performs what claims the entry below. From Nicolas Joly. 2000-02-21 Akim Demaille <akim@epita.fr> * tests/tools.m4 (syntax.sh): Exit 1 if you managed to kill the child, since it means `/bin/sh -n' went loopy. 2000-02-18 Akim Demaille <akim@epita.fr> Some `diff' refuse to diff with /dev/null, such as Tru64's. Reported by Nicolas Joly. * tests/atgeneral.m4 (empty): New dummy file. Changed various `diff /dev/null' as `diff empty'. 2000-02-18 Akim Demaille <akim@epita.fr> * tests/atspecific.m4 (TEST_MACRO): Don't run AC_PATH_TOOL and AC_PATH_PROG. 2000-02-18 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4 (at_diff): Don't use `cmp -s', on DOS it differentiate between Unix and DOS EOL. `diff' does not. Reported by Eli Zaretski. Also, be ready to use a diff that does not support `-u'. 2000-02-18 Akim Demaille <akim@epita.fr> * tests/tools.m4 (Syntax of the scripts): Be robust to shells that never return on some `/bin/sh -n foo.sh'. Reported by Nicolas Joly. 2000-02-17 Akim Demaille <akim@epita.fr> Move the documentation into doc/. Some CVS tricks were used so that history is kept in both the top directory, and in doc/. * doc/Makefile.am: New file. * Makefile.am: Adjusted. * configure.in: Adjusted. * autoconf.texi: Moved from here to... * doc/autoconf.texi: here. * make-stdts.texi: Likewise. * install.texi: Likewise. * texinfo.tex: Likewise. 2000-02-17 Akim Demaille <akim@epita.fr> * tests/actest.m4 (AC_ENV_SAVE): Added ALLOCA. 2000-02-17 Akim Demaille <akim@epita.fr> * tests/semantics.m4 (AC_CHECK_TYPES): `addr, addr' is not portable sed: use `addr,addr'. 2000-02-17 Akim Demaille <akim@epita.fr> Fix the `missing dummy.in' reported by the test suite. Reported by Erez Zadok. * tests/torture.m4 (config.status under extreme conditions): Reorganized. Because files required by this test were created outside the pair AT_SETUP/AT_CLEANUP, when the test fails and autotest extracts this test, the `debug' script does not contain the files it needs. Now AT_SETUP/AT_CLEANUP encloses the full auto contained section. 2000-02-16 Akim Demaille <akim@epita.fr> * tests/actest.m4 (AC_ENV_SAVE): X_EXTRA_LIBS can be changed by AC_PATH_EXTRA. Reported by Erez Zadok. 2000-02-15 Akim Demaille <akim@epita.fr> Define HAVE_DECL_FOO both to 1 if found and 0 otherwise. * acgeneral.m4 (AC_CHECK_DECLS): Define HAVE_DECL_FOO to 1 instead of NEED_FOO_DECL if found. Define to 0 if not found. * autoheader.m4 (AC_CHECK_DECLS): Template HAVE_DECL_FOO. * tests/semantics.m4 (AC_CHECK_DECLS): Adjusted. * doc/autoconf.texi (Generic Declarations): Adjusted. 2000-02-15 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Generic Structures): s/AC_FATAL/AC_MSG_ERROR. 2000-02-15 Akim Demaille <akim@epita.fr> autoreconf had a silly syntax error, test it and fix it. Reported by Franc,ois Pinard and Rainer Orth. * autoreconf.sh: Removed spurious `;;'. Formatting changes. * tests/tools.m4 (Syntax of the scripts): Run `sh -n' on all the shell scripts. 2000-02-15 Akim Demaille <akim@epita.fr> * autoconf.sh (options handling): --v* of --version was shadowing --verbose. 2000-02-11 Akim Demaille <akim@epita.fr> * tests/torture.m4: Nuke the trailing space in defs. 2000-02-11 Akim Demaille <akim@epita.fr> * tests/atspecific.m4: Really added to the CVS repository. 2000-02-11 Akim Demaille <akim@epita.fr> Don't use `cat -s' to single out new-lines, it is not portable. Also remove trailing blanks. * tests/Makefile.am (testsuite): Use sed instead of cat. * tests/torture.m4: No longer check for a trailing space. * autoconf.sh: Likewise. 2000-02-10 Akim Demaille <akim@epita.fr> * tests/actest.m4 (AC_ENV_SAVE): OpenBSD-2.3's /bin/sh defines an envvar SECONDS which does change with time. KMEM_GROUP is set by AC_FUNC_GETLOADAVG. Reported by Volker Borchert. 2000-02-10 Akim Demaille <akim@epita.fr> * tests/Makefile.am (macros.m4): Better regex to build `macro'. Depend upon acgeneral.m4. 2000-02-10 Akim Demaille <akim@epita.fr> * autoheader.sh: Remove the duplicate trap code. 2000-02-10 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT): When dispatching your arguments, use ifval, not ifset! Dispatch actions to AC_CONFIG_COMMANDS not AC_OUTPUT_COMMANDS, to avoid unneeded warnings for obsolete use of AC_OUTPUT_COMMANDS. 2000-02-10 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_VERBOSE): This is a tab, not spaces. 2000-02-10 Akim Demaille <akim@epita.fr> Changequote busters II. They're back to save the world. * acspecific.m4 (AC_PROG_CC_C_O, AC_PROG_F77_C_O, AC_PROG_MAKE_SET, AC_TYPE_GETGROUPS, AC_FUNC_GETLOADAVG, AC_FUNC_MKTIME, AC_STRUCT_TIMEZONE, AC_F77_LIBRARY_LDFLAGS): Blast that jelly o' changequote. Set the quotes free. 2000-02-10 Akim Demaille <akim@epita.fr> Interrupting autoheader left temp files. From Jim Meyering. * autoheader.sh (usage): The usage is to use $0 here. (ah_base): Be in TMPDIR. Install the `trap' before creating the first tmp file. Also trap on 0. 2000-02-10 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): This is a routine of `configure', not `config.status', hence use `conftest' for tmp files, not `$ac_cs_root'. Removed forgotten developer comment. Double quoting the whole body is nicer than just the part that needs to be. 2000-02-10 Akim Demaille <akim@epita.fr> * tests/torture.m4: Also check the value of @DEFS@ when no CONFIG_HEADER is used. 2000-02-10 Akim Demaille <akim@epita.fr> Changequote-busters! From Dan Ackroyd. * acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE, AC_CACHE_SAVE, AC_PREFIX_PROGRAM, AC_OUTPUT, _AC_OUTPUT_CONFIG_STATUS, AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS, AC_OUTPUT_SUBDIRS): Quit playing with changequotes, @BKL@ and Co.! Just quote properly. 2000-02-10 Akim Demaille <akim@epita.fr> Honor properly the `#define' config.h.in templates. Test it. * acgeneral.m4 (AC_OUTPUT_HEADERS): Rename as... (_AC_OUTPUT_HEADERS): this. All callers changed. Don't mess with changequote, just quote properly. Bug 1. Because of the `#' in `ac_dA', the quotes <<>> were not removed, and therefore the sed script contained `<<define>>' instead of `define'. Now that the block is properly quoted, there is no need to quote `define'. Bug 2. Once a `#define' substitution performed, we were branching to the top of the sed script (`t top'). This resulted in an endless substitution of `#define foo 1' to `#define foo 1'. Branching is not enough: you also have to fetch the next input line, i.e., use `t' instead of `t t' in ac_dD, and don't output `: top' in `config.defines'. Though it was correct for `#undef' templates, just apply the same transformation to `ac_uD' and `config.undefs'. Bug 3. Don't try to preserve what was behind the value in the template, since on #define NAME "bar baz" it leads to #define NAME 1 baz" Now `ac_dB' catches everything behind the NAME (making sure there is at least a space) and `ac_dC' only outputs a space. * tests/torture.m4: Check that various forms of `#define' header templates are properly handled. 2000-02-10 Akim Demaille <akim@epita.fr> Avoid calling `rm' without arguments. * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): It is smarter to use a quoted here doc to output the section providing defaults for CONFIG_*. Don't rm the CONFIG_FILES here but in.. (AC_OUTPUT_FILES) [test -n "$CONFIG_FILES"]: here. Hm, actually, no, just don't remove them at all, let the newly created files replace the old ones, exactly as in AC_OUTPUT_HEADERS. From Graham Jenkins. 2000-02-10 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_LIST_MEMBER_OF): s/ac_$exists/$ac_exists/! 2000-02-10 Akim Demaille <akim@epita.fr> * acgeneral.m4: Formatting changes. * acspecific.m4: Likewise. 2000-02-10 Akim Demaille <akim@epita.fr> * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Don't : ${FOO="$foo"} but : ${FOO=$foo} Since Ultrix will also assign the quotes to FOO. Reported by Harlan Stenn. 2000-02-10 Akim Demaille <akim@epita.fr> Keep `AC_CHECK_TYPE' backward compatibility and provide a proper `AC_CHECK_TYPE', Based on ideas from Paul Eggert and Alexandre Oliva. * acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Rename as... (_AC_CHECK_TYPE_NEW): this. (AC_CHECK_TYPES): Adjusted. (AC_CHECK_TYPE): Rename as... (_AC_CHECK_TYPE_OLD): This. Adjusted to _AC_CHECK_TYPE_NEW. No longer support extra includes, stick to 2.13's interface. (_AC_CHECK_TYPE_BUILTIN_P): New macro. (AC_CHECK_TYPE): New macro. * autoheader.m4 (autoheader::AC_CHECK_TYPE): Rename as... (autoheader::_AC_CHECK_TYPE_OLD): this. * tests/atspecific.m4 (TEST_MACRO): Skip /^_AC_/ macros. * tests/semantics.m4: Test the choices of AC_CHECK_TYPE (wrt _NEW or _OLD implementation). * doc/autoconf.texi (Generic Types): Reorganized. Explain everything about AC_CHECK_TYPE and Co. 2000-02-10 Akim Demaille <akim@epita.fr> * libm4.m4 (near m4_split): Remove the buggy additional changequote. Quote properly `m4_split' when registering it. 2000-02-10 Akim Demaille <akim@epita.fr> The AU-glue code for AC_LINK_FILES was not fully compatible: in AC_LINK_FILES($from, $to) `$from' and `$to' can be lists, hence `AC_CONFIG_LINKS($to:$from)' is wrong. Reported by H.J. Lu. * acgeneral.m4 (AC_LINK_FILES): Replace the m4-glue code from AC_LINK_FILES to AC_CONFIG_LINKS, with sh-glue code. Give a detailed update message. (_AC_LINK_FILES_CNT): New variable. Initialize. * tests/tools.m4 (autoupdate): No longer exercise `autoupdate' with AC_LINK_FILES. 2000-02-10 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_PROG_SED): Removed. 2000-02-10 Akim Demaille <akim@epita.fr> AC_CHECK_FILES has never worked properly. * acgeneral.m4 (AC_CHECK_FILE): Use AC_CACHE_CHECK. * autoheader.m4 (AC_CHECK_FILES): AH-define. * tests/semantics.m4: Test AC_CHECK_FILES. * tests/atspecific.m4 (TEST_MACRO): Don't. 2000-02-10 Akim Demaille <akim@epita.fr> No longer use a diversion to store the sed program implementing AC_SUBST. * acgeneral.m4 (_AC_SUBST): New macro. (_AC_SUBST_SED_PROGRAM): Initialize. (AC_SUBST): Use _AC_SUBST. (AC_SUBST_FILE): Likewise. (AC_DIVERSION_SED): Removed. Renumber the AC_DIVERSIONs. (AC_OUTPUT_FILES): Instead on undiverting AC_DIVERSION_SED, output _AC_SUBST_SED_PROGRAM. 2000-02-10 Akim Demaille <akim@epita.fr> Standardize the error messages in the options handling of `configure' and `config.status'. * acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): Rename as... (_AC_OUTPUT_CONFIG_STATUS): this. Change the error messages from value: invalid feature name to invalid feature: value Invite the user to try --help for invalid options. (AC_INIT_PARSE_ARGS): Likewise. 2000-02-10 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT_COMMANDS_COMMANDS): Rename as... (_AC_OUTPUT_COMMANDS): This. All callers changed. Disable the verbose message until Automake uses the new features of `config.status'. Reported by Jim Meyering. 2000-02-10 Akim Demaille <akim@epita.fr> Clean up a few changequotes. * acgeneral.m4 (AC_INIT_PARSE_ARGS): Instead of using changequote to protect a few `[ ]', double quote the constant sections. 2000-02-10 Akim Demaille <akim@epita.fr> Restore AC_HAVE_LIBRARY. * acgeneral.m4 (AC_HAVE_LIBRARY): AU_DEFUNed in terms of AC_CHECK_LIB. * doc/autoconf.texi (Libraries): Document. 2000-02-09 Akim Demaille <akim@epita.fr> Fix the handling of `./configure foo=bar' and test it. * acgeneral.m4 (AC_INIT_PARSE_ARGS, getopt loop): Always define ac_optarg as the rhs of the first `=', not only on `-.*=', so that `configure var=val' defines ac_optarg=val. Improve the robustness to shell special characters: - Use grep when checking that shell variable names are valid. - Quote the quotes in ac_optarg before `eval var='$ac_optarg''. - Quote the quotes when building ac_configure_args. * tests/torture.m4: Test that `./configure foo=bar' works properly. 2000-02-09 Akim Demaille <akim@epita.fr> Resynchronize `INSTALL' with the current `configure', and conversely... * acgeneral.m4 (AC_INIT_PARSE_ARGS): Let `configure' support `-h = --help' and `-n = --no-create'. Document -h, -n and -q in configure's help message. * install.texi (Operation Controls): Formatting changes. Document `configure -h'. 2000-02-09 Akim Demaille <akim@epita.fr> * README: Updated. 2000-02-09 Akim Demaille <akim@epita.fr> * ChangeLog.1: Formatting changes. 2000-02-09 Akim Demaille <akim@epita.fr> Clean up `make clean'. * Makefile.am (CLEANFILES): Added autoupdate.m4f and autoconf.tmp. * tests/torture.m4: Rm dummy and dummy.in. 2000-02-09 Akim Demaille <akim@epita.fr> Test `autoupdate'. * tests/tools.m4 (AH_DEFUN): Fix the comments. Quote properly. (autoupdate): New test. 2000-02-09 Akim Demaille <akim@epita.fr> AU_ glue code for AC_OUTPUT with arguments. * acgeneral.m4 (AU_DEFINE): New macros, pulled out from AU_DEFUN. Defines a macro in `autoupdate::' with all the required wrapping for `autoupdate'. (AU_DEFUN): Use it. (AC_OUTPUT): When dispatching your arguments, use ifval, not ifset! Dispatch actions to AC_CONFIG_COMMANDS not AC_OUTPUT_COMMANDS, to avoid unneeded warnings for obsolete use of AC_OUTPUT_COMMANDS. (autoupdate::AC_OUTPUT): New macro. * doc/autoconf.texi (Writing configure.in, the example): Don't advocate AC_OUTPUT with args. (Output, AC_OUTPUT with args): Simplify the documentation, and provide the translation into the new scheme. Propagate what remained into the proper sections. 2000-02-09 Akim Demaille <akim@epita.fr> AU_ glue code for AC_OUTPUT_COMMANDS. * acgeneral.m4 (AC_OUTPUT_COMMANDS): AU_DEFUNed in terms of AC_CONFIG_COMMANDS. (AC_OUTPUT_COMMANDS_CNT): New variable, declared both in `autoconf::' and `autoupdate::'. (AC_OUTPUT): Register your arguments to AC_OUTPUT_COMMANDS only if there are to avoid spurious `run autoupdate' messages. * doc/autoconf.texi (Libraries): Document the changes. 2000-02-09 Akim Demaille <akim@epita.fr> Avoid outputting `config_files' code in `config.status' if there are none. * acgeneral.m4 (AC_OUTPUT): Don't register $1 to `AC_CONFIG_FILES' if $1 is empty. Normalize the names of the sections in `config.status --help'. 2000-02-09 Akim Demaille <akim@epita.fr> * README-alpha: New file, based on Automake's. * Makefile.am: Tuned. 2000-02-09 Akim Demaille <akim@epita.fr> Extend the concept of `INIT-CMDS' to the AC_CONFIG_FOOS. * acgeneral.m4 (_AC_CONFIG_COMMANDS_INIT): New macro which will collect the `INIT-CMDS'. (AC_CONFIG_COMMANDS, AC_CONFIG_LINKS, AC_CONFIG_HEADERS, AC_CONFIG_FILES): Use it, and also temporarily divert to -1 instead of spamming dnl everywhere. (AC_OUTPUT_CONFIG_STATUS): Make sure to output the INIT-CMDS before the other sections, it'd be a pity to initialize after the use :). * doc/autoconf.texi (Configuration Actions): New section, documenting the common behavior of AC_CONFIG_FILES, AC_CONFIG_HEADERS, macro AC_CONFIG_COMMANDS, and AC_CONFIG_LINKS. (Configuration Files): Document $2 and $3 of AC_CONFIG_FILES. (Configuration Headers): Document $2 and $3 of AC_CONFIG_HEADERS. (Configuration Commands): Document $2 and $3 of AC_CONFIG_COMMANDS. (Configuration Links): Document $2 and $3 of AC_CONFIG_FILES. 2000-02-09 Akim Demaille <akim@epita.fr> * libm4.m4 (m4_sign, m4_cmp, m4_list_cmp): New macros. * acgeneral.m4 (AC_UNGNITS): Rename as... (_AC_VERSION_UNLETTER): this. All callers changed. Implement the scheme proposed by Alexandre Oliva: Nl -> (N+1).-1.(l#) (_AC_VERSION_COMPARE): New macro. (AC_PREREQ): Use it. 2000-02-09 Akim Demaille <akim@epita.fr> * tests/base.m4: Really added to the CVS repository. * tests/tools.m4: Likewise. 2000-02-09 Akim Demaille <akim@epita.fr> * tests/base.m4: s/m4 -I ../m4 -I $at_top_srcdir/. 2000-02-08 Akim Demaille <akim@epita.fr> * autoheader.sh (debug): Initialize to `false', not 0. 2000-02-08 Akim Demaille <akim@epita.fr> Fix a bug: `libm4::define' was incorrectly registered. * libm4.m4 (libm4::define): Not only register, define too. 2000-02-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_COMPILE_CHECK): Use AU_DEFUN, remove the call to AC_OBSOLETE. 2000-02-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_PROVIDE): Use `m4_define', not `define'. Because of the names pace machinery this change makes `autoconf' about four times faster on complex `configure.in's. 2000-02-08 Akim Demaille <akim@epita.fr> Open the access to AH_ to users. * autoheader.m4 (autoheader::AH_DEFUN): New macro. * tests/tools.m4: New file, in charge of testing the scripts. All the dependencies adapted. * tests/actest.m4 (autoheader::AC_TATOOINE): New macro, used while testing autoheader. * tests/atspecific.m4: Create config.hin instead of config.h.in. 2000-02-08 Akim Demaille <akim@epita.fr> Because of commas and brackets, m4_split must mess with the quotes. * libm4.m4 (m4_split): Quote the elements of the list you produce. * tests/base.m4: New file, testing libm4. All callers adapted. Test m4_wrap. 2000-02-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CONFIG_UNIQUE): Strip the `:foo.in' part yourself, in order to give better error messages. (AC_CONFIG_IF_MEMBER): Adapted to the above change. Quote some regexp active characters ([+.*]). Suggested by Alexandre Oliva. 2000-02-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INCLUDES_DEFAULT): Make it more robust to the fact it is used non quoted. Reported by Jim Meyering. 2000-02-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT_FILES): Simplify some excess in changequote. (AC_OUTPUT_SUBDIRS): Likewise. 2000-02-08 Akim Demaille <akim@epita.fr> * autoupdate.sh: Don't dump --help on --wrong-option. * autoconf.sh: Reformatting, and use >&2 instead of 1>&2. * autoreconf.sh: Likewise. * autoheader.sh: Likewise. 2000-02-08 Akim Demaille <akim@epita.fr> * libm4.m4 (m4_namespace_push, m4_namespace_pop): Use the private macros to be robust to name space changes. (m4_popdef, m4_pushdef): New private macros. 2000-02-08 Akim Demaille <akim@epita.fr> Let the doc catch up. * doc/autoconf.texi (Common Behavior): New section, to document the common behavior of the macros. (Standard Symbols): New subsection. Describes the transformation of the AC_DEFINEd names. (Default Includes): New subsection. Obvious content. All the ``callers'' updated. 2000-02-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT_HEADERS): Don't use `break' to exit the while loops which are breaking conftest.defines and conftest.undefs into smaller snippets: just use the proper condition for the while. Suggested by Alexandre Oliva. 2000-02-08 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Configuration Commands): New section, for AC_CONFIG_COMMANDS. Move the definition of AC_OUTPUT_COMMANDS here. (Configuration Links): New section, for AC_CONFIG_LINKS and AC_LINK_FILES. (Configuration Files): New section, for AC_CONFIG_FILES. (Globally) Promote AC_CONFIG_HEADERS over AC_CONFIG_HEADER. (Using System Type): Don't document AC_CONFIG_LINKS and AC_LINK_FILES. (Invoking config.status): Mention CONFIG_COMMANDS. Document --file and --header. Talk first of the newest interface of config.status. 2000-02-08 Akim Demaille <akim@epita.fr> Introduce a concept index, and update a bit the documentation. * doc/autoconf.texi (Concept Index): New section. Various entries added. (Typedefs): Rename as... (Types): this. Pay attention to not limiting the documentation to the typedefs. (Particular Types): Mention the equivalent generic test. Promote the GNU coding style at various places. 2000-02-08 Akim Demaille <akim@epita.fr> Revamp the autoupdate/AC_OBSOLETE chain. All the details are given in the prologue of acoldnames.m4. * acgeneral.m4 (Prologue): Enter the `autoconf' name space. (AU_DEFUN): New macro. * autoupdate.m4: New file. Disable the name spaces `autoconf', and `libm4'. Disable libm4. * Makefile.am: Tuned to support the changes above. * autoupdate.sh: Model after autoconf.sh. Can run on several files at once (for instance m4/*.m4). Don't touch files that are up to date. Run m4 on autoupdate.m4f instead of playing with sed. Use AU_DEFUN. * acgeneral.m4 (AC_LINK_FILES, AC_ENABLE, AC_WITH): Use AU_DEFUN, remove the call to AC_OBSOLETE. * acspecific.m4 (AC_CYGWIN32): Likewise. * acoldnames.m4: Replaced all the definitions via `define' or `AC_DEFUN' to use `AU_DEFUN'. 2000-02-08 Akim Demaille <akim@epita.fr> Clean up some m4 files. * acoldnames.m4: Use `#', not `dnl'. Don't spread `dnl' everywhere, anyway, we are in a divert(-1). * autoconf.m4: Likewise. * autoheader.m4: Likewise. 2000-02-08 Akim Demaille <akim@epita.fr> Clean up autoconf. * autoconf.sh: Minor reorganizations to clearly separate the prologue, which is almost common to all the shell scripts of Autoconf, and the body. 2000-02-08 Akim Demaille <akim@epita.fr> Improve support of name spaces in libm4. Put the m4 builtins in the `libm4' name space. * libm4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir, m4_undefine): Private copies in the global name space. Used by the name space mechanisms. (m4_namespace_register): New macro. (m4_namespace_define): Use it. (builtin, changequote, defn, dnl, esyscmd, ifdef, ifelse, indir, patsubst, popdef, pushdef, regexp, undefine, syscmd, sysval): Put in the `libm4' name space. (m4_disable, m4_enable): Use the private m4_indir, otherwise once `libm4' closed, there is no `indir' available, and therefore no means to reopen a name space. 2000-02-08 Akim Demaille <akim@epita.fr> Output really nothing if AC_INIT was not given. Unconditional output can be problematic with autoupdate. * acgeneral.m4 (AC_INIT_NOTICE): Output ac_includes_default. (Default includes section): No longer dump ac_includes_default in AC_DIVERSION_INIT. 2000-02-08 Akim Demaille <akim@epita.fr> * libm4.m4 (m4_namespace_define): Fix a bug: `m4_namespace' instead of `$1'. Simplify some excess in quoting. Use NAMESPACE::MACRONAME instead of `m4_defn(NAMESPACE, MACRONAME)'. 2000-02-08 Akim Demaille <akim@epita.fr> Adapt autoheader to use libm4's name spaces. * autoheader.m4 (AH_HOOK): Removed. (AH_DEFUN): Define in the `autoheader' name space. Use only AH_DEFUN to define macros in this file. (epilogue): No longer run the `AH_HOOKS', enter the `autoheader' name space. 2000-02-08 Akim Demaille <akim@epita.fr> Clean up a bit the user interface. * autoconf.sh: Give your name while reporting errors. Don't spit --help for errors on arguments. * autoreconf.sh: Likewise. * autoheader.sh: Likewise. More temporary files that one can browse when debugging. Don't ${var}, just $var. Don't dump --help when the arguments are invalid. (config_h): Use the empty value instead of `undefined' to check that it is defined. * acspecific.m4: Formatting changes. 2000-02-08 Akim Demaille <akim@epita.fr> Introduce name spaces in libm4. * libm4.m4 (m4_namespace_push, m4_namespace_pop, m4_namespace_define, define, m4_disable, m4_enable, m4_rename): New macros. (_m4_foreach, _m4_for, m4_wrap): Use m4_define for temporaries. (m4_split): Don't mess with the quotes. * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_HEADERS): Quote `define'. 2000-02-08 Akim Demaille <akim@epita.fr> * doc/autoconf.texi (Introduction): m4 1.4 is now required. (Invoking autoconf): A better help on --trace. (Defining Symbols): Advocate a proper use of the quotes in m4 code, including if the quotes are sometimes useless. It is bad, very bad not to quote properly, so quote all the examples properly. (Cache Files): Use a unary call to define, instead of an empty $2. (Using System Type): Watch out TeX wrapping. (Pretty Help Strings): Don't give too long a snippet of --help. Promote the coding style of Autoconf. Quote properly. 2000-02-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_PRO): Use AC_PROVIDE instead of defining yourself. This allows to see everything that is AC_PROVIDEd via autoconf --trace. (AC_SPECIALIZE): define'd, not AC_DEFUN'd. (AC_PROVIDE): Use define with a single arg, instead of an empty $2. 2000-02-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (ac_includes_default): Don't use simple quotes, but doubles quotes if you want to use \-continuation lines: this is not recognized by MIPS' sh. 2000-02-08 Akim Demaille <akim@epita.fr> * acgeneral.m4. Formatting changes. * acspecific.m4: Likewise. 2000-02-08 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CONFIG_HEADERS, AC_CONFIG_LINKS, AC_CONFIG_SUBDIRS): A space was missing to separate the arguments of m4_append. 2000-02-08 Akim Demaille <akim@epita.fr> Arrange that config.status creates the file with the AC_SUBSTing engine only if needed. * acgeneral.m4 (AC_OUTPUT_FILES): Create the sed code only if test -n "$CONFIG_FILES". 2000-02-08 Akim Demaille <akim@epita.fr> Promote AC_LANG_CASE. * acgeneral.m4 (AC_TRY_COMPILER, AC_TRY_LINK_FUNC, AC_CHECK_LIB, AC_TRY_COMPILE, AC_TRY_LINK, AC_TRY_RUN_NATIVE, AC_CHECK_FUNC): Use AC_LANG_CASE instead of ifelse (AC_LANG, ...). (AC_TRY_LINK_FUNC): Quote the body the the AC_DEFUN (whoa, how could this survive so long?!?). 2000-02-08 Akim Demaille <akim@epita.fr> * acgeneral.m4: Formatting changes. * acspecific.m4: Likewise. 2000-02-08 Akim Demaille <akim@epita.fr> Use the style we promote. * doc/autoconf.texi (Header Templates): Promote #if over #ifdef; and #undef over #define in templates. * acspecific.m4 (AC_DECL_SYS_SIGLIST, AC_FUNC_MMAP, AC_FUNC_SETPGRP, AC_FUNC_VFORK, AC_FUNC_SELECT_ARGTYPES): Use #if, not #ifdef and #ifndef, indent CPP directives. 2000-02-08 Akim Demaille <akim@epita.fr> Quote properly AC_SHELL_IFELSE and callers. * acgeneral.m4 (AC_SHELL_IFELSE): Don't overquote $1. (AC_VAR_IF_SET, AC_CHECK_MEMBER, AC_CHECK_LIB, AC_CHECK_HEADER, AC_CHECK_DECL, AC_CHECK_FUNC, AC_CHECK_TYPE_INTERNAL): Quote the first argument of AC_SHELL_IFELSE. 2000-02-08 Akim Demaille <akim@epita.fr> It seems quite delicate to have AC_INCLUDES_DEFAULT insert the default headers in the INIT section of configure: the reason is that AC_INCLUDES_DEFAULT is called unquoted, and this results in an un expected behavior. Thanks to Roman V. Shaposhnick for the details. The current implementation is not satisfying: the default headers are defined in the INIT section even if they are not used. * acgeneral.m4 (Prologue of AC_INCLUDES_DEFAULTS): Dump the definition of ac_includes_default in the INIT section of configure. (AC_INCLUDES_DEFAULTS): Use it. 2000-02-08 Akim Demaille <akim@epita.fr> * TODO: Updated. * THANKS: Updated. 2000-02-08 Akim Demaille <akim@epita.fr> * libm4.m4 (m4_for): New macro. 2000-02-07 Akim Demaille <akim@epita.fr> Stay in Autoconf's name space. * acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): Prefixed with 'ac_': arg, save_arg, i, seen, previous_arg, ld_run_path. Rename f77_link_output as ac_link_output. * tests/actest.m4 (AC_ENV_SAVE): Don't note F77, FFLAGS, FLIBS, G77, f77_case, f77_underscore. 2000-02-07 Akim Demaille <akim@epita.fr> Use `#' for comments instead of `dnl'. Better highlighting of the sections in the sources. * acgeneral.m4: Formatting changes. * acspecific.m4: Likewise. * autoheader.m4: Likewise. * acoldnames.m4: Likewise. 2000-02-07 Akim Demaille <akim@epita.fr> Create libm4.m4. * Makefile.am: Adjusted for libm4.m4. * acgeneral.m4 (m4_errprint, m4_warn, m4_fatal, m4_prefix, m4_eval, m4_shift, m4_format, m4_include_unique, m4_include, m4_sinclude, m4_quote, m4_split, m4_join, m4_strip, m4_append, m4_list_append, ifval, ifset, m4_default, m4_case, m4_match, m4_foreach): Moved from here, to... * libm4.m4: here. * acgeneral.m4 (AC_WRAP): Moved from here, to... * libm4.m4 (m4_wrap): here. All callers changed. * acgeneral.m4: Don't include acversion.m4. * autoconf.m4: Include libm4.m4 and acversion.m4. * autoheader.m4: Likewise. 2000-02-07 Akim Demaille <akim@epita.fr> AC_CHECK_SIZEOF: Fix a bug, use standard default headers, and test. * acgeneral.m4 (AC_CHECK_SIZEOF): Don't over quote $1, some [] were left in the C code, and had the macro fail. Use AC_INCLUDES_DEFAULT. * doc/autoconf.texi: Mention default includes. Explain stdio.h must always be given. * tests/atspecific.m4 (TEST_MACRO): Updated the list of exceptions. (AT_CHECK_DEFINES): New macro, to check the content of config.h. * tests/semantics.m4: All the tests are updated to use AT_CHECK_DEFINES. Test AC_CHECK_SIZEOF, AC_CHECK_HEADERS, and AC_CHECK_FUNCS. 2000-02-07 Akim Demaille <akim@epita.fr> Give explicit diagnostics when an input file (for config headers; config files etc.) does not exist. From Jim Meyering. * acgeneral.m4 (AC_OUTPUT_FILES, AC_OUTPUT_HEADERS): Check for the existence of source files. 2000-02-07 Akim Demaille <akim@epita.fr> Torture test config.status, AC_SUBST and AC_DEFINE. * tests/torture.m4: New file. * tests/suite.m4: Include it. 2000-02-07 Akim Demaille <akim@epita.fr> * tests/atspecific.m4 (m4_for, m4_foreach): New macros. 2000-02-07 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Instead of defining an unused pointer to the type $1, use if (($1 *) 0) return 0; to avoid warnings from the compiler. From Paul Eggert. 2000-02-07 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INCLUDES_DEFAULT): Include sys/types.h Reported by Jim Meyering. 2000-02-07 Akim Demaille <akim@epita.fr> * tests/atspecific.m4: New file, for AT macros specific to Autoconf testing. * tests/suite.m4 (AT_TEST_MACRO): Moved to * tests/atspecific.m4 (AT_TEST_MACRO): here. * tests/syntax.m4 (TEST_MACRO): Moved to * tests/atspecific.m4 (TEST_MACRO): here. Don't test /^AC_INIT/, nor /^AC_PROG_\(CC\|CXX\|F77\)_\(GNU\|WORKS\)$/: they are already tried elsewhere. * tests/Makefile.am: Adjusted. 2000-02-07 Akim Demaille <akim@epita.fr> * acgeneral.m4 (m4_case): Fixed a typo and a bug: one shift was missing. (m4_match): New macro. * tests/atgeneral.m4 (AT_CASE): Fixed. 2000-02-07 Akim Demaille <akim@epita.fr> * acgeneral.m4: Formatting changes. * acspecific.m4: Likewise. 2000-02-07 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): Don't use FFLAGS_SAVE but ac_save_FFLAGS. (AC_F77_NAME_MANGLING): Don't use foo_bar but ac_foo_bar. 2000-02-07 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_C_INLINE): Proceed as for AC_C_CONST: condition out the test case if __cpluscplus. Don't document the autoheader template twice, one is enough. * autoheader.m4 (AC_CONFIG_HEADER): don't hook on this guy, but on... (AC_CONFIG_HEADERS), since the former is defined on the latter. 2000-02-07 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Use the scheme proposed by Alexandre Oliva for testing the definition of TYPE: TYPE *foo; sizeof (TYPE); 2000-02-07 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_C_CONST): Don't changequote, there is no need for it. Just quote properly! condition out the test case if __cpluscplus. AC_REQUIRE AC_PROG_CC_STDC. Fix slightly the display of the result (formerly the first run says `none needed', and later, because of the cache `no'). (AC_C_INLINE, AC_C_VOLATILE): AC_REQUIRE AC_PROG_CC_STDC. * doc/autoconf.texi (AC_C_CONST): Give a few hints on the motivation for trusting the C++ compilers. 2000-02-07 Akim Demaille <akim@epita.fr> * tests/atgeneral.m4: Updated. (AT_CASE): new macro. (AT_CHECK): Use it. Don't changequote for patsubst, there is no need. * tests/syntax.m4 (TEST_MACRO): Don't run AC_ARG_VAR. Reported by Jim Meyering. Use AT_CASE. 2000-02-07 Akim Demaille <akim@epita.fr> Test that the macros respect the user variable name space. * acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN. Don't AC_PROVIDE, there is no need. When calling `config.sub`, also || exit 1, to catch failures from config.sub. * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val. (AC_EXEEXT): Use ac_file, not file. * tests/actest.m4: New file, holding extra Autoconf macros used during the testing. (AC_ENV_SAVE): New macro, save the sh variables in a file. * tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in): include actest.m4, and call twice AC_ENV_SAVE to compare the variables before and after the macro. * tests/Makefile.am (macro.m4): Don't test macros that are required: they will be tested somewhere else. 2000-02-07 Akim Demaille <akim@epita.fr> * acgeneral.m4(AC_CONFIG_PRE_COMMANDS, AC_CONFIG_POST_COMMANDS): Rename as AC_CONFIG_COMMANDS_PRE, AC_CONFIG_COMMANDS_POST. All dependencies changed. From Jim Meyering. 2000-02-07 Akim Demaille <akim@epita.fr> * acgeneral.m4: Formatting changes. * acspecific.m4: Likewise. 2000-02-07 Akim Demaille <akim@epita.fr> Start a new series of tests which check the semantics. * acgeneral.m4 (AC_CHECK_MEMBER): It is not smart to define ac_Foo, and use AC_Foo. Got rid of AC_Member_Aggregate and AC_Member_Member which were complicating more than simplifying. (AC_CHECK_DECLS): Use m4 lists. (AC_CHECK_TYPES): A comma was missing. * autoheader.m4: (AC_CHECK_DECLS): Use m4 lists. * doc/autoconf.texi (Generic Declarations): AC_CHECK_DELCS uses m4 lists. * tests/semantics.m4: New file. Collection of semantical tests: verify that the tests are positive and negative when appropriate. Test AC_CHECK_MEMBERS, AC_CHECK_DECLS and AC_CHECK_TYPES. 2000-02-04 Akim Demaille <akim@epita.fr> * tests/Makefile.am (macros.m4): Fix the sed snippet. 2000-02-04 Akim Demaille <akim@epita.fr> * testsuite/autoconf.g/init.exp: Removed, test performed by tests/syntax.m4. * testsuite/autoconf.g/sizeof.exp: Likewise. * testsuite/autoconf.s/defines.exp: Likewise. * configure.in (AC_OUTPUT): Adjusted. * Makefile.am (SUBDIRS): Adjusted. 2000-02-04 Akim Demaille <akim@epita.fr> * tests/syntax.m4: Test AC_CHECK_SIZEOF. * tests/Makefile.am (CLEANFILES, DISTCLEANFILES): Adjusted. (macros.m4): Use tmp dest files ($@-t), not directly `$@'. 2000-02-04 Akim Demaille <akim@epita.fr> Hide AH_HOOK behind AH_DEFUN. * autoheader.m4 (AH_DEFUN): New macro. Combination of define and AH_HOOK. (AC_TRY_RUN, AC_DEFINE, AC_DEFINE_UNQUOTED, AC_CHECK_LIB, AC_CHECK_HEADERS, AC_CHECK_HEADERS_DIRENT, AC_CHECK_DECLS, AC_CHECK_FUNCS, AC_CHECK_SIZEOF, AC_PROG_LEX, AC_CHECK_MEMBERS, AC_CHECK_TYPE, AC_FUNC_ALLOCA, AC_CHECK_TYPES, AC_C_CHAR_UNSIGNED, AC_AIX, AC_F77_WRAPPERS, AC_CONFIG_HEADER): All the former calls to define and AH_HOOK in autoheader.m4 are replaced by AH_DEFUN. 2000-02-04 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_RSH, AC_ARG_ARRAY, AC_HAVE_POUNDBANG): No use to hide, you are DEFUNCT. 1999-11-14 Akim Demaille <akim@epita.fr> * autoconf.texi (Invoking ifnames): ifnames no longer supports --macrodir. 1999-11-13 Akim Demaille <akim@epita.fr> Run the `syntax' test on acgeneral macros too. Fix the bugs discovered. * acgeneral.m4 (AC_CANONICAL_THING): Quote the AC_REQUIRE([AC_CANONICAL_HOST]). Bug triggered by the use of AC_CANONICAL_BUILD alone in configure.in. Also, quote the arguments of macros (eg, ifelse([$1]...), not ifelse($1...)). (m4_case): New macro. (AC_LINKER_OPTION): Don't clash with user's name space (s/i/ac_link_opt). (AC_LIST_MEMBER_OF). You mean AC_FATAL, not AC_MSG_ERROR. Quote properly the argument. dnl out the empty lines that result from m4 pure code. Don't pollute the user name space. Use AC_SHELL_IFELSE. (AC_F77_NAME_MANGLING): Don't use `test -o'. There are still name space problems. * tests/Makefile.am (macros.m4): Also fetch the macros from acgeneral.m4. 1999-11-13 Akim Demaille <akim@epita.fr> Really install this patch. * acgeneral.m4 (AC_MSG_ERROR, AC_MSG_ERROR_UNQUOTED): Allow an optional $2: exit status. 1999-11-13 Akim Demaille <akim@epita.fr> Check that the AC_DEFINEs from acspecific.m4 do have a template. Fix the discovered bugs. * tests/atgeneral.m4 (AT_CHECK): Don't just exit 1 when you want to propagate the failure of a test: exit with the same exit status, at least to preserve 77 (=ignore). * tests/syntax.m4 (TEST_MACRO): Run also autoheader. Don't run this test on all the macros, some just cannot run without arguments. * acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): In the if egrep/fi for #define templates, add a `:' to prevent syntax errors in config.status when there are no AC_DEFINE performed. * autoheader.m4 (AH_TEMPLATE): Don't use _AC_SH_QUOTE here, use it in... (AH_VERBATIM): here. Now AH_C_UNSIGNED_CHAR is no longer failing (formerly it would produce a non backslashed backquote, which made sh choke). 1999-11-13 Akim Demaille <akim@epita.fr> Introduce a means to distinguish failures of `configure' due to extern software (so that the test suite doesn't fail on them). * acgeneral.m4 (AC_MSG_ERROR, AC_MSG_ERROR_UNQUOTED): Allow an optional $2: exit status. * doc/autoconf.texi: Document. * acspecific.m4 (AC_PROG_CC_WORKS, PROG_CXX_WORKS, AC_PROG_F77_WORKS): Exit 77 if the compiler does not work. 1999-11-13 Akim Demaille <akim@epita.fr> Clean up a bit the handling of the LANG stack. More is needed. * acgeneral.m4 (AC_LANG_CASE): New macro. (AC_LANG_RESTORE): Use m4_case. (AC_LINKER_OPTION): Use AC_LANG_CASE. 1999-11-11 Akim Demaille <akim@epita.fr> * autoconf.texi (Generic Declarations): Fixed a typo which prevented `make distcheck' from succeeding. * texinfo.tex: Updated for the same reasons. 1999-11-11 Akim Demaille <akim@epita.fr> Introduce a new style of testing, independent from DejaGNU. Introduce the logistics. * configure.in: Initialize AT, and output tests/atconfig, and tests/Makefile. * m4/atconfig.m4: New file. * m4/Makefile.am: Adjusted. * aclocal.m4: Include atconfig.m4. * Makefile.am: Adjusted. * tests/Makefile.am: New file. * tests/atgeneral.m4: Likewise. * tests/atconfig.in: Likewise. Write tests. * tests/syntax.m4: New file, in charge of checking the validity of the sh code produced by the macros defined in acspecific.m4. acgeneral.m4 is not checked here, because these macros require arguments. * tests/suite.m4: New file. Run syntax.m4. 1999-11-10 Akim Demaille <akim@epita.fr> A test suite will be introduced which tries to run all the specific macros, but hasbeen'd macro make configure die with bad exit status. So we wish to distinguish live macros from defunct macros at the moment they are AC_DEFUN'd, not in their body. Hm, defunct, defunct... Hey! That's a good name! * acgeneral.m4 (AC_DEFUNCT): New macro, comparable to AC_DEFUN, but for macros which are no longer defined. Replaces AC_HASBEEN. (AC_HASBEEN): Defunct. Well, removed in fact. (AC_HAVE_LIBRARY): Don't use AC_DEFUN and AC_HASBEEN, just AC_DEFUNCT. * acspecific.m4 (AC_UNISTD_H, AC_USG, AC_MEMORY_H, AC_DIR_HEADER, AC_INT_16_BITS, AC_LONG_64_BITS): Likewise. (AC_XENIX_DIR): It was defunct even before I declared it was: was depending upon AC_DIR_HEADER which is defunct. So AC_DEFUNCT'ed now. (AC_DYNIX_SEQ, AC_IRIX_SUN, AC_SCO_INTL): While we're here, you too are defunct now. * autoconf.texi (Obsolete Macros): Replace the documentation of AC_HASBEEN with that of AC_DEFUNCT. 1999-11-10 Akim Demaille <akim@epita.fr> * autoconf.sh: Formatting changes. Removed development junk. * acspecific.m4: Formatting changes. * autoconf.m4: Likewise. * autoheader.m4: Likewise. 1999-11-10 Akim Demaille <akim@epita.fr> Let Autoconf use autoconf's `--install'. * m4/Makefile.am: New file. * m4/init.am: New file, required by Automake. * m4/missing.am: Likewise. * m4/sanity.am: Likewise. * aclocal.m4: Include them. * configure.in (AC_OUTPUT): Added m4/Makefile. 1999-11-10 Akim Demaille <akim@epita.fr> Make autoconf support --install. * autoconf.sh (task install): New task. Extract the set of auxiliary m4 files a configure.in depends upon. Install links from library files to the local dir so that the packages depends only on local extensions. Check that the user includes exactly the files she needs. 1999-11-10 Akim Demaille <akim@epita.fr> Require GNU m4 1.4 (well 1.3 in fact). Because we are ready to handle the case where there are no frozen files, we *have* to pass a -I, which is dangerous in conjunction with the silent including of `aclocal.m4': you may include things that were not expected. Since anyway handling pre 1.3 complicates the task, just require an m4 which supports reloading of frozen files. * acspecific.m4 (AC_PROG_GNU_M4): Check for --reload. * autoconf.sh: Likewise * autoheader.sh: Likewise. * configure.in: Explicitly state the m4 version you want. 1999-11-10 Akim Demaille <akim@epita.fr> No need for foo="`bar`", foo=`bar` is fine. Simplify ${foo} and ${1} into $foo and $1. * acgeneral.m4 (ac_LF_and_DOT): Remove the double quotes. * acspecific.m4 (AC_PROG_CC_C_O, AC_PROG_F77_C_O): Likewise. * autoconf.sh: Likewise. * autoheader.sh: Likewise. * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * ifnames.sh: Remove all the code and messages related to AC_MACRODIR, since ifnames is not related to macros in anyway. 1999-11-10 Akim Demaille <akim@epita.fr> New version of AC_INCLUDE, which does not glob, nor rely upon the shell. Add AC_INCLUDES too. Help tracking multiple inclusions. * acgeneral.m4 (m4_errprint, m4_warn, m4_fatal): New macros, variations around errprint. (m4_include_unique): New macro which registers what are the files already included, and warns if some are included several times. (m4_include, m4_sinclude): New macro, using m4_include_unique. (AC_INCLUDE): Is now just a wrapper of m4_include. (AC_INIT): Use m4_sinclude, not sinclude. (_AC_ERRPRINT): Removed, m4_errprint is here! (AC_WARNING, AC_FATAL): Wrappers of m4_warn and m4_fatal. 1999-11-01 Akim Demaille <akim@epita.fr> * autoheader.sh: No longer rely on a system acconfig.h. 1999-11-01 Akim Demaille <akim@epita.fr> Be kind to Automake: list the arguments of selected macros (for instance AC_SUBST will list each variable which may be substitued). * autoconf.sh (--trace, --output): New options. Implement tracing of macros. trap also on 0, so that there is no need to rm here and there. * autoconf.texi (Output): Document --trace and --output. 1999-11-01 Akim Demaille <akim@epita.fr> Clean up the macros for testing members of aggregates. * acgeneral.m4 (AC_CHECK_MEMBER): FATAL if $1 has no dot in it. Use AC_INCLUDE_DEFAULTS. (AC_C_STRUCT_MEMBER): Removed. * acspecific.m4 (AC_STRUCT_TIMEZONE): Adapted to AC_CHECK_MEMBERS. (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV): Adapted to AC_CHECK_MEMBERS and obsoleted. (AC_STRUCT_ST_BLOCKS): Adapted to AC_CHECK_MEMBERS. * autoconf.texi (AC_STRUCT_ST_BLKSIZE, HAVE_STRUCT_STAT_ST_RDEV): Explain they are obsoleted, and how to migrate. (AC_STRUCT_ST_BLOCKS, AC_STRUCT_TIMEZONE): Explain that the AC_DEFINE changed (but the former #defines remain defined currently). (AC_C_STRUCT_MEMBER): Removed, replaced by the definitions of AC_CHECK_MEMBER and AC_CHECK_MEMBERS. 1999-11-01 Akim Demaille <akim@epita.fr> Install a uniform set of default includes. * acgeneral.m4 (AC_INCLUDES_DEFAULT): New macro. Expands in its argument if non empty, otherwise a default list of includes. (AC_CHECK_DECL, AC_CHECK_TYPE_INTERNAL): Use AC_INCLUDES_DEFAULT. * autoconf.texi: Adjusted. 1999-11-01 Akim Demaille <akim@epita.fr> * autoheader.m4 (AH_FUNC_ALLOCA, AH_C_CHAR_UNSIGNED, AH_AIX): Don't leave `[]dnl' in pseudo #-comment (actually CPP directives). 1999-11-01 Akim Demaille <akim@epita.fr> Fix a bit of the brokenness of AC_CHECK_TYPE. * acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): New macro, inspired from the former AC_CHECK_TYPE. This macro is exactly the one that ought to be named AC_CHECK_TYPE: it just checks, and executes user actions. In the future, this macro ought to be renamed AC_CHECK_TYPE. There is a big difference with the former AC_CHECK_TYPE: instead of grepping in the headers, it tries to compile a variable declaration. This is both safer, slower, and better, since now we can check for compiler types (e.g., unsigned long long). (AC_CHECK_TYPES): The looping and AC_DEFINEing version of the previous macro. Uses m4 loops. (AC_CHECK_TYPE): Reimplemented on top of AC_CHECK_TYPE_INTERNAL. * autoheader.m4 (AH_CHECK_TYPE, AH_CHECK_TYPES): New macros, hooked. * autoconf.texi (@ovar): New macro, for optional variables. (Generic Typedefs): Document AC_CHECK_TYPES. * autoheader.texi: (AH_CHECK_TYPE, AH_CHECK_TYPES): New macros. (Epilogue): Hooks them. 1999-11-01 Akim Demaille <akim@epita.fr> Update autoupdate. * acoldnames.m4: Sort the two sections. * acoldnames.m4 (AM_CYGWIN32, AM_EXEEXT, AM_FUNC_FNMATCH, AM_FUNC_MKTIME, AM_PROG_LIBTOOL, AM_MINGW32, AM_PROG_INSTALL, fp_FUNC_FNMATCH): Added their new names. 1999-10-31 Akim Demaille <akim@epita.fr> Create man pages for the executables. * Makefile.am (SUBDIRS): Add `man' and prepend `.' so that executables be built before help2man is run. * configure.in (AC_OUTPUT): Add man/Makefile. AC_MSG_ERROR, not AC_ERROR. Check for missing help2man. * man/Makefile.am: New file. * man/autoconf.x: Likewise. * man/autoreconf.x: Likewise. * man/autoheader.x: Likewise. * man/autoscan.x: Likewise. * man/autoupdate.x: Likewise. * man/ifnames.x: Likewise. * man/common.x: Likewise. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INIT_PARSE_ARGS): Reformating of configure and config.status --help. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): Implement `config.status --file' and `--header'. 1999-10-31 Akim Demaille <akim@epita.fr> * autoheader.m4 (AH_TEMPLATE): Quote $2 once, now _AC_SH_QUOTE behaves properly. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4: Formatting changes. * acspecific.m4: Likewise. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CONFIG_LINKS): Allow a second argument, commands to run, as AC_CONFIG_FILES and HEADERS. (AC_LIST_LINKS_COMMANDS): New growing string. Initialize. (AC_OUTPUT_LINKS): Use it. (AC_OUTPUT_FILES, AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS): Don't pretend to have arguments: you don't depend upon it. (AC_OUTPUT): Call the previous macros without arguments. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_PREFIX_PROGRAM): Don't use define/undefine, but pushdef/podef. AC_UPCASE_NAME no longer exist. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4: Formatting changes. 1999-10-31 Akim Demaille <akim@epita.fr> * TODO: Updated. 1999-10-31 Akim Demaille <akim@epita.fr> Clean up dead comments/code. Clean up the incompatibilities between quoted and non quoted _AC_ECHO and the like. * acgeneral.m4: Remove the comments on the no longer defined AC_TR. (_AC_SH_QUOTE): Be robust to active symbols. (_AC_ECHO): Quote properly the argument. (AC_TRY_RUN): Don't quote [AC_TRY_RUN] in the warning. 1999-10-31 Akim Demaille <akim@epita.fr> * acspecific.m4: Formatting changes. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INIT_NOTICE, AC_INIT_PREPARE, AC_ARG_ENABLE, AC_ARG_WITH, AC, TRY_COMPILER, AC_TRY_RUN, AC_TRY_CPP, AC_EGREP_CPP): Use @PND@ instead of [#]: it looses the editors that try to match the pairs of (), [] etc. 1999-10-31 Akim Demaille <akim@epita.fr> Fix the compatibility of the compiling macros with C++. * acgeneral.m4 (AC_TRY_COMPILE, AC_TRY_LINK, AC_CHECK_SIZEOF): Use `int main () {...}', instead of `main () {...}'. * acspecific.m4 (AC_TYPE_GETGROUPS, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_FNMATCH, AC_FUNC_GETPGRP, AC_FUNC_SETPGRP, AC_FUNC_VFORK, AC_FUNC_WAIT3, AC_FUNC_ALLOCA, AC_FUNC_UTIME_NULL, AC_FUNC_SETVBUF_REVERSED, AC_FUNC_MEMCMP, AC_C_CHAR_UNSIGNED, AC_C_LONG_DOUBLE, AC_C_BIGENDIAN, AC_SYS_RESTARTABLE_SYSCALLS): Likewise. * acspecific.m4 (AC_FUNC_FNMATCH): Call AC_CHECK_HEADERS(fnmatch.h), and include fnmatch.h in the compiled code. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_COMPILE_CHECK, AC_TRY_COMPILE, AC_TRY_RUN_NATIVE, AC_OUTPUT_CONFIG_STATUS): Use @PND@ instead of [#]: it looses the editors that try to match the pairs of (), [] etc. Formatting changes. * acspecific.m4: Formatting changes. 1999-10-31 Akim Demaille <akim@epita.fr> Allow standard beta version numbers. * configure.in: Declare version 2.14a. * acgeneral.m4 (AC_UNGNITS): New macro which transform version numbers to pure digits (2.14a to 2.14.0.1, 2.15z to 2.15.0.26 etc.). (AC_PREREQ): Normalize argument and AC_ACVERSION via AC_UNGNITS. 1999-10-31 Akim Demaille <akim@epita.fr> Fix the --version of all the executables. * Makefile.am (editsh, editpl): Substitute also PACKAGE and VERSION. * autoconf.sh (version): New string. (--version): Use it. (--help) Output on stdout, not stderr. * autoheader.sh: Likewise. * autoreconf.sh: Likewise. * autoscan.pl: Likewise. * autoupdate.sh: Likewise. * ifnames.sh: Likewise. 1999-10-31 Akim Demaille <akim@epita.fr> Perform a better checking for missing templates in autoheader. * autoheader.m4 (AH_HOOK): When hook AC_FOO on AH_FOO, define the new AC_FOO to be the expansion of both AH_FOO *and* AC_FOO. See its definition for the motivations. * autoheader.m4 (AH_FUNC_ALLOCA): Remove the now useless additional templates. 1999-10-31 Akim Demaille <akim@epita.fr> Work properly with Automake 1.4. * Makefile.am (distpkgdataDATA): Replaces dist_pkgdata_DATA. (nodistpkgdataDATA): Replaces nodist_pkgdata_DATA. (EXTRA_DIST): Added $(distpkgdataDATA). (pkgdata_DATA): Adapted. (AUTOMAKE_OPTION): Require 1.4. 1999-10-31 Akim Demaille <akim@epita.fr> Fix a bug in templates of AC_CHECK_LIB. * autoheader.m4 (AH_CHECK_LIB): Template HAVE_LIBFOO, not HAVE_FOO. 1999-10-31 Akim Demaille <akim@epita.fr> * acspecific.m4: Formating changes. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4: Formating changes. * acspecific.m4: Likewise. 1999-10-31 Akim Demaille <akim@epita.fr> * Makefile.am (pkgdata_DATA): Split into dist_pkgdata_DATA and nodist_pkgdata_DATA. 1999-10-31 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_PROG_GNU_M4): New macro. * configure.in: Use it. 1999-10-31 Akim Demaille <akim@epita.fr> Provide a means to specify commands to run before config.status is created (and, for symmetry, after it is created). This is typically needed by Automake so that AC_REPLACEd functions go through deansification via LIBOBJS=`echo $LIBOBJS | sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` and/or by Libtool which needs to define LTLIBOBJS and others: LTLIBOBJS=`echo $LIBOBJS | sed 's/\.o/\.lo/g'` AC_SUBST(LTLIBOBJS) * acgeneral.m4 (AC_OUTPUT_PRE_COMMANDS): New growing string. Initialize. (AC_OUTPUT_POST_COMMANDS): Likewise. (AC_CONFIG_PRE_COMMANDS): New macro, grows AC_OUTPUT_PRE_COMMANDS. (AC_CONFIG_PRE_COMMANDS): Likewise. (AC_OUTPUT): Run AC_OUTPUT_PRE_COMMANDS before AC_OUTPUT_CONFIG_STATUS, and AC_OUTPUT_POST_COMMANDS after. 1999-10-31 Akim Demaille <akim@epita.fr> Remove spurious empty lines appearing in configures. * acgeneral.m4 (AC_CONFIG_UNIQUE): Produce no output. Instead of fighting with dnl, divert to KILL upon entry, and pop at exit. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INIT_PARSE_ARGS): Avoid using double quotes inside "`...`": some shells parse this incorrectly. 1999-10-31 Akim Demaille <akim@epita.fr> * Makefile.am (pkgdata_DATA, EXTRA_DIST): Removed acconfig.h. * testsuite/autoconf.s/defines.exp: Commented out, there is no longer an acconfig.h. 1999-10-31 Akim Demaille <akim@epita.fr> * autoconf.m4: Insert -*- Autoconf -*-. * acgeneral.m4: Likewise. * acspecific.m4: Likewise. * acoldnames.m4: Likewise. 1999-10-31 Akim Demaille <akim@epita.fr> Create AC_CONFIG_HEADERS which has the same interface as the other AC_CONFIG_*S. * acgeneral.m4 (AC_CONFIG_HEADERS): New macro, with the same interface as AC_CONFIG_LINKS and AC_CONFIG_FILES. (AC_LIST_HEADERS_COMMANDS): New growing string, initialize it. (AC_CONFIG_HEADER): Rename as... (AC_CONFIG_HEADERS): this, for consistency. (AC_CONFIG_HEADER): New macro, which calls AC_OUTPUT_HEADERS. (AC_OUTPUT_HEADERS): The square brackets for sed and grep were not properly quoted: use @BKL@ and @BKR@. (AC_OUTPUT_HEADERS): Run the AC_LIST_HEADERS_COMMANDS. * acgeneral.m4 (AC_OUTPUT): Once config.status created, before running it, trap to `exit 1' so that config.status is not removed if configure is interrupted when config.status is complete. * acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): When recognizing arguments, accept only foo, and no longer foo:foo.in etc. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4: Formating changes. 1999-10-31 Akim Demaille <akim@epita.fr> config.status: Speed up the creation of config headers (about four times faster on Linux). The previous scheme had three sed commands for each AC_DEFINE: one for #define templates, and two for #undef templates (with or without trailing spaces). Divide this in three sed scripts instead: a one liner that removes the trailing spaces, one for #defines, and then the last for #undef. The real speed up comes from the fact that the #define script starts by checkin if the current input line has a #define, and if not the script immediately goes to the next line, without running the rest of the script as was the case before. Equally for the #undef script. Note that this way, users that don't use #define templates don't pay too much the overhead, since the sed script `realizes' quickly there are no #define lines. My test case runs in 0.32s with #define templates, and 0.24s without. To improve this common case, the whole code for #define templates is conditionalized by a proper egrep call. The result runs is 0.24s, i.e., almost no cost at all. I made one dangerous change that I carefully evaluated before commiting: the sed scripts are cut at 48 lines instead of 12 as before. This produces here docs of about 4Kb. I checked many `configure's and they all have big here documents, much bigger than the 12 lines (for instance AC_FUNC_MMAP produces a 150 lines long, 3800+ character here document). So I moved to the well known HP UX sed limitations: no more than 100 commands, and there are two commands per line now, plus a two command preamble. The speed up is noticeable. * acgeneral.m4 (AC_OUTPUT_HEADERS): Remove the ac_e family. Changed ac_uD and ac_dD to `...;t t', instead of `...g'. Instead of creating `conftest.vals' with both ac_e, ac_d, and ac_u family, preprocess to strip the trailing spaces, and create `conftest.defines' with the ac_d family, and then `conftest.undefs' for the ac_e family. Break up both `conftest.defines' and `conftest.undefs'. Insert a top label and a global test for `#defines' and `#undef' before. Call `conftest.defines' if there are #define in the input. Call `conftest.undefs'. 1999-10-31 Akim Demaille <akim@epita.fr> * acgeneral.m4: Prefer `>file' over `> file' etc. * acspecific.m4: Likewise. 1999-10-31 Akim Demaille <akim@epita.fr> Rename the family AC_NEED_DECL as AC_CHECK: it is more uniform, but keep defining NEED_FOO_DECL when `foo' is not declared. Files not using Autoconf behave better when declarations lacks than when they are wrong. So the unset position should off, hence #if NEEDS instead of #if !HAVE (which is triggered when HAVE is not set). * acgeneral.m4 (AC_NEED_DECL): Rename as... (AC_CHECK_DECL): This. Make sure the arguments are the usual IF-FOUND, IF-NOT-FOUND. (AC_NEED_DECLS, AC_CHECK_DECLS): Likewise. * autoconf.texi (Generic Declarations): Document the changes aforementioned. * autoheader.m4 (AH_NEED_DECLS): Rename as (AH_CHECK_DECLS): This. (AH_HOOKS): Hook AH_CHECK_DECLS on AC_CHECK_DECLS instead of _NEED_. 1999-10-31 Akim Demaille <akim@epita.fr> Revamp the handling of the arguments of config.status: instead of looping over config_files etc. to recognize the file names, use the case which handles the options. Suggested by Alexandre Oliva. * acgeneral.m4 (ifset): Rename as... (ifval): This. All callers changed. (ifset): New macro, which tests if a macro is set to a non empty value. * acgeneral.m4: Initialize growing lists and strings to empty, to ease the tests. (AC_CONFIG_HEADER): Quote AC_LIST_HEADERS in the define, to handle the case AC_LIST_HEADERS is initialized. * acgeneral.m4: (AC_OUTPUT_CONFIG_STATUS): New macro, pulled out from... (AC_OUTPUT): Instead of using $1, $2 and $3, pass them to the official macros (AC_CONFIG_FILES, AC_OUTPUT_COMMANDS). Call AC_OUTPUT_CONFIG_STATUS. (option handling): Use the case-esac to recognize arguments. (AC_OUTPUT_COMMANDS): Fix the missing fi;done. 1999-10-31 Akim Demaille <akim@epita.fr> Add a means to specify commands to be run by config.status. At the difference of AC_OUTPUT_COMMANDS, require that the set of commands be named, so that both CONFIG_COMMANDS=foo ./config.status and ./config.status foo perform the Right Thing. * acgeneral.m4 (AC_CONFIG_UNIQUE): Also check in AC_LIST_COMMANDS. (AC_CONFIG_FILES): Remove a dead pushdef. (AC_CONFIG_COMMANDS): New macro. (AC_LIST_COMMANDS): New config list. (AC_LIST_COMMANDS_COMMANDS): New growing string. (AC_OUTPUT_COMMANDS_COMMANDS): New macro, output config commands in config.status. (AC_OUTPUT): Take AC_LIST_COMMANDS into account. (AC_OUTPUT): Call AC_OUTPUT_COMMANDS_COMMANDS. 1999-10-31 Akim Demaille <akim@epita.fr> New macro: AC_CONFIG_FILES which is very much like AC_OUTPUT but that one associates commands to run when a config file is created. For instance for a shell script `foo', one uses AC_CONFIG_FILES(foo, chmod +x foo). In addition, check that the same name is never used twice in config files, headers, subdirs and links. * acgeneral.m4 (m4_append): Don't insert new line between elements. (m4_list_append): New macro. (AC_CONFIG_IF_MEMBER): New macro which tests if a file is member of a config list. (AC_CONFIG_UNIQUE): New macro which ensures that a config file name is not yet used. (AC_CONFIG_HEADER, AC_CONFIG_LINKS, AC_CONFIG_SUBDIRS): Use AC_CONFIG_UNIQUE. * acgeneral.m4 (AC_CONFIG_FILES): New macro. (AC_LIST_FILES): New list, which stores arguments of AC_CONFIG_LISTS the same as AC_LIST_LINKS stores AC_CONFIG_LINKS etc. (AC_OUTPUT): No longer rely on $1 to designate the config files: register them via AC_CONFIG_FILES. All uses of $1 replaced by uses of AC_LIST_FILES. (AC_OUTPUT_FILES): Run the commands associated to the CONFIG_FILES. 1999-10-31 Akim Demaille <akim@epita.fr> * autoconf.sh (Looking for bugs): In addition to AC_, match AH_ and AM_. 1999-10-31 Akim Demaille <akim@epita.fr> Provide the m4 infrastructure for defining AH_ hooks. * autoheader.m4 (AH_HOOK): New macro. Hook all the AC_ macros to their AH_siblings in AH_HOOKS. Run AH_HOOKS. * acgeneral.m4 (m4_append): New macro. (m4_list_append, m4_list_add): Removed. 1999-10-31 Akim Demaille <akim@epita.fr> * acspecific.m4: Formating changes. * acgeneral.m4: Likewise. 1999-10-31 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_CHECK_MEMBER, AC_CHECK_MEMBERS): New macros. * autoheader.m4 (AH_CHECK_MEMBERS): New macro. (epilogue): Hook AH_CHECK_MEMBERS on AC_CHECK_MEMBERS. 1999-10-31 Akim Demaille <akim@epita.fr> * autoheader.m4 (AC_FUNC_ALLOCA): Rename from this ... (AH_FUNC_ALLOCA): ... to this. Includes all the needed templates. (AC_C_CHAR_UNSIGNED): Rename from this ... (AH_C_CHAR_UNSIGNED): ... to this. 1999-10-31 Ben Elliston <bje@cygnus.com> * Makefile.am (CLEANFILES): New explicit variable. (editsh): acdatadir is no longer defined, so use pkgdatadir. (editpl): Likewise. From Akim Demaille. * Makefile.in: Regenerate. * configure: Regenerate. * aclocal.m4: Generate. * Makefile.in: Regenerate with Automake. * testsuite/Makefile.in: Likewise. 1999-10-31 Akim Demaille <akim@epita.fr> Use Automake. Based on files from Ben Elliston. * acgeneral.m4: No longer define AC_ACVERSION, include acversion.m4. * acversion.m4.in: New AC_CONFIG_FILE. * acspecific.m4: Few formating changes. * autoconf.texi: No longer define EDITION, VERSION and UPDATED: include version.texi. AC_OUTPUT the Makefiles mentioned below and acversion.m4. * configure.in: Use AM_INIT_AUTOMAKE. Do not AC_ARG_PROGRAM: AM_INIT_AUTOMAKE does it. * Makefile.am: New file. * mdate-sh: Likewise. * missing: Likewise. * testsuite/Makefile.am: Likewise. 1999-10-31 Ben Elliston <bje@cygnus.com> * acspecific.m4 (AC_PROG_CC_STDC, AC_C_PROTOTYPES): Inherit from Automake. From Franc,ois Pinard. * autoconf.texi (Particular Programs): Document AC_PROG_CC_STDC. (C Compiler Characteristics): Document AC_C_PROTOTYPES. * testsuite/autoconf.s/defines.exp: Changed `fail' and `pass' in `xfail' and `xpass'. The test suite checks that acconfig.h templates the AC_DEFINEs. Since we no longer rely on acconfig.h, the test is obsolete. * acspecific.m4 (AC_PROG_BINSH, AC_PROG_SED): Don't quote the name of the macro defined; the test suite does not recognize this syntax. From Akim Demaille. 1999-10-27 Ben Elliston <bje@cygnus.com> * autoconf.texi (Generic Programs): @defmac for AC_PATH_TOOL may not span multiple lines. 1999-10-26 Ben Elliston <bje@cygnus.com> * INSTALL: Regenerate. 1999-10-16 Ben Elliston <bje@cygnus.com> * acspecific.m4 (AC_PROG_CXX): gcc is not a C++ compiler. * autoconf.texi (AC_PROG_CXX): Update documentation. 1999-10-13 Ben Elliston <bje@cygnus.com> * acconfig.h: Reintroduce missing definitions due to test suite regressions. * autoconf.texi (Configuration Headers): Document the potential trouble caused by autoheader and boilerplate files. Fix for PR autoconf/45. 1999-10-07 Alexandre Oliva <oliva@lsd.ic.unicamp.br> * Makefile.in (dist): Fixed for srcdir != objdir. 1999-10-07 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_CHECK_HEADER_DIRENT): Reintroduce its AC_DEFUN. 1999-10-06 Akim Demaille <akim@epita.fr> * acspecific.m4: Various formatting changes. * acspecific.m4 (AC_PROG_CC_WORKS): Declare main returns an int. 1999-10-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> Shell meta characters in an argument causes the configure script to freak out and generate a config.status file that contains syntax errors. Bug triggered by ./configure --with-foobar=\''`"$'. * acgeneral.m4 (AC_INIT_PARSE_ARGS): Quote single quotes that end up between single quotes. Protect arguments of echo with double quotes. (AC_INIT_PREPARE): Likewise. (AC_PATH_PROG): Protect argument of test. (AC_OUTPUT): Quote meta characters in ac_configure_args. 1999-10-05 Ben Elliston <bje@cygnus.com> * autoconf.texi (AC_PATH_XTRA): Correctly document the behaviour when X is not available. 1999-10-05 Akim Demaille <akim@epita.fr> The sed quoting script depends on the shape of the commands used by AC_SUBST. The latter was changed, but not the former. Bug triggered with FOO='%\c' AC_SUBST(FOO). * acgeneral.m4 (AC_OUTPUT_FILES): Fix the sed quoting script. 1999-10-05 Akim Demaille <akim@epita.fr> When you rely on the `t' flag of sed for the immediately preceding substitution, use a combination of `: foo; t foo'. Bug triggered if you AC_DEFINE(FOO, "%"). Additionally, work around a bug in IRIX sed. Suggested by Ken Pizzini. * acgeneral.m4 (AC_OUTPUT_HEADER): Added a label and a test in the sed code of `$ac_cs_root.hdr'. 1999-10-05 Akim Demaille <akim@epita.fr> Implement AC_PATH_TOOL. Submited by Gary V. Vaughan. * acgeneral.m4 (AC_PATH_TOOL): New macro. * autoconf.texi (Generic Programs): Document. 1999-10-05 Akim Demaille <akim@epita.fr> Handle arbitrary version numbers. Reported by H.J. Lu. * acgeneral.m4 (m4_split): Support a second optional argument: a regexp to specify where to split. (m4_compare): New macro, compares arbitrary long m4 lists of integers. (AC_PREREQ_SPLIT, AC_PREREQ_CANON, AC_PREREQ_COMPARE): Removed, replaced by more generic macros. (AC_PREREQ): Reimplemented, using m4_compare and m4_split. 1999-10-04 Akim Demaille <akim@epita.fr> Beware of the expansions of $n in comments. * acgeneral.m4 (AC_OUTPUT): Changed $1 into $[1] in dnls. 1999-10-04 Akim Demaille <akim@epita.fr> Revert partially the previous changes: AC_CHECK_HEADERS_DIRENT is used by AC_HEADER_DIRENT. * autoheader.m4: Restablish the hook for AC_CHECK_HEADERS_DIRENT. * acspecific.m4 (AC_CHECK_HEADERS_DIRENT, AC_CHECK_HEADER_DIRENT): Reinserted. 1999-10-02 Akim Demaille <demaille@inf.enst.fr> * acgeneral.m4: Instead of just undefining eval, format, include and shift, rename them to m4_eval, etc. 1999-10-02 Akim Demaille <akim@epita.fr> AC_DIR_HEADERS is hasbeen'ed. * acspecific.m4 (AC_DIR_HEADER): Raised from obsolete to hasbeen. * acspecific.m4 (AC_CHECK_HEADERS_DIRENT, AC_CHECK_HEADER_DIRENT): Removed, were used only by AC_DIR_HEADER and were not documented. * autoheader.m4: Remove the hooks for AC_CHECK_HEADERS_DIRENT. * autoconf.texi (Particular Headers): Removed the documentation of AC_DIR_HEADER. * autoconf.texi (Environment Variables): Remove the very last traces of documentation of --env-VAR. 1999-10-02 Akim Demaille <akim@epita.fr> Remove hasbeen'ed macros from the documentation. * autoconf.texi (Obsolete Macros): Document AC_HASBEEN. * autoconf.texi (Libraries): Remove the documentation of AC_HAVE_LIB. (Particular Headers): likewise for AC_UNISTD_H, AC_MEMORY_H, AC_USG. (C Compiler Characteristics): Likewise for AC_INT_16_BITS, AC_LONG_64_BITS. 1999-10-01 Akim Demaille <akim@epita.fr> Make the handling of the configuration links (AC_LINK_FILES) exactly the same as that of configurations files (AC_OUTPUT_FILES) and headers (AC_CONFIG_HEADERS). As a result, it is sane to run ./config.status src/libmy_lib or CONFIG_LINKS=src/lib_mylib:lib/lib_mylib ./config.status * acgeneral.m4 (AC_LINK_FILES): Use AC_FATAL to diagnose bad number of argument. Obsoleted (but implemented) in favor of AC_CONFIG_LINKS. * acgeneral.m4 (AC_CONFIG_LINKS): New macro. Takes space separated list of DEST:SOURCES arguments. * acgeneral.m4: Rename each occurence of AC_LIST_HEADER as AC_LIST_HEADERS for consistency. * acgeneral.m4 (AC_OUTPUT, config.status prologue): Move the definition of config_files and config_headers to the top. Add the definition of config_links. Change the help message to use the aforementioned variables. * acgeneral.m4 (AC_OUTPUT_LINKS): Adapted to the new scheme of AC_LIST_LINKS. * autoconf.texi (Output, AC_OUTPUT): Mention AC_CONFIG_LINKS. (Invoking config.status): Mention CONFIG_LINKS. * autoconf.texi (Using System Type): Document AC_CONFIG_LINKS. Explicit the obsoleteness of AC_LINK_FILES. 1999-10-01 Akim Demaille <akim@epita.fr> Moving most of the task of creating config.h.in from sh to m4. Getting rid of acconfig.h by supply a major new family of macros: AH_* which make it possible to insert arbitrary text into config.h.in. * autoheader.m4: Major rewrite: introduction of a set of macros AH_ that produce code into config.h.in. There are two sets of macros: generic macros, or specialized, documented below. The basic idea is that an AC_FOO macro which needs an entry in config.h.in should have a sibling AH_FOO which expands into that entry. In a near future, these macros will be moved next to their siblings. * autoheader.m4 (AH_VERBATIM, AH_DEFINE, AH_DEFINE, AH_NEED_DECLS, AH_CHECK_SIZEOF, AH_CHECK_FUNCS, AH_CHECK_HEADERS, AH_CHECK_HEADERS, AH_CHECK_LIB, AH_PROG_LEX, AH_FUNC_ALLOCA, AH_C_CHAR_UNSIGNED, AH_AIX, AH_F77_WRAPPERS): New macros. * autoheader.m4 (End section): Bind AC_ macros to their AH_siblings. * autoheader.sh: Remove the sections in charge of SYMS, TYPES, FUNCS, HEADERS, LIBS and DECLS: autoheader.m4 is now in charge of these. * autoheader.sh (options): Added -d, --debug, which does not remove the temporary files. * autoheader.sh: Instead of redirecting stdout to the output stream, always output to a temporary file. This allows to change slightly the consistency check: before autoheader would check that each non documented AC_DEFINE is templated in an acconfig. Now it just checks whether the template is in the output file. * acconfig.h: Completely emptied, the remaining templates (_ALL_SOURCE, __CHAR_UNSIGNED__, F77_FUNC, F77_FUNC_, HAVE_STRINGIZE, and STACK_DIRECTION) are now either associated to their AC_DEFINE, or to one of the new AH_ macros. * acgeneral.m4: Reordering of the m4 macros which are not specific to Autoconf. * acgeneral.m4 (AC_HAVE_LIB): Promoted from obsolete to hasbeen. * acgeneral.m4 (AC_TR_CPP): Fixed quoting problem, and missing ^ in patsubst. (AC_TR_SH): Fixed quoting problem. 1999-09-29 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_WRAP): Don't output an extra space after the last word. 1999-09-29 Ben Elliston <bje@cygnus.com> * acspecific.m4 (AC_FUNC_GETLOADAVG): Check for the kstat_open() function in libkstat (on systems such as Solaris). This family of functions is preferred since they don't require setgid permissions to use them. Fix for PR autoconf/65. 1999-09-29 Akim Demaille <akim@epita.fr> * acconfig.h: Commit the change announced below. 1999-09-29 Akim Demaille <akim@epita.fr> * acspecific.m4 (AC_C_CONST): Changed from const charset x; to const charset x = {0, 0}; From Jim Meyering. 1999-09-28 Akim Demaille <akim@epita.fr> Start to get rid of acconfig.h. It is an anachronism. * acgeneral.m4 (_AC_SH_QUOTE): Both cases must be evaluated the same number of times. * acconfig.h (_ALLOCA, CLOSEDIR_VOID, const, CRAY_STACKSEG_END, DGUX, DIRENT, GETGROUPS_T, GETLOADAVG_PRIVILEGED, GETPGRP_VOID, gid_t, HAVE_ALLOCA, HAVE_ALLOCA_H, HAVE_DOPRNT, HAVE_FNMATCH, HAVE_GETLOADAVG, HAVE_GETMNTENT, HAVE_LONG_DOUBLE, HAVE_LONG_FILE_NAMES, HAVE_MMAP, HAVE_RESTARTABLE_SYSCALLS, HAVE_ST_BLKSIZE, HAVE_ST_BLOCKS, HAVE_STRCOLL, HAVE_ST_RDEV, HAVE_STRFTIME, HAVE_SYS_WAIT_H, HAVE_TM_ZONE, HAVE_TZNAME, HAVE_UNISTD_H, HAVE_UTIME_NULL, HAVE_VFORK_H, HAVE_VPRINTF, HAVE_WAIT3, inline, INT_16_BITS, LONG_64_BITS, MAJOR_IN_MKDEV, MAJOR_IN_SYSMACROS, _MINIX, NDIR, NEED_MEMORY_H, NLIST_NAME_UNION, NLIST_STRUCT, NO_MINUS_C_MINUS_O, F77_NO_MINUS_C_MINUS_O, _POSIX_1_SOURCE, _POSIX_SOURCE, RETSIGTYPE, SELECT_TYPE_ARG1, SELECT_TYPE_ARG234, SELECT_TYPE_ARG5, SETPGRP_VOID, SETVBUF_REVERSED, STAT_MACROS_BROKEN, STDC_HEADERS, SVR4, SYSDIR, SYSNDIR, SYS_SIGLIST_DECLARED, TIME_WITH_SYS_TIME, TM_IN_SYS_TIME, uid_t, UMAX, UMAX4_3, USG, vfork, VOID_CLOSEDIR, WORDS_BIGENDIAN, X_DISPLAY_MISSING, YYTEXT_POINTER): Removed their autoheader template. They are now documented with their own AC_DEFINE. * acgeneral.m4 (AC_HASBEEN): New macro. Same as AC_OBSOLETE, but dies. * acspecific.m4 (AC_UNISTD_H, AC_USG, AC_MEMORY_H, AC_INT_16_BITS, AC_LONG_64_BITS): Promoted from obsolete to hasbeen. * autoheader.m4 (AC_DEFINE_UNQUOTED): Define via AC_DEFINE, so that we program things only once. (AC_DEFINE): Use AC_WRAP and _AC_SH_QUOTE. It is now safe to have backquotes and extra spaces in the third argument, without yielding a bad result. * autoheader.m4: Instead of a huge `eval', use a temporary file. (option handling): Added --debug, to keep the temporary files. Fixed a couple of missing quotes. 1999-09-28 Akim Demaille <akim@epita.fr> Make AC_FOREACH be robust to active symbols. * acgeneral.m4 (m4_split, m4_join, m4_strip): New macros. (AC_FOREACH_COMMA): Rename as... (m4_foreach): this. (_AC_CAR): Renamed as... (_m4_car): this. (_AC_FOREACH): Renamed as... (_m4_foreach): this. (_AC_COMMATIZE): Removed. (AC_FOREACH): Rewritten using m4_split, m4_join, m4_strip, and m4_foreach. * acgeneral.m4: Spell checked. * autoconf.texi: Likewise. 1999-09-28 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_NEED_DECL): When $4 is given, don't provide defaults headers. Change the message from `have' to `need'. Change the actions for `if-(not-)found' to `if-(not-)needed. Remove trailing parentheses. * acgeneral.m4 (AC_NEED_DECLS): Change the actions for `if-(not-)found' to `if-(not-)needed. Define NEED_DECL_foo, instead of NEED_foo_DECL. * autoheader.sh (decls): Reflect this. * autoconf.texi (Generic Declarations): Update. 1999-09-27 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT): Divert AC_OUTPUT_FILE to AC_DIVERSION_KILL if there are no CONFIG_FILES. (AC_OUTPUT, ac_cs_usage): Output the list of files to instanciate only if there are. 1999-09-27 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECK_DECL): Renamed as... (AC_NEED_DECL): This. (AC_CHECK_DECLS): Renamed as... (AC_NEED_DECLS): This. (AC_NEED_DECL): Include <stdio.h>, <memory.h>, <string.h>, <strings.h>, <stdlib.h>, <stddef.h>, and <unistd.h>. * autoconf.texi (Generic Declarations): Updated. 1999-09-27 Ben Elliston <bje@cygnus.com> * autoscan.pl (scan_files): Emit an AC_PROG_CC invocation to configure.scan if there are any C files present. Fix for PR autoconf/19. 1999-09-26 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_WRAP): Rewritten. (AC_HELP_STRING): Wrapper of AC_WRAP. * acgeneral.m4 (_AC_SH_QUOTE): Rewritten. Don't try to handle both backslashed and non backslashed backquotes in a single string: consider that either all the backquotes are quoted, or none. 1999-09-26 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_PATH_PROG): Use a single case statement for Unix and DOS absolute paths. * acgeneral.m4 (AC_CHECK_SIZEOF): Fix a typo. Allow a third default argument: extra headers. * autoconf.texi (C Compiler Characteristics): Document. * acgeneral.m4 (AC_CHECK_TYPE): Convert to the AC_VAR_* family. Allow a third optional argument: extra includes. * autoconf.texi (Generic Typedefs): Documents. 1999-09-26 Ben Elliston <bje@cygnus.com> * acgeneral.m4 (AC_OUTPUT_LINKS): Eliminate gratuitous spaces from $ac_sources if this variable is otherwise empty. Fix for PR autoconf/30. 1999-09-25 Ben Elliston <bje@cygnus.com> * autoconf.texi (AC_FUNC_SETVBUF): Do not mention which systems might have their setvbuf() arguments reordered. It's difficult to accurately determine and is not essential. Fix for PR autoconf/7. * acgeneral.m4 (AC_LINK_FILES): Emit an error if an incorrect number of arguments are collected. Fix for PR autoconf/10. 1999-09-25 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT, handling of options): Make it possible to specify the files to configure on the command line instead of via envvars. Document it. 1999-09-25 Akim Demaille <akim@epita.fr> * acgeneral.m4: Rename the occurences of the variable `confstat' as `ac_cs_root'. The previous name was breaking the naming scheme. 1999-10-24 Akim Demaille <akim@epita.fr> * TODO: Updated. Added a section for 2.15 and 3. 1999-09-24 Ben Elliston <bje@cygnus.com> * acspecific.m4 (AC_HEADER_STDC): Define ISLOWER and ISUPPER macros correctly on EBCDIC systems. Contributed by Kurt D. Zeilenga. Fix for PR autoconf/6. 1999-09-24 Jim Blandy <jimb@zwingli.cygnus.com> * acspecific.m4 (AC_C_VOLATILE): New test. * acconfig.h: Add new entry for `volatile'. * autoconf.texi (C Compiler Characteristics): Document it. 1999-09-24 Ben Elliston <bje@cygnus.com> * autoreconf.sh: Do not run autoheader if AC_CONFIG_HEADER is commented out in configure.in. Reported by Erez Zadok as a fix for PR autoconf/21. * install.texi: Replace `can not' with `cannot'. 1999-09-23 Pavel Roskin <pavel_roskin@geocities.com> Avoid that comments from aclocal.m4 show up in configure when using AC_REVISION. * acgeneral.m4: New diversion levels AC_DIVERSION_KILL and AC_DIVERSION_BINSH introduced. Use AC_DIVERSION_KILL as the initial value for AC_DIVERSION_CURRENT. (AC_INIT_BINSH): Set AC_DIVERSION_BINSH explicitly (AC_REVISION): Likewise. (AC_INIT): Set AC_DIVERSION_NOTICE when calling AC_INIT_NOTICE. 1999-09-23 Akim Demaille <akim@epita.fr> * NEWS: Document AC_ARG_VAR. * acspecific.m4 (AC_C_LONG_DOUBLE): Avoid a needed execution by using a pure compilation test. Excellent for cross compilation. From Kaveh R. Ghazi. 1999-09-22 Akim Demaille <akim@epita.fr> * install.texi: Give more details on envvar handling. * acgeneral.m4 (AC_HELP_STRING): Add a third argument to tune the width of the first column. (AC_INIT_NOTICE): Initialize ac_arg_enable_help, ac_arg_with_help, and ac_arg_var_help. * acgeneral.m4 (AC_INIT_PARSE_ARGS): Remove the handling of --env-var=. After debate, the solution chosen to specify envvars to configure is a` la make: ./configure VAR=VAL. (AC_INIT_PARSE_ARGS, --help): Output ac_arg_enable_help, ac_arg_with_help, and ac_arg_var_help. * acgeneral.m4 (AC_ARG_VAR): New macro, to register and document influent envvars. * acspecific.m4 (AC_PROG_CC): Document CFLAGS. This is mainly to test AC_ARG_VAR. Var to document are to be defined. 1999-09-22 Akim Demaille <akim@epita.fr> * acgeneral.m4 (m4_default): New macro. (AC_CHECK_LIB): When ACTION-IF-FOUND is specified, don't perform the default action. Reported by Pavel. 1999-09-22 Ben Elliston <bje@cygnus.com> * config.guess: Clear the CCOPTS environment variable before invoking the C compiler on HP-UX. This is necessary to guarantee that the test program is compiled correctly. Reported by Dietmar P. Schindler. 1999-09-22 Linas Vepstas <linas@linas.org> * config.guess: Add OS/390 match pattern. * config.sub: Add mvs, openedition targets. 1999-09-21 Nick Clifton <nickc@cygnus.com> * config.sub: Add fr30 target. 1999-09-21 Ben Elliston <bje@cygnus.com> * configure.in: Check if an appropriate version of GNU m4 is installed at configure-time rather than at runtime. From Pavel Roskin. Fix for PR autoconf/2. * configure: Regenerate. 1999-09-21 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INIT_PARSE_ARGS, --help message): Use quoted heredocs to avoid problems with quotes. 1999-09-21 Akim Demaille <akim@epita.fr> * NEWS: Updated. * THANKS: Likewise. * acgeneral.m4 (AC_CHECK_HEADER): Use AC_VAR_*. (AC_CHECK_HEADERS): Adapted. * acgeneral.m4 (AC_TR): Remove, it is useless. (AC_TR_CPP): Updated version of formerly AC_TR_DEFINE, based on the model of AC_TR_SH. All callers changed. * autoconf.sh (Checking for Bugs): Remove the indirection that made the `sort -u' useless. 1999-09-21 Akim Demaille <akim@epita.fr> * autoconf.sh (Last sed cmd): Change also @PND@ to `#', since this is also a symbol very hard to quote in m4. * acgeneral.m4 (AC_CHECK_LIB): Use AC_VAR_*. * acgeneral.m4: Use `m4_BUILTIN' instead of indirection via `builtin'. 1999-09-21 Akim Demaille <akim@epita.fr> * autoconf.texi (Particular Structures): Move documentation of AC_HEADER_STAT and AC_HEADER_TIME from here... (Particular Headers): to here. (Declarations): New section. (Particular Headers): Move doc of AC_DECL_SYS_SIGLIST from here... (Particular Declarations): to here. 1999-09-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * acgeneral.m4 (AC_CHECK_FUNC_DECL, AC_CHECK_FUNC_DECLS): New macros. * autoconf.texi (AC_CHECK_FUNC_DECL, AC_CHECK_FUNC_DECLS): Document. * autoheader.m4: Add support for AC_CHECK_FUNC_DECLS. * autoheader.sh: Likewise. 1999-09-21 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_SHELL_IFELSE): New macro. (AC_VAR_IF_SET): Use it. (AC_CHECK_FUNC): Likewise. * Makefile.in (${srcdir}/configure): Use autoconf.sh to build Autoconf's configure. Before the building was performed running m4 at hand, but much was not done (e.g., __oline__, @BKL@... expansion) 1999-09-20 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_OUTPUT): Don't remove the CONFIG_HEADERS unconditionaly: it breaks the `config.h has not changed' trick. 1999-09-20 Ben Elliston <bje@cygnus.com> * autoheader.sh: Bourne shell compatibility fix. From Pavel Roskin. 1999-09-20 Pavel Roskin <pavel_roskin@geocities.com> * autoheader.sh: Fix the tr invocation. 1999-09-17 Ben Elliston <bje@cygnus.com> * config.guess: Detect QNX version 4. * config.sub: Handle `qnx' and `i386-qnx' aliases. 1999-09-17 Erez Zadok <ezk@cs.columbia.edu> * config.guess: Eliminate the trailing dot if ${UNAME_RELEASE} is 1.4-<SOMETHING>. Fix for PR autoconf/22. 1999-09-17 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INIT_PARSE_ARGS): Improve configure's --help. * acgeneral.m4 (AC_OUTPUT): Change the root of filenames of config.status from $conftest to $confstat. The previous patch to make config.status reentrant was wrong, because it changed some `conftest' that are used by configure into `$conftest', while it was for config.status only. To avoid another confusion like this, all the filenames of config.status should be `$confstat*', and those of configure should be `conftest*'. (AC_OUTPUT): Rename the uses of `ac_file' for the sed fragments as `ac_sed_frag'. * acgeneral.m4 (AC_OUTPUT): This macro used to open the here documents that configure uses to generate config.status, included that of the submacros. Now, it no longer handles the here documents for its subroutines (it was far to hard to track). (AC_OUTPUT_FILES): Open and close your here documents to $CONFIG_STATUS. (AC_OUTPUT_HEADER): Likewise. (AC_OUTPUT_LINKS): Likewise. * acgeneral.m4 (AC_OUTPUT_FILES): Move $ac_vpsub and $extrasub from the AC_SUBST substitutions (i.e., that of @SHELL@ etc.) to the specific section (that of @srcdir@ etc.). Now the ``general substitution'' section is absolutely uniform. * acgeneral.m4 (AC_SUBST): Change sed call from `s%@from@%to%g' into `s%@from@%to%;t t'. (AC_SUBST_FILE): Likewise. (AC_OUTPUT_FILES): Optimize the sed scripts by branching if there are no `@' on the line. Impressive speed up. * Makefile.in (DISTFILES): Add THANKS. * THANKS: New file. 1999-09-15 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_CHECK_FILE): Use ifset. (AC_CHECK_FUNC): Updated to use AC_VAR_*, and AC_CACHE_CHECK. (AC_CHECK_SIZEOF): Likewise. (AC_CACHE_CHECK): Use AC_MSG_RESULT_UNQUOTED. (AC_MSG_RESULT_UNQUOTED): New macro. 1999-09-15 Alexandre Oliva <oliva@lsd.ic.unicamp.br> Fix for PR autoconf/28. * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't assume LF is \012, use `echo` followed by a non-blank, within quotes. * autoheader.sh (syms): Likewise. * configure: Rebuilt. 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br> * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't assume LF is \012, use `echo` followed by a non-blank, within quotes. * autoheader.sh (syms): Likewise. * configure: Rebuilt. Reported by Christian Krone. * acgeneral.m4 (AC_INCLUDE): New macro. * autoconf.texi: Document it. * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Save INSTALL in ac_given_INSTALL, so that we can adjust relative pathnames for sub-configures. * acgeneral.m4 (Configuration): Accept --env-VAR=VALUE and VAR=value. * autoconf.texi, install.texi: Document it. * configure: Rebuilt. 1999-09-14 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_HELP_STRING): Rewrite in m4. Have m4 work, and give a break to sh. (_AC_FOREACH): Be careful not to evaluate the arguments. A loop over *quoted* macro names should loop over the macro names, not upon their expansion. (_AC_COMMATIZE): Also swallow end of lines. * autoconf.texi (Pretty Help Strings): Updated to reflect the changes. 1999-09-13 Akim Demaille <akim@epita.fr> * acgeneral.m4 (ifset): New helpy tiny macro. (AC_OUTPUT): Improved --help of config.status. (AC_OUTPUT): Remove inconditionaly all the files to be updated. (AC_OUTPUT): Use pid to define the temporary file names in order to allow parallel builds. * autoconf.sh: Substitute also /@BKL@/[/ /@BKR@/]/ /@DLR@/$/ so that these characters are more easily accessible from m4 without turning changequote juggling into a nightmare. * acgeneral.m4 (AC_WRAP): New macro, for word wrapping. * autoconf.texi: Update the direntry for more modern Texinfos. Add pointer to configure and config.status. Remove the dots from the menus: horizontal space is precious. (Invoking config.status): More traditional presentation of the options. 1999-09-07 Ben Elliston <bje@cygnus.com> * autoreconf.sh: Recognise -v as a synonym for --verbose. 1999-09-07 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * Makefile.in (INSTALL, standards.info, autoconf.info): MiKTeX for Windows treats all options after the first filename as additional filenames, so real options must appear before the first filename. 1999-09-07 Steven G. Johnson <stevenj@alum.mit.edu> * autoconf.texi (LDFLAGS, LIBS): Document that -L linker flags should be kept in LDFLAGS and not LIBS. 1999-09-07 Jim Meyering <meyering@ascend.com> * acgeneral.m4 (AC_SEARCH_LIBS): Use $ac_lib as the index, not $i. 1999-09-06 Ben Elliston <bje@cygnus.com> * acspecific.m4 (AC_FUNC_ALLOCA): Rename cache variable to avoid name clashes with AC_CHECK_HEADER(alloca.h). 1999-09-05 Steve Chamberlain <sac@pobox.com> * config.sub: Add support for configuring for picoJava (pj). 1999-09-05 Ben Elliston <bje@cygnus.com> * acgeneral.m4 (CONFIG_AUX_DIRS): Try running `shtool install'. Contributed by Ralf S. Engelschall. 1999-09-04 Ben Elliston <bje@cygnus.com> * config.guess: Use POSIX compliant shell code on DG/UX. Suggested by Stephen Gildea. 1999-09-04 Pavel Roskin <pavel_roskin@geocities.com> * acgeneral.m4 (AC_OUTPUT_FILES): Output comment to not only `Makefile', but also `makefile'. 1999-09-04 Jim Blandy <jimb@zwingli.cygnus.com> * Makefile.in (install): Don't freak if the M4FROZEN files were never generated. m4 1.1 is supported, but doesn't freeze files. 1999-09-04 Scott Bambrough <scottb@netwinder.org> * config.guess: Autodetect ArmLinux using 2.9.1.xx linker emulation names and using the emulation names from the linker from the binutils CVS tree. * config.sub: Change manufacturer name for the NetWinder alias from Corel to Rebel. 1999-09-04 Jeremy Elson <jelson@circlemud.org> * autoheader.m4 (AC_CHECK_HEADER): Define. 1999-09-02 Tom Tromey <tromey@cygnus.com> * autoheader.sh: Allow multiple spaces between #undef and symbol name. 1999-09-01 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_ACVERSION): Bump to 2.14.1 to differenciate the experimental branch from the main trunk. * acgeneral.m4 (AC_FOREACH_COMMA): New macro, to perform m4 loops on m4 lists (i.e., list='(item_1, item_2, ..., item_n)'). (AC_FOREACH): New macro, to perform m4 loops on shell lists (i.e., list='item_1 item_2 ... item_n'). * acgeneral.m4 (AC_DEFUN): Now accept two other optionnal parameters: the name of the macro which is specialized here, and the name of the first argument. For instance `AC_CHECK_FNMATCH' should be declared as specializing `AC_CHECK_FUNC' for `fnmatch' as first argument. * acgeneral.m4 (AC_CHECK_FILES): Use AC_FOREACH for looping, instead of the shell's loop. * acgeneral.m4 (AC_TR): In addition to transliteration, provide a means to specify the valid destination alphabet and a default character for aliens characters. This is in order to remove characters such as `+:-' etc. that may appear in file names, but are not valid for shell variables or #defines. (AC_TR_DEFINE): New macro, maps anything to a valid uppercase #define rhs. (AC_TR_UPCASE_NAME): Replaced by AC_TR_DEFINE. All callers changed. (AC_TR_UPCASE_FILE): Likewise. * acgeneral.m4 (AC_TR_SH): Don't use the generic AC_TR: there is a difficult problem of quoting between m4 and sh. Use the variable $ac_tr_sh to work around this difficulty. (AC_VAR_TEST_SET): New macro, which tests if a variable is set. (AC_VAR_IF_SET): New `ifelse' macro. (AC_CACHE_VAL): Use AC_VAR_IF_SET. (AC_INIT_NOTICE): Define $ac_tr_sh. * acgeneral.m4 (AC_CHECK_FILE): Converted to use AC_TR and AC_VAR families. * acgeneral.m4: Fixed the regular expressions: `$' shall not be portably in a sed \(\) group. 1999-08-28 Ben Elliston <bje@cygnus.com> * config.guess: Once and for all, emit the correct string for Unixware 7! Contributed by Mike Hopkirk. * acspecific.m4 (AC_C_INLINE): Qualify the return type of the dummy inlined function to satisfy newer C++ compilers. Fix for PR autoconf/49. 1999-08-26 Ben Elliston <bje@cygnus.com> * autoconf.texi (Changed Results): Correct an error in one of the examples. Fix for PR autoconf/38. 1999-08-25 Ben Elliston <bje@cygnus.com> * autoconf.texi (Cache Variable Names): Be more explicit about the requirements for cache variable names. Fix for PR autoconf/53. 1999-08-25 Alexandre Oliva <oliva@dcc.unicamp.br> * autoreconf.sh: Run aclocal with the -I option only if aclocal_dir != `.'. Fix for PR autoconf/44. 1999-08-22 Matthew D. Langston <langston@SLAC.Stanford.EDU> * acspecific.m4 (AC_PROG_CC): Remove uname test for win32/Cygwin, and just test for `cl' as a last resort. * autoconf.texi (Particular Programs): Document new optional argument to AC_PROG_CC, AC_PROG_CXX and AC_PROG_F77. Document additions to the Fortran 77 compiler search list. * acspecific.m4 (AC_PROG_F77): Add more Fortran 77 compilers to the search list. Contributed by Steven G. Johnson. (AC_PROG_CC): Likewise. (AC_PROG_CXX): Likewise. * acspecific.m4 (AC_PROG_F77): Add an optional first argument which gives the user an opportunity to specify an alternative search list for the compiler. 1999-08-18 Ben Elliston <bje@cygnus.com> * config.guess: Remove "/MP" from the release string on multiprocessor x86 machines running SVR4.0. Suggested by Tom Purcell. 1999-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * acgeneral.m4 (AC_CHECK_TYPE): Add optional third argument INCLUDES, which specifies the headers in which to search for the type in question. Also, pass a "description" argument to AC_DEFINE_UNQUOTED. * acconfig.h (mode_t, off_t, pid_t, size_t): Remove definitions. * autoconf.texi (AC_CHECK_TYPE): Document optional third argument. 1999-08-05 Jeffrey A Law <law@cygnus.com> * config.sub (-wrs case): Use os=-vxworks, not os=vxworks. 1999-08-05 Ben Elliston <bje@cygnus.com> * config.guess: Update patch submission address. 1999-08-05 Ben Elliston <bje@cygnus.com> * config.sub: Accept version number appended to OS name for MiNT. Contributed by Guido Flohr. 1999-08-04 Ben Elliston <bje@cygnus.com> * Makefile.in (INSTALL_SCRIPT): Substitute. (install): Install scripts with $(INSTALL_SCRIPT). 1999-07-20 Tom Tromey <tromey@cygnus.com> * autoheader.sh: Fixed regexp when searching for missing symbol. From Pavel Roskin. 1999-07-16 Tom Tromey <tromey@cygnus.com> * autoheader.sh: Be more stringent when looking to see if symbol is in a template file. 1999-07-15 Matthew D. Langston <langston@SLAC.Stanford.EDU> * acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): New implementation, to make maintenance easier. Grep the initial output so that we don't start parsing "-l" and "-L" too early. From Christopher Lee. * acgeneral.m4 (AC_LIST_MEMBER_OF): New "private implementation macro" use by AC_F77_LIBRARY_LDFLAGS. (AC_LINKER_OPTION): Likewise. 1999-07-11 Ben Elliston <bje@cygnus.com> * config.guess: Cray T3E has an Alpha CPU. 1999-07-04 Mark Elbrecht <snowball3@bigfoot.com> * acspecific.m4 (AC_PROG_CXX): Look for gpp after g++. gpp is the DJGPP C++ compiler, since `g++' is not a valid DOS filename. 1999-06-12 Ben Elliston <bje@cygnus.com> * config.guess: Detect Linux on ia64. * config.sub: Handle ia64. 1999-06-12 Ben Elliston <bje@cygnus.com> * config.guess: Handle `elf32ppclinux' from ld. Contributed by Cort Dougan. 1999-06-09 Matthew D. Langston <langston@SLAC.Stanford.EDU> * autoconf.texi (Pretty Help Strings): Synchronize documentation with implementation. 1999-06-04 Matthew D. Langston <langston@SLAC.Stanford.EDU> * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Fix sed regexp for handling CPP macros with args. 1999-06-04 Nick Clifton <nickc@cygnus.com> * config.sub: Add mcore target. 1999-06-03 Ben Elliston <bje@cygnus.com> * acgeneral.m4 (AC_ACVERSION): Correct version number. * autoconf.texi (EDITION): Likewise. (VERSION): Likewise. 1999-06-02 Matthew D. Langston <langston@SLAC.Stanford.EDU> * autoconf.texi (Pretty Help Strings): Document and regenerate the indices. * acgeneral.m4 (AC_HELP_STRING): New macro. * NEWS: Begin documenting "Major changes" for release 2.14. * acconfig.h (F77_FUNC): Add. (F77_FUNC_): Likewise. 1999-06-01 Akim Demaille <demaille@inf.enst.fr> * acgeneral.m4 (AC_PREFIX_PROGRAM): Use macros of the AC_TR_ family. (AC_HAVE_LIBRARY): Likewise. (AC_CHECK_FUNCS): Likewise. (AC_CHECK_FILES): Likewise. (AC_CHECK_SIZEOF): Likewise. * acgeneral.m4 (AC_TR): New macro which performs transliteration by m4 when possible, or by `tr' at configure time. (AC_TR_UPCASE_NAME): New macro, transliteration 'a-z' to 'A-Z'. (AC_TR_UPCASE_FILE): New macro, transliteration 'a-z./-' to 'A-Z___'. (AC_TR_SH): New macro, transliteration to valid sh var name. * acgeneral.m4 (_AC_SH_QUOTE): New macro which protects non protected backquotes against shell expansion. (AC_MSG_CHECKING): Use it. (AC_CHECKING): Use it. (AC_MSG_RESULT): Use it. (AC_VERBOSE): Use it. (AC_MSG_WARN): Use it. (AC_MSG_ERROR): Use it. * acgeneral.m4 (_AC_MESSAGE): New macro to report message at m4 time. (AC_WARNING): New macro to report warnings at m4 runtime. (AC_FATAL): New macro, to report fatal error at m4 runtime. * acspecific.m4 (AC_RSH): Use AC_FATAL. (AC_ARG_ARRAY): Idem. (AC_HAVE_BOUNDBANG): Idem. * acgeneral.m4 (AC_VAR_IF_INDIR): New macro. (AC_VAR_SET): Likewise. (AC_VAR_GET): Likewise. 1999-05-30 Matthew D. Langston <langston@SLAC.Stanford.EDU> * autoheader.m4 (AC_DEFINE): Ignore CPP macro arguments. (AC_DEFINE_UNQUOTED): Likewise. * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Change sed regexps to recognize CPP macros that take arguments. Reported, and based on a patch, by Steven G. Johnson. (AC_OUTPUT_HEADER): Likewise. * autoconf.texi (Fortran 77 Compiler Characteristics): Document new AC_F77_NAME_MANGLING macro. 1999-05-30 Steven G. Johnson <stevenj@alum.mit.edu> * autoconf.texi (Fortran 77 Compiler Characteristics): Document new AC_F77_FUNC_WRAPPER macro. * acspecific.m4 (AC_F77_WRAPPERS): New macro to define the F77_FUNC and F77_FUNC_ CPP macros to properly mangle the names of C identifiers so that they match the name mangling scheme used by the Fortran 77 compiler. (AC_F77_NAME_MANGLING): New macro to test for the name mangling scheme used by the Fortran 77 compiler. 1999-05-27 Matthew D. Langston <langston@SLAC.Stanford.EDU> * acgeneral.m4 (AC_CHECK_LIB): Translate the ":" character to a "_", which allows checking for member functions in C++ libraries. 1999-05-25 H.J. Lu <hjl@gnu.org> * config.guess (dummy): Changed to $dummy. 1999-05-22 Ben Elliston <bje@cygnus.com> * config.guess: Handle NEC UX/4800. Contributed by Jiro Takabatake. 1999-05-17 Ben Elliston <bje@cygnus.com> Merge with the EGCS source tree. * config.guess: Add detection for Interix and UWIN on Windows NT, OpenBSD on PA-RISC and UnixWare version 7.x. Improve usage of `tr' where sets are concerned. Detect all HP 9000 machines. Determine machine types more completely on older UnixWare systems. Determine C library version on GNU/Linux for the PowerPC. * config.sub: Numerous additions. Some cleanup. 1999-04-29 Ben Elliston <bje@cygnus.com> * config.sub: Handle `t3e' alias for Cray T3E. Contributed by James A. Lupo. 1999-04-19 Matthew D. Langston <langston@SLAC.Stanford.EDU> * acgeneral.m4 (AC_TRY_LINK_FUNC): Add support for Fortran 77. 1999-04-17 Paul Eggert <eggert@twinsun.com> * autoconf.texi, acspecific.m4 (AC_FUNC_MKTIME): New macro. taken from automake's AM_FUNC_MKTIME. * acfunctions: mktime now belongs to AC_FUNC_MKTIME. 1999-04-11 Philipp Thomas <kthomas@gwdg.de> * config.sub: Set basic_machine to i586 when target_alias = k6-*. 1999-04-11 Pavel Roskin <pavel_roskin@geocities.com> * autoheader.m4: Do not complain about using AC_TRY_RUN without a cross-compilation action--only autoconf should do this. 1999-04-11 Paul Eggert <eggert@twinsun.com> * acgeneral.m4 (AC_CHECK_TYPE): Allow first argument to be a shell variable. 1999-04-11 Ben Elliston <bje@cygnus.com> * acgeneral.m4 (AC_C_STRUCT_MEMBER): New macro. * acspecific.m4 (AC_STRUCT_TIMEZONE): Rewrite in terms of AC_C_STRUCT_MEMBER. (AC_STRUCT_ST_BLOCKS): Likewise. (AC_STRUCT_ST_BLKSIZE): Likewise. (AC_STRUCT_ST_RDEV): Likewise. * autoconf.texi (Structures): Update. Add menu for subnodes. (Particular Structures): New node. (Generic Structures): New node. (AC_C_STRUCT_MEMBER): Document. 1999-04-10 Ben Elliston <bje@cygnus.com> * mkinstalldirs: Add `-m' flag to specify the mode of a newly created directory. Add command line usage and `-h', `--help' options. Contributed by Jeff Garzik. 1999-04-08 Ben Elliston <bje@cygnus.com> * acspecific.m4 (AC_PROG_CC): Try using the `cl' C compiler under Cygwin. Contributed by Scott Stanton. * config.sub: Handle MPE/iX. 1999-04-07 Ben Elliston <bje@cygnus.com> * config.guess: Add more CLIX machines. From Thomas Dickey. 1999-04-06 Ben Elliston <bje@cygnus.com> * config.guess: Avoid the possibility of `ld' on GNU/Linux systems being something other than the GNU linker (such as a directory, in the case of GNU binutils). 1999-04-05 Ben Elliston <bje@cygnus.com> * config.sub: Add modern Alpha processors. Reorganise. * acspecific.m4 (AC_CYGWIN): Do not remove conftest*; let AC_TRY_COMPILE clean up after itself. (AC_MINGW32): Likewise. (AC_EMXOS2): Likewise. * acspecific.m4 (AC_EMXOS2): New macro. Contributed by Ryuji Abe. (AC_EXEEXT): Handle case for OS/2. (AC_PROG_CC_WORKS): Show $CPPFLAGS when running the compiler. (AC_PROG_CXX_WORKS): Likewise. * autoconf.texi (AC_EMXOS2): Document. (AC_EXEEXT): Mention OS/2. (AC_MINGW32): Move. (UPDATED): Update. 1999-04-02 Mike Stump <mrs@wrs.com> * acgeneral.m4 (AC_ARG_PROGRAM): Remove spaces, as there is one more pass through sh than you think. 1999-04-01 Ben Elliston <bje@cygnus.com> * standards.texi: Update from FSF. * acspecific.m4 (AC_PROG_INSTALL): Avoid using the installation script belonging to HP `pwplus' when running the install program. Contributed by Steven G. Johnson and Dave Adams. (AC_EXEEXT): Do not consider `.xcoff' as a possible executable filename extension. Contributed by Robert S. Maier. 1999-03-28 Tom Tromey <tromey@cygnus.com> * autoconf.texi (AC_OUTPUT_COMMANDS): Add to macro index. 1999-03-22 Ben Elliston <bje@cygnus.com> * config.guess: Rename BUILD_CC to CC_FOR_BUILD; there is a precedent for the usual name of this environment variable. 1999-03-22 Pavel Roskin <pavel_roskin@geocities.com> * autoheader.sh: Report an error if AC_CONFIG_HEADER is not present in the configure input file. 1999-03-21 Ben Elliston <bje@cygnus.com> * config.guess: Correct typo for detecting ELF on FreeBSD. 1999-03-14 Alexandre Oliva <oliva@dcc.unicamp.br> * config.guess: Recognise HP 9000/8x0 machines. 1999-03-11 Ben Elliston <bje@cygnus.com> * config.sub: Recognise hppa2.0w. Contributed by Erez Zadok. 1999-03-11 Pavel Roskin <pavel_roskin@geocities.com> * config.guess: Prefer $HOST_CC over $CC when deciding on a C compiler to compile stub programs. Allow this to be overridden with the value of $BUILD_CC in cross-compilation environments where the native compiler must be used for running tests on the host. 1999-03-11 Ben Elliston <bje@cygnus.com> * config.guess: Recognise MiNT and TOS on Atari machines. Contributed by Guido Flohr. * config.sub: Add aliases for MiNT. 1999-03-10 Ben Elliston <bje@cygnus.com> * config.guess: Recognise HP 9000/800. Merged from the master FSF version of this file. 1999-03-01 Gordon Matzigkeit <gord@trick.fig.org> * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't require that macro symbols be valid C identifiers. 1999-02-28 Ben Elliston <bje@cygnus.com> * acspecific.m4 (AC_FUNC_VFORK): Allow test to behave correctly when $ac_cv_func_vfork_works is the empty string. Contributed by <red@nym.alias.net>. * config.sub: Add `oskit' as a basic system type. From Godmar Back. 1999-02-26 Ben Elliston <bje@cygnus.com> * install-sh: Avoid trailing whitespace. * autoscan.pl (parse_args): Make compatible with Perl version 4. 1999-02-24 Ben Elliston <bje@cygnus.com> * config.guess: Detect LynxOS 3.x. Contributed by Giuseppe Guerrini. 1999-02-23 Ben Elliston <bje@cygnus.com> * config.guess: Detect ReliantUNIX on MIPS. Contributed by Andrej Borsenkow. Also remove random trailing whitespace. 1999-02-22 Ben Elliston <bje@cygnus.com> * autoconf.texi (System Services): Explain the semantics of the AC_SYS_RESTARTABLE_SYSCALLS macro in greater detail. Suggested by Franc,ois Pinard. 1999-02-22 Stu Grossman <grossman@cygnus.com> * acgeneral.m4 (AC_CANONICAL_SYSTEM): Explicitly require AC_CANONICAL_HOST, AC_CANONICAL_TARGET and AC_CONICAL_BUILD. (AC_CONFIG_AUX_DIR): Run auxillary shell scripts through $SHELL. Do not rely on their magic number. (AC_CANONICAL_THING): New macro. Cache results. (AC_CANONICAL_HOST): Reimplement; use AC_CANONICAL_THING. (AC_CANONICAL_TARGET): Likewise. (AC_CANONICAL_BUILD): Likewise. (AC_OUTPUT): Use $SHELL. (AC_OUTPUT_SUBDIRS): Likewise. 1999-02-19 Ben Elliston <bje@cygnus.com> * config.guess: Make C code clean for C++ compilers. Contributed by Markus Oberhumer. 1999-02-19 Ben Elliston <bje@cygnus.com> * config.guess: Automatically recognise ELF on FreeBSD. From Niall Smart and improved by Andrew Cagney. 1999-02-19 Felix Lee <flee@cygnus.com> * acgeneral.m4 (AC_CACHE_VAL): Don't need backticks. This is a performance enhancement for about a 5% reduction in the runtime of the generated configure script. 1999-02-18 Ben Elliston <bje@cygnus.com> * config.guess: Detect NEC EWS4800. Contributed by Koji Arai. 1999-02-11 Ben Elliston <bje@cygnus.com> * standards.texi: Update from FSF. 1999-02-10 Tom Tromey <tromey@cygnus.com> * acgeneral.m4 (AC_CACHE_LOAD): Avoid sourcing special files. Works around bug in some versions of bash. 1999-02-02 Pavel Roskin <pavel_roskin@geocities.com> * autoconf.texi: Corrected definitions for AC_CONFIG_AUX_DIR and AC_PROG_F77. Duplicated descriptions for AC_SEARCH_LIBS and AC_TRY_LINK_FUNC removed. 1999-01-29 Ben Elliston <bje@cygnus.com> * acspecific.m4 (AC_EXEEXT): Ignore C++ source files. 1999-01-28 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * acspecific.m4 (AC_PROG_INSTALL): set INSTALL_SCRIPT to ${INSTALL} so that automake doesn't propogate install time flags for INSTALL_PROGRAM into INSTALL_SCRIPT. 1999-01-25 Ben Elliston <bje@cygnus.com> * install-sh: Use $mkdirprog, not `mkdir' directly. Contributed by Jeff Garzik. * Makefile.in (clean mostlyclean distclean maintainer-clean): Remove .m4f files. * config.guess: Synchronise with master FSF version. Add detection for HP MPE/iX. * config.sub: Likewise. 1999-01-23 Ben Elliston <bje@cygnus.com> * config.guess: Catch more NILE system models. Contributed by Akim Demaille and Graham Jenkins. * autoheader.sh: Force $tmpout to close to avoid Windows file sharing conflicts. From Mark Elbrecht. 1999-01-21 Ben Elliston <bje@cygnus.com> * autoconf.texi (Introduction): Update bug reporting address. * config.guess: Likewise. 1999-01-19 Pavel Roskin <pavel_roskin@geocities.com> * ifnames.sh: Source lines ending with backslash are prepended to the following line before further processing. 1999-01-19 Ben Elliston <bje@cygnus.com> * acspecific.m4 (AC_PROG_CXXCPP): Substitute @CXXCPP@ correctly when $CXXCPP is overridden in the supervisory shell. Contributed by Michael Schoene. 1999-01-16 Ben Elliston <bje@cygnus.com> * acgeneral.m4 (AC_ACVERSION): Bump to 2.14.1 for prereleases. 1999-01-14 Scott Bambrough <scottb@corelcomputer.com> * config.guess: Recognise armv[234][lb] types (ie. `armv*'). 1999-01-13 Ben Elliston <bje@cygnus.com> * autoconf.sh: Remove -v and --verbose from the command line usage help. They do not exist. 1999-01-12 Scott Bambrough <scottb@corelcomputer.com> * config.sub: Recognize armv[234][lb] types (ie. `armv*'). Add alias for the NetWinder; set company to `corel'. 1999-01-11 Akim Demaille <demaille@inf.enst.fr> * autoreconf.sh (verbose): use either `:' or `echo'. (aclocal_m4): Renamed from aclocal. (aclocal_flags): New var. Run aclocal using $aclocal_flags. Redirect ls' stderr to /dev/null to avoid spurious messages. 1999-01-11 Ben Elliston <bje@cygnus.com> * config.guess: Detect HP-UX on MPE/iX machines. * acgeneral.m4 (AC_ACVERSION): Increment to 2.14. * autoconf.texi (EDITION): Likewise. (VERSION): Likewise. 1999-01-10 Ben Elliston <bje@cygnus.com> * config.guess: Detect Rhapsody on PowerPC and other machines. Contributed by Wilfredo Sanchez. * config.sub: Add rhapsody and openstep aliases. 1999-01-09 Ben Elliston <bje@cygnus.com> * Makefile.in (html): New target. Generate HTML documentation. (install-strip): Add. Contributed by Wilfredo Sanchez. * autoconf.texi (AC_CHECK_LIB): Explain more. Contributed by Bob Friesenhahn. (UPDATED): Bump to 1999. * config.guess: Distinguish between OpenStep and NeXTStep platforms. Contributed by Wilfredo Sanchez. 1999-01-09 J"orn Rennecke <amylaar@cygnus.co.uk> * acgeneral.m4 (AC_CHECK_FUNC): Don't actually call the function. 1999-01-09 H.J. Lu <hjl@lucon.org> * config.guess: Permit multiple concurrent instances by including the process ID of the shell running this script in temporary filenames. 1999-01-08 Ben Elliston <bje@cygnus.com> * autoconf.sh: More useful and up-to-date help from the --help option. Contributed by Akim Demaille. * autoheader.sh: Likewise. * autoreconf.sh: Likewise. * autoscan.pl: Likewise. * autoupdate.sh: Likewise. * ifnames.sh: Likewise. * config.guess: Detect Cray T3E and NEC SX-4, SX-5 machines. Contributed by Andreas Schott. 1999-01-06 Ben Elliston <bje@cygnus.com> * autoconf.texi (AC_OBJEXT): Correct documentation. 1999-01-05 Ben Elliston <bje@cygnus.com> * Version 2.13. 1999-01-04 Ben Elliston <bje@cygnus.com> * autoconf.texi (AC_CHECK_FILE): Document. (AC_CHECK_FILES): Likewise. (AC_SEARCH_LIBS): Likewise. (AC_FUNC_SELECT_ARGTYPES): Use Jeff Garzik's version. (AC_C_STRINGIZE): Likewise. (AC_CYGWIN): Document. (AC_EXEEXT): Likewise. (AC_OBJEXT): Likewise. (AC_MINGW32): Likewise. (AC_TRY_LINK_FUNC): Likewise. (AC_VALIDATE_CACHED_SYSTEM_TUPLE): Likewise. 1999-01-01 Ben Elliston <bje@cygnus.com> * NEWS: Update. * acspecific.m4 (AC_PROG_CXX_WORKS): Specify an explicit return type for `main' to keep modern C++ compilers happy. 1998-12-28 Jeff Garzik <jgarzik@pobox.com> * autoconf.texi: (AC_SEARCH_LIBS, AC_CHECK_FILE, AC_CHECK_FILES, AC_TRY_LINK_FUNC): Document. (AC_CHECK_LIB): Indicate the absence of action-if-not-found will not kill default action. (AC_SYS_INTERPRETER): Alphabetize with rest of section, s/ac_cv_sys_interpreter/interpval/ * acgeneral.m4: (AC_TRY_LINK_FUNC): Fix arg transposition. (AC_SEARCH_LIBS): Require autoconf 2.13, add other-libs arg. (AC_CHECK_FILES): Add underscore to HAVE_file define. * acspecific.m4: (AC_SYS_INTERPRETER): New shell var 'interpval' stores internal var ac_cv_sys_interpreter. 1998-12-27 Ben Elliston <bje@cygnus.com> * autoconf.texi (AC_PROG_INSTALL): Update. (AC_FUNC_ALLOCA): Correct code fragment. (AC_FUNC_SELECT_ARGTYPES): Document. (AC_C_STRINGIZE): Likewise. (AC_VALIDATE_CACHED_SYSTEM_TUPLE): Likewise. * acspecific.m4 (AC_CYGWIN): Rename from `AC_CYGWIN32'. (AC_CYGWIN32): Warn about deprecated usage. Forward to AC_CYGWIN. * config.sub: Drop `32' from `Cygwin32'. * config.guess: Likewise. Handle BSD/OS variants for non-x86 machines. Contributed by Chris P. Ross. * NEWS: Update. * configure: Rebuild. 1998-12-26 Ben Elliston <bje@cygnus.com> * autoreconf.sh (stamp): Add missing quote. * mkinstalldirs: Write output which is not diagnostic to standard output and not standard error. Suggested by Steve Robbins. 1998-12-11 Matthew D. Langston <langston@SLAC.Stanford.EDU> * acconfig.h, acgeneral.m4, acspecific.m4, autoconf.texi: Change all of the Fortran 77 code to use the new `F77' prefix instead of the older `FC' prefix. 1998-12-11 Ben Elliston <bje@cygnus.com> * acgeneral.m4 (AC_ACVERSION): Bump to 2.13. * autoconf.texi (EDITION): Likewise. (VERSION): Likewise. 1998-10-30 Jeff Garzik <jgarzik@pobox.com> * autoconf.texi: Document AC_CACHE_LOAD and AC_CACHE_SAVE. Explain how AC_CACHE_SAVE can be used as a means of syncing the cache to disk prior to doing something potentially fatal in configure. 1998-10-29 Alexandre Oliva <oliva@dcc.unicamp.br> * autoreconf.sh: Support several automake command line options, and run aclocal and automake when needed. Also, create stamp files just like automake's Makefiles would do for config headers. Additional contributions from Tom Tromey. 1998-10-24 Matthew D. Langston <langston@SLAC.Stanford.EDU> * acgeneral.m4 (AC_LANG_FORTRAN77): Remove [] (i.e. the m4 quotes) since it was confusing the test suite. Also make `f77' the default for FC, otherwise the test suite fails. * autoconf.texi (Fortran 77 Compiler Characteristics): Added new node documenting the new AC_F77_LIBRARY_LDFLAGS macro. * acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): New macro to determine the linker flags (e.g. `-L' and `-l') for the Fortran 77 intrinsic and run-time libraries. 1998-10-24 Ben Elliston <bje@cygnus.com> * acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): New macro. Detects the types of formal arguments to select(). Contributed by Lars Hecking. * acconfig.h (SELECT_TYPE_ARG1): Add. (SELECT_TYPE_ARG234): Likewise. (SELECT_TYPE_ARG5): Likewise. * config.guess: Hide warnings emitted by the HP linker when generating a PA 2.0 object file. Contributed by Marcus Thiessel. 1998-10-20 Ben Elliston <bje@cygnus.com> * acgeneral.m4 (AC_LANG_RESTORE): Fix a typo spotted by Noah Elliott. 1998-10-09 Tom Tromey <tromey@cygnus.com> * Makefile.in (autoconf.m4f): New target. (autoheader.m4f): Likewise. 1998-10-08 Ben Elliston <bje@cygnus.com> * acgeneral.m4 (AC_TRY_LINK_FUNC): Fix macro ordering. Sun Oct 4 21:57:20 1998 Tom Tromey <tromey@cygnus.com> * autoconf.texi (Defining Symbols): Documented third argument to AC_DEFINE. * autoheader.m4 (AC_DEFINE_UNQUOTED): Generate `verbatim' assignment if third argument given. (AC_DEFINE): Likewise. * acgeneral.m4 (AC_DEFINE): Handle case where $# is 3. (AC_DEFINE_UNQUOTED): Likewise. * autoheader.sh: Echo $verbatim if not empty. 1998-10-03 Ben Elliston <bje@cygnus.com> * acconfig.h (FC_NO_MINUS_C_MINUS_O): Add to complete the Fortran 77 support. * README: Update bug reporting address. Include maintainer info. 1998-10-02 Ben Elliston <bje@cygnus.com> * acgeneral.m4 (AC_VALIDATE_CACHED_SYSTEM_TUPLE): New macro. This macro can be used to ensure that a configure script will not run on a second system without removing the cache and re-running configure. Contributed by Alexandre Oliva. 1998-09-29 Ben Elliston <bje@cygnus.com> * acgeneral.m4 (AC_SEARCH_LIBS): New macro. Searches a series of libraries for a given function. Contributed by Jim Blandy. (AC_TRY_LINK_FUNC): New macro. Again, from Jim. 1998-09-28 Ben Elliston <bje@cygnus.com> * config.guess: Detect multiprocessor DC/OSx running on Pyramid MIServer machines. Contributed by Graham K. Jenkins. * acgeneral.m4 (AC_CHECK_PROG): Fix a bug if the supplied path contains colons. This was observed with some versions of NetBSD `sh' and some versions of `bash'. (AC_PATH_PROG): Likewise. Contributed by Tom Yu. 1998-09-27 Ben Elliston <bje@cygnus.com> * Makefile.in (all): Generate frozen .m4 files at build time. (install): Do not freeze .m4 files. Install pre-frozen .m4f files using $(INSTALL_DATA). (.m4.m4f): Freeze files if m4 supports stored internal state. Contributed by Karl Heuer. * install-sh: Import latest version from the FSF. * mkinstalldirs: Likewise. * config.guess: Apply the sysconf(2) test to HP 9000/600-series, 9000/802, 9000/804 and 9000/892 machines. Contributed by Pavel Roskin. Detect UnixWare 7. Contributed by Paul Gampe. * acspecific.m4 (AC_PROG_INSTALL): Substitute `INSTALL_SCRIPT'. Contributed by Franc,ois Pinard (AC_C_STRINGIZE): New macro to test the availability of the stringizing operator in the C preprocessor. Contributed by Arnold Robbins on behalf of the GNU AWK project. * acconfig.h (HAVE_STRINGIZE): Add for the AC_C_STRINGIZE macro. * testsuite/Makefile.in (check): If DejaGNU is not installed, print a warning and skip the `dejacheck' target (which will fail). (site.exp): Use tests to guard commands from generating error messages if `site.exp' or `site.bak' do not exist. Contributed by Karl Heuer. (dejacheck): Remove unused target. 1998-09-26 Ben Elliston <bje@cygnus.com> * texinfo.tex: Import latest version from the FSF. * config.guess: Treat all SPARC variant processors running BSD/OS as just `sparc' for compatibility reasons. Contributed by Chris Torek. * acgeneral.m4 (AC_CHECK_FILE): New macro. Checks for the existence of a file in the file system (native only). Contributed by Ken Raeburn. (AC_CHECK_FILES): Likewise. 1998-09-15 Didier Verna <verna@inf.enst.fr> * acspecific.m4 (AC_PATH_XTRA): use X_EXTRA_LIBS add-on libraries in the test for libICE. It is needed at least under Solaris. 1998-09-15 Ben Elliston <bje@cygnus.com> * config.guess: Handle strange processor ID assignments on AIX machines. Contributed by Didier Desseaux. Sat Sep 12 16:25:00 1998 Aaron Crane <aaronc@pobox.com> * acgeneral.m4 (AC_CHECK_TYPE): Changed the egrep regex to avoid incorrectly assuming that if foobar_t is defined, then so is bar_t. Tue Sep 8 14:06:04 1998 Matthew D. Langston <langston@SLAC.Stanford.EDU> * acgeneral.m4: Make the following macros Fortran 77 aware (i.e. conditionalize whether to `#include "confdefs.h"', etc.): (AC_TRY_COMPILE) (AC_TRY_LINK) (AC_CHECK_LIB) * acgeneral.m4 (AC_LANG_FORTRAN77): Rename `AC_LANG_FORTRAN' to `AC_LANG_FORTRAN77'. Change the Fortran 77 language macro from `FORTRAN' to `FORTRAN77'. (AC_LANG_RESTORE): Change the Fortran 77 language macro from `FORTRAN' to `FORTRAN77' * autoconf.texi: Updated Fortran 77 documentation, particularly for `AC_TRY_COMPILE', `AC_TRY_LINK' and `AC_CHECK_LIB'. Thu Sep 3 09:34:39 1998 Matthew D. Langston <langston@SLAC.Stanford.EDU> * autoconf.texi: Added Fortran 77 documentation. * acspecific.m4 (AC_PROG_FC): New macro. Determine a Fortran compiler to use. (AC_PROG_FC_WORKS): New macro. (AC_PROG_FC_GNU): New macro. (AC_PROG_FC_G): New macro. (AC_PROG_FC_C_O): New macro. * acgeneral.m4: Add FFLAGS (Fortran 77 flags). (AC_LANG_FORTRAN): New macro. (AC_LANG_RESTORE): Make Fortran 77 aware. (AC_TRY_COMPILER): Make Fortran 77 aware (i.e. conditionalize whether to `#include "confdefs.h"'). Thu Jun 18 12:13:27 1998 Ian Lance Taylor <ian@cygnus.com> * acspecific.m4 (AC_EXEEXT): Correct setting of ac_exeext when there is no extension. Mon Jun 1 12:30:39 1998 Ian Lance Taylor <ian@cygnus.com> * acgeneral.m4 (AC_CHECK_PROG): Set IFS to just ":" when searching through PATH. (AC_PATH_PROG): Likewise. * acspecific.m4 (AC_PROG_INSTALL): Likewise. (AC_PROG_CC): On cygwin32, if neither gcc nor cc are found, look for cl. (AC_PROG_CXX): Look for cl after all other choices. * configure: Rebuild. Thu May 28 18:37:36 1998 Ian Lance Taylor <ian@cygnus.com> * acgeneral.m4 (AC_ACVERSION): Bump to 2.12.2. Add support for Visual C++: * acgeneral.m4 (ac_exeext, ac_objext): New variables. (ac_link): Use ac_exeext. (AC_TRY_COMPILER, AC_TRY_LINK, AC_TRY_RUN_NATIVE): Likewise. (AC_TRY_CPP): Remove lines from stderr which contain only the name of the file. (AC_REPLACE_FUNCS): Use ac_objext. * acspecific.m4 (AC_PROG_CC): Check whether compiler supports -g even if it is not gcc. (AC_PROG_CXX): Likewise. (AC_PROG_CPP): Try running the compiler with the -nologo option. (AC_FUNC_ALLOCA): Check for _MSC_VER. Use ac_objext. (AC_FUNC_MEMCMP): Use ac_objext. (AC_STRUCT_ST_BLOCKS): Likewise. (AC_OBJEXT): New macro. (AC_CYGWIN32, AC_MINGW32, AC_EXEEXT): New macros. * configure: Rebuild. * Makefile.in (editsh): Substitute for SHELL. (Makefile, config.status): Use $(SHELL) when running config.status. * autoconf.sh: Change initial /bin/sh to @SHELL@. * autoheader.sh: Likewise. * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * ifnames.sh: Likewise. Thu Apr 30 16:29:00 1998 Syd Polk <spolk@cygnus.com> * acspecific.m4 (SETPGRP_VOID): The test for setpgrp needs to have unistd.h included or the DEC compiler does not flag the error that triggers setting the variable. Tue Nov 18 14:21:38 1997 Eric Mumpower <nocturne@cygnus.com> * autoreconf.sh: Do the right thing when AC_CONFIG_HEADER is given more than one filename. As noted in the "Invoking autoheader" node of the info files, autoheader will use the first file argument given to AC_CONFIG_HEADER. Prior to this patch, autoreconf would end up executing incorrect shell code (e.g. "test ! -f 1.h 2.h.in") in such cases. Patch submitted in parallel to bug-gnu-utils@prep.ai.mit.edu. Fri Oct 3 18:10:39 1997 Ian Lance Taylor <ian@cygnus.com> * acgeneral.m4 (AC_CACHE_SAVE): Add a grep when checking whether set quotes correctly, to avoid a cache overflow on HP-UX 9. * configure: Rebuild. Wed Sep 11 15:35:19 1997 Chris Provenzano <proven@cygnus.com> * acgeneral.m4 : Always set SHELL and substitute SHELL. When looking for a path for an executable allow the user to override with an DOS path. * configure : New configure generated by autoconf. Thu Sep 4 22:30:40 1997 Jeffrey A Law (law@cygnus.com) * acspecific (AC_PROC_INSTALL): Don't use installbsd on OSF. Wed Sep 3 23:00:44 1997 Chris Provenzano <proven@cygnus.com> * configure : New configure generated by autoconf. * Makefile.in : Set SHELL=@SHELL@. configure now substiutes ${CONFIG_SHELL-/bin/sh} in for @SHELL@ at configure time. Mon Aug 11 01:40:37 1997 Jason Molenda <crash@cygnus.co.jp> * acspecific (AC_FUNC_VFORK): If cross-compiling, set $ac_cv_func_vfork_works to $ac_cv_func_vfork (assume vfork works if present). Tue Aug 5 23:00:05 1997 Ian Lance Taylor <ian@cygnus.com> * acgeneral.m4 (AC_VERSION): Set to 2.12.1. (AC_CANONICAL_HOST): Use CONFIG_SHELL to run $ac_config_sub and $ac_config_guess. (AC_CANONICAL_TARGET, AC_CANONICAL_BUILD): Likewise. Tue Dec 10 19:38:59 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_CACHE_SAVE): Use grep to prevent overflowing HP-UX 9.05 /bin/sh buffer in case statement. From Eric Backus. Mon Dec 9 23:39:17 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * acspecific.m4 (AC_FUNC_GETLOADAVG): Add a semicolon between shell variable assignments; the evaluation order varies between implementations. Tue Nov 26 13:00:28 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * Version 2.12. Wed Nov 20 13:00:21 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * Test release 2.11.2. * acgeneral.m4 (AC_OUTPUT): Remove a now-wrong test for whether to make an unquoted here document. (AC_CACHE_SAVE): Double-up backslashes in double quotes. From Paul Eggert. * Test release 2.11.1. * acgeneral.m4 (AC_TRY_COMPILE, AC_TRY_LINK): Make the final newline consistent with the other AC_TRY_* macros: no final dnl is needed to avoid extraneous blank lines. (AC_CHECK_LIB, AC_HAVE_LIBRARY, AC_COMPILE_CHECK): Remove extraneous dnl's. (AC_DIVERSION_CMDS, AC_DIVERSION_ICMDS): New macros. (AC_OUTPUT_COMMANDS, AC_OUTPUT): Use them instead of appending to list macros. * acgeneral.m4 (AC_CACHE_SAVE): Handle cache variable values correctly even if they contain single quote, or are quoted by the shell. From Paul Eggert. (AC_INIT_PREPARE): Set LC_MESSAGES to C if set. From Hans Olsson. Set LC_CTYPE to C if set. From Thomas Winder. * autoconf.sh, autoheader.sh: Likewise set LC_MESSAGES and LC_CTYPE. Tue Nov 19 10:29:06 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * testsuite/autoconf.g/sizeof.exp: Use the v2 macro name. * acgeneral.m4 (AC_OUTPUT_FILES, AC_OUTPUT_HEADER): Support creating output files from multiple pieces, concatenated. Suggested by Theodore Ts'o. (AC_LINK_FILES): If called more than once, concatenate the arguments. From Roland McGrath. (AC_CONFIG_SUBDIRS): Likewise. (AC_OUTPUT_COMMANDS): New macro. Suggested by Tom Tromey. (AC_OUTPUT): Use the lists it sets. * acgeneral.m4 (AC_TRY_RUN_NATIVE): Fail if linking fails, like AC_TRY_LINK. (AC_TRY_RUN): Don't require AC_C_CROSS. (AC_TRY_COMPILER): New macro. (AC_LANG_C, AC_LANG_CPLUSPLUS): Set cross_compiling. * acspecific.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS): Use AC_TRY_COMPILER instead of AC_TRY_LINK. (AC_PROG_CC_GNU, AC_PROG_CC_G): Split out of AC_PROG_CC. (AC_PROG_CXX_GNU, AC_PROG_CXX_G): Split out of AC_PROG_CXX. For the *_G macros, make the cache variable names non-GNU-specific. (AC_C_CROSS): Mark obsolete, and otherwise a no-op. * AUTHORS: New file. * Makefile.in (DISTFILES): Add it. * acspecific.m4 (AC_FUNC_MMAP): Update the getpagesize declarations from getpagesize.h. Check for unistd.h. * acgeneral.m4 (AC_OUTPUT_FILES): Run the eval in a subshell. * acfunctions: Map fnmatch, strftime, getpgrp, setpgrp to their own macros. * acgeneral.m4 (AC_OUTPUT_HEADER): Check that $CONFIG_HEADERS is unset, not that it's empty. Mon Nov 18 10:24:50 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * Version 2.11. Sun Nov 17 20:12:05 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * acspecific.m4 (AC_FUNC_STRCOLL): Make the checking message more accurate. Thu Nov 14 11:15:27 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * acheaders: Add entry for malloc.h. Make the strings.h entry suggest AC_CHECK_HEADERS instead of AC_HEADER_STDC. * acgeneral.m4 (AC_INIT_PARSE_ARGS): Move initialization of ac_max_here_lines here from AC_OUTPUT_HEADER. * autoheader.sh: Take the multiple-include protection back out. It's not needed for a file that just #defines stuff, and, as Ken Raeburn pointed out in Apr 1994: Since you don't make it optional, and you don't give the writer of configure.in much control over the name of the symbol, it also would prevent one "config.h" file in a subdirectory from including "../config.h" as a way to avoid duplicating some common tests. * acspecific.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS): Don't try running a program, just try linking. (AC_C_CROSS): Make the wording clearer. Wed Nov 13 10:07:14 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX): Check whether the compiler works before checking whether it's a GNU compiler. (AC_FUNC_VFORK): Call _exit after perror. (AC_PATH_XTRA): Go back to using -R, as setting an env var as part of CC doesn't get eval'd correctly to actually work. Directly test whether a space is needed after -R. Don't add "-L" to LDFLAGS if $x_libraries is empty. (AC_FUNC_STRFTIME): Check for it in -lintl only if it's not in the normal libraries. * Test release 2.10.3. * testsuite/Makefile.in (dejacheck): New target, suggested by Tom Tromey. (check): Depend on dejacheck. Tue Nov 12 00:06:14 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_OUTPUT_FILES): Split the list of sed commands in conftest.subs into multiple files named conftest.s[1-9][0-9]*. Create a pipeline of sed commands that use these files, then delete the temporary files. From John W. Eaton. * acspecific.m4 (AC_AIX, AC_MINIX): Remove warnings about AC_TRY_LINK. These macros don't change the linkage options. * Test release 2.10.2. * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX) [GCC]: Use -O2 instead of -O. Suggested by fnf@ninemoons.com (Fred Fish). * acgeneral.m4 (AC_OUTPUT_HEADER): Support passing AC_CONFIG_HEADER a value containing shell variables. Suggested by Markku Savela and Julian Onions. * acgeneral.m4 (AC_TRY_RUN_NATIVE, AC_TRY_LINK, AC_TRY_COMPILE, AC_TRY_CPP): Show the test program in config.log if the test fails. From Karl Berry. * testsuite/config/unix.exp: Run the configure script as "./script" in case the user doesn't have "." in their PATH. Mon Nov 11 18:02:58 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_TRY_COMPILE, AC_TRY_LINK): Deal with smart compilers that know that an unused function doesn't have to be linked in: call the function directly from main(). (Removing a legacy from when they tried to run the code, I think-djm.) From fnf@ninemoons.com (Fred Fish). * acspecific.m4 (AC_FUNC_GETLOADAVG): Rename ac_save_LIBS to avoid a clash with AC_CHECK_LIB. From Jim Meyering. (AC_FUNC_FNMATCH, AC_FUNC_MMAP, AC_FUNC_VFORK, AC_FUNC_WAIT3, AC_FUNC_STRCOLL, AC_FUNC_MEMCMP): Rename cache variables to avoid wrong results if someone calls AC_CHECK_FUNC for these functions. * autoheader.sh: Don't cmp with config.h.in if it doesn't exist yet. Don't frob lines 1-@TOP@ or @BOTTOM@-end of acconfig.h's. Accept TAB as well as SPC after #undef in acconfig.h's. Sat Nov 9 01:54:04 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * Test release 2.10.1. * acspecific.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS): New macros adapted from Bruno Haible. (AC_PROG_CC, AC_PROG_CXX): Use them. * acgeneral.m4 (AC_TRY_RUN_NATIVE): Split out of AC_TRY_RUN. (AC_TRY_LINK): Check that the executable exists after linking. (AC_EGREP_CPP): Disable m4 quote chars around egrep, so [] in regexps isn't eaten. * autoheader.sh: Add multiple-inclusion protection for config.h. * acgeneral.m4 (AC_PREFIX_PROGRAM): Pretty up the output. (AC_CHECK_LIB): Include the function being tested in the message. (AC_CHECK_PROG, AC_PATH_PROG): Add a dummy variable to force word splitting on the path. * acspecific.m4 (AC_FUNC_MMAP): Remove check and uses of valloc. It turns out it's a separate issue, for GNU grep. Replace the test program with a new version from Mike Haertel. * acgeneral.m4 (AC_CACHE_SAVE): Accept the HP-UX sh 'set' output format. From Marcus Daniels. * acgeneral.m4 (AC_MSG_CHECKING, AC_CHECKING): Write a message to config.log also. From T.E.Dickey. (AC_CHECK_LIB, AC_CHECK_HEADER, AC_CHECK_HEADERS): Replace use of tr with sed, to avoid a bug in the AIX 4.1.3.0 tr reported by Alain Knaff. He says that version of tr interprets \055 as a range specifier, like an unquoted -. * acspecific.m4 (AC_PROG_MAKE_SET, AC_CHECK_HEADER_DIRENT, AC_CHECK_HEADERS_DIRENT): Ditto. * acspecific.m4 (AC_FUNC_SETPGRP): New macro. * acconfig.h (SETPGRP_VOID): New entry. From T.E.Dickey. * acspecific.m4 (AC_PATH_X_DIRECT): Try /lib/usr/lib/X11 for A/UX. From Guillermo Gomez. (AC_PATH_XTRA): Replace -R with adding LD_RUN_PATH to CC in the Solaris kludge. Suggested by Paul Eggert. Define X_DISPLAY_MISSING with AC_DEFINE, and if not using X, clear out the X variables. Check system-dependent libs before system-independent ones. Check for more system-dependent libs. From Karl Berry. Use AC_CHECK_FUNC in the system-dependent libs tests. From Larry Schwimmer. Wart removal: Don't require AC_ISC_POSIX. (AC_ISC_POSIX): Require AC_PROG_CC, since it uses $GCC. From gvran@uddeborg.pp.se. Don't blather about being called before AC_TRY_LINK, which is now called in AC_PROG_CC. Don't encourage using this macro. * acconfig.h (X_DISPLAY_MISSING): Add entry. Fri Nov 8 16:02:08 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * acspecific.m4 (AC_PATH_X_DIRECT): Search for /usr/X11 before /usr/X11Rn, etc. From bostic@bsdi.com (Keith Bostic). * acgeneral.m4 (AC_CHECK_TYPE) [STDC_HEADERS]: Check in stddef.h, too. From Glenn P. Davis. Don't require the second char after the type name to be a space. (AC_TRY_RUN): Remove the test files before executing the "failure" case code. * acspecific.m4 (AC_PROG_CXX): Check for cc++ for NexT. From Carl Edman. (AC_PROG_CC, AC_PROG_CXX): Check whether -g works even if C[XX]FLAGS is set. From T.E.Dickey. (AC_FUNC_FNMATCH): New macro. * acconfig.h (HAVE_FNMATCH): New entry. * acgeneral.m4 (AC_REPLACE_FUNCS): Call AC_CHECK_FUNCS to do the work. Tue Oct 29 13:03:44 1996 Doug Evans <dje@canuck.cygnus.com> * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Fix thinko in computation of ac_sub_srcdir in relative but not "." case. Thu Oct 10 22:29:37 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_CANONICAL_HOST, AC_CANONICAL_TARGET, AC_CANONICAL_BUILD): Allow the os part of the string returned by config.sub to contain dashes, as in "linux-gnu". Fri Jul 19 16:59:00 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_TYPE): Add dnl so regexp doesn't have a leading newline. Wed Jun 12 13:56:57 1996 David J MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_CHECK_TYPE): Remove extra ')'. * Many files: Update the FSF street address. Sun Jun 9 17:54:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_LIB): Add missing \ in last change. Fri Jun 7 11:54:58 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_LIB): Identifierize lib name in $ac_tr_lib. Mon May 27 13:49:02 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): If $TMPDIR names an existing, writable directory, then test it instead of /tmp, /var/tmp, and /usr/tmp for long file name support. * acgeneral.m4 (AC_PREREQ): Prepend "FATAL ERROR: " to msg. Sun May 26 19:07:15 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * acspecific.m4 (AC_PROG_MAKE_SET): Sanitize $MAKE for use as identifier. * acgeneral.m4 (AC_CHECK_TYPE): Tighten regexp so ulong doesn't match ulong_t. * autoheader.sh: Put $syms in a temporary file and use fgrep -f. Tue May 7 13:20:33 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * acgeneral.m4: Version 2.10 released. Tue Mar 26 13:03:12 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * acgeneral.m4 (AC_OUTPUT_HEADER): Make subdir if necessary. Thu Mar 21 10:52:03 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * acspecific.m4 (AC_FUNC_GETLOADAVG): Fix name of -lelf cache variable name in test of it. (AC_PATH_XTRA): Fix name of -ldnet cache variable name in test of it. Wed Mar 20 09:37:31 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_LIB): Use \055 for -; leading and trailing both lose with some tr. * acspecific.m4 (AC_C_CONST): Remove check for gcc 2.7 bug. RMS wants everyone to lose until gcc is fixed. * acgeneral.m4 (AC_CHECK_LIB): Put - last in tr set so it is not considered a range. * acspecific.m4 (AC_C_CONST): Add check for gcc 2.7 bug. From Paul Eggert and Jim Meyering. * acgeneral.m4 (AC_CHECK_LIB): Omit `char $2' decl when $2 is `main'. Wed Mar 13 22:10:42 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * acgeneral.m4 (AC_CHECK_LIB): Put quotes around _ when constructing cache variable name, to separate it from preceding text. Sat Mar 16 15:53:22 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * Version 2.9 released. * acgeneral.m4 (AC_ACVERSION): Updated to 2.9. Wed Mar 13 12:49:51 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * acgeneral.m4 (AC_OUTPUT_HEADER): Undo last change to $ac_dB, and instead change the code written into conftest.hdr. Tue Mar 12 02:51:24 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * acgeneral.m4 (AC_OUTPUT_HEADER): Apply Jan 15 fix to AC_OUTPUT_MAKE_DEFS here too: Match `#define foo' without trailing space in confdefs.h. Before configure would lose if all its trailing whitespace got stripped, and that can happen in mail. Sun Mar 10 20:30:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * acgeneral.m4 (AC_INIT_NOTICE): Add 95 and 96 to copyright years. Sat Mar 9 18:28:42 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_LIB): Add missing [. Fri Mar 8 15:06:48 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_LIB): Declare $2 to override gcc2 internal prototype. * Version 2.8 released. Wed Mar 6 14:38:31 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_LIB): Use a cache variable name containing both the library and function name. Tue Jan 16 16:39:21 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_PROG): Take optional 6th arg, full name of program to reject if found in search path. * acspecific.m4 (AC_PROG_CC): If gcc not found use AC_CHECK_PROG for cc, rejecting /usr/ucb/cc. Fatal configure error if no $CC found at all. Mon Jan 15 15:57:36 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Match `#define foo' without trailing space in confdefs.h. Before configure would lose if all its trailing whitespace got stripped, and that can happen in mail. Fri Jan 12 14:38:37 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acgeneral.m4 (AC_TRY_CPP): Use "" instead of '' when setting ac_try; we need one level of expansion there for $ac_cpp, then AC_TRY_EVAL does one more for its the expansion of $ac_cpp. Thu Jan 11 10:38:19 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acgeneral.m4 (AC_LANG_C, AC_LANG_CPLUSPLUS): Removed echo cmds from $ac_cpp, $ac_compile, and $ac_link. (AC_TRY_EVAL, AC_TRY_COMMAND): New macros for running tests' commands. Always put the configure source line and command line into config.log. (AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK): Use them. * acspecific.m4: Use AC_TRY_EVAL and AC_TRY_COMMAND for running all tests. Fri Jan 5 17:50:28 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acspecific.m4 (AC_PATH_X, AC_PATH_X_XMKMF, AC_PATH_X_DIRECT): Rearrange logic: do no tests if $with_x=no; make incl and lib tests independent, and distinguish unset from empty. * autoconf.sh (undefined macro check): \ sed \s inside "". If grep $name in $infile misses, give error message that there must be an Autoconf bug. Tue Dec 19 10:49:20 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * autoconf.sh: Ignore undefined macros in shell comments. Mon Dec 11 22:12:54 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acspecific.m4 (AC_PROG_CC_C_O): Rearrange logic to get the right answer for cc. Fri Nov 24 17:26:38 1995 Miles Bader <miles@gnu.ai.mit.edu> * autoconf.sh: Define $AWK from the subst @AWK@, and use it. Wed Nov 22 11:01:16 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * Version 2.7. * autoheader.m4 (AC_CHECK_FUNCS, AC_CHECK_HEADERS): Expand the optional action args. From jj@jfch.vc.cvut.cz (Jakub Jelinek). * acgeneral.m4 (AC_CHECK_LIB): Translate - in library names to _. (AC_ARG_PROGRAM): Use cat instead of echo to avoid SysV echo interpreting backslashes. From kim@tac.nyc.ny.US (Kimmo Suominen). (AC_OUTPUT_FILES): Quote $ and \ for being in an unquoted here document. From Paul Eggert. * acspecific.m4 (AC_PATH_X_XMKMF): Use ${MAKE-make}, not plain make. (AC_C_CONST): Avoid a warning from g++. From tgl@sss.pgh.pa.us (Tom Lane). (AC_FUNC_MMAP): Check for valloc and getpagesize; don't rely on predefines. (AC_HEADER_STDC): If cross-compiling, assume the ctype macros are ANSI. From dje@cygnus.com (Doug Evans). (AC_TYPE_SIGNAL) [__cplusplus]: Give a full prototype. From churritz@cts.com (Chad Hurwitz). (AC_FUNC_VFORK): If cross-compiling, use AC_CHECK_FUNC instead. From Steve Chamberlain. Tue Sep 5 20:37:48 1995 Paul Eggert <eggert@twinsun.com> * acspecific.m4 (X_LIBS): Use `-R lib', not `-Rlib', since Sun CC 3.0 requires this. Tue Aug 8 20:10:12 1995 Paul Eggert <eggert@twinsun.com> * acgeneral.m4: When creating config.status, start a new here-script just before building conftest.subs, to work around a bug in the HP-UX 9 HP9000-800 sh. Tue Nov 21 17:36:41 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * Makefile.in (install): Undo last ASCRIPTS panic change. The bug reporter hadn't cleaned up his source dir. Mon Nov 20 15:26:50 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * Version 2.6. * acgeneral.m4 (AC_INIT_PARSE_ARGS): Prettify usage message somewhat. * Makefile.in: Use @bindir@, @datadir@, @infodir@. (install): Find ASCRIPTS in $(srcdir). Sat Nov 18 14:21:55 1995 Karl Berry <karl@cs.umb.edu> * autoconf.sh: Allow lowercase letters in the undefined-macro name. Fri Nov 17 15:05:44 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * Version 2.5 released. Fri Nov 17 15:23:04 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_CHECK_LIB): Don't start tr argument with '+', so as not to confuse old GNU tr's. From Ian Lance Taylor. (AC_INIT_PARSE_ARGS): Make sure MFLAGS and MAKEFLAGS are empty. From Paul Townsend (aab@cc.purdue.edu). (AC_CHECK_LIB, AC_CHECK_HEADERS, AC_CHECK_FUNC): Remove duplicate `d' from alphabets. * acspecific.m4 (AC_USG): Define USG if we don't have rindex and bzero, not if we do have them. From Viktor Dukhovni. Sun Oct 29 15:13:37 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_PROG): Use arg 5 as search list, not arg 4. Wed Aug 30 17:34:48 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acspecific.m4 (AC_PROG_CC_C_O): If $CC groks it and cc doesn't exist, choose yes. Wed Jul 26 00:03:26 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * Test release 2.4.2. * acgeneral.m4 (AC_CHECK_SIZEOF): Take an optional size to use when cross-compiling. * acspecific.m4 (AC_FUNC_CLOSEDIR_VOID, AC_DIR_HEADER): If cross-compiling, assume it returns void. It's not a big loss. From Karl Berry. * acgeneral.m4 autoheader.sh: Change tr [a-z] [A-Z] into expansion of the full alphabet, to combat losing AIX 4.1.1 tr when LANG isn't set the way it likes. * acspecific.m4 (AC_FUNC_GETMNTENT): Check in -lgen for Unixware. From miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza). * autoheader.m4 (AC_CONFIG_HEADER): Set config_h to the first argument. From ghudson@mit.edu (Greg Hudson). * Makefile.in (all): Depend on info. * acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG, AC_CHECK_PROGS, AC_PATH_PROGS, AC_CHECK_TOOL): Add optional PATH parameter. Mon Jul 24 17:27:11 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_CHECK_LIB): Don't enclose tr args in [], for SysV and POSIX. From Karl Heuer. Wed Jul 19 17:43:44 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_CHECK_LIB): Translate + to p in lib name. Wed Jun 28 13:45:16 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Allow an empty value for --enable and --with args. (AC_CACHE_CHECK): New macro. * acspecific.m4: Use it where possible. Tue Jun 27 13:29:54 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE): Add options --bindir, --libdir, etc. Mon Jun 26 20:54:36 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_LANG_C, AC_LANG_CPLUSPLUS): Put the command being run into the log file. Thu Jun 22 22:33:23 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acspecific.m4 (AC_PROG_INSTALL): Don't cache a shell script path. * acgeneral.m4 (AC_CHECK_LIB): Allow lib name to contain a . or /, by fixing the cache variable name. Wed Jun 14 23:07:20 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu> * Version 2.4. Sun May 7 08:09:12 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu> * acspecific.m4 (AC_PATH_X_XMKMF): Check for libX11.{so,sl} as well as .a when seeing whether LIBDIR or USRLIBDIR is right. Sat May 6 17:29:07 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu> * acspecific.m4 (AC_PROG_CPP): If CPP is already set, use that as the value and set the cache variable to it. Mon Mar 27 10:48:36 1995 David J. MacKenzie <djm@churchy.gnu.ai.mit.edu> * Version 2.3. * acgeneral.m4 (AC_OUTPUT): Add quotes around the echo arguments in the trap, so backslashes aren't required for multiline input. From G.Wilford@ee.surrey.ac.uk. Also use the sed trick when not using a config header file. Thu Mar 23 18:02:25 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_LANG_C, AC_LANG_CPLUSPLUS): Put "-c" right after compiler name. Same for "-o conftest". * ifnames.sh (AC_MACRODIR): Default to @datadir@, not a hardcoded path. * Test release 2.2.1. * acgeneral.m4 (AC_OUTPUT): Use sed, not tr, so we only remove the output config header, not the input one too. From muessig@ipf.bau-verm.uni-karlsruhe.DE (Peter Muessig). (AC_LANG_C): Undo Feb 7 change. According to Roland McGrath, most compilers require all options but -l... and -o to come first. * Makefile.in (uninstall): Don't use $@, since the cd makes it invalid when srcdir is relative. Wed Mar 8 17:05:06 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu> * Version 2.2. Wed Mar 8 12:44:34 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * Makefile.in: Follow cd commands with &&, not ;. From Franc,ois Pinard. Tue Mar 7 11:48:19 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acspecific.m4 (AC_FUNC_ALLOCA): Keep sh variable name space clean. Put newline after AC_DEFINE_UNQUOTED call to avoid Irix syntax error. Mon Mar 6 15:07:00 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * Test release 2.1.3. * acspecific.m4 (AC_FUNC_ALLOCA): Replace nested AC_FUNC_CHECK calls with a loop. * acspecific.m4 (AC_FUNC_VPRINTF): Don't check for signal munging. From Paul Eggert. * acgeneral.m4 (AC_CACHE_SAVE): Tell the user whether the cache changed or not. From gnu@toad.com (John Gilmore). * Makefile.in (install-info): Don't cd, to avoid breaking install-sh references. Fri Mar 3 11:41:01 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * Makefile.in (autoconf.info, standards.info): Use --no-split to avoid creating filenames > 14 chars. * acgeneral.m4 (AC_CHECK_FUNC): Use assert.h, to avoid protype conflicts from ctype.h (!!) on OSF/1 3.0. Sat Feb 25 01:56:57 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acspecific.m4 (AC_C_BIGENDIAN): Check for BYTE_ORDER macro from sys/param.h before trying the test program which cannot be cross-compiled. Fri Feb 24 20:02:08 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_FUNC): Include errno.h instead of ctype.h in test program. Wed Feb 22 18:01:27 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu> * Test release 2.1.2. Tue Feb 21 13:00:07 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_CACHE_VAL): Add extra quotes to work around AIX 4.1 bug reported by hyc@locus.com (Howard Chu). * acspecific.m4 (AC_FUNC_GETLOADAVG): Check for -lelf before -lkvm. Reported by Kaveh R. Ghazi. (AC_HEADER_STAT): Check whether S_IFDIR is defined, to work around ISC bug reported by rick@anasazi.com (Rick Coupland). * autoheader.sh: Better solution to @BOTTOM@ printing. From Paul Eggert. Mon Feb 13 18:13:11 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acspecific.m4 (AC_PROG_CC_C_O): Use sed filter to make sure ${ac_cc} is always a valid shell variable name. (AC_PROG_MAKE_SET): Remove gratuitous backslashes in checking message. Sun Feb 12 18:42:35 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_TOOL_PREFIX): Require AC_CANONICAL_BUILD, so both $build and $host are definitely set before we compare them. Sat Feb 11 04:37:30 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_TOOL): Rewritten. Take optional third arg VALUE-IF-NOT-FOUND. Check for ${ac_tool_prefix}PROG-TO-CHECK-FOR first. If not found and third arg given, and ${ac_tool_prefix} is nonempty, check for unadorned PROG-TO-CHECK-FOR as well. Last choice use VALUE-IF-NOT-FOUND. Fri Feb 10 17:45:53 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acgeneral.m4 (AC_OUTPUT): Fix sed command to produce $ac_dots for subdir configures. Thu Feb 9 14:42:20 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * testsuite/config/unix.exp (autoconf_load): Run the script with /dev/null as the cache. * acgeneral.m4 (AC_CHECK_TOOL_PREFIX, AC_CHECK_TOOL): New macros, from Roland McGrath. * acspecific.m4 (AC_DECL_YYTEXT): Cache the output file root. (AC_C_INLINE): If the compiler doesn't recognize it, define it away. Try __inline__ too. From Jim Avera. (AC_FUNC_GETPGRP): New macro. From Arnold Robbins. * acconfig.h: New entry for it. * configure.in: Check for new awk. * Makefile.in (editsh): Substitute in AWK. * acspecific.m4 (AC_PROG_INSTALL): Allow trailing slashes in PATH elements. * acgeneral.m4 (AC_PREFIX_PROGRAM): Ditto. Tue Feb 7 11:32:09 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_CHECK_LIB, AC_HAVE_LIBRARY): Check and add the new library before existing libs, not after, in case it uses them. * acspecific.m4 (AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT, AC_FUNC_STRFTIME, AC_DYNIX_SEQ, AC_IRIX_SUN, AC_SCO_INTL): Ditto. * autoheader.sh: Allow @BOTTOM@ to be the first line in acconfig.h. From iwj10@cus.cam.ac.uk (Ian Jackson). * acspecific.m4 (AC_FUNC_GETLOADAVG): Add semicolons before AC_DEFINE. Check for -lkvm before -lutil. Assume it needs setgid if using -lutil. * acgeneral.m4 (ac_compile, ac_link): Put the file name before the variables, so they can contain -l options. * acspecific.m4 (AC_FUNC_WAIT3): Sleep longer for HPUX. (AC_TYPE_SIGNAL): Declare signal as extern "C" for C++. * Makefile.in testsuite/Makefile.in (maintainer-clean): Renamed from realclean. * autoconf.sh (TMPDIR): Inherit from environment, or set if not. * acgeneral.m4 (AC_PREFIX_PROGRAM): Say we're checking the prefix. * acspecific.m4 (AC_ISC_POSIX): Fix typo. (AC_PATH_X): Screen out bogus values from imake. (AC_PROG_LEX): Check for yywrap, not main, in the library. Thu Feb 2 11:32:07 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acconfig.h (__CHAR_UNSIGNED): Protect with #ifndef. From marcus@ee.pdx.edu (Marcus Daniels). * acgeneral.m4 (AC_CACHE_SAVE): Workaround Ultrix and 4.3BSD sh bug in setting the high bit on variable values. From Ken Raeburn. (AC_OUTPUT_FILES, AC_OUTPUT_SUBDIRS): Ignore initial "./" to avoid messing up the dot-dot counts. (AC_OUTPUT_SUBDIRS): Pass INSTALL magic to subdirectories. From Karl Berry. * ifnames.sh: Speed up drastically by folding 3N+2 processes into 2. From Paul Eggert. Wed Feb 1 11:58:27 1995 David J. MacKenzie <djm@catapult.va.pubnix.com> * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Add additional quoting for internal consistency. From junio@twinsun.COM (Jun Hamano). * acspecific.m4 (AC_PATH_XTRA): R6 function name was wrong. From Karl Berry. (AC_C_CROSS): Fix typo in cache var name. From tgl@sss.pgh.pa.us (Tom Lane). (AC_PROG_MAKE_SET): Change / in the make program name into _ so it can be part of a shell variable name. (AC_DECL_YYTEXT): Fix arguments to AC_TRY_LINK. From interran@uluru.stanford.edu (John Interrante). * acgeneral.m4 (AC_CHECK_SIZEOF): If test program fails, set the variable to 0 as the doc sez. From eisen@cc.gatech.edu (Greg Eisenhauer). * acgeneral.m4, acspecific.m4: Remove *.core and core.* as well as core, for recent BSD's. * acspecific.m4 (AC_SYS_INTERPRETER): Use `#! /' instead of `#!/'. * acgeneral.m4 (AC_INIT_BINSH): Likewise. * All scripts: likewise. From woods@kuma.web.net (Greg A. Woods). * acgeneral.m4 (AC_INIT_PREPARE): Use fd 6 instead of 4, to prevent a conflict on the Kubota Titan. From muessig@ipf.bau-verm.uni-karlsruhe.DE (Peter Muessig). * autoconf.sh: Use a more concise syntax to set variables. From Karl Berry. * acspecific.m4 (AC_FUNC_WAIT3): Check page fault measurements to catch Linux. From tobias@server.et-inf.fho-emden.de (Peter Tobias). * acgeneral.m4 (AC_OUTPUT): If running config.status fails, exit with a nonzero status. From Ken Raeburn. Tue Dec 6 19:07:07 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acspecific.m4 (AC_FUNC_GETLOADAVG): Use elf_begin in -lelf check, not elf_read. Mon Nov 7 18:18:11 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acspecific.m4 (AC_PROG_MAKE_SET): Fix msg; $MAKE is not useful Make syntax. Fri Nov 4 09:08:33 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> * Version 2.1. * autoreconf.sh: Add -f --force option. From Theodore Ts'o. Thu Nov 3 10:24:08 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> * acgeneral.m4 (AC_TRY_RUN): Reword warning. * acspecific.m4 (AC_PROG_CXX): Notify the user of the check for GNU C++. (AC_PROG_CXX, AC_PROG_CXXCPP): Use g++, not gcc, as default C++ compiler. * acgeneral.m4 (AC_LANG_CPLUSPLUS): Ditto. * acgeneral.m4 (AC_INIT_PARSE_ARGS): Move ac_usage string directly into the here document to work around A/UX shell limitation. * acgeneral.m4 (AC_COMPILE_CHECK): Mention the MSG macros in the obsolete warning. * autoscan.pl (output_programs): Use AC_CHECK_LIB, not AC_HAVE_LIBRARY. * acgeneral.m4 (AC_CHECK_FUNC): Move prototype outside of function so it works with C++. From ejb@era.COM (E. Jay Berkenbilt). Fri Oct 28 11:23:30 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> * acspecific.m4 (AC_CHECK_HEADERS_DIRENT): Use define, not AC_DEFUN, so the test suite doesn't call it with no arguments, leading to a syntax error in the real Bourne shell. Wed Oct 26 18:40:41 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> * Version 2.0. Tue Oct 25 11:04:16 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> * acgeneral.m4 (AC_CHECK_HEADER, AC_CHECK_HEADERS): Change - in file names to _. * acspecific.m4 (AC_CHECK_HEADER_DIRENT, AC_CHECK_HEADERS_DIRENT): Likewise. Mon Oct 24 11:28:20 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> * Makefile.in (uninstall): Remove the transformed names. (SCRIPTS): Rename from PROGS. * configure.in: Likewise. Fri Oct 21 07:14:23 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> * acgeneral.m4 (AC_TRY_COMPILE): New macro. (AC_LANG_C, AC_LANG_CPLUSPLUS): Set $ac_compile. (AC_TRY_LINK): Don't declare exit. * acspecific.m4 (AC_C_INLINE, AC_C_CONST, AC_CHECK_HEADER_DIRENT, AC_DECL_SYS_SIGLIST, AC_HEADER_SYS_WAIT, AC_TYPE_SIGNAL, AC_FUNC_GETLOADAVG, AC_HEADER_TIME, AC_STRUCT_TM, AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV): Use AC_TRY_COMPILE instead of AC_TRY_LINK. (AC_AIX, AC_MINIX, AC_ISC_POSIX): Must come before AC_TRY_COMPILE. * acspecific.m4 (AC_PROG_LEX): Don't assume -ll if using lex; check for it. From Mark Eichin. Thu Oct 20 07:11:22 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> * acgeneral.m4 (AC_PARSE_ARGS): Ignore --site. * autoscan.pl: Add more blank lines to the output. Pacify perl -w. Wed Oct 19 09:14:50 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_PREREQ_COMPARE): Allow secondary and ternary numbers >99. From John Eaton. Wed Oct 19 00:06:40 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> * ifnames.sh: Take comments out of sed script. Tue Oct 18 00:20:04 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> * acgeneral.m4 (AC_INIT_NOTICE): Set ac_default_prefix. (AC_INIT_PARSE_ARGS, AC_SITE_LOAD, AC_OUTPUT): Use it. (AC_PREFIX_DEFAULT): New macro. From Ken Raeburn. * testsuite/autoconf.s/syntax.exp: Renamed from specific.exp. * acgeneral.m4 (AC_SITE_LOAD): Change where to look for config.site. * configure.in: Call AC_ARG_PROGRAM. * Makefile.in (install): Use program_transform_name. * acgeneral.m4 acspecific.m4 acoldnames.m4: Clarify copying terms. * acgeneral.m4 (AC_CANONICAL_BUILD): Default build to host, not empty. * acspecific.m4 (AC_PROG_CC): Recognize NeXT cpp as GNU C. From tom@basil.icce.rug.NL (Tom R.Hageman). Mon Oct 17 18:25:53 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_CPP): Use assert.h (comes with gcc), not stdio.h (loses for new cross-compilers). From Roland McGrath. Tue Oct 11 13:22:22 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) * acspecific.m4 (AC_PATH_XTRA): Add X_PRE_LIBS variable and assume -lSM if -lICE is found. From Karl Berry. Mon Oct 3 20:12:36 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) * testsuite/Makefile.in (AUTOCONF, AUTOCONFFLAGS): Test ../autoconf, not installed autoconf. Sat Oct 1 04:43:43 1994 Paul Eggert <eggert@twinsun.com> * acspecific.m4: Catch `const' bug in NEC SVR4.0.2 mips cc. * Makefile.in (.sh, .pl, configure): Do chmod before mv. * acheaders, acspecific.m4 (AC_HEADER_SYS_WAIT): New entry. * acconfig.h (HAVE_SYS_WAIT_H): New entry. Wed Sep 28 08:59:01 1994 David MacKenzie <djm@geech.gnu.ai.mit.edu> * Makefile.in: Set datadir to $(prefix)/share. Tue Sep 27 08:00:38 1994 David MacKenzie <djm@geech.gnu.ai.mit.edu> * Makefile.in: Use implicit rules to make scripts. From Jim Meyering. * acconfig.h: Remove #undefs of unused symbols. From Paul Eggert. * testsuite/autoconf.s/defines.exp: New file. * testsuite/autoconf.s/specific.exp: Extract the list of macros to test from acspecific.m4 instead of hardcoding it. * acspecific.m4 (AC_PROG_CXXCPP): Default CXX to gcc, not c++. Mon Sep 26 12:32:46 1994 David MacKenzie <djm@churchy.gnu.ai.mit.edu> * acspecific.m4 (AC_HEADER_DIRENT): Only check for -lx if not using dirent. * autoreconf.sh: Shorten sed label for OSF/1. * acgeneral.m4 acspecific.m4: Change licensing terms for output. Thu Sep 22 15:36:56 1994 David MacKenzie <djm@churchy.gnu.ai.mit.edu> * autoconf.sh (tmpin): Always set. Wed Sep 21 13:12:10 1994 David MacKenzie <djm@geech.gnu.ai.mit.edu> * acgeneral.m4 (AC_INIT_PREPARE): Remove trailing slashes from srcdir. Mon Sep 19 17:11:39 1994 David MacKenzie <djm@geech.gnu.ai.mit.edu> * acgeneral.m4 (AC_INIT, AC_INIT_PARSE_ARGS, AC_CANONICAL_SYSTEM, AC_ARG_PROGRAM): Make the default for program_transform_name be a valid sed script, and substitute it always. Sat Sep 17 08:27:58 1994 David MacKenzie <djm@geech.gnu.ai.mit.edu> * autoheader.sh: Protect `for' loop from checking empty $syms. * ifnames.sh: Use % instead of , as sed s separator. * autoscan.pl: Update output comments. Fri Sep 16 11:20:02 1994 David MacKenzie (djm@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_TYPE_GETGROUPS): Provide a cross compiling default. From Jim Meyering. * acgeneral.m4 (AC_INIT_PARSE_ARGS): Document --program-transform-name. Thu Sep 15 16:26:36 1994 David MacKenzie (djm@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_INIT_NOTICE): Clarify copying notice. Fix up comments between sections. * acspecific.m4 (AC_PROG_LEX): Omit extra checking message. * autoreconf.sh: Give usage if non-option args are given. * autoconf.sh autoheader.sh: Define AC_LOCALDIR for configure.in. Thu Sep 15 11:31:13 1994 Ian Lance Taylor (ian@airs.com) * Makefile.in (check): Set AUTOCONFFLAGS from srcdir, not objdir. Thu Sep 15 09:06:40 1994 David MacKenzie (djm@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_MSG_ERROR): Say that it's an error in the message. * Makefile.in (check): Copy install-sh from srcdir if needed. * autoreconf.sh: Only regenerate autoheader-generated header file templates. Pass relative macrodir properly. * autoconf.sh autoheader.sh autoreconf.sh: Add -l --localdir option. Based on work by Mark Eichin. * ifnames.sh: Add -h option. * autoconf.sh autoheader.sh: Remove -v option. * acgeneral.m4 (AC_CHECK_TYPE): Require AC_HEADER_STDC and check stdlib.h if present. * acgeneral.m4 (AC_OUTPUT): Protect cache save from interruptions. Tue Sep 13 09:46:23 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * Makefile.in (install): Use srcdir. From Mark Eichin. * acgeneral.m4 (AC_OUTPUT_FILES): Automatically add configure_input comment to Makefiles again. * Makefile.in testsuite/Makefile.in: Remove configure_input ref. * acgeneral.m4 (AC_LINK_FILES, AC_OUTPUT_LINKS): Reverse the order of the arguments. Support relative symlinks. * acgeneral.m4 acspecific.m4: Remove some gratuitous {} in shell variable references. * acgeneral.m4 (AC_OUTPUT_FILES): New output variable configure_input replaces big kludge for adding output comment. * Makefile.in, testsuite/Makefile.in: Use it. Mon Sep 12 23:06:08 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_INIT_PREPARE, AC_OUTPUT_SUBDIRS): Make command line quoting work for shell metachars besides blanks. Sun Sep 11 23:34:24 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_PATH_XTRA): Link with X_EXTRA_LIBS when checking for -lSM. * acfunctions (memcmp): Use AC_FUNC_MEMCMP. From Paul Eggert. * acgeneral.m4 (AC_COMPILE_CHECK): Mark obsolete. Sat Sep 10 10:59:19 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * Makefile.in (DISTFILES): Include install-sh, not install.sh. * autoscan.pl: Check AC_MACRODIR. * acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE, AC_CONFIG_SUBDIRS, AC_OUTPUT_SUBDIRS): Make quoting of command line options work. (AC_CONFIG_AUX_DIRS): Check for install-sh over install.sh. * acspecific.m4 (AC_FUNC_GETMNTENT): Only check for second lib if first lib isn't found. From Jim Meyering. Fri Sep 9 10:41:42 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_FUNC_MEMCMP): New macro, from Jim Meyering. * testsuite/autoconf.s/specific.exp: Test it. * testsuite/Makefile.in (site.exp): Simplify. * acgeneral.m4 (AC_CACHE_SAVE): Use a shorter syntax for setting the variables. Idea from Karl Berry. (AC_CHECK_FUNCS, AC_CHECK_HEADERS): Take an action-if-not-found. From Jim Meyering. * acconfig.h: Add entries for getmntent and strftime. * acspecific.m4 (AC_C_CHAR_UNSIGNED): If GCC, don't run a test program. Thu Sep 8 10:53:53 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_USG): Was passing too many args to AC_TRY_LINK. (AC_FUNC_STRFTIME, AC_FUNC_GETMNTENT): New macros. (AC_HEADER_DIRENT): Check for Xenix dir libs. (AC_XENIX_DIR, AC_SCO_INTL, AC_IRIX_SUN, AC_DYNIX_SEQ, AC_AIX, AC_ISC_POSIX, AC_MINIX): Go back to the v1 names. * acoldnames.m4: Delete their aliases. * testsuite/autoconf.s/specific.exp: Check them. * acgeneral.m4 (AC_ARG_PROGRAM): Use `;' instead of `-e' to separate sed arguments, to simplify Makefile usage and support sed arguments containing spaces. (AC_CANONICAL_HOST): Move check for config.sub here from AC_CANONICAL_SYSTEM. * autoheader.m4 (AC_CHECK_HEADERS_DIRENT): Redefine. From Paul Eggert. (AC_CHECK_SIZEOF): Redefine this, not the old name. (AC_HAVE_LIBRARY): Redefine. Wed Sep 7 09:32:31 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * testsuite/lib/common.exp: Ignore warnings about test programs. * testsuite/autoconf.s/specific.exp: Check AC_FUNC_CLOSEDIR_VOID. * Makefile.in (*clean): Remove the new index. (dist): Undo adding write perms. Screws up RCS. * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Remove comments from sed program. * acoldnames.m4: Change a couple of AC_DEFUN to define. Wed Sep 7 01:27:19 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_SITE_LOAD): Check whether $CONFIG_SITE is empty. Tue Sep 6 09:55:30 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_ARG_PROGRAM): New macro. (AC_INIT_PARSE_ARGS, AC_CANONICAL_SYSTEM): Do a little setup for it. * acspecific.m4 (AC_PROG_INSTALL): Clarify comment. Remove check for bsdinst, since it's no better than our install.sh. (AC_CHECK_HEADER_DIRENT, AC_CHECK_HEADERS_DIRENT): New macros. (AC_HEADER_DIRENT, AC_DIR_HEADER): Use them. (AC_PROG_CC, AC_PROG_CXX): Check whether GCC accepts -g. * acgeneral.m4 (AC_INIT_PREPARE): Call AC_PROG_ECHO_N. Use define instead of AC_DEFUN for some frequently called or internal macros that aren't involved in ordering constraints. Mon Sep 5 17:37:36 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_C_CROSS): Provide default argument to AC_TRY_RUN. Fri Sep 2 09:30:41 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_TRY_CPP): Use a temp file so sh -x works. From Mark Nudelman. * acgeneral.m4: --norecursion -> --no-recursion. (AC_OUTPUT_LINKS): Reset srcdir to ac_given_srcdir. * acspecific.m4 (AC_PATH_X): Call AC_ARG_WITH(x, ...). (AC_PROG_INSTALL): Search for bsdinst too. * Makefile.in (dist): Make distribution files writable. * acgeneral.m4 (AC_OUTPUT): Move trap 0 commands to near the end of configure, to work around shell bug in failing to execute the trap when there are commands after AC_OUTPUT. Sat Sep 3 19:47:06 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * acgeneral.m4 (AC_OUTPUT_FILES): Write CONFIG_FILES defn unquoted, so $1 can contain references to shell variables in configure. Thu Sep 1 15:34:15 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_TRY_RUN): Always warn if no cross-compile default is given. * acspecific.m4 (AC_FUNC_MMAP, AC_FUNC_VFORK, AC_FUNC_WAIT3, AC_FUNC_UTIME_NULL, AC_FUNC_STRCOLL): Provide a default for AC_TRY_RUN. (AC_FUNC_CLOSEDIR_VOID): New macro, broken out of AC_HEADER_DIRENT. Thu Sep 1 00:06:38 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acgeneral.m4 acspecific.m4: Discard all output until AC_INIT is called. Remove now-unnecessary dnl's between macro definitions. (AC_OUTPUT): Add exit 0 and optional unquoted here document to end of config.status. Wed Aug 31 00:11:28 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acspecific.m4 (AC_PATH_X_DIRECT): Use AC_TRY_LINK instead of AC_CHECK_LIB, so we don't add the library to $LIBS or print anything. (AC_PATH_XTRA): Remove initial checking message. (AC_HEADER_STDC): In test program, default to no STDC headers if cross compiling. Tue Aug 30 16:16:29 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * autoreconf.sh: Add -h option. * autoupdate.sh: Remove -v option. * acgeneral.m4 (AC_EGREP_CPP, AC_TRY_CPP): Add parens around eval for old shells. From Kaveh Ghazi. (AC_TRY_RUN): Warn when generating configure, if called without a default parameter and AC_CANONICAL_SYSTEM has been called. * autoheader.sh: Don't run `for' loops on empty lists. From Ken Raeburn. * autoconf.sh autoheader.sh: Print the version number using grep like the other scripts, not using m4. * acgeneral.m4: Remove conditional for printing version number. It broke with frozen files. * autoheader.m4: New file. * autoheader.sh: Use it; the frozen version if possible. * Makefile.in (install): Install a frozen autoheader.m4f if possible. * autoconf.m4: Don't sinclude acsite.m4 here. * acgeneral.m4 (AC_INIT): Include it here. Tue Aug 30 14:02:07 1994 David J. MacKenzie (djm@mole.gnu.ai.mit.edu) * acgeneral.m4 (AC_CHECK_LIB): Use AC_DEFINE_UNQUOTED. From Jim Meyering. * acgeneral.m4: Revise diversions, to topologically order macros called via AC_REQUIRE. (AC_DIVERT_PUSH, AC_DIVERT_POP): New macros. (AC_INIT, AC_ARG_ENABLE, AC_ARG_WITH, AC_SUBST, AC_SUBST_FILE, AC_REQUIRE): Use them. From Franc,ois Pinard (bless his soul!). (AC_PRO, AC_EPI): New macros. (AC_DEFUN): Use them. (AC_INIT): sinclude aclocal.m4 herea. * autoconf.m4: Not here. * autoconf.sh: Use a freeze file if available and m4 can do it. * Makefile.in (install): Install a freeze file if m4 supports it. Mon Aug 29 16:18:22 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_TRY_CPP): Remove subshell and move quotes. Sun Aug 28 17:37:26 1994 David J. MacKenzie (djm@bennett.eng.umd.edu) * acspecific.m4 (AC_C_CHAR_UNSIGNED, AC_C_LONG_DOUBLE, AC_C_INLINE): Don't AC_REQUIRE AC_PROG_CC. * acspecific.m4 (AC_RSH, AC_ARG_ARRAY, AC_HAVE_POUNDBANG): Define to print error messages. * acgeneral.m4 (AC_OUTPUT_LINKS): Insert ac_links and ac_files into config.status using an *un*quoted here document. From Ken Raeburn. Sat Aug 27 13:31:58 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT_HEADER): Remove comments from within sed script. From Kaveh Ghazi. Fri Aug 26 17:03:18 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * autoconf.sh, acgeneral.m4: __LINE__ -> __oline__. * acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP): Append any error output to config.log. (AC_EGREP_CPP): Don't use a temp file. * acspecific.m4 (AC_FUNC_ALLOCA): Require CPP. * acgeneral.m4 (AC_INIT_PREPARE): Replace AC_SUBST_DEFAULT calls with AC_SUBST. (AC_SUBST_DEFAULT): Macro removed. * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX): If CFLAGS or CXXFLAGS was not set already, give it a default value according to whether we have gcc. * acspecific.m4 (AC_PATH_XTRA): Use AC_CHECK_LIB, not AC_HAVE_LIBRARY. Fri Aug 26 00:34:11 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acconfig.h (HAVE_UNION_WAIT): Entry removed; it wasn't defined anywhere. * acgeneral.m4 (AC_OUTPUT_HEADER): rm files before mv onto them. (AC_OUTPUT): Remove explicit exit at end of configure, to allow code after AC_OUTPUT (needed for Emacs). * acgeneral.m4 (AC_CANONICAL_SYSTEM): Move setting of alias vars into submacros. * acspecific.m4 (AC_PROG_CPP): If $CPP is set and is a directory, ignore it. Thu Aug 25 09:26:36 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acspecific.m4 (AC_SYS_INTERPRETER): Move hash mark out of macro call. (AC_FUNC_MMAP): If C++, put malloc decls in extern "C". * acgeneral.m4 (AC_INIT_PARSE_ARGS): Untabify help message and indent options. * Makefile.in (DISTFILES): Remove ChangeLog.0. * acgeneral.m4 (AC_CHECK_LIB): Do uppercasing of library name at runtime. (AC_HAVE_LIBRARY): Retain old behavior. * acspecific.m4 (AC_FUNC_VFORK): If C++, use a prototype for the function in the test program. (AC_C_ARG_ARRAY): Macro deleted. * acoldnames.m4, acconfig.h, testsuite/autoconf.s/specific.exp: Remove references to it. * autoupdate.sh: Make sure $infile can be read, and $tmpout has the same permissions. Make sure $infile can be written. From Paul Eggert. * acgeneral.m4 (AC_INIT*): Remove now-incorrect AC_BEFORE calls. (AC_CHECK_FUNC): If C++, use extern "C". (AC_TRY_LINK, AC_TRY_RUN): If C++, declare exit. * acspecific.m4 (AC_PATH_XTRA): Check for more libraries. From Karl Berry. * acgeneral.m4 (AC_INIT_PREPARE): Substitute CPPFLAGS. (AC_LANG_C, AC_LANG_CPLUSPLUS): Include CPPFLAGS in the commands. * acgeneral.m4 (AC_OUTPUT_FILES): Move protection for right side of sed substitution here from AC_MAKE_DEFS, so it applies to all AC_SUBST'd variables. * Makefile.in (install): Use for loops. From Jim Meyering. * acgeneral.m4: Revise diversions to rely on implicit flushing at the end of the m4 run. Idea from Franc,ois Pinard. (AC_INIT_PREPARE, AC_ARG_ENABLE, AC_ARG_WITH, AC_PREFIX_PROGRAM): Write to the appropriate diversions. (AC_ENABLE, AC_WITH): Supply default help string. (AC_ENABLE_INTERNAL, AC_WITH_INTERNAL, AC_PREFIX_INTERNAL): Macros removed. (AC_CONFIG_SUBDIRS): Set `subdirs' here instead of in AC_INIT_PREPARE. (AC_PREFIX): Macro removed. * acoldnames.m4 (AC_PREFIX): Make it an alias for AC_PREFIX_PROGRAM. * acoldnames.m4: We don't officially support calling the subroutines of AC_INIT directly, or replacing them, so don't document it. Wed Aug 24 00:19:05 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acgeneral.m4 (AC_EGREP_CPP, AC_TRY_LINK, AC_TRY_RUN, AC_TRY_CPP): Add #line directives. * autoconf.sh: Make the #line directives accurate. From Franc,ois Pinard. * acgeneral.m4 (AC_OUTPUT): Set ac_given_INSTALL from INSTALL. (AC_SUBST_FILE): Replace with what was AC_INSERT_FILE. (AC_SUBST_DEFAULT): New macro. (AC_INIT_BINSH): Renamed from AC_BINSH. (AC_INIT_PREPARE): Call AC_SUBST_DEFAULT for CFLAGS, CXXFLAGS, and LDFLAGS. * acspecific.m4 (AC_HEADER_MAJOR): Don't nest caching tests. * Makefile.in (clean): Remove the new index files. * configure.in: Check for gm4 before gnum4. * acspecific.m4 (AC_PROG_RSH): Macro removed. * Makefile.in (install): Install autoconf.m4. * acspecific.m4 (AC_SYS_INTERPRETER): New name and calling convention for AC_HAVE_POUNDBANG. (AC_OS_XENIX): Check ac_header_dir instead of DEFS. * testsuite/autoconf.s/specific.exp: Add AC_HEADER_DIRENT. Remove AC_SYS_REMOTE_TAPE. Replace AC_HAVE_POUNDBANG with AC_SYS_INTERPRETER. * acspecific.m4 (AC_INT_16_BITS, AC_LONG_64_BITS): Reword messages. * acgeneral.m4 (AC_CHECK_LIB): Use our standard alternate m4 quote characters << and >> instead of /. * acspecific.m4 (AC_C_CONST, AC_TYPE_GETGROUPS, AC_PROG_GCC_TRADITIONAL): Don't put the test program in a temporary variable. * acgeneral.m4 (AC_CHECK_HEADERS, AC_CHECK_FUNCS): Use AC_DEFINE_UNQUOTED. * autoheader.sh (AC_DEFINE_UNQUOTED): Define. Tue Aug 23 00:03:06 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acgeneral.m4: Improve comments on some macros. Fix improperly quoted undefine calls. (AC_QUOTE_DQUOTE, AC_QUOTE_SQUOTE, AC_QUOTE_HERE, AC_QUOTE_SED, AC_QUOTE_TOKEN, AC_DEFINE_QUOTE, AC_DEFINE_SEDQUOTE, AC_QUOTE_IDENTITY): Macros removed. (AC_DEFINE, AC_DEFINE_UNQUOTED): Only write the (correct) value to confdefs.h. (AC_OUTPUT_MAKE_DEFS): New macro. (AC_OUTPUT): Call it. Move AC_SUBST calls to AC_INIT_PREPARE. (AC_OUTPUT_FILES): Put most variable substitutions in a here document instead of a string, to avoid unwanted changes to the values. (AC_OUTPUT_HEADER): Generate the sed script to transform config.h.in from conftest.h. Only split up the sed script in configure, not also in config.status. * acspecific.m4 (AC_PROG_ECHO_N): Work around some greps lacking -e. * acspecific.m4 (AC_PATH_X, AC_PATH_X_XMKMF, AC_PATH_X_DIRECT, AC_PATH_XTRA): Fix cache use and message printing. * acgeneral.m4 (AC_SITE_LOAD): Check env var CONFIG_SITE first. (AC_OUTPUT_HEADER): New macro broken out of AC_OUTPUT. * acgeneral.m4, acspecific.m4 (AC_FD_MSG, AC_FD_CC): New symbolic constants. * acgeneral.m4, acoldnames.m4 (AC_INIT_PARSE_ARGS): Renamed from AC_INIT_PARSEARGS. * autoupdate.sh: Use $SIMPLE_BACKUP_SUFFIX, if set. * autoheader.sh (AC_CHECK_LIB): Reflect the added arg. * autoconf.m4: New file. * Makefile.in (DISTFILES): Add it. * autoconf.sh, autoheader.sh, Makefile.in: Use it. * acspecific.m4 (AC_SYS_REMOTE_TAPE): Macro removed. * acfunctions, acheaders, acidentifiers, acmakevars, acprograms, autoscan.pl: Use new macro names. * acgeneral.m4 (AC_MSG_ERROR): Enclose within {} so it acts like a single statement. From mjshield@nyx.cs.du.edu (Michael Shields). (AC_CHECK_FUNCS, AC_CHECK_HEADERS): Only compute the uppercase name if we're going to define that symbol. (global): Remove AC_DIVERSION_VAR. (AC_OUTPUT): Adjust quoting and substitutions to replace most variable values directly in the sed script. Handle srcdir, top_srcdir, and INSTALL specially. Add .cpp and .hpp to c-ish suffixes list. * configure.in: Use the new macro names. * ChangeLog.0: New file, broken out of ChangeLog.1. * Makefile.in (DISTFILES): Add it. * autoupdate.sh: Update the regexps to account for changes to acoldnames.m4. Mon Aug 22 23:57:18 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * testsuite/autoconf.s/specific.exp: Use new macro names. Fri Aug 12 10:15:51 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acspecific.m4 (AC_HEADER_DIRENT, AC_DIR_HEADER): Use one cache variable for each header file, not one for all of them. * acgeneral.m4 (AC_CACHE_SAVE): Print a message noting when cache is unwritable. (AC_CHECK_FUNCS, AC_CHECK_HEADERS): Take an optional arg to execute on a match. * acspecific (AC_OS_AIX, AC_OS_MINIX, AC_OS_ISC): Don't need to be called before AC_TRY_CPP, since that doesn't use CFLAGS. * acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG): Print a result whether or not we found the program. (AC_CHECKING): Not obsolete. (AC_WITH, AC_ENABLE, AC_INIT_PREPARE): Merge the --enable and --with diversions. * acgeneral.m4 (AC_DEFUN): New macro. Use it globally to define macros that are used as functions, as opposed to macros that are used as variables. Remove calls to AC_PROVIDE. Thu Aug 11 08:25:08 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acspecific.m4 (AC_OS_XENIX): Fix assignments. From Franc,ois Pinard. (AC_SYS_REMOTE_TAPE): Fix typo. Wed Aug 10 09:30:11 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acspecific.m4 (AC_C_CHAR_UNSIGNED): Don't lie about the result if gcc, just ignore it. * acgeneral.m4 (AC_CHECK_LIB): Add a function argument. * acgeneral.m4 (AC_HAVE_LIBRARY): Make it a wrapper around AC_CHECK_LIB. * acoldnames.m4: Remove its alias. * acspecific.m4: Add argument to callers. * acspecific.m4 (AC_PROG_ECHO_N): Move from acgeneral.m4 AC_MSG_ECHO_N. * acgeneral.m4: Callers changed. * acgeneral.m4 (AC_CACHE_LOAD, AC_CACHE_SAVE, AC_SITE_LOAD, AC_MSG_CHECKING): Aesthetic changes to messages, suggested by Franc,ois Pinard. * acspecific.m4 acgeneral.m4 acoldnames.m4: Rename AC_TRY_CROSS to AC_C_CROSS. * acgeneral.m4 (AC_INIT_PARSEARGS): Don't mention --verbose in help message. (AC_INIT_PREPARE): Use file descriptor 5 for config.log, and 6 for nothing. --verbose no longer does anything. (AC_MSG_ECHO_N): New macro. (AC_MSG_CHECKING, AC_MSG_RESULT, AC_CACHE_VAL): Require it and use the shell variables it sets. (AC_MSG_RESULT, AC_VERBOSE): Print unless --silent/--quiet is given, not only when --verbose is given. (AC_DEFINE): Don't echo anything. (AC_CACHE_VAL): Use a custom echo instead of AC_MSG_RESULT. * acgeneral.m4 (AC_CHECKING, AC_VERBOSE): Put back real versions, marked obsolete. * acoldnames.m4: Delete their aliases. * acgeneral.m4, acspecific.m4 (many macros): Make sure each call to AC_MSG_CHECKING has exactly one matching AC_MSG_RESULT, and make the result messages make sense with the checking messages. * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Use echo, not AC_MSG_RESULT, to print recursion notice. Tue Aug 9 00:17:28 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acgeneral.m4 (AC_OUTPUT): Add comment mentioning config.log. * ChangeLog.1: File split out of ChangeLog. * Makefile.in (DISTFILES): Add it. * acgeneral.m4 (AC_OUTPUT, AC_OUTPUT_HEADER), autoheader.sh: Support optional input-file specification in output-file names. * autoheader.sh: Support top and bottom comments for config.h.in in acconfig.h. * acgeneral.m4, README: Say more about requiring GNU m4. * autoheader.sh: In the list of symbols to get template entries for, start each symbol with a blank. * autoupdate.sh: Add sed substitutions for replacing macro calls without parameters. * acgeneral.m4 (AC_CACHE_VAL): Omit the cache var name from the result message. * acspecific.m4 (AC_DIR_HEADER): Define to be similar to AC_HEADER_DIRENT, but only define the old cpp macros. (AC_HEADER_DIRENT): Only define the new ones. * acoldnames.m4: Don't say that those two macros are synonyms. * acconfig.h: Add the new cpp macros. Add <> to some comments. * acgeneral.m4 (AC_OUTPUT): Don't mess with $INSTALL if it starts with a $, due to user intervention. * Makefile.in, testsuite/Makefile.in: Fix *clean targets. * acgeneral.m4 (AC_CACHE_SAVE, AC_CACHE_LOAD, AC_SITE_LOAD): Use echo instead of AC_MSG_RESULT. (AC_INIT_PARSEARGS): Group options by topic in help message. Idea from Franc,ois Pinard. * TODO: New file. Mon Aug 8 23:04:01 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acgeneral.m4 (AC_OUTPUT): Tighten up srcdir handling code slightly. Add one or more ../ to $INSTALL when it's a relative path and creating a file in a subdirectory. Tue Aug 2 19:54:26 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * autoheader.sh: Read acoldnames.m4. Redefine the new macro names. Only define HAVE_LIBFOO where AC_CHECK_LIB is called with only one argument. Sat Jul 30 09:53:38 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acgeneral.m4 acspecific.m4: The Great Renaming. (Well, I think it's great. You may have your own opinion.) * acspecific.m4 (AC_DIR_HEADER): Define HAVE_<path>_H as well as the old DIRENT, SYSDIR, etc. * acgeneral.m4 acspecific.m4: Add missing spaces between arguments to m4 calls. From Franc,ois Pinard. * autoconf.sh: Read acoldnames.m4. * Makefile.in (DISTFILES, PROGS, install, clean): Add acoldnames.m4 and autoupdate.sh. Tue Jul 26 08:52:17 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * testsuite/Makefile.in (check): Print a message noting that runtest is part of DejaGNU. * autoscan.pl: Remove unneeded backslash. Sun Jul 24 23:30:27 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * Makefile.in (clean mostlyclean distclean realclean): Recurse into testsuite directory. Wed Jul 20 09:38:29 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * Makefile.in (install): Add missing else and fi. * acspecific.m4 (GETGROUPS_T, RETSIGTYPE, STACK_DIRECTION): Use AC_DEFINE_UNQUOTED rather than AC_DEFINE. From Jim Meyering. Tue Jul 19 14:49:02 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acspecific.m4 (AC_MEMORY_H): Add more quotes. * acgeneral.m4 (AC_TEST_RUN): Check for cross_compiling = yes, not whether it's non-empty. * acspecific.m4 (AC_MINUS_C_MINUS_O, AC_SET_MAKE): Eval the cache var assignments. (AC_YYTEXT_POINTER): Fix typo. * testsuite/autoconf.s/specific.exp, testsuite/autoconf.g/sizeof_type.exp, testsuite/autoconf.g/init.exp: New files. * testsuite/lib/common.exp, testsuite/config/unix.exp: Many changes to make them work. * acgeneral.m4 (AC_DEFINE): Use redirection for echo, not $verbose. Sat Jul 2 22:07:18 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acspecific.m4 (AC_REMOTE_TAPE): Substitute PROGS. Thu Jun 30 16:29:15 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acgeneral.m4 (AC_SUBST_FILE): New version from Ken Raeburn. * ifnames: Add --help, --version, --macrodir options. Fri Jun 24 06:03:35 1994 Paul Eggert (eggert@twinsun.com) * acspecific.m4 (AC_VFORK): Improve test for the gcc-sparc vfork bug. Thu Jun 30 09:47:17 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Pass correct --srcdir option to sub configures. Quote args containing spaces. (AC_PREPARE): Set and substitute `subdirs'. Quote args containing spaces. (AC_CANONICAL_HOST, AC_CANONICAL_TARGET, AC_CANONICAL_BUILD): Substitute the cpu, vendor, os variables. * acspecific.m4 (AC_PROG_INSTALL): Look for ginstall before other names. * acgeneral.m4 (AC_TEST_LINK): Add newlines around argument code. From mjshield@nyx.cs.du.edu (Michael Shields). Wed Jun 29 16:56:28 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * autoscan.pl: Add --macrodir option. * acgeneral.m4 (AC_CACHE_SAVE): Capture stderr for Ultrix sh. Tue Jun 28 18:05:00 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * Makefile.in: Make INSTALL from install.texi. Thu Jun 23 02:03:19 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) * ifnames.sh: New file. * Makefile.in: Add it in various places. Tue Jun 14 12:58:38 1994 David J. MacKenzie (djm@bleen.eng.umd.edu) * Makefile.in (DISTFILES): Add testsuite files. * autoconf.sh: Print version number on stdout, not stderr. * acgeneral.m4: Ditto. * acgeneral.m4 (AC_HAVE_LIBRARY): Add OTHER-LIBRARIES arg. Treat empty commands args as if they weren't given. Thu Jun 9 11:39:14 1994 David J. MacKenzie (djm@bleen.eng.umd.edu) * acgeneral.m4 (AC_CHECK_TYPE): New macro. * acspecific.m4 (AC_PROG_CPP, AC_PROG_CXXCPP, AC_YYTEXT_POINTER, AC_LN_S, AC_RSH, AC_STDC_HEADERS, AC_MAJOR_HEADER, AC_DIR_HEADER, AC_STAT_MACROS_BROKEN, AC_SYS_SIGLIST_DECLARED, AC_GETGROUPS_T, AC_UID_T, AC_RETSIGTYPE, AC_MMAP, AC_VFORK, AC_WAIT3, AC_ALLOCA, AC_GETLOADAVG, AC_UTIME_NULL, AC_STRCOLL, AC_SETVBUF_REVERSED, AC_STRUCT_TM, AC_TIME_WITH_SYS_TIME, AC_TIMEZONE, AC_ST_BLOCKS, AC_ST_BLKSIZE, AC_ST_RDEV, AC_CROSS_CHECK, AC_CHAR_UNSIGNED, AC_LONG_DOUBLE, AC_WORDS_BIGENDIAN, AC_ARG_ARRAY, AC_INLINE, AC_CONST, AC_HAVE_POUNDBANG, AC_REMOTE_TAPE, AC_LONG_FILE_NAMES, AC_RESTARTABLE_SYSCALLS, AC_FIND_X, AC_FIND_X_XMKMF, AC_FIND_X_DIRECT): Cache results. (AC_SIZE_T, AC_PID_T, AC_OFF_T, AC_MODE_T): Use AC_CHECK_TYPE. (AC_DIR_HEADER_CHECK): Macro removed. Wed Jun 8 18:03:45 1994 David J. MacKenzie (djm@bleen.eng.umd.edu) * acspecific.m4 (AC_MINUS_C_MINUS_O): Cache results. Thu May 26 09:43:37 1994 David J. Mackenzie (djm@poseidon.cygnus.com) * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX): Cache results. Eliminate temp file in gcc test. (AC_GCC_TRADITIONAL): Cache results. Wed May 25 14:45:44 1994 David J. Mackenzie (djm@poseidon.cygnus.com) * acspecific.m4 (AC_VPRINTF): Use AC_FUNC_CHECK. * acgeneral.m4 (AC_CONFIG_AUX_DIR): Renamed from AC_CONFIG_AUXDIR. (AC_SUBST_FILE): Macro deleted; didn't work, not clear it's needed. * acgeneral.m4 (AC_SITE_LOAD): New macro. (AC_PREPARE): Call it. Wed May 25 08:18:07 1994 David J. Mackenzie (djm@rtl.cygnus.com) * acgeneral.m4: m4exit if --version, to reduce needless delay. * acgeneral.m4 (AC_PREPARE): Redirect file descriptor 6 to config.log. (AC_LANG_C, AC_LANG_CPLUSPLUS): Send compiler messages to desc 6. * acspecific.m4 (AC_MINUS_C_MINUS_O): Likewise. * Makefile.in (distclean): Remove config.log. * acgeneral.m4 (AC_PREPARE): Add AC_BEFORE calls for AC_CONFIG_HEADER, AC_REVISION, AC_PREREQ, and AC_CONFIG_SUBDIRS. Add AC_PROVIDE calls to those macros and AC_ARG_ENABLE and AC_ARG_WITH. * acgeneral.m4 (AC_CANONICAL_SYSTEM, AC_CANONICAL_HOST, AC_CANONICAL_TARGET, AC_CANONICAL_BUILD): Add "ICAL" to names. (AC_LINK_FILES): Renamed from AC_MAKE_LINKS. (AC_TEST_RUN): Renamed from AC_TEST_PROGRAM, which is now an alias. * acspecific.m4: Change callers to use new name. * acgeneral.m4 (AC_PREFIX_INTERNAL): Renamed from AC_PREFIX. (AC_PREFIX): Obsolete wrapper for it. (AC_PREFIX_PROGRAM): Define a variable. (AC_PREPARE): Call AC_PREFIX_INTERNAL if that variable is set. Tue May 24 18:49:35 1994 David J. Mackenzie (djm@rtl.cygnus.com) * acspecific.m4 (AC_ALLOCA): Don't declare alloca if it's already defined. From Bill Sommerfeld. * acgeneral.m4 (AC_TEST_PROGRAM): Verbosely note when using the cross-compiling default. (AC_CACHE_WRITE): Set the cache values only if not already set. (AC_PARSEARGS, AC_OUTPUT): Allow giving an empty prefix or exec_prefix. * acgeneral.m4, acspecific.m4: Rename AC_CONFIG_AUX* to AC_CONFIG_AUXDIR*. * acgeneral.m4 (AC_OUTPUT, AC_OUTPUT_HEADER): Add an env var CONFIG_STATUS to allow overriding the name of config.status. * acspecific.m4 (AC_MINUS_C_MINUS_O): If $CC=cc, don't duplicate the check. From Jim Meyering. * acgeneral.m4 (AC_TEST_PROGRAM): Add missing newline. Always include 'fi' for cross-compiling if. From Jim Meyering. * Makefile.in (prefix, exec_prefix): Use @ substitutions. * acgeneral.m4: Make default cache file ./config.cache, so PATH is not used by "." command. From Jim Meyering. Thu May 19 06:05:07 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_STRUCT_TM): Fixed checking message to be less confusing. Wed May 18 22:11:45 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_BINSH): New macro. (AC_INIT, AC_REVISION): Require AC_BINSH first thing. Wed May 18 09:08:39 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) * acgeneral.m4: Rename some internal macros. Give the diversions symbolic names. (AC_ARG_ENABLE, AC_ARG_WITH, AC_ENABLE_INTERNAL, AC_WITH_INTERNAL): New macros. (AC_PARSEARGS): Print --with and --enable help strings. (AC_ENABLE, AC_WITH): Make wrappers around _INTERNAL functions. Mark obsolete. (AC_PREPARE): Execute any saved up --with or --enable code. Tue May 17 15:18:00 1994 David J. MacKenzie (djm@bleen.eng.umd.edu) * acgeneral.m4 (AC_REVISION): Move quotes around to make it work again. Sat May 14 07:30:57 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acgeneral.m4, acspecific.m4: Clean up some comments. Tue May 10 09:50:12 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acspecific.m4 (AC_PROG_INSTALL): set the _path_ cache variable, not the _program_ one. * acgeneral.m4 (AC_PREFIX): Call AC_PROGRAM_PATH instead of duplicating it. (AC_PROGRAM_CHECK, AC_PROGRAM_PATH): If the user set the variable in the environment, cache that value. (AC_PREPARE, AC_CHECKING, AC_VERBOSE): Use file descriptors 4 and 5 for checking and results messages. Idea from metaconfig 3.0. Mon May 9 08:20:14 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acgeneral.m4 (AC_TEST_PROGRAM): If no default for cross-compiling is given, but we are cross-compiling, give an error. (AC_PROGRAM_EGREP, AC_TEST_LINK, AC_TEST_PROGRAM, AC_TEST_CPP): Don't add an extra blank line after the if-clause. (AC_REVISION): Merge AC_DOREV into this macro. Rename some macros: AC_SYSTEM_TYPE -> AC_CANON_SYSTEM AC_HOST_TYPE -> AC_CANON_HOST AC_TARGET_TYPE -> AC_CANON_TARGET AC_BUILD_TYPE -> AC_CANON_BUILD (AC_OUTPUT): Don't do Cygnus-style magic substitutions on prefix and exec_prefix, just initialize and substitute them normally. Sun May 8 01:09:42 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_AIX, AC_MINIX, AC_ISC_POSIX): Don't call AC_BEFORE for AC_HEADER_EGREP, to avoid require loops. * acgeneral.m4 (AC_HEADER_EGREP): Call AC_PROGRAM_EGREP instead of duplicating most of it. Fri May 6 15:26:48 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acspecific.m4 (AC_YYTEXT_POINTER): Use AC_TEST_LINK, not AC_TEST_PROGRAM. Fri May 6 00:45:29 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acspecific.m4, acgeneral.m4: Add dnl after AC_PROVIDE, AC_REQUIRE, and AC_BEFORE calls. Use AC_CHECKING and AC_TEST_LINK instead of AC_COMPILE_CHECK. * acgeneral.m4 (AC_TEST_LINK): New macro. (AC_COMPILE_CHECK): Mark obsolete. Call AC_CHECKING and AC_TEST_LINK. (AC_PROGRAM_CHECK, AC_PROGRAM_PATH, AC_HAVE_LIBRARY, AC_HEADER_CHECK, AC_FUNC_CHECK, AC_SIZEOF_TYPE): Print "checking" messages even if using cached values. Use AC_TEST_LINK instead of AC_COMPILE_CHECK. * acspecific.m4 (AC_PROG_INSTALL): Ditto. * acgeneral.m4 (AC_PROGRAM_CHECK, AC_PROGRAM_PATH): Fix nesting in cache use. * acspecific.m4 (AC_PROG_INSTALL): Ditto. * acgeneral.m4 (AC_OUTPUT_CONFIG_SUBDIRS): Adjust relative cache file paths before passing them to sub-configures. Omit existing --cache-file arguments. Thu May 5 21:38:51 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acgeneral.m4 (AC_FUNC_CHECK, AC_HEADER_CHECK): Combine redundant code. Use AC_CACHE_VAL. (AC_SIZEOF_TYPE): Use AC_CACHE_VAL. Thu May 5 12:51:32 1994 David J. MacKenzie (djm@gamera.eng.umd.edu) * Makefile.in (all): Don't depend on info files. (install): Don't install INSTALL. (installcheck, install-info): New targets. Thu May 5 08:49:39 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * Makefile.in (dist): chmod the dist directory, not the current directory. Don't depend on DISTFILES. * autoconf.sh: Go back to old way of doing NLS nuisance test. * autoheader.sh: Ditto. * acgeneral.m4: Ditto. Thu May 5 08:36:19 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acgeneral.m4: Use "yes" and "no" or "" uniformly for boolean variables' values. Don't assume default values. (AC_PROGRAM_CHECK, AC_PROGRAM_PATH): Always set the cache variable and use different ones. * acspecific.m4: Use "yes" and "no" or "" uniformly for boolean variables' values. Don't assume default values. (AC_STDC_HEADERS, AC_ALLOCA): Untangle nested tests. Thu May 5 07:51:38 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * Makefile.in (distclean): Remove config.cache. Wed May 4 19:41:35 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_HAVE_LIBRARY): Use AC_CACHE_VAL. * Makefile.in (install): Depend on all again. (install-info): Depend on info again. Wed May 4 15:05:11 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acspecific.m4 (AC_PROG_INSTALL): Use AC_CACHE_VAL. * acgeneral.m4 (AC_PROGRAM_CHECK, AC_PROGRAM_PATH): Use AC_CACHE_VAL. (AC_REPLACE_FUNCS): Use AC_FUNC_CHECK. Rearrange general tests into 4 categories: Checking for files - fundamental (caching) Checking for files - derived (caching) Checking for C features - fundamental (no caching) Checking for C features - derived (caching) * acgeneral.m4 (AC_CACHE_LOAD, AC_CACHE_SAVE, AC_CACHE_VAL): New macros. (AC_PREPARE): Call AC_CACHE_LOAD. (AC_OUTPUT): Call AC_CACHE_SAVE. (AC_PARSEARGS): Add --cache-file=FILE option. (AC_CONFIG_SUBDIRS): Pass --cache-file to subdirectory configures. * acgeneral.m4 (AC_OUTPUT_CONFIG_SUBDIRS): Renamed from AC_CONFIG_SUBDIRS. (AC_CONFIG_SUBDIRS): Just define AC_SUBDIR_LIST. (AC_OUTPUT): Call AC_OUTPUT_CONFIG_SUBDIRS if AC_SUBDIR_LIST is defined. Make config.status --recheck pass --norecursion to configure. * acspecific.m4 (AC_SETVBUF_REVERSED): Print "checking" message. Wed May 4 10:40:56 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) * autoreconf.sh: Add options [--help] [--macrodir=dir] [--verbose] [--version]. * acspecific.m4 (AC_GCC_TRADITIONAL, AC_SET_MAKE, AC_RSH, AC_GETLOADAVG, AC_CROSS_CHECK): Print results verbosely. (AC_GETLOADAVG): Name space cleanup. Wed May 4 09:32:04 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * autoheader.sh, autoconf.sh, acgeneral.m4: Make the NLS nuisance test actually do something. Mon May 2 16:31:33 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * configure.in: Check for standards.texi. * Makefile.in: Put everything back into one directory. Don't assume standards.* exist. Sat Apr 30 09:37:06 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Change >> to > in sed command. Fri Apr 29 21:56:33 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * Makefile.in (all): Make autoreconf too. Fri Apr 29 21:03:48 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acgeneral.m4 (AC_OUTPUT): When doing substitutions on files, if the file starts with "#!", put the "automatically generated" comment on the second line instead of the first. Fri Apr 29 12:53:53 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) * acgeneral.m4 (AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT, AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE, AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS, AC_CONFIG_SUBDIRS): New macros. * acspecific.m4 (AC_PROG_INSTALL): Use install.sh from ac_aux_dir. * Makefile.in: Remove references to standards.*. Add autoreconf. Thu Apr 28 12:01:01 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) * Makefile.in (dist): Add .., ../etc, and ../texinfo files. * acspecific.m4 (AC_LN_S): Add verbose messages. * Makefile.in, configure.in: Add autoscan and its data files. Check for perl. ----- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 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 3 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, see <http://www.gnu.org/licenses/>. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������