]> granicus.if.org Git - vim/commitdiff
patch 8.2.2442: automatic GUI selection does not check for GTK 3 v8.2.2442
authorBram Moolenaar <Bram@vim.org>
Sun, 31 Jan 2021 18:52:50 +0000 (19:52 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 31 Jan 2021 18:52:50 +0000 (19:52 +0100)
Problem:    Automatic GUI selection does not check for GTK 3.
Solution:   Make SKIP_GTK3 empty for automatic GUI support.  Set SKIP_GTK3 to
            YES when checking for GTK2.

src/auto/configure
src/configure.ac
src/version.c

index 12d8f24f4975f014e5d329c3274cc569f14d9c7f..250e5ae9ea255eff1f2612fa4405496106533695 100755 (executable)
@@ -9262,6 +9262,7 @@ $as_echo "no GUI support" >&6; } ;;
 $as_echo "yes/auto - automatic GUI support" >&6; }
                gui_auto=yes
                SKIP_GTK2=
+               SKIP_GTK3=
                SKIP_GNOME=
                SKIP_MOTIF=
                SKIP_ATHENA=
@@ -9523,6 +9524,8 @@ $as_echo "gtk test disabled" >&6; }
   fi
 
   if test "x$PKG_CONFIG" != "xno"; then
+                    save_skip_gtk3=$SKIP_GTK3
+    SKIP_GTK3=YES
 
   if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
   {
@@ -9666,6 +9669,8 @@ $as_echo "no" >&6; }
       SKIP_MOTIF=YES
       GUITYPE=GTK
 
+    else
+      SKIP_GTK3=$save_skip_gtk3
     fi
   fi
   if test "x$GUITYPE" = "xGTK"; then
@@ -9778,6 +9783,8 @@ $as_echo "gtk test disabled" >&6; }
   fi
 
   if test "x$PKG_CONFIG" != "xno"; then
+    save_skip_gtk2=$SKIP_GTK2
+    SKIP_GTK2=YES
 
   if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
   {
@@ -9924,6 +9931,8 @@ $as_echo "no" >&6; }
 
       $as_echo "#define USE_GTK3 1" >>confdefs.h
 
+    else
+      SKIP_GTK2=$save_skip_gtk2
     fi
   fi
 fi
index 630433f78a65b83058a3ed502c7e77fb76d85a98..58bfa1980b8c5269741aed3fb6fcf0955d0924f4 100644 (file)
@@ -2448,6 +2448,7 @@ else
     yes|""|auto)       AC_MSG_RESULT(yes/auto - automatic GUI support)
                gui_auto=yes
                SKIP_GTK2=
+               SKIP_GTK3=
                SKIP_GNOME=
                SKIP_MOTIF=
                SKIP_ATHENA=
@@ -2759,6 +2760,10 @@ if test -z "$SKIP_GTK2"; then
   if test "x$PKG_CONFIG" != "xno"; then
     dnl First try finding version 2.2.0 or later.  The 2.0.x series has
     dnl problems (bold fonts, --remote doesn't work).
+    dnl Disable checking for GTK3 here, otherwise it's found when GTK2 is not
+    dnl found.
+    save_skip_gtk3=$SKIP_GTK3
+    SKIP_GTK3=YES
     AM_PATH_GTK(2.2.0,
                [GUI_LIB_LOC="$GTK_LIBDIR"
                 GTK_LIBNAME="$GTK_LIBS"
@@ -2770,6 +2775,8 @@ if test -z "$SKIP_GTK2"; then
       SKIP_MOTIF=YES
       GUITYPE=GTK
       AC_SUBST(GTK_LIBNAME)
+    else
+      SKIP_GTK3=$save_skip_gtk3
     fi
   fi
   if test "x$GUITYPE" = "xGTK"; then
@@ -2805,6 +2812,8 @@ if test -z "$SKIP_GTK3"; then
   fi
 
   if test "x$PKG_CONFIG" != "xno"; then
+    save_skip_gtk2=$SKIP_GTK2
+    SKIP_GTK2=YES
     AM_PATH_GTK(3.0.0,
                [GUI_LIB_LOC="$GTK_LIBDIR"
                 GTK_LIBNAME="$GTK_LIBS"
@@ -2818,6 +2827,8 @@ if test -z "$SKIP_GTK3"; then
       GUITYPE=GTK
       AC_SUBST(GTK_LIBNAME)
       AC_DEFINE(USE_GTK3)
+    else
+      SKIP_GTK2=$save_skip_gtk2
     fi
   fi
 fi
index 5555c77121e11e1c09f58c2db688e5bf1b30f049..d802f9c9110ffc99b8c5d4ea0c7d90f929ec90dc 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2442,
 /**/
     2441,
 /**/