summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repository.mk2
-rw-r--r--config_host.mk.in1
-rw-r--r--config_host/config_features.h.in7
-rw-r--r--configure.ac24
-rw-r--r--sc/Module_sc.mk7
-rw-r--r--sc/source/core/tool/formulagroup.cxx3
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx2
7 files changed, 43 insertions, 3 deletions
diff --git a/Repository.mk b/Repository.mk
index 9a787856b768..57a513b4542d 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -155,9 +155,9 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,calc, \
sc \
scd \
scfilt \
- scopencl \
scui \
solver \
+ $(if $(ENABLE_OPENCL),scopencl) \
$(if $(DISABLE_SCRIPTING),,vbaobj) \
$(if $(ENABLE_TELEPATHY),tubes) \
))
diff --git a/config_host.mk.in b/config_host.mk.in
index de945accd578..b7e3e0930b3f 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -147,6 +147,7 @@ export ENABLE_NPAPI_INTO_BROWSER=@ENABLE_NPAPI_INTO_BROWSER@
export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
export ENABLE_OOENV=@ENABLE_OOENV@
export ENABLE_OPENGL=@ENABLE_OPENGL@
+export ENABLE_OPENCL=@ENABLE_OPENCL@
export ENABLE_PACKAGEKIT=@ENABLE_PACKAGEKIT@
export ENABLE_PCH=@ENABLE_PCH@
export ENABLE_PDFIMPORT=@ENABLE_PDFIMPORT@
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index 08720a7e270a..100706ac9098 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -67,6 +67,13 @@
#define HAVE_FEATURE_MULTIUSER_ENVIRONMENT 0
+/*
+ * Whether we have the OpenCL headers and should compile in any
+ * support for that abstraction.
+ */
+
+#define HAVE_FEATURE_OPENCL 0
+
/*
* Whether the OS has Avahi support,
* This library is used for zeroconf service publication on the local network
diff --git a/configure.ac b/configure.ac
index 501e56d9ae0a..d9691c2d8b4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -917,6 +917,10 @@ AC_ARG_ENABLE(opengl,
AS_HELP_STRING([--disable-opengl],
[Determines whether to build the OpenGL 3D slide transitions component.]))
+AC_ARG_ENABLE(opencl,
+ AS_HELP_STRING([--disable-opencl],
+ [Determines whether to build with OpenCL support.]))
+
AC_ARG_ENABLE(dbus,
AS_HELP_STRING([--disable-dbus],
[Determines whether to enable features that depend on dbus.
@@ -10222,6 +10226,26 @@ fi
AC_SUBST(SYSTEM_MESA_HEADERS)
AC_SUBST(ENABLE_OPENGL)
+dnl =================================================
+dnl Check whether to build with OpenCL support.
+dnl =================================================
+
+AC_MSG_CHECKING([whether to build with the OpenCL support.])
+ENABLE_OPENCL=
+
+if test "x$enable_opencl" != "xno"; then
+ AC_MSG_RESULT([yes])
+ enable_opencl=yes
+ ENABLE_OPENCL=TRUE
+ AC_DEFINE(HAVE_FEATURE_OPENCL)
+else
+ AC_MSG_RESULT([no])
+ enable_opencl=no
+ ENABLE_OPENCL=FALSE
+fi
+
+AC_SUBST(ENABLE_OPENCL)
+
# presenter minimizer extension?
AC_MSG_CHECKING([whether to build the Presentation Minimizer extension])
if test "x$enable_ext_presenter_minimizer" != "xno" -a "x$enable_extension_integration" != "xno"; then
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 510cc82b8d9b..6522862f7389 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -15,11 +15,16 @@ $(eval $(call gb_Module_add_targets,sc,\
Library_sc \
Library_scd \
Library_scfilt \
- Library_scopencl \
Library_scui \
UIConfig_scalc \
))
+ifeq ($(ENABLE_OPENCL),TRUE)
+$(eval $(call gb_Module_add_targets,sc,\
+ Library_scopencl \
+))
+endif
+
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,sc,\
Library_scqahelper \
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 90c43ce39e72..3b929fa37c97 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -358,6 +358,7 @@ FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic()
if ( !msInstance )
{
+#if HAVE_FEATURE_OPENCL
if ( ScInterpreter::GetGlobalConfig().mbOpenCLEnabled )
{
#ifdef DISABLE_DYNLOADING
@@ -382,7 +383,7 @@ FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic()
msInstance = new sc::FormulaGroupInterpreterOpenCLMissing();
#endif
}
-
+#endif
if ( !msInstance ) // software fallback
{
fprintf(stderr, "Create S/W interp\n");
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 2ded895cbbe4..6639f359d016 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -196,7 +196,9 @@ void ScCalcOptionsDialog::FillOptionsList()
}
pModel->Insert(createBoolItem(maCaptionEmptyStringAsZero,maConfig.mbEmptyStringAsZero));
+#if HAVE_FEATURE_OPENCL
pModel->Insert(createBoolItem(maCaptionOpenCLEnabled,maConfig.mbOpenCLEnabled));
+#endif
mpLbSettings->SetUpdateMode(true);
}