mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-22 15:47:37 +01:00
ppc32: ppc64: test altivec support by running the compiler.
This commit is contained in:
parent
fa56db394d
commit
92af07ee19
1 changed files with 7 additions and 14 deletions
21
configure.in
21
configure.in
|
@ -71,21 +71,14 @@ dnl Checks for library functions.
|
||||||
AC_CHECK_FUNCS(dl_iterate_phdr dl_phdr_removals_counter dlmodinfo getunwind \
|
AC_CHECK_FUNCS(dl_iterate_phdr dl_phdr_removals_counter dlmodinfo getunwind \
|
||||||
ttrace mincore)
|
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])
|
AC_MSG_CHECKING([if building with AltiVec])
|
||||||
use_altivec=`is_gcc_altivec`
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
AM_CONDITIONAL(USE_ALTIVEC, test x$use_altivec = xhas_altivec)
|
#ifndef __ALTIVEC__
|
||||||
if test x$use_altivec = xhas_altivec; then
|
# error choke
|
||||||
AC_MSG_RESULT([yes])
|
#endif
|
||||||
else
|
]])], [use_altivec=yes],[use_altivec=no])
|
||||||
AC_MSG_RESULT([no])
|
AM_CONDITIONAL(USE_ALTIVEC, [test x$use_altivec = xyes])
|
||||||
fi
|
AC_MSG_RESULT([$use_altivec])
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
#ifndef __powerpc64__
|
#ifndef __powerpc64__
|
||||||
|
|
Loading…
Reference in a new issue