$NetBSD: patch-configure,v 1.2 2018/08/12 10:45:03 tsutsui Exp $

- pull upstream wayland fix:
 https://github.com/ibus/ibus/commit/aa0f4252ff965729b871c91b4ed089bf98963c0b

--- configure.orig	2018-08-08 08:30:56.000000000 +0000
+++ configure
@@ -814,6 +814,8 @@ WAYLAND_CFLAGS
 X11_PREFIX
 X11_LIBS
 X11_CFLAGS
+ENABLE_GDK3_WAYLAND_FALSE
+ENABLE_GDK3_WAYLAND_TRUE
 GTK3_LIBS
 GTK3_CFLAGS
 GTK2_LIBS
@@ -17187,13 +17189,36 @@ else
 $as_echo "yes" >&6; }
 
 fi
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-wayland-3.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gdk-wayland-3.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  enable_gdk3_wayland=yes
+else
+  enable_gdk3_wayland=no
+
+fi
 
     gtk3_binary_version=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
     GTK3_IM_MODULEDIR="$libdir"/gtk-3.0/$gtk3_binary_version/immodules
 else
     enable_gtk3="no (disabled, use --enable-gtk3 to enable)"
+    enable_gdk3_wayland=no
+fi
+if test x"$enable_gdk3_wayland" != x"yes"; then
+    enable_gdk3_wayland="no (disabled, need to install gdk-wayland-3.0.pc)"
+fi
+ if test x"$enable_gdk3_wayland" = x"yes"; then
+  ENABLE_GDK3_WAYLAND_TRUE=
+  ENABLE_GDK3_WAYLAND_FALSE='#'
+else
+  ENABLE_GDK3_WAYLAND_TRUE='#'
+  ENABLE_GDK3_WAYLAND_FALSE=
 fi
 
+
 if test x"$enable_xim" = x"yes"; then
     # Check for x11
 
@@ -20656,6 +20681,10 @@ if test -z "${ENABLE_APPINDICATOR_TRUE}"
   as_fn_error $? "conditional \"ENABLE_APPINDICATOR\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_GDK3_WAYLAND_TRUE}" && test -z "${ENABLE_GDK3_WAYLAND_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_GDK3_WAYLAND\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_APPINDICATOR_ENGINE_ICON_TRUE}" && test -z "${ENABLE_APPINDICATOR_ENGINE_ICON_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_APPINDICATOR_ENGINE_ICON\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -22993,6 +23022,7 @@ Build options:
   Build gtk3 immodule           $enable_gtk3
   Build XIM agent server        $enable_xim
   Build wayland support         $enable_wayland
+  Build gdk3 wayland support    $enable_gdk3_wayland
   Build appindicator support    $enable_appindicator
   Build appindicator engine icon $enable_appindicator_engine_icon
   Build python library          $enable_python_library
@@ -23033,6 +23063,7 @@ Build options:
   Build gtk3 immodule           $enable_gtk3
   Build XIM agent server        $enable_xim
   Build wayland support         $enable_wayland
+  Build gdk3 wayland support    $enable_gdk3_wayland
   Build appindicator support    $enable_appindicator
   Build appindicator engine icon $enable_appindicator_engine_icon
   Build python library          $enable_python_library
