configure
changeset 10496 6660aa9120d6
parent 10490 24472af11074
child 10565 15ba7a201f0a
     1.1 --- a/configure	Fri Oct 07 18:24:34 2016 -0700
     1.2 +++ b/configure	Fri Oct 07 18:57:40 2016 -0700
     1.3 @@ -849,7 +849,9 @@
     1.4  enable_video_opengles2
     1.5  enable_libudev
     1.6  enable_dbus
     1.7 +enable_ime
     1.8  enable_ibus
     1.9 +enable_fcitx
    1.10  enable_input_tslib
    1.11  enable_pthreads
    1.12  enable_pthread_sem
    1.13 @@ -1587,7 +1589,9 @@
    1.14                            include OpenGL ES 2.0 support [[default=yes]]
    1.15    --enable-libudev        enable libudev support [[default=yes]]
    1.16    --enable-dbus           enable D-Bus support [[default=yes]]
    1.17 +  --enable-ime            enable IME support [[default=yes]]
    1.18    --enable-ibus           enable IBus support [[default=yes]]
    1.19 +  --enable-fcitx          enable fcitx support [[default=yes]]
    1.20    --enable-input-tslib    use the Touchscreen library for input
    1.21                            [[default=yes]]
    1.22    --enable-pthreads       use POSIX threads for multi-threading
    1.23 @@ -21650,6 +21654,23 @@
    1.24      fi
    1.25  }
    1.26  
    1.27 +CheckIME()
    1.28 +{
    1.29 +    # Check whether --enable-ime was given.
    1.30 +if test "${enable_ime+set}" = set; then :
    1.31 +  enableval=$enable_ime;
    1.32 +else
    1.33 +  enable_ime=yes
    1.34 +fi
    1.35 +
    1.36 +    if test x$enable_ime = xyes; then
    1.37 +
    1.38 +$as_echo "#define SDL_USE_IME 1" >>confdefs.h
    1.39 +
    1.40 +            SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
    1.41 +    fi
    1.42 +}
    1.43 +
    1.44  CheckIBus()
    1.45  {
    1.46      # Check whether --enable-ibus was given.
    1.47 @@ -21723,7 +21744,11 @@
    1.48  
    1.49              CFLAGS="$save_CFLAGS"
    1.50              if test x$have_ibus_ibus_h_hdr = xyes; then
    1.51 -                if test x$enable_dbus != xyes; then
    1.52 +                if test x$enable_ime != xyes; then
    1.53 +                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for IBus." >&5
    1.54 +$as_echo "$as_me: WARNING: IME support is required for IBus." >&2;}
    1.55 +                    have_ibus_ibus_h_hdr=no
    1.56 +                elif test x$enable_dbus != xyes; then
    1.57                      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for IBus." >&5
    1.58  $as_echo "$as_me: WARNING: DBus support is required for IBus." >&2;}
    1.59                      have_ibus_ibus_h_hdr=no
    1.60 @@ -21743,6 +21768,90 @@
    1.61      fi
    1.62  }
    1.63  
    1.64 +CheckFcitx()
    1.65 +{
    1.66 +    # Check whether --enable-fcitx was given.
    1.67 +if test "${enable_fcitx+set}" = set; then :
    1.68 +  enableval=$enable_fcitx;
    1.69 +else
    1.70 +  enable_fcitx=yes
    1.71 +fi
    1.72 +
    1.73 +    if test x$enable_fcitx = xyes; then
    1.74 +        # Extract the first word of "pkg-config", so it can be a program name with args.
    1.75 +set dummy pkg-config; ac_word=$2
    1.76 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    1.77 +$as_echo_n "checking for $ac_word... " >&6; }
    1.78 +if ${ac_cv_path_PKG_CONFIG+:} false; then :
    1.79 +  $as_echo_n "(cached) " >&6
    1.80 +else
    1.81 +  case $PKG_CONFIG in
    1.82 +  [\\/]* | ?:[\\/]*)
    1.83 +  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
    1.84 +  ;;
    1.85 +  *)
    1.86 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    1.87 +for as_dir in $PATH
    1.88 +do
    1.89 +  IFS=$as_save_IFS
    1.90 +  test -z "$as_dir" && as_dir=.
    1.91 +    for ac_exec_ext in '' $ac_executable_extensions; do
    1.92 +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    1.93 +    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    1.94 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    1.95 +    break 2
    1.96 +  fi
    1.97 +done
    1.98 +  done
    1.99 +IFS=$as_save_IFS
   1.100 +
   1.101 +  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   1.102 +  ;;
   1.103 +esac
   1.104 +fi
   1.105 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   1.106 +if test -n "$PKG_CONFIG"; then
   1.107 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   1.108 +$as_echo "$PKG_CONFIG" >&6; }
   1.109 +else
   1.110 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.111 +$as_echo "no" >&6; }
   1.112 +fi
   1.113 +
   1.114 +
   1.115 +        if test x$PKG_CONFIG != xno; then
   1.116 +            FCITX_CFLAGS=`$PKG_CONFIG --cflags fcitx`
   1.117 +            CFLAGS="$CFLAGS $FCITX_CFLAGS"
   1.118 +            ac_fn_c_check_header_mongrel "$LINENO" "fcitx/frontend.h" "ac_cv_header_fcitx_frontend_h" "$ac_includes_default"
   1.119 +if test "x$ac_cv_header_fcitx_frontend_h" = xyes; then :
   1.120 +  have_fcitx_frontend_h_hdr=yes
   1.121 +else
   1.122 +  have_fcitx_frontend_h_hdr=no
   1.123 +fi
   1.124 +
   1.125 +
   1.126 +            CFLAGS="$save_CFLAGS"
   1.127 +            if test x$have_fcitx_frontend_h_hdr = xyes; then
   1.128 +                if test x$enable_ime != xyes; then
   1.129 +                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for fcitx." >&5
   1.130 +$as_echo "$as_me: WARNING: IME support is required for fcitx." >&2;}
   1.131 +                    have_fcitx_frontend_h_hdr=no
   1.132 +                elif test x$enable_dbus != xyes; then
   1.133 +                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for fcitx." >&5
   1.134 +$as_echo "$as_me: WARNING: DBus support is required for fcitx." >&2;}
   1.135 +                    have_fcitx_frontend_h_hdr=no
   1.136 +                else
   1.137 +
   1.138 +$as_echo "#define HAVE_FCITX_FRONTEND_H 1" >>confdefs.h
   1.139 +
   1.140 +                    EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
   1.141 +                    SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
   1.142 +               fi
   1.143 +            fi
   1.144 +        fi
   1.145 +    fi
   1.146 +}
   1.147 +
   1.148  CheckTslib()
   1.149  {
   1.150      # Check whether --enable-input-tslib was given.
   1.151 @@ -23031,7 +23140,9 @@
   1.152          CheckWayland
   1.153          CheckLibUDev
   1.154          CheckDBus
   1.155 +        CheckIME
   1.156          CheckIBus
   1.157 +        CheckFcitx
   1.158          case $ARCH in
   1.159            linux)
   1.160                CheckInputEvents
   1.161 @@ -23944,11 +24055,21 @@
   1.162  else
   1.163      SUMMARY="${SUMMARY}Using dbus      : NO\n"
   1.164  fi
   1.165 +if test x$enable_ime = xyes; then
   1.166 +    SUMMARY="${SUMMARY}Using ime       : YES\n"
   1.167 +else
   1.168 +    SUMMARY="${SUMMARY}Using ime       : NO\n"
   1.169 +fi
   1.170  if test x$have_ibus_ibus_h_hdr = xyes; then
   1.171      SUMMARY="${SUMMARY}Using ibus      : YES\n"
   1.172  else
   1.173      SUMMARY="${SUMMARY}Using ibus      : NO\n"
   1.174  fi
   1.175 +if test x$have_fcitx_frontend_h_hdr = xyes; then
   1.176 +    SUMMARY="${SUMMARY}Using fcitx     : YES\n"
   1.177 +else
   1.178 +    SUMMARY="${SUMMARY}Using fcitx     : NO\n"
   1.179 +fi
   1.180  ac_config_commands="$ac_config_commands summary"
   1.181  
   1.182