aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heider2010-05-09 13:31:34 +0000
committerAndre Heider2010-05-09 13:31:34 +0000
commit09a54d765f96c1d6eed8fdbbc42aa3b47fa8f331 (patch)
tree890c5dba7111b645657193d6b88ca17c32561be6
parent998531a0221646cb23bc053919e341b339522ca5 (diff)
downloadscummvm-rg350-09a54d765f96c1d6eed8fdbbc42aa3b47fa8f331.tar.gz
scummvm-rg350-09a54d765f96c1d6eed8fdbbc42aa3b47fa8f331.tar.bz2
scummvm-rg350-09a54d765f96c1d6eed8fdbbc42aa3b47fa8f331.zip
Fallback to the nasm compatible yasm.
svn-id: r48980
-rw-r--r--Makefile.common2
-rwxr-xr-xconfigure21
2 files changed, 18 insertions, 5 deletions
diff --git a/Makefile.common b/Makefile.common
index 1aa61b1709..419090a705 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -132,7 +132,7 @@ ifdef USE_NASM
# Build rule for NASM assembler files
%.o: %.asm
$(QUIET)$(MKDIR) $(*D)
- $(QUIET_NASM)$(NASM) -O1 $(NASMFLAGS) -g -o $*.o $(<)
+ $(QUIET_NASM)$(NASM) $(NASMFLAGS) -o $*.o $(<)
endif
# Include the dependency tracking files.
diff --git a/configure b/configure
index a5377dbee6..9801288bc3 100755
--- a/configure
+++ b/configure
@@ -2191,11 +2191,24 @@ if test "$_have_x86" = yes ; then
for path_dir in $_nasmpath; do
if test -x "$path_dir/nasm$NATIVEEXEEXT" ; then
NASM="$path_dir/nasm$NATIVEEXEEXT"
+ NASMFLAGS="-O1 -g"
echo $NASM
break
fi
done
+ # fallback to the nasm compatible yasm
+ if test x$NASM = x -o x$NASM = x'"$NASM"'; then
+ for path_dir in $_nasmpath; do
+ if test -x "$path_dir/yasm$NATIVEEXEEXT" ; then
+ NASM="$path_dir/yasm$NATIVEEXEEXT"
+ NASMFLAGS="-a x86 -m x86"
+ echo $NASM
+ break
+ fi
+ done
+ fi
+
IFS="$ac_save_ifs"
if test x$NASM = x -o x$NASM = x'"$NASM"'; then
@@ -2204,16 +2217,16 @@ if test "$_have_x86" = yes ; then
else
case $_host_os in
os2-emx*)
- NASMFLAGS="-f aout"
+ NASMFLAGS="$NASMFLAGS -f aout"
;;
mingw*)
- NASMFLAGS="-f win32"
+ NASMFLAGS="$NASMFLAGS -f win32"
;;
darwin*)
- NASMFLAGS="-f macho"
+ NASMFLAGS="$NASMFLAGS -f macho"
;;
*)
- NASMFLAGS="-f elf"
+ NASMFLAGS="$NASMFLAGS -f elf"
;;
esac
_nasm=yes