X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=aclocal.m4;h=86ec141f397ca46b52702daa68d029b48ed096d9;hb=a08aa16ae39b5fc2f4541e9fd33009a5288ba0ae;hp=edf8dac930fa14bebba6f9a88aa679b84a48c4ae;hpb=448ee8f6a794d23fa20fcdb47843d985a58ee871;p=ghc-hetmet.git diff --git a/aclocal.m4 b/aclocal.m4 index edf8dac9..86ec141 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.112 2003/01/26 12:56:00 panne Exp $ +dnl $Id: aclocal.m4,v 1.116 2003/05/17 14:49:45 reid Exp $ dnl dnl Extra autoconf macros for the Glasgow fptools dnl @@ -188,6 +188,28 @@ fi dnl +dnl Check for Greencard and version. +dnl +AC_DEFUN(FPTOOLS_GREENCARD, +[ +AC_PATH_PROG(GreencardCmd,green-card) +AC_CACHE_CHECK([for version of green-card], fptools_cv_greencard_version, +changequote(, )dnl +[if test x"$GreencardCmd" != x; then + fptools_cv_greencard_version="`$GreencardCmd --version | + grep 'version' | sed -e 's/green-card. version \([^ ]*\).*/\1/g'`" +else + fptools_cv_greencard_version="" +fi +changequote([, ])dnl +]) +FPTOOLS_PROG_CHECK_VERSION([$fptools_cv_greencard_version],-lt,$1, + [AC_MSG_ERROR([green-card version $1 or later is required (found '$fptools_cv_greencard_version')])])dnl +GreencardVersion=$fptools_cv_greencard_version +AC_SUBST(GreencardVersion) +]) + +dnl dnl Check for Happy and version. If we're building GHC, then we need dnl at least Happy version 1.13. If there's no installed Happy, we look dnl for a happy source tree and point the build system at that instead. @@ -337,7 +359,13 @@ if test -z "$ArCmdRaw"; then echo "You don't seem to have ar in your PATH...I have no idea how to make a library" exit 1; fi -if $ArCmdRaw clqsZ conftest.a >/dev/null 2>/dev/null; then +dnl GNU ar needs special treatment: it appears to have problems with +dnl object files with the same name if you use the 's' modifier, but +dnl simple 'ar q' works fine, and doesn't need a separate ranlib. +if $ArCmdRaw --version | grep 'GNU' >/dev/null 2>/dev/null; then + ArCmdArgs='q' + NeedRanLib='' +elif $ArCmdRaw clqsZ conftest.a >/dev/null 2>/dev/null; then ArCmdArgs="clqsZ" NeedRanLib='' elif $ArCmdRaw clqs conftest.a >/dev/null 2>/dev/null; then @@ -663,6 +691,10 @@ AC_CACHE_VAL(AC_CV_NAME, # include #endif +#ifdef HAVE_SYS_RESOURCE_H +# include +#endif + typedef $1 testing; main() { @@ -1081,8 +1113,9 @@ AC_DEFUN(FPTOOLS_HAVE_OPENGL, dnl Check for Mesa first if we were asked to. AC_ARG_ENABLE(Mesa, - AC_HELP_STRING([--enable-Mesa], - [Prefer Mesa over a vendor's native OpenGL library (default=no)]), +[ --enable-mesa + Prefer Mesa over a vendor's native OpenGL library (default=no) +], use_Mesa=$enableval, use_Mesa=no) @@ -1165,7 +1198,7 @@ dnl and GL_X_LIBS. fi fi fi - AC_MSG_NOTICE([It looks like GL version ${fptools_gl_version}]) + echo "It looks like GL version ${fptools_gl_version}" dnl TODO: Cache the results of the tests for the imaging subset. @@ -1228,7 +1261,7 @@ dnl and GL_X_LIBS. fi fi fi - AC_MSG_NOTICE([It looks like GLU version ${fptools_glu_version}]) + echo "It looks like GLU version ${fptools_glu_version}" FPTOOLS_SEARCH_LIBS([#include ], glXWaitX, $GLX_search_list, have_GLX=yes, have_GLX=no) FPTOOLS_SEARCH_LIBS([#include ], glutMainLoop, glut32 glut, have_glut=yes, have_glut=no) @@ -1275,7 +1308,7 @@ fi dnl dnl Check to see whether CC (gcc) supports a particular option. -dnl +dnl AC_DEFUN(FPTOOLS_CC_FLAG, [ AC_CACHE_CHECK([whether $CC accepts $1], [ac_cv_cc_$2],