]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
1999-11-11 Akim Demaille <akim@epita.fr>
authorAkim Demaille <akim@epita.fr>
Sat, 29 Jan 2000 12:18:40 +0000 (12:18 +0000)
committerAkim Demaille <akim@epita.fr>
Sat, 29 Jan 2000 12:18:40 +0000 (12:18 +0000)
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.

19 files changed:
ChangeLog
Makefile.am
Makefile.in
aclocal.m4
configure
configure.in
doc/Makefile.am
doc/Makefile.in
lib/autotest/general.m4 [new file with mode: 0644]
m4/Makefile.am
m4/Makefile.in
m4/atconfig.m4 [new file with mode: 0644]
man/Makefile.in
tests/Makefile.am [new file with mode: 0644]
tests/atconfig.in [new file with mode: 0644]
tests/atgeneral.m4 [new file with mode: 0644]
tests/suite.m4 [new file with mode: 0644]
tests/syntax.m4 [new file with mode: 0644]
testsuite/Makefile.in

index d7898195251e8bb7b8e267b257a00e9a94b82c47..be942439125eefd8cc6d70c64f4fe6346878e87c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+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
index 9eceb7e9cdc0f28dc0917e535e511516702b5784..534206e92265bf79a5577cb28b52d571e505d88f 100644 (file)
@@ -20,7 +20,7 @@
 
 AUTOMAKE_OPTIONS = check-news 1.4
 
-SUBDIRS = . m4 man testsuite
+SUBDIRS = . m4 man tests testsuite
 
 MAKEINFO = makeinfo --no-split
 TEXI2HTML = texi2html
index f77219cd4f95895c4bdbfbfcd64fffa889f82954..841b4bf294d51a32b326b66b0626e1f8360330dc 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
 
 # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -10,6 +10,7 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -45,10 +46,9 @@ AUTOMAKE = @AUTOMAKE@
 AUTOHEADER = @AUTOHEADER@
 
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_FLAG =
 transform = @program_transform_name@
 
 NORMAL_INSTALL = :
@@ -57,8 +57,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-
-@SET_MAKE@
 AWK = @AWK@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
@@ -66,14 +64,14 @@ PERL = @PERL@
 PERLSCRIPTS = @PERLSCRIPTS@
 standards_texi = @standards_texi@
 
-
 AUTOMAKE_OPTIONS = check-news 1.4
 
-SUBDIRS = . man testsuite
+SUBDIRS = . m4 man tests testsuite
 
 MAKEINFO = makeinfo --no-split
 TEXI2HTML = texi2html
 SUFFIXES = .m4 .m4f .pl .sh
+ACLOCAL_AMFLAGS = --version >/dev/null && touch aclocal.m4
 
 bin_SCRIPTS = autoconf autoheader autoreconf autoupdate ifnames @PERLSCRIPTS@
 EXTRA_SCRIPTS = autoscan
@@ -83,9 +81,7 @@ EXTRA_SCRIPTS = autoscan
 # s/nodistpackageDATA/nodist_pkgdata_DATA/
 # and adapt dependencies once we use a more recent Automake
 
-distpkgdataDATA = \
-acfunctions acheaders acidentifiers acmakevars acprograms \
-acgeneral.m4 acoldnames.m4 acspecific.m4 autoconf.m4 autoheader.m4
+distpkgdataDATA =  acfunctions acheaders acidentifiers acmakevars acprograms acgeneral.m4 acoldnames.m4 acspecific.m4 autoconf.m4 autoheader.m4
 
 
 nodistpkgdataDATA = autoconf.m4f autoheader.m4f acversion.m4
@@ -97,57 +93,44 @@ autoconf_TEXINFOS = install.texi
 standards_TEXINFOS = make-stds.texi
 
 OLDCHANGELOGS = ChangeLog.0 ChangeLog.1
-EXTRA_DIST = $(OLDCHANGELOGS) \
-autoconf.sh autoheader.sh autoreconf.sh autoupdate.sh \
-ifnames.sh autoscan.pl INSTALL.txt \
-$(distpkgdataDATA)
+EXTRA_DIST = $(OLDCHANGELOGS) autoconf.sh autoheader.sh autoreconf.sh autoupdate.sh ifnames.sh autoscan.pl INSTALL.txt $(distpkgdataDATA)
 
 
 # Files that should be removed, but which Automake does not know.
 # There are texi2dvi files, frozen files, and the scripts.
-CLEANFILES = autoconf.cvs autoconf.ev autoconf.evs autoconf.ma autoconf.mas \
-autoconf.ov autoconf.ovs autoconf.m4f autoheader.m4f $(bin_SCRIPTS)
+CLEANFILES = autoconf.cvs autoconf.ev autoconf.evs autoconf.ma autoconf.mas autoconf.ov autoconf.ovs autoconf.m4f autoheader.m4f $(bin_SCRIPTS)
 
 
 # The scripts.
 
-editsh = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e \
-       's,@''M4''@,$(M4),g'  -e 's,@''AWK''@,$(AWK),g' \
-       -e 's,@''SHELL''@,$(SHELL),g' \
-       -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g'
+editsh = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e   's,@''M4''@,$(M4),g'  -e 's,@''AWK''@,$(AWK),g'         -e 's,@''SHELL''@,$(SHELL),g'   -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g'
 
-editpl = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e 's,@''PERL''@,$(PERL),g' \
-       -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g'
+editpl = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e 's,@''PERL''@,$(PERL),g'  -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g'
 
-subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES =  acversion.m4
 SCRIPTS =  $(bin_SCRIPTS)
 
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = 
 TEXI2DVI = texi2dvi
 INFO_DEPS = autoconf.info standards.info
 DVIS = autoconf.dvi standards.dvi
 TEXINFOS = autoconf.texi standards.texi
 DATA =  $(pkgdata_DATA)
 
-DIST_COMMON =  README $(autoconf_TEXINFOS) $(pkgdata_DATA) \
-$(standards_TEXINFOS) AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-Makefile.in NEWS THANKS TODO aclocal.m4 acversion.m4.in config.guess \
-config.sub configure configure.in depcomp install-sh mdate-sh missing \
-mkinstalldirs stamp-vti texinfo.tex version.texi
+DIST_COMMON =  README $(autoconf_TEXINFOS) $(standards_TEXINFOS) AUTHORS \
+COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS THANKS TODO \
+aclocal.m4 acversion.m4.in config.guess config.sub configure \
+configure.in install-sh mdate-sh missing mkinstalldirs stamp-vti \
+texinfo.tex version.texi
 
 
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
 
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
+TAR = tar
 GZIP_ENV = --best
 all: all-redirect
 .SUFFIXES:
@@ -171,22 +154,19 @@ install-binSCRIPTS: $(bin_SCRIPTS)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(bindir)
        @list='$(bin_SCRIPTS)'; for p in $$list; do \
-         f="`echo $$p|sed '$(transform)'`"; \
          if test -f $$p; then \
-           echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f"; \
-           $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f; \
-         elif test -f $(srcdir)/$$p; then \
-           echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f"; \
-           $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f; \
-         else :; fi; \
+           echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+           $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+         else if test -f $(srcdir)/$$p; then \
+           echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+           $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+         else :; fi; fi; \
        done
 
 uninstall-binSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_SCRIPTS)'; for p in $$list; do \
-         f="`echo $$p|sed '$(transform)'`"; \
-         echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
-         rm -f $(DESTDIR)$(bindir)/$$f; \
+       list='$(bin_SCRIPTS)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
        done
 
 $(srcdir)/version.texi: stamp-vti
@@ -228,7 +208,7 @@ DVIPS = dvips
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 
 .texi.dvi:
-       TEXINPUTS=$(srcdir):$$TEXINPUTS \
+       TEXINPUTS=.:$$TEXINPUTS \
          MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
 
 .texi:
@@ -247,7 +227,7 @@ DVIPS = dvips
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 
 .texinfo.dvi:
-       TEXINPUTS=$(srcdir):$$TEXINPUTS \
+       TEXINPUTS=.:$$TEXINPUTS \
          MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
 
 .txi.info:
@@ -256,7 +236,7 @@ DVIPS = dvips
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 
 .txi.dvi:
-       TEXINPUTS=$(srcdir):$$TEXINPUTS \
+       TEXINPUTS=.:$$TEXINPUTS \
          MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
 
 .txi:
@@ -272,7 +252,7 @@ install-info-am: $(INFO_DEPS)
        @list='$(INFO_DEPS)'; \
        for file in $$list; do \
          d=$(srcdir); \
-         for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+         for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
            if test -f $$d/$$ifile; then \
              echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
              $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
@@ -291,26 +271,24 @@ install-info-am: $(INFO_DEPS)
 uninstall-info:
        $(PRE_UNINSTALL)
        @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
-         list='$(INFO_DEPS)'; \
-         for file in $$list; do \
-           echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
-           install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
-         done; \
-       else :; fi
+         ii=yes; \
+       else ii=; fi; \
+       list='$(INFO_DEPS)'; \
+       for file in $$list; do \
+         test -z "$ii" \
+           || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
+       done
        @$(NORMAL_UNINSTALL)
-       @list='$(INFO_DEPS)'; \
+       list='$(INFO_DEPS)'; \
        for file in $$list; do \
-         (if cd $(DESTDIR)$(infodir); then \
-            echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
-            rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
-          else :; fi); \
+         (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
        done
 
 dist-info: $(INFO_DEPS)
        list='$(INFO_DEPS)'; \
        for base in $$list; do \
          d=$(srcdir); \
-         for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
+         for file in `cd $$d && eval echo $$base*`; do \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
            || cp -p $$d/$$file $(distdir)/$$file; \
@@ -319,16 +297,15 @@ dist-info: $(INFO_DEPS)
 
 mostlyclean-aminfo:
        -rm -f autoconf.aux autoconf.cp autoconf.cps autoconf.dvi autoconf.fn \
-         autoconf.fns autoconf.pgs autoconf.ky autoconf.kys \
-         autoconf.ps autoconf.log autoconf.pg autoconf.toc autoconf.tp \
+         autoconf.fns autoconf.ky autoconf.kys autoconf.ps \
+         autoconf.log autoconf.pg autoconf.toc autoconf.tp \
          autoconf.tps autoconf.vr autoconf.vrs autoconf.op autoconf.tr \
-         autoconf.cv autoconf.cn autoconf.cm autoconf.ov standards.aux \
-         standards.cp standards.cps standards.dvi standards.fn \
-         standards.fns standards.pgs standards.ky standards.kys \
-         standards.ps standards.log standards.pg standards.toc \
-         standards.tp standards.tps standards.vr standards.vrs \
-         standards.op standards.tr standards.cv standards.cn \
-         standards.cm standards.ov
+         autoconf.cv autoconf.cn standards.aux standards.cp \
+         standards.cps standards.dvi standards.fn standards.fns \
+         standards.ky standards.kys standards.ps standards.log \
+         standards.pg standards.toc standards.tp standards.tps \
+         standards.vr standards.vrs standards.op standards.tr \
+         standards.cv standards.cn
 
 clean-aminfo:
 
@@ -346,18 +323,19 @@ install-pkgdataDATA: $(pkgdata_DATA)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
        @list='$(pkgdata_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
-         echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
-         $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
+         if test -f $(srcdir)/$$p; then \
+           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p"; \
+           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p; \
+         else if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p"; \
+           $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
+         fi; fi; \
        done
 
 uninstall-pkgdataDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(pkgdata_DATA)'; for p in $$list; do \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
-         echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
-         rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
+       list='$(pkgdata_DATA)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(pkgdatadir)/$$p; \
        done
 
 # This directory's subdirectories are mostly independent; you can cd
@@ -367,6 +345,8 @@ uninstall-pkgdataDATA:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 
+@SET_MAKE@
+
 all-recursive install-data-recursive install-exec-recursive \
 installdirs-recursive install-recursive uninstall-recursive  \
 check-recursive installcheck-recursive info-recursive dvi-recursive:
@@ -394,7 +374,7 @@ maintainer-clean-recursive:
        dot_seen=no; \
        rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
          rev="$$subdir $$rev"; \
-         if test "$$subdir" = "."; then dot_seen=yes; else :; fi; \
+         test "$$subdir" = "." && dot_seen=yes; \
        done; \
        test "$$dot_seen" = "no" && rev=". $$rev"; \
        target=`echo $@ | sed s/-recursive//`; \
@@ -415,17 +395,15 @@ tags-recursive:
 
 tags: TAGS
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(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; } \
+ID: $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
-       mkid -f$$here/ID $$unique $(LISP)
+       here=`pwd` && cd $(srcdir) \
+         && mkid -f$$here/ID $$unique $(LISP)
 
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
        tags=; \
        here=`pwd`; \
        list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -433,14 +411,12 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
            test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
    fi; \
        done; \
-       list='$(SOURCES) $(HEADERS) $(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; } \
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
-         || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
 
 mostlyclean-tags:
 
@@ -454,64 +430,54 @@ maintainer-clean-tags:
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(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
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
-       GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       -rm -rf $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
        mkdir $(distdir)/=build
        mkdir $(distdir)/=inst
-       chmod a-w $(distdir)
-       dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
-         && cd $(distdir)/=build \
+       dc_install_base=`cd $(distdir)/=inst && pwd`; \
+       cd $(distdir)/=build \
          && ../configure --srcdir=.. --prefix=$$dc_install_base \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
          && $(MAKE) $(AM_MAKEFLAGS) install \
          && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-         && test `find $$dc_install_base -type f -print | wc -l` -le 1 \
-         && $(MAKE) $(AM_MAKEFLAGS) dist \
-         && $(MAKE) $(AM_MAKEFLAGS) distclean \
-         && rm -f $(distdir).tar.gz \
-         && test `find . -type f -print | wc -l` -eq 0
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+         && $(MAKE) $(AM_MAKEFLAGS) dist
+       -rm -rf $(distdir)
        @banner="$(distdir).tar.gz is ready for distribution"; \
        dashes=`echo "$$banner" | sed s/./=/g`; \
        echo "$$dashes"; \
        echo "$$banner"; \
        echo "$$dashes"
 dist: distdir
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
-       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+       -chmod -R a+r $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+       -rm -rf $(distdir)
 dist-all: distdir
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
-       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+       -chmod -R a+r $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+       -rm -rf $(distdir)
 distdir: $(DISTFILES)
        @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \
          echo "NEWS not updated; not releasing" 1>&2; \
          exit 1; \
        fi
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+       -rm -rf $(distdir)
        mkdir $(distdir)
+       -chmod 777 $(distdir)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pR $$d/$$file $(distdir); \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@@ -523,6 +489,7 @@ distdir: $(DISTFILES)
            test -d $(distdir)/$$subdir \
            || mkdir $(distdir)/$$subdir \
            || exit 1; \
+           chmod 777 $(distdir)/$$subdir; \
            (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
              || exit 1; \
          fi; \
@@ -552,7 +519,7 @@ uninstall: uninstall-recursive
 all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA)
 all-redirect: all-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
 installdirs: installdirs-recursive
 installdirs-am:
        $(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) \
@@ -569,7 +536,6 @@ distclean-generic:
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
-       -rm -f Makefile.in
 mostlyclean-am:  mostlyclean-vti mostlyclean-aminfo mostlyclean-tags \
                mostlyclean-generic
 
@@ -599,8 +565,7 @@ maintainer-clean: maintainer-clean-recursive
 distclean-vti clean-vti maintainer-clean-vti install-info-am \
 uninstall-info mostlyclean-aminfo distclean-aminfo clean-aminfo \
 maintainer-clean-aminfo uninstall-pkgdataDATA install-pkgdataDATA \
-install-recursive uninstall-recursive install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
+install-data-recursive uninstall-data-recursive install-exec-recursive \
 uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
 all-recursive check-recursive installcheck-recursive info-recursive \
 dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
@@ -608,10 +573,9 @@ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
 distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
 dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
 install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all install-strip \
-installdirs-am installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
+uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
 
 # INSTALL is a special case.  Automake seems to have a single name space
index 03099c0b742bc90d1c99566ef988866427a940b5..e9683a5f41f712714c8d8839872a9170ef4d9d75 100644 (file)
@@ -1 +1,5 @@
-AC_INCLUDES((m4/init.m4, m4/missing.m4, m4/sanity.m4))dnl
+AC_INCLUDES((
+  m4/init.m4,
+  m4/missing.m4,
+  m4/sanity.m4,
+  m4/atconfig.m4))
index 2d0b9f6df0736188fb2f0237267931f2aedfb337..332a54e509162c2ff62973048cc51e819bac62c9 100755 (executable)
--- a/configure
+++ b/configure
@@ -830,12 +830,39 @@ else
    echo "$ac_t""missing" 1>&6
 fi
 
+AT_TESTPATH=..
+
+echo $ac_n "checking how to suppress newlines using echo... $ac_c" 1>&6
+echo "configure:837: checking how to suppress newlines using echo" 1>&5
+if test "${fp_cv_prog_echo_nonl+set}" = set; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    fp_cv_prog_echo_nonl=no
+  else
+    fp_cv_prog_echo_nonl=option
+  fi
+else
+  fp_cv_prog_echo_nonl=escape
+fi
+
+fi
+echo "$ac_t""$fp_cv_prog_echo_nonl" 1>&6
+test $fp_cv_prog_echo_nonl = no \
+  && echo 2>&1 "WARNING: \`echo' not powerful enough for \`make check'"
+case $fp_cv_prog_echo_nonl in
+  no) ECHO_N= ECHO_C= ;;
+  option) ECHO_N=-n ECHO_C= ;;
+  escape) ECHO_N= ECHO_C='\c' ;;
+esac
+
 for ac_prog in gm4 gnum4 m4
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word... $ac_c" 1>&6
-echo "configure:839: checking for $ac_word" 1>&5
+echo "configure:866: checking for $ac_word" 1>&5
 if test "${ac_cv_path_M4+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -869,7 +896,7 @@ done
 test -n "$M4" || M4="m4"
 
 echo $ac_n "checking whether m4 supports frozen files... $ac_c" 1>&6
-echo "configure:873: checking whether m4 supports frozen files" 1>&5
+echo "configure:900: checking whether m4 supports frozen files" 1>&5
 if test "${ac_cv_prog_gnu_m4+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -890,7 +917,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word... $ac_c" 1>&6
