applied missing patches from Francois, verbatim
authorTom Tromey <tromey@redhat.com>
Wed, 19 Mar 1997 04:58:56 +0000 (04:58 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Mar 1997 04:58:56 +0000 (04:58 +0000)
13 files changed:
ChangeLog
Makefile.am
Makefile.in
automake.in
header-vars.am
lib/am/Makefile.am
lib/am/header-vars.am
lib/am/remake-hdr.am
lib/missing [new file with mode: 0755]
m4/init.m4
missing [new file with mode: 0755]
remake-hdr.am
remake.am

index 4e2c182..42b38ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 Tue Mar 18 17:20:03 1997  Tom Tromey  <tromey@cygnus.com>
 
+       `missing' changes from François Pinard:
+       * Everywhere: Use ACLOCAL_M4 to name aclocal.m4 file; ACLOCAL now
+       names aclocal program.
+       * m4/init.m4: Replace programs with `missing' if not found.
+       * automake.in (handle_texinfo): Define MAKEINFO as @MAKEINFO@.
+       (AC_CHECK_PATTERN): Check for alphanumeric names only.
+       (handle_aclocal_m4): Use ACLOCAL, not aclocal.
+       * Makefile.am (pkgdata_SCRIPTS): Include missing.
+       * missing: New file.
+
        * automake.in (target_defined): New sub.
        (handle_footer): Error if target .SUFFIXES used.
 
index 10e85c0..3f73a23 100644 (file)
@@ -18,8 +18,8 @@ data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1       \
 lisp.am lisp-clean.am
 
 ## These must all be executable when installed.
-pkgdata_SCRIPTS = config.guess config.sub install-sh interlock mdate-sh \
-mkinstalldirs elisp-comp ylwrap acinstall
+pkgdata_SCRIPTS = config.guess config.sub install-sh interlock \
+mdate-sh missing mkinstalldirs elisp-comp ylwrap acinstall
 
 EXTRA_DIST = acinstall $(pkgdata_DATA)
 
index 3c25132..86837ff 100644 (file)
@@ -60,8 +60,8 @@ texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \
 data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1        \
 lisp.am lisp-clean.am
 
-pkgdata_SCRIPTS = config.guess config.sub install-sh interlock mdate-sh \
-mkinstalldirs elisp-comp ylwrap acinstall
+pkgdata_SCRIPTS = config.guess config.sub install-sh interlock \
+mdate-sh missing mkinstalldirs elisp-comp ylwrap acinstall
 
 EXTRA_DIST = acinstall $(pkgdata_DATA)
 
index 20cf097..f226842 100755 (executable)
@@ -50,7 +50,7 @@ $AC_CONFIG_AUX_DIR_PATTERN = "AC_CONFIG_AUX_DIR\\(([^)]+)\\)";
 $AM_INIT_AUTOMAKE_PATTERN = "AM_INIT_AUTOMAKE\\([^,]*,([^)]+)\\)";
 $AM_PACKAGE_VERSION_PATTERN = "^\\s*\\[?([^]\\s]+)\\]?\\s*\$";
 # Note that there is no AC_PATH_TOOL.  But we don't really care.
-$AC_CHECK_PATTERN = "AC_(CHECK|PATH)_(PROG|PROGS|TOOL)\\(\\[?([^]),]+)";
+$AC_CHECK_PATTERN = "AC_(CHECK|PATH)_(PROG|PROGS|TOOL)\\(\\[?(\\w+)";
 # Just check for alphanumeric in AC_SUBST.  If you do AC_SUBST(5),
 # then too bad.
 $AC_SUBST_PATTERN = "AC_SUBST\\(\\[?(\\w+)";
@@ -858,7 +858,7 @@ sub handle_yacc_lex_cxx
                          $ltcompile . '$(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)')
            if ($seen_libtool);
 
-       &define_variable ('CXXLINK', $libtool . '$(CXX) $(LDFLAGS) -o $@');
+       &define_variable ('CXXLINK', $ltlink . '$(CXX) $(LDFLAGS) -o $@');
 
        local ($ext);
        foreach $ext (@cxx_list)
