Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
e2314d3d
Commit
e2314d3d
authored
Aug 13, 2003
by
simonmar
Browse files
[project @ 2003-08-13 12:34:04 by simonmar]
Detect Alex, and add --use-src-tree-alex option to configure.
parent
f078d9bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
aclocal.m4
View file @
e2314d3d
dnl $Id: aclocal.m4,v 1.12
1
2003/0
7/30 09:21:12 wolfgang
Exp $
dnl $Id: aclocal.m4,v 1.12
2
2003/0
8/13 12:34:04 simonmar
Exp $
dnl
dnl Extra autoconf macros for the Glasgow fptools
dnl
...
...
@@ -264,6 +264,41 @@ dnl through that to find the version number, but I think we'll make
dnl do without it for now.
])
dnl
dnl Check for Alex and version. If we're building GHC, then we need
dnl at least Alex version 2.0. If there's no installed Alex, we look
dnl for a alex source tree and point the build system at that instead.
dnl
AC_DEFUN(FPTOOLS_ALEX,
[
if test -d $srcdir/alex; then
SrcTreeAlexCmd=$hardtop/alex/src/alex-inplace
fi
if test x"$UseSrcTreeAlex" = xYES; then
AlexCmd=$SrcTreeAlexCmd
else
AC_PATH_PROG(AlexCmd,alex,$SrcTreeAlexCmd)
fi
AC_CACHE_CHECK([for version of alex], fptools_cv_alex_version,
changequote(, )dnl
[if test x"$AlexCmd" = x"$SrcTreeAlexCmd"; then
fptools_cv_alex_version=`grep '^ProjectVersion[ ]*=' $srcdir/alex/mk/version.mk | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`;
elif test x"$AlexCmd" != x; then
fptools_cv_alex_version="`$AlexCmd -v |
grep 'Alex Version' | sed -e 's/Alex Version \([^ ]*\).*/\1/g'`" ;
else
fptools_cv_alex_version="";
fi;
changequote([, ])dnl
])
if test -d $srcdir/ghc -a ! -f $srcdir/ghc/compiler/parser/Lexer.hs; then
FPTOOLS_PROG_CHECK_VERSION([$fptools_cv_alex_version],-lt,[2.0],
[AC_MSG_ERROR([Alex version 2.0 or later is required to compile GHC.])])dnl
fi
AlexVersion=$fptools_cv_alex_version;
AC_SUBST(AlexVersion)
])
dnl
dnl What's the best way of doing context diffs?
dnl
...
...
configure.in
View file @
e2314d3d
...
...
@@ -731,7 +731,7 @@ FPTOOLS_GREENCARD(3.00)
AC_ARG_ENABLE(src-tree-happy,
[ --enable-src-tree-happy
Build and use source tree (fptools/happy) version of
h
appy.
Build and use source tree (fptools/happy) version of
H
appy.
],
[UseSrcTreeHappy=YES],
[UseSrcTreeHappy=NO]
...
...
@@ -744,7 +744,7 @@ fi;
AC_ARG_ENABLE(src-tree-haddock,
[ --enable-src-tree-haddock
Build and use source tree (fptools/haddock) version of
h
addock.
Build and use source tree (fptools/haddock) version of
H
addock.
],
[UseSrcTreeHaddock=YES],
[UseSrcTreeHaddock=NO]
...
...
@@ -752,6 +752,19 @@ AC_ARG_ENABLE(src-tree-haddock,
dnl ** check for installed haddock
FPTOOLS_HADDOCK
AC_ARG_ENABLE(src-tree-alex,
[ --enable-src-tree-alex
Build and use source tree (fptools/alex) version of Alex.
],
[UseSrcTreeAlex=YES],
[UseSrcTreeAlex=NO]
)
dnl ** check for installed alex binary + version
dnl (don't do it if we're booting from .hc files though.)
if test "$BootingFromHc" = "NO"; then
FPTOOLS_ALEX
fi;
dnl --------------------------------------------------
dnl ### program checking section ends here ###
dnl --------------------------------------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment