summaryrefslogtreecommitdiff
path: root/libitm/acinclude.m4
diff options
context:
space:
mode:
Diffstat (limited to 'libitm/acinclude.m4')
-rw-r--r--libitm/acinclude.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/libitm/acinclude.m4 b/libitm/acinclude.m4
index fe32fe3e4a0..eacf8d45383 100644
--- a/libitm/acinclude.m4
+++ b/libitm/acinclude.m4
@@ -123,6 +123,20 @@ i[[34567]]86 | x86_64)
;;
esac])
+dnl Check if as supports HTM instructions.
+AC_DEFUN([LIBITM_CHECK_AS_HTM], [
+case "${target_cpu}" in
+powerpc*)
+ AC_CACHE_CHECK([if the assembler supports HTM], libitm_cv_as_htm, [
+ AC_TRY_COMPILE([], [asm("tbegin. 0; tend. 0");],
+ [libitm_cv_as_htm=yes], [libitm_cv_as_htm=no])
+ ])
+ if test x$libitm_cv_as_htm = xyes; then
+ AC_DEFINE(HAVE_AS_HTM, 1, [Define to 1 if the assembler supports HTM.])
+ fi
+ ;;
+esac])
+
sinclude(../libtool.m4)
dnl The lines below arrange for aclocal not to bring an installed
dnl libtool.m4 into aclocal.m4, while still arranging for automake to