@@ -1869,7 +1869,7 @@ sub handle_texinfo
     # Find these programs wherever they may lie.  Yes, this has
     # intimate knowledge of the structure of the texinfo distribution.
     &define_program_variable ('MAKEINFO', 'build', 'texinfo/makeinfo',
-                             'makeinfo');
+                             '@MAKEINFO@');
     &define_program_variable ('TEXI2DVI', 'src', 'texinfo/util',
                              'texi2dvi');
 
@@ -2101,7 +2101,7 @@ sub handle_dist_worker
                 # weirdness.
                 '      here=`pwd`; distdir=`cd $(distdir) && pwd` \\
          && cd $(srcdir) \\
-         && automake --include-deps --build-dir=$$here --srcdir-name=$(srcdir) --output-dir=$$distdir '
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(srcdir) --output-dir=$$distdir '
                 # Set strictness of output.
                 . ($cygnus_mode ? '--cygnus' : ('--' . $strictness_name))
                 . "\n"
@@ -2556,7 +2556,7 @@ sub handle_aclocal_m4
     local ($regen_aclocal) = 0;
     if (-f 'aclocal.m4')
     {
-       &define_variable ("ACLOCAL", '$(top_srcdir)/aclocal.m4');
+       &define_variable ("ACLOCAL_M4", '$(top_srcdir)/aclocal.m4');
        &push_dist_common ('aclocal.m4');
 
        if (open (ACLOCAL, '< aclocal.m4'))
@@ -2609,7 +2609,7 @@ sub handle_aclocal_m4
        &pretty_print_rule ("\$(srcdir)/aclocal.m4:", "\t\t", @ac_deps);
 
        $output_rules .=  ("\t"
-                          . 'cd $(srcdir) && aclocal'
+                          . 'cd $(srcdir) && $(ACLOCAL)'
                           . (&variable_defined ('ACLOCAL_AMFLAGS')
                              ? ' $(ACLOCAL_AMFLAGS)' : '')
                           . "\n");
@@ -2682,9 +2682,9 @@ sub handle_configure
                      . ': '
                      . ($seen_maint_mode ? '@MAINT@ ' : '')
                      . $amfile . ' '
-                     . '$(top_srcdir)/configure.in $(ACLOCAL) '
+                     . '$(top_srcdir)/configure.in $(ACLOCAL_M4) '
                      . join (' ', @rewritten) . "\n"
-                     . "\tcd \$(top_srcdir) && automake "
+                     . "\tcd \$(top_srcdir) && \$(AUTOMAKE) "
                      . ($cygnus_mode ? '--cygnus' : ('--' . $strictness_name))
                      . ' ' . $input . $colon_infile . "\n\n");
 
@@ -4678,15 +4678,15 @@ sub am_install_var
 
     local ($ltxform);
     if (defined $configure_vars{'LIBTOOL'})
-           {
+    {
        # Transform '@LIBTOOL ...@' to '$(LIBTOOL) ...'
        $ltxform = 's/\@LIBTOOL([^\@]*)\@/\$(LIBTOOL) $1/;';
-           }
-           else
-           {
+    }
+    else
+    {
        # Delete '@LIBTOOL ...@'
        $ltxform = 's/\@LIBTOOL([^\@]*)\@//;';
-           }
+    }
 
     while (@args)
     {
index 3ef2697..a7be51c 100644 (file)
@@ -44,6 +44,12 @@ pkgincludedir = $(includedir)/@PACKAGE@
 ## Location of top build directory relative to this one.
 top_builddir = @top_builddir@
 
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+MAKEINFO = @MAKEINFO@
+
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
index 10e85c0..3f73a23 100644 (file)
@@ -18,8 +18,8 @@ data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1       \
 lisp.am lisp-clean.am
 
 ## These must all be executable when installed.
-pkgdata_SCRIPTS = config.guess config.sub install-sh interlock mdate-sh \
-mkinstalldirs elisp-comp ylwrap acinstall
+pkgdata_SCRIPTS = config.guess config.sub install-sh interlock \
+mdate-sh missing mkinstalldirs elisp-comp ylwrap acinstall
 
 EXTRA_DIST = acinstall $(pkgdata_DATA)
 
index 3ef2697..a7be51c 100644 (file)
@@ -44,6 +44,12 @@ pkgincludedir = $(includedir)/@PACKAGE@
 ## Location of top build directory relative to this one.
 top_builddir = @top_builddir@
 
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+MAKEINFO = @MAKEINFO@
+
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
index 2c456ca..d63798a 100644 (file)
@@ -22,8 +22,8 @@ stamp-h: $(CONFIG_HEADER_IN) $(top_builddir)/config.status
             $(SHELL) ./config.status
        @echo timestamp > stamp-h
 $(srcdir)/$(CONFIG_HEADER_IN): @MAINT@stamp-h.in
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL) @FILES@
-       cd $(top_srcdir) && autoheader
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) @FILES@
+       cd $(top_srcdir) && $(AUTOHEADER)
        echo timestamp > $(srcdir)/stamp-h.in
 
 mostlyclean-hdr:
