|
|
|
@ -120,74 +120,105 @@ else
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
|
dnl Check for rintf and functions like that
|
|
|
|
|
AC_MSG_CHECKING(for rintf)
|
|
|
|
|
have_rintf=no
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
#include <math.h>
|
|
|
|
|
],[
|
|
|
|
|
int i; float f; i = rintf (f);
|
|
|
|
|
],[
|
|
|
|
|
have_rintf=yes
|
|
|
|
|
])
|
|
|
|
|
AC_MSG_RESULT($have_rintf)
|
|
|
|
|
if test x$have_rintf = xyes; then
|
|
|
|
|
if test x$have_rintf = xno; then
|
|
|
|
|
AC_CHECK_LIB(m, rintf, have_rintf=yes, have_rintf=no , )
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if test x$have_rintf = xyes; then
|
|
|
|
|
AC_DEFINE(HAVE_RINTF, [1], [if rintf is working here])
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
|
dnl Check for rintf and functions like that
|
|
|
|
|
AC_MSG_CHECKING(for rint)
|
|
|
|
|
have_rint=no
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
#include <math.h>
|
|
|
|
|
],[
|
|
|
|
|
int i; double f; i = rint (f);
|
|
|
|
|
],[
|
|
|
|
|
have_rint=yes
|
|
|
|
|
])
|
|
|
|
|
AC_MSG_RESULT($have_rint)
|
|
|
|
|
if test x$have_rint = xyes; then
|
|
|
|
|
if test x$have_rint = xno; then
|
|
|
|
|
AC_CHECK_LIB(m, rint, have_rint=yes, have_rint=no , )
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if test x$have_rint = xyes; then
|
|
|
|
|
AC_DEFINE(HAVE_RINT, [1], [if rint is working here])
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Check for powf and functions like that
|
|
|
|
|
AC_MSG_CHECKING(for powf)
|
|
|
|
|
have_powf=no
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
#include <math.h>
|
|
|
|
|
],[
|
|
|
|
|
float i; float f = 2; float j = 2; i = powf (f,j);
|
|
|
|
|
],[
|
|
|
|
|
have_powf=yes
|
|
|
|
|
])
|
|
|
|
|
AC_MSG_RESULT($have_powf)
|
|
|
|
|
if test x$have_powf = xno; then
|
|
|
|
|
AC_CHECK_LIB(m, powf, have_powf=yes, have_powf=no , )
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
dnl Check for floorf and functions like that
|
|
|
|
|
AC_MSG_CHECKING(for floorf)
|
|
|
|
|
have_floorf=no
|
|
|
|
|
if test x$have_powf = xyes; then
|
|
|
|
|
AC_DEFINE(HAVE_POWF, [1], [if powf is working here])
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
dnl Check for sqrtf and functions like that
|
|
|
|
|
AC_MSG_CHECKING(for sqrtf)
|
|
|
|
|
have_sqrtf=no
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
#include <math.h>
|
|
|
|
|
],[
|
|
|
|
|
int i; float f; i = floorf (f);
|
|
|
|
|
float i; float f = 2; i = sqrtf (f);
|
|
|
|
|
],[
|
|
|
|
|
have_floorf=yes
|
|
|
|
|
have_sqrtf=yes
|
|
|
|
|
])
|
|
|
|
|
AC_MSG_RESULT($have_floorf)
|
|
|
|
|
if test x$have_floorf = xyes; then
|
|
|
|
|
AC_CHECK_LIB(m, floorf, have_floorf=yes, have_floorf=no , )
|
|
|
|
|
if test x$have_floorf = xyes; then
|
|
|
|
|
AC_DEFINE(HAVE_FLOORF, [1], [if floorf is working here])
|
|
|
|
|
AC_MSG_RESULT($have_sqrtf)
|
|
|
|
|
if test x$have_sqrtf = xno; then
|
|
|
|
|
AC_CHECK_LIB(m, sqrtf, have_sqrtf=yes, have_sqrtf=no , )
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if test x$have_sqrtf = xyes; then
|
|
|
|
|
AC_DEFINE(HAVE_SQRTF, [1], [if sqrtf is working here])
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Check for floorf and functions like that
|
|
|
|
|
AC_MSG_CHECKING(for floor)
|
|
|
|
|
have_floor=no
|
|
|
|
|
AC_MSG_CHECKING(for floorf)
|
|
|
|
|
have_floorf=no
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
#include <math.h>
|
|
|
|
|
],[
|
|
|
|
|
int i; double f; i = floor (f);
|
|
|
|
|
int i; float f; i = floorf (f);
|
|
|
|
|
],[
|
|
|
|
|
have_floor=yes
|
|
|
|
|
have_floorf=yes
|
|
|
|
|
])
|
|
|
|
|
AC_MSG_RESULT($have_floor)
|
|
|
|
|
if test x$have_floor = xyes; then
|
|
|
|
|
AC_CHECK_LIB(m, floor, have_floor=yes, have_floor=no , )
|
|
|
|
|
if test x$have_floor = xyes; then
|
|
|
|
|
AC_DEFINE(HAVE_FLOOR, [1], [if floor is working here])
|
|
|
|
|
AC_MSG_RESULT($have_floorf)
|
|
|
|
|
if test x$have_floorf = xno; then
|
|
|
|
|
AC_CHECK_LIB(m, floorf, have_floorf=yes, have_floorf=no , )
|
|
|
|
|
fi
|
|
|
|
|
if test x$have_floorf = xyes; then
|
|
|
|
|
AC_DEFINE(HAVE_FLOORF, [1], [if floorf is working here])
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|