mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-14 15:11:56 +00:00
Add a --disable-opencl configure option to make it possible to override detection of opencl and build without GPU mining support.
This commit is contained in:
parent
83bb42801d
commit
10ed8e9d41
26
configure.ac
26
configure.ac
@ -51,11 +51,16 @@ case $target in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Check for OpenCL (the long way needed on mingw32 due to calling conventions)
|
AC_ARG_ENABLE([opencl],
|
||||||
AC_MSG_CHECKING([for OpenCL])
|
[AC_HELP_STRING([--disable-opencl],[Override detection and disable building with opencl])],
|
||||||
SAVED_LIBS=$LIBS
|
[opencl=$enableval]
|
||||||
LIBS="$LIBS $OPENCL_FLAGS"
|
)
|
||||||
AC_LINK_IFELSE(
|
if test "x$opencl" != xno; then
|
||||||
|
# Check for OpenCL (the long way needed on mingw32 due to calling conventions)
|
||||||
|
AC_MSG_CHECKING([for OpenCL])
|
||||||
|
SAVED_LIBS=$LIBS
|
||||||
|
LIBS="$LIBS $OPENCL_FLAGS"
|
||||||
|
AC_LINK_IFELSE(
|
||||||
[AC_LANG_PROGRAM([[
|
[AC_LANG_PROGRAM([[
|
||||||
#ifdef __APPLE_CC__
|
#ifdef __APPLE_CC__
|
||||||
#include <OpenCL/opencl.h>
|
#include <OpenCL/opencl.h>
|
||||||
@ -70,7 +75,8 @@ AC_LINK_IFELSE(
|
|||||||
OPENCL_LIBS=$OPENCL_FLAGS],
|
OPENCL_LIBS=$OPENCL_FLAGS],
|
||||||
[AC_MSG_RESULT(no)
|
[AC_MSG_RESULT(no)
|
||||||
found_opencl=0])
|
found_opencl=0])
|
||||||
LIBS=$SAVED_LIBS
|
LIBS=$SAVED_LIBS
|
||||||
|
fi
|
||||||
|
|
||||||
AC_CHECK_LIB(pthread, pthread_create, ,
|
AC_CHECK_LIB(pthread, pthread_create, ,
|
||||||
AC_MSG_ERROR([Could not find pthread library - please install libpthread]))
|
AC_MSG_ERROR([Could not find pthread library - please install libpthread]))
|
||||||
@ -201,8 +207,12 @@ AC_OUTPUT
|
|||||||
|
|
||||||
echo ''
|
echo ''
|
||||||
|
|
||||||
if test $found_opencl = 1; then
|
if test "x$opencl" != xno; then
|
||||||
|
if test $found_opencl = 1; then
|
||||||
echo OpenCL: FOUND. GPU mining support enabled.
|
echo OpenCL: FOUND. GPU mining support enabled.
|
||||||
else
|
else
|
||||||
echo OpenCL: NOT FOUND. GPU mining support DISABLED.
|
echo OpenCL: NOT FOUND. GPU mining support DISABLED.
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo OpenCL: Detection overrided. GPU mining support DISABLED.
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user