autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AM_PROG_LEX vs AC_DECL_YYTEXT


From: Ralf Corsepius
Subject: AM_PROG_LEX vs AC_DECL_YYTEXT
Date: Fri, 04 May 2001 09:49:18 +0200

Hi,

Given this configure.in:

AC_INIT(xx.y)
AM_INIT_AUTOMAKE(xx,0,no)
AC_PROG_CC
AM_PROG_LEX
AC_PROG_YACC
AC_OUTPUT(Makefile)

Running autoconf-2.49f gives:
# autoconf
configure.in:4: warning: AC_PROG_LEX invoked multiple times
# autoconf -t AC_PROG_LEX
configure.in:4:AC_PROG_LEX:
configure.in:4:AC_PROG_LEX:

This happens with automake-1.4, automake-1.4d and automake-cvs.

AFAIS, it's the AC_DECL_YYTEXT from automake's AM_PROG_LEX/lex.m4
which triggers this warning:
> # AM_PROG_LEX
> # Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
> AC_DEFUN([AM_PROG_LEX],
> [AC_REQUIRE([AM_MISSING_HAS_RUN])
> AC_CHECK_PROGS(LEX, flex lex, [${am_missing_run}flex])
> AC_PROG_LEX
> AC_DECL_YYTEXT])

With AC_DECL_YYTEXT being defined this way in autoconf-2.49f:
> AU_DEFUN([AC_DECL_YYTEXT],
> [AC_PROG_LEX])

I.e. AM_PROG_LEX will contain two consecutive calls to AC_PROG_LEX.

AC_REQUIRE-ing AC_PROG_LEX in AC_DECL_YYTEXT instead of redirecting
AC_DECL_YYTEXT to AC_PROG_LEX seems to solve this issue [cf. the
patch below].

Ralf
-- 
Ralf Corsepius 
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
(FAW)
Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690
mailto:address@hidden           FAX: +49/731/501-999  
http://www.faw.uni-ulm.de
Index: acspecific.m4
===================================================================
RCS file: /cvs/autoconf/acspecific.m4,v
retrieving revision 1.338
diff -u -r1.338 acspecific.m4
--- acspecific.m4       2001/04/15 16:20:30     1.338
+++ acspecific.m4       2001/05/04 07:28:48
@@ -183,7 +183,7 @@
 
 # Require AC_PROG_LEX in case some people were just calling this macro.
 AU_DEFUN([AC_DECL_YYTEXT],
-[AC_PROG_LEX])
+[AC_REQUIRE([AC_PROG_LEX])])dnl
 
 
 # AC_PROG_INSTALL

reply via email to

[Prev in Thread] Current Thread [Next in Thread]