* missing: Updated.
authorTom Tromey <tromey@redhat.com>
Tue, 15 Jan 2002 23:54:14 +0000 (23:54 +0000)
committerTom Tromey <tromey@redhat.com>
Tue, 15 Jan 2002 23:54:14 +0000 (23:54 +0000)
* lib/missing: Match against `automake*' to pick up versioned
automake.
* m4/init.m4 (AM_INIT_AUTOMAKE): Use versioned automake name.
* m4/amversion.in (AM_AUTOMAKE_VERSION): Set am__version
variable.
* lib/am/Makefile.am (amdir): Use pkgvdatadir.
* lib/Makefile.am (dist_pkgvdata_DATA): Renamed to use
pkgvdatadir.
(scriptdir): Use pkgvdatadir.
(installcheck-local): Likewise.
* lib/Automake/Makefile.am (perllibdir): Use pkgvdatadir.
* automake.in (perllibdir): Added VERSION.
(libdir): Likewise.
* aclocal.in (parse_arguments): Search versioned directory.  Don't
push unversioned directory unless it exists.
(perllibdir): Added VERSION.
(default_acdir): New global.
* m4/Makefile.am (m4datadir): Added $(VERSION).
* Makefile.am (install-exec-hook): New target.
* configure.in (ACLOCAL): Search build directory.
(pkgvdatadir): New subst.

22 files changed:
ChangeLog
Makefile.am
Makefile.in
TODO
aclocal.in
aclocal.m4
automake.in
configure
configure.in
lib/Automake/Makefile.am
lib/Automake/Makefile.in
lib/Makefile.am
lib/Makefile.in
lib/am/Makefile.am
lib/am/Makefile.in
lib/missing
m4/Makefile.am
m4/Makefile.in
m4/amversion.in
m4/init.m4
missing
tests/Makefile.in

index e643ad4..defcdf6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2002-01-15  Tom Tromey  <tromey@redhat.com>
+
+       * missing: Updated.
+       * lib/missing: Match against `automake*' to pick up versioned
+       automake.
+       * m4/init.m4 (AM_INIT_AUTOMAKE): Use versioned automake name.
+       * m4/amversion.in (AM_AUTOMAKE_VERSION): Set am__version
+       variable.
+       * lib/am/Makefile.am (amdir): Use pkgvdatadir.
+       * lib/Makefile.am (dist_pkgvdata_DATA): Renamed to use
+       pkgvdatadir.
+       (scriptdir): Use pkgvdatadir.
+       (installcheck-local): Likewise.
+       * lib/Automake/Makefile.am (perllibdir): Use pkgvdatadir.
+       * automake.in (perllibdir): Added VERSION.
+       (libdir): Likewise.
+       * aclocal.in (parse_arguments): Search versioned directory.  Don't
+       push unversioned directory unless it exists.
+       (perllibdir): Added VERSION.
+       (default_acdir): New global.
+       * m4/Makefile.am (m4datadir): Added $(VERSION).
+       * Makefile.am (install-exec-hook): New target.
+       * configure.in (ACLOCAL): Search build directory.
+       (pkgvdatadir): New subst.
+
 2002-01-15  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * lib/config.sub, lib/config.guess: New versions from FSF.
index b4faf41..7bbd023 100644 (file)
@@ -36,6 +36,19 @@ TAGS_DEPENDENCIES = automake.texi
 
 EXTRA_DIST = ChangeLog.1996 ChangeLog.1998 ChangeLog.2000
 
+## Make versioned links.  We only run the transform on the root name;
+## then we make a versioned link with the transformed base name.  This
+## seemed like the most reasonable approach.
+install-exec-hook:
+       @$(POST_INSTALL)
+       @for p in $(bin_SCRIPTS); do \
+         f="`echo $$p|sed '$(transform)'`"; \
+         fv="$$f-$(VERSION)"; \
+         rm -f $(DESTDIR)$(bindir)/$$fv; \
+         echo " ln $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv"; \
+         ln $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv; \
+       done
+
 ################################################################
 ##
 ## Everything past here is useful to the maintainer, but probably not
index 5716751..c7baf24 100644 (file)
@@ -71,6 +71,7 @@ VERSION = @VERSION@
 am__include = @am__include@
 am__quote = @am__quote@
 install_sh = @install_sh@
+pkgvdatadir = @pkgvdatadir@
 
 SUBDIRS = . m4 lib tests
 
@@ -498,6 +499,8 @@ info-am: $(INFO_DEPS)
 install-data-am: install-info-am
 
 install-exec-am: install-binSCRIPTS
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
 
 install-info: install-info-recursive
 
@@ -560,6 +563,16 @@ uninstall-info: uninstall-info-recursive
        uninstall-recursive
 
 
+install-exec-hook:
+       @$(POST_INSTALL)
+       @for p in $(bin_SCRIPTS); do \
+         f="`echo $$p|sed '$(transform)'`"; \
+         fv="$$f-$(VERSION)"; \
+         rm -f $(DESTDIR)$(bindir)/$$fv; \
+         echo " ln $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv"; \
+         ln $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv; \
+       done
+
 ################################################################
 
 # Some simple checks, and then ordinary check.  These are only really
diff --git a/TODO b/TODO
index 0484832..d974073 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,7 @@
+we can't seem to AC_SUBST(pkgdatadir)
+the version from header-vars overrides
+why is that?
+
 check should depend on all
   from ben elliston
 
index ea53a09..941c141 100644 (file)
@@ -28,7 +28,7 @@ eval 'exec @PERL@ -S $0 ${1+"$@"}'
 BEGIN
 {
   my $prefix = "@prefix@";
-  my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@";
+  my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@-@VERSION@";
   unshift @INC, "$perllibdir";
 }
 
@@ -40,7 +40,9 @@ $VERSION = "@VERSION@";
 $PACKAGE = "@PACKAGE@";
 $prefix = "@prefix@";
 # Note that this isn't pkgdatadir, but a separate directory.
+# Note also that the versioned directory is handled later.
 $acdir = "@datadir@/aclocal";
+$default_acdir = $acdir;
 
 # Some globals.
 
@@ -210,8 +212,17 @@ sub parse_arguments
        exit 0;
     }
 
-    # Search our install directory last.
-    push (@dirlist, $acdir);
+    # Search the versioned directory near the end, and then the
+    # unversioned directory last.  Only do this if the user didn't
+    # override acdir.
+    push (@dirlist, "$acdir-$VERSION")
+       if $acdir eq $default_acdir;
+
+    # By default $(datadir)/aclocal doesn't exist.  We don't want to
+    # get an error in the case where we are searching the default
+    # directory and it hasn't been created.
+    push (@dirlist, $acdir)
+       unless $acdir eq $default_acdir && ! -d $acdir;
 
     return @dirlist;
 }
index a32dde0..925858b 100644 (file)
@@ -72,12 +72,12 @@ fi
 # 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])
-   AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])
  AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
+ AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
 
 _AM_IF_OPTION([no-define],,
 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
@@ -88,7 +88,7 @@ AC_REQUIRE([AM_SANITY_CHECK])dnl
 AC_REQUIRE([AC_ARG_PROGRAM])dnl
 AM_MISSING_PROG(ACLOCAL, aclocal)
 AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake)
+AM_MISSING_PROG(AUTOMAKE, "automake-${am__version}")
 AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
 AM_MISSING_PROG(AMTAR, tar)
@@ -130,7 +130,7 @@ AC_PROVIDE_IFELSE([AC_PROG_][CXX],
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[])
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__version="$1"])
 
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
index 5bef834..5f95f6e 100755 (executable)
@@ -32,7 +32,7 @@ package Language;
 BEGIN
 {
   my $prefix = "@prefix@";
-  my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@";
+  my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@-@VERSION@";
   unshift @INC, "$perllibdir";
 }
 
