1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
AC_CHECK_HEADERS(ieeefp.h)
AC_CHECK_FUNCS(fabsl)
AC_DEFUN([KDE_C_LONG_DOUBLE],
[
AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
[
AC_TRY_RUN(
[
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main() {
/* The Stardent Vistra knows sizeof(long double), but does not support it. */
long double foo = 1.0;
char buffer[10];
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
int result = (sizeof(long double) < sizeof(double));
/* the following is needed for a broken printf in glibc2 */
if (!result) {
foo = foo * 3;
sprintf(buffer,"%0.0Lf",foo);
result = strcmp(buffer, "3");
/* and now something mean ;-) */
foo = powl(fabsl(foo), 1);
}
exit(result); }
],
ac_cv_c_long_double=yes, ac_cv_c_long_double=no,
ac_cv_c_long_double=no
)
])
if test $ac_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have support for long double in printf])
fi
])
KDE_C_LONG_DOUBLE
AC_LANG_C
KDE_CHECK_LIB(m, isinf, [
AC_DEFINE_UNQUOTED(HAVE_FUNC_ISINF, 1, [Define if you have isinf])
])
|