unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* patch to check for GNU flex
@ 2010-11-19 17:35 Ramakrishnan Muthukrishnan
  2010-11-19 22:39 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Ramakrishnan Muthukrishnan @ 2010-11-19 17:35 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 181 bytes --]

Hi,

configure currently is not checking for the presence of flex, but it
is being used inside libguile/Makefile. The attached patch fixes this.

thanks
-- 
  Ramakrishnan

[-- Attachment #2: 0001-check-for-flex-in-configure.ac.patch --]
[-- Type: text/x-patch, Size: 1435 bytes --]

From 3c4b6f8165e785f602e576a51f645f463f01c836 Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <vu3rdd@gmail.com>
Date: Fri, 19 Nov 2010 22:48:13 +0530
Subject: [PATCH] check for `flex' in configure.ac

* configure.ac: check for the presence of `GNU flex' and flag an error
  if it is not found.
* libguile/Makefile.am: use the LEX variable set by configure to invoke
  `GNU flex'.
---
 configure.ac         |    6 ++++++
 libguile/Makefile.am |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3446992..a684fb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,12 @@ if test "x$HAVE_LIBLTDL" != "xyes"; then
   AC_MSG_ERROR([GNU libltdl (Libtool) not found, see README.])
 fi
 
+AC_PROG_LEX
+if test "x$LEX" != xflex; then
+  AC_MSG_ERROR([GNU flex not found.])
+fi
+
+
 AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
 AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
 
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 55a9764..41bc090 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -695,7 +695,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.7.2.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: patch to check for GNU flex
  2010-11-19 17:35 patch to check for GNU flex Ramakrishnan Muthukrishnan
@ 2010-11-19 22:39 ` Ludovic Courtès
  2010-11-19 22:48   ` Ramakrishnan Muthukrishnan
  2010-11-20 22:23   ` Andy Wingo
  0 siblings, 2 replies; 4+ messages in thread
From: Ludovic Courtès @ 2010-11-19 22:39 UTC (permalink / raw)
  To: guile-devel

Hi!

Flex is only needed when building from Git, not when building from a
tarball, which is why ‘configure’ doesn’t check for it.  (And Flex is
not GNU, BTW.  ;-))

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: patch to check for GNU flex
  2010-11-19 22:39 ` Ludovic Courtès
@ 2010-11-19 22:48   ` Ramakrishnan Muthukrishnan
  2010-11-20 22:23   ` Andy Wingo
  1 sibling, 0 replies; 4+ messages in thread
From: Ramakrishnan Muthukrishnan @ 2010-11-19 22:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

On Sat, Nov 20, 2010 at 4:09 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> Hi!
>
> Flex is only needed when building from Git, not when building from a
> tarball, which is why ‘configure’ doesn’t check for it.  (And Flex is

Oh.. ok. Didn't know that.

> not GNU, BTW.  ;-))

Didn't know that too! Thanks. :-)

-- 
  Ramakrishnan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: patch to check for GNU flex
  2010-11-19 22:39 ` Ludovic Courtès
  2010-11-19 22:48   ` Ramakrishnan Muthukrishnan
@ 2010-11-20 22:23   ` Andy Wingo
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2010-11-20 22:23 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

Hi,

On Fri 19 Nov 2010 23:39, ludo@gnu.org (Ludovic Courtès) writes:

> Flex is only needed when building from Git, not when building from a
> tarball, which is why ‘configure’ doesn’t check for it.

It's a common question, though. I have added a flex --version call to
autogen.sh for this reason, for people that use autogen.sh :)

Hope that helps those people,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-20 22:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19 17:35 patch to check for GNU flex Ramakrishnan Muthukrishnan
2010-11-19 22:39 ` Ludovic Courtès
2010-11-19 22:48   ` Ramakrishnan Muthukrishnan
2010-11-20 22:23   ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).