diff --git a/configure b/configure
index b8895b631f9ed846631d1cb4b8960ffee643e43f..cbb243cd2fddd5fcb083c417d50da5449217da6d 100755
--- a/configure
+++ b/configure
@@ -1555,6 +1555,8 @@ armvfp_deps="arm"
 neon_deps="arm"
 vfpv3_deps="armvfp"
 
+map 'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM
+
 mipsfpu_deps="mips"
 mips32r2_deps="mips"
 mipsdspr1_deps="mips"
diff --git a/libavcodec/arm/aac.h b/libavcodec/arm/aac.h
index bd4d293f029b2ac5aef1af194292b7ee34e479a8..cafa881fc7d244ec8e69a28fa445f9ee653f49f7 100644
--- a/libavcodec/arm/aac.h
+++ b/libavcodec/arm/aac.h
@@ -23,7 +23,7 @@
 
 #include "config.h"
 
-#if HAVE_NEON && HAVE_INLINE_ASM
+#if HAVE_NEON_INLINE
 
 #define VMUL2 VMUL2
 static inline float *VMUL2(float *dst, const float *v, unsigned idx,
@@ -138,6 +138,6 @@ static inline float *VMUL4S(float *dst, const float *v, unsigned idx,
     return dst;
 }
 
-#endif /* HAVE_NEON && HAVE_INLINE_ASM */
+#endif /* HAVE_NEON_INLINE */
 
 #endif /* AVCODEC_ARM_AAC_H */
diff --git a/libavcodec/arm/dca.h b/libavcodec/arm/dca.h
index 05be7892dc3f1d2d5bc5ffcd0d2a2d71f5dd362e..3b341cf3da506970015487330d75904db2ec0f81 100644
--- a/libavcodec/arm/dca.h
+++ b/libavcodec/arm/dca.h
@@ -25,7 +25,7 @@
 #include "config.h"
 #include "libavutil/intmath.h"
 
-#if HAVE_ARMV6 && HAVE_INLINE_ASM && AV_GCC_VERSION_AT_LEAST(4,4) && !CONFIG_THUMB
+#if HAVE_ARMV6_INLINE && AV_GCC_VERSION_AT_LEAST(4,4) && !CONFIG_THUMB
 
 #define decode_blockcodes decode_blockcodes
 static inline int decode_blockcodes(int code1, int code2, int levels,
@@ -79,7 +79,7 @@ static inline int decode_blockcodes(int code1, int code2, int levels,
 
 #endif
 
-#if HAVE_NEON && HAVE_INLINE_ASM && HAVE_ASM_MOD_Y
+#if HAVE_NEON_INLINE && HAVE_ASM_MOD_Y
 
 #define int8x8_fmul_int32 int8x8_fmul_int32
 static inline void int8x8_fmul_int32(float *dst, const int8_t *src, int scale)
diff --git a/libavcodec/arm/dsputil_arm.S b/libavcodec/arm/dsputil_arm.S
index d665ab3d20989dc48733ed9f737f0e4c9d3f6a5f..9c9bd253ee978896c1700e504923f7dd612a47b0 100644
--- a/libavcodec/arm/dsputil_arm.S
+++ b/libavcodec/arm/dsputil_arm.S
@@ -22,7 +22,7 @@
 #include "config.h"
 #include "libavutil/arm/asm.S"
 
-#if HAVE_ARMV5TE
+#if HAVE_ARMV5TE_EXTERNAL
 function ff_prefetch_arm, export=1
         subs            r2,  r2,  #1
         pld             [r0]
diff --git a/libavcodec/arm/mathops.h b/libavcodec/arm/mathops.h
index 9313d6bbb0e6cff38f5442a1353ff32585c4f27d..dc57c5571ce485588758bff23ae191b77110e6f6 100644
--- a/libavcodec/arm/mathops.h
+++ b/libavcodec/arm/mathops.h
@@ -28,7 +28,7 @@
 
 #if HAVE_INLINE_ASM
 
-#if HAVE_ARMV6
+#if HAVE_ARMV6_INLINE
 #define MULH MULH
 static inline av_const int MULH(int a, int b)
 {
@@ -50,7 +50,7 @@ static av_always_inline av_const int FASTDIV(int a, int b)
     return r;
 }
 
-#else /* HAVE_ARMV6 */
+#else /* HAVE_ARMV6_INLINE */
 
 #define FASTDIV FASTDIV
 static av_always_inline av_const int FASTDIV(int a, int b)
@@ -64,7 +64,7 @@ static av_always_inline av_const int FASTDIV(int a, int b)
 
 #define MLS64(d, a, b) MAC64(d, -(a), b)
 
-#if HAVE_ARMV5TE
+#if HAVE_ARMV5TE_INLINE
 
 /* signed 16x16 -> 32 multiply add accumulate */
 #   define MAC16(rt, ra, rb)                                            \
diff --git a/libavcodec/arm/vp56_arith.h b/libavcodec/arm/vp56_arith.h
index 29a222844a8cb9a6ac215800aca766896fa28d22..feb1247916a8078b10ec7e7ef559e79dba329d7f 100644
--- a/libavcodec/arm/vp56_arith.h
+++ b/libavcodec/arm/vp56_arith.h
@@ -37,7 +37,7 @@
 #   define U(x)
 #endif
 
-#if HAVE_ARMV6 && HAVE_INLINE_ASM
+#if HAVE_ARMV6_INLINE
 
 #define vp56_rac_get_prob vp56_rac_get_prob_armv6
 static inline int vp56_rac_get_prob_armv6(VP56RangeCoder *c, int pr)
diff --git a/libavcodec/arm/vp8.h b/libavcodec/arm/vp8.h
index 5a7b142690f08452360228b810dda16e3bcd4de5..7574a51f50e7c93a5c273605f65d36208196de8b 100644
--- a/libavcodec/arm/vp8.h
+++ b/libavcodec/arm/vp8.h
@@ -21,7 +21,7 @@
 
 #include "config.h"
 
-#if HAVE_ARMV6
+#if HAVE_ARMV6_EXTERNAL
 #define decode_block_coeffs_internal ff_decode_block_coeffs_armv6
 int ff_decode_block_coeffs_armv6(VP56RangeCoder *rc, DCTELEM block[16],
                                  uint8_t probs[8][3][NUM_DCT_TOKENS-1],
diff --git a/libavcodec/arm/vp8dsp_armv6.S b/libavcodec/arm/vp8dsp_armv6.S
index 40be926f9f7b78c889759ae9261d3f95fae80363..fd254ccc3008f58f27fca3284d06d2e0d8538b7d 100644
--- a/libavcodec/arm/vp8dsp_armv6.S
+++ b/libavcodec/arm/vp8dsp_armv6.S
@@ -118,7 +118,7 @@ function ff_vp8_luma_dc_wht_armv6, export=1
         usub16          r4,  r4,  r6            @ block[0,1][3]
         usub16          r5,  r5,  r12           @ block[2,3][3]
 
-#if HAVE_ARMV6T2
+#if HAVE_ARMV6T2_EXTERNAL
         sbfx            r6,  r8,  #3,  #13
         sbfx            r12, r7,  #3,  #13
         sbfx            r1,  r9,  #3,  #13
@@ -151,7 +151,7 @@ function ff_vp8_luma_dc_wht_armv6, export=1
         strh            r4,  [r0], #32
         asr             r10, r5,  #19           @ block[3][3]
 
-#if HAVE_ARMV6T2
+#if HAVE_ARMV6T2_EXTERNAL
         sbfx            r2,  r2,  #3,  #13
         sbfx            lr,  lr,  #3,  #13
         sbfx            r3,  r3,  #3,  #13
@@ -284,7 +284,7 @@ function ff_vp8_idct_add_armv6, export=1
         sxth            r12, r12
         ldr             r9,  [r0, r2]
         sxth            r1,  r1
-#if HAVE_ARMV6T2
+#if HAVE_ARMV6T2_EXTERNAL
         sbfx            r7,  r7,  #3,  #13
         sbfx            r10, r10, #3,  #13
 #else
diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
index bb7c383875807edf53616dc28662256639e481f9..07bb6ae5b9c800edf2fc0f28c4ac380c283c215c 100644
--- a/libavutil/arm/asm.S
+++ b/libavutil/arm/asm.S
@@ -89,7 +89,7 @@ ELF     .size   \name, . - \name
 \name:
 .endm
 
-#if !HAVE_ARMV6T2
+#if !HAVE_ARMV6T2_EXTERNAL
 .macro  movw    rd, val
         mov     \rd, \val &  255
         orr     \rd, \val & ~255
@@ -97,7 +97,7 @@ ELF     .size   \name, . - \name
 #endif
 
 .macro  mov32   rd, val
-#if HAVE_ARMV6T2
+#if HAVE_ARMV6T2_EXTERNAL
         movw            \rd, #(\val) & 0xffff
     .if (\val) >> 16
         movt            \rd, #(\val) >> 16
@@ -146,7 +146,7 @@ T       ldr             \rd, [\rd]
 .macro  movrel rd, val
 #if CONFIG_PIC
         ldpic           \rd, \val
-#elif HAVE_ARMV6T2 && !defined(__APPLE__)
+#elif HAVE_ARMV6T2_EXTERNAL && !defined(__APPLE__)
         movw            \rd, #:lower16:\val
         movt            \rd, #:upper16:\val
 #else
diff --git a/libavutil/arm/bswap.h b/libavutil/arm/bswap.h
index c10c35fa16c6dacc6bab1d72a44573b134e30b22..ae5fdb7eb87d9d2c8abffc077257c7325306f439 100644
--- a/libavutil/arm/bswap.h
+++ b/libavutil/arm/bswap.h
@@ -35,7 +35,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
 
 #elif HAVE_INLINE_ASM
 
-#if HAVE_ARMV6
+#if HAVE_ARMV6_INLINE
 #define av_bswap16 av_bswap16
 static av_always_inline av_const unsigned av_bswap16(unsigned x)
 {
@@ -48,7 +48,7 @@ static av_always_inline av_const unsigned av_bswap16(unsigned x)
 #define av_bswap32 av_bswap32
 static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
 {
-#if HAVE_ARMV6
+#if HAVE_ARMV6_INLINE
     __asm__("rev %0, %0" : "+r"(x));
 #else
     uint32_t t;
@@ -57,7 +57,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
              "mov %0, %0, ror #8      \n\t"
              "eor %0, %0, %1, lsr #8  \n\t"
              : "+r"(x), "=&r"(t));
-#endif /* HAVE_ARMV6 */
+#endif /* HAVE_ARMV6_INLINE */
     return x;
 }
 #endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */
diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h
index 0980a6f3b78cd81ed893644dfd515c497608ce4a..fd52648f884c0e7c0bed9ad3cc29c7f2bfc727ba 100644
--- a/libavutil/arm/intmath.h
+++ b/libavutil/arm/intmath.h
@@ -28,7 +28,7 @@
 
 #if HAVE_INLINE_ASM
 
-#if HAVE_ARMV6
+#if HAVE_ARMV6_INLINE
 
 #define av_clip_uint8 av_clip_uint8_arm
 static av_always_inline av_const unsigned av_clip_uint8_arm(int a)
@@ -86,7 +86,7 @@ static av_always_inline int av_sat_dadd32_arm(int a, int b)
     return r;
 }
 
-#endif /* HAVE_ARMV6 */
+#endif /* HAVE_ARMV6_INLINE */
 
 #if HAVE_ASM_MOD_Q