summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-09-26 21:01:24 +0000
committerMåns Rullgård <mans@mansr.com>2010-09-26 21:01:24 +0000
commitb6c06894560b9ed11bb6bf6d3036e7c278e1becf (patch)
tree04cf959345aecabc60c435b8aedc8f1ecce20749
parent3288177150eae9a9f11b6a5e4574f0ccd5fe9f57 (diff)
configure: detect nasm vs yasm and set flags correspondingly
Originally committed as revision 25213 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xconfigure23
1 files changed, 16 insertions, 7 deletions
diff --git a/configure b/configure
index 0538201969..d08deb0d0b 100755
--- a/configure
+++ b/configure
@@ -2606,14 +2606,23 @@ EOF
check_asm bswap '"bswap %%eax" ::: "%eax"'
- YASMFLAGS="-f $objformat"
- enabled x86_64 && append YASMFLAGS "-m amd64"
- enabled pic && append YASMFLAGS "-DPIC"
- test -n "$extern_prefix" && append YASMFLAGS "-DPREFIX"
- case "$objformat" in
- elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
- esac
if ! disabled_any asm mmx yasm; then
+ if check_cmd $yasmexe --version; then
+ enabled x86_64 && yasm_extra="-m amd64"
+ yasm_debug="-g dwarf2"
+ elif check_cmd nasm -v; then
+ yasmexe=nasm
+ yasm_debug="-g -F dwarf"
+ enabled x86_64 && test "$objformat" = elf && objformat=elf64
+ fi
+
+ YASMFLAGS="-f $objformat $yasm_extra"
+ enabled pic && append YASMFLAGS "-DPIC"
+ test -n "$extern_prefix" && append YASMFLAGS "-DPREFIX"
+ case "$objformat" in
+ elf*) enabled debug && append YASMFLAGS $yasm_debug ;;
+ esac
+
check_yasm "pabsw xmm0, xmm0" && enable yasm ||
die "yasm not found, use --disable-yasm for a crippled build"
fi