]> sourceware.org Git - automake.git/commitdiff
* m4/lex.m4: Don't run AC_DECL_YYTEXT, Autoconf does.
authorAkim Demaille <akim@epita.fr>
Sun, 21 Oct 2001 18:04:15 +0000 (18:04 +0000)
committerAkim Demaille <akim@epita.fr>
Sun, 21 Oct 2001 18:04:15 +0000 (18:04 +0000)
* automake.texi (Macros, Yacc and Lex): Adjust.
* automake.in ($seen_decl_yytext): Rename as...
($seen_prog_lex): this.
(&scan_autoconf_traces): Add AC_PROG_LEX support.
(&scan_one_autoconf_file, &lang_lex_finish): Adjust.

ChangeLog
automake.in
automake.texi
m4/lex.m4
stamp-vti
version.texi

index 21ac79202cf7828e657eef43a54f35b76bd4f94e..4cf63fe20cea073ee40cea08a2bf5a13bbe74bd8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-10-21  Akim Demaille  <akim@epita.fr>
+
+       * m4/lex.m4: Don't run AC_DECL_YYTEXT, Autoconf does.
+       * automake.texi (Macros, Yacc and Lex): Adjust.
+       * automake.in ($seen_decl_yytext): Rename as...
+       ($seen_prog_lex): this.
+       (&scan_autoconf_traces): Add AC_PROG_LEX support.
+       (&scan_one_autoconf_file, &lang_lex_finish): Adjust.
+
 2001-10-21  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&scan_autoconf_traces): Add support for
index b2bd3d800d6abbc7312881dc88bdf6ee5ed766ab..7c6844482e3dde060252298c855e6b5117fc5712 100755 (executable)
@@ -390,8 +390,8 @@ my $seen_gettext = 0;
 # Line number at which AM_GNU_GETTEXT seen.
 my $ac_gettext_line = 0;
 
-# TRUE if AC_DECL_YYTEXT was seen.
-my $seen_decl_yytext = 0;
+# TRUE if AC_PROG_LEX or AM_PROG_LEX were seen.
+my $seen_prog_lex = 0;
 
 # TRUE if we've seen AC_CANONICAL_(HOST|SYSTEM).  The presence of
 # AC_CHECK_TOOL also sets this.
@@ -4451,6 +4451,7 @@ sub scan_autoconf_traces ($)
                'AC_CONFIG_FILES',
                'AC_LIBSOURCE',
                'AC_PROG_LIBTOOL', 'AM_PROG_LIBTOOL',
+               'AC_PROG_LEX',
                'AC_SUBST',
                'AM_CONDITIONAL',
                'AM_CONFIG_HEADER',
@@ -4508,15 +4509,19 @@ sub scan_autoconf_traces ($)
          # _AC_LIBOBJ_DECL and use it the in various macros.
          $libsources{$args[1]} = $here;
        }
-      elsif ($macro eq 'AC_SUBST')
-       {
-         $configure_vars{$args[1]} = $here;
-       }
       elsif ($macro =~ /A(C|M)_PROG_LIBTOOL/)
        {
          $seen_libtool = $here;
          $libtool_line = $line;
        }
+      elsif ($macro =~ /AC_PROG_LEX/)
+       {
+         $seen_prog_lex = $here;
+       }
+      elsif ($macro eq 'AC_SUBST')
+       {
+         $configure_vars{$args[1]} = $here;
+       }
       elsif ($macro eq 'AM_CONDITIONAL')
        {
          $configure_cond{$args[1]} = $here;
@@ -4795,15 +4800,14 @@ sub scan_one_autoconf_file
        if (/AM_PROG_LEX/)
        {
            $configure_vars{'LEX'} = $filename . ':' . $.;
-           $seen_decl_yytext = 1;
-       }
-       if (/AC_DECL_YYTEXT/ && $filename =~ /configure\.(ac|in)$/)
-       {
-           &am_conf_line_warning ($filename, $., "`AC_DECL_YYTEXT' is covered by `AM_PROG_LEX'");
+           $seen_prog_lex = 1;
        }
        if (/AC_PROG_LEX/ && $filename =~ /configure\.(ac|in)$/)
        {
-           &am_conf_line_warning ($filename, $., "automake requires `AM_PROG_LEX', not `AC_PROG_LEX'");
+           $configure_vars{'LEX'} = $filename . ':' . $.;
+           $seen_prog_lex = 1;
+           &am_conf_line_warning ($filename, $.,
+                  "automake requires `AM_PROG_LEX', not `AC_PROG_LEX'");
        }
 
        if (/AC_PROG_(F77|YACC|RANLIB|CC|CXXCPP|CXX|LEX|AWK|CPP|LN_S)/)
@@ -4841,7 +4845,6 @@ sub scan_one_autoconf_file
            $configure_vars{$1} = $filename . ':' . $.;
        }
 
