
Module: ppl/ppl Branch: master Commit: 639591e6c8d1e4c065901c6e787c1da8580eb158 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=639591e6c8d1e...
Author: Roberto Bagnara bagnara@cs.unipr.it Date: Thu Mar 26 07:33:27 2009 +0100
We can infer the possibility to control the CPU even when cross-compiling. This happens (at least) on i386 and sparc (provided we have <ieeefp.h>).
---
m4/ac_check_fpu_control.m4 | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/m4/ac_check_fpu_control.m4 b/m4/ac_check_fpu_control.m4 index ee28d20..5ccbb68 100644 --- a/m4/ac_check_fpu_control.m4 +++ b/m4/ac_check_fpu_control.m4 @@ -115,8 +115,25 @@ main() { ac_cv_can_control_fpu=1, AC_MSG_RESULT(no) ac_cv_can_control_fpu=0, - AC_MSG_RESULT([assuming not]) - ac_cv_can_control_fpu=0 + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#if i386 || (sparc && defined(HAVE_IEEEFP_H)) + +int +main() { + return 0; +} + +#else + + choke me + +#endif + ]])], + AC_MSG_RESULT(yes) + ac_cv_can_control_fpu=1, + AC_MSG_RESULT(no) + ac_cv_can_control_fpu=0 + ) ) AM_CONDITIONAL(CAN_CONTROL_FPU, test $ac_cv_can_control_fpu = 1) AC_DEFINE_UNQUOTED(PPL_CAN_CONTROL_FPU, $ac_cv_can_control_fpu,