@@ -125,7 +125,7 @@ use Carp;
 my $VERSION = "@VERSION@";
 my $PACKAGE = "@PACKAGE@";
 my $prefix = "@prefix@";
-my $libdir = "@datadir@/@PACKAGE@";
+my $libdir = "@datadir@/@PACKAGE@-@VERSION@";
 
 # String constants.
 my $IGNORE_PATTERN = '^\s*##([^#\n].*)?\n';
@@ -7130,8 +7130,8 @@ sub read_main_am_file
     # Read user file, which might override some of our values.
     &read_am_file ($amfile);
 
-    # Ouput all the Automake variables.  If the user changed one, then
-    # it is now marked as owned by the user.
+    # Output all the Automake variables.  If the user changed one,
+    # then it is now marked as owned by the user.
     foreach my $var (uniq @var_list)
     {
        # Don't process user variables.
index eb469e1..ddc500f 100755 (executable)
--- a/configure
+++ b/configure
@@ -1160,7 +1160,7 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub"
 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
 
-
+am__version="1.5c"
 # 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:
@@ -1420,10 +1420,8 @@ echo "$as_me: error: source directory already configured; run \"make distclean\"
 fi
 
 # Define the identity of the package.
-
-   PACKAGE=automake
-
-   VERSION=1.5c
+ PACKAGE=automake
+ VERSION=1.5c
 
 
 cat >>confdefs.h <<_ACEOF
@@ -1443,7 +1441,7 @@ ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
 
 
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}"automake-${am__version}""}
 
 
 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
@@ -1462,9 +1460,13 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 # some platforms.
 
 
+# A versioned directory, defined here for convenience.
+pkgvdatadir="\${datadir}/automake-${VERSION}"
+
+
 # $AUTOMAKE and $ACLOCAL are always run after a `cd $top_srcdir',
 # hence `.' is really what we want for perllibdir and libdir.
-ACLOCAL="perllibdir=./lib `pwd`/aclocal --acdir=m4"
+ACLOCAL="perllibdir=./lib `pwd`/aclocal --acdir=m4 -I `pwd`/m4"
 AUTOMAKE="perllibdir=./lib `pwd`/automake --libdir=lib"
 
 # Extract the first word of "perl", so it can be a program name with args.
@@ -2153,6 +2155,7 @@ s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
 s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
 s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
 s,@DEPDIR@,$DEPDIR,;t t
+s,@pkgvdatadir@,$pkgvdatadir,;t t
 s,@PERL@,$PERL,;t t
 CEOF
 
index bde1395..045fbf8 100644 (file)
@@ -26,9 +26,13 @@ AC_CONFIG_AUX_DIR(lib)
 
 AM_INIT_AUTOMAKE([1.5 dist-bzip2])
 
+# A versioned directory, defined here for convenience.
+pkgvdatadir="\${datadir}/automake-${VERSION}"
+AC_SUBST(pkgvdatadir)
+
 # $AUTOMAKE and $ACLOCAL are always run after a `cd $top_srcdir',
 # hence `.' is really what we want for perllibdir and libdir.
-ACLOCAL="perllibdir=./lib `pwd`/aclocal --acdir=m4"
+ACLOCAL="perllibdir=./lib `pwd`/aclocal --acdir=m4 -I `pwd`/m4"
 AUTOMAKE="perllibdir=./lib `pwd`/automake --libdir=lib"
 
 AC_PATH_PROG(PERL, perl)
index 3de266f..7ed4e76 100644 (file)
@@ -1,4 +1,4 @@
 ## Process this file with automake to create Makefile.in
 
-perllibdir = $(pkgdatadir)/Automake
+perllibdir = $(pkgvdatadir)/Automake
 dist_perllib_DATA = Struct.pm General.pm XFile.pm
