2
0

ax_fixed_point_machine.m4 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # AX_FIXED_POINT_MACHINE(MACHINE, [ACTION-IF-FIXED-POINT], [ACTION-IF-NOT-FIXED-POINT])
  2. # -------------------------------------------------------------------------------------
  3. #
  4. # Check if a specified machine type is a fixed point only machine. That is, if it lacks
  5. # fast floating point support.
  6. #
  7. # This is a simple lookup amongst machines known to the current autotools. So far we deal
  8. # with the embedded ARM, Blackfin, MIPS, TI DSP and XScale processors as things which lack
  9. # fast hardware floating point.
  10. #
  11. # Other candidates would be the small embedded Power PCs.
  12. #
  13. AC_DEFUN([AX_FIXED_POINT_MACHINE],
  14. [AS_VAR_PUSHDEF([ac_FixedPoint], [ac_cv_fixed_point_machine_$1])dnl
  15. AC_CACHE_CHECK([if $1 is fixed point only], ac_FixedPoint,
  16. [case $1 in
  17. arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] \
  18. | bfin \
  19. | mips | mipsbe | mipseb | mipsel | mipsle \
  20. | tic54x | c54x* | tic55x | c55x* | tic6x | c6x* \
  21. | xscale | xscalee[bl] \
  22. | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
  23. | bfin-* \
  24. | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
  25. | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
  26. | xscale-* | xscalee[bl]-* )
  27. AS_VAR_SET(ac_FixedPoint, yes)
  28. ;;
  29. *)
  30. AS_VAR_SET(ac_FixedPoint, no)
  31. ;;
  32. esac])
  33. AS_IF([test AS_VAR_GET(ac_FixedPoint) = yes], [$2], [$3])[]dnl
  34. AS_VAR_POPDEF([ac_FixedPoint])dnl
  35. ])# AX_FIXED_POINT_MACHINE