--- a/configure.ac
+++ b/configure.ac
@@ -375,6 +375,12 @@
     emblibav_configure_args="$emblibav_configure_args --enable-gpl"
   fi
 
+  AC_ARG_ENABLE(yasm,
+              [AC_HELP_STRING([--disable-yasm], [disable use of yasm assembler])])
+  if test "x$enable_yasm" = "xno"; then
+    emblibav_configure_args="$emblibav_configure_args --disable-yasm"
+  fi
+
   # if we are cross-compiling, tell libav so
   case $host in
       *android*)