Browse Source

configure: Fix up dualminer logic

Luke Dashjr 12 years ago
parent
commit
bd2fedda33
1 changed files with 11 additions and 5 deletions
  1. 11 5
      configure.ac

+ 11 - 5
configure.ac

@@ -431,15 +431,21 @@ fi
 AM_CONDITIONAL([HAS_ICARUS], [test x$icarus = xyes])
 AM_CONDITIONAL([HAS_ICARUS], [test x$icarus = xyes])
 
 
 driverlist="$driverlist dualminer"
 driverlist="$driverlist dualminer"
-dualminer=yes
 AC_ARG_ENABLE([dualminer],
 AC_ARG_ENABLE([dualminer],
 	[AC_HELP_STRING([--disable-dualminer],[Compile support for DualMiner (default enabled)])],
 	[AC_HELP_STRING([--disable-dualminer],[Compile support for DualMiner (default enabled)])],
-	[dualminer=$enableval]
+	[dualminer=$enableval],
+	[dualminer=auto]
 	)
 	)
+if test "x$dualminer" = "xno"; then
+	true
+elif test "x$icarus" = "xyes"; then
+	dualminer=yes
+elif test "x$dualminer" = "xyes"; then
+	AC_MSG_ERROR([You explicitly disabled Icarus and explicitly enabled DualMiner])
+else
+	dualminer=no
+fi
 if test "x$dualminer" = "xyes"; then
 if test "x$dualminer" = "xyes"; then
-	if test "x$icarus" = "xno"; then
-		AC_MSG_ERROR([You explicitly disabled Icarus and explicitly enabled DualMiner])
-	fi
 	AC_DEFINE([USE_DUALMINER], [1], [Defined to 1 if DualMiner support is wanted])
 	AC_DEFINE([USE_DUALMINER], [1], [Defined to 1 if DualMiner support is wanted])
 fi
 fi
 AM_CONDITIONAL([USE_DUALMINER], [test x$dualminer = xyes])
 AM_CONDITIONAL([USE_DUALMINER], [test x$dualminer = xyes])