configure
changeset 12639 1e4dd5933351
parent 12631 779b63fc4acb
child 12654 cd9fe6a3126c
     1.1 --- a/configure	Sun Feb 03 20:06:18 2019 +1100
     1.2 +++ b/configure	Sat Mar 16 17:39:15 2019 -0700
     1.3 @@ -651,22 +651,45 @@
     1.4  SDL_STATIC_LIBS
     1.5  SDL_LIBS
     1.6  SDL_CFLAGS
     1.7 -DIRECTFBCONFIG
     1.8 +LIBUSB_LIBS
     1.9 +LIBUSB_CFLAGS
    1.10 +FCITX_LIBS
    1.11 +FCITX_CFLAGS
    1.12 +IBUS_LIBS
    1.13 +IBUS_CFLAGS
    1.14 +DBUS_LIBS
    1.15 +DBUS_CFLAGS
    1.16 +LIBGBM_LIBS
    1.17 +LIBGBM_CFLAGS
    1.18 +LIBDRM_LIBS
    1.19 +LIBDRM_CFLAGS
    1.20 +DIRECTFB_LIBS
    1.21 +DIRECTFB_CFLAGS
    1.22  X_EXTRA_LIBS
    1.23  X_LIBS
    1.24  X_PRE_LIBS
    1.25  X_CFLAGS
    1.26  XMKMF
    1.27 +RPI_LIBS
    1.28 +RPI_CFLAGS
    1.29 +FUSIONSOUND_LIBS
    1.30 +FUSIONSOUND_CFLAGS
    1.31  ARTSCONFIG
    1.32 +PULSEAUDIO_LIBS
    1.33 +PULSEAUDIO_CFLAGS
    1.34  ESD_LIBS
    1.35  ESD_CFLAGS
    1.36  ESD_CONFIG
    1.37 -PKG_CONFIG
    1.38 +JACK_LIBS
    1.39 +JACK_CFLAGS
    1.40  ALSA_LIBS
    1.41  ALSA_CFLAGS
    1.42  POW_LIB
    1.43  LIBOBJS
    1.44  ALLOCA
    1.45 +PKG_CONFIG_LIBDIR
    1.46 +PKG_CONFIG_PATH
    1.47 +PKG_CONFIG
    1.48  WINDRES
    1.49  SET_MAKE
    1.50  INSTALL_DATA
    1.51 @@ -887,7 +910,32 @@
    1.52  CXXFLAGS
    1.53  CCC
    1.54  CXXCPP
    1.55 -XMKMF'
    1.56 +PKG_CONFIG
    1.57 +PKG_CONFIG_PATH
    1.58 +PKG_CONFIG_LIBDIR
    1.59 +JACK_CFLAGS
    1.60 +JACK_LIBS
    1.61 +PULSEAUDIO_CFLAGS
    1.62 +PULSEAUDIO_LIBS
    1.63 +FUSIONSOUND_CFLAGS
    1.64 +FUSIONSOUND_LIBS
    1.65 +RPI_CFLAGS
    1.66 +RPI_LIBS
    1.67 +XMKMF
    1.68 +DIRECTFB_CFLAGS
    1.69 +DIRECTFB_LIBS
    1.70 +LIBDRM_CFLAGS
    1.71 +LIBDRM_LIBS
    1.72 +LIBGBM_CFLAGS
    1.73 +LIBGBM_LIBS
    1.74 +DBUS_CFLAGS
    1.75 +DBUS_LIBS
    1.76 +IBUS_CFLAGS
    1.77 +IBUS_LIBS
    1.78 +FCITX_CFLAGS
    1.79 +FCITX_LIBS
    1.80 +LIBUSB_CFLAGS
    1.81 +LIBUSB_LIBS'
    1.82  
    1.83  
    1.84  # Initialize some variables set by options.
    1.85 @@ -1576,7 +1624,7 @@
    1.86                            QtWayland server support for Wayland video driver
    1.87                            [[default=yes]]
    1.88    --enable-wayland-shared dynamically load Wayland support [[default=maybe]]
    1.89 -  --enable-video-rpi      use Raspberry Pi video driver [[default=yes]]
    1.90 +  --enable-video-rpi      use Raspberry Pi video driver [[default=no]]
    1.91    --enable-video-x11      use X11 video driver [[default=yes]]
    1.92    --enable-x11-shared     dynamically load X11 support [[default=maybe]]
    1.93    --enable-video-x11-xcursor
    1.94 @@ -1663,7 +1711,44 @@
    1.95    CXX         C++ compiler command
    1.96    CXXFLAGS    C++ compiler flags
    1.97    CXXCPP      C++ preprocessor
    1.98 +  PKG_CONFIG  path to pkg-config utility
    1.99 +  PKG_CONFIG_PATH
   1.100 +              directories to add to pkg-config's search path
   1.101 +  PKG_CONFIG_LIBDIR
   1.102 +              path overriding pkg-config's built-in search path
   1.103 +  JACK_CFLAGS C compiler flags for JACK, overriding pkg-config
   1.104 +  JACK_LIBS   linker flags for JACK, overriding pkg-config
   1.105 +  PULSEAUDIO_CFLAGS
   1.106 +              C compiler flags for PULSEAUDIO, overriding pkg-config
   1.107 +  PULSEAUDIO_LIBS
   1.108 +              linker flags for PULSEAUDIO, overriding pkg-config
   1.109 +  FUSIONSOUND_CFLAGS
   1.110 +              C compiler flags for FUSIONSOUND, overriding pkg-config
   1.111 +  FUSIONSOUND_LIBS
   1.112 +              linker flags for FUSIONSOUND, overriding pkg-config
   1.113 +  RPI_CFLAGS  C compiler flags for RPI, overriding pkg-config
   1.114 +  RPI_LIBS    linker flags for RPI, overriding pkg-config
   1.115    XMKMF       Path to xmkmf, Makefile generator for X Window System
   1.116 +  DIRECTFB_CFLAGS
   1.117 +              C compiler flags for DIRECTFB, overriding pkg-config
   1.118 +  DIRECTFB_LIBS
   1.119 +              linker flags for DIRECTFB, overriding pkg-config
   1.120 +  LIBDRM_CFLAGS
   1.121 +              C compiler flags for LIBDRM, overriding pkg-config
   1.122 +  LIBDRM_LIBS linker flags for LIBDRM, overriding pkg-config
   1.123 +  LIBGBM_CFLAGS
   1.124 +              C compiler flags for LIBGBM, overriding pkg-config
   1.125 +  LIBGBM_LIBS linker flags for LIBGBM, overriding pkg-config
   1.126 +  DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config
   1.127 +  DBUS_LIBS   linker flags for DBUS, overriding pkg-config
   1.128 +  IBUS_CFLAGS C compiler flags for IBUS, overriding pkg-config
   1.129 +  IBUS_LIBS   linker flags for IBUS, overriding pkg-config
   1.130 +  FCITX_CFLAGS
   1.131 +              C compiler flags for FCITX, overriding pkg-config
   1.132 +  FCITX_LIBS  linker flags for FCITX, overriding pkg-config
   1.133 +  LIBUSB_CFLAGS
   1.134 +              C compiler flags for LIBUSB, overriding pkg-config
   1.135 +  LIBUSB_LIBS linker flags for LIBUSB, overriding pkg-config
   1.136  
   1.137  Use these variables to override the choices made by `configure' or to help
   1.138  it to find libraries and programs with nonstandard names/locations.
   1.139 @@ -15683,6 +15768,125 @@
   1.140  fi
   1.141  
   1.142  
   1.143 +
   1.144 +
   1.145 +
   1.146 +
   1.147 +
   1.148 +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
   1.149 +	if test -n "$ac_tool_prefix"; then
   1.150 +  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
   1.151 +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
   1.152 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.153 +$as_echo_n "checking for $ac_word... " >&6; }
   1.154 +if ${ac_cv_path_PKG_CONFIG+:} false; then :
   1.155 +  $as_echo_n "(cached) " >&6
   1.156 +else
   1.157 +  case $PKG_CONFIG in
   1.158 +  [\\/]* | ?:[\\/]*)
   1.159 +  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   1.160 +  ;;
   1.161 +  *)
   1.162 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.163 +for as_dir in $PATH
   1.164 +do
   1.165 +  IFS=$as_save_IFS
   1.166 +  test -z "$as_dir" && as_dir=.
   1.167 +    for ac_exec_ext in '' $ac_executable_extensions; do
   1.168 +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.169 +    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.170 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.171 +    break 2
   1.172 +  fi
   1.173 +done
   1.174 +  done
   1.175 +IFS=$as_save_IFS
   1.176 +
   1.177 +  ;;
   1.178 +esac
   1.179 +fi
   1.180 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   1.181 +if test -n "$PKG_CONFIG"; then
   1.182 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   1.183 +$as_echo "$PKG_CONFIG" >&6; }
   1.184 +else
   1.185 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.186 +$as_echo "no" >&6; }
   1.187 +fi
   1.188 +
   1.189 +
   1.190 +fi
   1.191 +if test -z "$ac_cv_path_PKG_CONFIG"; then
   1.192 +  ac_pt_PKG_CONFIG=$PKG_CONFIG
   1.193 +  # Extract the first word of "pkg-config", so it can be a program name with args.
   1.194 +set dummy pkg-config; ac_word=$2
   1.195 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.196 +$as_echo_n "checking for $ac_word... " >&6; }
   1.197 +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   1.198 +  $as_echo_n "(cached) " >&6
   1.199 +else
   1.200 +  case $ac_pt_PKG_CONFIG in
   1.201 +  [\\/]* | ?:[\\/]*)
   1.202 +  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
   1.203 +  ;;
   1.204 +  *)
   1.205 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.206 +for as_dir in $PATH
   1.207 +do
   1.208 +  IFS=$as_save_IFS
   1.209 +  test -z "$as_dir" && as_dir=.
   1.210 +    for ac_exec_ext in '' $ac_executable_extensions; do
   1.211 +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.212 +    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.213 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.214 +    break 2
   1.215 +  fi
   1.216 +done
   1.217 +  done
   1.218 +IFS=$as_save_IFS
   1.219 +
   1.220 +  ;;
   1.221 +esac
   1.222 +fi
   1.223 +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
   1.224 +if test -n "$ac_pt_PKG_CONFIG"; then
   1.225 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
   1.226 +$as_echo "$ac_pt_PKG_CONFIG" >&6; }
   1.227 +else
   1.228 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.229 +$as_echo "no" >&6; }
   1.230 +fi
   1.231 +
   1.232 +  if test "x$ac_pt_PKG_CONFIG" = x; then
   1.233 +    PKG_CONFIG=""
   1.234 +  else
   1.235 +    case $cross_compiling:$ac_tool_warned in
   1.236 +yes:)
   1.237 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
   1.238 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
   1.239 +ac_tool_warned=yes ;;
   1.240 +esac
   1.241 +    PKG_CONFIG=$ac_pt_PKG_CONFIG
   1.242 +  fi
   1.243 +else
   1.244 +  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
   1.245 +fi
   1.246 +
   1.247 +fi
   1.248 +if test -n "$PKG_CONFIG"; then
   1.249 +	_pkg_min_version=0.9.0
   1.250 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
   1.251 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
   1.252 +	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
   1.253 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   1.254 +$as_echo "yes" >&6; }
   1.255 +	else
   1.256 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.257 +$as_echo "no" >&6; }
   1.258 +		PKG_CONFIG=""
   1.259 +	fi
   1.260 +fi
   1.261 +
   1.262  case "$host" in
   1.263      *-*-mingw32*)
   1.264          # Except on msys, where make can't handle full pathnames (bug 1972)
   1.265 @@ -18065,62 +18269,75 @@
   1.266  fi
   1.267  
   1.268      if test x$enable_audio = xyes -a x$enable_jack = xyes; then
   1.269 -        audio_jack=no
   1.270 -
   1.271 -        JACK_REQUIRED_VERSION=0.125
   1.272 -
   1.273 -        # Extract the first word of "pkg-config", so it can be a program name with args.
   1.274 -set dummy pkg-config; ac_word=$2
   1.275 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.276 -$as_echo_n "checking for $ac_word... " >&6; }
   1.277 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   1.278 -  $as_echo_n "(cached) " >&6
   1.279 -else
   1.280 -  case $PKG_CONFIG in
   1.281 -  [\\/]* | ?:[\\/]*)
   1.282 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   1.283 -  ;;
   1.284 -  *)
   1.285 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.286 -for as_dir in $PATH
   1.287 -do
   1.288 -  IFS=$as_save_IFS
   1.289 -  test -z "$as_dir" && as_dir=.
   1.290 -    for ac_exec_ext in '' $ac_executable_extensions; do
   1.291 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.292 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.293 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.294 -    break 2
   1.295 -  fi
   1.296 -done
   1.297 -  done
   1.298 -IFS=$as_save_IFS
   1.299 -
   1.300 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   1.301 -  ;;
   1.302 -esac
   1.303 -fi
   1.304 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   1.305 -if test -n "$PKG_CONFIG"; then
   1.306 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   1.307 -$as_echo "$PKG_CONFIG" >&6; }
   1.308 -else
   1.309 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.310 -$as_echo "no" >&6; }
   1.311 -fi
   1.312 -
   1.313 -
   1.314 -        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK $JACK_REQUIRED_VERSION support" >&5
   1.315 -$as_echo_n "checking for JACK $JACK_REQUIRED_VERSION support... " >&6; }
   1.316 -        if test x$PKG_CONFIG != xno; then
   1.317 -        if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then
   1.318 -                JACK_CFLAGS=`$PKG_CONFIG --cflags jack`
   1.319 -                JACK_LIBS=`$PKG_CONFIG --libs jack`
   1.320 -                audio_jack=yes
   1.321 -            fi
   1.322 -        fi
   1.323 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $audio_jack" >&5
   1.324 -$as_echo "$audio_jack" >&6; }
   1.325 +
   1.326 +pkg_failed=no
   1.327 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK" >&5
   1.328 +$as_echo_n "checking for JACK... " >&6; }
   1.329 +
   1.330 +if test -n "$JACK_CFLAGS"; then
   1.331 +    pkg_cv_JACK_CFLAGS="$JACK_CFLAGS"
   1.332 + elif test -n "$PKG_CONFIG"; then
   1.333 +    if test -n "$PKG_CONFIG" && \
   1.334 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack >= 0.125\""; } >&5
   1.335 +  ($PKG_CONFIG --exists --print-errors "jack >= 0.125") 2>&5
   1.336 +  ac_status=$?
   1.337 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   1.338 +  test $ac_status = 0; }; then
   1.339 +  pkg_cv_JACK_CFLAGS=`$PKG_CONFIG --cflags "jack >= 0.125" 2>/dev/null`
   1.340 +else
   1.341 +  pkg_failed=yes
   1.342 +fi
   1.343 + else
   1.344 +    pkg_failed=untried
   1.345 +fi
   1.346 +if test -n "$JACK_LIBS"; then
   1.347 +    pkg_cv_JACK_LIBS="$JACK_LIBS"
   1.348 + elif test -n "$PKG_CONFIG"; then
   1.349 +    if test -n "$PKG_CONFIG" && \
   1.350 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack >= 0.125\""; } >&5
   1.351 +  ($PKG_CONFIG --exists --print-errors "jack >= 0.125") 2>&5
   1.352 +  ac_status=$?
   1.353 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   1.354 +  test $ac_status = 0; }; then
   1.355 +  pkg_cv_JACK_LIBS=`$PKG_CONFIG --libs "jack >= 0.125" 2>/dev/null`
   1.356 +else
   1.357 +  pkg_failed=yes
   1.358 +fi
   1.359 + else
   1.360 +    pkg_failed=untried
   1.361 +fi
   1.362 +
   1.363 +
   1.364 +
   1.365 +if test $pkg_failed = yes; then
   1.366 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.367 +$as_echo "no" >&6; }
   1.368 +
   1.369 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
   1.370 +        _pkg_short_errors_supported=yes
   1.371 +else
   1.372 +        _pkg_short_errors_supported=no
   1.373 +fi
   1.374 +        if test $_pkg_short_errors_supported = yes; then
   1.375 +	        JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "jack >= 0.125" 2>&1`
   1.376 +        else
   1.377 +	        JACK_PKG_ERRORS=`$PKG_CONFIG --print-errors "jack >= 0.125" 2>&1`
   1.378 +        fi
   1.379 +	# Put the nasty error message in config.log where it belongs
   1.380 +	echo "$JACK_PKG_ERRORS" >&5
   1.381 +
   1.382 +	audio_jack=no
   1.383 +elif test $pkg_failed = untried; then
   1.384 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.385 +$as_echo "no" >&6; }
   1.386 +	audio_jack=no
   1.387 +else
   1.388 +	JACK_CFLAGS=$pkg_cv_JACK_CFLAGS
   1.389 +	JACK_LIBS=$pkg_cv_JACK_LIBS
   1.390 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   1.391 +$as_echo "yes" >&6; }
   1.392 +	audio_jack=yes
   1.393 +fi
   1.394  
   1.395          if test x$audio_jack = xyes; then
   1.396              # Check whether --enable-jack-shared was given.
   1.397 @@ -18463,62 +18680,75 @@
   1.398  fi
   1.399  
   1.400      if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
   1.401 -        audio_pulseaudio=no
   1.402 -
   1.403 -        PULSEAUDIO_REQUIRED_VERSION=0.9
   1.404 -
   1.405 -        # Extract the first word of "pkg-config", so it can be a program name with args.
   1.406 -set dummy pkg-config; ac_word=$2
   1.407 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.408 -$as_echo_n "checking for $ac_word... " >&6; }
   1.409 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   1.410 -  $as_echo_n "(cached) " >&6
   1.411 -else
   1.412 -  case $PKG_CONFIG in
   1.413 -  [\\/]* | ?:[\\/]*)
   1.414 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   1.415 -  ;;
   1.416 -  *)
   1.417 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.418 -for as_dir in $PATH
   1.419 -do
   1.420 -  IFS=$as_save_IFS
   1.421 -  test -z "$as_dir" && as_dir=.
   1.422 -    for ac_exec_ext in '' $ac_executable_extensions; do
   1.423 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.424 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.425 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.426 -    break 2
   1.427 -  fi
   1.428 -done
   1.429 -  done
   1.430 -IFS=$as_save_IFS
   1.431 -
   1.432 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   1.433 -  ;;
   1.434 -esac
   1.435 -fi
   1.436 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   1.437 -if test -n "$PKG_CONFIG"; then
   1.438 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   1.439 -$as_echo "$PKG_CONFIG" >&6; }
   1.440 -else
   1.441 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.442 -$as_echo "no" >&6; }
   1.443 -fi
   1.444 -
   1.445 -
   1.446 -        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support" >&5
   1.447 -$as_echo_n "checking for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support... " >&6; }
   1.448 -        if test x$PKG_CONFIG != xno; then
   1.449 -            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
   1.450 -                PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
   1.451 -                PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple`
   1.452 -                audio_pulseaudio=yes
   1.453 -            fi
   1.454 -        fi
   1.455 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $audio_pulseaudio" >&5
   1.456 -$as_echo "$audio_pulseaudio" >&6; }
   1.457 +
   1.458 +pkg_failed=no
   1.459 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PULSEAUDIO" >&5
   1.460 +$as_echo_n "checking for PULSEAUDIO... " >&6; }
   1.461 +
   1.462 +if test -n "$PULSEAUDIO_CFLAGS"; then
   1.463 +    pkg_cv_PULSEAUDIO_CFLAGS="$PULSEAUDIO_CFLAGS"
   1.464 + elif test -n "$PKG_CONFIG"; then
   1.465 +    if test -n "$PKG_CONFIG" && \
   1.466 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple >= 0.9\""; } >&5
   1.467 +  ($PKG_CONFIG --exists --print-errors "libpulse-simple >= 0.9") 2>&5
   1.468 +  ac_status=$?
   1.469 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   1.470 +  test $ac_status = 0; }; then
   1.471 +  pkg_cv_PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags "libpulse-simple >= 0.9" 2>/dev/null`
   1.472 +else
   1.473 +  pkg_failed=yes
   1.474 +fi
   1.475 + else
   1.476 +    pkg_failed=untried
   1.477 +fi
   1.478 +if test -n "$PULSEAUDIO_LIBS"; then
   1.479 +    pkg_cv_PULSEAUDIO_LIBS="$PULSEAUDIO_LIBS"
   1.480 + elif test -n "$PKG_CONFIG"; then
   1.481 +    if test -n "$PKG_CONFIG" && \
   1.482 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple >= 0.9\""; } >&5
   1.483 +  ($PKG_CONFIG --exists --print-errors "libpulse-simple >= 0.9") 2>&5
   1.484 +  ac_status=$?
   1.485 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   1.486 +  test $ac_status = 0; }; then
   1.487 +  pkg_cv_PULSEAUDIO_LIBS=`$PKG_CONFIG --libs "libpulse-simple >= 0.9" 2>/dev/null`
   1.488 +else
   1.489 +  pkg_failed=yes
   1.490 +fi
   1.491 + else
   1.492 +    pkg_failed=untried
   1.493 +fi
   1.494 +
   1.495 +
   1.496 +
   1.497 +if test $pkg_failed = yes; then
   1.498 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.499 +$as_echo "no" >&6; }
   1.500 +
   1.501 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
   1.502 +        _pkg_short_errors_supported=yes
   1.503 +else
   1.504 +        _pkg_short_errors_supported=no
   1.505 +fi
   1.506 +        if test $_pkg_short_errors_supported = yes; then
   1.507 +	        PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpulse-simple >= 0.9" 2>&1`
   1.508 +        else
   1.509 +	        PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpulse-simple >= 0.9" 2>&1`
   1.510 +        fi
   1.511 +	# Put the nasty error message in config.log where it belongs
   1.512 +	echo "$PULSEAUDIO_PKG_ERRORS" >&5
   1.513 +
   1.514 +	audio_pulseaudio=no
   1.515 +elif test $pkg_failed = untried; then
   1.516 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.517 +$as_echo "no" >&6; }
   1.518 +	audio_pulseaudio=no
   1.519 +else
   1.520 +	PULSEAUDIO_CFLAGS=$pkg_cv_PULSEAUDIO_CFLAGS
   1.521 +	PULSEAUDIO_LIBS=$pkg_cv_PULSEAUDIO_LIBS
   1.522 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   1.523 +$as_echo "yes" >&6; }
   1.524 +	audio_pulseaudio=yes
   1.525 +fi
   1.526  
   1.527          if test x$audio_pulseaudio = xyes; then
   1.528              # Check whether --enable-pulseaudio-shared was given.
   1.529 @@ -18921,62 +19151,75 @@
   1.530  fi
   1.531  
   1.532      if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
   1.533 -        fusionsound=no
   1.534 -
   1.535 -        FUSIONSOUND_REQUIRED_VERSION=1.1.1
   1.536 -
   1.537 -        # Extract the first word of "pkg-config", so it can be a program name with args.
   1.538 -set dummy pkg-config; ac_word=$2
   1.539 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.540 -$as_echo_n "checking for $ac_word... " >&6; }
   1.541 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   1.542 -  $as_echo_n "(cached) " >&6
   1.543 -else
   1.544 -  case $PKG_CONFIG in
   1.545 -  [\\/]* | ?:[\\/]*)
   1.546 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   1.547 -  ;;
   1.548 -  *)
   1.549 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.550 -for as_dir in $PATH
   1.551 -do
   1.552 -  IFS=$as_save_IFS
   1.553 -  test -z "$as_dir" && as_dir=.
   1.554 -    for ac_exec_ext in '' $ac_executable_extensions; do
   1.555 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.556 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.557 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.558 -    break 2
   1.559 -  fi
   1.560 -done
   1.561 -  done
   1.562 -IFS=$as_save_IFS
   1.563 -
   1.564 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   1.565 -  ;;
   1.566 -esac
   1.567 -fi
   1.568 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   1.569 -if test -n "$PKG_CONFIG"; then
   1.570 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   1.571 -$as_echo "$PKG_CONFIG" >&6; }
   1.572 -else
   1.573 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.574 -$as_echo "no" >&6; }
   1.575 -fi
   1.576 -
   1.577 -
   1.578 -        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support" >&5
   1.579 -$as_echo_n "checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support... " >&6; }
   1.580 -        if test x$PKG_CONFIG != xno; then
   1.581 -            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
   1.582 -                FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
   1.583 -                FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
   1.584 -                fusionsound=yes
   1.585 -            fi
   1.586 -        fi
   1.587 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fusionsound" >&5
   1.588 -$as_echo "$fusionsound" >&6; }
   1.589 +
   1.590 +pkg_failed=no
   1.591 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSIONSOUND" >&5
   1.592 +$as_echo_n "checking for FUSIONSOUND... " >&6; }
   1.593 +
   1.594 +if test -n "$FUSIONSOUND_CFLAGS"; then
   1.595 +    pkg_cv_FUSIONSOUND_CFLAGS="$FUSIONSOUND_CFLAGS"
   1.596 + elif test -n "$PKG_CONFIG"; then
   1.597 +    if test -n "$PKG_CONFIG" && \
   1.598 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fusionsound >= 1.1.1\""; } >&5
   1.599 +  ($PKG_CONFIG --exists --print-errors "fusionsound >= 1.1.1") 2>&5
   1.600 +  ac_status=$?
   1.601 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   1.602 +  test $ac_status = 0; }; then
   1.603 +  pkg_cv_FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags "fusionsound >= 1.1.1" 2>/dev/null`
   1.604 +else
   1.605 +  pkg_failed=yes
   1.606 +fi
   1.607 + else
   1.608 +    pkg_failed=untried
   1.609 +fi
   1.610 +if test -n "$FUSIONSOUND_LIBS"; then
   1.611 +    pkg_cv_FUSIONSOUND_LIBS="$FUSIONSOUND_LIBS"
   1.612 + elif test -n "$PKG_CONFIG"; then
   1.613 +    if test -n "$PKG_CONFIG" && \
   1.614 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fusionsound >= 1.1.1\""; } >&5
   1.615 +  ($PKG_CONFIG --exists --print-errors "fusionsound >= 1.1.1") 2>&5
   1.616 +  ac_status=$?
   1.617 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   1.618 +  test $ac_status = 0; }; then
   1.619 +  pkg_cv_FUSIONSOUND_LIBS=`$PKG_CONFIG --libs "fusionsound >= 1.1.1" 2>/dev/null`
   1.620 +else
   1.621 +  pkg_failed=yes
   1.622 +fi
   1.623 + else
   1.624 +    pkg_failed=untried
   1.625 +fi
   1.626 +
   1.627 +
   1.628 +
   1.629 +if test $pkg_failed = yes; then
   1.630 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.631 +$as_echo "no" >&6; }
   1.632 +
   1.633 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
   1.634 +        _pkg_short_errors_supported=yes
   1.635 +else
   1.636 +        _pkg_short_errors_supported=no
   1.637 +fi
   1.638 +        if test $_pkg_short_errors_supported = yes; then
   1.639 +	        FUSIONSOUND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fusionsound >= 1.1.1" 2>&1`
   1.640 +        else
   1.641 +	        FUSIONSOUND_PKG_ERRORS=`$PKG_CONFIG --print-errors "fusionsound >= 1.1.1" 2>&1`
   1.642 +        fi
   1.643 +	# Put the nasty error message in config.log where it belongs
   1.644 +	echo "$FUSIONSOUND_PKG_ERRORS" >&5
   1.645 +
   1.646 +	fusionsound=no
   1.647 +elif test $pkg_failed = untried; then
   1.648 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.649 +$as_echo "no" >&6; }
   1.650 +	fusionsound=no
   1.651 +else
   1.652 +	FUSIONSOUND_CFLAGS=$pkg_cv_FUSIONSOUND_CFLAGS
   1.653 +	FUSIONSOUND_LIBS=$pkg_cv_FUSIONSOUND_LIBS
   1.654 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   1.655 +$as_echo "yes" >&6; }
   1.656 +	fusionsound=yes
   1.657 +fi
   1.658  
   1.659          if test x$fusionsound = xyes; then
   1.660  
   1.661 @@ -19294,52 +19537,10 @@
   1.662  
   1.663  
   1.664      if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then
   1.665 -        # Extract the first word of "pkg-config", so it can be a program name with args.
   1.666 -set dummy pkg-config; ac_word=$2
   1.667 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.668 -$as_echo_n "checking for $ac_word... " >&6; }
   1.669 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   1.670 -  $as_echo_n "(cached) " >&6
   1.671 -else
   1.672 -  case $PKG_CONFIG in
   1.673 -  [\\/]* | ?:[\\/]*)
   1.674 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   1.675 -  ;;
   1.676 -  *)
   1.677 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.678 -for as_dir in $PATH
   1.679 -do
   1.680 -  IFS=$as_save_IFS
   1.681 -  test -z "$as_dir" && as_dir=.
   1.682 -    for ac_exec_ext in '' $ac_executable_extensions; do
   1.683 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.684 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.685 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.686 -    break 2
   1.687 -  fi
   1.688 -done
   1.689 -  done
   1.690 -IFS=$as_save_IFS
   1.691 -
   1.692 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   1.693 -  ;;
   1.694 -esac
   1.695 -fi
   1.696 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   1.697 -if test -n "$PKG_CONFIG"; then
   1.698 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   1.699 -$as_echo "$PKG_CONFIG" >&6; }
   1.700 -else
   1.701 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.702 -$as_echo "no" >&6; }
   1.703 -fi
   1.704 -
   1.705 -
   1.706          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Wayland support" >&5
   1.707  $as_echo_n "checking for Wayland support... " >&6; }
   1.708          video_wayland=no
   1.709 -        if  test x$PKG_CONFIG != xno && \
   1.710 -            test x$video_opengl_egl = xyes && \
   1.711 +        if  test x$video_opengl_egl = xyes && \
   1.712              test x$video_opengles_v2 = xyes; then
   1.713              if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
   1.714                  WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
   1.715 @@ -19493,67 +19694,95 @@
   1.716  if test "${enable_video_rpi+set}" = set; then :
   1.717    enableval=$enable_video_rpi;
   1.718  else
   1.719 -  enable_video_rpi=yes
   1.720 +  enable_video_rpi=no
   1.721  fi
   1.722  
   1.723      if test x$enable_video = xyes -a x$enable_video_rpi = xyes; then
   1.724 -        # Extract the first word of "pkg-config", so it can be a program name with args.
   1.725 -set dummy pkg-config; ac_word=$2
   1.726 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.727 -$as_echo_n "checking for $ac_word... " >&6; }
   1.728 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   1.729 -  $as_echo_n "(cached) " >&6
   1.730 -else
   1.731 -  case $PKG_CONFIG in
   1.732 -  [\\/]* | ?:[\\/]*)
   1.733 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   1.734 -  ;;
   1.735 -  *)
   1.736 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.737 -for as_dir in $PATH
   1.738 -do
   1.739 -  IFS=$as_save_IFS
   1.740 -  test -z "$as_dir" && as_dir=.
   1.741 -    for ac_exec_ext in '' $ac_executable_extensions; do
   1.742 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.743 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.744 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.745 -    break 2
   1.746 -  fi
   1.747 -done
   1.748 -  done
   1.749 -IFS=$as_save_IFS
   1.750 -
   1.751 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   1.752 -  ;;
   1.753 -esac
   1.754 -fi
   1.755 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   1.756 -if test -n "$PKG_CONFIG"; then
   1.757 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   1.758 -$as_echo "$PKG_CONFIG" >&6; }
   1.759 -else
   1.760 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.761 -$as_echo "no" >&6; }
   1.762 -fi
   1.763 -
   1.764 -
   1.765 -        if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists bcm_host; then
   1.766 -            RPI_CFLAGS=`$PKG_CONFIG --cflags bcm_host brcmegl`
   1.767 -            RPI_LDFLAGS=`$PKG_CONFIG --libs bcm_host brcmegl`
   1.768 -        elif test x$ARCH = xnetbsd; then
   1.769 -            RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
   1.770 -            RPI_LDFLAGS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
   1.771 +
   1.772 +pkg_failed=no
   1.773 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RPI" >&5
   1.774 +$as_echo_n "checking for RPI... " >&6; }
   1.775 +
   1.776 +if test -n "$RPI_CFLAGS"; then
   1.777 +    pkg_cv_RPI_CFLAGS="$RPI_CFLAGS"
   1.778 + elif test -n "$PKG_CONFIG"; then
   1.779 +    if test -n "$PKG_CONFIG" && \
   1.780 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bcm_host brcmegl\""; } >&5
   1.781 +  ($PKG_CONFIG --exists --print-errors "bcm_host brcmegl") 2>&5
   1.782 +  ac_status=$?
   1.783 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   1.784 +  test $ac_status = 0; }; then
   1.785 +  pkg_cv_RPI_CFLAGS=`$PKG_CONFIG --cflags "bcm_host brcmegl" 2>/dev/null`
   1.786 +else
   1.787 +  pkg_failed=yes
   1.788 +fi
   1.789 + else
   1.790 +    pkg_failed=untried
   1.791 +fi
   1.792 +if test -n "$RPI_LIBS"; then
   1.793 +    pkg_cv_RPI_LIBS="$RPI_LIBS"
   1.794 + elif test -n "$PKG_CONFIG"; then
   1.795 +    if test -n "$PKG_CONFIG" && \
   1.796 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bcm_host brcmegl\""; } >&5
   1.797 +  ($PKG_CONFIG --exists --print-errors "bcm_host brcmegl") 2>&5
   1.798 +  ac_status=$?
   1.799 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   1.800 +  test $ac_status = 0; }; then
   1.801 +  pkg_cv_RPI_LIBS=`$PKG_CONFIG --libs "bcm_host brcmegl" 2>/dev/null`
   1.802 +else
   1.803 +  pkg_failed=yes
   1.804 +fi
   1.805 + else
   1.806 +    pkg_failed=untried
   1.807 +fi
   1.808 +
   1.809 +
   1.810 +
   1.811 +if test $pkg_failed = yes; then
   1.812 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.813 +$as_echo "no" >&6; }
   1.814 +
   1.815 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
   1.816 +        _pkg_short_errors_supported=yes
   1.817 +else
   1.818 +        _pkg_short_errors_supported=no
   1.819 +fi
   1.820 +        if test $_pkg_short_errors_supported = yes; then
   1.821 +	        RPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "bcm_host brcmegl" 2>&1`
   1.822          else
   1.823 -            RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
   1.824 -            RPI_LDFLAGS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
   1.825 +	        RPI_PKG_ERRORS=`$PKG_CONFIG --print-errors "bcm_host brcmegl" 2>&1`
   1.826 +        fi
   1.827 +	# Put the nasty error message in config.log where it belongs
   1.828 +	echo "$RPI_PKG_ERRORS" >&5
   1.829 +
   1.830 +	video_rpi=no
   1.831 +elif test $pkg_failed = untried; then
   1.832 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.833 +$as_echo "no" >&6; }
   1.834 +	video_rpi=no
   1.835 +else
   1.836 +	RPI_CFLAGS=$pkg_cv_RPI_CFLAGS
   1.837 +	RPI_LIBS=$pkg_cv_RPI_LIBS
   1.838 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   1.839 +$as_echo "yes" >&6; }
   1.840 +	video_rpi=yes
   1.841 +fi
   1.842 +
   1.843 +        if test x$video_rpi = xno; then
   1.844 +            if test x$ARCH = xnetbsd; then
   1.845 +                RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
   1.846 +                RPI_LIBS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
   1.847 +            else
   1.848 +                RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
   1.849 +                RPI_LIBS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
   1.850 +            fi
   1.851          fi
   1.852  
   1.853          # Save the original compiler flags and libraries
   1.854          ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
   1.855  
   1.856          # Add the Raspberry Pi compiler flags and libraries
   1.857 -        CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LDFLAGS"
   1.858 +        CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
   1.859  
   1.860          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Raspberry Pi" >&5
   1.861  $as_echo_n "checking for Raspberry Pi... " >&6; }
   1.862 @@ -19590,7 +19819,7 @@
   1.863              CFLAGS="$CFLAGS $RPI_CFLAGS"
   1.864              SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
   1.865              EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
   1.866 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LDFLAGS"
   1.867 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LIBS"
   1.868              SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
   1.869  
   1.870  $as_echo "#define SDL_VIDEO_DRIVER_RPI 1" >>confdefs.h
   1.871 @@ -21326,118 +21555,76 @@
   1.872  fi
   1.873  
   1.874      if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
   1.875 -        video_directfb=no
   1.876 -
   1.877 -        DIRECTFB_REQUIRED_VERSION=1.0.0
   1.878 -        for ac_prog in directfb-config
   1.879 -do
   1.880 -  # Extract the first word of "$ac_prog", so it can be a program name with args.
   1.881 -set dummy $ac_prog; ac_word=$2
   1.882 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.883 -$as_echo_n "checking for $ac_word... " >&6; }
   1.884 -if ${ac_cv_path_DIRECTFBCONFIG+:} false; then :
   1.885 -  $as_echo_n "(cached) " >&6
   1.886 -else
   1.887 -  case $DIRECTFBCONFIG in
   1.888 -  [\\/]* | ?:[\\/]*)
   1.889 -  ac_cv_path_DIRECTFBCONFIG="$DIRECTFBCONFIG" # Let the user override the test with a path.
   1.890 -  ;;
   1.891 -  *)
   1.892 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.893 -as_dummy="$prefix/bin:$PATH"
   1.894 -for as_dir in $as_dummy
   1.895 -do
   1.896 -  IFS=$as_save_IFS
   1.897 -  test -z "$as_dir" && as_dir=.
   1.898 -    for ac_exec_ext in '' $ac_executable_extensions; do
   1.899 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.900 -    ac_cv_path_DIRECTFBCONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.901 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.902 -    break 2
   1.903 -  fi
   1.904 -done
   1.905 -  done
   1.906 -IFS=$as_save_IFS
   1.907 -
   1.908 -  ;;
   1.909 -esac
   1.910 -fi
   1.911 -DIRECTFBCONFIG=$ac_cv_path_DIRECTFBCONFIG
   1.912 -if test -n "$DIRECTFBCONFIG"; then
   1.913 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRECTFBCONFIG" >&5
   1.914 -$as_echo "$DIRECTFBCONFIG" >&6; }
   1.915 -else
   1.916 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.917 -$as_echo "no" >&6; }
   1.918 -fi
   1.919 -
   1.920 -
   1.921 -  test -n "$DIRECTFBCONFIG" && break
   1.922 -done
   1.923 -test -n "$DIRECTFBCONFIG" || DIRECTFBCONFIG="no"
   1.924 -
   1.925 -        if test x$DIRECTFBCONFIG = xno; then
   1.926 -            # Extract the first word of "pkg-config", so it can be a program name with args.
   1.927 -set dummy pkg-config; ac_word=$2
   1.928 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.929 -$as_echo_n "checking for $ac_word... " >&6; }
   1.930 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
   1.931 -  $as_echo_n "(cached) " >&6
   1.932 -else
   1.933 -  case $PKG_CONFIG in
   1.934 -  [\\/]* | ?:[\\/]*)
   1.935 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
   1.936 -  ;;
   1.937 -  *)
   1.938 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.939 -for as_dir in $PATH
   1.940 -do
   1.941 -  IFS=$as_save_IFS
   1.942 -  test -z "$as_dir" && as_dir=.
   1.943 -    for ac_exec_ext in '' $ac_executable_extensions; do
   1.944 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.945 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
   1.946 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.947 -    break 2
   1.948 -  fi
   1.949 -done
   1.950 -  done
   1.951 -IFS=$as_save_IFS
   1.952 -
   1.953 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
   1.954 -  ;;
   1.955 -esac
   1.956 -fi
   1.957 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
   1.958 -if test -n "$PKG_CONFIG"; then
   1.959 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
   1.960 -$as_echo "$PKG_CONFIG" >&6; }
   1.961 -else
   1.962 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.963 -$as_echo "no" >&6; }
   1.964 -fi
   1.965 -
   1.966 -
   1.967 -            if test x$PKG_CONFIG != xno; then
   1.968 -                if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then
   1.969 -                    DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
   1.970 -                    DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
   1.971 -                    DIRECTFB_PREFIX=`$PKG_CONFIG --variable=prefix directfb`
   1.972 -                    video_directfb=yes
   1.973 -                fi
   1.974 -            fi
   1.975 +
   1.976 +pkg_failed=no
   1.977 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRECTFB" >&5
   1.978 +$as_echo_n "checking for DIRECTFB... " >&6; }
   1.979 +
   1.980 +if test -n "$DIRECTFB_CFLAGS"; then
   1.981 +    pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS"
   1.982 + elif test -n "$PKG_CONFIG"; then
   1.983 +    if test -n "$PKG_CONFIG" && \
   1.984 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 1.0.0\""; } >&5
   1.985 +  ($PKG_CONFIG --exists --print-errors "directfb >= 1.0.0") 2>&5
   1.986 +  ac_status=$?
   1.987 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   1.988 +  test $ac_status = 0; }; then
   1.989 +  pkg_cv_DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags "directfb >= 1.0.0" 2>/dev/null`
   1.990 +else
   1.991 +  pkg_failed=yes
   1.992 +fi
   1.993 + else
   1.994 +    pkg_failed=untried
   1.995 +fi
   1.996 +if test -n "$DIRECTFB_LIBS"; then
   1.997 +    pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS"
   1.998 + elif test -n "$PKG_CONFIG"; then
   1.999 +    if test -n "$PKG_CONFIG" && \
  1.1000 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 1.0.0\""; } >&5
  1.1001 +  ($PKG_CONFIG --exists --print-errors "directfb >= 1.0.0") 2>&5
  1.1002 +  ac_status=$?
  1.1003 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1004 +  test $ac_status = 0; }; then
  1.1005 +  pkg_cv_DIRECTFB_LIBS=`$PKG_CONFIG --libs "directfb >= 1.0.0" 2>/dev/null`
  1.1006 +else
  1.1007 +  pkg_failed=yes
  1.1008 +fi
  1.1009 + else
  1.1010 +    pkg_failed=untried
  1.1011 +fi
  1.1012 +
  1.1013 +
  1.1014 +
  1.1015 +if test $pkg_failed = yes; then
  1.1016 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1017 +$as_echo "no" >&6; }
  1.1018 +
  1.1019 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.1020 +        _pkg_short_errors_supported=yes
  1.1021 +else
  1.1022 +        _pkg_short_errors_supported=no
  1.1023 +fi
  1.1024 +        if test $_pkg_short_errors_supported = yes; then
  1.1025 +	        DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "directfb >= 1.0.0" 2>&1`
  1.1026          else
  1.1027 -            set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'`
  1.1028 -            NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
  1.1029 -            set -- `$DIRECTFBCONFIG --version | sed 's/\./ /g'`
  1.1030 -            HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
  1.1031 -            if test $HAVE_VERSION -ge $NEED_VERSION; then
  1.1032 -                DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags`
  1.1033 -                DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs`
  1.1034 -                DIRECTFB_PREFIX=`$DIRECTFBCONFIG --prefix`
  1.1035 -                video_directfb=yes
  1.1036 -            fi
  1.1037 -        fi
  1.1038 +	        DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --print-errors "directfb >= 1.0.0" 2>&1`
  1.1039 +        fi
  1.1040 +	# Put the nasty error message in config.log where it belongs
  1.1041 +	echo "$DIRECTFB_PKG_ERRORS" >&5
  1.1042 +
  1.1043 +	video_directfb=no
  1.1044 +elif test $pkg_failed = untried; then
  1.1045 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1046 +$as_echo "no" >&6; }
  1.1047 +	video_directfb=no
  1.1048 +else
  1.1049 +	DIRECTFB_CFLAGS=$pkg_cv_DIRECTFB_CFLAGS
  1.1050 +	DIRECTFB_LIBS=$pkg_cv_DIRECTFB_LIBS
  1.1051 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.1052 +$as_echo "yes" >&6; }
  1.1053 +	video_directfb=yes
  1.1054 +fi
  1.1055 +
  1.1056          if test x$video_directfb = xyes; then
  1.1057              # SuSE 11.1 installs directfb-config without directfb-devel
  1.1058              save_CPPFLAGS="$CPPFLAGS"
  1.1059 @@ -21453,10 +21640,6 @@
  1.1060              CPPFLAGS="$save_CPPFLAGS"
  1.1061              video_directfb=$have_directfb_hdr
  1.1062          fi
  1.1063 -        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectFB $DIRECTFB_REQUIRED_VERSION support" >&5
  1.1064 -$as_echo_n "checking for DirectFB $DIRECTFB_REQUIRED_VERSION support... " >&6; }
  1.1065 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_directfb" >&5
  1.1066 -$as_echo "$video_directfb" >&6; }
  1.1067  
  1.1068          if test x$video_directfb = xyes; then
  1.1069              # Check whether --enable-directfb-shared was given.
  1.1070 @@ -21522,82 +21705,152 @@
  1.1071  
  1.1072      if test x$enable_video = xyes -a x$enable_video_kmsdrm = xyes; then
  1.1073          video_kmsdrm=no
  1.1074 -        libdrm_avail=no
  1.1075 -        libgbm_avail=no
  1.1076 -
  1.1077 -        LIBDRM_REQUIRED_VERSION=2.4.46
  1.1078 -        LIBGBM_REQUIRED_VERSION=9.0.0
  1.1079 -
  1.1080 -        # Extract the first word of "pkg-config", so it can be a program name with args.
  1.1081 -set dummy pkg-config; ac_word=$2
  1.1082 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  1.1083 -$as_echo_n "checking for $ac_word... " >&6; }
  1.1084 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
  1.1085 -  $as_echo_n "(cached) " >&6
  1.1086 -else
  1.1087 -  case $PKG_CONFIG in
  1.1088 -  [\\/]* | ?:[\\/]*)
  1.1089 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  1.1090 -  ;;
  1.1091 -  *)
  1.1092 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  1.1093 -for as_dir in $PATH
  1.1094 -do
  1.1095 -  IFS=$as_save_IFS
  1.1096 -  test -z "$as_dir" && as_dir=.
  1.1097 -    for ac_exec_ext in '' $ac_executable_extensions; do
  1.1098 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  1.1099 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  1.1100 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  1.1101 -    break 2
  1.1102 -  fi
  1.1103 -done
  1.1104 -  done
  1.1105 -IFS=$as_save_IFS
  1.1106 -
  1.1107 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  1.1108 -  ;;
  1.1109 -esac
  1.1110 -fi
  1.1111 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  1.1112 -if test -n "$PKG_CONFIG"; then
  1.1113 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
  1.1114 -$as_echo "$PKG_CONFIG" >&6; }
  1.1115 -else
  1.1116 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1117 -$as_echo "no" >&6; }
  1.1118 -fi
  1.1119 -
  1.1120 -
  1.1121 -        if test x$PKG_CONFIG != xno; then
  1.1122 -            if $PKG_CONFIG --atleast-pkgconfig-version 0.7; then
  1.1123 -                if $PKG_CONFIG --atleast-version $LIBDRM_REQUIRED_VERSION libdrm; then
  1.1124 -                    LIBDRM_CFLAGS=`$PKG_CONFIG --cflags libdrm`
  1.1125 -                    LIBDRM_LIBS=`$PKG_CONFIG --libs libdrm`
  1.1126 -                    LIBDRM_PREFIX=`$PKG_CONFIG --variable=prefix libdrm`
  1.1127 -                    libdrm_avail=yes
  1.1128 -                fi
  1.1129 -                if $PKG_CONFIG --atleast-version $LIBGBM_REQUIRED_VERSION gbm; then
  1.1130 -                    LIBGBM_CFLAGS=`$PKG_CONFIG --cflags gbm`
  1.1131 -                    LIBGBM_LIBS=`$PKG_CONFIG --libs gbm`
  1.1132 -                    LIBGBM_PREFIX=`$PKG_CONFIG --variable=prefix gbm`
  1.1133 -                    libgbm_avail=yes
  1.1134 -                fi
  1.1135 -                if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
  1.1136 -                    video_kmsdrm=yes
  1.1137 -                fi
  1.1138 -
  1.1139 -                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdrm $LIBDRM_REQUIRED_VERSION library for kmsdrm support" >&5
  1.1140 -$as_echo_n "checking for libdrm $LIBDRM_REQUIRED_VERSION library for kmsdrm support... " >&6; }
  1.1141 -                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libdrm_avail" >&5
  1.1142 -$as_echo "$libdrm_avail" >&6; }
  1.1143 -                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgbm $LIBGBM_REQUIRED_VERSION library for kmsdrm support" >&5
  1.1144 -$as_echo_n "checking for libgbm $LIBGBM_REQUIRED_VERSION library for kmsdrm support... " >&6; }
  1.1145 -                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgbm_avail" >&5
  1.1146 -$as_echo "$libgbm_avail" >&6; }
  1.1147 -
  1.1148 -                if test x$video_kmsdrm = xyes; then
  1.1149 -                    # Check whether --enable-kmsdrm-shared was given.
  1.1150 +
  1.1151 +
  1.1152 +pkg_failed=no
  1.1153 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5
  1.1154 +$as_echo_n "checking for LIBDRM... " >&6; }
  1.1155 +
  1.1156 +if test -n "$LIBDRM_CFLAGS"; then
  1.1157 +    pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS"
  1.1158 + elif test -n "$PKG_CONFIG"; then
  1.1159 +    if test -n "$PKG_CONFIG" && \
  1.1160 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.46\""; } >&5
  1.1161 +  ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5
  1.1162 +  ac_status=$?
  1.1163 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1164 +  test $ac_status = 0; }; then
  1.1165 +  pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.4.46" 2>/dev/null`
  1.1166 +else
  1.1167 +  pkg_failed=yes
  1.1168 +fi
  1.1169 + else
  1.1170 +    pkg_failed=untried
  1.1171 +fi
  1.1172 +if test -n "$LIBDRM_LIBS"; then
  1.1173 +    pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS"
  1.1174 + elif test -n "$PKG_CONFIG"; then
  1.1175 +    if test -n "$PKG_CONFIG" && \
  1.1176 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.46\""; } >&5
  1.1177 +  ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5
  1.1178 +  ac_status=$?
  1.1179 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1180 +  test $ac_status = 0; }; then
  1.1181 +  pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.4.46" 2>/dev/null`
  1.1182 +else
  1.1183 +  pkg_failed=yes
  1.1184 +fi
  1.1185 + else
  1.1186 +    pkg_failed=untried
  1.1187 +fi
  1.1188 +
  1.1189 +
  1.1190 +
  1.1191 +if test $pkg_failed = yes; then
  1.1192 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1193 +$as_echo "no" >&6; }
  1.1194 +
  1.1195 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.1196 +        _pkg_short_errors_supported=yes
  1.1197 +else
  1.1198 +        _pkg_short_errors_supported=no
  1.1199 +fi
  1.1200 +        if test $_pkg_short_errors_supported = yes; then
  1.1201 +	        LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm >= 2.4.46" 2>&1`
  1.1202 +        else
  1.1203 +	        LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm >= 2.4.46" 2>&1`
  1.1204 +        fi
  1.1205 +	# Put the nasty error message in config.log where it belongs
  1.1206 +	echo "$LIBDRM_PKG_ERRORS" >&5
  1.1207 +
  1.1208 +	libdrm_avail=no
  1.1209 +elif test $pkg_failed = untried; then
  1.1210 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1211 +$as_echo "no" >&6; }
  1.1212 +	libdrm_avail=no
  1.1213 +else
  1.1214 +	LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS
  1.1215 +	LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS
  1.1216 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.1217 +$as_echo "yes" >&6; }
  1.1218 +	libdrm_avail=yes
  1.1219 +fi
  1.1220 +
  1.1221 +pkg_failed=no
  1.1222 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGBM" >&5
  1.1223 +$as_echo_n "checking for LIBGBM... " >&6; }
  1.1224 +
  1.1225 +if test -n "$LIBGBM_CFLAGS"; then
  1.1226 +    pkg_cv_LIBGBM_CFLAGS="$LIBGBM_CFLAGS"
  1.1227 + elif test -n "$PKG_CONFIG"; then
  1.1228 +    if test -n "$PKG_CONFIG" && \
  1.1229 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gbm >= 9.0.0\""; } >&5
  1.1230 +  ($PKG_CONFIG --exists --print-errors "gbm >= 9.0.0") 2>&5
  1.1231 +  ac_status=$?
  1.1232 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1233 +  test $ac_status = 0; }; then
  1.1234 +  pkg_cv_LIBGBM_CFLAGS=`$PKG_CONFIG --cflags "gbm >= 9.0.0" 2>/dev/null`
  1.1235 +else
  1.1236 +  pkg_failed=yes
  1.1237 +fi
  1.1238 + else
  1.1239 +    pkg_failed=untried
  1.1240 +fi
  1.1241 +if test -n "$LIBGBM_LIBS"; then
  1.1242 +    pkg_cv_LIBGBM_LIBS="$LIBGBM_LIBS"
  1.1243 + elif test -n "$PKG_CONFIG"; then
  1.1244 +    if test -n "$PKG_CONFIG" && \
  1.1245 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gbm >= 9.0.0\""; } >&5
  1.1246 +  ($PKG_CONFIG --exists --print-errors "gbm >= 9.0.0") 2>&5
  1.1247 +  ac_status=$?
  1.1248 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1249 +  test $ac_status = 0; }; then
  1.1250 +  pkg_cv_LIBGBM_LIBS=`$PKG_CONFIG --libs "gbm >= 9.0.0" 2>/dev/null`
  1.1251 +else
  1.1252 +  pkg_failed=yes
  1.1253 +fi
  1.1254 + else
  1.1255 +    pkg_failed=untried
  1.1256 +fi
  1.1257 +
  1.1258 +
  1.1259 +
  1.1260 +if test $pkg_failed = yes; then
  1.1261 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1262 +$as_echo "no" >&6; }
  1.1263 +
  1.1264 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.1265 +        _pkg_short_errors_supported=yes
  1.1266 +else
  1.1267 +        _pkg_short_errors_supported=no
  1.1268 +fi
  1.1269 +        if test $_pkg_short_errors_supported = yes; then
  1.1270 +	        LIBGBM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gbm >= 9.0.0" 2>&1`
  1.1271 +        else
  1.1272 +	        LIBGBM_PKG_ERRORS=`$PKG_CONFIG --print-errors "gbm >= 9.0.0" 2>&1`
  1.1273 +        fi
  1.1274 +	# Put the nasty error message in config.log where it belongs
  1.1275 +	echo "$LIBGBM_PKG_ERRORS" >&5
  1.1276 +
  1.1277 +	libgbm_avail=no
  1.1278 +elif test $pkg_failed = untried; then
  1.1279 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1280 +$as_echo "no" >&6; }
  1.1281 +	libgbm_avail=no
  1.1282 +else
  1.1283 +	LIBGBM_CFLAGS=$pkg_cv_LIBGBM_CFLAGS
  1.1284 +	LIBGBM_LIBS=$pkg_cv_LIBGBM_LIBS
  1.1285 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.1286 +$as_echo "yes" >&6; }
  1.1287 +	libgbm_avail=yes
  1.1288 +fi
  1.1289 +
  1.1290 +        if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
  1.1291 +            video_kmsdrm=yes
  1.1292 +        fi
  1.1293 +
  1.1294 +        if test x$video_kmsdrm = xyes; then
  1.1295 +            # Check whether --enable-kmsdrm-shared was given.
  1.1296  if test "${enable_kmsdrm_shared+set}" = set; then :
  1.1297    enableval=$enable_kmsdrm_shared;
  1.1298  else
  1.1299 @@ -21608,22 +21861,22 @@
  1.1300  
  1.1301  $as_echo "#define SDL_VIDEO_DRIVER_KMSDRM 1" >>confdefs.h
  1.1302  
  1.1303 -                    SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
  1.1304 -                    EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
  1.1305 -
  1.1306 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kmsdrm dynamic loading support" >&5
  1.1307 +            SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
  1.1308 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
  1.1309 +
  1.1310 +            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kmsdrm dynamic loading support" >&5
  1.1311  $as_echo_n "checking for kmsdrm dynamic loading support... " >&6; }
  1.1312 -                    kmsdrm_shared=no
  1.1313 -                    drm_lib=`find_lib "libdrm.so.*" "$DRM_LIBS"`
  1.1314 -                    gbm_lib=`find_lib "libgbm.so.*" "$DRM_LIBS"`
  1.1315 -                    if test x$have_loadso != xyes && \
  1.1316 -                       test x$enable_kmsdrm_shared = xyes; then
  1.1317 -                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&5
  1.1318 +            kmsdrm_shared=no
  1.1319 +            drm_lib=`find_lib "libdrm.so.*" "$DRM_LIBS"`
  1.1320 +            gbm_lib=`find_lib "libgbm.so.*" "$DRM_LIBS"`
  1.1321 +            if test x$have_loadso != xyes && \
  1.1322 +               test x$enable_kmsdrm_shared = xyes; then
  1.1323 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&5
  1.1324  $as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&2;}
  1.1325 -                    fi
  1.1326 -                    if test x$have_loadso = xyes && \
  1.1327 -                       test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
  1.1328 -                        kmsdrm_shared=yes
  1.1329 +            fi
  1.1330 +            if test x$have_loadso = xyes && \
  1.1331 +               test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
  1.1332 +                kmsdrm_shared=yes
  1.1333  
  1.1334  cat >>confdefs.h <<_ACEOF
  1.1335  #define SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC "$drm_lib"
  1.1336 @@ -21639,16 +21892,14 @@
  1.1337  #define HAVE_KMSDRM_SHARED "TRUE"
  1.1338  _ACEOF
  1.1339  
  1.1340 -                        SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
  1.1341 -                    else
  1.1342 -                        EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
  1.1343 -                        SUMMARY_video="${SUMMARY_video} kmsdrm"
  1.1344 -                    fi
  1.1345 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kmsdrm_shared" >&5
  1.1346 +                SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
  1.1347 +            else
  1.1348 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
  1.1349 +                SUMMARY_video="${SUMMARY_video} kmsdrm"
  1.1350 +            fi
  1.1351 +            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kmsdrm_shared" >&5
  1.1352  $as_echo "$kmsdrm_shared" >&6; }
  1.1353 -                    have_video=yes
  1.1354 -                fi
  1.1355 -            fi
  1.1356 +            have_video=yes
  1.1357          fi
  1.1358      fi
  1.1359  }
  1.1360 @@ -22322,52 +22573,98 @@
  1.1361  fi
  1.1362  
  1.1363      if test x$enable_dbus = xyes; then
  1.1364 -        # Extract the first word of "pkg-config", so it can be a program name with args.
  1.1365 -set dummy pkg-config; ac_word=$2
  1.1366 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  1.1367 -$as_echo_n "checking for $ac_word... " >&6; }
  1.1368 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
  1.1369 -  $as_echo_n "(cached) " >&6
  1.1370 -else
  1.1371 -  case $PKG_CONFIG in
  1.1372 -  [\\/]* | ?:[\\/]*)
  1.1373 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  1.1374 -  ;;
  1.1375 -  *)
  1.1376 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  1.1377 -for as_dir in $PATH
  1.1378 -do
  1.1379 -  IFS=$as_save_IFS
  1.1380 -  test -z "$as_dir" && as_dir=.
  1.1381 -    for ac_exec_ext in '' $ac_executable_extensions; do
  1.1382 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  1.1383 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  1.1384 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  1.1385 -    break 2
  1.1386 -  fi
  1.1387 -done
  1.1388 -  done
  1.1389 -IFS=$as_save_IFS
  1.1390 -
  1.1391 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  1.1392 -  ;;
  1.1393 -esac
  1.1394 -fi
  1.1395 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  1.1396 -if test -n "$PKG_CONFIG"; then
  1.1397 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
  1.1398 -$as_echo "$PKG_CONFIG" >&6; }
  1.1399 -else
  1.1400 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1401 -$as_echo "no" >&6; }
  1.1402 -fi
  1.1403 -
  1.1404 -
  1.1405 -        if test x$PKG_CONFIG != xno; then
  1.1406 -            DBUS_CFLAGS=`$PKG_CONFIG --cflags dbus-1`
  1.1407 -            save_CFLAGS="$CFLAGS"
  1.1408 -            CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
  1.1409 -            ac_fn_c_check_header_mongrel "$LINENO" "dbus/dbus.h" "ac_cv_header_dbus_dbus_h" "$ac_includes_default"
  1.1410 +
  1.1411 +pkg_failed=no
  1.1412 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
  1.1413 +$as_echo_n "checking for DBUS... " >&6; }
  1.1414 +
  1.1415 +if test -n "$DBUS_CFLAGS"; then
  1.1416 +    pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
  1.1417 + elif test -n "$PKG_CONFIG"; then
  1.1418 +    if test -n "$PKG_CONFIG" && \
  1.1419 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
  1.1420 +  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
  1.1421 +  ac_status=$?
  1.1422 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1423 +  test $ac_status = 0; }; then
  1.1424 +  pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null`
  1.1425 +else
  1.1426 +  pkg_failed=yes
  1.1427 +fi
  1.1428 + else
  1.1429 +    pkg_failed=untried
  1.1430 +fi
  1.1431 +if test -n "$DBUS_LIBS"; then
  1.1432 +    pkg_cv_DBUS_LIBS="$DBUS_LIBS"
  1.1433 + elif test -n "$PKG_CONFIG"; then
  1.1434 +    if test -n "$PKG_CONFIG" && \
  1.1435 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
  1.1436 +  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
  1.1437 +  ac_status=$?
  1.1438 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1439 +  test $ac_status = 0; }; then
  1.1440 +  pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null`
  1.1441 +else
  1.1442 +  pkg_failed=yes
  1.1443 +fi
  1.1444 + else
  1.1445 +    pkg_failed=untried
  1.1446 +fi
  1.1447 +
  1.1448 +
  1.1449 +
  1.1450 +if test $pkg_failed = yes; then
  1.1451 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1452 +$as_echo "no" >&6; }
  1.1453 +
  1.1454 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.1455 +        _pkg_short_errors_supported=yes
  1.1456 +else
  1.1457 +        _pkg_short_errors_supported=no
  1.1458 +fi
  1.1459 +        if test $_pkg_short_errors_supported = yes; then
  1.1460 +	        DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1" 2>&1`
  1.1461 +        else
  1.1462 +	        DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1" 2>&1`
  1.1463 +        fi
  1.1464 +	# Put the nasty error message in config.log where it belongs
  1.1465 +	echo "$DBUS_PKG_ERRORS" >&5
  1.1466 +
  1.1467 +	as_fn_error $? "Package requirements (dbus-1) were not met:
  1.1468 +
  1.1469 +$DBUS_PKG_ERRORS
  1.1470 +
  1.1471 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
  1.1472 +installed software in a non-standard prefix.
  1.1473 +
  1.1474 +Alternatively, you may set the environment variables DBUS_CFLAGS
  1.1475 +and DBUS_LIBS to avoid the need to call pkg-config.
  1.1476 +See the pkg-config man page for more details." "$LINENO" 5
  1.1477 +elif test $pkg_failed = untried; then
  1.1478 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1479 +$as_echo "no" >&6; }
  1.1480 +	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  1.1481 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  1.1482 +as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
  1.1483 +is in your PATH or set the PKG_CONFIG environment variable to the full
  1.1484 +path to pkg-config.
  1.1485 +
  1.1486 +Alternatively, you may set the environment variables DBUS_CFLAGS
  1.1487 +and DBUS_LIBS to avoid the need to call pkg-config.
  1.1488 +See the pkg-config man page for more details.
  1.1489 +
  1.1490 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.
  1.1491 +See \`config.log' for more details" "$LINENO" 5; }
  1.1492 +else
  1.1493 +	DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
  1.1494 +	DBUS_LIBS=$pkg_cv_DBUS_LIBS
  1.1495 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.1496 +$as_echo "yes" >&6; }
  1.1497 +
  1.1498 +fi
  1.1499 +        save_CFLAGS="$CFLAGS"
  1.1500 +        CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
  1.1501 +        ac_fn_c_check_header_mongrel "$LINENO" "dbus/dbus.h" "ac_cv_header_dbus_dbus_h" "$ac_includes_default"
  1.1502  if test "x$ac_cv_header_dbus_dbus_h" = xyes; then :
  1.1503    have_dbus_dbus_h_hdr=yes
  1.1504  else
  1.1505 @@ -22375,14 +22672,13 @@
  1.1506  fi
  1.1507  
  1.1508  
  1.1509 -            CFLAGS="$save_CFLAGS"
  1.1510 -            if test x$have_dbus_dbus_h_hdr = xyes; then
  1.1511 +        CFLAGS="$save_CFLAGS"
  1.1512 +        if test x$have_dbus_dbus_h_hdr = xyes; then
  1.1513  
  1.1514  $as_echo "#define HAVE_DBUS_DBUS_H 1" >>confdefs.h
  1.1515  
  1.1516 -                EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
  1.1517 -                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
  1.1518 -            fi
  1.1519 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
  1.1520 +            SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
  1.1521          fi
  1.1522      fi
  1.1523  }
  1.1524 @@ -22414,52 +22710,98 @@
  1.1525  fi
  1.1526  
  1.1527      if test x$enable_ibus = xyes; then
  1.1528 -        # Extract the first word of "pkg-config", so it can be a program name with args.
  1.1529 -set dummy pkg-config; ac_word=$2
  1.1530 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  1.1531 -$as_echo_n "checking for $ac_word... " >&6; }
  1.1532 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
  1.1533 -  $as_echo_n "(cached) " >&6
  1.1534 -else
  1.1535 -  case $PKG_CONFIG in
  1.1536 -  [\\/]* | ?:[\\/]*)
  1.1537 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  1.1538 -  ;;
  1.1539 -  *)
  1.1540 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  1.1541 -for as_dir in $PATH
  1.1542 -do
  1.1543 -  IFS=$as_save_IFS
  1.1544 -  test -z "$as_dir" && as_dir=.
  1.1545 -    for ac_exec_ext in '' $ac_executable_extensions; do
  1.1546 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  1.1547 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  1.1548 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  1.1549 -    break 2
  1.1550 -  fi
  1.1551 -done
  1.1552 -  done
  1.1553 -IFS=$as_save_IFS
  1.1554 -
  1.1555 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  1.1556 -  ;;
  1.1557 -esac
  1.1558 -fi
  1.1559 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  1.1560 -if test -n "$PKG_CONFIG"; then
  1.1561 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
  1.1562 -$as_echo "$PKG_CONFIG" >&6; }
  1.1563 -else
  1.1564 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1565 -$as_echo "no" >&6; }
  1.1566 -fi
  1.1567 -
  1.1568 -
  1.1569 -        if test x$PKG_CONFIG != xno; then
  1.1570 -            IBUS_CFLAGS=`$PKG_CONFIG --cflags ibus-1.0`
  1.1571 -            save_CFLAGS="$CFLAGS"
  1.1572 -            CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
  1.1573 -            ac_fn_c_check_header_mongrel "$LINENO" "ibus-1.0/ibus.h" "ac_cv_header_ibus_1_0_ibus_h" "$ac_includes_default"
  1.1574 +
  1.1575 +pkg_failed=no
  1.1576 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IBUS" >&5
  1.1577 +$as_echo_n "checking for IBUS... " >&6; }
  1.1578 +
  1.1579 +if test -n "$IBUS_CFLAGS"; then
  1.1580 +    pkg_cv_IBUS_CFLAGS="$IBUS_CFLAGS"
  1.1581 + elif test -n "$PKG_CONFIG"; then
  1.1582 +    if test -n "$PKG_CONFIG" && \
  1.1583 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ibus-1.0\""; } >&5
  1.1584 +  ($PKG_CONFIG --exists --print-errors "ibus-1.0") 2>&5
  1.1585 +  ac_status=$?
  1.1586 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1587 +  test $ac_status = 0; }; then
  1.1588 +  pkg_cv_IBUS_CFLAGS=`$PKG_CONFIG --cflags "ibus-1.0" 2>/dev/null`
  1.1589 +else
  1.1590 +  pkg_failed=yes
  1.1591 +fi
  1.1592 + else
  1.1593 +    pkg_failed=untried
  1.1594 +fi
  1.1595 +if test -n "$IBUS_LIBS"; then
  1.1596 +    pkg_cv_IBUS_LIBS="$IBUS_LIBS"
  1.1597 + elif test -n "$PKG_CONFIG"; then
  1.1598 +    if test -n "$PKG_CONFIG" && \
  1.1599 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ibus-1.0\""; } >&5
  1.1600 +  ($PKG_CONFIG --exists --print-errors "ibus-1.0") 2>&5
  1.1601 +  ac_status=$?
  1.1602 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1603 +  test $ac_status = 0; }; then
  1.1604 +  pkg_cv_IBUS_LIBS=`$PKG_CONFIG --libs "ibus-1.0" 2>/dev/null`
  1.1605 +else
  1.1606 +  pkg_failed=yes
  1.1607 +fi
  1.1608 + else
  1.1609 +    pkg_failed=untried
  1.1610 +fi
  1.1611 +
  1.1612 +
  1.1613 +
  1.1614 +if test $pkg_failed = yes; then
  1.1615 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1616 +$as_echo "no" >&6; }
  1.1617 +
  1.1618 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.1619 +        _pkg_short_errors_supported=yes
  1.1620 +else
  1.1621 +        _pkg_short_errors_supported=no
  1.1622 +fi
  1.1623 +        if test $_pkg_short_errors_supported = yes; then
  1.1624 +	        IBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ibus-1.0" 2>&1`
  1.1625 +        else
  1.1626 +	        IBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "ibus-1.0" 2>&1`
  1.1627 +        fi
  1.1628 +	# Put the nasty error message in config.log where it belongs
  1.1629 +	echo "$IBUS_PKG_ERRORS" >&5
  1.1630 +
  1.1631 +	as_fn_error $? "Package requirements (ibus-1.0) were not met:
  1.1632 +
  1.1633 +$IBUS_PKG_ERRORS
  1.1634 +
  1.1635 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
  1.1636 +installed software in a non-standard prefix.
  1.1637 +
  1.1638 +Alternatively, you may set the environment variables IBUS_CFLAGS
  1.1639 +and IBUS_LIBS to avoid the need to call pkg-config.
  1.1640 +See the pkg-config man page for more details." "$LINENO" 5
  1.1641 +elif test $pkg_failed = untried; then
  1.1642 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1643 +$as_echo "no" >&6; }
  1.1644 +	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  1.1645 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  1.1646 +as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
  1.1647 +is in your PATH or set the PKG_CONFIG environment variable to the full
  1.1648 +path to pkg-config.
  1.1649 +
  1.1650 +Alternatively, you may set the environment variables IBUS_CFLAGS
  1.1651 +and IBUS_LIBS to avoid the need to call pkg-config.
  1.1652 +See the pkg-config man page for more details.
  1.1653 +
  1.1654 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.
  1.1655 +See \`config.log' for more details" "$LINENO" 5; }
  1.1656 +else
  1.1657 +	IBUS_CFLAGS=$pkg_cv_IBUS_CFLAGS
  1.1658 +	IBUS_LIBS=$pkg_cv_IBUS_LIBS
  1.1659 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.1660 +$as_echo "yes" >&6; }
  1.1661 +
  1.1662 +fi
  1.1663 +        save_CFLAGS="$CFLAGS"
  1.1664 +        CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
  1.1665 +        ac_fn_c_check_header_mongrel "$LINENO" "ibus-1.0/ibus.h" "ac_cv_header_ibus_1_0_ibus_h" "$ac_includes_default"
  1.1666  if test "x$ac_cv_header_ibus_1_0_ibus_h" = xyes; then :
  1.1667    have_ibus_ibus_h_hdr=yes
  1.1668  else
  1.1669 @@ -22467,7 +22809,7 @@
  1.1670  fi
  1.1671  
  1.1672  
  1.1673 -            ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
  1.1674 +        ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
  1.1675  if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
  1.1676    have_inotify_inotify_h_hdr=yes
  1.1677  else
  1.1678 @@ -22475,27 +22817,26 @@
  1.1679  fi
  1.1680  
  1.1681  
  1.1682 -            CFLAGS="$save_CFLAGS"
  1.1683 -            if test x$have_ibus_ibus_h_hdr = xyes; then
  1.1684 -                if test x$enable_ime != xyes; then
  1.1685 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for IBus." >&5
  1.1686 +        CFLAGS="$save_CFLAGS"
  1.1687 +        if test x$have_ibus_ibus_h_hdr = xyes; then
  1.1688 +            if test x$enable_ime != xyes; then
  1.1689 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for IBus." >&5
  1.1690  $as_echo "$as_me: WARNING: IME support is required for IBus." >&2;}
  1.1691 -                    have_ibus_ibus_h_hdr=no
  1.1692 -                elif test x$enable_dbus != xyes; then
  1.1693 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for IBus." >&5
  1.1694 +                have_ibus_ibus_h_hdr=no
  1.1695 +            elif test x$enable_dbus != xyes; then
  1.1696 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for IBus." >&5
  1.1697  $as_echo "$as_me: WARNING: DBus support is required for IBus." >&2;}
  1.1698 -                    have_ibus_ibus_h_hdr=no
  1.1699 -                elif test x$have_inotify_inotify_h_hdr != xyes; then
  1.1700 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: INotify support is required for IBus." >&5
  1.1701 +                have_ibus_ibus_h_hdr=no
  1.1702 +            elif test x$have_inotify_inotify_h_hdr != xyes; then
  1.1703 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: INotify support is required for IBus." >&5
  1.1704  $as_echo "$as_me: WARNING: INotify support is required for IBus." >&2;}
  1.1705 -                    have_ibus_ibus_h_hdr=no
  1.1706 -                else
  1.1707 +                have_ibus_ibus_h_hdr=no
  1.1708 +            else
  1.1709  
  1.1710  $as_echo "#define HAVE_IBUS_IBUS_H 1" >>confdefs.h
  1.1711  
  1.1712 -                    EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
  1.1713 -                    SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
  1.1714 -               fi
  1.1715 +                EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
  1.1716 +                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
  1.1717              fi
  1.1718          fi
  1.1719      fi
  1.1720 @@ -22511,51 +22852,97 @@
  1.1721  fi
  1.1722  
  1.1723      if test x$enable_fcitx = xyes; then
  1.1724 -        # Extract the first word of "pkg-config", so it can be a program name with args.
  1.1725 -set dummy pkg-config; ac_word=$2
  1.1726 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  1.1727 -$as_echo_n "checking for $ac_word... " >&6; }
  1.1728 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
  1.1729 -  $as_echo_n "(cached) " >&6
  1.1730 -else
  1.1731 -  case $PKG_CONFIG in
  1.1732 -  [\\/]* | ?:[\\/]*)
  1.1733 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  1.1734 -  ;;
  1.1735 -  *)
  1.1736 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  1.1737 -for as_dir in $PATH
  1.1738 -do
  1.1739 -  IFS=$as_save_IFS
  1.1740 -  test -z "$as_dir" && as_dir=.
  1.1741 -    for ac_exec_ext in '' $ac_executable_extensions; do
  1.1742 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  1.1743 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  1.1744 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  1.1745 -    break 2
  1.1746 -  fi
  1.1747 -done
  1.1748 -  done
  1.1749 -IFS=$as_save_IFS
  1.1750 -
  1.1751 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  1.1752 -  ;;
  1.1753 -esac
  1.1754 -fi
  1.1755 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  1.1756 -if test -n "$PKG_CONFIG"; then
  1.1757 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
  1.1758 -$as_echo "$PKG_CONFIG" >&6; }
  1.1759 -else
  1.1760 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1761 -$as_echo "no" >&6; }
  1.1762 -fi
  1.1763 -
  1.1764 -
  1.1765 -        if test x$PKG_CONFIG != xno; then
  1.1766 -            FCITX_CFLAGS=`$PKG_CONFIG --cflags fcitx`
  1.1767 -            CFLAGS="$CFLAGS $FCITX_CFLAGS"
  1.1768 -            ac_fn_c_check_header_mongrel "$LINENO" "fcitx/frontend.h" "ac_cv_header_fcitx_frontend_h" "$ac_includes_default"
  1.1769 +
  1.1770 +pkg_failed=no
  1.1771 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FCITX" >&5
  1.1772 +$as_echo_n "checking for FCITX... " >&6; }
  1.1773 +
  1.1774 +if test -n "$FCITX_CFLAGS"; then
  1.1775 +    pkg_cv_FCITX_CFLAGS="$FCITX_CFLAGS"
  1.1776 + elif test -n "$PKG_CONFIG"; then
  1.1777 +    if test -n "$PKG_CONFIG" && \
  1.1778 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fcitx\""; } >&5
  1.1779 +  ($PKG_CONFIG --exists --print-errors "fcitx") 2>&5
  1.1780 +  ac_status=$?
  1.1781 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1782 +  test $ac_status = 0; }; then
  1.1783 +  pkg_cv_FCITX_CFLAGS=`$PKG_CONFIG --cflags "fcitx" 2>/dev/null`
  1.1784 +else
  1.1785 +  pkg_failed=yes
  1.1786 +fi
  1.1787 + else
  1.1788 +    pkg_failed=untried
  1.1789 +fi
  1.1790 +if test -n "$FCITX_LIBS"; then
  1.1791 +    pkg_cv_FCITX_LIBS="$FCITX_LIBS"
  1.1792 + elif test -n "$PKG_CONFIG"; then
  1.1793 +    if test -n "$PKG_CONFIG" && \
  1.1794 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fcitx\""; } >&5
  1.1795 +  ($PKG_CONFIG --exists --print-errors "fcitx") 2>&5
  1.1796 +  ac_status=$?
  1.1797 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1798 +  test $ac_status = 0; }; then
  1.1799 +  pkg_cv_FCITX_LIBS=`$PKG_CONFIG --libs "fcitx" 2>/dev/null`
  1.1800 +else
  1.1801 +  pkg_failed=yes
  1.1802 +fi
  1.1803 + else
  1.1804 +    pkg_failed=untried
  1.1805 +fi
  1.1806 +
  1.1807 +
  1.1808 +
  1.1809 +if test $pkg_failed = yes; then
  1.1810 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1811 +$as_echo "no" >&6; }
  1.1812 +
  1.1813 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.1814 +        _pkg_short_errors_supported=yes
  1.1815 +else
  1.1816 +        _pkg_short_errors_supported=no
  1.1817 +fi
  1.1818 +        if test $_pkg_short_errors_supported = yes; then
  1.1819 +	        FCITX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fcitx" 2>&1`
  1.1820 +        else
  1.1821 +	        FCITX_PKG_ERRORS=`$PKG_CONFIG --print-errors "fcitx" 2>&1`
  1.1822 +        fi
  1.1823 +	# Put the nasty error message in config.log where it belongs
  1.1824 +	echo "$FCITX_PKG_ERRORS" >&5
  1.1825 +
  1.1826 +	as_fn_error $? "Package requirements (fcitx) were not met:
  1.1827 +
  1.1828 +$FCITX_PKG_ERRORS
  1.1829 +
  1.1830 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
  1.1831 +installed software in a non-standard prefix.
  1.1832 +
  1.1833 +Alternatively, you may set the environment variables FCITX_CFLAGS
  1.1834 +and FCITX_LIBS to avoid the need to call pkg-config.
  1.1835 +See the pkg-config man page for more details." "$LINENO" 5
  1.1836 +elif test $pkg_failed = untried; then
  1.1837 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1838 +$as_echo "no" >&6; }
  1.1839 +	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  1.1840 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  1.1841 +as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
  1.1842 +is in your PATH or set the PKG_CONFIG environment variable to the full
  1.1843 +path to pkg-config.
  1.1844 +
  1.1845 +Alternatively, you may set the environment variables FCITX_CFLAGS
  1.1846 +and FCITX_LIBS to avoid the need to call pkg-config.
  1.1847 +See the pkg-config man page for more details.
  1.1848 +
  1.1849 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.
  1.1850 +See \`config.log' for more details" "$LINENO" 5; }
  1.1851 +else
  1.1852 +	FCITX_CFLAGS=$pkg_cv_FCITX_CFLAGS
  1.1853 +	FCITX_LIBS=$pkg_cv_FCITX_LIBS
  1.1854 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.1855 +$as_echo "yes" >&6; }
  1.1856 +
  1.1857 +fi
  1.1858 +        CFLAGS="$CFLAGS $FCITX_CFLAGS"
  1.1859 +        ac_fn_c_check_header_mongrel "$LINENO" "fcitx/frontend.h" "ac_cv_header_fcitx_frontend_h" "$ac_includes_default"
  1.1860  if test "x$ac_cv_header_fcitx_frontend_h" = xyes; then :
  1.1861    have_fcitx_frontend_h_hdr=yes
  1.1862  else
  1.1863 @@ -22563,23 +22950,22 @@
  1.1864  fi
  1.1865  
  1.1866  
  1.1867 -            CFLAGS="$save_CFLAGS"
  1.1868 -            if test x$have_fcitx_frontend_h_hdr = xyes; then
  1.1869 -                if test x$enable_ime != xyes; then
  1.1870 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for fcitx." >&5
  1.1871 +        CFLAGS="$save_CFLAGS"
  1.1872 +        if test x$have_fcitx_frontend_h_hdr = xyes; then
  1.1873 +            if test x$enable_ime != xyes; then
  1.1874 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for fcitx." >&5
  1.1875  $as_echo "$as_me: WARNING: IME support is required for fcitx." >&2;}
  1.1876 -                    have_fcitx_frontend_h_hdr=no
  1.1877 -                elif test x$enable_dbus != xyes; then
  1.1878 -                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for fcitx." >&5
  1.1879 +                have_fcitx_frontend_h_hdr=no
  1.1880 +            elif test x$enable_dbus != xyes; then
  1.1881 +                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for fcitx." >&5
  1.1882  $as_echo "$as_me: WARNING: DBus support is required for fcitx." >&2;}
  1.1883 -                    have_fcitx_frontend_h_hdr=no
  1.1884 -                else
  1.1885 +                have_fcitx_frontend_h_hdr=no
  1.1886 +            else
  1.1887  
  1.1888  $as_echo "#define HAVE_FCITX_FRONTEND_H 1" >>confdefs.h
  1.1889  
  1.1890 -                    EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
  1.1891 -                    SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
  1.1892 -               fi
  1.1893 +                EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
  1.1894 +                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
  1.1895              fi
  1.1896          fi
  1.1897      fi
  1.1898 @@ -23752,61 +24138,106 @@
  1.1899  fi
  1.1900  
  1.1901      if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
  1.1902 +
  1.1903 +pkg_failed=no
  1.1904 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUSB" >&5
  1.1905 +$as_echo_n "checking for LIBUSB... " >&6; }
  1.1906 +
  1.1907 +if test -n "$LIBUSB_CFLAGS"; then
  1.1908 +    pkg_cv_LIBUSB_CFLAGS="$LIBUSB_CFLAGS"
  1.1909 + elif test -n "$PKG_CONFIG"; then
  1.1910 +    if test -n "$PKG_CONFIG" && \
  1.1911 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
  1.1912 +  ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
  1.1913 +  ac_status=$?
  1.1914 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1915 +  test $ac_status = 0; }; then
  1.1916 +  pkg_cv_LIBUSB_CFLAGS=`$PKG_CONFIG --cflags "libusb-1.0" 2>/dev/null`
  1.1917 +else
  1.1918 +  pkg_failed=yes
  1.1919 +fi
  1.1920 + else
  1.1921 +    pkg_failed=untried
  1.1922 +fi
  1.1923 +if test -n "$LIBUSB_LIBS"; then
  1.1924 +    pkg_cv_LIBUSB_LIBS="$LIBUSB_LIBS"
  1.1925 + elif test -n "$PKG_CONFIG"; then
  1.1926 +    if test -n "$PKG_CONFIG" && \
  1.1927 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
  1.1928 +  ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
  1.1929 +  ac_status=$?
  1.1930 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.1931 +  test $ac_status = 0; }; then
  1.1932 +  pkg_cv_LIBUSB_LIBS=`$PKG_CONFIG --libs "libusb-1.0" 2>/dev/null`
  1.1933 +else
  1.1934 +  pkg_failed=yes
  1.1935 +fi
  1.1936 + else
  1.1937 +    pkg_failed=untried
  1.1938 +fi
  1.1939 +
  1.1940 +
  1.1941 +
  1.1942 +if test $pkg_failed = yes; then
  1.1943 +   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1944 +$as_echo "no" >&6; }
  1.1945 +
  1.1946 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.1947 +        _pkg_short_errors_supported=yes
  1.1948 +else
  1.1949 +        _pkg_short_errors_supported=no
  1.1950 +fi
  1.1951 +        if test $_pkg_short_errors_supported = yes; then
  1.1952 +	        LIBUSB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libusb-1.0" 2>&1`
  1.1953 +        else
  1.1954 +	        LIBUSB_PKG_ERRORS=`$PKG_CONFIG --print-errors "libusb-1.0" 2>&1`
  1.1955 +        fi
  1.1956 +	# Put the nasty error message in config.log where it belongs
  1.1957 +	echo "$LIBUSB_PKG_ERRORS" >&5
  1.1958 +
  1.1959 +	as_fn_error $? "Package requirements (libusb-1.0) were not met:
  1.1960 +
  1.1961 +$LIBUSB_PKG_ERRORS
  1.1962 +
  1.1963 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
  1.1964 +installed software in a non-standard prefix.
  1.1965 +
  1.1966 +Alternatively, you may set the environment variables LIBUSB_CFLAGS
  1.1967 +and LIBUSB_LIBS to avoid the need to call pkg-config.
  1.1968 +See the pkg-config man page for more details." "$LINENO" 5
  1.1969 +elif test $pkg_failed = untried; then
  1.1970 +     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.1971 +$as_echo "no" >&6; }
  1.1972 +	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  1.1973 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  1.1974 +as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
  1.1975 +is in your PATH or set the PKG_CONFIG environment variable to the full
  1.1976 +path to pkg-config.
  1.1977 +
  1.1978 +Alternatively, you may set the environment variables LIBUSB_CFLAGS
  1.1979 +and LIBUSB_LIBS to avoid the need to call pkg-config.
  1.1980 +See the pkg-config man page for more details.
  1.1981 +
  1.1982 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.
  1.1983 +See \`config.log' for more details" "$LINENO" 5; }
  1.1984 +else
  1.1985 +	LIBUSB_CFLAGS=$pkg_cv_LIBUSB_CFLAGS
  1.1986 +	LIBUSB_LIBS=$pkg_cv_LIBUSB_LIBS
  1.1987 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.1988 +$as_echo "yes" >&6; }
  1.1989 +
  1.1990 +fi
  1.1991          hidapi_support=no
  1.1992 -        # Extract the first word of "pkg-config", so it can be a program name with args.
  1.1993 -set dummy pkg-config; ac_word=$2
  1.1994 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  1.1995 -$as_echo_n "checking for $ac_word... " >&6; }
  1.1996 -if ${ac_cv_path_PKG_CONFIG+:} false; then :
  1.1997 -  $as_echo_n "(cached) " >&6
  1.1998 -else
  1.1999 -  case $PKG_CONFIG in
  1.2000 -  [\\/]* | ?:[\\/]*)
  1.2001 -  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  1.2002 -  ;;
  1.2003 -  *)
  1.2004 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  1.2005 -for as_dir in $PATH
  1.2006 -do
  1.2007 -  IFS=$as_save_IFS
  1.2008 -  test -z "$as_dir" && as_dir=.
  1.2009 -    for ac_exec_ext in '' $ac_executable_extensions; do
  1.2010 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  1.2011 -    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
  1.2012 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  1.2013 -    break 2
  1.2014 -  fi
  1.2015 -done
  1.2016 -  done
  1.2017 -IFS=$as_save_IFS
  1.2018 -
  1.2019 -  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  1.2020 -  ;;
  1.2021 -esac
  1.2022 -fi
  1.2023 -PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  1.2024 -if test -n "$PKG_CONFIG"; then
  1.2025 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
  1.2026 -$as_echo "$PKG_CONFIG" >&6; }
  1.2027 -else
  1.2028 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.2029 -$as_echo "no" >&6; }
  1.2030 -fi
  1.2031 -
  1.2032 -
  1.2033 -        if test x$PKG_CONFIG != xno; then
  1.2034 -            LIBUSB_CFLAGS=`$PKG_CONFIG --cflags libusb-1.0`
  1.2035 -            LIBUSB_LDFLAGS=`$PKG_CONFIG --libs libusb-1.0`
  1.2036 -            save_CFLAGS="$CFLAGS"
  1.2037 -            CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
  1.2038 -            ac_fn_c_check_header_mongrel "$LINENO" "libusb.h" "ac_cv_header_libusb_h" "$ac_includes_default"
  1.2039 +        save_CFLAGS="$CFLAGS"
  1.2040 +        CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
  1.2041 +        ac_fn_c_check_header_mongrel "$LINENO" "libusb.h" "ac_cv_header_libusb_h" "$ac_includes_default"
  1.2042  if test "x$ac_cv_header_libusb_h" = xyes; then :
  1.2043    have_libusb_h=yes
  1.2044  fi
  1.2045  
  1.2046  
  1.2047 -            CFLAGS="$save_CFLAGS"
  1.2048 -        fi
  1.2049 +        CFLAGS="$save_CFLAGS"
  1.2050 +
  1.2051          if test x$have_libusb_h = xyes; then
  1.2052              hidapi_support=yes
  1.2053  
  1.2054 @@ -23816,7 +24247,7 @@
  1.2055              SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
  1.2056              SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
  1.2057              EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
  1.2058 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LDFLAGS"
  1.2059 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
  1.2060          fi
  1.2061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hidapi support" >&5
  1.2062  $as_echo_n "checking for hidapi support... " >&6; }