Commit d64ea8e4 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winewayland.drv: Enumerate Xkb layouts and create matching HKL.

parent e8c96e2e
......@@ -702,6 +702,8 @@ INOTIFY_LIBS
INOTIFY_CFLAGS
PCSCLITE_LIBS
PCAP_LIBS
XKBREGISTRY_LIBS
XKBREGISTRY_CFLAGS
XKBCOMMON_LIBS
XKBCOMMON_CFLAGS
WAYLAND_SCANNER
......@@ -1797,6 +1799,8 @@ WAYLAND_CLIENT_CFLAGS
WAYLAND_CLIENT_LIBS
XKBCOMMON_CFLAGS
XKBCOMMON_LIBS
XKBREGISTRY_CFLAGS
XKBREGISTRY_LIBS
INOTIFY_CFLAGS
INOTIFY_LIBS
DBUS_CFLAGS
......@@ -2620,6 +2624,10 @@ Some influential environment variables:
C compiler flags for xkbcommon, overriding pkg-config
XKBCOMMON_LIBS
Linker flags for xkbcommon, overriding pkg-config
XKBREGISTRY_CFLAGS
C compiler flags for xkbregistry, overriding pkg-config
XKBREGISTRY_LIBS
Linker flags for xkbregistry, overriding pkg-config
INOTIFY_CFLAGS
C compiler flags for libinotify, overriding pkg-config
INOTIFY_LIBS
......@@ -15956,8 +15964,86 @@ fi
CPPFLAGS=$ac_save_CPPFLAGS
rm -f conftest.err
if ${XKBREGISTRY_CFLAGS:+false} :
then :
if test ${PKG_CONFIG+y}
then :
XKBREGISTRY_CFLAGS=`$PKG_CONFIG --cflags xkbregistry 2>conftest.err`
fi
fi
if ${XKBREGISTRY_LIBS:+false} :
then :
if test ${PKG_CONFIG+y}
then :
XKBREGISTRY_LIBS=`$PKG_CONFIG --libs xkbregistry 2>/dev/null`
fi
fi
printf "%s\n" "$as_me:${as_lineno-$LINENO}: xkbregistry cflags: $XKBREGISTRY_CFLAGS" >&5
printf "%s\n" "$as_me:${as_lineno-$LINENO}: xkbregistry libs: $XKBREGISTRY_LIBS" >&5
if test -s conftest.err; then
printf %s "$as_me:${as_lineno-$LINENO}: xkbregistry errors: " >&5
cat conftest.err >&5
fi
rm -f conftest.err
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $XKBREGISTRY_CFLAGS"
ac_fn_c_check_header_compile "$LINENO" "xkbcommon/xkbregistry.h" "ac_cv_header_xkbcommon_xkbregistry_h" "$ac_includes_default"
if test "x$ac_cv_header_xkbcommon_xkbregistry_h" = xyes
then :
printf "%s\n" "#define HAVE_XKBCOMMON_XKBREGISTRY_H 1" >>confdefs.h
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rxkb_context_new in -lxkbregistry" >&5
printf %s "checking for rxkb_context_new in -lxkbregistry... " >&6; }
if test ${ac_cv_lib_xkbregistry_rxkb_context_new+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lxkbregistry $XKBREGISTRY_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
char rxkb_context_new ();
int
main (void)
{
return rxkb_context_new ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_xkbregistry_rxkb_context_new=yes
else $as_nop
ac_cv_lib_xkbregistry_rxkb_context_new=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xkbregistry_rxkb_context_new" >&5
printf "%s\n" "$ac_cv_lib_xkbregistry_rxkb_context_new" >&6; }
if test "x$ac_cv_lib_xkbregistry_rxkb_context_new" = xyes
then :
:
else $as_nop
XKBREGISTRY_LIBS=""
fi
CPPFLAGS=$ac_save_CPPFLAGS
fi
if test -z "$WAYLAND_CLIENT_LIBS" -o -z "$WAYLAND_SCANNER" -o -z "$XKBCOMMON_LIBS" -o "$ac_cv_header_linux_input_h" = "no"
if test -z "$WAYLAND_CLIENT_LIBS" -o -z "$WAYLAND_SCANNER" -o -z "$XKBCOMMON_LIBS" -o -z "$XKBREGISTRY_LIBS" -o "$ac_cv_header_linux_input_h" = "no"
then :
case "x$with_wayland" in
x) as_fn_append wine_notices "|Wayland ${notice_platform}development files not found, the Wayland driver won't be supported." ;;
......@@ -23545,6 +23631,8 @@ WAYLAND_CLIENT_LIBS = $WAYLAND_CLIENT_LIBS
WAYLAND_SCANNER = $WAYLAND_SCANNER
XKBCOMMON_CFLAGS = $XKBCOMMON_CFLAGS
XKBCOMMON_LIBS = $XKBCOMMON_LIBS
XKBREGISTRY_CFLAGS = $XKBREGISTRY_CFLAGS
XKBREGISTRY_LIBS = $XKBREGISTRY_LIBS
PCAP_LIBS = $PCAP_LIBS
PCSCLITE_LIBS = $PCSCLITE_LIBS
INOTIFY_CFLAGS = $INOTIFY_CFLAGS
......
......@@ -1380,8 +1380,11 @@ then
WINE_PACKAGE_FLAGS(XKBCOMMON,[xkbcommon],,,,
[AC_CHECK_HEADERS([xkbcommon/xkbcommon.h])
AC_CHECK_LIB(xkbcommon,xkb_context_new,[:],[XKBCOMMON_LIBS=""],[$XKBCOMMON_LIBS])])
WINE_PACKAGE_FLAGS(XKBREGISTRY,[xkbregistry],,,,
[AC_CHECK_HEADERS([xkbcommon/xkbregistry.h])
AC_CHECK_LIB(xkbregistry,rxkb_context_new,[:],[XKBREGISTRY_LIBS=""],[$XKBREGISTRY_LIBS])])
fi
WINE_NOTICE_WITH(wayland, [test -z "$WAYLAND_CLIENT_LIBS" -o -z "$WAYLAND_SCANNER" -o -z "$XKBCOMMON_LIBS" -o "$ac_cv_header_linux_input_h" = "no"],
WINE_NOTICE_WITH(wayland, [test -z "$WAYLAND_CLIENT_LIBS" -o -z "$WAYLAND_SCANNER" -o -z "$XKBCOMMON_LIBS" -o -z "$XKBREGISTRY_LIBS" -o "$ac_cv_header_linux_input_h" = "no"],
[Wayland ${notice_platform}development files not found, the Wayland driver won't be supported.],
[enable_winewayland_drv])
......
MODULE = winewayland.drv
UNIXLIB = winewayland.so
UNIX_CFLAGS = $(WAYLAND_CLIENT_CFLAGS) $(XKBCOMMON_CFLAGS)
UNIX_LIBS = -lwin32u $(WAYLAND_CLIENT_LIBS) $(XKBCOMMON_LIBS) $(PTHREAD_LIBS) -lm
UNIX_CFLAGS = $(WAYLAND_CLIENT_CFLAGS) $(XKBCOMMON_CFLAGS) $(XKBREGISTRY_CFLAGS)
UNIX_LIBS = -lwin32u $(WAYLAND_CLIENT_LIBS) $(XKBCOMMON_LIBS) $(XKBREGISTRY_LIBS) $(PTHREAD_LIBS) -lm
SOURCES = \
display.c \
......
......@@ -28,6 +28,7 @@
#include <pthread.h>
#include <wayland-client.h>
#include <xkbcommon/xkbcommon.h>
#include <xkbcommon/xkbregistry.h>
#include "viewporter-client-protocol.h"
#include "xdg-output-unstable-v1-client-protocol.h"
#include "xdg-shell-client-protocol.h"
......
......@@ -675,6 +675,9 @@
/* Define to 1 if you have the <xkbcommon/xkbcommon.h> header file. */
#undef HAVE_XKBCOMMON_XKBCOMMON_H
/* Define to 1 if you have the <xkbcommon/xkbregistry.h> header file. */
#undef HAVE_XKBCOMMON_XKBREGISTRY_H
/* Define if Xrender has the XRenderCreateLinearGradient function */
#undef HAVE_XRENDERCREATELINEARGRADIENT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment