+2002-03-05 Kevin Ryde <user42@zip.com.au>
+
+ For PR automake/297:
+ * lex.m4 (AM_PROG_LEX): Don't set LEX=${am_missing_run}flex until
+ after AC_PROG_LEX, since it will try to run it and fail (in autoconf
+ 2.52 at least).
+
2002-02-25 Alexandre Duret-Lutz <duret_g@epita.fr>
* automake.in (scan_one_autoconf_file): Declare
## Replacement for AC_PROG_LEX. -*- Autoconf -*-
## by Alexandre Oliva <oliva@dcc.unicamp.br>
-# Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002 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
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 2
+# serial 3
AC_PREREQ(2.50)
# AM_PROG_LEX
# -----------
-# Look for flex, lex or missing, then run AC_PROG_LEX.
+# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
+# "missing" invocation, for better error output.
AC_DEFUN([AM_PROG_LEX],
[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
-AC_CHECK_PROGS(LEX, flex lex, [${am_missing_run}flex])
-AC_PROG_LEX])
+AC_REQUIRE([AC_PROG_LEX])dnl
+if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+fi])