Browse Source

drillbit: Correct configure logic to check for generic bitfury code (needed to decode nonces)

Luke Dashjr 12 years ago
parent
commit
683965f338
1 changed files with 11 additions and 2 deletions
  1. 11 2
      configure.ac

+ 11 - 2
configure.ac

@@ -698,15 +698,24 @@ driverlist="$driverlist drillbit"
 AC_ARG_ENABLE([drillbit],
 	[AC_HELP_STRING([--disable-drillbit],[Compile support for DrillBit (default enabled)])],
 	[drillbit=$enableval],
-	[drillbit=yes]
+	[drillbit=auto]
 	)
+if test "x$drillbit" = "xno"; then
+	true
+elif test "x$bitfury" = "xyes"; then
+	drillbit=yes
+elif test "x$drillbit" = "xyes"; then
+	AC_MSG_ERROR([You explicitly disabled Bitfury and explicitly enabled DrillBit])
+else
+	drillbit=no
+fi
 if test "x$drillbit" = "xyes"; then
 	AC_DEFINE([USE_DRILLBIT], [1], [Defined to 1 if DrillBit support is wanted])
 	need_lowl_vcom=yes
 	has_asic=yes
 	have_udevrules=true  # TODO
 fi
-AM_CONDITIONAL([USE_DRILLBIT], [test x$bifury = xyes])
+AM_CONDITIONAL([USE_DRILLBIT], [test x$drillbit = xyes])
 
 
 driverlist="$driverlist twinfury"