[project @ 2001-11-19 18:53:50 by sof]
[ghc-hetmet.git] / aclocal.m4
index f8435bf..09462f0 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: aclocal.m4,v 1.85 2001/10/13 20:26:13 sof Exp $
+dnl $Id: aclocal.m4,v 1.87 2001/11/07 20:13:26 sof Exp $
 dnl 
 dnl Extra autoconf macros for the Glasgow fptools
 dnl
@@ -216,6 +216,11 @@ if test -d $srcdir/ghc; then
 fi
 HappyVersion=$fptools_cv_happy_version;
 AC_SUBST(HappyVersion)
+
+# 1.9 and later is required, assume that we can use
+# the "-agc" options.
+HappyOpts="-agc"
+AC_SUBST(HappyOpts)
 ])
 
 dnl
@@ -245,6 +250,29 @@ AC_SUBST(ContextDiffCmd)
 ])
 
 dnl
+dnl Check whether ld supports -x
+dnl
+AC_DEFUN(FPTOOLS_LD_X,
+[AC_CACHE_CHECK([whether ld understands -x], fptools_cv_ld_x,
+[
+echo 'foo() {}' > conftest.c
+${CC-cc} -c conftest.c
+if ${LdCmd} -r -x -o foo.o conftest.o; then
+   fptools_cv_ld_x=yes
+else
+   fptools_cv_ld_x=no
+fi
+rm -rf conftest.c conftest.o foo.o
+])
+if test "$fptools_cv_ld_x" = yes; then
+       LdXFlag=-x
+else
+       LdXFlag=
+fi
+AC_SUBST(LdXFlag)
+])
+
+dnl
 dnl Finding the Right Yacc
 dnl
 AC_DEFUN(FPTOOLS_PROG_YACCY,