From e90822dea62c0c01adb05a2472abd6696e05670e Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 5 Mar 2002 13:27:02 +0000 Subject: [PATCH] 2002-03-05 Kevin Ryde 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). --- ChangeLog | 7 +++++++ m4/lex.m4 | 13 ++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d351eb0..516cd33a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-03-05 Kevin Ryde + + 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 * automake.in (scan_one_autoconf_file): Declare diff --git a/m4/lex.m4 b/m4/lex.m4 index d4cc3818..9bde8944 100644 --- a/m4/lex.m4 +++ b/m4/lex.m4 @@ -1,7 +1,7 @@ ## Replacement for AC_PROG_LEX. -*- Autoconf -*- ## by Alexandre Oliva -# 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 @@ -18,14 +18,17 @@ # 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]) -- 2.43.5