[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 4/7] ppc32: ppc64: test altivec support by runn
From: |
Cody P Schafer |
Subject: |
[Libunwind-devel] [PATCH 4/7] ppc32: ppc64: test altivec support by running the compiler. |
Date: |
Tue, 4 Sep 2012 12:46:38 -0700 |
---
configure.in | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/configure.in b/configure.in
index 917a2c9..e655322 100644
--- a/configure.in
+++ b/configure.in
@@ -73,17 +73,14 @@ AC_CHECK_FUNCS(dl_iterate_phdr dl_phdr_removals_counter
dlmodinfo getunwind \
ttrace mincore)
-is_gcc_altivec() {
- if test `echo $CFLAGS | grep "\-maltivec" -c` -eq 1 ; then echo has_altivec;
- else
- if test `echo $CC | grep "\-maltivec" -c` -eq 1 ; then echo has_altivec;
else echo no_altivec; fi;
- fi;
-}
-
AC_MSG_CHECKING([if building with AltiVec])
-use_altivec=`is_gcc_altivec`
-AM_CONDITIONAL(USE_ALTIVEC, test x$use_altivec = xhas_altivec)
-if test x$use_altivec = xhas_altivec; then
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#ifndef __ALTIVEC__
+# error choke
+#endif
+]])], [use_altivec=true],[use_altivec=false])
+AM_CONDITIONAL(USE_ALTIVEC, $use_altivec)
+if $use_altivec; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
--
1.7.11.3
- [Libunwind-devel] [PATCH 0/7] Fixup the PowerPC (64 & 32 bit) builds., Cody P Schafer, 2012/09/04
- [Libunwind-devel] [PATCH 2/7] ppc32: remove unused dmy_vrregset, Cody P Schafer, 2012/09/04
- [Libunwind-devel] [PATCH 3/7] ppc32: add used attribute to dmy_ctxt, Cody P Schafer, 2012/09/04
- [Libunwind-devel] [PATCH 4/7] ppc32: ppc64: test altivec support by running the compiler.,
Cody P Schafer <=
- [Libunwind-devel] [PATCH 5/7] build: make libunwind-coredump build optional, Cody P Schafer, 2012/09/04
- [Libunwind-devel] [PATCH 1/7] ppc32: ppc64: use AC_COMPILE_IFELSE to test __powerpc64__ macro for ppc64, Cody P Schafer, 2012/09/04
- [Libunwind-devel] [PATCH 7/7] ppc64: remove compile warnings from wchar test., Cody P Schafer, 2012/09/04