1From cbcff58ed670c8edc0be1004384cbe0fd07d8d26 Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Wed, 5 Jul 2017 18:49:21 -0700 4Subject: [PATCH 1/2] check for available arm optimizations 5 6Taken From 7http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/65_arm-test-with-compiler.patch/ 8 9Upstream-Status: Pending 10 11Signed-off-by: Khem Raj <raj.khem@gmail.com> 12--- 13 configure.ac | 12 ++++++++---- 14 1 file changed, 8 insertions(+), 4 deletions(-) 15 16diff --git a/configure.ac b/configure.ac 17index acdcb1e..2c0a721 100644 18--- a/configure.ac 19+++ b/configure.ac 20@@ -59,7 +59,7 @@ elif test x"$GCC" = x"yes"; then 21 AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]) 22 23 dnl arch-specific flags 24- arm_conditional=false 25+ build_arm_opt=false 26 case "$host" in 27 i?86-* | k?-* | x86_64-* | amd64-*) 28 AC_DEFINE([ARCH_X86],,[x86 architecture]) 29@@ -102,8 +102,12 @@ elif test x"$GCC" = x"yes"; then 30 alpha*) 31 AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);; 32 arm*) 33- arm_conditional=: 34- AC_DEFINE([ARCH_ARM],,[ARM architecture]);; 35+ AC_LANG(C) 36+ AC_COMPILE_IFELSE( 37+ [AC_LANG_SOURCE([[ 38+ void foo(void) { __asm__ volatile("pld [r1]"); }]])], 39+ build_arm_opt=true; AC_DEFINE([ARCH_ARM],,[ARM architecture]), 40+ build_arm_opt=false);; 41 esac 42 elif test x"$CC" = x"tendracc"; then 43 dnl TenDRA portability checking compiler 44@@ -123,7 +127,7 @@ else 45 esac 46 fi 47 48-AM_CONDITIONAL(ARCH_ARM, ${arm_conditional}) 49+AM_CONDITIONAL(ARCH_ARM, test x$build_arm_opt = xtrue) 50 51 dnl Checks for libtool - this must be done after we set cflags 52 AC_LIBTOOL_WIN32_DLL 53-- 542.13.2 55 56