-echo "configure:894: checking for $ac_word" 1>&5
+echo "configure:921: checking for $ac_word" 1>&5
 if test "${ac_cv_prog_AWK+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -920,7 +947,7 @@ test -n "$AWK" && break
 done
 
 echo $ac_n "checking for working help2man... $ac_c" 1>&6
-echo "configure:924: checking for working help2man" 1>&5
+echo "configure:951: checking for working help2man" 1>&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -935,7 +962,7 @@ fi
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word... $ac_c" 1>&6
-echo "configure:939: checking for $ac_word" 1>&5
+echo "configure:966: checking for $ac_word" 1>&5
 if test "${ac_cv_path_PERL+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -983,7 +1010,7 @@ fi
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install... $ac_c" 1>&6
-echo "configure:987: checking for a BSD compatible install" 1>&5
+echo "configure:1014: checking for a BSD compatible install" 1>&5
 if test -z "$INSTALL"; then
 if test "${ac_cv_path_install+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1147,7 +1174,8 @@ cat >$CONFIG_STATUS <<EOF
 
 # Files that config.status was made for.
 config_files="\\
-  acversion.m4 Makefile m4/Makefile man/Makefile testsuite/Makefile"
+  acversion.m4 Makefile m4/Makefile man/Makefile tests/Makefile tests/atconfig
+  testsuite/Makefile"
 
 ac_cs_usage="\\
 \\\`$CONFIG_STATUS' instantiates files from templates according to the
@@ -1222,6 +1250,8 @@ do
   'Makefile' ) CONFIG_FILES="\$CONFIG_FILES Makefile" ;;
   'm4/Makefile' ) CONFIG_FILES="\$CONFIG_FILES m4/Makefile" ;;
   'man/Makefile' ) CONFIG_FILES="\$CONFIG_FILES man/Makefile" ;;
+  'tests/Makefile' ) CONFIG_FILES="\$CONFIG_FILES tests/Makefile" ;;
+  'tests/atconfig' ) CONFIG_FILES="\$CONFIG_FILES tests/atconfig" ;;
   'testsuite/Makefile' ) CONFIG_FILES="\$CONFIG_FILES testsuite/Makefile" ;;
 
   # This is an error.
@@ -1299,6 +1329,9 @@ s%@AUTOMAKE@%$AUTOMAKE%;t t
 s%@AUTOHEADER@%$AUTOHEADER%;t t
 s%@MAKEINFO@%$MAKEINFO%;t t
 s%@SET_MAKE@%$SET_MAKE%;t t
+s%@AT_TESTPATH@%$AT_TESTPATH%;t t
+s%@ECHO_N@%$ECHO_N%;t t
+s%@ECHO_C@%$ECHO_C%;t t
 s%@M4@%$M4%;t t
 s%@AWK@%$AWK%;t t
 s%@HELP2MAN@%$HELP2MAN%;t t
index 1ef917fc95f14d83d1bd673fb478f87b69371925..4e1440401e98a4b65179436b4d1e9eb2ca82233a 100644 (file)
@@ -2,6 +2,9 @@ dnl Process this file with autoconf to produce a configure script.
 AC_INIT(acgeneral.m4)
 AM_INIT_AUTOMAKE(autoconf, 2.14a)
 
+dnl Initialize the test suite.
+AT_CONFIG(..)
+
 dnl We use a path for GNU m4 so even if users have another m4 first in
 dnl their path, the installer can configure with a path that has GNU m4
 dnl first and get that path embedded in the installed autoconf and
@@ -38,4 +41,4 @@ if test -f $srcdir/standards.texi; then
 fi
 AC_SUBST(standards_texi)dnl
 
-AC_OUTPUT(acversion.m4 Makefile m4/Makefile man/Makefile testsuite/Makefile)
+AC_OUTPUT(acversion.m4 Makefile m4/Makefile man/Makefile tests/Makefile tests/atconfig testsuite/Makefile)
index 9eceb7e9cdc0f28dc0917e535e511516702b5784..534206e92265bf79a5577cb28b52d571e505d88f 100644 (file)
@@ -20,7 +20,7 @@
 
 AUTOMAKE_OPTIONS = check-news 1.4
 
-SUBDIRS = . m4 man testsuite
+SUBDIRS = . m4 man tests testsuite
 
 MAKEINFO = makeinfo --no-split
 TEXI2HTML = texi2html
index f77219cd4f95895c4bdbfbfcd64fffa889f82954..841b4bf294d51a32b326b66b0626e1f8360330dc 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
 
 # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -10,6 +10,7 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -45,10 +46,9 @@ AUTOMAKE = @AUTOMAKE@
 AUTOHEADER = @AUTOHEADER@
 
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_FLAG =
 transform = @program_transform_name@
 
 NORMAL_INSTALL = :
@@ -57,8 +57,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-
-@SET_MAKE@
 AWK = @AWK@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
@@ -66,14 +64,14 @@ PERL = @PERL@
 PERLSCRIPTS = @PERLSCRIPTS@
 standards_texi = @standards_texi@
 
-
 AUTOMAKE_OPTIONS = check-news 1.4
 
-SUBDIRS = . man testsuite
+SUBDIRS = . m4 man tests testsuite
 
 MAKEINFO = makeinfo --no-split
 TEXI2HTML = texi2html
 SUFFIXES = .m4 .m4f .pl .sh
+ACLOCAL_AMFLAGS = --version >/dev/null && touch aclocal.m4
 
 bin_SCRIPTS = autoconf autoheader autoreconf autoupdate ifnames @PERLSCRIPTS@
 EXTRA_SCRIPTS = autoscan
@@ -83,9 +81,7 @@ EXTRA_SCRIPTS = autoscan
 # s/nodistpackageDATA/nodist_pkgdata_DATA/
 # and adapt dependencies once we use a more recent Automake
 
-distpkgdataDATA = \
-acfunctions acheaders acidentifiers acmakevars acprograms \
-acgeneral.m4 acoldnames.m4 acspecific.m4 autoconf.m4 autoheader.m4
+distpkgdataDATA =  acfunctions acheaders acidentifiers acmakevars acprograms acgeneral.m4 acoldnames.m4 acspecific.m4 autoconf.m4 autoheader.m4
 
 
 nodistpkgdataDATA = autoconf.m4f autoheader.m4f acversion.m4
@@ -97,57 +93,44 @@ autoconf_TEXINFOS = install.texi
 standards_TEXINFOS = make-stds.texi
 
 OLDCHANGELOGS = ChangeLog.0 ChangeLog.1
-EXTRA_DIST = $(OLDCHANGELOGS) \
-autoconf.sh autoheader.sh autoreconf.sh autoupdate.sh \
-ifnames.sh autoscan.pl INSTALL.txt \
-$(distpkgdataDATA)
+EXTRA_DIST = $(OLDCHANGELOGS) autoconf.sh autoheader.sh autoreconf.sh autoupdate.sh ifnames.sh autoscan.pl INSTALL.txt $(distpkgdataDATA)
 
 
 # Files that should be removed, but which Automake does not know.
 # There are texi2dvi files, frozen files, and the scripts.
-CLEANFILES = autoconf.cvs autoconf.ev autoconf.evs autoconf.ma autoconf.mas \
-autoconf.ov autoconf.ovs autoconf.m4f autoheader.m4f $(bin_SCRIPTS)
+CLEANFILES = autoconf.cvs autoconf.ev autoconf.evs autoconf.ma autoconf.mas autoconf.ov autoconf.ovs autoconf.m4f autoheader.m4f $(bin_SCRIPTS)
 
 
 # The scripts.
 
-editsh = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e \
-       's,@''M4''@,$(M4),g'  -e 's,@''AWK''@,$(AWK),g' \
-       -e 's,@''SHELL''@,$(SHELL),g' \
-       -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g'
+editsh = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e   's,@''M4''@,$(M4),g'  -e 's,@''AWK''@,$(AWK),g'         -e 's,@''SHELL''@,$(SHELL),g'   -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g'
 
-editpl = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e 's,@''PERL''@,$(PERL),g' \
-       -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g'
+editpl = sed -e 's,@''datadir''@,$(pkgdatadir),g' -e 's,@''PERL''@,$(PERL),g'  -e 's,@''VERSION''@,$(VERSION),g' -e 's,@''PACKAGE''@,$(PACKAGE),g'
 
-subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES =  acversion.m4
 SCRIPTS =  $(bin_SCRIPTS)
 
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = 
 TEXI2DVI = texi2dvi
 INFO_DEPS = autoconf.info standards.info
 DVIS = autoconf.dvi standards.dvi
 TEXINFOS = autoconf.texi standards.texi
 DATA =  $(pkgdata_DATA)
 
-DIST_COMMON =  README $(autoconf_TEXINFOS) $(pkgdata_DATA) \
-$(standards_TEXINFOS) AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-Makefile.in NEWS THANKS TODO aclocal.m4 acversion.m4.in config.guess \
-config.sub configure configure.in depcomp install-sh mdate-sh missing \
-mkinstalldirs stamp-vti texinfo.tex version.texi
+DIST_COMMON =  README $(autoconf_TEXINFOS) $(standards_TEXINFOS) AUTHORS \
+COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS THANKS TODO \
+aclocal.m4 acversion.m4.in config.guess config.sub configure \
+configure.in install-sh mdate-sh missing mkinstalldirs stamp-vti \
+texinfo.tex version.texi
 
 
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
 
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
+TAR = tar
 GZIP_ENV = --best
 all: all-redirect
 .SUFFIXES:
@@ -171,22 +154,19 @@ install-binSCRIPTS: $(bin_SCRIPTS)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(bindir)
        @list='$(bin_SCRIPTS)'; for p in $$list; do \
-         f="`echo $$p|sed '$(transform)'`"; \
          if test -f $$p; then \
-           echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f"; \
-           $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f; \
-         elif test -f $(srcdir)/$$p; then \
-           echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f"; \
-           $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f; \
-         else :; fi; \
+           echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+           $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+         else if test -f $(srcdir)/$$p; then \
+           echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+           $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+         else :; fi; fi; \
        done
 
 uninstall-binSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_SCRIPTS)'; for p in $$list; do \
-         f="`echo $$p|sed '$(transform)'`"; \
-         echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
-         rm -f $(DESTDIR)$(bindir)/$$f; \
+       list='$(bin_SCRIPTS)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
        done
 
 $(srcdir)/version.texi: stamp-vti
@@ -228,7 +208,7 @@ DVIPS = dvips
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 
 .texi.dvi:
-       TEXINPUTS=$(srcdir):$$TEXINPUTS \
+       TEXINPUTS=.:$$TEXINPUTS \
          MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
 
 .texi:
@@ -247,7 +227,7 @@ DVIPS = dvips
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 
 .texinfo.dvi:
-       TEXINPUTS=$(srcdir):$$TEXINPUTS \
+       TEXINPUTS=.:$$TEXINPUTS \
          MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
 
 .txi.info:
@@ -256,7 +236,7 @@ DVIPS = dvips
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 
 .txi.dvi:
-       TEXINPUTS=$(srcdir):$$TEXINPUTS \
+       TEXINPUTS=.:$$TEXINPUTS \
          MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
 
 .txi:
@@ -272,7 +252,7 @@ install-info-am: $(INFO_DEPS)
        @list='$(INFO_DEPS)'; \
        for file in $$list; do \
          d=$(srcdir); \
-         for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+         for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
            if test -f $$d/$$ifile; then \
              echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
              $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
@@ -291,26 +271,24 @@ install-info-am: $(INFO_DEPS)
 uninstall-info:
        $(PRE_UNINSTALL)
        @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
-         list='$(INFO_DEPS)'; \
-         for file in $$list; do \
-           echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
-           install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
-         done; \
-       else :; fi
+         ii=yes; \
+       else ii=; fi; \
+       list='$(INFO_DEPS)'; \
+       for file in $$list; do \
+         test -z "$ii" \
+           || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
+       done
        @$(NORMAL_UNINSTALL)
-       @list='$(INFO_DEPS)'; \
+       list='$(INFO_DEPS)'; \
        for file in $$list; do \
-         (if cd $(DESTDIR)$(infodir); then \
-            echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
-            rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
-          else :; fi); \
+         (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
        done
 
 dist-info: $(INFO_DEPS)
        list='$(INFO_DEPS)'; \
        for base in $$list; do \
          d=$(srcdir); \
-         for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
+         for file in `cd $$d && eval echo $$base*`; do \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
            || cp -p $$d/$$file $(distdir)/$$file; \
@@ -319,16 +297,15 @@ dist-info: $(INFO_DEPS)
 
 mostlyclean-aminfo:
        -rm -f autoconf.aux autoconf.cp autoconf.cps autoconf.dvi autoconf.fn \
-         autoconf.fns autoconf.pgs autoconf.ky autoconf.kys \
-         autoconf.ps autoconf.log autoconf.pg autoconf.toc autoconf.tp \
+         autoconf.fns autoconf.ky autoconf.kys autoconf.ps \
+         autoconf.log autoconf.pg autoconf.toc autoconf.tp \
          autoconf.tps autoconf.vr autoconf.vrs autoconf.op autoconf.tr \
-         autoconf.cv autoconf.cn autoconf.cm autoconf.ov standards.aux \
-         standards.cp standards.cps standards.dvi standards.fn \
-         standards.fns standards.pgs standards.ky standards.kys \
-         standards.ps standards.log standards.pg standards.toc \
-         standards.tp standards.tps standards.vr standards.vrs \
-         standards.op standards.tr standards.cv standards.cn \
-         standards.cm standards.ov
+         autoconf.cv autoconf.cn standards.aux standards.cp \
+         standards.cps standards.dvi standards.fn standards.fns \
+         standards.ky standards.kys standards.ps standards.log \
+         standards.pg standards.toc standards.tp standards.tps \
+         standards.vr standards.vrs standards.op standards.tr \
+         standards.cv standards.cn
 
 clean-aminfo:
 
@@ -346,18 +323,19 @@ install-pkgdataDATA: $(pkgdata_DATA)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
        @list='$(pkgdata_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
-         echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
-         $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
+         if test -f $(srcdir)/$$p; then \
+           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p"; \
+           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/$$p; \
+         else if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p"; \
+           $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
+         fi; fi; \
        done
 
 uninstall-pkgdataDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(pkgdata_DATA)'; for p in $$list; do \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
-         echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
-         rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
+       list='$(pkgdata_DATA)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(pkgdatadir)/$$p; \
        done
 
 # This directory's subdirectories are mostly independent; you can cd
@@ -367,6 +345,8 @@ uninstall-pkgdataDATA:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 
+@SET_MAKE@
+
 all-recursive install-data-recursive install-exec-recursive \
 installdirs-recursive install-recursive uninstall-recursive  \
 check-recursive installcheck-recursive info-recursive dvi-recursive:
@@ -394,7 +374,7 @@ maintainer-clean-recursive:
        dot_seen=no; \
        rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
          rev="$$subdir $$rev"; \
-         if test "$$subdir" = "."; then dot_seen=yes; else :; fi; \
+         test "$$subdir" = "." && dot_seen=yes; \
        done; \
        test "$$dot_seen" = "no" && rev=". $$rev"; \
        target=`echo $@ | sed s/-recursive//`; \
