summaryrefslogtreecommitdiff
path: root/config_host
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-05-30 18:19:40 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2021-06-01 15:30:59 +0200
commit3d1f28dd1fbb2fe3f5b933a9d692fb4d033f08b6 (patch)
tree2230fd165d9ded658195791ddc2f4bd5c7394a76 /config_host
parent159666084a28ab3591b96cdd390f8fa0ac62bf3c (diff)
configure: Refactor platform defaults
The main idea was to move complexity from source (and Makefiles) into configure.ac, because otherwise these must replicate the "same" branching, often resulting in diversions. Better to keep the logic in one place (configure.ac) and set additional variables to be used directly by source code and Makefiles. Notably this introduce the "using_*" platform flags, which should be considered constants. There is USING_X11, which actually tells, if the build uses the platform's X11 (and I opted for the removal of HAVE_FEATURE_X11). I also consider variables constant, after they have been exported by AC_SUBST, which should never be conditional, or some AC_DEFINE set them for a config header. A large block of defaults depends on $using_x11, so we set them to the same value, but just if the platform doesn't set it. The other important flag is $using_freetype_fontconfig, if the platform uses freetype and fontconfig. The headless plugin uses cairo for its drawing operations and freetype+fontconfig for text, so $test_cairo = $using_freetype_fontconfig. This is independent from a the cairo canvas! The OpenGL X11 code now depends on USING_X11, but it doesn't yet reflect the filter in Library_vcl.mk protecting glx. I don't know how correct this glx filter is, seeing that the source code just checked for "UNX - some non-X11 targets". Change-Id: Id1ba1a967a5d8d10ee217458be879ed00459f7e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116440 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'config_host')
-rw-r--r--config_host/config_features.h.in9
-rw-r--r--config_host/config_vclplug.h.in7
2 files changed, 8 insertions, 8 deletions
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index c557a405ceb1..ef09850492a9 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -7,13 +7,6 @@
#ifndef CONFIG_FEATURES_H
#define CONFIG_FEATURES_H
-/* X11
- *
- * Whether we are building code to run in an X11 environment.
- */
-
-#define HAVE_FEATURE_X11 0
-
/* AVMEDIA - Whether to have functionality to display and manipulate
* embedded AV media in documents
*/
@@ -119,7 +112,7 @@
/*
* Whether User Interface is available
*/
-#define HAVE_FEATURE_UI 1
+#define HAVE_FEATURE_UI 0
/*
* Whether PDF import is available
diff --git a/config_host/config_vclplug.h.in b/config_host/config_vclplug.h.in
index 1a44907fb087..db0c7a8be201 100644
--- a/config_host/config_vclplug.h.in
+++ b/config_host/config_vclplug.h.in
@@ -12,11 +12,18 @@ Settings about which desktops have support enabled.
*/
#define USING_X11 0
+/**
+ * Set the enabled platform plugins
+ */
#define ENABLE_GTK3 0
#define ENABLE_GTK3_KDE5 0
+#define ENABLE_HEADLESS 0
#define ENABLE_KF5 0
#define ENABLE_QT5 0
+/**
+ * Additional settings for the plugins
+ */
#define ENABLE_GSTREAMER_1_0 0
#define QT5_HAVE_GOBJECT 0
#define QT5_USING_X11 0