configure: Fix the isinf() detection. Fixes compilation on Solaris.
Francois Gouget
fgouget at codeweavers.com
Thu Jun 26 08:59:05 CDT 2008
---
The autoconf check for isinf() was not working because:
(from http://bugs.mysql.com/bug.php?id=14862)
Gcc-4.0.0 or later eliminates calls to pure functions whose return
value is not used.[1] So compilation of the above code succeeds and
the HAVE_ISINF macro is defined even if the system does not have
isinf().
So to really check that isinf() is present we must make some use of its
return value.
configure | 2 +-
configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 5e5b8d0..9e8c759 100755
--- a/configure
+++ b/configure
@@ -21426,7 +21426,7 @@ cat >>conftest.$ac_ext <<_ACEOF
int
main ()
{
-float f = 0.0; isinf(f)
+float f = 0.0; int i=isinf(f)
;
return 0;
}
diff --git a/configure.ac b/configure.ac
index 4e9e381..11809e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1595,7 +1595,7 @@ fi
dnl Check for isinf
AC_CACHE_CHECK([for isinf], ac_cv_have_isinf,
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; isinf(f)]])],[ac_cv_have_isinf="yes"],[ac_cv_have_isinf="no"]))
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; int i=isinf(f)]])],[ac_cv_have_isinf="yes"],[ac_cv_have_isinf="no"]))
if test "$ac_cv_have_isinf" = "yes"
then
AC_DEFINE(HAVE_ISINF, 1, [Define to 1 if you have the `isinf' function.])
--
1.5.5.3
More information about the wine-patches
mailing list