[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - configure.ac

Thorsten Behrens (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 1 22:41:00 UTC 2020


 configure.ac |   73 +++++++++++++++++++++++++++++------------------------------
 1 file changed, 37 insertions(+), 36 deletions(-)

New commits:
commit 05f8ddaab5ca36f1ac68cda3f6df32eaec6c8397
Author:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Sun May 31 04:03:05 2020 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Jun 2 00:40:27 2020 +0200

    configure.ac: make --enable-gtk3-kde5 work standalone
    
    Previously always required the gtk3 backend enabled, too.
    
    Plus jmux's Split gtk3* VCL backend test and library detection
    from https://gerrit.libreoffice.org/c/core/+/95250
    
    Change-Id: I9fc216686574aa00833335ad1aa8cf93b316e277
    Co-authored-by: Jan-Marek Glogowski <glogow at fbihome.de>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95216
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 5e1eaaeb04e6194a3587eefcfd8e63652cc3a46d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95233
    Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index e950255146bd..6ebe3856333d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10666,21 +10666,47 @@ R=""
 if test "$USING_X11" != TRUE; then
     enable_gtk3=no
 fi
-GTK3_CFLAGS=""
-GTK3_LIBS=""
+
 ENABLE_GTK3=""
 if test "x$enable_gtk3" = "xyes"; then
+    ENABLE_GTK3="TRUE"
+    AC_DEFINE(ENABLE_GTK3)
+    R="$R gtk3"
+fi
+AC_SUBST(ENABLE_GTK3)
+
+ENABLE_GTK3_KDE5=""
+if test "x$enable_gtk3_kde5" = "xyes"; then
+    ENABLE_GTK3_KDE5="TRUE"
+    AC_DEFINE(ENABLE_GTK3_KDE5)
+    R="$R gtk3_kde5"
+fi
+AC_SUBST(ENABLE_GTK3_KDE5)
+
+ENABLE_QT5=""
+if test "x$enable_qt5" = "xyes"; then
+    ENABLE_QT5="TRUE"
+    AC_DEFINE(ENABLE_QT5)
+    R="$R qt5"
+fi
+AC_SUBST(ENABLE_QT5)
+
+ENABLE_KF5=""
+if test "x$enable_kf5" = "xyes"; then
+    ENABLE_KF5="TRUE"
+    AC_DEFINE(ENABLE_KF5)
+    R="$R kf5"
+fi
+AC_SUBST(ENABLE_KF5)
+
+GTK3_CFLAGS=""
+GTK3_LIBS=""
+if test "x$enable_gtk3" = "xyes" -o "x$enable_gtk3_kde5" = "xyes"; then
     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="TRUE", ENABLE_GTK3="")
-    if test "x$ENABLE_GTK3" = "xTRUE"; then
-        AC_DEFINE(ENABLE_GTK3)
-        R="gtk3"
-    else
-        AC_MSG_ERROR([gtk3 or dependent libraries of the correct versions, not found])
-    fi
+    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)
     GTK3_CFLAGS=$(printf '%s' "$GTK3_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
     FilterLibs "${GTK3_LIBS}"
     GTK3_LIBS="${filteredlibs}"
@@ -10694,40 +10720,15 @@ if test "x$enable_gtk3" = "xyes"; then
 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
+    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
 
-ENABLE_QT5=""
-if test "x$enable_qt5" = "xyes"; then
-    ENABLE_QT5="TRUE"
-    AC_DEFINE(ENABLE_QT5)
-    R="$R qt5"
-fi
-AC_SUBST(ENABLE_QT5)
-
-ENABLE_KF5=""
-if test "x$enable_kf5" = "xyes"; then
-    ENABLE_KF5="TRUE"
-    AC_DEFINE(ENABLE_KF5)
-    R="$R kf5"
-fi
-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"
-fi
-AC_SUBST(ENABLE_GTK3_KDE5)
-
 if test "$_os" = "WINNT"; then
     R="$R win"
 elif test "$_os" = "Darwin"; then
@@ -10859,7 +10860,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.


More information about the Libreoffice-commits mailing list