From 0c38db639322defccdcd6c2c3abdc3b18c2fdd15 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Wed, 22 Jan 2014 12:56:06 +0200 Subject: [PATCH] build: Add --disable-adl-checks Requested in https://github.com/veox/sgminer/issues/26 configure.ac needs an overhaul (see SDMINER_SDK). --- configure.ac | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 4197f16c..89bd65a7 100644 --- a/configure.ac +++ b/configure.ac @@ -186,17 +186,32 @@ if test "x$has_winpthread" != xtrue; then fi AC_ARG_ENABLE([adl], - [AC_HELP_STRING([--disable-adl],[Override detection and disable building with adl])], + [AC_HELP_STRING([--disable-adl],[Override detection and disable building with ADL])], [adl=$enableval] ) +AC_ARG_ENABLE([adl_checks], + [AC_HELP_STRING([--disable-adl-checks],[Override detection and assume ADL is available])], + [adl_checks=$enableval] + ) + if test "$found_opencl" = 1; then if test "x$adl" != xno; then + dnl Check if include files are in $srcdir/ADL_SDK ADL_CPPFLAGS= AC_CHECK_FILE([$srcdir/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$srcdir], have_adl=false,) + + dnl FIXME: force ADL usage if disable-checks specified + if test "x$adl_checks" = xno; then + have_adl=true + ADL_CPPFLAGS=-I$srcdir + fi + + dnl FIXME: Check if SGMINER_SDK present if test x$have_adl+$have_sgminer_sdk = xfalse+true; then AC_CHECK_FILE([$SGMINER_SDK/include/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$SGMINER_SDK/include], have_adl=false,) fi + if test x$have_adl = xtrue then AC_DEFINE([HAVE_ADL], [1], [Defined if ADL headers were found]) @@ -377,7 +392,11 @@ fi if test "x$adl" != xno; then if test x$have_adl = xtrue; then - echo " ADL..................: SDK found, GPU monitoring support enabled" + if test "x$adl_checks" = xno; then + echo " ADL..................: SDK use FORCED" + else + echo " ADL..................: SDK found, GPU monitoring support enabled" + fi else echo " ADL..................: SDK NOT found, GPU monitoring support DISABLED" fi