1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 09:02:38 +00:00

configure: improve wayland check

This commit is contained in:
Alexander Preisinger 2013-09-03 19:31:10 +02:00
parent d57e1aa599
commit 13f3b55881

18
configure vendored
View File

@ -1702,30 +1702,24 @@ depends_on_application_services(){
fi #if darwin fi #if darwin
_wlver="1.2.90"
echocheck "Wayland" echocheck "Wayland"
if test "$_wayland" != no; then if test "$_wayland" = yes || test "$_wayland" = auto; then
cat > $TMPC << EOF
#include <wayland-client.h>
int main(int argc, char *argv[]) {
WL_SHM_FORMAT_C8;
return 0;
}
EOF
_wayland="no" _wayland="no"
pkg_config_add "wayland-client >= 1.2.0 wayland-cursor >= 1.2.0 xkbcommon >= 0.3.0" \ pkg_config_add "wayland-client >= $_wlver wayland-cursor >= $_wlver xkbcommon >= 0.3.0" \
&& cc_check -lwayland-client && _wayland="yes" && _wayland="yes"
fi fi
if test "$_wayland" = yes; then if test "$_wayland" = yes; then
res_comment="" res_comment=""
def_wayland='#define CONFIG_WAYLAND' def_wayland='#define CONFIG_WAYLAND'
vomodules="wayland $vomodules" vomodules="wayland $vomodules"
else else
res_comment="version >= $_wlver"
def_wayland='#undef CONFIG_WAYLAND' def_wayland='#undef CONFIG_WAYLAND'
res_comment=""
novomodules="wayland $novomodules" novomodules="wayland $novomodules"
fi fi
echores "$_wayland" echores "$_wayland"
unset _wlver
echocheck "X11 headers presence" echocheck "X11 headers presence"
_x11_headers="no" _x11_headers="no"