Browse Source

Bugfix: Fix build with CPU mining and *without* yasm

Luke Dashjr 12 years ago
parent
commit
5dac70a827
2 changed files with 4 additions and 3 deletions
  1. 1 0
      configure.ac
  2. 3 3
      driver-cpu.h

+ 1 - 0
configure.ac

@@ -540,6 +540,7 @@ fi
 if test "x$has_yasm" = "xfalse" ; then
   AC_MSG_NOTICE([yasm is required for the assembly algorithms. They will be skipped.])
 else
+	AC_DEFINE([HAVE_YASM], [1], [Defined to 1 if yasm is being used])
 	if test "x$have_win32$have_cygwin" != "xfalsefalse"; then
 		if test "x$have_x86_64" = xtrue; then
 			YASM_FMT="win64"

+ 3 - 3
driver-cpu.h

@@ -18,7 +18,7 @@
 #define WANT_ALTIVEC_4WAY 1
 #endif
 
-#ifdef __i386__
+#if defined(__i386__) && defined(HAVE_YASM)
 #define WANT_X8632_SSE2 1
 #endif
 
@@ -26,11 +26,11 @@
 #define WANT_VIA_PADLOCK 1
 #endif
 
-#ifdef __x86_64__
+#if defined(__x86_64__) && defined(HAVE_YASM)
 #define WANT_X8664_SSE2 1
 #endif
 
-#ifdef __x86_64__
+#if defined(__x86_64__) && defined(HAVE_YASM)
 #define WANT_X8664_SSE4 1
 #endif