summaryrefslogtreecommitdiff
path: root/m4/cosf.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/cosf.m4')
-rw-r--r--m4/cosf.m46
1 files changed, 5 insertions, 1 deletions
diff --git a/m4/cosf.m4 b/m4/cosf.m4
index 8315aa0110..757d9b7238 100644
--- a/m4/cosf.m4
+++ b/m4/cosf.m4
@@ -1,4 +1,4 @@
-# cosf.m4 serial 2
+# cosf.m4 serial 3
dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -22,6 +22,10 @@ AC_DEFUN([gl_FUNC_COSF],
COSF_LIBM="$COS_LIBM"
else
HAVE_COSF=0
+ dnl If the function is declared but does not appear to exist, it may be
+ dnl defined as an inline function. In order to avoid a conflict, we have
+ dnl to define rpl_cosf, not cosf.
+ AC_CHECK_DECLS([cosf], [REPLACE_COSF=1], , [[#include <math.h>]])
COSF_LIBM="$COS_LIBM"
fi
AC_SUBST([COSF_LIBM])