Commit 9650bfd6a3e0cc0cd90098d61ceba51353051094

Con Kolivas 2013-05-27T14:58:08

Compile usbutils into avalon driver.

diff --git a/cgminer.c b/cgminer.c
index 193a861..5ca8a56 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -60,9 +60,6 @@
 
 #if defined(USE_BITFORCE) || defined(USE_ICARUS) || defined(USE_AVALON) || defined(USE_MODMINER)
 #	define USE_FPGA
-#if defined(USE_AVALON)
-#	define USE_FPGA_SERIAL
-#endif
 #elif defined(USE_ZTEX)
 #	define USE_FPGA
 #endif
@@ -1089,7 +1086,7 @@ static struct opt_table opt_config_table[] = {
 #ifdef USE_FPGA_SERIAL
 	OPT_WITH_ARG("--scan-serial|-S",
 		     add_serial, NULL, NULL,
-		     "Serial port to probe for Avalon Mining device"),
+		     "Serial port to probe for Serial FPGA Mining device"),
 #endif
 	OPT_WITH_ARG("--scan-time|-s",
 		     set_int_0_to_9999, opt_show_intval, &opt_scantime,
diff --git a/configure.ac b/configure.ac
index 4af4fb4..086a9eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -303,14 +303,14 @@ else
 	])
 fi
 
-AM_CONDITIONAL([NEED_FPGAUTILS], [test x$avalon$modminer$ztex != xnonono])
-AM_CONDITIONAL([NEED_USBUTILS_C], [test x$bitforce$modminer$bflsc$icarus != xnononono])
+AM_CONDITIONAL([NEED_FPGAUTILS], [test x$modminer$ztex != xnono])
+AM_CONDITIONAL([NEED_USBUTILS_C], [test x$avalon$bitforce$modminer$bflsc$icarus != xnonononono])
 AM_CONDITIONAL([HAVE_CURSES], [test x$curses = xyes])
 AM_CONDITIONAL([WANT_JANSSON], [test x$request_jansson = xtrue])
 AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue])
 AM_CONDITIONAL([HAVE_x86_64], [test x$have_x86_64 = xtrue])
 
-if test "x$bitforce$modminer$bflsc$icarus" != xnononono; then
+if test "x$avalon$bitforce$modminer$bflsc$icarus" != xnonononono; then
 	AC_DEFINE([USE_USBUTILS], [1], [Defined to 1 if usbutils support required])
 fi
 
@@ -333,7 +333,7 @@ if test "x$have_cgminer_sdk" = "xtrue"; then
 	PKG_CONFIG_PATH="$CGMINER_SDK/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
 fi
 
-if test "x$ztex$modminer$bitforce$bflsc$icarus" != xnonononono; then
+if test "x$avalon$ztex$modminer$bitforce$bflsc$icarus" != xnononononono; then
   case $target in
     *-*-freebsd*)
       LIBUSB_LIBS="-lusb"
diff --git a/driver-avalon.c b/driver-avalon.c
index 8e30268..dab8011 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -35,6 +35,7 @@
 
 #include "elist.h"
 #include "miner.h"
+#include "usbutils.h"
 #include "fpgautils.h"
 #include "driver-avalon.h"
 #include "hexdump.c"