[libav-devel] [PATCH 3/3] [RFC] configure: Make x86 standalone assembler command-line-selectable

Diego Biurrun diego at biurrun.de
Wed Jun 18 16:55:18 CEST 2014


---

I'm unhappy with the naming structure still.  Given that this is an
attempt at further abstraction, we should probably try to get rid of
all the "yasm" in the variable and option names.
Suggestions welcome...

This also does not fall back on nasm, as it did previously.  If that
is good or bad is up for discussion.  Implementing a fallback is
slightly more involved than this patch in any case.

 configure | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 71fffaa..ad04e98 100755
--- a/configure
+++ b/configure
@@ -233,6 +233,7 @@ Toolchain options:
   --cc=CC                  use C compiler CC [$cc_default]
   --dep-cc=DEPCC           use dependency generator DEPCC [$cc_default]
   --ld=LD                  use linker LD
+  --yasmexe=YASM           use standalone assembler YASM
   --pkg-config=PKGCONFIG   use pkg-config tool PKGCONFIG [$pkg_config_default]
   --pkg-config-flags=FLAGS pass additional flags to pkgconf []
   --host-cc=HOSTCC         use host C compiler HOSTCC
@@ -1628,6 +1629,7 @@ CMDLINE_SET="
     target_path
     target_samples
     toolchain
+    yasmexe
 "
 
 CMDLINE_APPEND="
@@ -2180,7 +2182,7 @@ objformat="elf"
 pkg_config_default=pkg-config
 ranlib="ranlib"
 strip="strip"
-yasmexe="yasm"
+yasmexe_default="yasm"
 
 nogas=":"
 
@@ -2524,7 +2526,7 @@ case "$toolchain" in
     ;;
 esac
 
-set_default arch cc pkg_config sysinclude target_exec target_os
+set_default arch cc pkg_config sysinclude target_exec target_os yasmexe
 enabled cross_compile || host_cc_default=$cc
 set_default host_cc
 
@@ -3881,11 +3883,10 @@ EOF
     enabled mmxext && check_inline_asm mmxext_inline '"pmaxub %mm0, %mm1"'
 
     if ! disabled_any asm mmx yasm; then
-        if check_cmd $yasmexe --version; then
+        if $yasmexe --version 2> /dev/null | grep -q yasm; then
             enabled x86_64 && yasm_extra="-m amd64"
             yasm_debug="-g dwarf2"
-        elif check_cmd nasm -v; then
-            yasmexe=nasm
+        elif $yasmexe -v 2> /dev/null | grep -q NASM; then
             yasm_debug="-g -F dwarf"
             enabled x86_64 && test "$objformat" = elf && objformat=elf64
         fi
-- 
1.8.3.2



More information about the libav-devel mailing list