Commit 3ed9f2bf authored by Ryan C. Gordon's avatar Ryan C. Gordon

Merged r3042:3043 from branches/SDL-1.2: legacy yasm fix.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402329
parent 152b7433
...@@ -641,13 +641,20 @@ CheckNASM() ...@@ -641,13 +641,20 @@ CheckNASM()
AC_HELP_STRING([--enable-nasm], [use nasm assembly blitters on x86 [[default=yes]]]), AC_HELP_STRING([--enable-nasm], [use nasm assembly blitters on x86 [[default=yes]]]),
, enable_nasm=yes) , enable_nasm=yes)
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_nasm = xyes; then if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_nasm = xyes; then
AC_PATH_PROG(NASM, yasm) CompileNASM()
if test "x$NASM" = x -o "x$NASM" = x'"$NASM"'; then {
AC_PATH_PROG(NASM, nasm) # Usage: CompileNASM <filename>
AC_MSG_CHECKING(to see if $NASM supports $1)
if $NASM $NASMFLAGS $1 -o $1.o >&AS_MESSAGE_LOG_FD 2>&1; then
CompileNASM_ret="yes"
else
CompileNASM_ret="no"
fi fi
if test "x$NASM" != x -a "x$NASM" != x'"$NASM"'; then rm -f $1 $1.o
AC_DEFINE(SDL_HERMES_BLITTERS) AC_MSG_RESULT($CompileNASM_ret)
SOURCES="$SOURCES $srcdir/src/hermes/*.asm" test "$CompileNASM_ret" = "yes"
}
if test x"$NASMFLAGS" = x; then if test x"$NASMFLAGS" = x; then
case $ARCH in case $ARCH in
win32) win32)
...@@ -664,15 +671,26 @@ AC_HELP_STRING([--enable-nasm], [use nasm assembly blitters on x86 [[default=yes ...@@ -664,15 +671,26 @@ AC_HELP_STRING([--enable-nasm], [use nasm assembly blitters on x86 [[default=yes
;; ;;
esac esac
fi fi
AC_PATH_PROG(NASM, yasm)
echo "%ifidn __OUTPUT_FORMAT__,elf" > unquoted-sections
echo "section .note.GNU-stack noalloc noexec nowrite progbits" >> unquoted-sections
echo "%endif" >> unquoted-sections
CompileNASM unquoted-sections || NASM=""
if test "x$NASM" = x -o "x$NASM" = x'"$NASM"'; then
$as_unset ac_cv_path_NASM
AC_PATH_PROG(NASM, nasm)
fi
if test "x$NASM" != x -a "x$NASM" != x'"$NASM"'; then
AC_DEFINE(SDL_HERMES_BLITTERS)
SOURCES="$SOURCES $srcdir/src/hermes/*.asm"
NASMFLAGS="$NASMFLAGS -i $srcdir/src/hermes/" NASMFLAGS="$NASMFLAGS -i $srcdir/src/hermes/"
dnl See if hidden visibility is supported dnl See if hidden visibility is supported
echo "GLOBAL _bar:function hidden" > nasm_vis.asm echo "GLOBAL _bar:function hidden" > symbol-visibility
echo "_bar:" >>nasm_vis.asm echo "_bar:" >> symbol-visibility
if $NASM $NASMFLAGS nasm_vis.asm -o nasm_vis.o >&AS_MESSAGE_LOG_FD 2>&1; then CompileNASM symbol-visibility && NASMFLAGS="$NASMFLAGS -DHIDDEN_VISIBILITY"
NASMFLAGS="$NASMFLAGS -DHIDDEN_VISIBILITY"
fi
rm -f nasm_vis.asm nasm_vis.o
AC_SUBST(NASM) AC_SUBST(NASM)
AC_SUBST(NASMFLAGS) AC_SUBST(NASMFLAGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment