Minor opencl build corrections.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
diff --git a/Makefile.am b/Makefile.am
index 0d141eb..0e03d2d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,7 +45,7 @@ cgminer_SOURCES += elist.h miner.h compat.h bench_block.h \
cgminer_SOURCES += logging.c
-if HAVE_OPENCL
+if HAS_OPENCL
bin_SCRIPTS = $(top_srcdir)/*.cl
cgminer_SOURCES += driver-opencl.h driver-opencl.c
diff --git a/cgminer.c b/cgminer.c
index 0b85ddf..293163f 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -4968,8 +4968,10 @@ static void *input_thread(void __maybe_unused *userdata)
display_pools();
else if (!strncasecmp(&input, "s", 1))
set_options();
+#if HAVE_OPENCL
else if (have_opencl && !strncasecmp(&input, "g", 1))
manage_gpu();
+#endif
if (opt_realquiet) {
disable_curses();
break;
diff --git a/configure.ac b/configure.ac
index 9782bab..8a505da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,6 +171,7 @@ else
OPENCL_FLAGS=""
OPENCL_LIBS=""
fi
+AM_CONDITIONAL([HAS_OPENCL], [test x$opencl = xyes])
has_winpthread=false
if test "x$have_win32" = xtrue; then