Originally committed as revision 25213 to svn://svn.ffmpeg.org/ffmpeg/trunk
Måns Rullgård authored on 2010/09/27 06:01:24... | ... |
@@ -2606,14 +2606,23 @@ EOF |
2606 | 2606 |
|
2607 | 2607 |
check_asm bswap '"bswap %%eax" ::: "%eax"' |
2608 | 2608 |
|
2609 |
- YASMFLAGS="-f $objformat" |
|
2610 |
- enabled x86_64 && append YASMFLAGS "-m amd64" |
|
2611 |
- enabled pic && append YASMFLAGS "-DPIC" |
|
2612 |
- test -n "$extern_prefix" && append YASMFLAGS "-DPREFIX" |
|
2613 |
- case "$objformat" in |
|
2614 |
- elf) enabled debug && append YASMFLAGS "-g dwarf2" ;; |
|
2615 |
- esac |
|
2616 | 2609 |
if ! disabled_any asm mmx yasm; then |
2610 |
+ if check_cmd $yasmexe --version; then |
|
2611 |
+ enabled x86_64 && yasm_extra="-m amd64" |
|
2612 |
+ yasm_debug="-g dwarf2" |
|
2613 |
+ elif check_cmd nasm -v; then |
|
2614 |
+ yasmexe=nasm |
|
2615 |
+ yasm_debug="-g -F dwarf" |
|
2616 |
+ enabled x86_64 && test "$objformat" = elf && objformat=elf64 |
|
2617 |
+ fi |
|
2618 |
+ |
|
2619 |
+ YASMFLAGS="-f $objformat $yasm_extra" |
|
2620 |
+ enabled pic && append YASMFLAGS "-DPIC" |
|
2621 |
+ test -n "$extern_prefix" && append YASMFLAGS "-DPREFIX" |
|
2622 |
+ case "$objformat" in |
|
2623 |
+ elf*) enabled debug && append YASMFLAGS $yasm_debug ;; |
|
2624 |
+ esac |
|
2625 |
+ |
|
2617 | 2626 |
check_yasm "pabsw xmm0, xmm0" && enable yasm || |
2618 | 2627 |
die "yasm not found, use --disable-yasm for a crippled build" |
2619 | 2628 |
fi |