Browse Source

Significantly rewrite configure script to handle driver dependencies cleaner

Luke Dashjr 11 years ago
parent
commit
38b2400e7f
13 changed files with 321 additions and 709 deletions
  1. 18 18
      70-bfgminer.rules.in
  2. 22 22
      Makefile.am
  3. 16 13
      README
  4. 25 25
      api.c
  5. 184 575
      configure.ac
  6. 5 5
      driver-cpu.c
  7. 11 11
      driver-opencl.c
  8. 2 2
      findnonce.c
  9. 2 2
      findnonce.h
  10. 31 31
      miner.c
  11. 1 1
      miner.h
  12. 2 2
      ocl.c
  13. 2 2
      ocl.h

+ 18 - 18
70-bfgminer.rules.in

@@ -5,32 +5,32 @@ GOTO="bfgminer_end"
 LABEL="bfgminer_start"
 LABEL="bfgminer_start"
 
 
 @USE_BIFURY_TRUE@ENV{ID_MODEL}=="*bi•fury*", GOTO="bfgminer_add"
 @USE_BIFURY_TRUE@ENV{ID_MODEL}=="*bi•fury*", GOTO="bfgminer_add"
-@HAS_BIGPIC_TRUE@ENV{ID_MODEL}=="*Bitfury*BF1*", GOTO="bfgminer_add"
-@HAS_BITFORCE_TRUE@ENV{ID_MODEL}=="*BitFORCE*SHA256*", GOTO="bfgminer_add"
+@USE_BIGPIC_TRUE@ENV{ID_MODEL}=="*Bitfury*BF1*", GOTO="bfgminer_add"
+@USE_BITFORCE_TRUE@ENV{ID_MODEL}=="*BitFORCE*SHA256*", GOTO="bfgminer_add"
 @USE_COINTERRA_TRUE@ENV{ID_MODEL}=="*GoldStrike*", GOTO="bfgminer_add"
 @USE_COINTERRA_TRUE@ENV{ID_MODEL}=="*GoldStrike*", GOTO="bfgminer_add"
 @USE_DRILLBIT_TRUE@ENV{manufacturer}=="*Drillbit*", GOTO="bfgminer_add"
 @USE_DRILLBIT_TRUE@ENV{manufacturer}=="*Drillbit*", GOTO="bfgminer_add"
-@HAS_ICARUS_TRUE@ENV{ID_MODEL}=="*Cairnsmore1*", GOTO="bfgminer_add"
-@HAS_ICARUS_TRUE@ENV{ID_MODEL}=="*Block*Erupter*", GOTO="bfgminer_add"
+@USE_ICARUS_TRUE@ENV{ID_MODEL}=="*Cairnsmore1*", GOTO="bfgminer_add"
+@USE_ICARUS_TRUE@ENV{ID_MODEL}=="*Block*Erupter*", GOTO="bfgminer_add"
 @USE_HASHBUSTER_TRUE@ENV{ID_MODEL}=="*HashBuster*", GOTO="bfgminer_add"
 @USE_HASHBUSTER_TRUE@ENV{ID_MODEL}=="*HashBuster*", GOTO="bfgminer_add"
 @USE_HASHBUSTERUSB_TRUE@ENV{ID_MODEL}=="*HashBuster*", GOTO="bfgminer_add"
 @USE_HASHBUSTERUSB_TRUE@ENV{ID_MODEL}=="*HashBuster*", GOTO="bfgminer_add"
 @USE_HASHFAST_TRUE@ENV{idVendor}=="297c", ENV{manufacturer}=="*HashFast*", GOTO="bfgminer_add"
 @USE_HASHFAST_TRUE@ENV{idVendor}=="297c", ENV{manufacturer}=="*HashFast*", GOTO="bfgminer_add"
 @USE_HASHFAST_TRUE@ENV{ID_MODEL}=="*GoldenNonce*", GOTO="bfgminer_add"
 @USE_HASHFAST_TRUE@ENV{ID_MODEL}=="*GoldenNonce*", GOTO="bfgminer_add"
-@HAS_KLONDIKE_TRUE@ENV{idVendor}=="04d8", ENV{idProduct}=="f60a", ENV{manufacturer}=="*Klondike*", GOTO="bfgminer_add"
-@HAS_KLONDIKE_TRUE@ENV{idVendor}=="fa05", ENV{idProduct}=="0001", ENV{manufacturer}=="*HashBuster*", GOTO="bfgminer_add"
-@HAS_LITTLEFURY_TRUE@ENV{ID_MODEL}=="*LittleFury*", GOTO="bfgminer_add"
-@HAS_MODMINER_TRUE@ENV{ID_MODEL}=="*ModMiner*", GOTO="bfgminer_add"
-@HAS_NANOFURY_TRUE@ENV{idVendor}=="04d8", ENV{idProduct}=="00de", ENV{ID_MODEL}=="*NanoFury*", GOTO="bfgminer_add"
+@USE_KLONDIKE_TRUE@ENV{idVendor}=="04d8", ENV{idProduct}=="f60a", ENV{manufacturer}=="*Klondike*", GOTO="bfgminer_add"
+@USE_KLONDIKE_TRUE@ENV{idVendor}=="fa05", ENV{idProduct}=="0001", ENV{manufacturer}=="*HashBuster*", GOTO="bfgminer_add"
+@USE_LITTLEFURY_TRUE@ENV{ID_MODEL}=="*LittleFury*", GOTO="bfgminer_add"
+@USE_MODMINER_TRUE@ENV{ID_MODEL}=="*ModMiner*", GOTO="bfgminer_add"
+@USE_NANOFURY_TRUE@ENV{idVendor}=="04d8", ENV{idProduct}=="00de", ENV{ID_MODEL}=="*NanoFury*", GOTO="bfgminer_add"
 @USE_ROCKMINER_TRUE@ENV{ID_MODEL}=="*R-BOX miner*", GOTO="bfgminer_add"
 @USE_ROCKMINER_TRUE@ENV{ID_MODEL}=="*R-BOX miner*", GOTO="bfgminer_add"
 @USE_ROCKMINER_TRUE@ENV{ID_MODEL}=="*RX-BOX miner*", GOTO="bfgminer_add"
 @USE_ROCKMINER_TRUE@ENV{ID_MODEL}=="*RX-BOX miner*", GOTO="bfgminer_add"
-@HAS_TWINFURY_TRUE@ENV{ID_MODEL}=="*Twinfury*", GOTO="bfgminer_add"
-@HAS_X6500_TRUE@ENV{idVendor}=="0403", ENV{idProduct}=="6001", ENV{ID_MODEL}=="*X6500 FPGA Miner*", GOTO="bfgminer_add"
-@HAS_ZTEX_TRUE@ENV{ID_MODEL}=="*btcminer for ZTEX*", GOTO="bfgminer_add"
+@USE_TWINFURY_TRUE@ENV{ID_MODEL}=="*Twinfury*", GOTO="bfgminer_add"
+@USE_X6500_TRUE@ENV{idVendor}=="0403", ENV{idProduct}=="6001", ENV{ID_MODEL}=="*X6500 FPGA Miner*", GOTO="bfgminer_add"
+@USE_ZTEX_TRUE@ENV{ID_MODEL}=="*btcminer for ZTEX*", GOTO="bfgminer_add"
 
 
 # The below are broad udev rules that may match devices other than the miners expected.
 # The below are broad udev rules that may match devices other than the miners expected.
 # You can uncomment them with the --enable-broad-udevrules configure option.
 # You can uncomment them with the --enable-broad-udevrules configure option.
 
 
 # Avalon1
 # Avalon1
-@BROAD_UDEVRULES_TRUE@@HAS_AVALON_TRUE@ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GOTO="bfgminer_add"
+@BROAD_UDEVRULES_TRUE@@USE_AVALON_TRUE@ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GOTO="bfgminer_add"
 # AvalonMM
 # AvalonMM
 @BROAD_UDEVRULES_TRUE@@USE_AVALONMM_TRUE@ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GOTO="bfgminer_add"
 @BROAD_UDEVRULES_TRUE@@USE_AVALONMM_TRUE@ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GOTO="bfgminer_add"
 # DualMiner
 # DualMiner
@@ -38,16 +38,16 @@ LABEL="bfgminer_start"
 # GridSeed
 # GridSeed
 @BROAD_UDEVRULES_TRUE@@USE_GRIDSEED_TRUE@ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", GOTO="bfgminer_add"
 @BROAD_UDEVRULES_TRUE@@USE_GRIDSEED_TRUE@ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", GOTO="bfgminer_add"
 # Icarus
 # Icarus
-@BROAD_UDEVRULES_TRUE@@HAS_ICARUS_TRUE@ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GOTO="bfgminer_add"
+@BROAD_UDEVRULES_TRUE@@USE_ICARUS_TRUE@ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GOTO="bfgminer_add"
 # Cairnsmore1
 # Cairnsmore1
-@BROAD_UDEVRULES_TRUE@@HAS_ICARUS_TRUE@ATTRS{idVendor}=="067b", ATTRS{idProduct}=="0230", GOTO="bfgminer_add"
-@BROAD_UDEVRULES_TRUE@@HAS_ICARUS_TRUE@ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8350", GOTO="bfgminer_add"
+@BROAD_UDEVRULES_TRUE@@USE_ICARUS_TRUE@ATTRS{idVendor}=="067b", ATTRS{idProduct}=="0230", GOTO="bfgminer_add"
+@BROAD_UDEVRULES_TRUE@@USE_ICARUS_TRUE@ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8350", GOTO="bfgminer_add"
 # Block Erupter and Antminer U*
 # Block Erupter and Antminer U*
-@BROAD_UDEVRULES_TRUE@@HAS_ICARUS_TRUE@ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", GOTO="bfgminer_add"
+@BROAD_UDEVRULES_TRUE@@USE_ICARUS_TRUE@ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", GOTO="bfgminer_add"
 # ZeusMiner
 # ZeusMiner
 @BROAD_UDEVRULES_TRUE@@USE_ZEUSMINER_TRUE@ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", GOTO="bfgminer_add"
 @BROAD_UDEVRULES_TRUE@@USE_ZEUSMINER_TRUE@ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", GOTO="bfgminer_add"
 # Possibly unprogrammed ZTEX
 # Possibly unprogrammed ZTEX
-@BROAD_UDEVRULES_TRUE@@HAS_ZTEX_TRUE@ATTRS{idVendor}=="221a", ATTRS{idProduct}=="0100", GOTO="bfgminer_add"
+@BROAD_UDEVRULES_TRUE@@USE_ZTEX_TRUE@ATTRS{idVendor}=="221a", ATTRS{idProduct}=="0100", GOTO="bfgminer_add"
 # BFx2
 # BFx2
 @BROAD_UDEVRULES_TRUE@@USE_BFX_TRUE@ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", GOTO="bfgminer_add"
 @BROAD_UDEVRULES_TRUE@@USE_BFX_TRUE@ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", GOTO="bfgminer_add"
 # RockMiner
 # RockMiner

+ 22 - 22
Makefile.am

@@ -131,7 +131,7 @@ bfgminer_CPPFLAGS += $(libevent_CFLAGS)
 endif
 endif
 
 
 
 
-if HAVE_OPENCL
+if USE_OPENCL
 bfgminer_SOURCES += driver-opencl.h driver-opencl.c
 bfgminer_SOURCES += driver-opencl.h driver-opencl.c
 bfgminer_SOURCES += ocl.c ocl.h findnonce.c findnonce.h
 bfgminer_SOURCES += ocl.c ocl.h findnonce.c findnonce.h
 bfgminer_SOURCES += adl.c adl.h adl_functions.h
 bfgminer_SOURCES += adl.c adl.h adl_functions.h
@@ -149,7 +149,7 @@ endif
 
 
 
 
 if USE_SHA256D
 if USE_SHA256D
-if HAVE_OPENCL
+if USE_OPENCL
 dist_kernels_DATA += \
 dist_kernels_DATA += \
 	$(top_srcdir)/opencl/diablo.cl  \
 	$(top_srcdir)/opencl/diablo.cl  \
 	$(top_srcdir)/opencl/diakgcn.cl  \
 	$(top_srcdir)/opencl/diakgcn.cl  \
@@ -157,7 +157,7 @@ dist_kernels_DATA += \
 	$(top_srcdir)/opencl/poclbm.cl
 	$(top_srcdir)/opencl/poclbm.cl
 endif
 endif
 
 
-if HAS_CPUMINE
+if USE_CPUMINING
 bfgminer_SOURCES	+= \
 bfgminer_SOURCES	+= \
 		  sha256_generic.c sha256_via.c	\
 		  sha256_generic.c sha256_via.c	\
 		  sha256_cryptopp.c sha256_sse2_amd64.c		\
 		  sha256_cryptopp.c sha256_sse2_amd64.c		\
@@ -191,14 +191,14 @@ endif
 
 
 endif # HAVE_x86_64
 endif # HAVE_x86_64
 endif # HAS_YASM
 endif # HAS_YASM
-endif # HAS_CPUMINE
+endif # USE_CPUMINING
 endif # USE_SHA256D
 endif # USE_SHA256D
 
 
-if HAS_SCRYPT
+if USE_SCRYPT
 bfgminer_SOURCES += scrypt.c scrypt.h
 bfgminer_SOURCES += scrypt.c scrypt.h
 dist_doc_DATA += README.scrypt
 dist_doc_DATA += README.scrypt
 
 
-if HAVE_OPENCL
+if USE_OPENCL
 dist_kernels_DATA += \
 dist_kernels_DATA += \
 	$(top_srcdir)/opencl/psw.cl  \
 	$(top_srcdir)/opencl/psw.cl  \
 	$(top_srcdir)/opencl/scrypt.cl  \
 	$(top_srcdir)/opencl/scrypt.cl  \
@@ -206,10 +206,10 @@ dist_kernels_DATA += \
 endif
 endif
 endif
 endif
 
 
-if HAS_CPUMINE
+if USE_CPUMINING
 dist_doc_DATA += README.CPU
 dist_doc_DATA += README.CPU
 bfgminer_SOURCES += driver-cpu.h driver-cpu.c
 bfgminer_SOURCES += driver-cpu.h driver-cpu.c
-endif # HAS_CPUMINE
+endif # USE_CPUMINING
 
 
 if NEED_BFG_LOWL_VCOM
 if NEED_BFG_LOWL_VCOM
 bfgminer_SOURCES += lowl-vcom.c lowl-vcom.h
 bfgminer_SOURCES += lowl-vcom.c lowl-vcom.h
@@ -247,11 +247,11 @@ if HAS_ASIC
 dist_doc_DATA += README.ASIC
 dist_doc_DATA += README.ASIC
 endif
 endif
 
 
-if HAS_BITFORCE
+if USE_BITFORCE
 bfgminer_SOURCES += driver-bitforce.c
 bfgminer_SOURCES += driver-bitforce.c
 endif
 endif
 
 
-if HAS_BIGPIC
+if USE_BIGPIC
 bfgminer_SOURCES += driver-bigpic.c driver-bigpic.h
 bfgminer_SOURCES += driver-bigpic.c driver-bigpic.h
 endif
 endif
 
 
@@ -259,11 +259,11 @@ if USE_DRILLBIT
 bfgminer_SOURCES += driver-drillbit.c
 bfgminer_SOURCES += driver-drillbit.c
 endif
 endif
 
 
-if HAS_TWINFURY
+if USE_TWINFURY
 bfgminer_SOURCES += driver-twinfury.c driver-twinfury.h
 bfgminer_SOURCES += driver-twinfury.c driver-twinfury.h
 endif
 endif
 
 
-if HAS_ICARUS
+if USE_ICARUS
 bfgminer_SOURCES += driver-icarus.c driver-icarus.h
 bfgminer_SOURCES += driver-icarus.c driver-icarus.h
 bfgminer_SOURCES += driver-cairnsmore.c
 bfgminer_SOURCES += driver-cairnsmore.c
 bfgminer_SOURCES += driver-erupter.c
 bfgminer_SOURCES += driver-erupter.c
@@ -286,7 +286,7 @@ if USE_ZEUSMINER
 bfgminer_SOURCES += driver-zeusminer.c
 bfgminer_SOURCES += driver-zeusminer.c
 endif
 endif
 
 
-if HAS_AVALON
+if USE_AVALON
 bfgminer_SOURCES += driver-avalon.c driver-avalon.h
 bfgminer_SOURCES += driver-avalon.c driver-avalon.h
 endif
 endif
 
 
@@ -302,11 +302,11 @@ if USE_KNCASIC
 bfgminer_SOURCES += driver-kncasic.c
 bfgminer_SOURCES += driver-kncasic.c
 endif
 endif
 
 
-if HAS_KLONDIKE
+if USE_KLONDIKE
 bfgminer_SOURCES += driver-klondike.c driver-klondike.h driver-hashbusteravalon.c
 bfgminer_SOURCES += driver-klondike.c driver-klondike.h driver-hashbusteravalon.c
 endif
 endif
 
 
-if HAS_MODMINER
+if USE_MODMINER
 bfgminer_SOURCES += driver-modminer.c
 bfgminer_SOURCES += driver-modminer.c
 endif
 endif
 
 
@@ -318,11 +318,11 @@ if NEED_KNC_ASIC
 bfgminer_SOURCES += knc-asic/knc-asic.c knc-asic/knc-spimux.c knc-asic/knc-transport-spimux.c knc-asic/include/knc-asic.h knc-asic/include/knc-transport.h
 bfgminer_SOURCES += knc-asic/knc-asic.c knc-asic/knc-spimux.c knc-asic/knc-transport-spimux.c knc-asic/include/knc-asic.h knc-asic/include/knc-transport.h
 endif
 endif
 
 
