summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2020-05-31 04:03:05 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-05-31 21:14:04 +0200
commite3beaed3420b5f6deda1c443da1435d4ccfee022 (patch)
treeac1f6dc18d8d48ceda37788732271426ea188aaf /configure.ac
parent263e5726c71b3c3579f974194510ed01947ee6cf (diff)
configure.ac: make --enable-gtk3-kde5 work standalone
Previously always required the gtk3 backend enabled, too. Change-Id: I9fc216686574aa00833335ad1aa8cf93b316e277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95216 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac46
1 files changed, 32 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 929b06ed8af7..87603c19c941 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10685,18 +10685,8 @@ if test "x$enable_gtk3" = "xyes"; then
[AC_MSG_ERROR(EGL headers not found. install mesa-libEGL-devel)], [])
fi
fi
-AC_SUBST(GTK3_LIBS)
-AC_SUBST(GTK3_CFLAGS)
AC_SUBST(ENABLE_GTK3)
-if test "$enable_introspection" = yes; then
- if test "$ENABLE_GTK3" = TRUE; then
- GOBJECT_INTROSPECTION_REQUIRE(INTROSPECTION_REQUIRED_VERSION)
- else
- AC_MSG_ERROR([--enable-introspection requires --enable-gtk3])
- fi
-fi
-
ENABLE_QT5=""
if test "x$enable_qt5" = "xyes"; then
ENABLE_QT5="TRUE"
@@ -10715,11 +10705,39 @@ AC_SUBST(ENABLE_KF5)
ENABLE_GTK3_KDE5=""
if test "x$enable_gtk3_kde5" = "xyes"; then
- ENABLE_GTK3_KDE5="TRUE"
- AC_DEFINE(ENABLE_GTK3_KDE5)
- R="$R gtk3_kde5"
+ if test "$with_system_cairo" = no; then
+ AC_MSG_ERROR([System cairo required for gtk3 support, do not combine --enable-gtk3 with --without-system-cairo])
+ fi
+ : ${with_system_cairo:=yes}
+ PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.18 gtk+-unix-print-3.0 gmodule-no-export-2.0 glib-2.0 >= 2.38 cairo, ENABLE_GTK3_KDE5="TRUE", ENABLE_GTK3_KDE5="")
+ if test "x$ENABLE_GTK3_KDE5" = "xTRUE"; then
+ AC_DEFINE(ENABLE_GTK3_KDE5)
+ R="$R gtk3_kde5"
+ else
+ AC_MSG_ERROR([gtk3_kde5 or dependent libraries of the correct versions, not found])
+ fi
+ GTK3_CFLAGS=$(printf '%s' "$GTK3_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+ FilterLibs "${GTK3_LIBS}"
+ GTK3_LIBS="${filteredlibs}"
+
+ dnl We require egl only for the gtk3 plugin. Otherwise we use glx.
+ if test "$with_system_epoxy" != "yes"; then
+ AC_CHECK_LIB(EGL, eglMakeCurrent, [:], AC_MSG_ERROR([libEGL required.]))
+ AC_CHECK_HEADER(EGL/eglplatform.h, [],
+ [AC_MSG_ERROR(EGL headers not found. install mesa-libEGL-devel)], [])
+ fi
fi
AC_SUBST(ENABLE_GTK3_KDE5)
+AC_SUBST(GTK3_LIBS)
+AC_SUBST(GTK3_CFLAGS)
+
+if test "$enable_introspection" = yes; then
+ if test "$ENABLE_GTK3" = "TRUE" -o "$ENABLE_GTK3_KDE5" = "TRUE"; then
+ GOBJECT_INTROSPECTION_REQUIRE(INTROSPECTION_REQUIRED_VERSION)
+ else
+ AC_MSG_ERROR([--enable-introspection requires --enable-gtk3])
+ fi
+fi
if test "$_os" = "WINNT"; then
R="$R win"
@@ -10852,7 +10870,7 @@ AC_SUBST(SYSTEM_BLUEZ)
dnl ===================================================================
dnl Check whether to enable GIO support
dnl ===================================================================
-if test "$ENABLE_GTK3" = "TRUE"; then
+if test "$ENABLE_GTK3" = "TRUE" -o "$ENABLE_GTK3_KDE5" = "TRUE"; then
AC_MSG_CHECKING([whether to enable GIO support])
if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
dnl Need at least 2.26 for the dbus support.