diff --git a/configure.ac b/configure.ac index 63ef9a39..c481bb03 100644 --- a/configure.ac +++ b/configure.ac @@ -45,10 +45,12 @@ AC_SYS_LARGEFILE LT_INIT([win32-dll]) +AX_CHECK_COMPILE_FLAG([-maltivec],[flag_altivec="true"]) AX_CHECK_COMPILE_FLAG([-mavx2], [flag_avx2="true"]) AX_CHECK_COMPILE_FLAG([-msse4.1], [flag_sse4_1="true"]) AX_CHECK_COMPILE_FLAG([-msse2], [flag_sse2="true"]) +AM_CONDITIONAL([HAVE_ALTIVEC], [test x"$flag_altivec" = x"true"]) AM_CONDITIONAL([HAVE_AVX2], [test x"$flag_avx2" = x"true"]) AM_CONDITIONAL([HAVE_SSE4_1], [test x"$flag_sse4_1" = x"true"]) AM_CONDITIONAL([HAVE_SSE2], [test x"$flag_sse2" = x"true"]) diff --git a/src/Makefile.am b/src/Makefile.am index 5e884401..55d6d115 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -197,9 +197,13 @@ libsse41_la_SOURCES = \ strategies/sse41/picture-sse41.h if HAVE_PPC + +if HAVE_ALTIVEC libaltivec_la_CFLAGS = -maltivec endif +endif #HAVE_PPC + if HAVE_X86 if HAVE_AVX2