-if HAS_X6500
+if USE_X6500
 bfgminer_SOURCES += driver-x6500.c jtag.c jtag.h
 bfgminer_SOURCES += driver-x6500.c jtag.c jtag.h
 endif
 endif
 
 
-if HAS_ZTEX
+if USE_ZTEX
 bfgminer_SOURCES += driver-ztex.c libztex.c libztex.h
 bfgminer_SOURCES += driver-ztex.c libztex.c libztex.h
 endif
 endif
 
 
@@ -330,10 +330,10 @@ if USE_BIFURY
 bfgminer_SOURCES += driver-bifury.c
 bfgminer_SOURCES += driver-bifury.c
 endif
 endif
 
 
-if HAS_BITFURY
+if USE_BITFURY
 bfgminer_SOURCES += driver-bitfury.c driver-bitfury.h libbitfury.c libbitfury.h
 bfgminer_SOURCES += driver-bitfury.c driver-bitfury.h libbitfury.c libbitfury.h
 
 
-if HAS_BFSB
+if USE_BFSB
 bfgminer_SOURCES += driver-bfsb.c
 bfgminer_SOURCES += driver-bfsb.c
 endif
 endif
 
 
@@ -341,15 +341,15 @@ if USE_BFX
 bfgminer_SOURCES += driver-bfx.c
 bfgminer_SOURCES += driver-bfx.c
 endif
 endif
 
 
-if HAS_METABANK
+if USE_METABANK
 bfgminer_SOURCES += driver-metabank.c tm_i2c.h tm_i2c.c
 bfgminer_SOURCES += driver-metabank.c tm_i2c.h tm_i2c.c
 endif
 endif
 
 
-if HAS_LITTLEFURY
+if USE_LITTLEFURY
 bfgminer_SOURCES += driver-littlefury.c
 bfgminer_SOURCES += driver-littlefury.c
 endif
 endif
 
 
-if HAS_NANOFURY
+if USE_NANOFURY
 bfgminer_SOURCES += driver-nanofury.c mcp2210.c mcp2210.h
 bfgminer_SOURCES += driver-nanofury.c mcp2210.c mcp2210.h
 endif
 endif
 
 

+ 16 - 13
README

@@ -143,44 +143,47 @@ BFGMiner driver configuration options:
 	                        Include udev rules for ambiguous devices which may
 	                        Include udev rules for ambiguous devices which may
 	                        not be miners
 	                        not be miners
 	--disable-avalon        Compile support for Avalon (default enabled)
 	--disable-avalon        Compile support for Avalon (default enabled)
+	--disable-avalonmm      Compile support for Avalon2/3 (default enabled)
 	--enable-bfsb           Compile support for BFSB (default disabled)
 	--enable-bfsb           Compile support for BFSB (default disabled)
-	--disable-bfx           Compile support for BFx2 (default if libusb)
+	--disable-bfx           Compile support for BFx2 (default enabled)
 	--disable-bifury        Compile support for Bi*Fury (default enabled)
 	--disable-bifury        Compile support for Bi*Fury (default enabled)
 	--disable-bigpic        Compile support for Big Picture Mining USB (default
 	--disable-bigpic        Compile support for Big Picture Mining USB (default
 	                        enabled)
 	                        enabled)
 	--disable-bitforce      Compile support for BitForce (default enabled)
 	--disable-bitforce      Compile support for BitForce (default enabled)
 	--disable-bitfury       Compile support for Bitfury (default enabled)
 	--disable-bitfury       Compile support for Bitfury (default enabled)
-	--enable-cpumining      Build with CPU mining support (default disabled)
+	--disable-cointerra     Compile support for CoinTerra (default enabled)
+	--enable-cpumining      Compile support for CPU mining (default disabled)
 	--disable-drillbit      Compile support for DrillBit (default enabled)
 	--disable-drillbit      Compile support for DrillBit (default enabled)
 	--disable-dualminer     Compile support for DualMiner (default enabled)
 	--disable-dualminer     Compile support for DualMiner (default enabled)
-	--disable-gridseed      Compile support for GridSeed (default enabled with
-	                        scrypt)
+	--disable-gridseed      Compile support for GridSeed (default enabled)
 	--disable-hashbuster    Compile support for HashBuster Nano (default
 	--disable-hashbuster    Compile support for HashBuster Nano (default
 	                        enabled)
 	                        enabled)
-	--disable-hashbusterusb Compile support for HashBuster Micro (default if
-	                        libusb)
+	--disable-hashbusterusb Compile support for HashBuster Micro (default
+	                        enabled)
 	--disable-hashfast      Compile support for HashFast (default enabled)
 	--disable-hashfast      Compile support for HashFast (default enabled)
 	--disable-icarus        Compile support for Icarus (default enabled)
 	--disable-icarus        Compile support for Icarus (default enabled)
 	--enable-jingtian       Compile support for JingTian (default disabled)
 	--enable-jingtian       Compile support for JingTian (default disabled)
 	--disable-klondike      Compile support for Klondike (default enabled)
 	--disable-klondike      Compile support for Klondike (default enabled)
 	--enable-knc            Compile support for KnC (default disabled)
 	--enable-knc            Compile support for KnC (default disabled)
+	--enable-kncasic        Compile support for KnC gen 2 (default disabled)
 	--disable-littlefury    Compile support for LittleFury (default enabled)
 	--disable-littlefury    Compile support for LittleFury (default enabled)
 	--enable-metabank       Compile support for Metabank (default disabled)
 	--enable-metabank       Compile support for Metabank (default disabled)
+	--enable-minergate      Compile support for Spondoolies minergate interface
+	                        (default disabled)
 	--disable-modminer      Compile support for ModMiner (default enabled)
 	--disable-modminer      Compile support for ModMiner (default enabled)
 	--disable-nanofury      Compile support for NanoFury (default enabled)
 	--disable-nanofury      Compile support for NanoFury (default enabled)
 	--enable-opencl         Compile support for OpenCL (default disabled)
 	--enable-opencl         Compile support for OpenCL (default disabled)
 	--disable-adl           Build without ADL monitoring (default enabled)
 	--disable-adl           Build without ADL monitoring (default enabled)
 	--disable-rockminer     Compile support for RockMiner (default enabled)
 	--disable-rockminer     Compile support for RockMiner (default enabled)
 	--enable-titan          Compile support for KnC Titan (default disabled)
 	--enable-titan          Compile support for KnC Titan (default disabled)
-	--disable-twinfury      Compile support for Twinfury USB miner (default
-	                        enabled)
-	--disable-x6500         Compile support for X6500 (default if libusb)
-	--disable-zeusminer     Compile support for ZeusMiner (default enabled with
-	                        scrypt)
-	--disable-ztex          Compile support for ZTEX (default if libusb)
+	--disable-twinfury      Compile support for Twinfury (default enabled)
+	--disable-x6500         Compile support for X6500 (default enabled)
+	--disable-zeusminer     Compile support for ZeusMiner (default enabled)
+	--disable-ztex          Compile support for ZTEX (default enabled)
 
 
 BFGMiner algorithm configuration option:
 BFGMiner algorithm configuration option:
-	--enable-scrypt         Compile support for scrypt mining (default disabled)
+	--disable-sha256d       Compile support for SHA256d (default enabled)
+	--enable-scrypt         Compile support for scrypt (default disabled)
 
 
 BFGMiner dependency configuration options:
 BFGMiner dependency configuration options:
 	--without-curses        Compile support for curses TUI (default enabled)
 	--without-curses        Compile support for curses TUI (default enabled)

+ 25 - 25
api.c

@@ -75,7 +75,7 @@ static const char *ALIVE = "Alive";
 static const char *REJECTING = "Rejecting";
 static const char *REJECTING = "Rejecting";
 static const char *UNKNOWN = "Unknown";
 static const char *UNKNOWN = "Unknown";
 #define _DYNAMIC "D"
 #define _DYNAMIC "D"
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 static const char *DYNAMIC = _DYNAMIC;
 static const char *DYNAMIC = _DYNAMIC;
 #endif
 #endif
 
 
@@ -126,7 +126,7 @@ static const char *OSINFO =
 #define _PGA		"PGA"
 #define _PGA		"PGA"
 #endif
 #endif
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 #define _CPU		"CPU"
 #define _CPU		"CPU"
 #endif
 #endif
 
 
@@ -166,7 +166,7 @@ static const char ISJSON = '{';
 #define JSON_PGA	JSON1 _PGA JSON2
 #define JSON_PGA	JSON1 _PGA JSON2
 #endif
 #endif
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 #define JSON_CPU	JSON1 _CPU JSON2
 #define JSON_CPU	JSON1 _CPU JSON2
 #endif
 #endif
 
 
@@ -203,7 +203,7 @@ static const char *JSON_PARAMETER = "parameter";
 #define MSG_MISID 15
 #define MSG_MISID 15
 #define MSG_GPUDEV 17
 #define MSG_GPUDEV 17
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 #define MSG_CPUNON 16
 #define MSG_CPUNON 16
 #define MSG_CPUDEV 18
 #define MSG_CPUDEV 18
 #define MSG_INVCPU 19
 #define MSG_INVCPU 19