@@ -415,17 +395,15 @@ tags-recursive:
 
 tags: TAGS
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(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; } \
+ID: $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
-       mkid -f$$here/ID $$unique $(LISP)
+       here=`pwd` && cd $(srcdir) \
+         && mkid -f$$here/ID $$unique $(LISP)
 
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
        tags=; \
        here=`pwd`; \
        list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -433,14 +411,12 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
            test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
    fi; \
        done; \
-       list='$(SOURCES) $(HEADERS) $(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; } \
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
-         || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
 
 mostlyclean-tags:
 
@@ -454,64 +430,54 @@ maintainer-clean-tags:
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(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
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
-       GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       -rm -rf $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
        mkdir $(distdir)/=build
        mkdir $(distdir)/=inst
-       chmod a-w $(distdir)
-       dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
-         && cd $(distdir)/=build \
+       dc_install_base=`cd $(distdir)/=inst && pwd`; \
+       cd $(distdir)/=build \
          && ../configure --srcdir=.. --prefix=$$dc_install_base \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
          && $(MAKE) $(AM_MAKEFLAGS) install \
          && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-         && test `find $$dc_install_base -type f -print | wc -l` -le 1 \
-         && $(MAKE) $(AM_MAKEFLAGS) dist \
-         && $(MAKE) $(AM_MAKEFLAGS) distclean \
-         && rm -f $(distdir).tar.gz \
-         && test `find . -type f -print | wc -l` -eq 0
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+         && $(MAKE) $(AM_MAKEFLAGS) dist
+       -rm -rf $(distdir)
        @banner="$(distdir).tar.gz is ready for distribution"; \
        dashes=`echo "$$banner" | sed s/./=/g`; \
        echo "$$dashes"; \
        echo "$$banner"; \
        echo "$$dashes"
 dist: distdir
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
-       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+       -chmod -R a+r $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+       -rm -rf $(distdir)
 dist-all: distdir
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
-       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+       -chmod -R a+r $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+       -rm -rf $(distdir)
 distdir: $(DISTFILES)
        @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \
          echo "NEWS not updated; not releasing" 1>&2; \
          exit 1; \
        fi
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+       -rm -rf $(distdir)
        mkdir $(distdir)
+       -chmod 777 $(distdir)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pR $$d/$$file $(distdir); \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@@ -523,6 +489,7 @@ distdir: $(DISTFILES)
            test -d $(distdir)/$$subdir \
            || mkdir $(distdir)/$$subdir \
            || exit 1; \
+           chmod 777 $(distdir)/$$subdir; \
            (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
              || exit 1; \
          fi; \
@@ -552,7 +519,7 @@ uninstall: uninstall-recursive
 all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA)
 all-redirect: all-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
 installdirs: installdirs-recursive
 installdirs-am:
        $(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) \
@@ -569,7 +536,6 @@ distclean-generic:
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
-       -rm -f Makefile.in
 mostlyclean-am:  mostlyclean-vti mostlyclean-aminfo mostlyclean-tags \
                mostlyclean-generic
 
@@ -599,8 +565,7 @@ maintainer-clean: maintainer-clean-recursive
 distclean-vti clean-vti maintainer-clean-vti install-info-am \
 uninstall-info mostlyclean-aminfo distclean-aminfo clean-aminfo \
 maintainer-clean-aminfo uninstall-pkgdataDATA install-pkgdataDATA \
-install-recursive uninstall-recursive install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
+install-data-recursive uninstall-data-recursive install-exec-recursive \
 uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
 all-recursive check-recursive installcheck-recursive info-recursive \
 dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
@@ -608,10 +573,9 @@ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
 distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
 dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
 install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all install-strip \
-installdirs-am installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
+uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
 
 # INSTALL is a special case.  Automake seems to have a single name space
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
new file mode 100644 (file)
index 0000000..2b58011
--- /dev/null
@@ -0,0 +1,279 @@
+divert(-1)                                             -*- shell-script -*-
+# `m4' macros used in building test suites.
+# Copyright (C) 2000 Free Software Foundation, Inc.
+
+changequote([, ])
+
+define(AT_DEFINE, defn([define]))
+define(AT_EVAL, defn([eval]))
+define(AT_FORMAT, defn([format]))
+define(AT_INCLUDE, defn([include]))
+define(AT_SHIFT, defn([shift]))
+define(AT_UNDEFINE, defn([undefine]))
+
+undefine([define])
+undefine([eval])
+undefine([format])
+undefine([include])
+undefine([shift])
+undefine([undefine])
+
+# AT_LINE
+
+# Return the current file sans directory, a colon, and the current line.
+
+AT_DEFINE(AT_LINE,
+[patsubst(__file__, ^.*/\(.*\), \1):__line__])
+
+# AT_INIT(PROGRAM, RELPATH)
+
+# Begin testing suite, using PROGRAM to check version, and RELPATH as a
+# relative path (usually `../src') to find executable binaries to test.
+# RELPATH may be omitted; `.' is always added in front of the search path.
+
+AT_DEFINE(AT_INIT,
+[AT_DEFINE(AT_ordinal, 0)
+. ./atconfig
+# Snippet (3
+
+at_usage="Usage: [$]0 [OPTION]...
+
+  -e  Stop and inhibit normal clean up if a test of the full test suite fails
+  -n  Do not redirect stdout and stderr and do not test their contents
+  -s  Inhibit verbosity in debugging scripts, at generation or at execution
+  -v  Force more detailed output, default for debugging scripts unless -s
+  -x  Have the shell to trace command execution; implies options -n"
+
+while test [$][#] -gt 0; do
+  case "[$]1" in
+    -e) at_stop_on_error=1; shift ;;
+    -n) at_no_redirs=1; shift ;;
+    -s) at_verbose=; at_silent=1; shift ;;
+    -v) at_verbose=1; at_silent=; shift ;;
+    -x) at_tracex=1; at_no_redirs=1; shift ;;
+    *) echo 1>&2 "$at_usage"; exit 1 ;;
+  esac
+done
+
+# In the testing suite, we only want to know if the test succeeded or failed.
+# But in debugging scripts, we want more information, so we prefer `diff -u'
+# to silent `cmp', even if it may happen that we compare binary files.
+# Option `-u' might be less portable, so either change it or use GNU `diff'.
+
+if test -n "$at_verbose"; then
+  at_diff='diff -u'
+else
+  at_diff='cmp -s'
+fi
+
+# Each generated debugging script, containing a single test group, cleans
+# up files at the beginning only, not at the end.  This is so we can repeat
+# the script many times and browse left over files.  To cope with such left
+# over files, the full test suite cleans up both before and after test groups.
+# Snippet )3
+
+if test -n "`$1 --version | sed -n s/$at_package.*$at_version/OK/p`"; then
+  at_banner="Testing suite for $at_package, version $at_version"
+  at_dashes=`echo $at_banner | sed s/./=/g`
+  echo "$at_dashes"
+  echo "$at_banner"
+  echo "$at_dashes"
+else
+  echo '======================================================='
+  echo 'ERROR: Not using the proper version, no tests performed'
+  echo '======================================================='
+  exit 1
+fi
+
+# Remove any debugging script resulting from a previous run.
+rm -f debug-*.sh
+
+at_failed_list=
+at_ignore_count=0
+divert(2)[]dnl
+
+# Wrap up the testing suite with summary statistics.
+
+rm -f at-check-line
+at_fail_count=0
+if test -z "$at_failed_list"; then
+  if test "$at_ignore_count" = 0; then
+    at_banner="All $at_test_count tests were successful"
+  else
+    at_banner="All $at_test_count tests were successful ($at_ignore_count ignored)"
+  fi
+else
+  echo
+  echo $at_n "Writing \`debug-NN.sh' scripts, NN =$at_c"
+  for at_group in $at_failed_list; do
+    echo $at_n " $at_group$at_c"
+    ( echo '#!/bin/sh'
+      sed -n "/^[#] Snippet (1/,/^[#] Snippet )1/p" atconfig
+      test -z "$at_silent" && echo 'at_verbose=1'
+      sed -n "/^[#] Snippet (2/,/^[#] Snippet )2/p" atconfig
+      sed -n "/^[#] Snippet (3/,/^[#] Snippet )3/p" [$]0
+      sed -n "/^[#] Snippet (c$at_group(/,/^[#] Snippet )c$at_group)/p" [$]0
+      echo 'test -n "$at_verbose" \
+        && echo "[$]0:1: =================================================="'
+      sed -n "/^[#] Snippet (s$at_group(/,/^[#] Snippet )s$at_group)/p" [$]0
+      echo 'exit 0'
+    ) | grep -v '^[#] Snippet' > debug-$at_group.sh
+    chmod +x debug-$at_group.sh
+    at_fail_count=`expr $at_fail_count + 1`
+  done
+  echo ', done'
+  if test -n "$at_stop_on_error"; then
+    at_banner="ERROR: One of the tests failed, inhibiting subsequent tests"
+  else
+    at_banner="ERROR: Suite unsuccessful, $at_fail_count of $at_test_count tests failed"
+  fi
+fi
+at_dashes=`echo $at_banner | sed s/./=/g`
+echo
+echo "$at_dashes"
+echo "$at_banner"
+echo "$at_dashes"
+
+if test -n "$at_failed_list"; then
+  if test -z "$at_silent"; then
+    echo
+    echo "Now, failed tests will be executed again, with more details..."
+    echo
+    for at_group in $at_failed_list; do
+      ./debug-$at_group.sh
+    done
+  fi
+  exit 1
+fi
+
+exit 0
+divert[]dnl
+])
+
+# 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(AT_SETUP,
+[AT_DEFINE([AT_ordinal], AT_EVAL(AT_ordinal + 1))
+pushdef([AT_group_description], [$1])
+pushdef([AT_data_files], )
+pushdef([AT_data_expout], )
+pushdef([AT_data_experr], )
+if test -z "$at_stop_on_error" || test -z "$at_failed_list"; then
+divert(1)[]dnl
+  echo AT_LINE > at-check-line
+  if test -n "$at_verbose"; then
+    echo 'testing AT_group_description'
+    echo $at_n "     $at_c"
+  fi
+  echo $at_n "substr(AT_ordinal. $srcdir/AT_LINE                            , 0, 30)[]$at_c"
+  (
+[#] Snippet (s[]AT_ordinal[](
+
+[#] The test group starts at `AT_LINE'.  An error occurred while
+[#] testing AT_group_description.
+])
+
+
+# AT_CLEANUP(FILES)
+
+# Complete a group of related tests, recursively remove those FILES
+# created within the test.  There is no need to list stdout, stderr,
+# nor files created with AT_DATA.
+
+AT_DEFINE(AT_CLEANUP,
+[[#] Snippet )s[]AT_ordinal[])
+  )
+  case [$]? in
+    0) echo ok
+       ;;
+    77) echo "ignored near \``cat at-check-line`'"
+        at_ignore_count=`expr $at_ignore_count + 1`
+       ;;
+    *) echo "FAILED near \``cat at-check-line`'"
+       at_failed_list="$at_failed_list AT_ordinal"
+       ;;
+  esac
+  at_test_count=AT_ordinal
+  if test -z "$at_stop_on_error" || test -z "$at_failed_list"; then
+divert(0)[]dnl
+[#] Snippet (c[]AT_ordinal[](
+
+rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr
+[#] Snippet )c[]AT_ordinal[])
+undivert(1)[]dnl
+    rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr
+  fi
+fi
+popdef([AT_data_experr])
+popdef([AT_data_expout])
+popdef([AT_data_files])
+popdef([AT_group_description])])
+
+
+# AT_DATA(FILE, CONTENTS)
+
+# Initialize an input data FILE with given CONTENTS, which should end with
+# an end of line.
+
+AT_DEFINE(AT_DATA,
+[AT_DEFINE([AT_data_files], AT_data_files[ ]$1)
+cat > $1 <<'EOF'
+$2[]EOF
+])
+
+
+# AT_CHECK(COMMANDS, [STATUS], STDOUT, STDERR)
+
+# Execute a test by performing given shell COMMANDS.  These commands
+# should normally exit with STATUS, while producing expected STDOUT and
+# STDERR contents.  The special word `expout' for STDOUT means that file
+# `expout' contents has been set to the expected stdout.  The special word
+# `experr' for STDERR means that file `experr' contents has been set to
+# the expected stderr.
+# STATUS is not checked if it is empty.
+# STDOUT and STDERR can be the special value `ignore', in which case
+# their content is not checked.
+
+AT_DEFINE(AT_CHECK,
+[test -n "$at_verbose" \
+  && echo $srcdir'/AT_LINE: Testing AT_group_description'
+echo AT_LINE > at-check-line
+test -z "$at_no_redirs" && exec 5>&1 6>&2 1>stdout 2>stderr
+test -n "$at_tracex" && set -x
+$1
+ifelse([$2], , , [if test $? != $2; then
+  # Maybe there was an important message to read before it died.
+  test -n "$at_verbose" && cat stderr >&6
+  exit 1
+fi
+])dnl
+test -n "$at_tracex" && set +x
+if test -z "$at_no_redirs"; then
+  exec 1>&5 2>&6
+  ifelse([$3], ignore, [test -n "$at_verbose" && cat stdout;:
+],
+         [$3], expout, [AT_DEFINE([AT_data_expout], [ expout])dnl
+$at_diff expout stdout || exit 1
+],
+         [$3], , [$at_diff /dev/null stdout || exit 1
+],
+         [changequote({{, }})dnl
+echo $at_n "patsubst({{$3}}, \([\"`$]\), \\\1)$at_c" | $at_diff - stdout || exit 1
+changequote([, ])])dnl
+  ifelse([$4], ignore, [test -n "$at_verbose" && cat stderr;:
+],
+         [$4], experr, [AT_DEFINE([AT_data_experr], [ experr])dnl
+$at_diff experr stderr || exit 1
+],
+         [$4], , [$at_diff /dev/null stderr || exit 1
+],
+         [changequote({{, }})dnl
+echo $at_n "patsubst({{$4}}, \([\"`$]\), \\\1)$at_c" | $at_diff - stderr || exit 1
+changequote([, ])])dnl
+fi
+])
+
+divert[]dnl
index df7feabd6f5027f89c8a2d0adcf43a992d241500..bce3a93404a61f7ce92b5c149076173feb45cac4 100644 (file)
@@ -1,6 +1,3 @@
 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
 
-EXTRA_DIST =
-init.m4 \
-missing.m4 \
-sanity.m4
+EXTRA_DIST = init.m4 missing.m4 sanity.m4 atconfig.m4
index 7e789c448cc99ae2c4b29429dc39b253aa568e21..6f1d1215965b355ebce86a434f5a4d84810da7fd 100644 (file)
@@ -60,20 +60,19 @@ POST_UNINSTALL = :
 AWK = @AWK@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
-MAKEINFO = @MAKEINFO@
-PACKAGE = @PACKAGE@
 PERL = @PERL@
 PERLSCRIPTS = @PERLSCRIPTS@
-VERSION = @VERSION@
 standards_texi = @standards_texi@
 
-EXTRA_DIST = README Makefile.am.in atconfig.m4 init.m4 missing.m4 sanity.m4
-
+EXTRA_DIST = init.m4 missing.m4 sanity.m4 atconfig.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES = 
-DIST_COMMON =  README Makefile.am Makefile.in
+DIST_COMMON =  Makefile.am Makefile.in
 
 
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
 TAR = tar
@@ -172,17 +171,6 @@ distclean-generic clean-generic maintainer-clean-generic clean \
 mostlyclean distclean maintainer-clean
 
 
-Makefile.am: Makefile.am.in
-       rm -f $@ $@t
-       sed -n '1,/^##m4-files-begin/p' $< > $@t
-       ( (echo EXTRA_DIST = README Makefile.am.in | tr '\012' @); \
-         (echo *.m4|tr ' ' @) ) \
-         |sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
-         >> $@t
-       sed -n '/^##m4-files-end/,$$p' $< >> $@t
-       chmod a-w $@t
-       mv $@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:
diff --git a/m4/atconfig.m4 b/m4/atconfig.m4
new file mode 100644 (file)
index 0000000..dbd7397
--- /dev/null
@@ -0,0 +1,42 @@
+## ----------------------##
+## Prepare for testing.  ##
+## ----------------------##
+
+# Single argument says where are built sources to test, relative to the
+# built test directory.  Maybe omitted if the same (flat distribution).
+
+AC_DEFUN(AT_CONFIG,
+[AT_TESTPATH=ifelse($1, , ., $1)
+AC_SUBST(AT_TESTPATH)
+fp_PROG_ECHO
+])
+
+## ----------------------------------------- ##
+## Find how to suppress newlines with echo.  ##
+## ----------------------------------------- ##
+
+# Once this macro is called, you may output with no echo in a Makefile or
+# script using:  echo @ECHO_N@ "STRING_TO_OUTPUT@ECHO_C@".
+
+AC_DEFUN(fp_PROG_ECHO,
+[AC_CACHE_CHECK(how to suppress newlines using echo, fp_cv_prog_echo_nonl,
+[if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    fp_cv_prog_echo_nonl=no
+  else
+    fp_cv_prog_echo_nonl=option
+  fi
+else
+  fp_cv_prog_echo_nonl=escape
+fi
+])
+test $fp_cv_prog_echo_nonl = no \
+  && echo 2>&1 "WARNING: \`echo' not powerful enough for \`make check'"
+case $fp_cv_prog_echo_nonl in
+  no) ECHO_N= ECHO_C= ;;
+  option) ECHO_N=-n ECHO_C= ;;
+  escape) ECHO_N= ECHO_C='\c' ;;
+esac
+AC_SUBST(ECHO_N)dnl
+AC_SUBST(ECHO_C)dnl
+])
index 4f10196807080779af5980e01b2fe87b0ec32f0a..f15168deb0f95301c40014f6f8cf1af503c0422c 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
 
 # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -10,6 +10,7 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -45,10 +46,9 @@ AUTOMAKE = @AUTOMAKE@
 AUTOHEADER = @AUTOHEADER@
 
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_FLAG =
 transform = @program_transform_name@
 
 NORMAL_INSTALL = :
