diff options
author | panne <unknown> | 2004-01-06 17:20:52 +0000 |
---|---|---|
committer | panne <unknown> | 2004-01-06 17:20:52 +0000 |
commit | 37fe79750c2a2f72567e0655b697eaab3ad720e8 (patch) | |
tree | 9e3a1bfed5f3366c33255495a1733e52e8a9eb8a /aclocal.m4 | |
parent | 7769850b96e483716622524adbf8ba9e0497c0b8 (diff) | |
download | haskell-37fe79750c2a2f72567e0655b697eaab3ad720e8.tar.gz |
[project @ 2004-01-06 17:20:51 by panne]
Use new FP_CHECK_FUNC macro instead of the slightly obscure FPTOOLS_TRY_LINK_NOWARN
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index ab6ec27b5e..c4b1eb83c3 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -758,6 +758,25 @@ undefine([AC_CV_NAME])dnl undefine([AC_CV_NAME_supported])dnl ]) + +# FP_CHECK_FUNC(FUNCTION, PROLOGUE, BODY, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# --------------------------------------------------------------------------------- +# A variant of AC_CHECK_FUNCS, limited to a single FUNCTION, but with the +# additional flexibility of specifying the PROLOGUE and BODY. +AC_DEFUN([FP_CHECK_FUNC], +[AS_VAR_PUSHDEF([fp_func], [fp_cv_func_$1])dnl +AC_CACHE_CHECK([for $1], fp_func, +[AC_LINK_IFELSE([AC_LANG_PROGRAM([$2], [$3])], + [AS_VAR_SET(fp_func, yes)], + [AS_VAR_SET(fp_func, no)])]) +AS_IF([test AS_VAR_GET(fp_func) = yes], + [AC_DEFINE(AS_TR_CPP(HAVE_$1), [1], + [Define to 1 if you have the `]$1[' function.]) $4], + [$5])dnl +AS_VAR_POPDEF([fp_func])dnl +])# FP_CHECK_FUNC + + dnl Based on AC_TRY_LINK - run iftrue if links cleanly with no warning dnl FPTOOLS_TRY_LINK_NOWARN(flags,main?,iftrue,iffalse) |