changeset 32322:dd8cc174b597

Allow configure to accept nasm instead of yasm again. Still does not build since nasm can not find config.asm without specifying its full path or adding a / at then end of the include path.
author reimar
date Wed, 29 Sep 2010 18:26:12 +0000
parents 44f7f5dd379f
children afb76e48fc32
files configure
diffstat 1 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Wed Sep 29 18:10:25 2010 +0000
+++ b/configure	Wed Sep 29 18:26:12 2010 +0000
@@ -2701,13 +2701,15 @@
   else
     objformat="elf"
   fi
+  yasmdefines=""
   # currently tested for Linux x86, x86_64
+  test "$pic" = "yes"      && yasmdefines="$yasmdefines -DPIC"
+  test -n "$extern_prefix" && yasmdefines="$yasmdefines -DPREFIX"
+
   YASMFLAGS="-f $objformat"
   x86_64 && YASMFLAGS="$YASMFLAGS -m amd64"
-  test "$pic" = "yes" && YASMFLAGS="$YASMFLAGS -DPIC"
   case "$objformat" in
     elf) test $_debug && YASMFLAGS="$YASMFLAGS -g dwarf2" ;;
-    *)                   YASMFLAGS="$YASMFLAGS -DPREFIX"  ;;
   esac
 else
   warn_cflags=yes
@@ -2715,7 +2717,16 @@
 
 echo "pabsw xmm0, xmm0" > $TMPS
 if test "$_yasm" ; then
-  yasm_check || die "yasm not found, use --yasm='' if you really want to compile without"
+  if ! yasm_check ; then
+    if x86_64 ; then
+      case "$objformat" in
+        elf)   objformat=elf64 ;;
+        win32) objformat=win64 ;;
+      esac
+    fi
+    YASMFLAGS="-f $objformat $yasmdefines"
+    yasm_check || die "yasm not found, use --yasm='' if you really want to compile without"
+  fi
 fi
 if test $_yasm ; then
   def_yasm='#define HAVE_YASM 1'