From 5728d489bcfb2d37b047c943531c6dcf07cc6894 Mon Sep 17 00:00:00 2001 From: "U. Artie Eoff" Date: Thu, 4 Apr 2013 12:58:40 -0700 Subject: [PATCH] support weston sdk 1.0.x (sdk1) module_init signature Signed-off-by: U. Artie Eoff --- configure.ac | 10 ++++++++++ src/extensions/weston/weston-wfits.c | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/configure.ac b/configure.ac index 6faff87..80041e2 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,16 @@ if test "x$want_weston_extensions" != "xno"; then [ AC_DEFINE(HAVE_WESTON, 1, [Support for Weston extensions]) have_weston="yes" + PKG_CHECK_MODULES([WESTON_SDK2], + [ + weston >= 1.0.90 + ], + [ + AC_DEFINE(HAVE_WESTON_SDK2, 1, [Support for Weston 1.1.0 extensions]) + have_weston_sdk2="yes" + ], + [have_weston_sdk2="no"] + ) ], [have_weston="no"] ) diff --git a/src/extensions/weston/weston-wfits.c b/src/extensions/weston/weston-wfits.c index cc128f4..66c78ee 100644 --- a/src/extensions/weston/weston-wfits.c +++ b/src/extensions/weston/weston-wfits.c @@ -34,6 +34,7 @@ #include #include +#include "config.h" #include "extensions/protocol/wayland-fits-server-protocol.h" #define MAX(x, y) (((x) > (y)) ? (x) : (y)) @@ -351,9 +352,14 @@ compositor_destroy(struct wl_listener *listener, void *data) } } +#ifdef HAVE_WESTON_SDK2 WL_EXPORT int module_init(struct weston_compositor *compositor, int *argc, char *argv[], const char *config_file) +#else +WL_EXPORT int +module_init(struct weston_compositor *compositor) +#endif { struct wfits *wfits; struct wl_event_loop *loop; -- 2.7.4