]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added configure test for Altivec.
authorBart Van Assche <bvanassche@acm.org>
Mon, 12 May 2008 18:50:51 +0000 (18:50 +0000)
committerBart Van Assche <bvanassche@acm.org>
Mon, 12 May 2008 18:50:51 +0000 (18:50 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8052

configure.in

index cfc2d7585b354f64028a6875b5b709341cb5957e..8bb4f4658ef4aaf8cd49449c388593afef2e1507 100644 (file)
@@ -729,6 +729,33 @@ CFLAGS=$safe_CFLAGS
 AM_CONDITIONAL([HAVE_OPENMP], [test x$ac_have_openmp = xyes])
 
 
+# does this compiler support -maltivec and does it have the include file
+# <altivec.h> ?
+
+AC_MSG_CHECKING([for Altivec])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-maltivec"
+
+AC_TRY_COMPILE(
+[
+#include <altivec.h>
+], [
+  vector unsigned int v;
+],
+[
+ac_have_altivec=yes
+AC_MSG_RESULT([yes])
+], [
+ac_have_altivec=no
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+AM_CONDITIONAL([HAS_ALTIVEC], [test x$ac_have_altivec = xyes])
+AM_CONDITIONAL([HAVE_ALTIVEC_H], [test x$ac_have_altivec = xyes])
+
+
 # Check for eventfd_t, eventfd() and eventfd_read()
 AC_MSG_CHECKING([for eventfd()])