s48_native_code.m4 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ### s48_native_code.m4 --- S48_NATIVE_CODE macro -*- Autoconf -*-
  2. # serial 1
  3. dnl
  4. dnl
  5. dnl
  6. AC_DEFUN([S48_NATIVE_CODE], [dnl
  7. dnl assumes that S48_PICK_GC already ran
  8. AC_MSG_CHECKING([native-code compiler support])
  9. AC_ARG_ENABLE([native-code],
  10. [AC_HELP_STRING([--enable-native code],
  11. [Include support for native-code compiler])],
  12. [if test "$enable_native_code" != no; then
  13. case $GC_OBJS in
  14. '${GC_TWOSPACE_OBJS}' )
  15. case `uname -m` in
  16. i?86 )
  17. AC_MSG_RESULT([x86])
  18. ASM_OBJECTS='${X86_ASM_OBJECTS}'
  19. AC_CHECK_FUNCS(sigaltstack, HAVE_SIGALTSTACK=1, HAVE_SIGALTSTACK=0)
  20. if test "$HAVE_SIGALTSTACK" = 0; then
  21. AC_MSG_ERROR([Your system lacks sigaltstack])
  22. fi
  23. AC_MSG_CHECKING([assembler style])
  24. case `uname` in
  25. Darwin )
  26. AC_MSG_RESULT([Darwin])
  27. ASM_STYLE='darwin' ;;
  28. * )
  29. AC_MSG_RESULT([GNU(hopefully)])
  30. ASM_STYLE='gnu' ;;
  31. esac ;;
  32. * )
  33. AC_MSG_RESULT([no])
  34. ASM_OBJECTS='${FAKE_ASM_OBJECTS}'
  35. esac;;
  36. * )
  37. AC_MSG_RESULT([no (picked GC not compatible)])
  38. ASM_OBJECTS='${FAKE_ASM_OBJECTS}'
  39. esac
  40. else
  41. AC_MSG_RESULT([no])
  42. ASM_OBJECTS='${FAKE_ASM_OBJECTS}'
  43. fi],
  44. [dnl
  45. AC_MSG_RESULT([no])
  46. ASM_OBJECTS='${FAKE_ASM_OBJECTS}'
  47. ]
  48. )
  49. AC_SUBST(ASM_OBJECTS)
  50. AC_SUBST(ASM_STYLE)
  51. ])dnl
  52. ### s48_native_code.m4 ends here