mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
check: Make the level unit test succeed on Solaris 10
Add a configure check for functional isinf() and fpclass(), and use fpclass() where possible when isinf() is not available.
This commit is contained in:
parent
c40cb18762
commit
993a29a390
2 changed files with 14 additions and 2 deletions
10
configure.ac
10
configure.ac
|
@ -175,9 +175,17 @@ dnl *** checks for library functions ***
|
||||||
|
|
||||||
LIBS_SAVE=$LIBS
|
LIBS_SAVE=$LIBS
|
||||||
LIBS="$LIBS $LIBM"
|
LIBS="$LIBS $LIBM"
|
||||||
AC_CHECK_FUNCS(rint sinh cosh asinh)
|
AC_CHECK_FUNCS(rint sinh cosh asinh fpclass)
|
||||||
LIBS=$LIBS_SAVE
|
LIBS=$LIBS_SAVE
|
||||||
|
|
||||||
|
dnl Check whether isinf() is defined by math.h
|
||||||
|
AC_CACHE_CHECK([for isinf], ac_cv_have_isinf,
|
||||||
|
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.])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Check for mmap (needed by electricfence plugin)
|
dnl Check for mmap (needed by electricfence plugin)
|
||||||
AC_FUNC_MMAP
|
AC_FUNC_MMAP
|
||||||
AM_CONDITIONAL(GST_HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" == "xyes")
|
AM_CONDITIONAL(GST_HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" == "xyes")
|
||||||
|
|
|
@ -256,7 +256,11 @@ GST_START_TEST (test_int16_panned)
|
||||||
value = gst_value_list_get_value (list, 0);
|
value = gst_value_list_get_value (list, 0);
|
||||||
dB = g_value_get_double (value);
|
dB = g_value_get_double (value);
|
||||||
GST_DEBUG ("%s[0] is %lf", fields[j], dB);
|
GST_DEBUG ("%s[0] is %lf", fields[j], dB);
|
||||||
fail_if (!isinf (dB));
|
#ifdef HAVE_ISINF
|
||||||
|
fail_unless (isinf (dB));
|
||||||
|
#elif HAVE_FPCLASS
|
||||||
|
fail_unless (fpclass (dB) == FP_NINF);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
/* block wave of half amplitude has -5.94 dB for rms, peak and decay */
|
/* block wave of half amplitude has -5.94 dB for rms, peak and decay */
|
||||||
for (j = 0; j < 3; ++j) {
|
for (j = 0; j < 3; ++j) {
|
||||||
|
|
Loading…
Reference in a new issue