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 #include #include #include 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]) ])