1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-08 22:08:02 +00:00

Fixed configure.ac to properly detect OpenCL on windows/mingw.

This commit is contained in:
Ycros 2011-06-25 15:46:15 +10:00 committed by Con Kolivas
parent ec8319176e
commit 8313606b5f
2 changed files with 15 additions and 3 deletions

2
README
View File

@ -25,7 +25,7 @@ Native WIN32 build instructions (on mingw32, on windows):
Install mingw32 Install mingw32
Install libcurl, copy libcurl.m4 into /mingw/share/aclocal Install libcurl, copy libcurl.m4 into /mingw/share/aclocal
Run: Run:
./autogen.sh autoreconf -fvi
CFLAGS="-O3 -Wall -msse2 -I<path to AMD APP include>" LDFLAGS="-L<path to AMD APP lib/x86>" ./configure CFLAGS="-O3 -Wall -msse2 -I<path to AMD APP include>" LDFLAGS="-L<path to AMD APP lib/x86>" ./configure
make make

View File

@ -43,8 +43,20 @@ case $target in
;; ;;
esac esac
#AC_CHECK_LIB(OpenCL, clSetKernelArg, OPENCL_LIBS=-lOpenCL) # Check for OpenCL (the long way needed on mingw32 due to calling conventions)
OPENCL_LIBS=-lOpenCL AC_MSG_CHECKING([for OpenCL])
SAVED_LIBS=$LIBS
LIBS="$LIBS -lOpenCL"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <CL/cl.h>]],
[[return clSetKernelArg(0, 0, 0, 0); ]])],
[AC_MSG_RESULT(yes)
AM_CONDITIONAL(HAVE_OPENCL, true)
OPENCL_LIBS=-lOpenCL],
[AC_MSG_RESULT(no)
AM_CONDITIONAL(HAVE_OPENCL, false)])
LIBS=$SAVED_LIBS
AC_CHECK_LIB(jansson, json_loads, request_jansson=false, request_jansson=true) AC_CHECK_LIB(jansson, json_loads, request_jansson=false, request_jansson=true)
AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS=-lpthread) AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS=-lpthread)