diff --git a/configure b/configure
index 2dc7dd3f8c2a7172ca0d4e26cc8bee483316d1b9..844c3beb07acbb5ab232c96e8ef7418768680e33 100755
--- a/configure
+++ b/configure
@@ -844,12 +844,16 @@ check_insn(){
     check_as ${1}_external "$2"
 }
 
+x86asm_o(){
+    eval printf '%s\\n' $X86ASM_O
+}
+
 test_x86asm(){
     log test_x86asm "$@"
     echo "$1" > $TMPASM
     log_file $TMPASM
     shift 1
-    test_cmd $x86asmexe $X86ASMFLAGS "$@" -o $TMPO $TMPASM
+    test_cmd $x86asmexe $X86ASMFLAGS "$@" $(x86asm_o $TMPO) $TMPASM
 }
 
 ld_o(){