From c425e4e5fcf4f4d3826df1e7c2617314ddbe0fe7 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 11 Jun 2022 17:31:54 +0300 Subject: [PATCH 23/23] configure: Warn when gtk3-client selected despite gtk3.22 availability Often users have been explicitly enabling gtk3-client instead of default gtk3.22-client, but have not meant to do so (e.g. habit of --enable-client=gtk3 from the time the default was gtk2) See osdn #44792 Signed-off-by: Marko Lindqvist --- m4/gtk3.22-client.m4 | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/m4/gtk3.22-client.m4 b/m4/gtk3.22-client.m4 index 51feaaa154..eb21e937ca 100644 --- a/m4/gtk3.22-client.m4 +++ b/m4/gtk3.22-client.m4 @@ -5,22 +5,26 @@ AC_DEFUN([FC_GTK3_22_CLIENT], [ - if test "x$gui_gtk3_22" = "xyes" || + if test "x$gui_gtk3_22" = "xyes" || test "x$gui_gtk3" = "xyes" || test "x$client" = "xall" || test "x$client" = "xauto" ; then PKG_CHECK_MODULES([GTK3_22], [gtk+-3.0 >= 3.22.0], [ - GTK3_22_CFLAGS="$GTK3_22_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_20 -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_22" - GTK3_22_CFLAGS="$GTK3_22_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_50 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_50" - gui_gtk3_22=yes - if test "x$client" = "xauto" ; then - client=yes - fi - gui_gtk3_22_cflags="$GTK3_22_CFLAGS" - gui_gtk3_22_libs="$GTK3_22_LIBS" - if test "x$MINGW" = "xyes"; then - dnl Required to compile gtk3 on Windows platform - gui_gtk3_22_cflags="$gui_gtk3_22_cflags -mms-bitfields" - gui_gtk3_22_ldflags="$gui_gtk3_22_ldflags $MWINDOWS_FLAG" + if test "x$gui_gtk3" = "xyes" && test "x$gui_gtk3_22" != "xyes" ; then + AC_MSG_WARN([gtk3-client requested instead of gtk3.22-client despite having gtk+ >= 3.22 available]) + else + GTK3_22_CFLAGS="$GTK3_22_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_20 -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_22" + GTK3_22_CFLAGS="$GTK3_22_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_50 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_50" + gui_gtk3_22=yes + if test "x$client" = "xauto" ; then + client=yes + fi + gui_gtk3_22_cflags="$GTK3_22_CFLAGS" + gui_gtk3_22_libs="$GTK3_22_LIBS" + if test "x$MINGW" = "xyes"; then + dnl Required to compile gtk3 on Windows platform + gui_gtk3_22_cflags="$gui_gtk3_22_cflags -mms-bitfields" + gui_gtk3_22_ldflags="$gui_gtk3_22_ldflags $MWINDOWS_FLAG" + fi fi ], [ -- 2.35.1