Added missing PKG_CONFIG macros
authorSam Lantinga <slouken@libsdl.org>
Sat, 16 Mar 2019 17:39:15 -0700
changeset 126391e4dd5933351
parent 12638 df6da910d4d8
child 12640 b708d2c3fe08
Added missing PKG_CONFIG macros
acinclude/pkg_config.m4
configure
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/acinclude/pkg_config.m4	Sat Mar 16 17:39:15 2019 -0700
     1.3 @@ -0,0 +1,133 @@
     1.4 +# PKG_PROG_PKG_CONFIG([MIN-VERSION])
     1.5 +# ----------------------------------
     1.6 +AC_DEFUN([PKG_PROG_PKG_CONFIG],
     1.7 +[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
     1.8 +m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
     1.9 +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
    1.10 +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
    1.11 +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
    1.12 +
    1.13 +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
    1.14 +	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
    1.15 +fi
    1.16 +if test -n "$PKG_CONFIG"; then
    1.17 +	_pkg_min_version=m4_default([$1], [0.9.0])
    1.18 +	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
    1.19 +	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
    1.20 +		AC_MSG_RESULT([yes])
    1.21 +	else
    1.22 +		AC_MSG_RESULT([no])
    1.23 +		PKG_CONFIG=""
    1.24 +	fi
    1.25 +fi[]dnl
    1.26 +])# PKG_PROG_PKG_CONFIG
    1.27 +
    1.28 +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
    1.29 +#
    1.30 +# Check to see whether a particular set of modules exists.  Similar
    1.31 +# to PKG_CHECK_MODULES(), but does not set variables or print errors.
    1.32 +#
    1.33 +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
    1.34 +# only at the first occurence in configure.ac, so if the first place
    1.35 +# it's called might be skipped (such as if it is within an "if", you
    1.36 +# have to call PKG_CHECK_EXISTS manually
    1.37 +# --------------------------------------------------------------
    1.38 +AC_DEFUN([PKG_CHECK_EXISTS],
    1.39 +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
    1.40 +if test -n "$PKG_CONFIG" && \
    1.41 +    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
    1.42 +  m4_default([$2], [:])
    1.43 +m4_ifvaln([$3], [else
    1.44 +  $3])dnl
    1.45 +fi])
    1.46 +
    1.47 +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
    1.48 +# ---------------------------------------------
    1.49 +m4_define([_PKG_CONFIG],
    1.50 +[if test -n "$$1"; then
    1.51 +    pkg_cv_[]$1="$$1"
    1.52 + elif test -n "$PKG_CONFIG"; then
    1.53 +    PKG_CHECK_EXISTS([$3],
    1.54 +                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
    1.55 +		     [pkg_failed=yes])
    1.56 + else
    1.57 +    pkg_failed=untried
    1.58 +fi[]dnl
    1.59 +])# _PKG_CONFIG
    1.60 +
    1.61 +# _PKG_SHORT_ERRORS_SUPPORTED
    1.62 +# -----------------------------
    1.63 +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
    1.64 +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
    1.65 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
    1.66 +        _pkg_short_errors_supported=yes
    1.67 +else
    1.68 +        _pkg_short_errors_supported=no
    1.69 +fi[]dnl
    1.70 +])# _PKG_SHORT_ERRORS_SUPPORTED
    1.71 +
    1.72 +
    1.73 +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
    1.74 +# [ACTION-IF-NOT-FOUND])
    1.75 +#
    1.76 +#
    1.77 +# Note that if there is a possibility the first call to
    1.78 +# PKG_CHECK_MODULES might not happen, you should be sure to include an
    1.79 +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
    1.80 +#
    1.81 +#
    1.82 +# --------------------------------------------------------------
    1.83 +AC_DEFUN([PKG_CHECK_MODULES],
    1.84 +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
    1.85 +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
    1.86 +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
    1.87 +
    1.88 +pkg_failed=no
    1.89 +AC_MSG_CHECKING([for $1])
    1.90 +
    1.91 +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
    1.92 +_PKG_CONFIG([$1][_LIBS], [libs], [$2])
    1.93 +
    1.94 +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
    1.95 +and $1[]_LIBS to avoid the need to call pkg-config.
    1.96 +See the pkg-config man page for more details.])
    1.97 +
    1.98 +if test $pkg_failed = yes; then
    1.99 +   	AC_MSG_RESULT([no])
   1.100 +        _PKG_SHORT_ERRORS_SUPPORTED
   1.101 +        if test $_pkg_short_errors_supported = yes; then
   1.102 +	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
   1.103 +        else 
   1.104 +	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
   1.105 +        fi
   1.106 +	# Put the nasty error message in config.log where it belongs
   1.107 +	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
   1.108 +
   1.109 +	m4_default([$4], [AC_MSG_ERROR(
   1.110 +[Package requirements ($2) were not met:
   1.111 +
   1.112 +$$1_PKG_ERRORS
   1.113 +
   1.114 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
   1.115 +installed software in a non-standard prefix.
   1.116 +
   1.117 +_PKG_TEXT])dnl
   1.118 +        ])
   1.119 +elif test $pkg_failed = untried; then
   1.120 +     	AC_MSG_RESULT([no])
   1.121 +	m4_default([$4], [AC_MSG_FAILURE(
   1.122 +[The pkg-config script could not be found or is too old.  Make sure it
   1.123 +is in your PATH or set the PKG_CONFIG environment variable to the full
   1.124 +path to pkg-config.
   1.125 +
   1.126 +_PKG_TEXT
   1.127 +
   1.128 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
   1.129 +        ])
   1.130 +else
   1.131 +	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
   1.132 +	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
   1.133 +        AC_MSG_RESULT([yes])
   1.134 +	$3
   1.135 +fi[]dnl
   1.136 +])# PKG_CHECK_MODULES
     2.1 --- a/configure	Sun Feb 03 20:06:18 2019 +1100
     2.2 +++ b/configure	Sat Mar 16 17:39:15 2019 -0700
     2.3 @@ -651,22 +651,45 @@
     2.4  SDL_STATIC_LIBS
     2.5  SDL_LIBS
     2.6  SDL_CFLAGS
     2.7 -DIRECTFBCONFIG
     2.8 +LIBUSB_LIBS
     2.9 +LIBUSB_CFLAGS
    2.10 +FCITX_LIBS
    2.11 +FCITX_CFLAGS
    2.12 +IBUS_LIBS
    2.13 +IBUS_CFLAGS
    2.14 +DBUS_LIBS
    2.15 +DBUS_CFLAGS
    2.16 +LIBGBM_LIBS
    2.17 +LIBGBM_CFLAGS
    2.18 +LIBDRM_LIBS
    2.19 +LIBDRM_CFLAGS
    2.20 +DIRECTFB_LIBS
    2.21 +DIRECTFB_CFLAGS
    2.22  X_EXTRA_LIBS
    2.23  X_LIBS
    2.24  X_PRE_LIBS
    2.25  X_CFLAGS
    2.26  XMKMF
    2.27 +RPI_LIBS
    2.28 +RPI_CFLAGS
    2.29 +FUSIONSOUND_LIBS
    2.30 +FUSIONSOUND_CFLAGS
    2.31  ARTSCONFIG
    2.32 +PULSEAUDIO_LIBS
    2.33 +PULSEAUDIO_CFLAGS
    2.34  ESD_LIBS
    2.35  ESD_CFLAGS
    2.36  ESD_CONFIG
    2.37 -PKG_CONFIG
    2.38 +JACK_LIBS
    2.39 +JACK_CFLAGS
    2.40  ALSA_LIBS
    2.41  ALSA_CFLAGS
    2.42  POW_LIB
    2.43  LIBOBJS
    2.44  ALLOCA
    2.45 +PKG_CONFIG_LIBDIR
    2.46 +PKG_CONFIG_PATH
    2.47 +PKG_CONFIG
    2.48  WINDRES
    2.49  SET_MAKE
    2.50  INSTALL_DATA
    2.51 @@ -887,7 +910,32 @@
    2.52  CXXFLAGS
    2.53  CCC
    2.54  CXXCPP
    2.55 -XMKMF'
    2.56 +PKG_CONFIG
    2.57 +PKG_CONFIG_PATH
    2.58 +PKG_CONFIG_LIBDIR
    2.59 +JACK_CFLAGS
    2.60 +JACK_LIBS
    2.61 +PULSEAUDIO_CFLAGS
    2.62 +PULSEAUDIO_LIBS
    2.63 +FUSIONSOUND_CFLAGS
    2.64 +FUSIONSOUND_LIBS
    2.65 +RPI_CFLAGS
    2.66 +RPI_LIBS
    2.67 +XMKMF
    2.68 +DIRECTFB_CFLAGS
    2.69 +DIRECTFB_LIBS
    2.70 +LIBDRM_CFLAGS
    2.71 +LIBDRM_LIBS
    2.72 +LIBGBM_CFLAGS
    2.73 +LIBGBM_LIBS
    2.74 +DBUS_CFLAGS
    2.75 +DBUS_LIBS
    2.76 +IBUS_CFLAGS
    2.77 +IBUS_LIBS
    2.78 +FCITX_CFLAGS
    2.79 +FCITX_LIBS
    2.80 +LIBUSB_CFLAGS
    2.81 +LIBUSB_LIBS'
    2.82  
    2.83  
    2.84  # Initialize some variables set by options.
    2.85 @@ -1576,7 +1624,7 @@
    2.86                            QtWayland server support for Wayland video driver
    2.87                            [[default=yes]]
    2.88    --enable-wayland-shared dynamically load Wayland support [[default=maybe]]
    2.89 -  --enable-video-rpi      use Raspberry Pi video driver [[default=yes]]
    2.90 +  --enable-video-rpi      use Raspberry Pi video driver [[default=no]]
    2.91    --enable-video-x11      use X11 video driver [[default=yes]]
    2.92    --enable-x11-shared     dynamically load X11 support [[default=maybe]]
    2.93    --enable-video-x11-xcursor
    2.94 @@ -1663,7 +1711,44 @@
    2.95    CXX         C++ compiler command
    2.96    CXXFLAGS    C++ compiler flags
    2.97    CXXCPP      C++ preprocessor
    2.98 +  PKG_CONFIG  path to pkg-config utility
    2.99 +  PKG_CONFIG_PATH
   2.100 +              directories to add to pkg-config's search path
   2.101 +  PKG_CONFIG_LIBDIR
   2.102 +              path overriding pkg-config's built-in search path
   2.103 +  JACK_CFLAGS C compiler flags for JACK, overriding pkg-config
   2.104 +  JACK_LIBS   linker flags for JACK, overriding pkg-config
   2.105 +  PULSEAUDIO_CFLAGS
   2.106 +              C compiler flags for PULSEAUDIO, overriding pkg-config
   2.107 +  PULSEAUDIO_LIBS
   2.108 +              linker flags for PULSEAUDIO, overriding pkg-config
   2.109 +  FUSIONSOUND_CFLAGS
   2.110 +              C compiler flags for FUSIONSOUND, overriding pkg-config
   2.111 +  FUSIONSOUND_LIBS
   2.112 +              linker flags for FUSIONSOUND, overriding pkg-config
   2.113 +  RPI_CFLAGS  C compiler flags for RPI, overriding pkg-config
   2.114 +  RPI_LIBS    linker flags for RPI, overriding pkg-config
   2.115    XMKMF       Path to xmkmf, Makefile generator for X Window System
   2.116 +  DIRECTFB_CFLAGS
   2.117 +              C compiler flags for DIRECTFB, overriding pkg-config
   2.118 +  DIRECTFB_LIBS
   2.119 +              linker flags for DIRECTFB, overriding pkg-config
   2.120 +  LIBDRM_CFLAGS
   2.121 +              C compiler flags for LIBDRM, overriding pkg-config
   2.122 +  LIBDRM_LIBS linker flags for LIBDRM, overriding pkg-config
   2.123 +  LIBGBM_CFLAGS
   2.124 +              C compiler flags for LIBGBM, overriding pkg-config
   2.125 +  LIBGBM_LIBS linker flags for LIBGBM, overriding pkg-config
   2.126 +  DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config
   2.127 +  DBUS_LIBS   linker flags for DBUS, overriding pkg-config
   2.128 +  IBUS_CFLAGS C compiler flags for IBUS, overriding pkg-config
   2.129 +  IBUS_LIBS   linker flags for IBUS, overriding pkg-config
   2.130 +  FCITX_CFLAGS
   2.131 +              C compiler flags for FCITX, overriding pkg-config
   2.132 +  FCITX_LIBS  linker flags for FCITX, overriding pkg-config
   2.133 +  LIBUSB_CFLAGS
   2.134 +              C compiler flags for LIBUSB, overriding pkg-config
   2.135 +  LIBUSB_LIBS linker flags for LIBUSB, overriding pkg-config
   2.136  
   2.137  Use these variables to override the choices made by `configure' or to help
   2.138  it to find libraries and programs with nonstandard names/locations.
   2.139 @@ -15683,6 +15768,125 @@
   2.140  fi
   2.141  
   2.142  
   2.143 +
   2.144 +
   2.145 +
   2.146 +
   2.147 +
   2.148 +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
   2.149 +	if test -n "$ac_tool_prefix"; then
   2.150 +  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
   2.151 +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
   2.152 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   2.153 +$as_echo_n "checking for $ac_word... " >&6; }
   2.154 +if ${ac_cv_path_PKG_CONFIG+:} false; then :
   2.155 +  $as_echo_n "(cached) " >&6
   2.156 +else
   2.157 +  case $PKG_CONFIG in
   2.158 +  [\\/]* | ?:[\\/]*)
   2.159 +  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   2.160 +  ;;
   2.161 +  *)
   2.162 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   2.163 +for as_dir in $PATH
   2.164 +do
   2.165 +  IFS=$as_save_IFS
   2.166 +  test -z "$as_dir" && as_dir=.
   2.167 +    for ac_exec_ext in '' $ac_executable_extensions; do
   2.168 +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   2.169 +    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   2.170 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   2.171 +    break 2
   2.172 +  fi
   2.173 +done
   2.174 +  done
   2.175 +IFS=$as_save_IFS
   2.176 +
   2.177 +  ;;
   2.178 +esac
   2.179 +fi
   2.180 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   2.181 +if test -n "$PKG_CONFIG"; then
   2.182 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   2.183 +$as_echo "$PKG_CONFIG" >&6; }
   2.184 +else
   2.185 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.186 +$as_echo "no" >&6; }
   2.187 +fi
   2.188 +
   2.189 +
   2.190 +fi
   2.191 +if test -z "$ac_cv_path_PKG_CONFIG"; then
   2.192 +  ac_pt_PKG_CONFIG=$PKG_CONFIG
   2.193 +  # Extract the first word of "pkg-config", so it can be a program name with args.
   2.194 +set dummy pkg-config; ac_word=$2
   2.195 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   2.196 +$as_echo_n "checking for $ac_word... " >&6; }
   2.197 +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   2.198 +  $as_echo_n "(cached) " >&6
   2.199 +else
   2.200 +  case $ac_pt_PKG_CONFIG in
   2.201 +  [\\/]* | ?:[\\/]*)
   2.202 +  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
   2.203 +  ;;
   2.204 +  *)
   2.205 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   2.206 +for as_dir in $PATH
   2.207 +do
   2.208 +  IFS=$as_save_IFS
   2.209 +  test -z "$as_dir" && as_dir=.
   2.210 +    for ac_exec_ext in '' $ac_executable_extensions; do
   2.211 +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   2.212 +    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   2.213 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   2.214 +    break 2
   2.215 +  fi
   2.216 +done
   2.217 +  done
   2.218 +IFS=$as_save_IFS
   2.219 +
   2.220 +  ;;
   2.221 +esac
   2.222 +fi
   2.223 +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
   2.224 +if test -n "$ac_pt_PKG_CONFIG"; then
   2.225 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
   2.226 +$as_echo "$ac_pt_PKG_CONFIG" >&6; }
   2.227 +else
   2.228 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.229 +$as_echo "no" >&6; }
   2.230 +fi
   2.231 +
   2.232 +  if test "x$ac_pt_PKG_CONFIG" = x; then
   2.233 +    PKG_CONFIG=""
   2.234 +  else
   2.235 +    case $cross_compiling:$ac_tool_warned in
   2.236 +yes:)
   2.237 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
   2.238 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
   2.239 +ac_tool_warned=yes ;;
   2.240 +esac
   2.241 +    PKG_CONFIG=$ac_pt_PKG_CONFIG
   2.242 +  fi
   2.243 +else
   2.244 +  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
   2.245 +fi
   2.246 +
   2.247 +fi
   2.248 +if test -n "$PKG_CONFIG"; then
   2.249 +	_pkg_min_version=0.9.0
   2.250 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
   2.251 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
   2.252 +	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
   2.253 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   2.254 +$as_echo "yes" >&6; }
   2.255 +	else
   2.256 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.257 +$as_echo "no" >&6; }
   2.258 +		PKG_CONFIG=""
   2.259 +	fi
   2.260 +fi
   2.261 +
   2.262  case "$host" in
   2.263      *-*-mingw32*)
   2.264          # Except on msys, where make can't handle full pathnames (bug 1972)
   2.265 @@ -18065,62 +18269,75 @@
   2.266  fi
   2.267  
   2.268      if test x$enable_audio = xyes -a x$enable_jack = xyes; then
   2.269 -        audio_jack=no
   2.270 -
   2.271 -        JACK_REQUIRED_VERSION=0.125
   2.272 -
   2.273 -        # Extract the first word of "pkg-config", so it can be a program name with args.
   2.274 -set dummy pkg-config; ac_word=$2
   2.275 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   2.276 -$as_echo_n "checking for $ac_word... " >&6; }
   2.277 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   2.278 -  $as_echo_n "(cached) " >&6
   2.279 -else
   2.280 -  case $PKG_CONFIG in
   2.281 -  [\\/]* | ?:[\\/]*)
   2.282 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   2.283 -  ;;
   2.284 -  *)
   2.285 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   2.286 -for as_dir in $PATH
   2.287 -do
   2.288 -  IFS=$as_save_IFS
   2.289 -  test -z "$as_dir" && as_dir=.
   2.290 -    for ac_exec_ext in '' $ac_executable_extensions; do
   2.291 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   2.292 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   2.293 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   2.294 -    break 2
   2.295 -  fi
   2.296 -done
   2.297 -  done
   2.298 -IFS=$as_save_IFS
   2.299 -
   2.300 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   2.301 -  ;;
   2.302 -esac
   2.303 -fi
   2.304 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   2.305 -if test -n "$PKG_CONFIG"; then
   2.306 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   2.307 -$as_echo "$PKG_CONFIG" >&6; }
   2.308 -else
   2.309 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.310 -$as_echo "no" >&6; }
   2.311 -fi
   2.312 -
   2.313 -
   2.314 -        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK $JACK_REQUIRED_VERSION support" >&5
   2.315 -$as_echo_n "checking for JACK $JACK_REQUIRED_VERSION support... " >&6; }
   2.316 -        if test x$PKG_CONFIG != xno; then
   2.317 -        if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then
   2.318 -                JACK_CFLAGS=`$PKG_CONFIG --cflags jack`
   2.319 -                JACK_LIBS=`$PKG_CONFIG --libs jack`
   2.320 -                audio_jack=yes
   2.321 -            fi
   2.322 -        fi
   2.323 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $audio_jack" >&5
   2.324 -$as_echo "$audio_jack" >&6; }
   2.325 +
   2.326 +pkg_failed=no
   2.327 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK" >&5
   2.328 +$as_echo_n "checking for JACK... " >&6; }
   2.329 +
   2.330 +if test -n "$JACK_CFLAGS"; then
   2.331 +    pkg_cv_JACK_CFLAGS="$JACK_CFLAGS"
   2.332 + elif test -n "$PKG_CONFIG"; then
   2.333 +    if test -n "$PKG_CONFIG" && \
   2.334 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack >= 0.125\""; } >&5
   2.335 +  ($PKG_CONFIG --exists --print-errors "jack >= 0.125") 2>&5
   2.336 +  ac_status=$?
   2.337 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   2.338 +  test $ac_status = 0; }; then
   2.339 +  pkg_cv_JACK_CFLAGS=`$PKG_CONFIG --cflags "jack >= 0.125" 2>/dev/null`
   2.340 +else
   2.341 +  pkg_failed=yes
   2.342 +fi
   2.343 + else
   2.344 +    pkg_failed=untried
   2.345 +fi
   2.346 +if test -n "$JACK_LIBS"; then
   2.347 +    pkg_cv_JACK_LIBS="$JACK_LIBS"
   2.348 + elif test -n "$PKG_CONFIG"; then
   2.349 +    if test -n "$PKG_CONFIG" && \
   2.350 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack >= 0.125\""; } >&5
   2.351 +  ($PKG_CONFIG --exists --print-errors "jack >= 0.125") 2>&5
   2.352 +  ac_status=$?
   2.353 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   2.354 +  test $ac_status = 0; }; then
   2.355 +  pkg_cv_JACK_LIBS=`$PKG_CONFIG --libs "jack >= 0.125" 2>/dev/null`
   2.356 +else
   2.357 +  pkg_failed=yes
   2.358 +fi
   2.359 + else
   2.360 +    pkg_failed=untried
   2.361 +fi
   2.362 +
   2.363 +
   2.364 +
   2.365 +if test $pkg_failed = yes; then
   2.366 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.367 +$as_echo "no" >&6; }
   2.368 +
   2.369 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
   2.370 +        _pkg_short_errors_supported=yes
   2.371 +else
   2.372 +        _pkg_short_errors_supported=no
   2.373 +fi
   2.374 +        if test $_pkg_short_errors_supported = yes; then
   2.375 +	        JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "jack >= 0.125" 2>&1`
   2.376 +        else
   2.377 +	        JACK_PKG_ERRORS=`$PKG_CONFIG --print-errors "jack >= 0.125" 2>&1`
   2.378 +        fi
   2.379 +	# Put the nasty error message in config.log where it belongs
   2.380 +	echo "$JACK_PKG_ERRORS" >&5
   2.381 +
   2.382 +	audio_jack=no
   2.383 +elif test $pkg_failed = untried; then
   2.384 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.385 +$as_echo "no" >&6; }
   2.386 +	audio_jack=no
   2.387 +else
   2.388 +	JACK_CFLAGS=$pkg_cv_JACK_CFLAGS
   2.389 +	JACK_LIBS=$pkg_cv_JACK_LIBS
   2.390 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   2.391 +$as_echo "yes" >&6; }
   2.392 +	audio_jack=yes
   2.393 +fi
   2.394  
   2.395          if test x$audio_jack = xyes; then
   2.396              # Check whether --enable-jack-shared was given.
   2.397 @@ -18463,62 +18680,75 @@
   2.398  fi
   2.399  
   2.400      if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
   2.401 -        audio_pulseaudio=no
   2.402 -
   2.403 -        PULSEAUDIO_REQUIRED_VERSION=0.9
   2.404 -
   2.405 -        # Extract the first word of "pkg-config", so it can be a program name with args.
   2.406 -set dummy pkg-config; ac_word=$2
   2.407 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   2.408 -$as_echo_n "checking for $ac_word... " >&6; }
   2.409 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   2.410 -  $as_echo_n "(cached) " >&6
   2.411 -else
   2.412 -  case $PKG_CONFIG in
   2.413 -  [\\/]* | ?:[\\/]*)
   2.414 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   2.415 -  ;;
   2.416 -  *)
   2.417 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   2.418 -for as_dir in $PATH
   2.419 -do
   2.420 -  IFS=$as_save_IFS
   2.421 -  test -z "$as_dir" && as_dir=.
   2.422 -    for ac_exec_ext in '' $ac_executable_extensions; do
   2.423 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   2.424 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   2.425 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   2.426 -    break 2
   2.427 -  fi
   2.428 -done
   2.429 -  done
   2.430 -IFS=$as_save_IFS
   2.431 -
   2.432 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   2.433 -  ;;
   2.434 -esac
   2.435 -fi
   2.436 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   2.437 -if test -n "$PKG_CONFIG"; then
   2.438 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   2.439 -$as_echo "$PKG_CONFIG" >&6; }
   2.440 -else
   2.441 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.442 -$as_echo "no" >&6; }
   2.443 -fi
   2.444 -
   2.445 -
   2.446 -        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support" >&5
   2.447 -$as_echo_n "checking for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support... " >&6; }
   2.448 -        if test x$PKG_CONFIG != xno; then
   2.449 -            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
   2.450 -                PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
   2.451 -                PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple`
   2.452 -                audio_pulseaudio=yes
   2.453 -            fi
   2.454 -        fi
   2.455 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $audio_pulseaudio" >&5
   2.456 -$as_echo "$audio_pulseaudio" >&6; }
   2.457 +
   2.458 +pkg_failed=no
   2.459 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PULSEAUDIO" >&5
   2.460 +$as_echo_n "checking for PULSEAUDIO... " >&6; }
   2.461 +
   2.462 +if test -n "$PULSEAUDIO_CFLAGS"; then
   2.463 +    pkg_cv_PULSEAUDIO_CFLAGS="$PULSEAUDIO_CFLAGS"
   2.464 + elif test -n "$PKG_CONFIG"; then
   2.465 +    if test -n "$PKG_CONFIG" && \
   2.466 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple >= 0.9\""; } >&5
   2.467 +  ($PKG_CONFIG --exists --print-errors "libpulse-simple >= 0.9") 2>&5
   2.468 +  ac_status=$?
   2.469 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   2.470 +  test $ac_status = 0; }; then
   2.471 +  pkg_cv_PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags "libpulse-simple >= 0.9" 2>/dev/null`
   2.472 +else
   2.473 +  pkg_failed=yes
   2.474 +fi
   2.475 + else
   2.476 +    pkg_failed=untried
   2.477 +fi
   2.478 +if test -n "$PULSEAUDIO_LIBS"; then
   2.479 +    pkg_cv_PULSEAUDIO_LIBS="$PULSEAUDIO_LIBS"
   2.480 + elif test -n "$PKG_CONFIG"; then
   2.481 +    if test -n "$PKG_CONFIG" && \
   2.482 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple >= 0.9\""; } >&5
   2.483 +  ($PKG_CONFIG --exists --print-errors "libpulse-simple >= 0.9") 2>&5
   2.484 +  ac_status=$?
   2.485 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   2.486 +  test $ac_status = 0; }; then
   2.487 +  pkg_cv_PULSEAUDIO_LIBS=`$PKG_CONFIG --libs "libpulse-simple >= 0.9" 2>/dev/null`
   2.488 +else
   2.489 +  pkg_failed=yes
   2.490 +fi
   2.491 + else
   2.492 +    pkg_failed=untried
   2.493 +fi
   2.494 +
   2.495 +
   2.496 +
   2.497 +if test $pkg_failed = yes; then
   2.498 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.499 +$as_echo "no" >&6; }
   2.500 +
   2.501 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
   2.502 +        _pkg_short_errors_supported=yes
   2.503 +else
   2.504 +        _pkg_short_errors_supported=no
   2.505 +fi
   2.506 +        if test $_pkg_short_errors_supported = yes; then
   2.507 +	        PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpulse-simple >= 0.9" 2>&1`
   2.508 +        else
   2.509 +	        PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpulse-simple >= 0.9" 2>&1`
   2.510 +        fi
   2.511 +	# Put the nasty error message in config.log where it belongs
   2.512 +	echo "$PULSEAUDIO_PKG_ERRORS" >&5
   2.513 +
   2.514 +	audio_pulseaudio=no
   2.515 +elif test $pkg_failed = untried; then
   2.516 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.517 +$as_echo "no" >&6; }
   2.518 +	audio_pulseaudio=no
   2.519 +else
   2.520 +	PULSEAUDIO_CFLAGS=$pkg_cv_PULSEAUDIO_CFLAGS
   2.521 +	PULSEAUDIO_LIBS=$pkg_cv_PULSEAUDIO_LIBS
   2.522 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   2.523 +$as_echo "yes" >&6; }
   2.524 +	audio_pulseaudio=yes
   2.525 +fi
   2.526  
   2.527          if test x$audio_pulseaudio = xyes; then
   2.528              # Check whether --enable-pulseaudio-shared was given.
   2.529 @@ -18921,62 +19151,75 @@
   2.530  fi
   2.531  
   2.532      if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
   2.533 -        fusionsound=no
   2.534 -
   2.535 -        FUSIONSOUND_REQUIRED_VERSION=1.1.1
   2.536 -
   2.537 -        # Extract the first word of "pkg-config", so it can be a program name with args.
   2.538 -set dummy pkg-config; ac_word=$2
   2.539 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   2.540 -$as_echo_n "checking for $ac_word... " >&6; }
   2.541 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   2.542 -  $as_echo_n "(cached) " >&6
   2.543 -else
   2.544 -  case $PKG_CONFIG in
   2.545 -  [\\/]* | ?:[\\/]*)
   2.546 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   2.547 -  ;;
   2.548 -  *)
   2.549 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   2.550 -for as_dir in $PATH
   2.551 -do
   2.552 -  IFS=$as_save_IFS
   2.553 -  test -z "$as_dir" && as_dir=.
   2.554 -    for ac_exec_ext in '' $ac_executable_extensions; do
   2.555 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   2.556 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   2.557 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   2.558 -    break 2
   2.559 -  fi
   2.560 -done
   2.561 -  done
   2.562 -IFS=$as_save_IFS
   2.563 -
   2.564 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   2.565 -  ;;
   2.566 -esac
   2.567 -fi
   2.568 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   2.569 -if test -n "$PKG_CONFIG"; then
   2.570 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   2.571 -$as_echo "$PKG_CONFIG" >&6; }
   2.572 -else
   2.573 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.574 -$as_echo "no" >&6; }
   2.575 -fi
   2.576 -
   2.577 -
   2.578 -        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support" >&5
   2.579 -$as_echo_n "checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support... " >&6; }
   2.580 -        if test x$PKG_CONFIG != xno; then
   2.581 -            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
   2.582 -                FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
   2.583 -                FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
   2.584 -                fusionsound=yes
   2.585 -            fi
   2.586 -        fi
   2.587 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fusionsound" >&5
   2.588 -$as_echo "$fusionsound" >&6; }
   2.589 +
   2.590 +pkg_failed=no
   2.591 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSIONSOUND" >&5
   2.592 +$as_echo_n "checking for FUSIONSOUND... " >&6; }
   2.593 +
   2.594 +if test -n "$FUSIONSOUND_CFLAGS"; then
   2.595 +    pkg_cv_FUSIONSOUND_CFLAGS="$FUSIONSOUND_CFLAGS"
   2.596 + elif test -n "$PKG_CONFIG"; then
   2.597 +    if test -n "$PKG_CONFIG" && \
   2.598 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fusionsound >= 1.1.1\""; } >&5
   2.599 +  ($PKG_CONFIG --exists --print-errors "fusionsound >= 1.1.1") 2>&5
   2.600 +  ac_status=$?
   2.601 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   2.602 +  test $ac_status = 0; }; then
   2.603 +  pkg_cv_FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags "fusionsound >= 1.1.1" 2>/dev/null`
   2.604 +else
   2.605 +  pkg_failed=yes
   2.606 +fi
   2.607 + else
   2.608 +    pkg_failed=untried
   2.609 +fi
   2.610 +if test -n "$FUSIONSOUND_LIBS"; then
   2.611 +    pkg_cv_FUSIONSOUND_LIBS="$FUSIONSOUND_LIBS"
   2.612 + elif test -n "$PKG_CONFIG"; then
   2.613 +    if test -n "$PKG_CONFIG" && \
   2.614 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fusionsound >= 1.1.1\""; } >&5
   2.615 +  ($PKG_CONFIG --exists --print-errors "fusionsound >= 1.1.1") 2>&5
   2.616 +  ac_status=$?
   2.617 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   2.618 +  test $ac_status = 0; }; then
   2.619 +  pkg_cv_FUSIONSOUND_LIBS=`$PKG_CONFIG --libs "fusionsound >= 1.1.1" 2>/dev/null`
   2.620 +else
   2.621 +  pkg_failed=yes
   2.622 +fi
   2.623 + else
   2.624 +    pkg_failed=untried
   2.625 +fi
   2.626 +
   2.627 +
   2.628 +
   2.629 +if test $pkg_failed = yes; then
   2.630 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.631 +$as_echo "no" >&6; }
   2.632 +
   2.633 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
   2.634 +        _pkg_short_errors_supported=yes
   2.635 +else
   2.636 +        _pkg_short_errors_supported=no
   2.637 +fi
   2.638 +        if test $_pkg_short_errors_supported = yes; then
   2.639 +	        FUSIONSOUND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fusionsound >= 1.1.1" 2>&1`
   2.640 +        else
   2.641 +	        FUSIONSOUND_PKG_ERRORS=`$PKG_CONFIG --print-errors "fusionsound >= 1.1.1" 2>&1`
   2.642 +        fi
   2.643 +	# Put the nasty error message in config.log where it belongs
   2.644 +	echo "$FUSIONSOUND_PKG_ERRORS" >&5
   2.645 +
   2.646 +	fusionsound=no
   2.647 +elif test $pkg_failed = untried; then
   2.648 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.649 +$as_echo "no" >&6; }
   2.650 +	fusionsound=no
   2.651 +else
   2.652 +	FUSIONSOUND_CFLAGS=$pkg_cv_FUSIONSOUND_CFLAGS
   2.653 +	FUSIONSOUND_LIBS=$pkg_cv_FUSIONSOUND_LIBS
   2.654 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   2.655 +$as_echo "yes" >&6; }
   2.656 +	fusionsound=yes
   2.657 +fi
   2.658  
   2.659          if test x$fusionsound = xyes; then
   2.660  
   2.661 @@ -19294,52 +19537,10 @@
   2.662  
   2.663  
   2.664      if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then
   2.665 -        # Extract the first word of "pkg-config", so it can be a program name with args.
   2.666 -set dummy pkg-config; ac_word=$2
   2.667 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   2.668 -$as_echo_n "checking for $ac_word... " >&6; }
   2.669 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   2.670 -  $as_echo_n "(cached) " >&6
   2.671 -else
   2.672 -  case $PKG_CONFIG in
   2.673 -  [\\/]* | ?:[\\/]*)
   2.674 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   2.675 -  ;;
   2.676 -  *)
   2.677 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   2.678 -for as_dir in $PATH
   2.679 -do
   2.680 -  IFS=$as_save_IFS
   2.681 -  test -z "$as_dir" && as_dir=.
   2.682 -    for ac_exec_ext in '' $ac_executable_extensions; do
   2.683 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   2.684 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   2.685 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   2.686 -    break 2
   2.687 -  fi
   2.688 -done
   2.689 -  done
   2.690 -IFS=$as_save_IFS
   2.691 -
   2.692 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   2.693 -  ;;
   2.694 -esac
   2.695 -fi
   2.696 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   2.697 -if test -n "$PKG_CONFIG"; then
   2.698 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   2.699 -$as_echo "$PKG_CONFIG" >&6; }
   2.700 -else
   2.701 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.702 -$as_echo "no" >&6; }
   2.703 -fi
   2.704 -
   2.705 -
   2.706          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Wayland support" >&5
   2.707  $as_echo_n "checking for Wayland support... " >&6; }
   2.708          video_wayland=no
   2.709 -        if  test x$PKG_CONFIG != xno && \
   2.710 -            test x$video_opengl_egl = xyes && \
   2.711 +        if  test x$video_opengl_egl = xyes && \
   2.712              test x$video_opengles_v2 = xyes; then
   2.713              if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
   2.714                  WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
   2.715 @@ -19493,67 +19694,95 @@
   2.716  if test "${enable_video_rpi+set}" = set; then :
   2.717    enableval=$enable_video_rpi;
   2.718  else
   2.719 -  enable_video_rpi=yes
   2.720 +  enable_video_rpi=no
   2.721  fi
   2.722  
   2.723      if test x$enable_video = xyes -a x$enable_video_rpi = xyes; then
   2.724 -        # Extract the first word of "pkg-config", so it can be a program name with args.
   2.725 -set dummy pkg-config; ac_word=$2
   2.726 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   2.727 -$as_echo_n "checking for $ac_word... " >&6; }
   2.728 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   2.729 -  $as_echo_n "(cached) " >&6
   2.730 -else
   2.731 -  case $PKG_CONFIG in
   2.732 -  [\\/]* | ?:[\\/]*)
   2.733 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   2.734 -  ;;
   2.735 -  *)
   2.736 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   2.737 -for as_dir in $PATH
   2.738 -do
   2.739 -  IFS=$as_save_IFS
   2.740 -  test -z "$as_dir" && as_dir=.
   2.741 -    for ac_exec_ext in '' $ac_executable_extensions; do
   2.742 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   2.743 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   2.744 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   2.745 -    break 2
   2.746 -  fi
   2.747 -done
   2.748 -  done
   2.749 -IFS=$as_save_IFS
   2.750 -
   2.751 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   2.752 -  ;;
   2.753 -esac
   2.754 -fi
   2.755 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   2.756 -if test -n "$PKG_CONFIG"; then
   2.757 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   2.758 -$as_echo "$PKG_CONFIG" >&6; }
   2.759 -else
   2.760 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.761 -$as_echo "no" >&6; }
   2.762 -fi
   2.763 -
   2.764 -
   2.765 -        if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists bcm_host; then
   2.766 -            RPI_CFLAGS=`$PKG_CONFIG --cflags bcm_host brcmegl`
   2.767 -            RPI_LDFLAGS=`$PKG_CONFIG --libs bcm_host brcmegl`
   2.768 -        elif test x$ARCH = xnetbsd; then
   2.769 -            RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
   2.770 -            RPI_LDFLAGS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
   2.771 +
   2.772 +pkg_failed=no
   2.773 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RPI" >&5
   2.774 +$as_echo_n "checking for RPI... " >&6; }
   2.775 +
   2.776 +if test -n "$RPI_CFLAGS"; then
   2.777 +    pkg_cv_RPI_CFLAGS="$RPI_CFLAGS"
   2.778 + elif test -n "$PKG_CONFIG"; then
   2.779 +    if test -n "$PKG_CONFIG" && \
   2.780 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bcm_host brcmegl\""; } >&5
   2.781 +  ($PKG_CONFIG --exists --print-errors "bcm_host brcmegl") 2>&5
   2.782 +  ac_status=$?
   2.783 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   2.784 +  test $ac_status = 0; }; then
   2.785 +  pkg_cv_RPI_CFLAGS=`$PKG_CONFIG --cflags "bcm_host brcmegl" 2>/dev/null`
   2.786 +else
   2.787 +  pkg_failed=yes
   2.788 +fi
   2.789 + else
   2.790 +    pkg_failed=untried
   2.791 +fi
   2.792 +if test -n "$RPI_LIBS"; then
   2.793 +    pkg_cv_RPI_LIBS="$RPI_LIBS"
   2.794 + elif test -n "$PKG_CONFIG"; then
   2.795 +    if test -n "$PKG_CONFIG" && \
   2.796 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bcm_host brcmegl\""; } >&5
   2.797 +  ($PKG_CONFIG --exists --print-errors "bcm_host brcmegl") 2>&5
   2.798 +  ac_status=$?
   2.799 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   2.800 +  test $ac_status = 0; }; then
   2.801 +  pkg_cv_RPI_LIBS=`$PKG_CONFIG --libs "bcm_host brcmegl" 2>/dev/null`
   2.802 +else
   2.803 +  pkg_failed=yes
   2.804 +fi
   2.805 + else
   2.806 +    pkg_failed=untried
   2.807 +fi
   2.808 +
   2.809 +
   2.810 +
   2.811 +if test $pkg_failed = yes; then
   2.812 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.813 +$as_echo "no" >&6; }
   2.814 +
   2.815 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
   2.816 +        _pkg_short_errors_supported=yes
   2.817 +else
   2.818 +        _pkg_short_errors_supported=no
   2.819 +fi
   2.820 +        if test $_pkg_short_errors_supported = yes; then
   2.821 +	        RPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "bcm_host brcmegl" 2>&1`
   2.822          else
   2.823 -            RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
   2.824 -            RPI_LDFLAGS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
   2.825 +	        RPI_PKG_ERRORS=`$PKG_CONFIG --print-errors "bcm_host brcmegl" 2>&1`
   2.826 +        fi
   2.827 +	# Put the nasty error message in config.log where it belongs
   2.828 +	echo "$RPI_PKG_ERRORS" >&5
   2.829 +
   2.830 +	video_rpi=no
   2.831 +elif test $pkg_failed = untried; then
   2.832 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.833 +$as_echo "no" >&6; }
   2.834 +	video_rpi=no
   2.835 +else
   2.836 +	RPI_CFLAGS=$pkg_cv_RPI_CFLAGS
   2.837 +	RPI_LIBS=$pkg_cv_RPI_LIBS
   2.838 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   2.839 +$as_echo "yes" >&6; }
   2.840 +	video_rpi=yes
   2.841 +fi
   2.842 +
   2.843 +        if test x$video_rpi = xno; then
   2.844 +            if test x$ARCH = xnetbsd; then
   2.845 +                RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
   2.846 +                RPI_LIBS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
   2.847 +            else
   2.848 +                RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
   2.849 +                RPI_LIBS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
   2.850 +            fi
   2.851          fi
   2.852  
   2.853          # Save the original compiler flags and libraries
   2.854          ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
   2.855  
   2.856          # Add the Raspberry Pi compiler flags and libraries
   2.857 -        CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LDFLAGS"
   2.858 +        CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
   2.859  
   2.860          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Raspberry Pi" >&5
   2.861  $as_echo_n "checking for Raspberry Pi... " >&6; }
   2.862 @@ -19590,7 +19819,7 @@
   2.863              CFLAGS="$CFLAGS $RPI_CFLAGS"
   2.864              SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
   2.865              EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
   2.866 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LDFLAGS"
   2.867 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LIBS"
   2.868              SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
   2.869  
   2.870  $as_echo "#define SDL_VIDEO_DRIVER_RPI 1" >>confdefs.h
   2.871 @@ -21326,118 +21555,76 @@
   2.872  fi
   2.873  
   2.874      if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
   2.875 -        video_directfb=no
   2.876 -
   2.877 -        DIRECTFB_REQUIRED_VERSION=1.0.0
   2.878 -        for ac_prog in directfb-config
   2.879 -do
   2.880 -  # Extract the first word of "$ac_prog", so it can be a program name with args.
   2.881 -set dummy $ac_prog; ac_word=$2
   2.882 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   2.883 -$as_echo_n "checking for $ac_word... " >&6; }
   2.884 -if ${ac_cv_path_DIRECTFBCONFIG+:} false; then :
   2.885 -  $as_echo_n "(cached) " >&6
   2.886 -else
   2.887 -  case $DIRECTFBCONFIG in
   2.888 -  [\\/]* | ?:[\\/]*)
   2.889 -  ac_cv_path_DIRECTFBCONFIG="$DIRECTFBCONFIG" # Let the user override the test with a path.
   2.890 -  ;;
   2.891 -  *)
   2.892 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   2.893 -as_dummy="$prefix/bin:$PATH"
   2.894 -for as_dir in $as_dummy
   2.895 -do
   2.896 -  IFS=$as_save_IFS
   2.897 -  test -z "$as_dir" && as_dir=.
   2.898 -    for ac_exec_ext in '' $ac_executable_extensions; do
   2.899 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   2.900 -    ac_cv_path_DIRECTFBCONFIG="$as_dir/$ac_word$ac_exec_ext"
   2.901 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   2.902 -    break 2
   2.903 -  fi
   2.904 -done
   2.905 -  done
   2.906 -IFS=$as_save_IFS
   2.907 -
   2.908 -  ;;
   2.909 -esac
   2.910 -fi
   2.911 -DIRECTFBCONFIG=$ac_cv_path_DIRECTFBCONFIG
   2.912 -if test -n "$DIRECTFBCONFIG"; then
   2.913 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRECTFBCONFIG" >&5
   2.914 -$as_echo "$DIRECTFBCONFIG" >&6; }
   2.915 -else
   2.916 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.917 -$as_echo "no" >&6; }
   2.918 -fi
   2.919 -
   2.920 -
   2.921 -  test -n "$DIRECTFBCONFIG" && break
   2.922 -done
   2.923 -test -n "$DIRECTFBCONFIG" || DIRECTFBCONFIG="no"
   2.924 -
   2.925 -        if test x$DIRECTFBCONFIG = xno; then
   2.926 -            # Extract the first word of "pkg-config", so it can be a program name with args.
   2.927 -set dummy pkg-config; ac_word=$2
   2.928 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   2.929 -$as_echo_n "checking for $ac_word... " >&6; }
   2.930 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   2.931 -  $as_echo_n "(cached) " >&6
   2.932 -else
   2.933 -  case $PKG_CONFIG in
   2.934 -  [\\/]* | ?:[\\/]*)
   2.935 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   2.936 -  ;;
   2.937 -  *)
   2.938 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   2.939 -for as_dir in $PATH
   2.940 -do
   2.941 -  IFS=$as_save_IFS
   2.942 -  test -z "$as_dir" && as_dir=.
   2.943 -    for ac_exec_ext in '' $ac_executable_extensions; do
   2.944 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   2.945 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   2.946 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   2.947 -    break 2
   2.948 -  fi
   2.949 -done
   2.950 -  done
   2.951 -IFS=$as_save_IFS
   2.952 -
   2.953 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   2.954 -  ;;
   2.955 -esac
   2.956 -fi
   2.957 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   2.958 -if test -n "$PKG_CONFIG"; then
   2.959 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   2.960 -$as_echo "$PKG_CONFIG" >&6; }
   2.961 -else
   2.962 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   2.963 -$as_echo "no" >&6; }
   2.964 -fi
   2.965 -
   2.966 -
   2.967 -            if test x$PKG_CONFIG != xno; then
   2.968 -                if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then
   2.969 -                    DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
   2.970 -                    DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
   2.971 -                    DIRECTFB_PREFIX=`$PKG_CONFIG --variable=prefix directfb`
   2.972 -                    video_directfb=yes
   2.973 -                fi
   2.974 -            fi
   2.975 +
   2.976 +pkg_failed=no
   2.977 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRECTFB" >&5
   2.978 +$as_echo_n "checking for DIRECTFB... " >&6; }
   2.979 +
   2.980 +if test -n "$DIRECTFB_CFLAGS"; then
   2.981 +    pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS"
   2.982 + elif test -n "$PKG_CONFIG"; then
   2.983 +    if test -n "$PKG_CONFIG" && \
   2.984 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 1.0.0\""; } >&5
   2.985 +  ($PKG_CONFIG --exists --print-errors "directfb >= 1.0.0") 2>&5
   2.986 +  ac_status=$?
   2.987 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   2.988 +  test $ac_status = 0; }; then
   2.989 +  pkg_cv_DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags "directfb >= 1.0.0" 2>/dev/null`
   2.990 +else
   2.991 +  pkg_failed=yes
   2.992 +fi
   2.993 + else
   2.994 +    pkg_failed=untried
   2.995 +fi
   2.996 +if test -n "$DIRECTFB_LIBS"; then
   2.997 +    pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS"
   2.998 + elif test -n "$PKG_CONFIG"; then
   2.999 +    if test -n "$PKG_CONFIG" && \
  2.1000 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 1.0.0\""; } >&5
  2.1001 +  ($PKG_CONFIG --exists --print-errors "directfb >= 1.0.0") 2>&5
  2.1002 +  ac_status=$?
  2.1003 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1004 +  test $ac_status = 0; }; then
  2.1005 +  pkg_cv_DIRECTFB_LIBS=`$PKG_CONFIG --libs "directfb >= 1.0.0" 2>/dev/null`
  2.1006 +else
  2.1007 +  pkg_failed=yes
  2.1008 +fi
  2.1009 + else
  2.1010 +    pkg_failed=untried
  2.1011 +fi
  2.1012 +
  2.1013 +
  2.1014 +
  2.1015 +if test $pkg_failed = yes; then
  2.1016 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1017 +$as_echo "no" >&6; }
  2.1018 +
  2.1019 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  2.1020 +        _pkg_short_errors_supported=yes
  2.1021 +else
  2.1022 +        _pkg_short_errors_supported=no
  2.1023 +fi
  2.1024 +        if test $_pkg_short_errors_supported = yes; then
  2.1025 +	        DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "directfb >= 1.0.0" 2>&1`
  2.1026          else
  2.1027 -            set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'`
  2.1028 -            NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
  2.1029 -            set -- `$DIRECTFBCONFIG --version | sed 's/\./ /g'`
  2.1030 -            HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
  2.1031 -            if test $HAVE_VERSION -ge $NEED_VERSION; then
  2.1032 -                DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags`
  2.1033 -                DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs`
  2.1034 -                DIRECTFB_PREFIX=`$DIRECTFBCONFIG --prefix`
  2.1035 -                video_directfb=yes
  2.1036 -            fi
  2.1037 -        fi
  2.1038 +	        DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --print-errors "directfb >= 1.0.0" 2>&1`
  2.1039 +        fi
  2.1040 +	# Put the nasty error message in config.log where it belongs
  2.1041 +	echo "$DIRECTFB_PKG_ERRORS" >&5
  2.1042 +
  2.1043 +	video_directfb=no
  2.1044 +elif test $pkg_failed = untried; then
  2.1045 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1046 +$as_echo "no" >&6; }
  2.1047 +	video_directfb=no
  2.1048 +else
  2.1049 +	DIRECTFB_CFLAGS=$pkg_cv_DIRECTFB_CFLAGS
  2.1050 +	DIRECTFB_LIBS=$pkg_cv_DIRECTFB_LIBS
  2.1051 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  2.1052 +$as_echo "yes" >&6; }
  2.1053 +	video_directfb=yes
  2.1054 +fi
  2.1055 +
  2.1056          if test x$video_directfb = xyes; then
  2.1057              # SuSE 11.1 installs directfb-config without directfb-devel
  2.1058              save_CPPFLAGS="$CPPFLAGS"
  2.1059 @@ -21453,10 +21640,6 @@
  2.1060              CPPFLAGS="$save_CPPFLAGS"
  2.1061              video_directfb=$have_directfb_hdr
  2.1062          fi
  2.1063 -        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectFB $DIRECTFB_REQUIRED_VERSION support" >&5
  2.1064 -$as_echo_n "checking for DirectFB $DIRECTFB_REQUIRED_VERSION support... " >&6; }
  2.1065 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_directfb" >&5
  2.1066 -$as_echo "$video_directfb" >&6; }
  2.1067  
  2.1068          if test x$video_directfb = xyes; then
  2.1069              # Check whether --enable-directfb-shared was given.
  2.1070 @@ -21522,82 +21705,152 @@
  2.1071  
  2.1072      if test x$enable_video = xyes -a x$enable_video_kmsdrm = xyes; then
  2.1073          video_kmsdrm=no
  2.1074 -        libdrm_avail=no
  2.1075 -        libgbm_avail=no
  2.1076 -
  2.1077 -        LIBDRM_REQUIRED_VERSION=2.4.46
  2.1078 -        LIBGBM_REQUIRED_VERSION=9.0.0
  2.1079 -
  2.1080 -        # Extract the first word of "pkg-config", so it can be a program name with args.
  2.1081 -set dummy pkg-config; ac_word=$2
  2.1082 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  2.1083 -$as_echo_n "checking for $ac_word... " >&6; }
  2.1084 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
  2.1085 -  $as_echo_n "(cached) " >&6
  2.1086 -else
  2.1087 -  case $PKG_CONFIG in
  2.1088 -  [\\/]* | ?:[\\/]*)
  2.1089 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  2.1090 -  ;;
  2.1091 -  *)
  2.1092 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2.1093 -for as_dir in $PATH
  2.1094 -do
  2.1095 -  IFS=$as_save_IFS
  2.1096 -  test -z "$as_dir" && as_dir=.
  2.1097 -    for ac_exec_ext in '' $ac_executable_extensions; do
  2.1098 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  2.1099 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  2.1100 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  2.1101 -    break 2
  2.1102 -  fi
  2.1103 -done
  2.1104 -  done
  2.1105 -IFS=$as_save_IFS
  2.1106 -
  2.1107 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  2.1108 -  ;;
  2.1109 -esac
  2.1110 -fi
  2.1111 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  2.1112 -if test -n "$PKG_CONFIG"; then
  2.1113 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
  2.1114 -$as_echo "$PKG_CONFIG" >&6; }
  2.1115 -else
  2.1116 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1117 -$as_echo "no" >&6; }
  2.1118 -fi
  2.1119 -
  2.1120 -
  2.1121 -        if test x$PKG_CONFIG != xno; then
  2.1122 -            if $PKG_CONFIG --atleast-pkgconfig-version 0.7; then
  2.1123 -                if $PKG_CONFIG --atleast-version $LIBDRM_REQUIRED_VERSION libdrm; then
  2.1124 -                    LIBDRM_CFLAGS=`$PKG_CONFIG --cflags libdrm`
  2.1125 -                    LIBDRM_LIBS=`$PKG_CONFIG --libs libdrm`
  2.1126 -                    LIBDRM_PREFIX=`$PKG_CONFIG --variable=prefix libdrm`
  2.1127 -                    libdrm_avail=yes
  2.1128 -                fi
  2.1129 -                if $PKG_CONFIG --atleast-version $LIBGBM_REQUIRED_VERSION gbm; then
  2.1130 -                    LIBGBM_CFLAGS=`$PKG_CONFIG --cflags gbm`
  2.1131 -                    LIBGBM_LIBS=`$PKG_CONFIG --libs gbm`
  2.1132 -                    LIBGBM_PREFIX=`$PKG_CONFIG --variable=prefix gbm`
  2.1133 -                    libgbm_avail=yes
  2.1134 -                fi
  2.1135 -                if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
  2.1136 -                    video_kmsdrm=yes
  2.1137 -                fi
  2.1138 -
  2.1139 -                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdrm $LIBDRM_REQUIRED_VERSION library for kmsdrm support" >&5
  2.1140 -$as_echo_n "checking for libdrm $LIBDRM_REQUIRED_VERSION library for kmsdrm support... " >&6; }
  2.1141 -                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libdrm_avail" >&5
  2.1142 -$as_echo "$libdrm_avail" >&6; }
  2.1143 -                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgbm $LIBGBM_REQUIRED_VERSION library for kmsdrm support" >&5
  2.1144 -$as_echo_n "checking for libgbm $LIBGBM_REQUIRED_VERSION library for kmsdrm support... " >&6; }
  2.1145 -                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgbm_avail" >&5
  2.1146 -$as_echo "$libgbm_avail" >&6; }
  2.1147 -
  2.1148 -                if test x$video_kmsdrm = xyes; then
  2.1149 -                    # Check whether --enable-kmsdrm-shared was given.
  2.1150 +
  2.1151 +
  2.1152 +pkg_failed=no
  2.1153 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5
  2.1154 +$as_echo_n "checking for LIBDRM... " >&6; }
  2.1155 +
  2.1156 +if test -n "$LIBDRM_CFLAGS"; then
  2.1157 +    pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS"
  2.1158 + elif test -n "$PKG_CONFIG"; then
  2.1159 +    if test -n "$PKG_CONFIG" && \
  2.1160 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.46\""; } >&5
  2.1161 +  ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5
  2.1162 +  ac_status=$?
  2.1163 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1164 +  test $ac_status = 0; }; then
  2.1165 +  pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.4.46" 2>/dev/null`
  2.1166 +else
  2.1167 +  pkg_failed=yes
  2.1168 +fi
  2.1169 + else
  2.1170 +    pkg_failed=untried
  2.1171 +fi
  2.1172 +if test -n "$LIBDRM_LIBS"; then
  2.1173 +    pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS"
  2.1174 + elif test -n "$PKG_CONFIG"; then
  2.1175 +    if test -n "$PKG_CONFIG" && \
  2.1176 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.46\""; } >&5
  2.1177 +  ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5
  2.1178 +  ac_status=$?
  2.1179 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1180 +  test $ac_status = 0; }; then
  2.1181 +  pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.4.46" 2>/dev/null`
  2.1182 +else
  2.1183 +  pkg_failed=yes
  2.1184 +fi
  2.1185 + else
  2.1186 +    pkg_failed=untried
  2.1187 +fi
  2.1188 +
  2.1189 +
  2.1190 +
  2.1191 +if test $pkg_failed = yes; then
  2.1192 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1193 +$as_echo "no" >&6; }
  2.1194 +
  2.1195 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  2.1196 +        _pkg_short_errors_supported=yes
  2.1197 +else
  2.1198 +        _pkg_short_errors_supported=no
  2.1199 +fi
  2.1200 +        if test $_pkg_short_errors_supported = yes; then
  2.1201 +	        LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm >= 2.4.46" 2>&1`
  2.1202 +        else
  2.1203 +	        LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm >= 2.4.46" 2>&1`
  2.1204 +        fi
  2.1205 +	# Put the nasty error message in config.log where it belongs
  2.1206 +	echo "$LIBDRM_PKG_ERRORS" >&5
  2.1207 +
  2.1208 +	libdrm_avail=no
  2.1209 +elif test $pkg_failed = untried; then
  2.1210 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1211 +$as_echo "no" >&6; }
  2.1212 +	libdrm_avail=no
  2.1213 +else
  2.1214 +	LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS
  2.1215 +	LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS
  2.1216 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  2.1217 +$as_echo "yes" >&6; }
  2.1218 +	libdrm_avail=yes
  2.1219 +fi
  2.1220 +
  2.1221 +pkg_failed=no
  2.1222 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGBM" >&5
  2.1223 +$as_echo_n "checking for LIBGBM... " >&6; }
  2.1224 +
  2.1225 +if test -n "$LIBGBM_CFLAGS"; then
  2.1226 +    pkg_cv_LIBGBM_CFLAGS="$LIBGBM_CFLAGS"
  2.1227 + elif test -n "$PKG_CONFIG"; then
  2.1228 +    if test -n "$PKG_CONFIG" && \
  2.1229 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gbm >= 9.0.0\""; } >&5
  2.1230 +  ($PKG_CONFIG --exists --print-errors "gbm >= 9.0.0") 2>&5
  2.1231 +  ac_status=$?
  2.1232 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1233 +  test $ac_status = 0; }; then
  2.1234 +  pkg_cv_LIBGBM_CFLAGS=`$PKG_CONFIG --cflags "gbm >= 9.0.0" 2>/dev/null`
  2.1235 +else
  2.1236 +  pkg_failed=yes
  2.1237 +fi
  2.1238 + else
  2.1239 +    pkg_failed=untried
  2.1240 +fi
  2.1241 +if test -n "$LIBGBM_LIBS"; then
  2.1242 +    pkg_cv_LIBGBM_LIBS="$LIBGBM_LIBS"
  2.1243 + elif test -n "$PKG_CONFIG"; then
  2.1244 +    if test -n "$PKG_CONFIG" && \
  2.1245 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gbm >= 9.0.0\""; } >&5
  2.1246 +  ($PKG_CONFIG --exists --print-errors "gbm >= 9.0.0") 2>&5
  2.1247 +  ac_status=$?
  2.1248 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1249 +  test $ac_status = 0; }; then
  2.1250 +  pkg_cv_LIBGBM_LIBS=`$PKG_CONFIG --libs "gbm >= 9.0.0" 2>/dev/null`
  2.1251 +else
  2.1252 +  pkg_failed=yes
  2.1253 +fi
  2.1254 + else
  2.1255 +    pkg_failed=untried
  2.1256 +fi
  2.1257 +
  2.1258 +
  2.1259 +
  2.1260 +if test $pkg_failed = yes; then
  2.1261 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1262 +$as_echo "no" >&6; }
  2.1263 +
  2.1264 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  2.1265 +        _pkg_short_errors_supported=yes
  2.1266 +else
  2.1267 +        _pkg_short_errors_supported=no
  2.1268 +fi
  2.1269 +        if test $_pkg_short_errors_supported = yes; then
  2.1270 +	        LIBGBM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gbm >= 9.0.0" 2>&1`
  2.1271 +        else
  2.1272 +	        LIBGBM_PKG_ERRORS=`$PKG_CONFIG --print-errors "gbm >= 9.0.0" 2>&1`
  2.1273 +        fi
  2.1274 +	# Put the nasty error message in config.log where it belongs
  2.1275 +	echo "$LIBGBM_PKG_ERRORS" >&5
  2.1276 +
  2.1277 +	libgbm_avail=no
  2.1278 +elif test $pkg_failed = untried; then
  2.1279 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1280 +$as_echo "no" >&6; }
  2.1281 +	libgbm_avail=no
  2.1282 +else
  2.1283 +	LIBGBM_CFLAGS=$pkg_cv_LIBGBM_CFLAGS
  2.1284 +	LIBGBM_LIBS=$pkg_cv_LIBGBM_LIBS
  2.1285 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  2.1286 +$as_echo "yes" >&6; }
  2.1287 +	libgbm_avail=yes
  2.1288 +fi
  2.1289 +
  2.1290 +        if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
  2.1291 +            video_kmsdrm=yes
  2.1292 +        fi
  2.1293 +
  2.1294 +        if test x$video_kmsdrm = xyes; then
  2.1295 +            # Check whether --enable-kmsdrm-shared was given.
  2.1296  if test "${enable_kmsdrm_shared+set}" = set; then :
  2.1297    enableval=$enable_kmsdrm_shared;
  2.1298  else
  2.1299 @@ -21608,22 +21861,22 @@
  2.1300  
  2.1301  $as_echo "#define SDL_VIDEO_DRIVER_KMSDRM 1" >>confdefs.h
  2.1302  
  2.1303 -                    SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
  2.1304 -                    EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
  2.1305 -
  2.1306 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kmsdrm dynamic loading support" >&5
  2.1307 +            SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
  2.1308 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
  2.1309 +
  2.1310 +            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kmsdrm dynamic loading support" >&5
  2.1311  $as_echo_n "checking for kmsdrm dynamic loading support... " >&6; }
  2.1312 -                    kmsdrm_shared=no
  2.1313 -                    drm_lib=`find_lib "libdrm.so.*" "$DRM_LIBS"`
  2.1314 -                    gbm_lib=`find_lib "libgbm.so.*" "$DRM_LIBS"`
  2.1315 -                    if test x$have_loadso != xyes && \
  2.1316 -                       test x$enable_kmsdrm_shared = xyes; then
  2.1317 -                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&5
  2.1318 +            kmsdrm_shared=no
  2.1319 +            drm_lib=`find_lib "libdrm.so.*" "$DRM_LIBS"`
  2.1320 +            gbm_lib=`find_lib "libgbm.so.*" "$DRM_LIBS"`
  2.1321 +            if test x$have_loadso != xyes && \
  2.1322 +               test x$enable_kmsdrm_shared = xyes; then
  2.1323 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&5
  2.1324  $as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&2;}
  2.1325 -                    fi
  2.1326 -                    if test x$have_loadso = xyes && \
  2.1327 -                       test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
  2.1328 -                        kmsdrm_shared=yes
  2.1329 +            fi
  2.1330 +            if test x$have_loadso = xyes && \
  2.1331 +               test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
  2.1332 +                kmsdrm_shared=yes
  2.1333  
  2.1334  cat >>confdefs.h <<_ACEOF
  2.1335  #define SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC "$drm_lib"
  2.1336 @@ -21639,16 +21892,14 @@
  2.1337  #define HAVE_KMSDRM_SHARED "TRUE"
  2.1338  _ACEOF
  2.1339  
  2.1340 -                        SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
  2.1341 -                    else
  2.1342 -                        EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
  2.1343 -                        SUMMARY_video="${SUMMARY_video} kmsdrm"
  2.1344 -                    fi
  2.1345 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kmsdrm_shared" >&5
  2.1346 +                SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
  2.1347 +            else
  2.1348 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
  2.1349 +                SUMMARY_video="${SUMMARY_video} kmsdrm"
  2.1350 +            fi
  2.1351 +            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kmsdrm_shared" >&5
  2.1352  $as_echo "$kmsdrm_shared" >&6; }
  2.1353 -                    have_video=yes
  2.1354 -                fi
  2.1355 -            fi
  2.1356 +            have_video=yes
  2.1357          fi
  2.1358      fi
  2.1359  }
  2.1360 @@ -22322,52 +22573,98 @@
  2.1361  fi
  2.1362  
  2.1363      if test x$enable_dbus = xyes; then
  2.1364 -        # Extract the first word of "pkg-config", so it can be a program name with args.
  2.1365 -set dummy pkg-config; ac_word=$2
  2.1366 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  2.1367 -$as_echo_n "checking for $ac_word... " >&6; }
  2.1368 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
  2.1369 -  $as_echo_n "(cached) " >&6
  2.1370 -else
  2.1371 -  case $PKG_CONFIG in
  2.1372 -  [\\/]* | ?:[\\/]*)
  2.1373 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  2.1374 -  ;;
  2.1375 -  *)
  2.1376 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2.1377 -for as_dir in $PATH
  2.1378 -do
  2.1379 -  IFS=$as_save_IFS
  2.1380 -  test -z "$as_dir" && as_dir=.
  2.1381 -    for ac_exec_ext in '' $ac_executable_extensions; do
  2.1382 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  2.1383 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  2.1384 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  2.1385 -    break 2
  2.1386 -  fi
  2.1387 -done
  2.1388 -  done
  2.1389 -IFS=$as_save_IFS
  2.1390 -
  2.1391 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  2.1392 -  ;;
  2.1393 -esac
  2.1394 -fi
  2.1395 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  2.1396 -if test -n "$PKG_CONFIG"; then
  2.1397 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
  2.1398 -$as_echo "$PKG_CONFIG" >&6; }
  2.1399 -else
  2.1400 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1401 -$as_echo "no" >&6; }
  2.1402 -fi
  2.1403 -
  2.1404 -
  2.1405 -        if test x$PKG_CONFIG != xno; then
  2.1406 -            DBUS_CFLAGS=`$PKG_CONFIG --cflags dbus-1`
  2.1407 -            save_CFLAGS="$CFLAGS"
  2.1408 -            CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
  2.1409 -            ac_fn_c_check_header_mongrel "$LINENO" "dbus/dbus.h" "ac_cv_header_dbus_dbus_h" "$ac_includes_default"
  2.1410 +
  2.1411 +pkg_failed=no
  2.1412 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
  2.1413 +$as_echo_n "checking for DBUS... " >&6; }
  2.1414 +
  2.1415 +if test -n "$DBUS_CFLAGS"; then
  2.1416 +    pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
  2.1417 + elif test -n "$PKG_CONFIG"; then
  2.1418 +    if test -n "$PKG_CONFIG" && \
  2.1419 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
  2.1420 +  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
  2.1421 +  ac_status=$?
  2.1422 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1423 +  test $ac_status = 0; }; then
  2.1424 +  pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null`
  2.1425 +else
  2.1426 +  pkg_failed=yes
  2.1427 +fi
  2.1428 + else
  2.1429 +    pkg_failed=untried
  2.1430 +fi
  2.1431 +if test -n "$DBUS_LIBS"; then
  2.1432 +    pkg_cv_DBUS_LIBS="$DBUS_LIBS"
  2.1433 + elif test -n "$PKG_CONFIG"; then
  2.1434 +    if test -n "$PKG_CONFIG" && \
  2.1435 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
  2.1436 +  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
  2.1437 +  ac_status=$?
  2.1438 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1439 +  test $ac_status = 0; }; then
  2.1440 +  pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null`
  2.1441 +else
  2.1442 +  pkg_failed=yes
  2.1443 +fi
  2.1444 + else
  2.1445 +    pkg_failed=untried
  2.1446 +fi
  2.1447 +
  2.1448 +
  2.1449 +
  2.1450 +if test $pkg_failed = yes; then
  2.1451 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1452 +$as_echo "no" >&6; }
  2.1453 +
  2.1454 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  2.1455 +        _pkg_short_errors_supported=yes
  2.1456 +else
  2.1457 +        _pkg_short_errors_supported=no
  2.1458 +fi
  2.1459 +        if test $_pkg_short_errors_supported = yes; then
  2.1460 +	        DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1" 2>&1`
  2.1461 +        else
  2.1462 +	        DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1" 2>&1`
  2.1463 +        fi
  2.1464 +	# Put the nasty error message in config.log where it belongs
  2.1465 +	echo "$DBUS_PKG_ERRORS" >&5
  2.1466 +
  2.1467 +	as_fn_error $? "Package requirements (dbus-1) were not met:
  2.1468 +
  2.1469 +$DBUS_PKG_ERRORS
  2.1470 +
  2.1471 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
  2.1472 +installed software in a non-standard prefix.
  2.1473 +
  2.1474 +Alternatively, you may set the environment variables DBUS_CFLAGS
  2.1475 +and DBUS_LIBS to avoid the need to call pkg-config.
  2.1476 +See the pkg-config man page for more details." "$LINENO" 5
  2.1477 +elif test $pkg_failed = untried; then
  2.1478 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1479 +$as_echo "no" >&6; }
  2.1480 +	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  2.1481 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  2.1482 +as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
  2.1483 +is in your PATH or set the PKG_CONFIG environment variable to the full
  2.1484 +path to pkg-config.
  2.1485 +
  2.1486 +Alternatively, you may set the environment variables DBUS_CFLAGS
  2.1487 +and DBUS_LIBS to avoid the need to call pkg-config.
  2.1488 +See the pkg-config man page for more details.
  2.1489 +
  2.1490 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.
  2.1491 +See \`config.log' for more details" "$LINENO" 5; }
  2.1492 +else
  2.1493 +	DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
  2.1494 +	DBUS_LIBS=$pkg_cv_DBUS_LIBS
  2.1495 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  2.1496 +$as_echo "yes" >&6; }
  2.1497 +
  2.1498 +fi
  2.1499 +        save_CFLAGS="$CFLAGS"
  2.1500 +        CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
  2.1501 +        ac_fn_c_check_header_mongrel "$LINENO" "dbus/dbus.h" "ac_cv_header_dbus_dbus_h" "$ac_includes_default"
  2.1502  if test "x$ac_cv_header_dbus_dbus_h" = xyes; then :
  2.1503    have_dbus_dbus_h_hdr=yes
  2.1504  else
  2.1505 @@ -22375,14 +22672,13 @@
  2.1506  fi
  2.1507  
  2.1508  
  2.1509 -            CFLAGS="$save_CFLAGS"
  2.1510 -            if test x$have_dbus_dbus_h_hdr = xyes; then
  2.1511 +        CFLAGS="$save_CFLAGS"
  2.1512 +        if test x$have_dbus_dbus_h_hdr = xyes; then
  2.1513  
  2.1514  $as_echo "#define HAVE_DBUS_DBUS_H 1" >>confdefs.h
  2.1515  
  2.1516 -                EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
  2.1517 -                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
  2.1518 -            fi
  2.1519 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
  2.1520 +            SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
  2.1521          fi
  2.1522      fi
  2.1523  }
  2.1524 @@ -22414,52 +22710,98 @@
  2.1525  fi
  2.1526  
  2.1527      if test x$enable_ibus = xyes; then
  2.1528 -        # Extract the first word of "pkg-config", so it can be a program name with args.
  2.1529 -set dummy pkg-config; ac_word=$2
  2.1530 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  2.1531 -$as_echo_n "checking for $ac_word... " >&6; }
  2.1532 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
  2.1533 -  $as_echo_n "(cached) " >&6
  2.1534 -else
  2.1535 -  case $PKG_CONFIG in
  2.1536 -  [\\/]* | ?:[\\/]*)
  2.1537 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  2.1538 -  ;;
  2.1539 -  *)
  2.1540 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2.1541 -for as_dir in $PATH
  2.1542 -do
  2.1543 -  IFS=$as_save_IFS
  2.1544 -  test -z "$as_dir" && as_dir=.
  2.1545 -    for ac_exec_ext in '' $ac_executable_extensions; do
  2.1546 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  2.1547 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  2.1548 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  2.1549 -    break 2
  2.1550 -  fi
  2.1551 -done
  2.1552 -  done
  2.1553 -IFS=$as_save_IFS
  2.1554 -
  2.1555 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  2.1556 -  ;;
  2.1557 -esac
  2.1558 -fi
  2.1559 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  2.1560 -if test -n "$PKG_CONFIG"; then
  2.1561 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
  2.1562 -$as_echo "$PKG_CONFIG" >&6; }
  2.1563 -else
  2.1564 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1565 -$as_echo "no" >&6; }
  2.1566 -fi
  2.1567 -
  2.1568 -
  2.1569 -        if test x$PKG_CONFIG != xno; then
  2.1570 -            IBUS_CFLAGS=`$PKG_CONFIG --cflags ibus-1.0`
  2.1571 -            save_CFLAGS="$CFLAGS"
  2.1572 -            CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
  2.1573 -            ac_fn_c_check_header_mongrel "$LINENO" "ibus-1.0/ibus.h" "ac_cv_header_ibus_1_0_ibus_h" "$ac_includes_default"
  2.1574 +
  2.1575 +pkg_failed=no
  2.1576 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IBUS" >&5
  2.1577 +$as_echo_n "checking for IBUS... " >&6; }
  2.1578 +
  2.1579 +if test -n "$IBUS_CFLAGS"; then
  2.1580 +    pkg_cv_IBUS_CFLAGS="$IBUS_CFLAGS"
  2.1581 + elif test -n "$PKG_CONFIG"; then
  2.1582 +    if test -n "$PKG_CONFIG" && \
  2.1583 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ibus-1.0\""; } >&5
  2.1584 +  ($PKG_CONFIG --exists --print-errors "ibus-1.0") 2>&5
  2.1585 +  ac_status=$?
  2.1586 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1587 +  test $ac_status = 0; }; then
  2.1588 +  pkg_cv_IBUS_CFLAGS=`$PKG_CONFIG --cflags "ibus-1.0" 2>/dev/null`
  2.1589 +else
  2.1590 +  pkg_failed=yes
  2.1591 +fi
  2.1592 + else
  2.1593 +    pkg_failed=untried
  2.1594 +fi
  2.1595 +if test -n "$IBUS_LIBS"; then
  2.1596 +    pkg_cv_IBUS_LIBS="$IBUS_LIBS"
  2.1597 + elif test -n "$PKG_CONFIG"; then
  2.1598 +    if test -n "$PKG_CONFIG" && \
  2.1599 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ibus-1.0\""; } >&5
  2.1600 +  ($PKG_CONFIG --exists --print-errors "ibus-1.0") 2>&5
  2.1601 +  ac_status=$?
  2.1602 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1603 +  test $ac_status = 0; }; then
  2.1604 +  pkg_cv_IBUS_LIBS=`$PKG_CONFIG --libs "ibus-1.0" 2>/dev/null`
  2.1605 +else
  2.1606 +  pkg_failed=yes
  2.1607 +fi
  2.1608 + else
  2.1609 +    pkg_failed=untried
  2.1610 +fi
  2.1611 +
  2.1612 +
  2.1613 +
  2.1614 +if test $pkg_failed = yes; then
  2.1615 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1616 +$as_echo "no" >&6; }
  2.1617 +
  2.1618 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  2.1619 +        _pkg_short_errors_supported=yes
  2.1620 +else
  2.1621 +        _pkg_short_errors_supported=no
  2.1622 +fi
  2.1623 +        if test $_pkg_short_errors_supported = yes; then
  2.1624 +	        IBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ibus-1.0" 2>&1`
  2.1625 +        else
  2.1626 +	        IBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "ibus-1.0" 2>&1`
  2.1627 +        fi
  2.1628 +	# Put the nasty error message in config.log where it belongs
  2.1629 +	echo "$IBUS_PKG_ERRORS" >&5
  2.1630 +
  2.1631 +	as_fn_error $? "Package requirements (ibus-1.0) were not met:
  2.1632 +
  2.1633 +$IBUS_PKG_ERRORS
  2.1634 +
  2.1635 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
  2.1636 +installed software in a non-standard prefix.
  2.1637 +
  2.1638 +Alternatively, you may set the environment variables IBUS_CFLAGS
  2.1639 +and IBUS_LIBS to avoid the need to call pkg-config.
  2.1640 +See the pkg-config man page for more details." "$LINENO" 5
  2.1641 +elif test $pkg_failed = untried; then
  2.1642 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1643 +$as_echo "no" >&6; }
  2.1644 +	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  2.1645 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  2.1646 +as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
  2.1647 +is in your PATH or set the PKG_CONFIG environment variable to the full
  2.1648 +path to pkg-config.
  2.1649 +
  2.1650 +Alternatively, you may set the environment variables IBUS_CFLAGS
  2.1651 +and IBUS_LIBS to avoid the need to call pkg-config.
  2.1652 +See the pkg-config man page for more details.
  2.1653 +
  2.1654 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.
  2.1655 +See \`config.log' for more details" "$LINENO" 5; }
  2.1656 +else
  2.1657 +	IBUS_CFLAGS=$pkg_cv_IBUS_CFLAGS
  2.1658 +	IBUS_LIBS=$pkg_cv_IBUS_LIBS
  2.1659 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  2.1660 +$as_echo "yes" >&6; }
  2.1661 +
  2.1662 +fi
  2.1663 +        save_CFLAGS="$CFLAGS"
  2.1664 +        CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
  2.1665 +        ac_fn_c_check_header_mongrel "$LINENO" "ibus-1.0/ibus.h" "ac_cv_header_ibus_1_0_ibus_h" "$ac_includes_default"
  2.1666  if test "x$ac_cv_header_ibus_1_0_ibus_h" = xyes; then :
  2.1667    have_ibus_ibus_h_hdr=yes
  2.1668  else
  2.1669 @@ -22467,7 +22809,7 @@
  2.1670  fi
  2.1671  
  2.1672  
  2.1673 -            ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
  2.1674 +        ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
  2.1675  if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
  2.1676    have_inotify_inotify_h_hdr=yes
  2.1677  else
  2.1678 @@ -22475,27 +22817,26 @@
  2.1679  fi
  2.1680  
  2.1681  
  2.1682 -            CFLAGS="$save_CFLAGS"
  2.1683 -            if test x$have_ibus_ibus_h_hdr = xyes; then
  2.1684 -                if test x$enable_ime != xyes; then
  2.1685 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for IBus." >&5
  2.1686 +        CFLAGS="$save_CFLAGS"
  2.1687 +        if test x$have_ibus_ibus_h_hdr = xyes; then
  2.1688 +            if test x$enable_ime != xyes; then
  2.1689 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for IBus." >&5
  2.1690  $as_echo "$as_me: WARNING: IME support is required for IBus." >&2;}
  2.1691 -                    have_ibus_ibus_h_hdr=no
  2.1692 -                elif test x$enable_dbus != xyes; then
  2.1693 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for IBus." >&5
  2.1694 +                have_ibus_ibus_h_hdr=no
  2.1695 +            elif test x$enable_dbus != xyes; then
  2.1696 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for IBus." >&5
  2.1697  $as_echo "$as_me: WARNING: DBus support is required for IBus." >&2;}
  2.1698 -                    have_ibus_ibus_h_hdr=no
  2.1699 -                elif test x$have_inotify_inotify_h_hdr != xyes; then
  2.1700 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: INotify support is required for IBus." >&5
  2.1701 +                have_ibus_ibus_h_hdr=no
  2.1702 +            elif test x$have_inotify_inotify_h_hdr != xyes; then
  2.1703 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: INotify support is required for IBus." >&5
  2.1704  $as_echo "$as_me: WARNING: INotify support is required for IBus." >&2;}
  2.1705 -                    have_ibus_ibus_h_hdr=no
  2.1706 -                else
  2.1707 +                have_ibus_ibus_h_hdr=no
  2.1708 +            else
  2.1709  
  2.1710  $as_echo "#define HAVE_IBUS_IBUS_H 1" >>confdefs.h
  2.1711  
  2.1712 -                    EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
  2.1713 -                    SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
  2.1714 -               fi
  2.1715 +                EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
  2.1716 +                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
  2.1717              fi
  2.1718          fi
  2.1719      fi
  2.1720 @@ -22511,51 +22852,97 @@
  2.1721  fi
  2.1722  
  2.1723      if test x$enable_fcitx = xyes; then
  2.1724 -        # Extract the first word of "pkg-config", so it can be a program name with args.
  2.1725 -set dummy pkg-config; ac_word=$2
  2.1726 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  2.1727 -$as_echo_n "checking for $ac_word... " >&6; }
  2.1728 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
  2.1729 -  $as_echo_n "(cached) " >&6
  2.1730 -else
  2.1731 -  case $PKG_CONFIG in
  2.1732 -  [\\/]* | ?:[\\/]*)
  2.1733 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  2.1734 -  ;;
  2.1735 -  *)
  2.1736 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2.1737 -for as_dir in $PATH
  2.1738 -do
  2.1739 -  IFS=$as_save_IFS
  2.1740 -  test -z "$as_dir" && as_dir=.
  2.1741 -    for ac_exec_ext in '' $ac_executable_extensions; do
  2.1742 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  2.1743 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  2.1744 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  2.1745 -    break 2
  2.1746 -  fi
  2.1747 -done
  2.1748 -  done
  2.1749 -IFS=$as_save_IFS
  2.1750 -
  2.1751 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  2.1752 -  ;;
  2.1753 -esac
  2.1754 -fi
  2.1755 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  2.1756 -if test -n "$PKG_CONFIG"; then
  2.1757 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
  2.1758 -$as_echo "$PKG_CONFIG" >&6; }
  2.1759 -else
  2.1760 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1761 -$as_echo "no" >&6; }
  2.1762 -fi
  2.1763 -
  2.1764 -
  2.1765 -        if test x$PKG_CONFIG != xno; then
  2.1766 -            FCITX_CFLAGS=`$PKG_CONFIG --cflags fcitx`
  2.1767 -            CFLAGS="$CFLAGS $FCITX_CFLAGS"
  2.1768 -            ac_fn_c_check_header_mongrel "$LINENO" "fcitx/frontend.h" "ac_cv_header_fcitx_frontend_h" "$ac_includes_default"
  2.1769 +
  2.1770 +pkg_failed=no
  2.1771 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FCITX" >&5
  2.1772 +$as_echo_n "checking for FCITX... " >&6; }
  2.1773 +
  2.1774 +if test -n "$FCITX_CFLAGS"; then
  2.1775 +    pkg_cv_FCITX_CFLAGS="$FCITX_CFLAGS"
  2.1776 + elif test -n "$PKG_CONFIG"; then
  2.1777 +    if test -n "$PKG_CONFIG" && \
  2.1778 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fcitx\""; } >&5
  2.1779 +  ($PKG_CONFIG --exists --print-errors "fcitx") 2>&5
  2.1780 +  ac_status=$?
  2.1781 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1782 +  test $ac_status = 0; }; then
  2.1783 +  pkg_cv_FCITX_CFLAGS=`$PKG_CONFIG --cflags "fcitx" 2>/dev/null`
  2.1784 +else
  2.1785 +  pkg_failed=yes
  2.1786 +fi
  2.1787 + else
  2.1788 +    pkg_failed=untried
  2.1789 +fi
  2.1790 +if test -n "$FCITX_LIBS"; then
  2.1791 +    pkg_cv_FCITX_LIBS="$FCITX_LIBS"
  2.1792 + elif test -n "$PKG_CONFIG"; then
  2.1793 +    if test -n "$PKG_CONFIG" && \
  2.1794 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fcitx\""; } >&5
  2.1795 +  ($PKG_CONFIG --exists --print-errors "fcitx") 2>&5
  2.1796 +  ac_status=$?
  2.1797 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1798 +  test $ac_status = 0; }; then
  2.1799 +  pkg_cv_FCITX_LIBS=`$PKG_CONFIG --libs "fcitx" 2>/dev/null`
  2.1800 +else
  2.1801 +  pkg_failed=yes
  2.1802 +fi
  2.1803 + else
  2.1804 +    pkg_failed=untried
  2.1805 +fi
  2.1806 +
  2.1807 +
  2.1808 +
  2.1809 +if test $pkg_failed = yes; then
  2.1810 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1811 +$as_echo "no" >&6; }
  2.1812 +
  2.1813 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  2.1814 +        _pkg_short_errors_supported=yes
  2.1815 +else
  2.1816 +        _pkg_short_errors_supported=no
  2.1817 +fi
  2.1818 +        if test $_pkg_short_errors_supported = yes; then
  2.1819 +	        FCITX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fcitx" 2>&1`
  2.1820 +        else
  2.1821 +	        FCITX_PKG_ERRORS=`$PKG_CONFIG --print-errors "fcitx" 2>&1`
  2.1822 +        fi
  2.1823 +	# Put the nasty error message in config.log where it belongs
  2.1824 +	echo "$FCITX_PKG_ERRORS" >&5
  2.1825 +
  2.1826 +	as_fn_error $? "Package requirements (fcitx) were not met:
  2.1827 +
  2.1828 +$FCITX_PKG_ERRORS
  2.1829 +
  2.1830 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
  2.1831 +installed software in a non-standard prefix.
  2.1832 +
  2.1833 +Alternatively, you may set the environment variables FCITX_CFLAGS
  2.1834 +and FCITX_LIBS to avoid the need to call pkg-config.
  2.1835 +See the pkg-config man page for more details." "$LINENO" 5
  2.1836 +elif test $pkg_failed = untried; then
  2.1837 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1838 +$as_echo "no" >&6; }
  2.1839 +	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  2.1840 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  2.1841 +as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
  2.1842 +is in your PATH or set the PKG_CONFIG environment variable to the full
  2.1843 +path to pkg-config.
  2.1844 +
  2.1845 +Alternatively, you may set the environment variables FCITX_CFLAGS
  2.1846 +and FCITX_LIBS to avoid the need to call pkg-config.
  2.1847 +See the pkg-config man page for more details.
  2.1848 +
  2.1849 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.
  2.1850 +See \`config.log' for more details" "$LINENO" 5; }
  2.1851 +else
  2.1852 +	FCITX_CFLAGS=$pkg_cv_FCITX_CFLAGS
  2.1853 +	FCITX_LIBS=$pkg_cv_FCITX_LIBS
  2.1854 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  2.1855 +$as_echo "yes" >&6; }
  2.1856 +
  2.1857 +fi
  2.1858 +        CFLAGS="$CFLAGS $FCITX_CFLAGS"
  2.1859 +        ac_fn_c_check_header_mongrel "$LINENO" "fcitx/frontend.h" "ac_cv_header_fcitx_frontend_h" "$ac_includes_default"
  2.1860  if test "x$ac_cv_header_fcitx_frontend_h" = xyes; then :
  2.1861    have_fcitx_frontend_h_hdr=yes
  2.1862  else
  2.1863 @@ -22563,23 +22950,22 @@
  2.1864  fi
  2.1865  
  2.1866  
  2.1867 -            CFLAGS="$save_CFLAGS"
  2.1868 -            if test x$have_fcitx_frontend_h_hdr = xyes; then
  2.1869 -                if test x$enable_ime != xyes; then
  2.1870 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for fcitx." >&5
  2.1871 +        CFLAGS="$save_CFLAGS"
  2.1872 +        if test x$have_fcitx_frontend_h_hdr = xyes; then
  2.1873 +            if test x$enable_ime != xyes; then
  2.1874 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for fcitx." >&5
  2.1875  $as_echo "$as_me: WARNING: IME support is required for fcitx." >&2;}
  2.1876 -                    have_fcitx_frontend_h_hdr=no
  2.1877 -                elif test x$enable_dbus != xyes; then
  2.1878 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for fcitx." >&5
  2.1879 +                have_fcitx_frontend_h_hdr=no
  2.1880 +            elif test x$enable_dbus != xyes; then
  2.1881 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for fcitx." >&5
  2.1882  $as_echo "$as_me: WARNING: DBus support is required for fcitx." >&2;}
  2.1883 -                    have_fcitx_frontend_h_hdr=no
  2.1884 -                else
  2.1885 +                have_fcitx_frontend_h_hdr=no
  2.1886 +            else
  2.1887  
  2.1888  $as_echo "#define HAVE_FCITX_FRONTEND_H 1" >>confdefs.h
  2.1889  
  2.1890 -                    EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
  2.1891 -                    SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
  2.1892 -               fi
  2.1893 +                EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
  2.1894 +                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
  2.1895              fi
  2.1896          fi
  2.1897      fi
  2.1898 @@ -23752,61 +24138,106 @@
  2.1899  fi
  2.1900  
  2.1901      if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
  2.1902 +
  2.1903 +pkg_failed=no
  2.1904 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUSB" >&5
  2.1905 +$as_echo_n "checking for LIBUSB... " >&6; }
  2.1906 +
  2.1907 +if test -n "$LIBUSB_CFLAGS"; then
  2.1908 +    pkg_cv_LIBUSB_CFLAGS="$LIBUSB_CFLAGS"
  2.1909 + elif test -n "$PKG_CONFIG"; then
  2.1910 +    if test -n "$PKG_CONFIG" && \
  2.1911 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
  2.1912 +  ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
  2.1913 +  ac_status=$?
  2.1914 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1915 +  test $ac_status = 0; }; then
  2.1916 +  pkg_cv_LIBUSB_CFLAGS=`$PKG_CONFIG --cflags "libusb-1.0" 2>/dev/null`
  2.1917 +else
  2.1918 +  pkg_failed=yes
  2.1919 +fi
  2.1920 + else
  2.1921 +    pkg_failed=untried
  2.1922 +fi
  2.1923 +if test -n "$LIBUSB_LIBS"; then
  2.1924 +    pkg_cv_LIBUSB_LIBS="$LIBUSB_LIBS"
  2.1925 + elif test -n "$PKG_CONFIG"; then
  2.1926 +    if test -n "$PKG_CONFIG" && \
  2.1927 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
  2.1928 +  ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
  2.1929 +  ac_status=$?
  2.1930 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  2.1931 +  test $ac_status = 0; }; then
  2.1932 +  pkg_cv_LIBUSB_LIBS=`$PKG_CONFIG --libs "libusb-1.0" 2>/dev/null`
  2.1933 +else
  2.1934 +  pkg_failed=yes
  2.1935 +fi
  2.1936 + else
  2.1937 +    pkg_failed=untried
  2.1938 +fi
  2.1939 +
  2.1940 +
  2.1941 +
  2.1942 +if test $pkg_failed = yes; then
  2.1943 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1944 +$as_echo "no" >&6; }
  2.1945 +
  2.1946 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  2.1947 +        _pkg_short_errors_supported=yes
  2.1948 +else
  2.1949 +        _pkg_short_errors_supported=no
  2.1950 +fi
  2.1951 +        if test $_pkg_short_errors_supported = yes; then
  2.1952 +	        LIBUSB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libusb-1.0" 2>&1`
  2.1953 +        else
  2.1954 +	        LIBUSB_PKG_ERRORS=`$PKG_CONFIG --print-errors "libusb-1.0" 2>&1`
  2.1955 +        fi
  2.1956 +	# Put the nasty error message in config.log where it belongs
  2.1957 +	echo "$LIBUSB_PKG_ERRORS" >&5
  2.1958 +
  2.1959 +	as_fn_error $? "Package requirements (libusb-1.0) were not met:
  2.1960 +
  2.1961 +$LIBUSB_PKG_ERRORS
  2.1962 +
  2.1963 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
  2.1964 +installed software in a non-standard prefix.
  2.1965 +
  2.1966 +Alternatively, you may set the environment variables LIBUSB_CFLAGS
  2.1967 +and LIBUSB_LIBS to avoid the need to call pkg-config.
  2.1968 +See the pkg-config man page for more details." "$LINENO" 5
  2.1969 +elif test $pkg_failed = untried; then
  2.1970 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.1971 +$as_echo "no" >&6; }
  2.1972 +	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  2.1973 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  2.1974 +as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
  2.1975 +is in your PATH or set the PKG_CONFIG environment variable to the full
  2.1976 +path to pkg-config.
  2.1977 +
  2.1978 +Alternatively, you may set the environment variables LIBUSB_CFLAGS
  2.1979 +and LIBUSB_LIBS to avoid the need to call pkg-config.
  2.1980 +See the pkg-config man page for more details.
  2.1981 +
  2.1982 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.
  2.1983 +See \`config.log' for more details" "$LINENO" 5; }
  2.1984 +else
  2.1985 +	LIBUSB_CFLAGS=$pkg_cv_LIBUSB_CFLAGS
  2.1986 +	LIBUSB_LIBS=$pkg_cv_LIBUSB_LIBS
  2.1987 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  2.1988 +$as_echo "yes" >&6; }
  2.1989 +
  2.1990 +fi
  2.1991          hidapi_support=no
  2.1992 -        # Extract the first word of "pkg-config", so it can be a program name with args.
  2.1993 -set dummy pkg-config; ac_word=$2
  2.1994 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  2.1995 -$as_echo_n "checking for $ac_word... " >&6; }
  2.1996 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
  2.1997 -  $as_echo_n "(cached) " >&6
  2.1998 -else
  2.1999 -  case $PKG_CONFIG in
  2.2000 -  [\\/]* | ?:[\\/]*)
  2.2001 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  2.2002 -  ;;
  2.2003 -  *)
  2.2004 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2.2005 -for as_dir in $PATH
  2.2006 -do
  2.2007 -  IFS=$as_save_IFS
  2.2008 -  test -z "$as_dir" && as_dir=.
  2.2009 -    for ac_exec_ext in '' $ac_executable_extensions; do
  2.2010 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  2.2011 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  2.2012 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  2.2013 -    break 2
  2.2014 -  fi
  2.2015 -done
  2.2016 -  done
  2.2017 -IFS=$as_save_IFS
  2.2018 -
  2.2019 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  2.2020 -  ;;
  2.2021 -esac
  2.2022 -fi
  2.2023 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  2.2024 -if test -n "$PKG_CONFIG"; then
  2.2025 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
  2.2026 -$as_echo "$PKG_CONFIG" >&6; }
  2.2027 -else
  2.2028 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  2.2029 -$as_echo "no" >&6; }
  2.2030 -fi
  2.2031 -
  2.2032 -
  2.2033 -        if test x$PKG_CONFIG != xno; then
  2.2034 -            LIBUSB_CFLAGS=`$PKG_CONFIG --cflags libusb-1.0`
  2.2035 -            LIBUSB_LDFLAGS=`$PKG_CONFIG --libs libusb-1.0`
  2.2036 -            save_CFLAGS="$CFLAGS"
  2.2037 -            CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
  2.2038 -            ac_fn_c_check_header_mongrel "$LINENO" "libusb.h" "ac_cv_header_libusb_h" "$ac_includes_default"
  2.2039 +        save_CFLAGS="$CFLAGS"
  2.2040 +        CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
  2.2041 +        ac_fn_c_check_header_mongrel "$LINENO" "libusb.h" "ac_cv_header_libusb_h" "$ac_includes_default"
  2.2042  if test "x$ac_cv_header_libusb_h" = xyes; then :
  2.2043    have_libusb_h=yes
  2.2044  fi
  2.2045  
  2.2046  
  2.2047 -            CFLAGS="$save_CFLAGS"
  2.2048 -        fi
  2.2049 +        CFLAGS="$save_CFLAGS"
  2.2050 +
  2.2051          if test x$have_libusb_h = xyes; then
  2.2052              hidapi_support=yes
  2.2053  
  2.2054 @@ -23816,7 +24247,7 @@
  2.2055              SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
  2.2056              SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
  2.2057              EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
  2.2058 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LDFLAGS"
  2.2059 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
  2.2060          fi
  2.2061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hidapi support" >&5
  2.2062  $as_echo_n "checking for hidapi support... " >&6; }