Commit 6219f977f67202ad9435528f95165ad3414c4370

Kano 2013-05-17T14:10:58

switch icarus configuration to usb

diff --git a/Makefile.am b/Makefile.am
index ccd4e6b..b9487ee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,7 +25,7 @@ bin_SCRIPTS	= $(top_srcdir)/*.cl
 cgminer_LDFLAGS	= $(PTHREAD_FLAGS)
 cgminer_LDADD	= $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \
 		  @OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \
-		  @UDEV_LIBS@ @LIBUSB_LIBS@ @MM_LIBS@ \
+		  @LIBUSB_LIBS@ @MM_LIBS@ \
 		  @MATH_LIBS@ lib/libgnu.a ccan/libccan.a
 
 if HAVE_WINDOWS
diff --git a/cgminer.c b/cgminer.c
index 3b7a387..974496c 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -60,7 +60,7 @@
 
 #if defined(USE_BITFORCE) || defined(USE_ICARUS) || defined(USE_AVALON) || defined(USE_MODMINER)
 #	define USE_FPGA
-#if defined(USE_ICARUS) || defined(USE_AVALON)
+#if defined(USE_AVALON)
 #	define USE_FPGA_SERIAL
 #endif
 #elif defined(USE_ZTEX)
diff --git a/configure.ac b/configure.ac
index 804cd21..4af4fb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -303,14 +303,14 @@ else
 	])
 fi
 
-AM_CONDITIONAL([NEED_FPGAUTILS], [test x$avalon$icarus$bitforce$modminer$ztex != xnonononono])
-AM_CONDITIONAL([NEED_USBUTILS_C], [test x$bitforce$modminer$bflsc != xnonono])
+AM_CONDITIONAL([NEED_FPGAUTILS], [test x$avalon$modminer$ztex != xnonono])
+AM_CONDITIONAL([NEED_USBUTILS_C], [test x$bitforce$modminer$bflsc$icarus != xnononono])
 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" != xnonono; then
+if test "x$bitforce$modminer$bflsc$icarus" != xnononono; then
 	AC_DEFINE([USE_USBUTILS], [1], [Defined to 1 if usbutils support required])
 fi
 
@@ -321,26 +321,6 @@ else
 	JANSSON_LIBS=-ljansson
 fi
 
-if test "x$icarus" != xno; then
-	AC_ARG_WITH([libudev], [AC_HELP_STRING([--without-libudev], [Autodetect FPGAs using libudev (default enabled)])],
-		[libudev=$withval],
-		[libudev=auto]
-		)
-	if test "x$libudev" != "xno"; then
-		AC_CHECK_HEADER([libudev.h],[
-			libudev=yes
-			UDEV_LIBS=-ludev
-			AC_DEFINE([HAVE_LIBUDEV], [1], [Defined to 1 if libudev is wanted])
-		], [
-			if test "x$libudev" = "xyes"; then
-				AC_MSG_ERROR([libudev not found])
-			fi
-			libudev=no
-		])
-	fi
-fi
-AM_CONDITIONAL([HAVE_LIBUDEV], [test x$libudev != xno])
-
 PKG_PROG_PKG_CONFIG()
 
 if test "x$have_cgminer_sdk" = "xtrue"; then
@@ -353,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" != xnononono; then
+if test "x$ztex$modminer$bitforce$bflsc$icarus" != xnonononono; then
   case $target in
     *-*-freebsd*)
       LIBUSB_LIBS="-lusb"
@@ -441,7 +421,6 @@ AC_SUBST(PDCURSES_LIBS)
 AC_SUBST(WS2_LIBS)
 AC_SUBST(MM_LIBS)
 AC_SUBST(MATH_LIBS)
-AC_SUBST(UDEV_LIBS)
 AC_SUBST(ADL_CPPFLAGS)
 
 AC_CONFIG_FILES([
@@ -538,16 +517,12 @@ else
 	echo "  Ztex.FPGAs...........: Disabled"
 fi
 
-if test "x$icarus" != xno; then
-	echo "  libudev.detection....: $libudev"
-fi
-
 echo
 echo "Compilation............: make (or gmake)"
 echo "  CPPFLAGS.............: $CPPFLAGS"
 echo "  CFLAGS...............: $CFLAGS $LIBUSB_CFLAGS"
 echo "  LDFLAGS..............: $LDFLAGS $PTHREAD_FLAGS"
-echo "  LDADD................: $DLOPEN_FLAGS $LIBCURL_LIBS $JANSSON_LIBS $PTHREAD_LIBS $OPENCL_LIBS $NCURSES_LIBS $PDCURSES_LIBS $WS2_LIBS $MATH_LIBS $UDEV_LIBS $LIBUSB_LIBS"
+echo "  LDADD................: $DLOPEN_FLAGS $LIBCURL_LIBS $JANSSON_LIBS $PTHREAD_LIBS $OPENCL_LIBS $NCURSES_LIBS $PDCURSES_LIBS $WS2_LIBS $MATH_LIBS $LIBUSB_LIBS"
 echo
 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
 echo "  prefix...............: $prefix"