bug-guile
[Top][All Lists]
Advanced

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

[PATCH] check if LEX is available before use it


From: Giuseppe Scrivano
Subject: [PATCH] check if LEX is available before use it
Date: Tue, 23 Jun 2009 17:48:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

Hello,

At the moment configure doesn't check if lex is installed before use it,
is is safe to assume it?

In case, this short patch adds the check in the configure.in file and
use the found LEX instead of `flex'.

Cheers,
Giuseppe



>From 43c2daa582df1a0e88d928d49934c984396c4d77 Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <address@hidden>
Date: Tue, 23 Jun 2009 17:28:40 +0200
Subject: [PATCH] Check if LEX is present before use it

 * configure.in: Check if LEX is present.
 * libguile/Makefile.am: Use LEX instead of `flex'.
---
 configure.in         |    7 +++++++
 libguile/Makefile.am |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/configure.in b/configure.in
index 1c4cf5f..35a963d 100644
--- a/configure.in
+++ b/configure.in
@@ -73,6 +73,13 @@ AC_PROG_CC
 gl_EARLY
 AC_PROG_CPP
 AC_PROG_AWK
+AC_PROG_LEX
+
+if test "$LEX" = ":"; then
+  AC_MSG_ERROR([lex not found.])
+fi
+
+AC_SUBST([LEX])
 
 dnl Gnulib.
 gl_INIT
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 8c9c598..53f1c63 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -361,7 +361,7 @@ guile-procedures.txt: guile-procedures.texi
 endif
 
 c-tokenize.c: c-tokenize.lex
-       flex -t $(srcdir)/c-tokenize.lex > $@ || { rm $@; false; }
+       $(LEX) -t $(srcdir)/c-tokenize.lex > $@ || { rm $@; false; }
 
 schemelibdir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)
 schemelib_DATA = guile-procedures.txt
-- 
1.6.3.1





reply via email to

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