summaryrefslogtreecommitdiff
path: root/m4/lex.m4
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2002-03-05 13:27:06 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2002-03-05 13:27:06 +0000
commitfecac1819bc30f1e3e4e56f6f9700b8d0e520bc0 (patch)
tree6696a40a80f8d0c2082ee48f43fd0f2776fcef14 /m4/lex.m4
parentc03cf7393343167c0c363ae5a16489ec066bd328 (diff)
downloadautomake-fecac1819bc30f1e3e4e56f6f9700b8d0e520bc0.tar.gz
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).
Diffstat (limited to 'm4/lex.m4')
-rw-r--r--m4/lex.m413
1 files changed, 8 insertions, 5 deletions
diff --git a/m4/lex.m4 b/m4/lex.m4
index d4cc3818c..9bde89443 100644
--- a/m4/lex.m4
+++ b/m4/lex.m4
@@ -1,7 +1,7 @@
## 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
@@ -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])