@@ -57,8 +57,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-
-@SET_MAKE@
 AWK = @AWK@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
@@ -66,27 +64,18 @@ PERL = @PERL@
 PERLSCRIPTS = @PERLSCRIPTS@
 standards_texi = @standards_texi@
 
-
-man_MANS = autoconf.1 autoreconf.1 autoheader.1 autoupdate.1 ifnames.1 \
-autoscan.1
+man_MANS = autoconf.1 autoreconf.1 autoheader.1 autoupdate.1 ifnames.1 autoscan.1
 
 
-man_aux = autoconf.x autoreconf.x autoheader.x autoupdate.x ifnames.x \
-autoscan.x
+man_aux = autoconf.x autoreconf.x autoheader.x autoupdate.x ifnames.x autoscan.x
 
 
 EXTRA_DIST = $(man_MANS) $(man_aux) common.x
 MAINTAINERCLEANFILES = $(man_MANS)
 
 SUFFIXES = .x .1
-subdir = man
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES = 
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = 
 man1dir = $(mandir)/man1
 MANS = $(man_MANS)
 
@@ -97,8 +86,9 @@ DIST_COMMON =  Makefile.am Makefile.in
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
 
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
+TAR = tar
 GZIP_ENV = --best
 all: all-redirect
 .SUFFIXES:
@@ -124,7 +114,6 @@ install-man1:
          else file=$$i; fi; \
          ext=`echo $$i | sed -e 's/^.*\\.//'`; \
          inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
          inst=`echo $$inst | sed '$(transform)'`.$$ext; \
          echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
          $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
@@ -140,7 +129,6 @@ uninstall-man1:
        for i in $$list; do \
          ext=`echo $$i | sed -e 's/^.*\\.//'`; \
          inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
          inst=`echo $$inst | sed '$(transform)'`.$$ext; \
          echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
          rm -f $(DESTDIR)$(man1dir)/$$inst; \
@@ -157,11 +145,18 @@ TAGS:
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 
+subdir = man
+
 distdir: $(DISTFILES)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(top_distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu man/Makefile
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pR $$d/$$file $(distdir); \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@@ -190,7 +185,7 @@ uninstall: uninstall-am
 all-am: Makefile $(MANS)
 all-redirect: all-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
 installdirs:
        $(mkinstalldirs)  $(DESTDIR)$(mandir)/man1
 
@@ -204,7 +199,6 @@ distclean-generic:
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
-       -rm -f Makefile.in
        -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 mostlyclean-am:  mostlyclean-generic
 
@@ -228,9 +222,8 @@ maintainer-clean: maintainer-clean-am
 distdir info-am info dvi-am dvi check check-am installcheck-am \
 installcheck install-exec-am install-exec install-data-am install-data \
 install-am install uninstall-am uninstall all-redirect all-am all \
-install-strip installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
 
 # Depend on configure.in to get version number changes.
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644 (file)
index 0000000..3b27fb4
--- /dev/null
@@ -0,0 +1,52 @@
+## Process this file with automake to create Makefile.in.
+
+## Makefile for Autoconf testsuite.
+## Copyright (C) 2000 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+
+AUTOMAKE_OPTIONS = gnits
+
+SUITE = syntax.m4
+
+# We don't actually distribute the testsuite, since one only
+# needs m4 to build it, m4 being required anyway to install Autoconf.
+EXTRA_DIST = atgeneral.m4 suite.m4 macros.m4 $(SUITE)
+
+PERL = perl
+
+all-local: atconfig testsuite macros.m4
+
+check-local: atconfig testsuite macros.m4
+       $(SHELL) testsuite
+
+testsuite: atgeneral.m4 suite.m4 macros.m4 $(SUITE)
+       m4 -I $(srcdir) atgeneral.m4 suite.m4 | cat -s > $@-tmp
+       chmod +x $@-tmp
+       mv $@-tmp $@
+
+macros.m4: $(top_srcdir)/acspecific.m4 $(srcdir)/Makefile.am
+       cat $(top_srcdir)/acspecific.m4 | \
+         sed -ne 's/^AC_DEFUN(\([^,]*\).*/\1/p' | \
+         sort >macros
+       echo >$@
+       for macro in `cat macros`; do \
+         echo "TEST_MACRO([$$macro])" >>$@; \
+       done
+       rm macros
+
+clean-local:
+       rm -f debug-*.sh
diff --git a/tests/atconfig.in b/tests/atconfig.in
new file mode 100644 (file)
index 0000000..5cab3d8
--- /dev/null
@@ -0,0 +1,31 @@
+# @configure_input@                                    -*- shell-script -*-
+# Configurable variable values for building test suites.
+# Copyright (C) 2000 Free Software Foundation, Inc.
+
+# Snippet (1
+# This debugging script has been automatically generated from `make check'.
+
+at_package=@PACKAGE@
+at_version=@VERSION@
+# Snippet )1
+# Snippet (2
+at_n=@ECHO_N@
+at_c='@ECHO_C@'
+test -f atlocal && . ./atlocal
+
+# LC_MESSAGES is always shadowed by LC_ALL.  Here are the only cases:
+# - GNU:       LANGUAGE -> LC_ALL -> LC_MESSAGES -> LANG
+# - POSIX:     LC_ALL -> LC_MESSAGES -> LANG
+# - XPG4:      LC_ALL -> LANG
+# - SysV/XPG2: LANG
+export LANGUAGE; LANGUAGE=C
+export LANG; LANG=C
+export LC_ALL; LC_ALL=C
+
+srcdir=@srcdir@
+top_srcdir=@top_srcdir@
+# Use absolute file notations, as the test might change directories.
+at_srcdir=`cd @srcdir@ && pwd`
+at_top_srcdir=`cd @top_srcdir@ && pwd`
+export PATH; PATH=`pwd`:`cd @AT_TESTPATH@ && pwd`:$PATH
+# Snippet )2
diff --git a/tests/atgeneral.m4 b/tests/atgeneral.m4
new file mode 100644 (file)
index 0000000..2b58011
--- /dev/null
@@ -0,0 +1,279 @@
+divert(-1)                                             -*- shell-script -*-
+# `m4' macros used in building test suites.
+# Copyright (C) 2000 Free Software Foundation, Inc.
+
+changequote([, ])
+
+define(AT_DEFINE, defn([define]))
+define(AT_EVAL, defn([eval]))
+define(AT_FORMAT, defn([format]))
+define(AT_INCLUDE, defn([include]))
+define(AT_SHIFT, defn([shift]))
+define(AT_UNDEFINE, defn([undefine]))
+
+undefine([define])
+undefine([eval])
+undefine([format])
+undefine([include])
+undefine([shift])
+undefine([undefine])
+
+# AT_LINE
+
+# Return the current file sans directory, a colon, and the current line.
+
+AT_DEFINE(AT_LINE,
+[patsubst(__file__, ^.*/\(.*\), \1):__line__])
+
+# AT_INIT(PROGRAM, RELPATH)
+
+# Begin testing suite, using PROGRAM to check version, and RELPATH as a
+# relative path (usually `../src') to find executable binaries to test.
+# RELPATH may be omitted; `.' is always added in front of the search path.
+
+AT_DEFINE(AT_INIT,
+[AT_DEFINE(AT_ordinal, 0)
+. ./atconfig
+# Snippet (3
+
+at_usage="Usage: [$]0 [OPTION]...
+
+  -e  Stop and inhibit normal clean up if a test of the full test suite fails
+  -n  Do not redirect stdout and stderr and do not test their contents
+  -s  Inhibit verbosity in debugging scripts, at generation or at execution
+  -v  Force more detailed output, default for debugging scripts unless -s
+  -x  Have the shell to trace command execution; implies options -n"
+
+while test [$][#] -gt 0; do
+  case "[$]1" in
+    -e) at_stop_on_error=1; shift ;;
+    -n) at_no_redirs=1; shift ;;
+    -s) at_verbose=; at_silent=1; shift ;;
+    -v) at_verbose=1; at_silent=; shift ;;
+    -x) at_tracex=1; at_no_redirs=1; shift ;;
+    *) echo 1>&2 "$at_usage"; exit 1 ;;
+  esac
+done
+
+# In the testing suite, we only want to know if the test succeeded or failed.
+# But in debugging scripts, we want more information, so we prefer `diff -u'
+# to silent `cmp', even if it may happen that we compare binary files.
+# Option `-u' might be less portable, so either change it or use GNU `diff'.
+
+if test -n "$at_verbose"; then
+  at_diff='diff -u'
+else
+  at_diff='cmp -s'
+fi
+
+# Each generated debugging script, containing a single test group, cleans
+# up files at the beginning only, not at the end.  This is so we can repeat
+# the script many times and browse left over files.  To cope with such left
+# over files, the full test suite cleans up both before and after test groups.
+# Snippet )3
+
+if test -n "`$1 --version | sed -n s/$at_package.*$at_version/OK/p`"; then
+  at_banner="Testing suite for $at_package, version $at_version"
+  at_dashes=`echo $at_banner | sed s/./=/g`
+  echo "$at_dashes"
+  echo "$at_banner"
+  echo "$at_dashes"
+else
+  echo '======================================================='
+  echo 'ERROR: Not using the proper version, no tests performed'
+  echo '======================================================='
+  exit 1
+fi
+
+# Remove any debugging script resulting from a previous run.
+rm -f debug-*.sh
+
+at_failed_list=
+at_ignore_count=0
+divert(2)[]dnl
+
+# Wrap up the testing suite with summary statistics.
+
+rm -f at-check-line
+at_fail_count=0
+if test -z "$at_failed_list"; then
+  if test "$at_ignore_count" = 0; then
+    at_banner="All $at_test_count tests were successful"
+  else
+    at_banner="All $at_test_count tests were successful ($at_ignore_count ignored)"
+  fi
+else
+  echo
+  echo $at_n "Writing \`debug-NN.sh' scripts, NN =$at_c"
+  for at_group in $at_failed_list; do
+    echo $at_n " $at_group$at_c"
+    ( echo '#!/bin/sh'
+      sed -n "/^[#] Snippet (1/,/^[#] Snippet )1/p" atconfig
+      test -z "$at_silent" && echo 'at_verbose=1'
+      sed -n "/^[#] Snippet (2/,/^[#] Snippet )2/p" atconfig
+      sed -n "/^[#] Snippet (3/,/^[#] Snippet )3/p" [$]0
+      sed -n "/^[#] Snippet (c$at_group(/,/^[#] Snippet )c$at_group)/p" [$]0
+      echo 'test -n "$at_verbose" \
+        && echo "[$]0:1: =================================================="'
+      sed -n "/^[#] Snippet (s$at_group(/,/^[#] Snippet )s$at_group)/p" [$]0
+      echo 'exit 0'
+    ) | grep -v '^[#] Snippet' > debug-$at_group.sh
+    chmod +x debug-$at_group.sh
+    at_fail_count=`expr $at_fail_count + 1`
+  done
+  echo ', done'
+  if test -n "$at_stop_on_error"; then
+    at_banner="ERROR: One of the tests failed, inhibiting subsequent tests"
+  else
+    at_banner="ERROR: Suite unsuccessful, $at_fail_count of $at_test_count tests failed"
+  fi
+fi
+at_dashes=`echo $at_banner | sed s/./=/g`
+echo
+echo "$at_dashes"
+echo "$at_banner"
+echo "$at_dashes"
+
+if test -n "$at_failed_list"; then
+  if test -z "$at_silent"; then
+    echo
+    echo "Now, failed tests will be executed again, with more details..."
+    echo
+    for at_group in $at_failed_list; do
+      ./debug-$at_group.sh
+    done
+  fi
+  exit 1
+fi
+
+exit 0
+divert[]dnl
+])
+
+# 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(AT_SETUP,
+[AT_DEFINE([AT_ordinal], AT_EVAL(AT_ordinal + 1))
+pushdef([AT_group_description], [$1])
+pushdef([AT_data_files], )
+pushdef([AT_data_expout], )
+pushdef([AT_data_experr], )
+if test -z "$at_stop_on_error" || test -z "$at_failed_list"; then
+divert(1)[]dnl
+  echo AT_LINE > at-check-line
+  if test -n "$at_verbose"; then
+    echo 'testing AT_group_description'
+    echo $at_n "     $at_c"
+  fi
+  echo $at_n "substr(AT_ordinal. $srcdir/AT_LINE                            , 0, 30)[]$at_c"
+  (
+[#] Snippet (s[]AT_ordinal[](
+
+[#] The test group starts at `AT_LINE'.  An error occurred while
+[#] testing AT_group_description.
+])
+
+
+# AT_CLEANUP(FILES)
+
+# Complete a group of related tests, recursively remove those FILES
+# created within the test.  There is no need to list stdout, stderr,
+# nor files created with AT_DATA.
+
+AT_DEFINE(AT_CLEANUP,
+[[#] Snippet )s[]AT_ordinal[])
+  )
+  case [$]? in
+    0) echo ok
+       ;;
+    77) echo "ignored near \``cat at-check-line`'"
+        at_ignore_count=`expr $at_ignore_count + 1`
+       ;;
+    *) echo "FAILED near \``cat at-check-line`'"
+       at_failed_list="$at_failed_list AT_ordinal"
+       ;;
+  esac
+  at_test_count=AT_ordinal
+  if test -z "$at_stop_on_error" || test -z "$at_failed_list"; then
+divert(0)[]dnl
+[#] Snippet (c[]AT_ordinal[](
+
+rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr
+[#] Snippet )c[]AT_ordinal[])
+undivert(1)[]dnl
+    rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr
+  fi
+fi
+popdef([AT_data_experr])
+popdef([AT_data_expout])
+popdef([AT_data_files])
+popdef([AT_group_description])])
+
+
+# AT_DATA(FILE, CONTENTS)
+
+# Initialize an input data FILE with given CONTENTS, which should end with
+# an end of line.
+
+AT_DEFINE(AT_DATA,
+[AT_DEFINE([AT_data_files], AT_data_files[ ]$1)
+cat > $1 <<'EOF'
+$2[]EOF
+])
+
+
+# AT_CHECK(COMMANDS, [STATUS], STDOUT, STDERR)
+
+# Execute a test by performing given shell COMMANDS.  These commands
+# should normally exit with STATUS, while producing expected STDOUT and
+# STDERR contents.  The special word `expout' for STDOUT means that file
+# `expout' contents has been set to the expected stdout.  The special word
+# `experr' for STDERR means that file `experr' contents has been set to
+# the expected stderr.
+# STATUS is not checked if it is empty.
+# STDOUT and STDERR can be the special value `ignore', in which case
+# their content is not checked.
+
+AT_DEFINE(AT_CHECK,
+[test -n "$at_verbose" \
+  && echo $srcdir'/AT_LINE: Testing AT_group_description'
+echo AT_LINE > at-check-line
+test -z "$at_no_redirs" && exec 5>&1 6>&2 1>stdout 2>stderr
+test -n "$at_tracex" && set -x
+$1
+ifelse([$2], , , [if test $? != $2; then
+  # Maybe there was an important message to read before it died.
+  test -n "$at_verbose" && cat stderr >&6
+  exit 1
+fi
+])dnl
+test -n "$at_tracex" && set +x
+if test -z "$at_no_redirs"; then
+  exec 1>&5 2>&6
+  ifelse([$3], ignore, [test -n "$at_verbose" && cat stdout;:
+],
+         [$3], expout, [AT_DEFINE([AT_data_expout], [ expout])dnl
+$at_diff expout stdout || exit 1
+],
+         [$3], , [$at_diff /dev/null stdout || exit 1
+],
+         [changequote({{, }})dnl
+echo $at_n "patsubst({{$3}}, \([\"`$]\), \\\1)$at_c" | $at_diff - stdout || exit 1
+changequote([, ])])dnl
+  ifelse([$4], ignore, [test -n "$at_verbose" && cat stderr;:
+],
+         [$4], experr, [AT_DEFINE([AT_data_experr], [ experr])dnl
+$at_diff experr stderr || exit 1
+],
+         [$4], , [$at_diff /dev/null stderr || exit 1
+],
+         [changequote({{, }})dnl
+echo $at_n "patsubst({{$4}}, \([\"`$]\), \\\1)$at_c" | $at_diff - stderr || exit 1
+changequote([, ])])dnl
+fi
+])
+
+divert[]dnl
diff --git a/tests/suite.m4 b/tests/suite.m4
new file mode 100644 (file)
index 0000000..5af99e5
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Validation suite for Autoconf
+# Copyright (C) 2000 Free Software Foundation, Inc.
+
+# Still many parts of `autoconf' are not exercised by the test suite.  A few
+# FIXME's, below, are used to list tests that we would need.  Do you feel
+# like contributing new tests?  If you do, you may tell your intent to
+# `autoconf@gnu.org', so no two people work at the same thing.
+
+AT_INIT(autoconf)
+
+AT_INCLUDE(syntax.m4)
diff --git a/tests/syntax.m4 b/tests/syntax.m4
new file mode 100644 (file)
index 0000000..8c8e4bd
--- /dev/null
@@ -0,0 +1,30 @@
+#                                                      -*- autoconf -*-
+
+dnl AT_AUTOCONF_TEST(NAME-OF-THE-MACRO)
+dnl -----------------------------------
+dnl Create a minimalist configure.in running the macro named
+dnl NAME-OF-THE-MACRO, check that autoconf runs on that script,
+dnl and that the shell runs correctly the configure.
+AT_DEFINE(TEST_MACRO,
+[AT_SETUP($1)
+
+# An extremely simple configure.in
+AT_DATA(configure.in,
+[AC_INIT
+$1
+AC_OUTPUT
+])
+
+# FIXME: Here we just don't consider the stderr from Autoconf.
+# Maybe some day we could be more precise and filter out warnings.
+# The problem is that currently some warnings are spread on several
+# lines, so grepping -v warning is not enough.
+AT_CHECK([../autoconf -m ..], 0,, ignore)
+AT_CHECK([./configure], 0, ignore, ignore)
+AT_CLEANUP(configure config.status config.log config.cache)])
+
+echo
+echo 'Syntax of specific macros.'
+echo
+
+AT_INCLUDE(macros.m4)
index 8ef6abd7a08758e511c03340f26404cb4687977f..d4f54fbe7c755650c0014abbee454cff4f3604c9 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
 
 # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -10,6 +10,7 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -44,10 +45,9 @@ AUTOMAKE = @AUTOMAKE@
 AUTOHEADER = @AUTOHEADER@
 
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_FLAG =
 transform = @program_transform_name@
 
 NORMAL_INSTALL = :
@@ -56,8 +56,6 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-
-@SET_MAKE@
 AWK = @AWK@
 HELP2MAN = @HELP2MAN@
 M4 = @M4@
@@ -65,7 +63,6 @@ PERL = @PERL@
 PERLSCRIPTS = @PERLSCRIPTS@
 standards_texi = @standards_texi@
 
-
 AUTOMAKE_OPTIONS = dejagnu
 
 GENERIC_TESTS = autoconf.g/sizeof.exp autoconf.g/init.exp
@@ -77,18 +74,17 @@ AUTOCONFFLAGS = -m $(top_builddir)
 AUTOCONF = $(top_builddir)/autoconf
 
 RUNTESTFLAGS = AUTOCONF="$(AUTOCONF)" AUTOCONFFLAGS="$(AUTOCONFFLAGS)"
-subdir = testsuite
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES = 
-DIST_SOURCES = 
 DIST_COMMON =  Makefile.am Makefile.in
 
 
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
 
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
+TAR = tar
 GZIP_ENV = --best
 EXPECT = expect
 RUNTEST = runtest
@@ -107,13 +103,20 @@ TAGS:
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 
+subdir = testsuite
+
 distdir: $(DISTFILES)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(top_distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu testsuite/Makefile
        $(mkinstalldirs) $(distdir)/autoconf.g $(distdir)/autoconf.s \
           $(distdir)/config $(distdir)/lib
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pR $$d/$$file $(distdir); \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@@ -126,7 +129,7 @@ DEJATOOL = $(PACKAGE)
 RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
 
 check-DEJAGNU: site.exp
-       srcdir=`CDPATH=: && cd $(srcdir) && pwd`; export srcdir; \
+       srcdir=`cd $(srcdir) && pwd`; export srcdir; \
        EXPECT=$(EXPECT); export EXPECT; \
        runtest=$(RUNTEST); \
        if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
@@ -169,7 +172,7 @@ uninstall: uninstall-am
 all-am: Makefile
 all-redirect: all-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
 installdirs:
 
 
@@ -182,7 +185,6 @@ distclean-generic:
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
-       -rm -f Makefile.in
 mostlyclean-am:  mostlyclean-generic
 
 mostlyclean: mostlyclean-am
@@ -204,7 +206,7 @@ maintainer-clean: maintainer-clean-am
 .PHONY: tags distdir check-DEJAGNU info-am info dvi-am dvi check \
 check-am installcheck-am installcheck install-exec-am install-exec \
 install-data-am install-data install-am install uninstall-am uninstall \
-all-redirect all-am all install-strip installdirs mostlyclean-generic \
+all-redirect all-am all installdirs mostlyclean-generic \
 distclean-generic clean-generic maintainer-clean-generic clean \
 mostlyclean distclean maintainer-clean