diff --git a/lib/missing b/lib/missing
new file mode 100755 (executable)
index 0000000..e4b838c
--- /dev/null
@@ -0,0 +1,134 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        touch file \`y.tab.c'
+  makeinfo     touch the output file
+  yacc         touch file \`y.tab.c'"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing - GNU libit 0.0"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         you modified \`acinclude.m4' or \`configure.in'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         you modified \`configure.in'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         you modified \`acconfig.h' or \`configure.in'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    touch config.h.in
+    ;;
+
+  automake)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print \
+      | sed 's/^\(.*\).am$/touch \1.in/' \
+      | sh
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         your modified any \`.y' file.  For being effective, your
+         modifications might require the \`Bison' package.  Grab it from
+         any GNU archive site."
+    touch y.tab.c
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  *)
+    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.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
index 8afadf2..0842fdf 100644 (file)
@@ -17,4 +17,9 @@ AC_SUBST(VERSION)
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
 AM_SANITY_CHECK
 AC_ARG_PROGRAM
+AC_CHECK_PROG(ACLOCAL, aclocal, aclocal, \$(SHELL) missing aclocal)
+AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, \$(SHELL) missing autoconf)
+AC_CHECK_PROG(AUTOMAKE, automake, automake, \$(SHELL) missing automake)
+AC_CHECK_PROG(AUTOHEADER, autoheader, autoheader, \$(SHELL) missing autoheader)
+AM_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, \$(SHELL) ../missing makeinfo)
 AC_PROG_MAKE_SET])
diff --git a/missing b/missing
new file mode 100755 (executable)
index 0000000..e4b838c
--- /dev/null
+++ b/missing
@@ -0,0 +1,134 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        touch file \`y.tab.c'
+  makeinfo     touch the output file
+  yacc         touch file \`y.tab.c'"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing - GNU libit 0.0"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         you modified \`acinclude.m4' or \`configure.in'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         you modified \`configure.in'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         you modified \`acconfig.h' or \`configure.in'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    touch config.h.in
+    ;;
+
+  automake)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print \
+      | sed 's/^\(.*\).am$/touch \1.in/' \
+      | sh
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         your modified any \`.y' file.  For being effective, your
+         modifications might require the \`Bison' package.  Grab it from
+         any GNU archive site."
+    touch y.tab.c
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  It should be needed only if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  *)
+    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.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
index 2c456ca..d63798a 100644 (file)
@@ -22,8 +22,8 @@ stamp-h: $(CONFIG_HEADER_IN) $(top_builddir)/config.status
             $(SHELL) ./config.status
        @echo timestamp > stamp-h
 $(srcdir)/$(CONFIG_HEADER_IN): @MAINT@stamp-h.in
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL) @FILES@
-       cd $(top_srcdir) && autoheader
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) @FILES@
+       cd $(top_srcdir) && $(AUTOHEADER)
        echo timestamp > $(srcdir)/stamp-h.in
 
 mostlyclean-hdr:
index 129f407..81b2d33 100644 (file)
--- a/remake.am
+++ b/remake.am
@@ -17,5 +17,5 @@
 ## 02111-1307, USA.
 config.status: configure
        $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINT@configure.in $(ACLOCAL) $(CONFIGURE_DEPENDENCIES)
-       cd $(srcdir) && autoconf
+$(srcdir)/configure: @MAINT@configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+       cd $(srcdir) && $(AUTOCONF)