index 070ba44..3a2ea8a 100644 (file)
@@ -71,8 +71,9 @@ VERSION = @VERSION@
 am__include = @am__include@
 am__quote = @am__quote@
 install_sh = @install_sh@
+pkgvdatadir = @pkgvdatadir@
 
-perllibdir = $(pkgdatadir)/Automake
+perllibdir = $(pkgvdatadir)/Automake
 dist_perllib_DATA = Struct.pm General.pm XFile.pm
 subdir = lib/Automake
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
index 2332ea0..622d82a 100644 (file)
 
 SUBDIRS = Automake am
 
-dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1
+dist_pkgvdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1
 
 ## These must all be executable when installed.  However, if we use
 ## _SCRIPTS, then the program transform will be applied, which is not
 ## what we want.  So we make them executable by hand.
-scriptdir = $(pkgdatadir)
+scriptdir = $(pkgvdatadir)
 dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \
 mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile
 
@@ -41,5 +41,5 @@ install-data-hook:
 ## doesn't exist, then this test is meaningless anyway.
 installcheck-local:
        for file in $(dist_script_DATA); do \
-         $(PERL) -e "exit ! -x '$(pkgdatadir)/$$file';" || exit 1; \
+         $(PERL) -e "exit ! -x '$(pkgvdatadir)/$$file';" || exit 1; \
        done
index 656e91c..a670f3f 100644 (file)
@@ -71,12 +71,13 @@ VERSION = @VERSION@
 am__include = @am__include@
 am__quote = @am__quote@
 install_sh = @install_sh@
+pkgvdatadir = @pkgvdatadir@
 
 SUBDIRS = Automake am
 
-dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1
+dist_pkgvdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1
 
-scriptdir = $(pkgdatadir)
+scriptdir = $(pkgvdatadir)
 dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \
 mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile
 
@@ -84,14 +85,14 @@ subdir = lib
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 DIST_SOURCES =
-DATA = $(dist_pkgdata_DATA) $(dist_script_DATA)
+DATA = $(dist_pkgvdata_DATA) $(dist_script_DATA)
 
 
 RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
        uninstall-info-recursive all-recursive install-data-recursive \
        install-exec-recursive installdirs-recursive install-recursive \
        uninstall-recursive check-recursive installcheck-recursive
-DIST_COMMON = $(dist_pkgdata_DATA) $(dist_script_DATA) COPYING INSTALL \
+DIST_COMMON = $(dist_pkgvdata_DATA) $(dist_script_DATA) COPYING INSTALL \
        Makefile.am Makefile.in ansi2knr.1 ansi2knr.c compile \
        config.guess config.sub depcomp elisp-comp install-sh mdate-sh \
        missing mkinstalldirs py-compile texinfo.tex ylwrap
@@ -105,23 +106,23 @@ $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
 uninstall-info-am:
-dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
-install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
+dist_pkgvdataDATA_INSTALL = $(INSTALL_DATA)
+install-dist_pkgvdataDATA: $(dist_pkgvdata_DATA)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
-       @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
+       $(mkinstalldirs) $(DESTDIR)$(pkgvdatadir)
+       @list='$(dist_pkgvdata_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f="`echo $$p | sed -e 's|^.*/||'`"; \
-         echo " $(dist_pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
-         $(dist_pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
+         echo " $(dist_pkgvdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgvdatadir)/$$f"; \
+         $(dist_pkgvdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgvdatadir)/$$f; \
        done
 
-uninstall-dist_pkgdataDATA:
+uninstall-dist_pkgvdataDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
+       @list='$(dist_pkgvdata_DATA)'; for p in $$list; do \
          f="`echo $$p | sed -e 's|^.*/||'`"; \
-         echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
-         rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
+         echo " rm -f $(DESTDIR)$(pkgvdatadir)/$$f"; \
+         rm -f $(DESTDIR)$(pkgvdatadir)/$$f; \
        done
 dist_scriptDATA_INSTALL = $(INSTALL_DATA)
 install-dist_scriptDATA: $(dist_script_DATA)
@@ -261,7 +262,7 @@ distdir: $(DISTFILES)
            || exit 1; \
          fi; \
        done
-       for subdir in $(SUBDIRS); do \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d $(distdir)/$$subdir \
            || mkdir $(distdir)/$$subdir \
@@ -279,7 +280,7 @@ check: check-recursive
 all-am: Makefile $(DATA)
 installdirs: installdirs-recursive
 installdirs-am:
-       $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(scriptdir)
+       $(mkinstalldirs) $(DESTDIR)$(pkgvdatadir) $(DESTDIR)$(scriptdir)
 
 install: install-recursive
 install-exec: install-exec-recursive
@@ -321,7 +322,7 @@ info: info-recursive
 
 info-am:
 
-install-data-am: install-dist_pkgdataDATA install-dist_scriptDATA
+install-data-am: install-dist_pkgvdataDATA install-dist_scriptDATA
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-data-hook
 
@@ -341,7 +342,7 @@ mostlyclean: mostlyclean-recursive
 
 mostlyclean-am: mostlyclean-generic
 
-uninstall-am: uninstall-dist_pkgdataDATA uninstall-dist_scriptDATA \
+uninstall-am: uninstall-dist_pkgvdataDATA uninstall-dist_scriptDATA \
        uninstall-info-am
 
 uninstall-info: uninstall-info-recursive
@@ -351,7 +352,7 @@ uninstall-info: uninstall-info-recursive
        distclean-recursive distclean-tags distdir dvi dvi-am \
        dvi-recursive info info-am info-recursive install install-am \
        install-data install-data-am install-data-recursive \
-       install-dist_pkgdataDATA install-dist_scriptDATA install-exec \
+       install-dist_pkgvdataDATA install-dist_scriptDATA install-exec \
        install-exec-am install-exec-recursive install-info \
        install-info-am install-info-recursive install-man \
        install-recursive install-strip installcheck installcheck-am \
@@ -359,7 +360,7 @@ uninstall-info: uninstall-info-recursive
        installdirs-recursive maintainer-clean maintainer-clean-generic \
        maintainer-clean-recursive mostlyclean mostlyclean-generic \
        mostlyclean-recursive tags tags-recursive uninstall \
-       uninstall-am uninstall-dist_pkgdataDATA \
+       uninstall-am uninstall-dist_pkgvdataDATA \
        uninstall-dist_scriptDATA uninstall-info-am \
        uninstall-info-recursive uninstall-recursive
 
@@ -373,7 +374,7 @@ install-data-hook:
 
 installcheck-local:
        for file in $(dist_script_DATA); do \
-         $(PERL) -e "exit ! -x '$(pkgdatadir)/$$file';" || exit 1; \
+         $(PERL) -e "exit ! -x '$(pkgvdatadir)/$$file';" || exit 1; \
        done
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index b5b7778..a74a584 100644 (file)
@@ -19,7 +19,7 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-amdir = $(pkgdatadir)/am
+amdir = $(pkgvdatadir)/am
 
 dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \
 configure.am data.am dejagnu.am depend.am depend2.am distdir.am \
index f3e22bb..e48c2d6 100644 (file)
@@ -71,8 +71,9 @@ VERSION = @VERSION@
 am__include = @am__include@
 am__quote = @am__quote@
 install_sh = @install_sh@
+pkgvdatadir = @pkgvdatadir@
 
-amdir = $(pkgdatadir)/am
+amdir = $(pkgvdatadir)/am
 
 dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \
 configure.am data.am dejagnu.am depend.am depend2.am distdir.am \
index 3199d49..adc6ebc 100755 (executable)
@@ -139,7 +139,7 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     touch $touch_files
     ;;
 
-  automake)
+  automake*)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
        exit 1
