configure: fix fcitx tests.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 20 May 2020 16:34:19 -0400
changeset 138369ebb8a2929b7
parent 13835 3f63f707ca4f
child 13837 c18c3084bd77
configure: fix fcitx tests.

Otherwise Unix systems without D-Bus support will attempt to compile sources
they can't handle.
configure
configure.ac
     1.1 --- a/configure	Wed May 20 16:15:14 2020 -0400
     1.2 +++ b/configure	Wed May 20 16:34:19 2020 -0400
     1.3 @@ -23083,18 +23083,24 @@
     1.4  fi
     1.5  
     1.6      if test x$enable_fcitx = xyes; then
     1.7 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fcitx support" >&5
     1.8 +$as_echo_n "checking for fcitx support... " >&6; }
     1.9 +        have_fcitx=no
    1.10          if test x$enable_ime != xyes; then
    1.11              { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for fcitx." >&5
    1.12  $as_echo "$as_me: WARNING: IME support is required for fcitx." >&2;}
    1.13 -        elif test x$enable_dbus != xyes; then
    1.14 +        elif test x$have_dbus_dbus_h_hdr != xyes; then
    1.15              { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for fcitx." >&5
    1.16  $as_echo "$as_me: WARNING: DBus support is required for fcitx." >&2;}
    1.17          else
    1.18 +            have_fcitx=yes
    1.19  
    1.20  $as_echo "#define HAVE_FCITX 1" >>confdefs.h
    1.21  
    1.22              SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
    1.23          fi
    1.24 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_fcitx" >&5
    1.25 +$as_echo "$have_fcitx" >&6; }
    1.26      fi
    1.27  }
    1.28  
    1.29 @@ -25775,7 +25781,7 @@
    1.30  else
    1.31      SUMMARY="${SUMMARY}Using ibus          : NO\n"
    1.32  fi
    1.33 -if test x$enable_fcitx = xyes; then
    1.34 +if test x$have_fcitx = xyes; then
    1.35      SUMMARY="${SUMMARY}Using fcitx         : YES\n"
    1.36  else
    1.37      SUMMARY="${SUMMARY}Using fcitx         : NO\n"
     2.1 --- a/configure.ac	Wed May 20 16:15:14 2020 -0400
     2.2 +++ b/configure.ac	Wed May 20 16:34:19 2020 -0400
     2.3 @@ -2741,14 +2741,18 @@
     2.4  AS_HELP_STRING([--enable-fcitx], [enable fcitx support [[default=yes]]]),
     2.5                    , enable_fcitx=yes)
     2.6      if test x$enable_fcitx = xyes; then
     2.7 +        AC_MSG_CHECKING(for fcitx support)
     2.8 +        have_fcitx=no
     2.9          if test x$enable_ime != xyes; then
    2.10              AC_MSG_WARN([IME support is required for fcitx.])
    2.11 -        elif test x$enable_dbus != xyes; then
    2.12 +        elif test x$have_dbus_dbus_h_hdr != xyes; then
    2.13              AC_MSG_WARN([DBus support is required for fcitx.])
    2.14          else
    2.15 +            have_fcitx=yes
    2.16              AC_DEFINE(HAVE_FCITX, 1, [ ])
    2.17              SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
    2.18          fi
    2.19 +        AC_MSG_RESULT($have_fcitx)
    2.20      fi
    2.21  }
    2.22  
    2.23 @@ -4407,7 +4411,7 @@
    2.24  else
    2.25      SUMMARY="${SUMMARY}Using ibus          : NO\n"
    2.26  fi
    2.27 -if test x$enable_fcitx = xyes; then
    2.28 +if test x$have_fcitx = xyes; then
    2.29      SUMMARY="${SUMMARY}Using fcitx         : YES\n"
    2.30  else
    2.31      SUMMARY="${SUMMARY}Using fcitx         : NO\n"