diff --git a/configure b/configure
index fe95251c68f4821c679e4726ac90a82571d8dfa9..6758438e11c0a9bb13ac64863702d1776bf1cdd2 100755
--- a/configure
+++ b/configure
@@ -698,6 +698,12 @@ void foo(void){ __asm__ volatile($code); }
 EOF
 }
 
+check_insn(){
+    log check_insn "$@"
+    check_inline_asm ${1}_inline "\"$2\""
+    echo "$2" | check_as && enable ${1}_external || disable ${1}_external
+}
+
 check_yasm(){
     log check_yasm "$@"
     echo "$1" > $TMPS