index 086fff8..40eaedf 100644 (file)
@@ -19,7 +19,7 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
-m4datadir = $(datadir)/aclocal
+m4datadir = $(datadir)/aclocal-$(VERSION)
 
 dist_m4data_DATA = as.m4 auxdir.m4 ccstdc.m4 cond.m4 depend.m4 depout.m4 \
 dmalloc.m4 gcj.m4 header.m4 init.m4 install-sh.m4 lex.m4 lispdir.m4 \
index 66684aa..bc3e626 100644 (file)
@@ -71,8 +71,9 @@ VERSION = @VERSION@
 am__include = @am__include@
 am__quote = @am__quote@
 install_sh = @install_sh@
+pkgvdatadir = @pkgvdatadir@
 
-m4datadir = $(datadir)/aclocal
+m4datadir = $(datadir)/aclocal-$(VERSION)
 
 dist_m4data_DATA = as.m4 auxdir.m4 ccstdc.m4 cond.m4 depend.m4 depout.m4 \
 dmalloc.m4 gcj.m4 header.m4 init.m4 install-sh.m4 lex.m4 lispdir.m4 \
index 02b81c1..e7b900b 100644 (file)
@@ -18,7 +18,7 @@
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[])
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__version="$1"])
 
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
index 2fe1a5b..1b1df79 100644 (file)
@@ -75,7 +75,7 @@ AC_REQUIRE([AM_SANITY_CHECK])dnl
 AC_REQUIRE([AC_ARG_PROGRAM])dnl
 AM_MISSING_PROG(ACLOCAL, aclocal)
 AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake)
+AM_MISSING_PROG(AUTOMAKE, "automake-${am__version}")
 AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
 AM_MISSING_PROG(AMTAR, tar)
diff --git a/missing b/missing
index 0a7fb5a..adc6ebc 100755 (executable)
--- a/missing
+++ b/missing
@@ -78,7 +78,7 @@ Supported PROGRAM values:
     ;;
 
   -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing 0.3 - GNU automake"
+    echo "missing 0.4 - GNU automake"
     ;;
 
   -*)
@@ -88,6 +88,11 @@ Supported PROGRAM values:
     ;;
 
   aclocal)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
     echo 1>&2 "\
 WARNING: \`$1' is missing on your system.  You should only need it if
          you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
@@ -97,6 +102,11 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   autoconf)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
     echo 1>&2 "\
 WARNING: \`$1' is missing on your system.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
@@ -106,6 +116,11 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   autoheader)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
     echo 1>&2 "\
 WARNING: \`$1' is missing on your system.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
@@ -124,7 +139,12 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     touch $touch_files
     ;;
 
-  automake)
+  automake*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
     echo 1>&2 "\
 WARNING: \`$1' is missing on your system.  You should only need it if
          you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
@@ -135,6 +155,34 @@ WARNING: \`$1' is missing on your system.  You should only need it if
           while read f; do touch "$f"; done
     ;;
 
+  autom4te)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo "#! /bin/sh"
+       echo "# Created by GNU Automake missing as a replacement of"
+       echo "#  $ $@"
+       echo "exit 0"
+       chmod +x $file
+       exit 1
+    fi
+    ;;
+
   bison|yacc)
     echo 1>&2 "\
 WARNING: \`$1' is missing on your system.  You should only need it if
@@ -189,6 +237,11 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   help2man)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
     echo 1>&2 "\
 WARNING: \`$1' is missing on your system.  You should only need it if
         you modified a dependency of a manual page.  You may need the
index ccd4d77..76c9a25 100644 (file)
@@ -71,6 +71,7 @@ VERSION = @VERSION@
 am__include = @am__include@
 am__quote = @am__quote@
 install_sh = @install_sh@
+pkgvdatadir = @pkgvdatadir@
 
 XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test