-        $seen_decl_yytext = 1 if /AC_DECL_YYTEXT/;
        if (/AM_MAINTAINER_MODE/)
        {
            $seen_maint_mode = 1;
@@ -5279,9 +5282,9 @@ sub lang_lex_finish
     return if defined $language_scratch{'lex-done'};
     $language_scratch{'lex-done'} = 1;
 
-    if (! $seen_decl_yytext)
+    if (! $seen_prog_lex)
     {
-       &am_error ("lex source seen but `AC_DECL_YYTEXT' not in `$configure_ac'");
+       &am_error ("lex source seen but `AM_PROG_LEX' not in `$configure_ac'");
     }
 
     if (count_files_for_language ('lex') > 1)
index 6e9a4ffa1423d552e7f116b57871388e117e0a91..583ef7f1fcb48b2c2750f4168a86b0f6d508df86 100644 (file)
@@ -1204,12 +1204,6 @@ autoconf, The Autoconf Manual}).
 @cvindex AC_PROG_YACC
 @cvindex YACC
 
-@item AC_DECL_YYTEXT
-This macro is required if there is Lex source in the package.
-@xref{Particular Programs, , Particular Program Checks, autoconf, The
-Autoconf Manual}.
-@cvindex AC_DECL_YYTEXT
-
 @item AC_PROG_LEX
 If a Lex source file is seen, then this macro must be used.
 @xref{Particular Programs, , Particular Program Checks, autoconf, The
@@ -1412,19 +1406,10 @@ code in ANSI C, you can make an un-ANSIfied copy of it by using the
 @item AM_PROG_LEX
 @cindex HP-UX 10, lex problems
 @cindex lex problems with HP-UX 10
-Like @code{AC_PROG_LEX} with @code{AC_DECL_YYTEXT} (@pxref{Particular
-Programs, , Particular Program Checks, autoconf, The Autoconf Manual}),
-but uses the @code{missing} script on systems that do not have
-@code{lex}.  @samp{HP-UX 10} is one such system.
-
-Autoconf 2.50 and higher, in order to simplify the interface, includes
-the body of @code{AC_DECL_YYTEXT} in @code{AC_PROG_LEX}.  To ensure
-backward compatibility, @code{AC_DECL_YYTEXT} is nevertheless defined as
-an invocation of @code{AC_PROG_LEX}.  Since @code{AM_PROG_LEX} invokes
-both, it causes an annoying but benign warning (@code{AC_PROG_LEX}
-invoked multiple times) which you should just ignore.  In the future,
-once Automake requires Autoconf 2.50, this issue will be fixed, but the
-current compatibility with Autoconf 2.13 prevents this.
+Like @code{AC_PROG_LEX} (@pxref{Particular Programs, , Particular
+Program Checks, autoconf, The Autoconf Manual}), but uses the
+@code{missing} script on systems that do not have @code{lex}.
+@samp{HP-UX 10} is one such system.
 
 @item AM_PROG_GCJ
 This macro finds the @code{gcj} program or causes an error.  It sets
@@ -2265,11 +2250,8 @@ intended for the @file{Makefile.am} author.
 Similarly, if a @code{lex} source file is seen, then your
 @file{configure.in} must define the variable @samp{LEX}.  You can use
 @samp{AC_PROG_LEX} to do this (@pxref{Particular Programs, , Particular
-Program Checks, autoconf, The Autoconf Manual}).  Automake's @code{lex}
-support also requires that you use the @samp{AC_DECL_YYTEXT}
-macro---automake needs to know the value of @samp{LEX_OUTPUT_ROOT}.
-This is all handled for you if you use the @code{AM_PROG_LEX} macro
-(@pxref{Macros}).
+Program Checks, autoconf, The Autoconf Manual}), but using
+@code{AM_PROG_LEX} macro (@pxref{Macros}) is recommended.
 
 When @code{lex} is invoked, it is passed @samp{LFLAGS} and
 @samp{AM_LFLAGS}.  The former is a user variable and the latter is
index b2c41f8e613ee749f8e61308ed788d11348a723f..d4cc3818c5705f6a6e48090fbc66769efa34d643 100644 (file)
--- a/m4/lex.m4
+++ b/m4/lex.m4
@@ -1,4 +1,4 @@
-## Replacement for AC_PROG_LEX and AC_DECL_YYTEXT
+## Replacement for AC_PROG_LEX.                       -*-  Autoconf -*-
 ## by Alexandre Oliva <oliva@dcc.unicamp.br>
 
 # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
+# serial 2
+
+AC_PREREQ(2.50)
+
 # AM_PROG_LEX
-# Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
+# -----------
+# Look for flex, lex or missing, then run AC_PROG_LEX.
 AC_DEFUN([AM_PROG_LEX],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
+[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
 AC_CHECK_PROGS(LEX, flex lex, [${am_missing_run}flex])
-AC_PROG_LEX
-AC_DECL_YYTEXT])
+AC_PROG_LEX])
index 0b1c08ebe5376f379e4c8268f751a807951fe741..5e7b156dc6b127d993c7b71de199b5a03480ab72 100644 (file)
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 20 October 2001
+@set UPDATED 21 October 2001
 @set UPDATED-MONTH October 2001
 @set EDITION 1.5a
 @set VERSION 1.5a
index 0b1c08ebe5376f379e4c8268f751a807951fe741..5e7b156dc6b127d993c7b71de199b5a03480ab72 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 20 October 2001
+@set UPDATED 21 October 2001
 @set UPDATED-MONTH October 2001
 @set EDITION 1.5a
 @set VERSION 1.5a
This page took 0.08374 seconds and 5 git commands to generate.