@@ -352,7 +352,7 @@ struct CODES {
 	const enum code_parameters params;
 	const enum code_parameters params;
 	const char *description;
 	const char *description;
 } codes[] = {
 } codes[] = {
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
  { SEVERITY_ERR,   MSG_INVGPU,	PARAM_GPUMAX,	"Invalid GPU id %d - range is 0 - %d" },
  { SEVERITY_ERR,   MSG_INVGPU,	PARAM_GPUMAX,	"Invalid GPU id %d - range is 0 - %d" },
  { SEVERITY_INFO,  MSG_ALRENA,	PARAM_GPU,	"GPU %d already enabled" },
  { SEVERITY_INFO,  MSG_ALRENA,	PARAM_GPU,	"GPU %d already enabled" },
  { SEVERITY_INFO,  MSG_ALRDIS,	PARAM_GPU,	"GPU %d already disabled" },
  { SEVERITY_INFO,  MSG_ALRDIS,	PARAM_GPU,	"GPU %d already disabled" },
@@ -371,13 +371,13 @@ struct CODES {
  },
  },
 
 
  { SEVERITY_SUCC,  MSG_SUMM,	PARAM_NONE,	"Summary" },
  { SEVERITY_SUCC,  MSG_SUMM,	PARAM_NONE,	"Summary" },
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
  { SEVERITY_INFO,  MSG_GPUDIS,	PARAM_GPU,	"GPU %d set disable flag" },
  { SEVERITY_INFO,  MSG_GPUDIS,	PARAM_GPU,	"GPU %d set disable flag" },
  { SEVERITY_INFO,  MSG_GPUREI,	PARAM_GPU,	"GPU %d restart attempted" },
  { SEVERITY_INFO,  MSG_GPUREI,	PARAM_GPU,	"GPU %d restart attempted" },
 #endif
 #endif
  { SEVERITY_ERR,   MSG_INVCMD,	PARAM_NONE,	"Invalid command" },
  { SEVERITY_ERR,   MSG_INVCMD,	PARAM_NONE,	"Invalid command" },
  { SEVERITY_ERR,   MSG_MISID,	PARAM_NONE,	"Missing device id parameter" },
  { SEVERITY_ERR,   MSG_MISID,	PARAM_NONE,	"Missing device id parameter" },
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
  { SEVERITY_SUCC,  MSG_GPUDEV,	PARAM_GPU,	"GPU%d" },
  { SEVERITY_SUCC,  MSG_GPUDEV,	PARAM_GPU,	"GPU%d" },
 #endif
 #endif
 #ifdef HAVE_AN_FPGA
 #ifdef HAVE_AN_FPGA
@@ -390,7 +390,7 @@ struct CODES {
  { SEVERITY_INFO,  MSG_PGADIS,	PARAM_PGA,	"PGA %d set disable flag" },
  { SEVERITY_INFO,  MSG_PGADIS,	PARAM_PGA,	"PGA %d set disable flag" },
  { SEVERITY_ERR,   MSG_PGAUNW,	PARAM_PGA,	"PGA %d is not flagged WELL, cannot enable" },
  { SEVERITY_ERR,   MSG_PGAUNW,	PARAM_PGA,	"PGA %d is not flagged WELL, cannot enable" },
 #endif
 #endif
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
  { SEVERITY_ERR,   MSG_CPUNON,	PARAM_NONE,	"No CPUs" },
  { SEVERITY_ERR,   MSG_CPUNON,	PARAM_NONE,	"No CPUs" },
  { SEVERITY_SUCC,  MSG_CPUDEV,	PARAM_CPU,	"CPU%d" },
  { SEVERITY_SUCC,  MSG_CPUDEV,	PARAM_CPU,	"CPU%d" },
  { SEVERITY_ERR,   MSG_INVCPU,	PARAM_CPUMAX,	"Invalid CPU id %d - range is 0 - %d" },
  { SEVERITY_ERR,   MSG_INVCPU,	PARAM_CPUMAX,	"Invalid CPU id %d - range is 0 - %d" },
@@ -416,7 +416,7 @@ struct CODES {
  { SEVERITY_ERR,   MSG_INVINT,	PARAM_STR,	"Invalid intensity (%s) - must be '" _DYNAMIC  "' or range -10 - 31" },
  { SEVERITY_ERR,   MSG_INVINT,	PARAM_STR,	"Invalid intensity (%s) - must be '" _DYNAMIC  "' or range -10 - 31" },
  { SEVERITY_INFO,  MSG_GPUINT,	PARAM_BOTH,	"GPU %d set new intensity to %s" },
  { SEVERITY_INFO,  MSG_GPUINT,	PARAM_BOTH,	"GPU %d set new intensity to %s" },
  { SEVERITY_SUCC,  MSG_MINECONFIG,PARAM_NONE,	"BFGMiner config" },
  { SEVERITY_SUCC,  MSG_MINECONFIG,PARAM_NONE,	"BFGMiner config" },
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
  { SEVERITY_ERR,   MSG_GPUMERR,	PARAM_BOTH,	"Setting GPU %d memoryclock to (%s) reported failure" },
  { SEVERITY_ERR,   MSG_GPUMERR,	PARAM_BOTH,	"Setting GPU %d memoryclock to (%s) reported failure" },
  { SEVERITY_SUCC,  MSG_GPUMEM,	PARAM_BOTH,	"Setting GPU %d memoryclock to (%s) reported success" },
  { SEVERITY_SUCC,  MSG_GPUMEM,	PARAM_BOTH,	"Setting GPU %d memoryclock to (%s) reported success" },
  { SEVERITY_ERR,   MSG_GPUEERR,	PARAM_BOTH,	"Setting GPU %d clock to (%s) reported failure" },
  { SEVERITY_ERR,   MSG_GPUEERR,	PARAM_BOTH,	"Setting GPU %d clock to (%s) reported failure" },
@@ -1144,7 +1144,7 @@ static void message(struct io_data * const io_data, const int messageid2, const
 #ifdef HAVE_AN_FPGA
 #ifdef HAVE_AN_FPGA
 	int pga;
 	int pga;
 #endif
 #endif
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 	int cpu;
 	int cpu;
 #endif
 #endif
 	int i;
 	int i;
@@ -1183,7 +1183,7 @@ static void message(struct io_data * const io_data, const int messageid2, const
 				case PARAM_POOL:
 				case PARAM_POOL:
 					sprintf(buf, codes[i].description, paramid, pools[paramid]->rpc_url);
 					sprintf(buf, codes[i].description, paramid, pools[paramid]->rpc_url);
 					break;
 					break;
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 				case PARAM_GPUMAX:
 				case PARAM_GPUMAX:
 					sprintf(buf, codes[i].description, paramid, nDevs - 1);
 					sprintf(buf, codes[i].description, paramid, nDevs - 1);
 					break;
 					break;
@@ -1194,7 +1194,7 @@ static void message(struct io_data * const io_data, const int messageid2, const
 					sprintf(buf, codes[i].description, paramid, pga - 1);
 					sprintf(buf, codes[i].description, paramid, pga - 1);
 					break;
 					break;
 #endif
 #endif
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 				case PARAM_CPUMAX:
 				case PARAM_CPUMAX:
 					if (opt_n_threads > 0)
 					if (opt_n_threads > 0)
 						cpu = num_processors;
 						cpu = num_processors;
@@ -1563,7 +1563,7 @@ void devstatus_an(struct io_data *io_data, struct cgpu_info *cgpu, bool isjson,
 	io_add(io_data, buf);
 	io_add(io_data, buf);
 }
 }
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 static void gpustatus(struct io_data *io_data, int gpu, bool isjson, bool precom)
 static void gpustatus(struct io_data *io_data, int gpu, bool isjson, bool precom)
 {
 {
         if (gpu < 0 || gpu >= nDevs)
         if (gpu < 0 || gpu >= nDevs)
@@ -1582,7 +1582,7 @@ static void pgastatus(struct io_data *io_data, int pga, bool isjson, bool precom
 }
 }
 #endif
 #endif
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 static void cpustatus(struct io_data *io_data, int cpu, bool isjson, bool precom)
 static void cpustatus(struct io_data *io_data, int cpu, bool isjson, bool precom)
 {
 {
         if (opt_n_threads <= 0 || cpu < 0 || cpu >= num_processors)
         if (opt_n_threads <= 0 || cpu < 0 || cpu >= num_processors)
@@ -1628,7 +1628,7 @@ static void devstatus(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __ma
 	return devinfo_internal(devstatus_an, MSG_DEVS, io_data, c, param, isjson, group);
 	return devinfo_internal(devstatus_an, MSG_DEVS, io_data, c, param, isjson, group);
 }
 }
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 static void gpudev(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *param, bool isjson, __maybe_unused char group)
 static void gpudev(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *param, bool isjson, __maybe_unused char group)
 {
 {
 	bool io_open = false;
 	bool io_open = false;
@@ -1846,7 +1846,7 @@ static void pgaidentify(struct io_data *io_data, __maybe_unused SOCKETTYPE c, ch
 }
 }
 #endif
 #endif
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 static void cpudev(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *param, bool isjson, __maybe_unused char group)
 static void cpudev(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *param, bool isjson, __maybe_unused char group)
 {
 {
 	bool io_open = false;
 	bool io_open = false;
@@ -2000,7 +2000,7 @@ static void summary(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __mayb
 	work_utility = total_diff1 / ( total_secs ? total_secs : 1 ) * 60;
 	work_utility = total_diff1 / ( total_secs ? total_secs : 1 ) * 60;
 
 
 	root = api_add_elapsed(root, "Elapsed", &(total_secs), true);
 	root = api_add_elapsed(root, "Elapsed", &(total_secs), true);
-#if defined(WANT_CPUMINE) && defined(USE_SHA256D)
+#if defined(USE_CPUMINING) && defined(USE_SHA256D)
 	if (opt_n_threads > 0)
 	if (opt_n_threads > 0)
 		root = api_add_string(root, "Algorithm", (algo_names[opt_algo] ?: NULLSTR), false);
 		root = api_add_string(root, "Algorithm", (algo_names[opt_algo] ?: NULLSTR), false);
 #endif
 #endif
@@ -2049,7 +2049,7 @@ static void summary(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __mayb
 		io_close(io_data);
 		io_close(io_data);
 }
 }
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 static void gpuenable(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *param, bool isjson, __maybe_unused char group)
 static void gpuenable(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *param, bool isjson, __maybe_unused char group)
 {
 {
 	int id;
 	int id;
@@ -2154,7 +2154,7 @@ static void gpucount(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __may
 	bool io_open;
 	bool io_open;
 	int numgpu = 0;
 	int numgpu = 0;
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	numgpu = nDevs;
 	numgpu = nDevs;
 #endif
 #endif
 
 
@@ -2191,7 +2191,7 @@ static void pgacount(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __may
 		io_close(io_data);
 		io_close(io_data);
 }
 }
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 static void cpuenable(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *param, bool isjson, __maybe_unused char group)
 static void cpuenable(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *param, bool isjson, __maybe_unused char group)
 {
 {
 	int id;
 	int id;
@@ -2299,7 +2299,7 @@ static void cpucount(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __may
 	bool io_open;
 	bool io_open;
 	int count = 0;
 	int count = 0;
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 	count = opt_n_threads > 0 ? num_processors : 0;
 	count = opt_n_threads > 0 ? num_processors : 0;
 #endif
 #endif
 
 
@@ -2622,7 +2622,7 @@ static void removepool(struct io_data *io_data, __maybe_unused SOCKETTYPE c, cha
 	rpc_url = NULL;
 	rpc_url = NULL;
 }
 }
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 static bool splitgpuvalue(struct io_data *io_data, char *param, int *gpu, char **value, bool isjson)
 static bool splitgpuvalue(struct io_data *io_data, char *param, int *gpu, char **value, bool isjson)
 {
 {
 	int id;
 	int id;
@@ -3397,7 +3397,7 @@ struct CMDS {
 	{ "procs",		devstatus,	false,	true },
 	{ "procs",		devstatus,	false,	true },
 	{ "pools",		poolstatus,	false,	true },
 	{ "pools",		poolstatus,	false,	true },
 	{ "summary",		summary,	false,	true },
 	{ "summary",		summary,	false,	true },
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	{ "gpuenable",		gpuenable,	true,	false },
 	{ "gpuenable",		gpuenable,	true,	false },
 	{ "gpudisable",		gpudisable,	true,	false },
 	{ "gpudisable",		gpudisable,	true,	false },
 	{ "gpurestart",		gpurestart,	true,	false },
 	{ "gpurestart",		gpurestart,	true,	false },
@@ -3414,7 +3414,7 @@ struct CMDS {
 	{ "procdisable",		pgadisable,	true,	false },
 	{ "procdisable",		pgadisable,	true,	false },
 	{ "procidentify",	pgaidentify,	true,	false },
 	{ "procidentify",	pgaidentify,	true,	false },
 #endif
 #endif
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 	{ "cpuenable",		cpuenable,	true,	false },
 	{ "cpuenable",		cpuenable,	true,	false },
 	{ "cpudisable",		cpudisable,	true,	false },
 	{ "cpudisable",		cpudisable,	true,	false },
 	{ "cpurestart",		cpurestart,	true,	false },
 	{ "cpurestart",		cpurestart,	true,	false },
@@ -3431,7 +3431,7 @@ struct CMDS {
 	{ "enablepool",		enablepool,	true,	false },
 	{ "enablepool",		enablepool,	true,	false },
 	{ "disablepool",	disablepool,	true,	false },
 	{ "disablepool",	disablepool,	true,	false },
 	{ "removepool",		removepool,	true,	false },
 	{ "removepool",		removepool,	true,	false },
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	{ "gpuintensity",	gpuintensity,	true,	false },
 	{ "gpuintensity",	gpuintensity,	true,	false },
 	{ "gpumem",		gpumem,		true,	false },
 	{ "gpumem",		gpumem,		true,	false },
 	{ "gpuengine",		gpuengine,	true,	false },
 	{ "gpuengine",		gpuengine,	true,	false },

File diff suppressed because it is too large
+ 184 - 575
configure.ac


+ 5 - 5
driver-cpu.c

@@ -98,7 +98,7 @@ extern bool scanhash_sse2_32(struct thr_info *, struct work *, uint32_t max_nonc
 extern bool scanhash_scrypt(struct thr_info *, struct work *, uint32_t max_nonce, uint32_t *last_nonce, uint32_t nonce);
 extern bool scanhash_scrypt(struct thr_info *, struct work *, uint32_t max_nonce, uint32_t *last_nonce, uint32_t nonce);
 
 
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 #ifdef USE_SHA256D
 #ifdef USE_SHA256D
 static size_t max_name_len = 0;
 static size_t max_name_len = 0;
 static char *name_spaces_pad = NULL;
 static char *name_spaces_pad = NULL;
@@ -170,7 +170,7 @@ static const sha256_func sha256_funcs[] = {
 
 
 
 
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 #ifdef USE_SHA256D
 #ifdef USE_SHA256D
 enum sha256_algos opt_algo = ALGO_FASTAUTO;
 enum sha256_algos opt_algo = ALGO_FASTAUTO;
 #endif
 #endif
@@ -189,7 +189,7 @@ const uint32_t hash1_init[] = {
 
 
 
 
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 // Algo benchmark, crash-prone, system independent stage
 // Algo benchmark, crash-prone, system independent stage
 double bench_algo_stage3(
 double bench_algo_stage3(
 	enum sha256_algos algo
 	enum sha256_algos algo
@@ -648,7 +648,7 @@ void show_algo(char buf[OPT_SHOW_LEN], const enum sha256_algos *algo)
 #endif  /* USE_SHA256D */
 #endif  /* USE_SHA256D */
 #endif
 #endif
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 char *force_nthreads_int(const char *arg, int *i)
 char *force_nthreads_int(const char *arg, int *i)
 {
 {
 	forced_n_threads = true;
 	forced_n_threads = true;
@@ -656,7 +656,7 @@ char *force_nthreads_int(const char *arg, int *i)
 }
 }
 #endif
 #endif
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 static int cpu_autodetect()
 static int cpu_autodetect()
 {
 {
 	RUNONCE(0);
 	RUNONCE(0);

+ 11 - 11
driver-opencl.c

@@ -50,7 +50,7 @@
 /* TODO: cleanup externals ********************/
 /* TODO: cleanup externals ********************/
 
 
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 /* Platform API */
 /* Platform API */
 CL_API_ENTRY cl_int CL_API_CALL
 CL_API_ENTRY cl_int CL_API_CALL
 (*clGetPlatformIDs)(cl_uint          /* num_entries */,
 (*clGetPlatformIDs)(cl_uint          /* num_entries */,
@@ -371,7 +371,7 @@ const char *set_ ## PNAME(char *arg)  \
 #define _SET_INT_LIST(PNAME, VCHECK, FIELD)  \
 #define _SET_INT_LIST(PNAME, VCHECK, FIELD)  \
 	_SET_INT_LIST2(PNAME, VCHECK, ((struct opencl_device_data *)cgpu->device_data)->FIELD)
 	_SET_INT_LIST2(PNAME, VCHECK, ((struct opencl_device_data *)cgpu->device_data)->FIELD)
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 _SET_INT_LIST(vector  , (v == 1 || v == 2 || v == 4), vwidth   )
 _SET_INT_LIST(vector  , (v == 1 || v == 2 || v == 4), vwidth   )
 _SET_INT_LIST(worksize, (v >= 1 && v <= 9999)       , work_size)
 _SET_INT_LIST(worksize, (v >= 1 && v <= 9999)       , work_size)
 
 
@@ -662,7 +662,7 @@ const char *opencl_set_gpu_vddc(struct cgpu_info * const proc, const char * cons
 _SET_INT_LIST(temp_overheat, (v >=     0 && v <   200), adl.overtemp )
 _SET_INT_LIST(temp_overheat, (v >=     0 && v <   200), adl.overtemp )
 #endif
 #endif
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 double oclthreads_to_xintensity(const unsigned long oclthreads, const cl_uint max_compute_units)
 double oclthreads_to_xintensity(const unsigned long oclthreads, const cl_uint max_compute_units)
 {
 {
 	return (double)oclthreads / (double)max_compute_units / 64.;
 	return (double)oclthreads / (double)max_compute_units / 64.;
@@ -771,7 +771,7 @@ void write_config_opencl(FILE * const fcfg)
 }
 }
 
 
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 BFG_REGISTER_DRIVER(opencl_api)
 BFG_REGISTER_DRIVER(opencl_api)
 static const struct bfg_set_device_definition opencl_set_device_funcs_probe[];
 static const struct bfg_set_device_definition opencl_set_device_funcs_probe[];
 static const struct bfg_set_device_definition opencl_set_device_funcs[];
 static const struct bfg_set_device_definition opencl_set_device_funcs[];
@@ -792,7 +792,7 @@ struct cgpu_info *cpus;
 
 
 
 
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 
 
 /* In dynamic mode, only the first thread of each device will be in use.
 /* In dynamic mode, only the first thread of each device will be in use.
  * This potentially could start a thread that was stopped with the start-stop
  * This potentially could start a thread that was stopped with the start-stop
@@ -820,7 +820,7 @@ void pause_dynamic_threads(int gpu)
 
 
 struct device_drv opencl_api;
 struct device_drv opencl_api;
 
 
-#endif /* HAVE_OPENCL */
+#endif /* USE_OPENCL */
 
 
 float opencl_proc_get_intensity(struct cgpu_info * const proc, const char ** const iunit)
 float opencl_proc_get_intensity(struct cgpu_info * const proc, const char ** const iunit)
 {
 {
@@ -839,7 +839,7 @@ float opencl_proc_get_intensity(struct cgpu_info * const proc, const char ** con
 	return intensity;
 	return intensity;
 }
 }
 
 
-#if defined(HAVE_OPENCL) && defined(HAVE_CURSES)
+#if defined(USE_OPENCL) && defined(HAVE_CURSES)
 static
 static
 void opencl_wlogprint_status(struct cgpu_info *cgpu)
 void opencl_wlogprint_status(struct cgpu_info *cgpu)
 {
 {
@@ -992,7 +992,7 @@ const char *opencl_tui_handle_choice(struct cgpu_info *cgpu, int input)
 #endif
 #endif
 
 
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 
 
 #define CL_SET_BLKARG(blkvar) status |= clSetKernelArg(*kernel, num++, sizeof(uint), (void *)&blk->blkvar)
 #define CL_SET_BLKARG(blkvar) status |= clSetKernelArg(*kernel, num++, sizeof(uint), (void *)&blk->blkvar)
 #define CL_SET_ARG(var) status |= clSetKernelArg(*kernel, num++, sizeof(var), (void *)&var)
 #define CL_SET_ARG(var) status |= clSetKernelArg(*kernel, num++, sizeof(var), (void *)&var)
@@ -1268,7 +1268,7 @@ cl_int queue_scrypt_kernel(const struct opencl_kernel_info * const kinfo, _clSta
 	return status;
 	return status;
 }
 }
 #endif
 #endif
-#endif /* HAVE_OPENCL */
+#endif /* USE_OPENCL */
 
 
 
 
 static
 static
@@ -1286,7 +1286,7 @@ struct opencl_kernel_interface kernel_interfaces[] = {
 };
 };
 
 
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 /* We have only one thread that ever re-initialises GPUs, thus if any GPU
 /* We have only one thread that ever re-initialises GPUs, thus if any GPU
  * init command fails due to a completely wedged GPU, the thread will never
  * init command fails due to a completely wedged GPU, the thread will never
  * return, unable to harm other GPUs. If it does return, it means we only had
  * return, unable to harm other GPUs. If it does return, it means we only had
@@ -1380,7 +1380,7 @@ void *reinit_gpu(__maybe_unused void *userdata)
 #endif
 #endif
 
 
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 struct device_drv opencl_api;
 struct device_drv opencl_api;
 
 
 static int opencl_autodetect()
 static int opencl_autodetect()

+ 2 - 2
findnonce.c

@@ -10,7 +10,7 @@
  */
  */
 
 
 #include "config.h"
 #include "config.h"
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 
 
 #include <stdint.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdio.h>
@@ -207,4 +207,4 @@ void postcalc_hash_async(struct thr_info *thr, struct work *work, uint32_t *res)
 		return;
 		return;
 	}
 	}
 }
 }
-#endif /* HAVE_OPENCL */
+#endif /* USE_OPENCL */

+ 2 - 2
findnonce.h

@@ -22,10 +22,10 @@
 #define OPENCL_MAX_BUFFERSIZE  BUFFERSIZE
 #define OPENCL_MAX_BUFFERSIZE  BUFFERSIZE
 #endif
 #endif
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 #ifdef USE_SHA256D
 #ifdef USE_SHA256D
 extern void precalc_hash(struct opencl_work_data *blk, uint32_t *state, uint32_t *data);
 extern void precalc_hash(struct opencl_work_data *blk, uint32_t *state, uint32_t *data);
 #endif
 #endif
 extern void postcalc_hash_async(struct thr_info *thr, struct work *work, uint32_t *res);
 extern void postcalc_hash_async(struct thr_info *thr, struct work *work, uint32_t *res);
-#endif /* HAVE_OPENCL */
+#endif /* USE_OPENCL */
 #endif /*__FINDNONCE_H__*/
 #endif /*__FINDNONCE_H__*/

+ 31 - 31
miner.c

@@ -169,7 +169,7 @@ unsigned unittest_failures;
 unsigned long global_quota_gcd = 1;
 unsigned long global_quota_gcd = 1;
 time_t last_getwork;
 time_t last_getwork;
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 int opt_dynamic_interval = 7;
 int opt_dynamic_interval = 7;
 int nDevs;
 int nDevs;
 int opt_g_threads = -1;
 int opt_g_threads = -1;
@@ -1034,7 +1034,7 @@ struct mining_algorithm *mining_algorithm_by_alias(const char * const alias)
 }
 }
 
 
 
 
-#if defined(USE_SHA256D) && defined(HAVE_OPENCL)
+#if defined(USE_SHA256D) && defined(USE_OPENCL)
 static
 static
 float opencl_oclthreads_to_intensity_sha256d(const unsigned long oclthreads)
 float opencl_oclthreads_to_intensity_sha256d(const unsigned long oclthreads)
 {
 {
@@ -1060,7 +1060,7 @@ static struct mining_algorithm malgo_sha256d = {
 	
 	
 	.hash_data_f = hash_data,
 	.hash_data_f = hash_data,
 	
 	
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	.opencl_nodefault = true,
 	.opencl_nodefault = true,
 	.opencl_oclthreads_to_intensity = opencl_oclthreads_to_intensity_sha256d,
 	.opencl_oclthreads_to_intensity = opencl_oclthreads_to_intensity_sha256d,
 	.opencl_intensity_to_oclthreads = opencl_intensity_to_oclthreads_sha256d,
 	.opencl_intensity_to_oclthreads = opencl_intensity_to_oclthreads_sha256d,
@@ -1072,7 +1072,7 @@ static struct mining_algorithm malgo_sha256d = {
 
 
 
 
 #ifdef USE_SCRYPT
 #ifdef USE_SCRYPT
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 static
 static
 float opencl_oclthreads_to_intensity_scrypt(const unsigned long oclthreads)
 float opencl_oclthreads_to_intensity_scrypt(const unsigned long oclthreads)
 {
 {
@@ -1096,7 +1096,7 @@ static struct mining_algorithm malgo_scrypt = {
 	
 	
 	.hash_data_f = scrypt_hash_data,
 	.hash_data_f = scrypt_hash_data,
 	
 	
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	.opencl_oclthreads_to_intensity = opencl_oclthreads_to_intensity_scrypt,
 	.opencl_oclthreads_to_intensity = opencl_oclthreads_to_intensity_scrypt,
 	.opencl_intensity_to_oclthreads = opencl_intensity_to_oclthreads_scrypt,
 	.opencl_intensity_to_oclthreads = opencl_intensity_to_oclthreads_scrypt,
 	.opencl_min_oclthreads =      0x100,  // intensity   8
 	.opencl_min_oclthreads =      0x100,  // intensity   8
@@ -2164,7 +2164,7 @@ char *set_temp_target(char *arg)
 	return NULL;
 	return NULL;
 }
 }
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 static
 static
 char *set_no_opencl_binaries(__maybe_unused void * const dummy)
 char *set_no_opencl_binaries(__maybe_unused void * const dummy)
 {
 {
@@ -2315,7 +2315,7 @@ static char *set_null(const char __maybe_unused *arg)
 
 
 /* These options are available from config file or commandline */
 /* These options are available from config file or commandline */
 static struct opt_table opt_config_table[] = {
 static struct opt_table opt_config_table[] = {
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 #ifdef USE_SHA256D
 #ifdef USE_SHA256D
 	OPT_WITH_ARG("--algo",
 	OPT_WITH_ARG("--algo",
 		     set_algo, show_algo, &opt_algo,
 		     set_algo, show_algo, &opt_algo,
@@ -2353,7 +2353,7 @@ static struct opt_table opt_config_table[] = {
 	// NOTE: Silently ignoring option, since it is plausable a non-SHA256d miner was using it just to skip benchmarking
 	// NOTE: Silently ignoring option, since it is plausable a non-SHA256d miner was using it just to skip benchmarking
 	OPT_WITH_ARG("--algo|-a", arg_ignored, NULL, NULL, opt_hidden),
 	OPT_WITH_ARG("--algo|-a", arg_ignored, NULL, NULL, opt_hidden),
 #endif  /* USE_SHA256D */
 #endif  /* USE_SHA256D */
-#endif  /* WANT_CPUMINE */
+#endif  /* USE_CPUMINING */
 	OPT_WITH_ARG("--api-allow",
 	OPT_WITH_ARG("--api-allow",
 		     set_api_allow, NULL, NULL,
 		     set_api_allow, NULL, NULL,
 		     "Allow API access only to the given list of [G:]IP[/Prefix] addresses[/subnets]"),
 		     "Allow API access only to the given list of [G:]IP[/Prefix] addresses[/subnets]"),
@@ -2436,7 +2436,7 @@ static struct opt_table opt_config_table[] = {
 			opt_set_bool, &opt_compact,
 			opt_set_bool, &opt_compact,
 			"Use compact display without per device statistics"),
 			"Use compact display without per device statistics"),
 #endif
 #endif
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 	OPT_WITH_ARG("--cpu-threads",
 	OPT_WITH_ARG("--cpu-threads",
 		     force_nthreads_int, opt_show_intval, &opt_n_threads,
 		     force_nthreads_int, opt_show_intval, &opt_n_threads,
 		     "Number of miner CPU threads"),
 		     "Number of miner CPU threads"),
@@ -2492,7 +2492,7 @@ static struct opt_table opt_config_table[] = {
 	             set_generate_addr, NULL, NULL,
 	             set_generate_addr, NULL, NULL,
 	             opt_hidden),
 	             opt_hidden),
 #endif
 #endif
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	OPT_WITH_ARG("--gpu-dyninterval",
 	OPT_WITH_ARG("--gpu-dyninterval",
 		     set_int_1_to_65535, opt_show_intval, &opt_dynamic_interval,
 		     set_int_1_to_65535, opt_show_intval, &opt_dynamic_interval,
 		     opt_hidden),
 		     opt_hidden),
@@ -2537,7 +2537,7 @@ static struct opt_table opt_config_table[] = {
 	             set_intensity, NULL, NULL,
 	             set_intensity, NULL, NULL,
 	             opt_hidden),
 	             opt_hidden),
 #endif
 #endif
-#if defined(HAVE_OPENCL) || defined(USE_MODMINER) || defined(USE_X6500) || defined(USE_ZTEX)
+#if defined(USE_OPENCL) || defined(USE_MODMINER) || defined(USE_X6500) || defined(USE_ZTEX)
 	OPT_WITH_ARG("--kernel-path",
 	OPT_WITH_ARG("--kernel-path",
 		     opt_set_charp, opt_show_charp, &opt_kernel_path,
 		     opt_set_charp, opt_show_charp, &opt_kernel_path,
 	             "Specify a path to where bitstream and kernel files are"),
 	             "Specify a path to where bitstream and kernel files are"),
@@ -2545,7 +2545,7 @@ static struct opt_table opt_config_table[] = {
 	             opt_set_charp, opt_show_charp, &opt_kernel_path,
 	             opt_set_charp, opt_show_charp, &opt_kernel_path,
 	             opt_hidden),
 	             opt_hidden),
 #endif
 #endif
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	OPT_WITH_ARG("--kernel|-k",
 	OPT_WITH_ARG("--kernel|-k",
 	             set_kernel, NULL, NULL,
 	             set_kernel, NULL, NULL,
 	             opt_hidden),
 	             opt_hidden),
@@ -2649,7 +2649,7 @@ static struct opt_table opt_config_table[] = {
 	OPT_WITHOUT_ARG("--no-submit-stale",
 	OPT_WITHOUT_ARG("--no-submit-stale",
 			opt_set_invbool, &opt_submit_stale,
 			opt_set_invbool, &opt_submit_stale,
 		        "Don't submit shares if they are detected as stale"),
 		        "Don't submit shares if they are detected as stale"),
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	OPT_WITHOUT_ARG("--no-opencl-binaries",
 	OPT_WITHOUT_ARG("--no-opencl-binaries",
 	                set_no_opencl_binaries, NULL,
 	                set_no_opencl_binaries, NULL,
 	                opt_hidden),
 	                opt_hidden),
@@ -2752,7 +2752,7 @@ static struct opt_table opt_config_table[] = {
 	OPT_WITH_ARG("--set-device|--set",
 	OPT_WITH_ARG("--set-device|--set",
 			opt_string_elist_add, NULL, &opt_set_device_list,
 			opt_string_elist_add, NULL, &opt_set_device_list,
 			"Set default parameters on devices; eg, NFY:osc6_bits=50"),
 			"Set default parameters on devices; eg, NFY:osc6_bits=50"),
-#if defined(USE_SCRYPT) && defined(HAVE_OPENCL)
+#if defined(USE_SCRYPT) && defined(USE_OPENCL)
 	OPT_WITH_ARG("--shaders",
 	OPT_WITH_ARG("--shaders",
 		     set_shaders, NULL, NULL,
 		     set_shaders, NULL, NULL,
 	             opt_hidden),
 	             opt_hidden),
@@ -2818,7 +2818,7 @@ static struct opt_table opt_config_table[] = {
 			opt_hidden
 			opt_hidden
 #endif
 #endif
 	),
 	),
-#if defined(USE_SCRYPT) && defined(HAVE_OPENCL)
+#if defined(USE_SCRYPT) && defined(USE_OPENCL)
 	OPT_WITH_ARG("--thread-concurrency",
 	OPT_WITH_ARG("--thread-concurrency",
 		     set_thread_concurrency, NULL, NULL,
 		     set_thread_concurrency, NULL, NULL,
 	             opt_hidden),
 	             opt_hidden),
@@ -2834,7 +2834,7 @@ static struct opt_table opt_config_table[] = {
 	OPT_WITH_ARG("--user|-u",
 	OPT_WITH_ARG("--user|-u",
 		     set_user, NULL, NULL,
 		     set_user, NULL, NULL,
 		     "Username for bitcoin JSON-RPC server"),
 		     "Username for bitcoin JSON-RPC server"),
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	OPT_WITH_ARG("--vectors|-v",
 	OPT_WITH_ARG("--vectors|-v",
 	             set_vector, NULL, NULL,
 	             set_vector, NULL, NULL,
 	             opt_hidden),
 	             opt_hidden),
@@ -2848,7 +2848,7 @@ static struct opt_table opt_config_table[] = {
 	OPT_WITHOUT_ARG("--weighed-stats",
 	OPT_WITHOUT_ARG("--weighed-stats",
 	                opt_set_bool, &opt_weighed_stats,
 	                opt_set_bool, &opt_weighed_stats,
 	                "Display statistics weighed to difficulty 1"),
 	                "Display statistics weighed to difficulty 1"),
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	OPT_WITH_ARG("--worksize|-w",
 	OPT_WITH_ARG("--worksize|-w",
 	             set_worksize, NULL, NULL,
 	             set_worksize, NULL, NULL,
 	             opt_hidden),
 	             opt_hidden),
@@ -3084,7 +3084,7 @@ static struct opt_table opt_cmdline_table[] = {
 	OPT_WITHOUT_ARG("--help|-h",
 	OPT_WITHOUT_ARG("--help|-h",
 			opt_verusage_and_exit, NULL,
 			opt_verusage_and_exit, NULL,
 			"Print this message"),
 			"Print this message"),
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	OPT_WITHOUT_ARG("--ndevs|-n",
 	OPT_WITHOUT_ARG("--ndevs|-n",
 			print_ndevs_and_exit, &nDevs,
 			print_ndevs_and_exit, &nDevs,
 			opt_hidden),
 			opt_hidden),
@@ -3742,7 +3742,7 @@ static int statusy;
 static int devsummaryYOffset;
 static int devsummaryYOffset;
 static int total_lines;
 static int total_lines;
 #endif
 #endif
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 struct cgpu_info gpus[MAX_GPUDEVICES]; /* Maximum number apparently possible */
 struct cgpu_info gpus[MAX_GPUDEVICES]; /* Maximum number apparently possible */
 #endif
 #endif
 struct cgpu_info *cpus;
 struct cgpu_info *cpus;
@@ -7854,10 +7854,10 @@ void write_config(FILE *fcfg)
 	}
 	}
 	fputs("\n]\n", fcfg);
 	fputs("\n]\n", fcfg);
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	write_config_opencl(fcfg);
 	write_config_opencl(fcfg);
 #endif
 #endif
-#if defined(WANT_CPUMINE) && defined(USE_SHA256D)
+#if defined(USE_CPUMINING) && defined(USE_SHA256D)
 	fprintf(fcfg, ",\n\"algo\" : \"%s\"", algo_names[opt_algo]);
 	fprintf(fcfg, ",\n\"algo\" : \"%s\"", algo_names[opt_algo]);
 #endif
 #endif
 
 
@@ -11643,7 +11643,7 @@ void bfg_watchdog(struct cgpu_info * const cgpu, struct timeval * const tvp_now)
 			else if (cgpu->status == LIFE_WAIT)
 			else if (cgpu->status == LIFE_WAIT)
 				cgpu->status = LIFE_WELL;
 				cgpu->status = LIFE_WELL;
 
 
-#ifdef WANT_CPUMINE
+#ifdef USE_CPUMINING
 			if (!strcmp(cgpu->drv->dname, "cpu"))
 			if (!strcmp(cgpu->drv->dname, "cpu"))
 				return;
 				return;
 #endif
 #endif
@@ -11709,7 +11709,7 @@ void print_summary(void)
 	applog(LOG_WARNING, "Started at %s", datestamp);
 	applog(LOG_WARNING, "Started at %s", datestamp);
 	if (total_pools == 1)
 	if (total_pools == 1)
 		applog(LOG_WARNING, "Pool: %s", pools[0]->rpc_url);
 		applog(LOG_WARNING, "Pool: %s", pools[0]->rpc_url);
-#if defined(WANT_CPUMINE) && defined(USE_SHA256D)
+#if defined(USE_CPUMINING) && defined(USE_SHA256D)
 	if (opt_n_threads > 0)
 	if (opt_n_threads > 0)
 		applog(LOG_WARNING, "CPU hasher algorithm used: %s", algo_names[opt_algo]);
 		applog(LOG_WARNING, "CPU hasher algorithm used: %s", algo_names[opt_algo]);
 #endif
 #endif
@@ -11815,7 +11815,7 @@ void print_summary(void)
 
 
 void _bfg_clean_up(bool restarting)
 void _bfg_clean_up(bool restarting)
 {
 {
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	clear_adl(nDevs);
 	clear_adl(nDevs);
 #endif
 #endif
 #ifdef HAVE_LIBUSB
 #ifdef HAVE_LIBUSB
@@ -12240,7 +12240,7 @@ void enable_curses(void) {
 #endif
 #endif
 
 
 /* TODO: fix need a dummy CPU device_drv even if no support for CPU mining */
 /* TODO: fix need a dummy CPU device_drv even if no support for CPU mining */
-#ifndef WANT_CPUMINE
+#ifndef USE_CPUMINING
 struct device_drv cpu_drv;
 struct device_drv cpu_drv;
 struct device_drv cpu_drv = {
 struct device_drv cpu_drv = {
 	.name = "CPU",
 	.name = "CPU",
@@ -13198,7 +13198,7 @@ int main(int argc, char *argv[])
 
 
 	snprintf(packagename, sizeof(packagename), "%s %s", PACKAGE, VERSION);
 	snprintf(packagename, sizeof(packagename), "%s %s", PACKAGE, VERSION);
 
 
-#if defined(WANT_CPUMINE) && defined(USE_SHA256D)
+#if defined(USE_CPUMINING) && defined(USE_SHA256D)
 	init_max_name_len();
 	init_max_name_len();
 #endif
 #endif
 
 
@@ -13224,7 +13224,7 @@ int main(int argc, char *argv[])
 	strcpy(cgminer_path, dirname(s));
 	strcpy(cgminer_path, dirname(s));
 	free(s);
 	free(s);
 	strcat(cgminer_path, "/");
 	strcat(cgminer_path, "/");
-#if defined(WANT_CPUMINE) && defined(WIN32)
+#if defined(USE_CPUMINING) && defined(WIN32)
 	{
 	{
 		char buf[32];
 		char buf[32];
 		int gev = GetEnvironmentVariable("BFGMINER_BENCH_ALGO", buf, sizeof(buf));
 		int gev = GetEnvironmentVariable("BFGMINER_BENCH_ALGO", buf, sizeof(buf));
@@ -13275,7 +13275,7 @@ int main(int argc, char *argv[])
 
 
 	// Ensure at least the default goal is created
 	// Ensure at least the default goal is created
 	get_mining_goal("default");
 	get_mining_goal("default");
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	opencl_early_init();
 	opencl_early_init();
 #endif
 #endif
 
 
@@ -13626,12 +13626,12 @@ begin_bench:
 		start_cgpu(cgpu);
 		start_cgpu(cgpu);
 	}
 	}
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	for (i = 0; i < nDevs; i++)
 	for (i = 0; i < nDevs; i++)
 		pause_dynamic_threads(i);
 		pause_dynamic_threads(i);
 #endif
 #endif
 
 
-#if defined(WANT_CPUMINE) && defined(USE_SHA256D)
+#if defined(USE_CPUMINING) && defined(USE_SHA256D)
 	if (opt_n_threads > 0)
 	if (opt_n_threads > 0)
 		applog(LOG_INFO, "%d cpu miner threads started, using '%s' algorithm.",
 		applog(LOG_INFO, "%d cpu miner threads started, using '%s' algorithm.",
 		       opt_n_threads, algo_names[opt_algo]);
 		       opt_n_threads, algo_names[opt_algo]);
@@ -13661,7 +13661,7 @@ begin_bench:
 		quit(1, "watchdog thread create failed");
 		quit(1, "watchdog thread create failed");
 	pthread_detach(thr->pth);
 	pthread_detach(thr->pth);
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	/* Create reinit gpu thread */
 	/* Create reinit gpu thread */
 	gpur_thr_id = 3;
 	gpur_thr_id = 3;
 	thr = &control_thr[gpur_thr_id];
 	thr = &control_thr[gpur_thr_id];

+ 1 - 1
miner.h

@@ -1140,7 +1140,7 @@ struct mining_algorithm {
 	
 	
 	struct mining_algorithm *next;
 	struct mining_algorithm *next;
 	
 	
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 	bool opencl_nodefault;
 	bool opencl_nodefault;
 	float (*opencl_oclthreads_to_intensity)(unsigned long oclthreads);
 	float (*opencl_oclthreads_to_intensity)(unsigned long oclthreads);
 	unsigned long (*opencl_intensity_to_oclthreads)(float intensity);
 	unsigned long (*opencl_intensity_to_oclthreads)(float intensity);

+ 2 - 2
ocl.c

@@ -9,7 +9,7 @@
  */
  */
 
 
 #include "config.h"
 #include "config.h"
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 
 
 #include <ctype.h>
 #include <ctype.h>
 #include <limits.h>
 #include <limits.h>
@@ -1157,5 +1157,5 @@ built:
 	return true;
 	return true;
 }
 }
 
 
-#endif /* HAVE_OPENCL */
+#endif /* USE_OPENCL */
 
 

+ 2 - 2
ocl.h

@@ -6,7 +6,7 @@
 #include <stdbool.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdio.h>
 
 
-#ifdef HAVE_OPENCL
+#ifdef USE_OPENCL
 #include "CL/cl.h"
 #include "CL/cl.h"
 
 
 #include "miner.h"
 #include "miner.h"
@@ -58,5 +58,5 @@ extern char *opencl_kernel_source(const char *filename, int *out_sourcelen, enum
 extern int clDevicesNum(void);
 extern int clDevicesNum(void);
 extern _clState *opencl_create_clState(unsigned int gpu, char *name, size_t nameSize);
 extern _clState *opencl_create_clState(unsigned int gpu, char *name, size_t nameSize);
 extern bool opencl_load_kernel(struct cgpu_info *, _clState *clState, const char *name, struct opencl_kernel_info *, const char *kernel_file, const struct mining_algorithm *);
 extern bool opencl_load_kernel(struct cgpu_info *, _clState *clState, const char *name, struct opencl_kernel_info *, const char *kernel_file, const struct mining_algorithm *);
-#endif /* HAVE_OPENCL */
+#endif /* USE_OPENCL */
 #endif /* __OCL_H__ */
 #endif /* __OCL_H__ */

Some files were not shown because too many files changed in this diff