summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDave Yeo <dave.r.yeo@gmail.com>2016-01-24 22:09:50 -0800
committerErik de Castro Lopo <erikd@mega-nerd.com>2016-02-08 22:12:37 +1100
commit0435a231c8e93692721aa66c263890e275233309 (patch)
tree215a9a316d98e230dc01b2a5be1613f33cebd92b /configure.ac
parentd40a6bc695984ba0d35b795874f387f73cfadada (diff)
downloadflac-0435a231c8e93692721aa66c263890e275233309.tar.gz
Make AVX and AVX2 instructions a configure option
Handy for toolchains or operating systems that don't support AVX or AVX2 like OS/2. Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com> Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d6bb2d04..915869bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -238,6 +238,19 @@ AC_DEFINE(FLAC__USE_ALTIVEC)
AH_TEMPLATE(FLAC__USE_ALTIVEC, [define to enable use of Altivec instructions])
fi
+AC_ARG_ENABLE(avx,
+AC_HELP_STRING([--disable-avx], [Disable AVX, AVX2 optimizations]),
+[case "${enableval}" in
+ yes) use_avx=true ;;
+ no) use_avx=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-avx) ;;
+esac],[use_avx=true])
+AM_CONDITIONAL(FLaC__USE_AVX, test "x$use_avx" = xtrue)
+if test "x$use_avx" = xtrue ; then
+AC_DEFINE(FLAC__USE_AVX)
+AH_TEMPLATE(FLAC__USE_AVX, [define to enable use of AVX instructions])
+fi
+
AC_ARG_ENABLE(thorough-tests,
AC_HELP_STRING([--disable-thorough-tests], [Disable thorough (long) testing, do only basic tests]),
[case "${enableval}" in