[project @ 2003-08-18 10:57:54 by panne]
[ghc-hetmet.git] / aclocal.m4
index 66698d1..c99598e 100644 (file)
@@ -1,5 +1,3 @@
-dnl $Id: aclocal.m4,v 1.122 2003/08/13 12:34:04 simonmar Exp $
-dnl 
 dnl Extra autoconf macros for the Glasgow fptools
 dnl
 dnl To be a good autoconf citizen, names of local macros have
@@ -106,6 +104,8 @@ dnl a leading underscore sometimes (eg. FreeBSD).  We therefore have
 dnl to work around this by checking for *no* leading underscore first.
 dnl Sigh.  --SDM
 dnl
+dnl Similarly on OpenBSD, but this test doesn't help. -- dons
+dnl
 AC_DEFUN(FPTOOLS_UNDERSCORE,
 [AC_CHECK_LIB(elf, nlist, LIBS="-lelf $LIBS")dnl
 AC_CACHE_CHECK([leading underscore in symbol names], fptools_cv_lead_uscore,
@@ -119,6 +119,11 @@ dnl the underscoredness of that "platform"
 changequote(<<, >>)dnl
 <<
 case $HostPlatform in
+*openbsd*) # x86 openbsd is ELF from 3.4 >, meaning no leading uscore
+    case $build in
+        i386-*2\.[[0-9]] | i386-*3\.[[0-3]] ) fptools_cv_lead_uscore='yes' ;;
+        *)      fptools_cv_lead_uscore='no' ;;
+    esac ;;
 alpha-dec-osf*) fptools_cv_lead_uscore='no';;
 *cygwin32) fptools_cv_lead_uscore='yes';;
 *mingw32) fptools_cv_lead_uscore='yes';;
@@ -285,16 +290,16 @@ changequote(, )dnl
    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'`" ;
+                         grep 'Alex [Vv]ersion' | sed -e 's/Alex [Vv]ersion \([0-9\.]*\).*/\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
+dnl if test -d $srcdir/ghc -a ! -f $srcdir/ghc/compiler/parser/Lexer.hs; then
+dnl   FPTOOLS_PROG_CHECK_VERSION([$fptools_cv_alex_version],-lt,[2.0],
+dnl   [AC_MSG_ERROR([Alex version 2.0 or later is required to compile GHC.])])dnl
+dnl fi
 AlexVersion=$fptools_cv_alex_version;
 AC_SUBST(AlexVersion)
 ])