unwind_ipinfo.m4 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. dnl
  2. dnl Check whether _Unwind_GetIPInfo is available without doing a link
  3. dnl test so we can use this with libstdc++-v3 and libjava. Need to
  4. dnl use $target to set defaults because automatic checking is not possible
  5. dnl without a link test (and maybe even with a link test).
  6. dnl
  7. AC_DEFUN([GCC_CHECK_UNWIND_GETIPINFO], [
  8. AC_ARG_WITH(system-libunwind,
  9. [ --with-system-libunwind use installed libunwind])
  10. # If system-libunwind was not specifically set, pick a default setting.
  11. if test x$with_system_libunwind = x; then
  12. case ${target} in
  13. ia64-*-hpux*) with_system_libunwind=yes ;;
  14. *) with_system_libunwind=no ;;
  15. esac
  16. fi
  17. # Based on system-libunwind and target, do we have ipinfo?
  18. if test x$with_system_libunwind = xyes; then
  19. case ${target} in
  20. ia64-*-*) have_unwind_getipinfo=no ;;
  21. *) have_unwind_getipinfo=yes ;;
  22. esac
  23. else
  24. # Darwin before version 9 does not have _Unwind_GetIPInfo.
  25. changequote(,)
  26. case ${target} in
  27. *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;;
  28. *) have_unwind_getipinfo=yes ;;
  29. esac
  30. changequote([,])
  31. fi
  32. if test x$have_unwind_getipinfo = xyes; then
  33. AC_DEFINE(HAVE_GETIPINFO, 1, [Define if _Unwind_GetIPInfo is available.])
  34. fi
  35. ])