diff --git a/clutter/Makefile.am b/clutter/Makefile.am index eb4003a1b..851183ecb 100644 --- a/clutter/Makefile.am +++ b/clutter/Makefile.am @@ -14,8 +14,6 @@ lib_LTLIBRARIES = INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/clutter \ - -I$(top_srcdir)/clutter/$(CLUTTER_WINSYS) \ - -I$(top_srcdir)/clutter/$(CLUTTER_WINSYS_BASE) \ -I$(top_srcdir)/clutter/deprecated \ -I$(top_srcdir)/clutter/cally \ -I$(top_builddir) \ @@ -301,6 +299,13 @@ EXTRA_DIST += clutter-keysyms-update.pl pc_files += clutter-$(CLUTTER_API_VERSION).pc +# in order to be compatible with Clutter < 1.10, when we shipped a single +# shared library whose name was determined by the single backend it +# supported, we need to install symbolic links so that existing applications +# using Clutter won't break in the Brave New World of multi-backend support +# in the same shared object. +compat_libs = + # backends source listings # # backend_source_c := source code @@ -370,6 +375,11 @@ x11_introspection = $(x11_source_c) $(x11_source_h) clutterx11_includedir = $(clutter_includedir)/x11 clutterx11_include_HEADERS = $(x11_source_h) + +clutter-x11-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc + $(QUIET_GEN)cp -f $< $(@F) + +pc_files += clutter-x11-$(CLUTTER_API_VERSION).pc endif # SUPPORT_X11 # Shared cogl backend files @@ -387,20 +397,31 @@ cogl_source_h_priv = \ cogl_source_c_priv = +if USE_COGL +backend_source_h += $(cogl_source_h) +backend_source_c += $(cogl_source_c) +backend_source_h_priv += $(cogl_source_h_priv) +backend_source_c_priv += $(cogl_source_c_priv) + # pkg-config file for the cogl meta-backend clutter-cogl-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc $(QUIET_GEN)cp -f $< $(@F) pc_files += clutter-cogl-$(CLUTTER_API_VERSION).pc +endif -if SUPPORT_X11 -# For compatability with the old GLX backend +# For compatibility with the old GLX backend # # Note: there wasn't actually anything GLX specific so we can add -# the compatability if clutter supports x11 -backend_source_c += $(srcdir)/x11/clutter-glx-texture-pixmap.c +# the compatibility if clutter supports x11 +glx_source_c = $(srcdir)/x11/clutter-glx-texture-pixmap.c glx_source_h = $(srcdir)/x11/clutter-glx-texture-pixmap.h \ $(srcdir)/x11/clutter-glx.h + +if SUPPORT_X11 +backend_source_h += $(glx_source_h) +backend_source_c += $(glx_source_c) + clutterglx_includedir = $(clutter_includedir)/glx clutterglx_include_HEADERS = $(glx_source_h) @@ -408,13 +429,9 @@ clutter-glx-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc $(QUIET_GEN)cp -f $< $(@F) pc_files += clutter-glx-$(CLUTTER_API_VERSION).pc -endif -if SUPPORT_GLX -backend_source_h += $(cogl_source_h) $(glx_source_h) -backend_source_c += $(cogl_source_c) $(glx_source_c) -backend_source_h_priv += $(cogl_source_h_priv) -endif # SUPPORT_GLX +compat_libs += libclutter-glx-$(CLUTTER_API_VERSION).so.0 +endif # GDK backend rules gdk_source_c = \ @@ -439,12 +456,19 @@ gdk_source_h_priv = \ $(NULL) if SUPPORT_GDK -backend_source_h += $(cogl_source_h) $(gdk_source_h) -backend_source_c += $(cogl_source_c) $(gdk_source_c) -backend_source_h_priv += $(cogl_source_h_priv) $(gdk_source_h_priv) +backend_source_h += $(gdk_source_h) +backend_source_c += $(gdk_source_c) +backend_source_h_priv += $(gdk_source_h_priv) cluttergdk_includedir = $(clutter_includedir)/gdk cluttergdk_include_HEADERS = $(gdk_source_h) + +clutter-gdk-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc + $(QUIET_GEN)cp -f $< $(@F) + +pc_files += clutter-gdk-$(CLUTTER_API_VERSION).pc + +gdk_introspection = $(gdk_source_c) $(gdk_source_h) endif # SUPPORT_GDK # Windows backend rules @@ -486,6 +510,11 @@ backend_source_h_priv += $(win32_source_h_priv) clutterwin_includedir = $(clutter_includedir)/win32 clutterwin_include_HEADERS = $(win32_source_h) + +clutter-win32-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc + $(QUIET_GEN)cp -f $< $(@F) + +pc_files += clutter-win32-$(CLUTTER_API_VERSION).pc endif # SUPPORT_WIN32 EXTRA_DIST += \ @@ -520,23 +549,32 @@ if USE_TSLIB backend_source_c_priv += $(egl_tslib_c) endif # SUPPORT_TSLIB -if SUPPORT_EVDEV +if USE_EVDEV backend_source_c_priv += $(evdev_c_priv) backend_source_h_priv += $(evdev_h_priv) endif # SUPPORT_EVDEV if SUPPORT_CEX100 backend_source_h += $(cex_h) + +clutter-cex100-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc + $(QUIET_GEN)cp -f $< $(@F) + +pc_files += clutter-cex100-$(CLUTTER_API_VERSION).pc + +compat_libs += libclutter-cex100-$(CLUTTER_API_VERSION).so.0 endif # SUPPORT_CEX100 if SUPPORT_EGL -backend_source_h += $(cogl_source_h) $(egl_source_h) -backend_source_c += $(cogl_source_c) -backend_source_h_priv += $(cogl_source_h_priv) -backend_source_c_priv += $(cogl_source_c_priv) +backend_source_h += $(egl_source_h) clutteregl_includedir = $(clutter_includedir)/egl clutteregl_include_HEADERS = $(egl_source_h) + +clutter-egl-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc + $(QUIET_GEN)cp -f $< $(@F) + +pc_files += clutter-egl-$(CLUTTER_API_VERSION).pc endif # SUPPORT_EGL # OSX backend rules @@ -572,6 +610,11 @@ backend_source_c_priv += $(osx_source_c_priv) clutterosx_includedir = $(clutter_includedir)/osx clutterosx_include_HEADERS = $(osx_source_h) + +clutter-osx-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc + $(QUIET_GEN)cp -f $< $(@F) + +pc_files += clutter-osx-$(CLUTTER_API_VERSION).pc endif # SUPPORT_OSX # Wayland backend rules @@ -593,6 +636,13 @@ backend_source_c += \ clutterwayland_includedir = $(clutter_includedir)/wayland clutterwayland_include_HEADERS = $(wayland_source_h) + +clutter-wayland-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc + $(QUIET_GEN)cp -f $< $(@F) + +pc_files += clutter-wayland-$(CLUTTER_API_VERSION).pc + +compat_libs += libclutter-wayland-$(CLUTTER_API_VERSION).so.0 endif # SUPPORT_WAYLAND # cally @@ -648,12 +698,6 @@ glib_enum_c = clutter-enum-types.c glib_enum_headers = $(source_h) $(backend_source_h) include $(top_srcdir)/build/autotools/Makefile.am.enums -# backend-specific pkg-config file -clutter-$(CLUTTER_WINSYS)-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc - $(QUIET_GEN)cp -f $< $(@F) - -pc_files += clutter-$(CLUTTER_WINSYS)-$(CLUTTER_API_VERSION).pc - pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = $(pc_files) DISTCLEANFILES += $(pc_files) @@ -666,17 +710,17 @@ nodist_clutter_include_HEADERS = \ clutter_deprecated_HEADERS = $(deprecated_h) -lib_LTLIBRARIES += libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la +lib_LTLIBRARIES += libclutter-@CLUTTER_API_VERSION@.la -libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_LIBADD = \ +libclutter_@CLUTTER_API_VERSION@_la_LIBADD = \ -lm \ $(CLUTTER_LIBS) \ $(CLUTTER_PROFILE_LIBS) -libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_DEPENDENCIES = \ +libclutter_@CLUTTER_API_VERSION@_la_DEPENDENCIES = \ $(win32_resources) -libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_SOURCES = \ +libclutter_@CLUTTER_API_VERSION@_la_SOURCES = \ $(backend_source_c) \ $(backend_source_h) \ $(backend_source_c_priv) \ @@ -694,12 +738,12 @@ libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_SOURCES = \ $(cally_sources_private) \ $(NULL) -nodist_libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_SOURCES = \ +nodist_libclutter_@CLUTTER_API_VERSION@_la_SOURCES = \ $(backend_source_built) \ $(built_source_c) \ $(built_source_h) -libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_LDFLAGS = \ +libclutter_@CLUTTER_API_VERSION@_la_LDFLAGS = \ $(CLUTTER_LINK_FLAGS) \ $(CLUTTER_LT_LDFLAGS) \ $(GCOV_LDFLAGS) \ @@ -709,15 +753,21 @@ libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_LDFLAGS = \ $(win32_resources_ldflag) \ $(NULL) +install-exec-local: + for lib in "$(compat_libs)"; do \ + rm -f $(DESTDIR)$(libdir)/$$lib ; \ + ln -s libclutter-$(CLUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $(DESTDIR)$(libdir)/$$lib ; \ + done + # gobject-introspection rules -include $(INTROSPECTION_MAKEFILE) if HAVE_INTROSPECTION -Clutter-@CLUTTER_API_VERSION@.gir: libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la Makefile +Clutter-@CLUTTER_API_VERSION@.gir: libclutter-@CLUTTER_API_VERSION@.la Makefile Clutter_@CLUTTER_API_VERSION_AM@_gir_NAMESPACE = Clutter Clutter_@CLUTTER_API_VERSION_AM@_gir_VERSION = @CLUTTER_API_VERSION@ -Clutter_@CLUTTER_API_VERSION_AM@_gir_LIBS = libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la +Clutter_@CLUTTER_API_VERSION_AM@_gir_LIBS = libclutter-@CLUTTER_API_VERSION@.la Clutter_@CLUTTER_API_VERSION_AM@_gir_FILES = \ $(clutter_include_HEADERS) \ $(clutter_deprecated_HEADERS) \ @@ -738,7 +788,7 @@ Cally-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir Cally_@CLUTTER_API_VERSION_AM@_gir_NAMESPACE = Cally Cally_@CLUTTER_API_VERSION_AM@_gir_VERSION = @CLUTTER_API_VERSION@ -Cally_@CLUTTER_API_VERSION_AM@_gir_LIBS = libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la +Cally_@CLUTTER_API_VERSION_AM@_gir_LIBS = libclutter-@CLUTTER_API_VERSION@.la Cally_@CLUTTER_API_VERSION_AM@_gir_FILES = $(cally_sources_h) $(cally_sources_c) Cally_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(INCLUDES) $(CLUTTER_CFLAGS) $(AM_CPPFLAGS) -UCLUTTER_DISABLE_DEPRECATED Cally_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \ @@ -760,13 +810,30 @@ ClutterX11_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \ --pkg-export=clutter-x11-@CLUTTER_API_VERSION@ \ --include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir ClutterX11_@CLUTTER_API_VERSION_AM@_gir_INCLUDES = xlib-2.0 -ClutterX11_@CLUTTER_API_VERSION_AM@_gir_LIBS = libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la +ClutterX11_@CLUTTER_API_VERSION_AM@_gir_LIBS = libclutter-@CLUTTER_API_VERSION@.la ClutterX11_@CLUTTER_API_VERSION_AM@_gir_FILES = $(x11_introspection) ClutterX11_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(INCLUDES) $(CLUTTER_CFLAGS) $(AM_CPPFLAGS) -UCLUTTER_DISABLE_DEPRECATED INTROSPECTION_GIRS += ClutterX11-@CLUTTER_API_VERSION@.gir endif # SUPPORT_X11 +if SUPPORT_GDK +ClutterGdk-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir + +ClutterGdk_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \ + --identifier-prefix=ClutterGdk \ + --symbol-prefix=clutter_gdk \ + --c-include='clutter/gdk/clutter-gdk.h' \ + --pkg-export=clutter-gdk-@CLUTTER_API_VERSION@ \ + --include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir +ClutterGdk_@CLUTTER_API_VERSION_AM@_gir_INCLUDES = Gdk-3.0 +ClutterGdk_@CLUTTER_API_VERSION_AM@_gir_LIBS = libclutter-@CLUTTER_API_VERSION@.la +ClutterGdk_@CLUTTER_API_VERSION_AM@_gir_FILES = $(gdk_introspection) +ClutterGdk_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(INCLUDES) $(CLUTTER_CFLAGS) $(AM_CPPFLAGS) -UCLUTTER_DISABLE_DEPRECATED + +INTROSPECTION_GIRS += ClutterGdk-@CLUTTER_API_VERSION@.gir +endif # SUPPORT_GDK + # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to # install anything - we need to install inside our prefix. girdir = $(datadir)/gir-1.0 diff --git a/clutter/clutter-backend-private.h b/clutter/clutter-backend-private.h index 3374bbca1..be7b58f3a 100644 --- a/clutter/clutter-backend-private.h +++ b/clutter/clutter-backend-private.h @@ -87,9 +87,6 @@ struct _ClutterBackendClass void (* settings_changed) (ClutterBackend *backend); }; -/* vfuncs implemented by backend */ -GType _clutter_backend_impl_get_type (void); - void _clutter_backend_redraw (ClutterBackend *backend, ClutterStage *stage); ClutterStageWindow *_clutter_backend_create_stage (ClutterBackend *backend, diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index 0f0e88a67..6ee8986e9 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -100,6 +100,7 @@ #include "clutter-actor.h" #include "clutter-backend-private.h" +#include "clutter-config.h" #include "clutter-debug.h" #include "clutter-device-manager-private.h" #include "clutter-event.h" @@ -114,6 +115,25 @@ #include "clutter-stage-private.h" #include "clutter-version.h" /* For flavour define */ +#ifdef CLUTTER_WINDOWING_OSX +#include "osx/clutter-backend-osx.h" +#endif +#ifdef CLUTTER_WINDOWING_WIN32 +#include "win32/clutter-backend-win32.h" +#endif +#ifdef CLUTTER_WINDOWING_GDK +#include "gdk/clutter-backend-gdk.h" +#endif +#ifdef CLUTTER_WINDOWING_X11 +#include "x11/clutter-backend-x11.h" +#endif +#ifdef CLUTTER_WINDOWING_EGL +#include "egl/clutter-backend-eglnative.h" +#endif +#ifdef CLUTTER_WINDOWING_WAYLAND +#include "wayland/clutter-backend-wayland.h" +#endif + #include #include @@ -1299,11 +1319,46 @@ clutter_context_get_default_unlocked (void) if (G_UNLIKELY (ClutterCntx == NULL)) { ClutterMainContext *ctx; + const char *backend; ClutterCntx = ctx = g_new0 (ClutterMainContext, 1); - /* create the default backend */ - ctx->backend = g_object_new (_clutter_backend_impl_get_type (), NULL); + backend = g_getenv ("CLUTTER_BACKEND"); + +#ifdef CLUTTER_WINDOWING_OSX + if (backend == NULL || strcmp (backend, "osx") == 0) + ctx->backend = g_object_new (CLUTTER_TYPE_BACKEND_OSX, NULL); + else +#endif +#ifdef CLUTTER_WINDOWING_WIN32 + if (backend == NULL || strcmp (backend, "win32") == 0) + ctx->backend = g_object_new (CLUTTER_TYPE_BACKEND_WIN32, NULL); + else +#endif +#ifdef CLUTTER_WINDOWING_WAYLAND + if (backend == NULL || strcmp (backend, "wayland") == 0) + ctx->backend = g_object_new (CLUTTER_TYPE_BACKEND_WAYLAND, NULL); + else +#endif +#ifdef CLUTTER_WINDOWING_EGL + if (backend == NULL || strcmp (backend, "eglnative") == 0) + ctx->backend = g_object_new (CLUTTER_TYPE_BACKEND_EGLNATIVE, NULL); + else +#endif +#ifdef CLUTTER_WINDOWING_X11 + if (backend == NULL || strcmp (backend, "x11") == 0) + ctx->backend = g_object_new (CLUTTER_TYPE_BACKEND_X11, NULL); + else +#endif +#ifdef CLUTTER_WINDOWING_GDK + if (backend == NULL || strcmp (backend, "gdk") == 0) + ctx->backend = g_object_new (CLUTTER_TYPE_BACKEND_GDK, NULL); + else +#endif + if (backend != NULL) + g_error ("Unsupported Clutter backend: '%s'", backend); + else + g_error ("No default Clutter backend found."); ctx->is_initialized = FALSE; ctx->motion_events_per_actor = TRUE; @@ -1320,6 +1375,10 @@ clutter_context_get_default_unlocked (void) #endif ctx->last_repaint_id = 1; + + CLUTTER_NOTE (BACKEND, "Backend type: '%s' (requested: '%s')", + G_OBJECT_TYPE_NAME (ctx->backend), + backend != NULL ? backend : ""); } return ClutterCntx; diff --git a/clutter/clutter-version.h.in b/clutter/clutter-version.h.in index 73df000da..835e29f76 100644 --- a/clutter/clutter-version.h.in +++ b/clutter/clutter-version.h.in @@ -103,6 +103,12 @@ G_BEGIN_DECLS * GL Windowing system used * * Since: 0.4 + * + * Deprecated: 1.10: The macro evaluates to "deprecated" as Clutter can be + * compiled with multiple windowing system backends. Use the various + * CLUTTER_WINDOWING_* macros to detect the windowing system that Clutter + * is being compiled against, and the type check macros for the + * #ClutterBackend for a run-time check. */ #define CLUTTER_FLAVOUR "@CLUTTER_FLAVOUR@" @@ -113,6 +119,9 @@ G_BEGIN_DECLS * "gles" currently * * Since: 0.4 + * + * Deprecated: 1.10: The macro evaluates to "deprecated" as Cogl can be + * compiled against multiple GL implementations. */ #define CLUTTER_COGL "@CLUTTER_COGL@" @@ -122,6 +131,11 @@ G_BEGIN_DECLS * The default GObject type for the Clutter stage. * * Since: 0.8 + * + * Deprecated: 1.10: The macro evaluates to "deprecated" as Clutter can + * be compiled against multiple windowing systems. You can use the + * CLUTTER_WINDOWING_* macros for compile-time checks, and the type + * check macros for run-time checks. */ #define CLUTTER_STAGE_TYPE @CLUTTER_STAGE_TYPE@ diff --git a/clutter/clutter.pc.in b/clutter/clutter.pc.in index 4a5afe904..0abf62fdd 100644 --- a/clutter/clutter.pc.in +++ b/clutter/clutter.pc.in @@ -4,18 +4,19 @@ libdir=@libdir@ includedir=@includedir@ apiversion=@CLUTTER_API_VERSION@ -winsys=@CLUTTER_WINSYS@ -soname_infix=@CLUTTER_SONAME_INFIX@ -cogl_driver=@COGL_DRIVER@ requires=@CLUTTER_REQUIRES@ +backends=@CLUTTER_BACKENDS@ # only kept for backward compatibility +soname_infix=@CLUTTER_SONAME_INFIX@ +winsys=@CLUTTER_WINSYS@ cogl=@COGL_DRIVER@ +cogl_driver=@COGL_DRIVER@ backend=@CLUTTER_WINSYS@ Name: Clutter -Description: Clutter Core Library (${winsys}/${cogl_driver} backend) +Description: Clutter Core Library Version: @VERSION@ -Libs: -L${libdir} -lclutter-${soname_infix}-${apiversion} +Libs: -L${libdir} -lclutter-${apiversion} Cflags: -I${includedir}/clutter-${apiversion} Requires: ${requires} diff --git a/clutter/cogl/clutter-stage-cogl.c b/clutter/cogl/clutter-stage-cogl.c index 57f105716..9f6ea6cbb 100644 --- a/clutter/cogl/clutter-stage-cogl.c +++ b/clutter/cogl/clutter-stage-cogl.c @@ -46,7 +46,7 @@ #include "clutter-util.h" #ifdef CLUTTER_WINDOWING_X11 -/* needed for a small check in redraw() */ +/* FIXME: needed for a small check in redraw(), needs to be moved */ #include "x11/clutter-stage-x11.h" #endif @@ -353,24 +353,27 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window) CLUTTER_TIMER_START (_clutter_uprof_context, painting_timer); + may_use_clipped_redraw = FALSE; if (G_LIKELY (backend_cogl->can_blit_sub_buffer) && /* NB: a zero width redraw clip == full stage redraw */ stage_cogl->bounding_redraw_clip.width != 0 && /* some drivers struggle to get going and produce some junk * frames when starting up... */ - G_LIKELY (stage_cogl->frame_count > 3) + G_LIKELY (stage_cogl->frame_count > 3)) + { #if defined(CLUTTER_WINDOWING_X11) + /* FIXME - move this to a StageWindow vfunc */ + /* While resizing a window clipped redraws are disabled to avoid * artefacts. See clutter-event-x11.c:event_translate for a * detailed explanation */ - && G_LIKELY (CLUTTER_STAGE_X11 (stage_cogl)->clipped_redraws_cool_off == 0) + if (CLUTTER_IS_STAGE_X11 (stage_cogl) && + (CLUTTER_STAGE_X11 (stage_cogl)->clipped_redraws_cool_off == 0)) + { + may_use_clipped_redraw = TRUE; + } #endif - ) - { - may_use_clipped_redraw = TRUE; } - else - may_use_clipped_redraw = FALSE; if (may_use_clipped_redraw && G_LIKELY (!(clutter_paint_debug_flags & diff --git a/clutter/egl/clutter-backend-eglnative.c b/clutter/egl/clutter-backend-eglnative.c index 2ee1f03a6..8568490c2 100644 --- a/clutter/egl/clutter-backend-eglnative.c +++ b/clutter/egl/clutter-backend-eglnative.c @@ -38,6 +38,7 @@ #include #include "clutter-backend-eglnative.h" + /* This is a Cogl based backend */ #include "cogl/clutter-stage-cogl.h" @@ -53,18 +54,18 @@ #ifdef COGL_HAS_EGL_SUPPORT #include "clutter-egl.h" #endif -#ifdef COGL_HAS_EGL_PLATFORM_GDL_SUPPORT +#ifdef CLUTTER_EGL_BACKEND_CEX100 #include "clutter-cex100.h" #endif -static gchar *clutter_vblank = NULL; - -/* FIXME: We should have CLUTTER_ define for this... */ -#ifdef COGL_HAS_EGL_PLATFORM_GDL_SUPPORT +#ifdef CLUTTER_EGL_BACKEND_CEX100 static gdl_plane_id_t gdl_plane = GDL_PLANE_ID_UPP_C; static guint gdl_n_buffers = CLUTTER_CEX100_TRIPLE_BUFFERING; #endif +static gboolean gdl_plane_set = FALSE; +static gboolean gdl_n_buffers_set = FALSE; + G_DEFINE_TYPE (ClutterBackendEglNative, _clutter_backend_egl_native, CLUTTER_TYPE_BACKEND_COGL); static ClutterDeviceManager * @@ -91,6 +92,7 @@ clutter_backend_egl_native_init_events (ClutterBackend *backend) #ifdef HAVE_TSLIB _clutter_events_tslib_init (CLUTTER_BACKEND_EGL (backend)); #endif + #ifdef HAVE_EVDEV _clutter_events_evdev_init (CLUTTER_BACKEND (backend)); #endif @@ -157,9 +159,8 @@ clutter_backend_egl_native_create_context (ClutterBackend *backend, swap_chain = cogl_swap_chain_new (); -#ifdef COGL_HAS_EGL_PLATFORM_GDL_SUPPORT - cogl_swap_chain_set_length (swap_chain, gdl_n_buffers); -#endif + if (gdl_n_buffers_set) + cogl_swap_chain_set_length (swap_chain, gdl_n_buffers); onscreen_template = cogl_onscreen_template_new (swap_chain); cogl_object_unref (swap_chain); @@ -176,9 +177,10 @@ clutter_backend_egl_native_create_context (ClutterBackend *backend, backend->cogl_display = cogl_display_new (backend->cogl_renderer, onscreen_template); -#ifdef COGL_HAS_EGL_PLATFORM_GDL_SUPPORT - cogl_gdl_display_set_plane (backend->cogl_display, gdl_plane); -#endif +#ifdef CLUTTER_EGL_BACKEND_CEX100 + if (gdl_plane_set) + cogl_gdl_display_set_plane (backend->cogl_display, gdl_plane); +#endif /* CLUTTER_EGL_BACKEND_CEX100 */ cogl_object_unref (backend->cogl_renderer); cogl_object_unref (onscreen_template); @@ -235,28 +237,41 @@ _clutter_backend_egl_native_init (ClutterBackendEglNative *backend_egl_native) #endif } -GType -_clutter_backend_impl_get_type (void) -{ - return _clutter_backend_egl_native_get_type (); -} - -/* FIXME we should have a CLUTTER_ define for this */ -#ifdef COGL_HAS_EGL_PLATFORM_GDL_SUPPORT +/** + * clutter_cex100_set_plane: + * @plane: FIXME + * + * FIXME + * + * Since: + */ void clutter_cex100_set_plane (gdl_plane_id_t plane) { +#ifdef CLUTTER_EGL_BACKEND_CEX100 g_return_if_fail (plane >= GDL_PLANE_ID_UPP_A && plane <= GDL_PLANE_ID_UPP_E); gdl_plane = plane; + gdl_plane_set = TRUE; +#endif } +/** + * clutter_cex100_set_plane: + * @mode: FIXME + * + * FIXME + * + * Since: + */ void clutter_cex100_set_buffering_mode (ClutterCex100BufferingMode mode) { +#ifdef CLUTTER_EGL_BACKEND_CEX100 g_return_if_fail (mode == CLUTTER_CEX100_DOUBLE_BUFFERING || mode == CLUTTER_CEX100_TRIPLE_BUFFERING); gdl_n_buffers = mode; -} + gdl_n_buffers_set = TRUE; #endif +} diff --git a/clutter/gdk/clutter-backend-gdk.c b/clutter/gdk/clutter-backend-gdk.c index 88e17a8c1..d732dc739 100644 --- a/clutter/gdk/clutter-backend-gdk.c +++ b/clutter/gdk/clutter-backend-gdk.c @@ -410,9 +410,15 @@ clutter_gdk_get_default_display (void) { ClutterBackend *backend = clutter_get_default_backend (); - if (!backend || !CLUTTER_IS_BACKEND_GDK (backend)) + if (backend == NULL) { - g_critical ("GDK backend has not been initialised"); + g_critical ("The Clutter backend has not been initialised"); + return NULL; + } + + if (!CLUTTER_IS_BACKEND_GDK (backend)) + { + g_critical ("The Clutter backend is not a GDK backend"); return NULL; } @@ -446,9 +452,3 @@ clutter_gdk_set_display (GdkDisplay *display) _foreign_dpy = g_object_ref (display); } - -GType -_clutter_backend_impl_get_type (void) -{ - return _clutter_backend_gdk_get_type (); -} diff --git a/clutter/gdk/clutter-gdk.h b/clutter/gdk/clutter-gdk.h index 6aa825bba..dc95bdb0f 100644 --- a/clutter/gdk/clutter-gdk.h +++ b/clutter/gdk/clutter-gdk.h @@ -41,14 +41,15 @@ G_BEGIN_DECLS -void clutter_gdk_set_display (GdkDisplay *display); -GdkWindow *clutter_gdk_get_stage_window (ClutterStage *stage); -gboolean clutter_gdk_set_stage_foreign (ClutterStage *stage, - GdkWindow *window); +void clutter_gdk_set_display (GdkDisplay *display); -GdkFilterReturn clutter_gdk_handle_event (GdkEvent *event); +GdkWindow * clutter_gdk_get_stage_window (ClutterStage *stage); +gboolean clutter_gdk_set_stage_foreign (ClutterStage *stage, + GdkWindow *window); -ClutterStage *clutter_gdk_get_stage_from_window (GdkWindow *window); +GdkFilterReturn clutter_gdk_handle_event (GdkEvent *event); + +ClutterStage * clutter_gdk_get_stage_from_window (GdkWindow *window); G_END_DECLS diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c index 2938a6a02..a990f5297 100644 --- a/clutter/gdk/clutter-stage-gdk.c +++ b/clutter/gdk/clutter-stage-gdk.c @@ -468,7 +468,7 @@ clutter_stage_window_iface_init (ClutterStageWindowIface *iface) * * Since: 0.4 */ -GdkWindow* +GdkWindow * clutter_gdk_get_stage_window (ClutterStage *stage) { ClutterStageWindow *impl; @@ -476,7 +476,11 @@ clutter_gdk_get_stage_window (ClutterStage *stage) g_return_val_if_fail (CLUTTER_IS_STAGE (stage), None); impl = _clutter_stage_get_window (stage); - g_assert (CLUTTER_IS_STAGE_GDK (impl)); + if (!CLUTTER_IS_STAGE_GDK (impl)) + { + g_critical ("The Clutter backend is not a GDK backend"); + return NULL; + } return CLUTTER_STAGE_GDK (impl)->window; } @@ -552,6 +556,12 @@ clutter_gdk_set_stage_foreign (ClutterStage *stage, g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE); impl = _clutter_stage_get_window (stage); + if (!CLUTTER_IS_STAGE_GDK (impl)) + { + g_critical ("The Clutter backend is not a GDK backend"); + return FALSE; + } + stage_gdk = CLUTTER_STAGE_GDK (impl); if (g_object_get_data (G_OBJECT (window), "clutter-stage-window") != NULL) diff --git a/clutter/osx/clutter-backend-osx.c b/clutter/osx/clutter-backend-osx.c index 520f53134..9590724da 100644 --- a/clutter/osx/clutter-backend-osx.c +++ b/clutter/osx/clutter-backend-osx.c @@ -253,9 +253,3 @@ clutter_backend_osx_class_init (ClutterBackendOSXClass *klass) backend_class->init_events = clutter_backend_osx_init_events; backend_class->get_device_manager = clutter_backend_osx_get_device_manager; } - -GType -_clutter_backend_impl_get_type (void) -{ - return clutter_backend_osx_get_type (); -} diff --git a/clutter/wayland/clutter-backend-wayland.c b/clutter/wayland/clutter-backend-wayland.c index 5ade5b38d..361de4e48 100644 --- a/clutter/wayland/clutter-backend-wayland.c +++ b/clutter/wayland/clutter-backend-wayland.c @@ -650,12 +650,6 @@ _clutter_backend_wayland_init (ClutterBackendWayland *backend_wayland) backend_wayland->drm_fd = -1; } -GType -_clutter_backend_impl_get_type (void) -{ - return _clutter_backend_wayland_get_type (); -} - EGLDisplay clutter_wayland_get_egl_display (void) { diff --git a/clutter/win32/clutter-backend-win32.c b/clutter/win32/clutter-backend-win32.c index 5ce3564d6..3587c188d 100644 --- a/clutter/win32/clutter-backend-win32.c +++ b/clutter/win32/clutter-backend-win32.c @@ -376,12 +376,6 @@ clutter_backend_win32_init (ClutterBackendWin32 *backend_win32) timeBeginPeriod (1); } -GType -_clutter_backend_impl_get_type (void) -{ - return clutter_backend_win32_get_type (); -} - BOOL WINAPI DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved) { diff --git a/clutter/win32/clutter-stage-win32.c b/clutter/win32/clutter-stage-win32.c index a309d2512..573b0138c 100644 --- a/clutter/win32/clutter-stage-win32.c +++ b/clutter/win32/clutter-stage-win32.c @@ -733,9 +733,13 @@ clutter_win32_set_stage_foreign (ClutterStage *stage, g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE); g_return_val_if_fail (hwnd != NULL, FALSE); - actor = CLUTTER_ACTOR (stage); - impl = _clutter_stage_get_window (stage); + if (!CLUTTER_IS_STAGE_WIN32 (impl)) + { + g_critical ("The Clutter backend is not a Windows backend"); + return FALSE; + } + stage_win32 = CLUTTER_STAGE_WIN32 (impl); if (!GetClientRect (hwnd, &client_rect)) @@ -758,6 +762,8 @@ clutter_win32_set_stage_foreign (ClutterStage *stage, fwd.geom.width = client_rect.right - client_rect.left; fwd.geom.height = client_rect.bottom - client_rect.top; + actor = CLUTTER_ACTOR (stage); + _clutter_actor_rerealize (actor, set_foreign_window_callback, &fwd); diff --git a/clutter/x11/clutter-backend-x11.c b/clutter/x11/clutter-backend-x11.c index ef6f2c2ba..4e72cb33c 100644 --- a/clutter/x11/clutter-backend-x11.c +++ b/clutter/x11/clutter-backend-x11.c @@ -875,9 +875,15 @@ clutter_x11_get_default_display (void) { ClutterBackend *backend = clutter_get_default_backend (); - if (!backend || !CLUTTER_IS_BACKEND_X11 (backend)) + if (backend == NULL) { - g_critical ("X11 backend has not been initialised"); + g_critical ("The Clutter backend has not been initialised"); + return NULL; + } + + if (!CLUTTER_IS_BACKEND_X11 (backend)) + { + g_critical ("The Clutter backend is not a X11 backend"); return NULL; } @@ -1006,9 +1012,15 @@ clutter_x11_get_default_screen (void) { ClutterBackend *backend = clutter_get_default_backend (); - if (!backend || !CLUTTER_IS_BACKEND_X11 (backend)) + if (backend == NULL) { - g_critical ("X11 backend has not been initialised"); + g_critical ("The Clutter backend has not been initialised"); + return 0; + } + + if (!CLUTTER_IS_BACKEND_X11 (backend)) + { + g_critical ("The Clutter backend is not a X11 backend"); return 0; } @@ -1029,9 +1041,15 @@ clutter_x11_get_root_window (void) { ClutterBackend *backend = clutter_get_default_backend (); - if (!backend || !CLUTTER_IS_BACKEND_X11 (backend)) + if (backend == NULL) { - g_critical ("X11 backend has not been initialised"); + g_critical ("The Clutter backend has not been initialised"); + return None; + } + + if (!CLUTTER_IS_BACKEND_X11 (backend)) + { + g_critical ("The Clutter backend is not a X11 backend"); return None; } @@ -1057,9 +1075,15 @@ clutter_x11_add_filter (ClutterX11FilterFunc func, g_return_if_fail (func != NULL); - if (!backend || !CLUTTER_IS_BACKEND_X11 (backend)) + if (backend == NULL) { - g_critical ("X11 backend has not been initialised"); + g_critical ("The Clutter backend has not been initialised"); + return; + } + + if (!CLUTTER_IS_BACKEND_X11 (backend)) + { + g_critical ("The Clutter backend is not a X11 backend"); return; } @@ -1095,9 +1119,15 @@ clutter_x11_remove_filter (ClutterX11FilterFunc func, g_return_if_fail (func != NULL); - if (!backend || !CLUTTER_IS_BACKEND_X11 (backend)) + if (backend == NULL) { - g_critical ("X11 backend has not been initialised"); + g_critical ("The Clutter backend has not been initialised"); + return; + } + + if (!CLUTTER_IS_BACKEND_X11 (backend)) + { + g_critical ("The Clutter backend is not a X11 backend"); return; } @@ -1163,9 +1193,15 @@ clutter_x11_has_xinput (void) #if defined(HAVE_XINPUT) || defined(HAVE_XINPUT_2) ClutterBackend *backend = clutter_get_default_backend (); - if (!backend || !CLUTTER_IS_BACKEND_X11 (backend)) + if (backend == NULL) { - g_critical ("X11 backend has not been initialised"); + g_critical ("The Clutter backend has not been initialised"); + return FALSE; + } + + if (!CLUTTER_IS_BACKEND_X11 (backend)) + { + g_critical ("The Clutter backend is not a X11 backend."); return FALSE; } @@ -1201,6 +1237,8 @@ clutter_x11_has_composite_extension (void) } dpy = clutter_x11_get_default_display(); + if (dpy == NULL) + return FALSE; if (XCompositeQueryExtension (dpy, &event, &error)) { @@ -1292,8 +1330,16 @@ XVisualInfo * clutter_x11_get_visual_info (void) { ClutterBackendX11 *backend_x11; + ClutterBackend *backend; - backend_x11 = CLUTTER_BACKEND_X11 (clutter_get_default_backend ()); + backend = clutter_get_default_backend (); + if (!CLUTTER_IS_BACKEND_X11 (backend)) + { + g_critical ("The Clutter backend is not a X11 backend."); + return NULL; + } + + backend_x11 = CLUTTER_BACKEND_X11 (backend); return _clutter_backend_x11_get_visual_info (backend_x11); } @@ -1348,9 +1394,3 @@ _clutter_x11_input_device_translate_screen_coord (ClutterInputDevice *device, return TRUE; } - -GType -_clutter_backend_impl_get_type (void) -{ - return _clutter_backend_x11_get_type (); -} diff --git a/clutter/x11/clutter-x11-texture-pixmap.c b/clutter/x11/clutter-x11-texture-pixmap.c index 0b459fc04..265b1379f 100644 --- a/clutter/x11/clutter-x11-texture-pixmap.c +++ b/clutter/x11/clutter-x11-texture-pixmap.c @@ -529,7 +529,6 @@ clutter_x11_texture_pixmap_class_init (ClutterX11TexturePixmapClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass); GParamSpec *pspec; - ClutterBackend *default_backend; g_type_class_add_private (klass, sizeof (ClutterX11TexturePixmapPrivate)); @@ -714,15 +713,6 @@ clutter_x11_texture_pixmap_class_init (ClutterX11TexturePixmapClass *klass) g_signal_override_class_handler ("queue-damage-redraw", CLUTTER_X11_TYPE_TEXTURE_PIXMAP, G_CALLBACK (clutter_x11_texture_pixmap_real_queue_damage_redraw)); - - default_backend = clutter_get_default_backend (); - - if (!CLUTTER_IS_BACKEND_X11 (default_backend)) - { - g_critical ("ClutterX11TexturePixmap instantiated with a " - "non-X11 backend"); - return; - } } static void @@ -954,13 +944,17 @@ clutter_x11_texture_pixmap_set_window (ClutterX11TexturePixmap *texture, { ClutterX11TexturePixmapPrivate *priv; XWindowAttributes attr; - Display *dpy = clutter_x11_get_default_display (); + Display *dpy; g_return_if_fail (CLUTTER_X11_IS_TEXTURE_PIXMAP (texture)); if (!clutter_x11_has_composite_extension ()) return; + dpy = clutter_x11_get_default_display (); + if (dpy == NULL) + return; + #if HAVE_XCOMPOSITE priv = texture->priv; @@ -1058,7 +1052,7 @@ clutter_x11_texture_pixmap_sync_window_internal (ClutterX11TexturePixmap *textur priv->window_height = height; priv->override_redirect = override_redirect; - if (!clutter_x11_has_composite_extension()) + if (!clutter_x11_has_composite_extension ()) { /* FIXME: this should just be an error, this is unlikely to work worth anything */ clutter_x11_texture_pixmap_set_pixmap (texture, priv->window); @@ -1148,12 +1142,15 @@ clutter_x11_texture_pixmap_sync_window (ClutterX11TexturePixmap *texture) if (priv->destroyed) return; - if (priv->window) + if (priv->window != None) { - XWindowAttributes attr; Display *dpy = clutter_x11_get_default_display (); + XWindowAttributes attr; Status status; + if (dpy == NULL) + return; + clutter_x11_trap_x_errors (); status = XGetWindowAttributes (dpy, priv->window, &attr); diff --git a/configure.ac b/configure.ac index 5903c735d..6a3a89346 100644 --- a/configure.ac +++ b/configure.ac @@ -77,10 +77,18 @@ CLUTTER_LT_REV=lt_revision CLUTTER_LT_AGE=lt_age CLUTTER_LT_VERSION="$CLUTTER_LT_CURRENT:$CLUTTER_LT_REV:$CLUTTER_LT_AGE" CLUTTER_LT_LDFLAGS="-version-info $CLUTTER_LT_VERSION" +AC_SUBST([CLUTTER_LT_CURRENT], [lt_current]) +AC_SUBST([CLUTTER_LT_REVISION], [lt_revision]) +AC_SUBST([CLUTTER_LT_VERSION], [$CLUTTER_LT_VERSION]) AC_PROG_SED AC_CANONICAL_HOST + +platform_win32=no +platform_quartz=no +platform_linux=no + AC_MSG_CHECKING([if building for some Win32 platform]) AS_CASE([$host], [*-*-mingw*|*-*-cygwin*], @@ -89,15 +97,19 @@ AS_CASE([$host], platform_win32=yes ], - [platform_win32=no] + [] ) AC_MSG_RESULT([$platform_win32]) + AM_CONDITIONAL(OS_WIN32, [test "$platform_win32" = "yes"]) AC_CHECK_HEADER([OpenGL/gl.h], [platform_quartz=yes], [platform_quartz=no]) AM_CONDITIONAL(OS_QUARTZ, [test "$platform_quartz" = "yes"]) -AC_SUBST(CLUTTER_LT_VERSION) +AC_CHECK_HEADER([GL/glx.h], [platform_glx=yes], [platform_glx=no]) +AC_CHECK_LIB([GL], [glXCreateContext], [platform_glx=yes], [platform_glx=no]) +AM_CONDITIONAL(OS_GLX, [test "$platform_glx" = "yes"]) + AC_SUBST(CLUTTER_LT_LDFLAGS) dnl ======================================================================== @@ -176,17 +188,10 @@ AS_IF([test "x$platform_win32" = "xyes"], [CLUTTER_FLAVOUR=win32], FLAVOUR_LIBS="" FLAVOUR_CFLAGS="" -CLUTTER_WINSYS_BASE= -CLUTTER_WINSYS_BASE_LIB= -CLUTTER_WINSYS= +CLUTTER_BACKENDS="" experimental_backend=no -AC_ARG_WITH([flavour], - [AS_HELP_STRING([--with-flavour=@<:@glx/opengl-egl-xlib/wayland/eglx/eglnative/osx/win32/cex100@:>@], - [Select the Clutter window system backend])], - [CLUTTER_FLAVOUR=$with_flavour]) - # base dependencies for core CLUTTER_BASE_PC_FILES="cogl-1.0 >= $COGL_REQ_VERSION cairo-gobject >= $CAIRO_REQ_VERSION atk >= $ATK_REQ_VERSION pangocairo >= $PANGO_REQ_VERSION cogl-pango-1.0 json-glib-1.0 >= $JSON_GLIB_REQ_VERSION" @@ -195,208 +200,67 @@ BACKEND_PC_FILES="" dnl === Clutter windowing system backend ====================================== -AS_CASE([$CLUTTER_FLAVOUR], +AC_ARG_ENABLE([x11], + [AS_HELP_STRING([--enable-x11=@<:@yes/no@:>@], [Enable the X11 backend (default=no)])], + [], + [enable_x11=maybe]) +AC_ARG_ENABLE([win32], + [AS_HELP_STRING([--enable-win32=@<:@yes/no@:>@], [Enable the Windows backend (default=no)])], + [], + [enable_win32=maybe]) +AC_ARG_ENABLE([osx], + [AS_HELP_STRING([--enable-osx=@<:@yes/no@:>@], [Enable the OS X backend (default=no)])], + [], + [enable_osx=maybe]) +AC_ARG_ENABLE([gdk], + [AS_HELP_STRING([--enable-gdk=@<:@yes/no@:>@], [Enable the GDK backend (default=no)])], + [], + [enable_gdk=no]) +AC_ARG_ENABLE([wayland], + [AS_HELP_STRING([--enable-wayland=@<:@yes/no@:>@], [Enable the Wayland client backend (default=no)])], + [], + [enable_wayland=no]) +AC_ARG_ENABLE([egl], + [AS_HELP_STRING([--enable-egl=@<:@yes/no@:>@], [Enable the EGL framebuffer backend (default=no)])] + [], + [enable_egl=no]) - [glx], - [ - CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_X11" +dnl Define default values +AS_IF([test "x$platform_glx" = "xyes"], [enable_x11=yes]) +AS_IF([test "x$platform_win32" = "xyes"], [enable_win32=yes]) +AS_IF([test "x$platform_quartz" = "xyes"], [enable_osx=yes]) - SUPPORT_X11=1 - SUPPORT_XLIB=1 - SUPPORT_GLX=1 - - CLUTTER_WINSYS=x11 - CLUTTER_WINSYS_BASE=cogl - CLUTTER_SONAME_INFIX=glx - - # Mesa 7.3 added a GL pkg-config file, finally - PKG_CHECK_EXISTS([gl], - [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], - # if a pkg-config file isn't found just add -lGL - # and hope for the best. - [FLAVOUR_LIBS="$FLAVOUR_LIBS -lGL"]) - - # We might fall back to DRM for sync-to-vblank on GLX - PKG_CHECK_EXISTS([libdrm], - [ - AC_DEFINE([HAVE_DRM], [1], [Have libdrm support]) - BACKEND_PC_FILES="$BACKEND_PC_FILES libdrm" - ], - []) - ], - - [gdk], - [ - CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_GDK" - - # We don't claim to support X11 (even though that's the preferred - # GDK backend), to avoid building all the ClutterX11 stuff - SUPPORT_GDK=1 - - CLUTTER_WINSYS=gdk - CLUTTER_WINSYS_BASE=cogl - CLUTTER_SONAME_INFIX=gdk - - BACKEND_PC_FILES="$BACKEND_PC_FILES gdk-3.0" - PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], []) - ], - - [opengl-egl-xlib], - [ - CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_X11" - CLUTTER_EGL_BACKEND="generic" - - SUPPORT_X11=1 - SUPPORT_XLIB=1 - SUPPORT_EGL=1 - SUPPORT_EGL_PLATFORM_POWERVR_X11=1 - - CLUTTER_WINSYS=x11 - CLUTTER_WINSYS_BASE=cogl - # I think this winsys can be API and ABI compatible with the - # glx flavour so we can also be cheeky and use the same soname - CLUTTER_SONAME_INFIX=glx - - PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], []) - PKG_CHECK_EXISTS([egl], [BACKEND_PC_FILES="$BACKEND_PC_FILES egl"], []) - ], - - [wayland], - [ - experimental_backend="yes" - CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_WAYLAND" - - SUPPORT_WAYLAND=1 - - CLUTTER_WINSYS=wayland - CLUTTER_SONAME_INFIX=wayland - - PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], []) - PKG_CHECK_EXISTS([egl], [BACKEND_PC_FILES="$BACKEND_PC_FILES egl"], []) - PKG_CHECK_EXISTS([wayland-client xkbcommon], - [BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-client xkbcommon"], []) - ], - - [eglx], - [ - CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_X11" - CLUTTER_EGL_BACKEND="generic" - - SUPPORT_X11=1 - SUPPORT_XLIB=1 - SUPPORT_EGL=1 - SUPPORT_EGL_PLATFORM_POWERVR_X11=1 - - CLUTTER_WINSYS=x11 - CLUTTER_WINSYS_BASE=cogl - CLUTTER_SONAME_INFIX=eglx - ], - - [eglnative], - [ - CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_EGL" - CLUTTER_EGL_BACKEND="generic" - - SUPPORT_EGL=1 - SUPPORT_EGL_PLATFORM_POWERVR_NULL=1 - - PKG_CHECK_MODULES(TSLIB, [tslib-1.0], [have_tslib=yes], [have_tslib=no]) - AS_IF([test "x$have_tslib" = "xyes"], - [AC_DEFINE([HAVE_TSLIB], [1], [Have tslib for touchscreen handling])] - ) - - # evdev - PKG_CHECK_MODULES(EVDEV, [gudev-1.0 xkbcommon], - [have_evdev=yes], [have_evdev=no]) - AS_IF([test "x$have_evdev" = "xyes"], - [AC_DEFINE([HAVE_EVDEV], 1, - [Have evdev support for input handling])] - ) - - # Make sure we don't enable tslib and evdev at the same time, we - # don't support multiple event backends yet. - AS_IF([test "x$have_tslib" = "xyes" -a "x$have_evdev" = "xyes"], - [AC_MSG_ERROR([Cannot enable both tslib and evdev events])]) - - FLAVOUR_LIBS="$FLAVOUR_LIBS $TSLIB_LIBS $EVDEV_LIBS" - FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $TSLIB_CFLAGS $EVDEV_CFLAGS" - - CLUTTER_WINSYS=cogl - CLUTTER_SONAME_INFIX=eglnative - ], - - [cex100], - [ - CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_EGL" - CLUTTER_EGL_BACKEND="cex100" - - SUPPORT_EGL=1 - SUPPORT_EGL_PLATFORM_GDL=1 - - # The cex100 is a small specialization of the EGL backend - CLUTTER_WINSYS=cogl - CLUTTER_SONAME_INFIX=cex100 - - found_gdl=no - AC_CHECK_HEADERS([libgdl.h], [found_gdl=yes]) - AS_IF([test "x$found_gdl" = "xno"], - [AC_CHECK_HEADERS([CE4100/libgdl.h], - [ - FLAVOUR_CFLAGS="-I/usr/include/CE4100" - found_gdl=yes - CLUTTER_CEX100_LIBGDL_PREFIX=CE4100/ - ]) - ]) - AC_SUBST(CLUTTER_CEX100_LIBGDL_PREFIX) - - AS_IF([test x"$found_gdl" = "xno"], [AC_MSG_ERROR([libgdl.h not found])]) - - # evdev - PKG_CHECK_MODULES(EVDEV, [gudev-1.0 xkbcommon], - [have_evdev=yes], [have_evdev=no]) - AS_IF([test "x$have_evdev" = "xyes"], - [AC_DEFINE([HAVE_EVDEV], 1, - [Have evdev support for input handling])] - ) - - FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $EVDEV_CFLAGS" - FLAVOUR_LIBS="$FLAVOUR_LIBS -lgdl $EVDEV_LIBS" - ], - - [osx], - [ - CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_OSX" - - AC_DEFINE([HAVE_CLUTTER_OSX], [1], [Have the OSX backend]) - - FLAVOUR_LIBS="$FLAVOUR_LIBS -framework Cocoa -framework OpenGL" - - CLUTTER_WINSYS=osx - CLUTTER_SONAME_INFIX=osx - ], - - [win32], - [ - CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_WIN32" - AC_DEFINE([HAVE_CLUTTER_WIN32], [1], [Have the Win32 backend]) - - FLAVOUR_LIBS="$FLAVOUR_LIBS -lopengl32 -lgdi32 -lwinmm" - FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS -D_WIN32_WINNT=0x0500" - - AC_CHECK_TOOL(WINDRES, windres, no) - if test "$WINDRES" = no; then - AC_MSG_ERROR([*** windres is required]) - fi - - CLUTTER_WINSYS=win32 - CLUTTER_SONAME_INFIX=win32 - ], - - [AC_MSG_ERROR([Invalid backend for Clutter])] -) - -AS_IF([test "x$SUPPORT_X11" = "x1"], +dnl Per-backend rules +AS_IF([test "x$enable_x11" = "xyes"], [ + CLUTTER_BACKENDS="$CLUTTER_BACKENDS x11" + + SUPPORT_X11=1 + SUPPORT_GLX=1 + SUPPORT_COGL=1 + + # Mesa 7.3 added a GL pkg-config file, finally, but if a pkg-config + # file isn't found just add -lGL and hope for the best. + PKG_CHECK_EXISTS([gl], + [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], + [FLAVOUR_LIBS="$FLAVOUR_LIBS -lGL"]) + + # if Mesa has support for egl, we can use it as well + PKG_CHECK_EXISTS([egl], + [ + BACKEND_PC_FILES="$BACKEND_PC_FILES egl" + SUPPORT_EGL=1 + ], + []) + + # We might fall back to DRM for sync-to-vblank on GLX + PKG_CHECK_EXISTS([libdrm], + [ + AC_DEFINE([HAVE_DRM], [1], [Have libdrm support]) + BACKEND_PC_FILES="$BACKEND_PC_FILES libdrm" + ], + []) + # we use fontconfig API and pango-fc when the fontconfig # configuration changes PKG_CHECK_EXISTS([pangoft2], @@ -405,45 +269,167 @@ AS_IF([test "x$SUPPORT_X11" = "x1"], BACKEND_PC_FILES="$BACKEND_PC_FILES pangoft2" ], []) - ]) -AS_IF([test "x$SUPPORT_GLX" = "x1"], - [ AC_DEFINE([HAVE_CLUTTER_GLX], [1], [Have the GLX backend]) ]) -AS_IF([test "x$SUPPORT_WAYLAND" = "x1"], +AS_IF([test "x$enable_gdk" = "xyes"], [ + CLUTTER_BACKENDS="$CLUTTER_BACKENDS gdk" + + SUPPORT_GDK=1 + SUPPORT_COGL=1 + + BACKEND_PC_FILES="$BACKEND_PC_FILES gdk-3.0" + PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], []) + ]) + +AS_IF([test "x$enable_wayland" = "xyes"], + [ + CLUTTER_BACKENDS="$CLUTTER_BACKENDS wayland" + + experimental_backend="yes" + + SUPPORT_WAYLAND=1 + + PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], []) + PKG_CHECK_EXISTS([egl], [BACKEND_PC_FILES="$BACKEND_PC_FILES egl"], []) + PKG_CHECK_EXISTS([wayland-client xkbcommon], + [BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-client xkbcommon"], + []) + AC_DEFINE([HAVE_CLUTTER_WAYLAND], [1], [Have the Wayland backend]) ]) -AS_IF([test "x$SUPPORT_EGL" = "x1"], +AS_IF([test "x$enable_egl" = "xyes"], [ + CLUTTER_BACKENDS="$CLUTTER_BACKENDS egl" + + SUPPORT_EGL=1 + SUPPORT_COGL=1 + + AC_ARG_WITH([tslib], + [AS_HELP_STRING([--with-tslib=@<:@yes/no@:>@], [Use TSLib for events])], + [], + [with_tslib=yes]) + + AC_ARG_WITH([evdev], + [AS_HELP_STRING([--with-evdev=@<:@yes/no@:>@], [Use evdev for events])], + [], + [with_evdev=yes]) + + AC_ARG_WITH([gdl], + [AS_HELP_STRING([--with-gdl=@<:@yes/no@:>@], [Use libgdl for CE3100/CE4100 support])], + [], + [with_gdl=no]) + + AS_IF([test "x$with_tslib" = "xyes"], + [ + PKG_CHECK_MODULES(TSLIB, [tslib-1.0], [have_tslib=yes], [have_tslib=no]) + AS_IF([test "x$have_tslib" = "xyes"], + [ + AC_DEFINE([HAVE_TSLIB], [1], [Have tslib for touchscreen handling]) + ]) + ]) + + AS_IF([test "x$with_evdev" = "xyes"], + [ + PKG_CHECK_MODULES(EVDEV, [gudev-1.0 xkbcommon], [have_evdev=yes], [have_evdev=no]) + AS_IF([test "x$have_evdev" = "xyes"], + [ + AC_DEFINE([HAVE_EVDEV], [1], [Have evdev support for input handling]) + ]) + ]) + + AS_IF([test "x$with_gdl" = "xyes"], + [ + have_gdl=no + + AC_CHECK_HEADERS([libgdl.h], [have_gdl=yes]) + + AS_IF([test "x$have_gdl" = "xno"], + [ + AC_CHECK_HEADERS([CE4100/libgdl.h], + [ + FLAVOUR_CFLAGS="-I/usr/include/CE4100" + have_gdl=yes + CLUTTER_CEX100_LIBGDL_PREFIX=CE4100/ + ]) + ]) + + AC_SUBST(CLUTTER_CEX100_LIBGDL_PREFIX) + + AS_IF([test "x$have_gdl" = "xno"], [AC_MSG_ERROR([libgdl.h not found])]) + + FLAVOUR_LIBS="$FLAVOUR_LIBS -lgdl" + + SUPPORT_EGL_PLATFORM_GDL=1 + + AC_DEFINE([CLUTTER_EGL_BACKEND_CEX100], [1], [Use CEX100 EGL backend]) + ]) + + # Make sure we don't enable tslib and evdev at the same time, we + # don't support multiple event backends yet. + AS_IF([test "x$have_tslib" = "xyes" -a "x$have_evdev" = "xyes"], + [ + AC_MSG_ERROR([Cannot enable both tslib and evdev events]) + ]) + + FLAVOUR_LIBS="$FLAVOUR_LIBS $TSLIB_LIBS $EVDEV_LIBS" + FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $TSLIB_CFLAGS $EVDEV_CFLAGS" + + AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend]) + AC_DEFINE([HAVE_CLUTTER_EGL], [1], [Have the EGL backend]) ]) -AS_IF([test "x$CLUTTER_EGL_BACKEND" = "xgeneric"], - AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend])) +AS_IF([test "x$enable_osx" = "xyes"], + [ + CLUTTER_BACKENDS="$CLUTTER_BACKENDS osx" -AS_IF([test "x$CLUTTER_EGL_BACKEND" = "xcex100"], - AC_DEFINE([CLUTTER_EGL_BACKEND_CEX100], [1], [Use CEX100 EGL backend])) + AC_DEFINE([HAVE_CLUTTER_OSX], [1], [Have the OSX backend]) -# winsys conditionals for use in automake files... -AM_CONDITIONAL(SUPPORT_GLX, [test "x$SUPPORT_GLX" = "x1"]) -AM_CONDITIONAL(SUPPORT_X11, [test "x$SUPPORT_X11" = "x1"]) -AM_CONDITIONAL(SUPPORT_XLIB, [test "x$SUPPORT_XLIB" = "x1"]) -AM_CONDITIONAL(SUPPORT_GDK, [test "x$SUPPORT_GDK" = "x1"]) -AM_CONDITIONAL(SUPPORT_EGL, [test "x$SUPPORT_EGL" = "x1"]) -AM_CONDITIONAL(SUPPORT_OSX, [test "x$CLUTTER_WINSYS" = "xosx"]) -AM_CONDITIONAL(SUPPORT_WIN32, [test "x$CLUTTER_WINSYS" = "xwin32"]) -AM_CONDITIONAL(SUPPORT_CEX100, [test "x$SUPPORT_EGL_PLATFORM_GDL" = "x1"]) -AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$CLUTTER_WINSYS" = "xwayland"]) -AM_CONDITIONAL(SUPPORT_STUB, [test "x$CLUTTER_WINSYS" = "xwin32" -o \ - "x$CLUTTER_WINSYS" = "xosx" -o \ - "x$CLUTTER_WINSYS" = "xwayland"]) + FLAVOUR_LIBS="$FLAVOUR_LIBS -framework Cocoa -framework OpenGL" + SUPPORT_OSX=1 + ]) + +AS_IF([test "x$enable_win32" = "xyes"], + [ + CLUTTER_BACKENDS="$CLUTTER_BACKENDS win32" + + AC_DEFINE([HAVE_CLUTTER_WIN32], [1], [Have the Win32 backend]) + + FLAVOUR_LIBS="$FLAVOUR_LIBS -lopengl32 -lgdi32 -lwinmm" + FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS -D_WIN32_WINNT=0x0500" + + AC_CHECK_TOOL(WINDRES, [windres], [AC_MSG_ERROR([*** windres is required])]) + + SUPPORT_WIN32=1 + ]) + +AS_IF([test "x$CLUTTER_BACKENDS" = "x"], + [ + AC_MSG_ERROR([No backend enabled. You need to enable at least one backend.]) + ]) + +# conditionals for use in automake files... +AM_CONDITIONAL(SUPPORT_GLX, [test "x$SUPPORT_GLX" = "x1"]) +AM_CONDITIONAL(SUPPORT_X11, [test "x$SUPPORT_X11" = "x1"]) +AM_CONDITIONAL(SUPPORT_GDK, [test "x$SUPPORT_GDK" = "x1"]) +AM_CONDITIONAL(SUPPORT_EGL, [test "x$SUPPORT_EGL" = "x1"]) +AM_CONDITIONAL(SUPPORT_OSX, [test "x$SUPPORT_OSX" = "x1"]) +AM_CONDITIONAL(SUPPORT_WIN32, [test "x$SUPPORT_WIN32" = "x1"]) +AM_CONDITIONAL(SUPPORT_CEX100, [test "x$SUPPORT_EGL_PLATFORM_GDL" = "x1"]) +AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$SUPPORT_WAYLAND" = "x1"]) +AM_CONDITIONAL(SUPPORT_STUB, [test "x$SUPPORT_WIN32" = "x1" -o \ + "x$SUPPORT_OSX" = "x1" -o \ + "x$SUPPORT_WAYLAND" = "x1"]) + +AM_CONDITIONAL(USE_COGL, [test "x$SUPPORT_COGL" = "x1"]) AM_CONDITIONAL(USE_TSLIB, [test "x$have_tslib" = "xyes"]) -AM_CONDITIONAL(SUPPORT_EVDEV, [test "x$have_evdev" = "xyes"]) +AM_CONDITIONAL(USE_EVDEV, [test "x$have_evdev" = "xyes"]) +AM_CONDITIONAL(USE_GLD, [test "x$have_gdl" = "xyes"]) dnl Instead of using AM_CFLAGS to ensure dnl COGL_ENABLE_EXPERIMENTAL_2_0_API is defined while compiling clutter @@ -452,12 +438,16 @@ dnl other tools such as glib-mkenums and gir-scanner don't end up dnl using the define also. AC_DEFINE([COGL_ENABLE_EXPERIMENTAL_2_0_API], [1], [Can use Cogl 2.0 API internally]) +dnl strip leading spaces +CLUTTER_BACKENDS=${CLUTTER_BACKENDS#* } +AC_SUBST(CLUTTER_BACKENDS) + dnl === Clutter configuration ================================================= CLUTTER_CONFIG_DEFINES= # windowing systems -AS_IF([test "x$SUPPORT_XLIB" = "x1"], +AS_IF([test "x$SUPPORT_X11" = "x1"], [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES #define CLUTTER_WINDOWING_X11 1"]) AS_IF([test "x$SUPPORT_GDK" = "x1"], @@ -469,13 +459,13 @@ AS_IF([test "x$SUPPORT_GLX" = "x1"], AS_IF([test "x$SUPPORT_EGL" = "x1"], [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES #define CLUTTER_WINDOWING_EGL 1"]) -AS_IF([test "x$CLUTTER_WINSYS" = "xwayland"], +AS_IF([test "x$SUPPORT_WAYLAND" = "x1"], [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES #define CLUTTER_WINDOWING_WAYLAND 1"]) -AS_IF([test "x$CLUTTER_WINSYS" = "xosx"], +AS_IF([test "x$SUPPORT_OSX" = "x1"], [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES #define CLUTTER_WINDOWING_OSX 1"]) -AS_IF([test "x$CLUTTER_WINSYS" = "xwin32"], +AS_IF([test "x$SUPPORT_WIN32" = "x1"], [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES #define CLUTTER_WINDOWING_WIN32 1"]) AS_IF([test "x$SUPPORT_EGL_PLATFORM_GDL" = "x1"], @@ -484,22 +474,14 @@ AS_IF([test "x$SUPPORT_EGL_PLATFORM_GDL" = "x1"], AC_SUBST([CLUTTER_CONFIG_DEFINES]) -dnl === Clutter substitutions ================================================= -# Eventually the idea of a winsys should be hidden from Clutter and moved -# into Cogl, but for now we have CLUTTER_WINSYS... -AC_SUBST([CLUTTER_WINSYS]) -# The same goes for the winsys-base... -AC_SUBST([CLUTTER_WINSYS_BASE]) -AC_SUBST(CLUTTER_STAGE_TYPE) -AC_SUBST(CLUTTER_SONAME_INFIX) - -CLUTTER_WINSYS_LIB=libclutter-$CLUTTER_SONAME_INFIX-$CLUTTER_API_VERSION.la -AC_SUBST([CLUTTER_WINSYS_LIB]) - dnl === Clutter substitutions kept for backwards compatibility ================ -AC_SUBST([CLUTTER_FLAVOUR]) -CLUTTER_COGL=undefined -AC_SUBST([CLUTTER_COGL]) +AC_SUBST([CLUTTER_WINSYS], [deprecated]) +AC_SUBST([CLUTTER_WINSYS_BASE], [deprecated]) +AC_SUBST([CLUTTER_STAGE_TYPE], [deprecated]) +AC_SUBST([CLUTTER_SONAME_INFIX], [deprecated]) +AC_SUBST([CLUTTER_FLAVOUR], [deprecated]) +AC_SUBST([CLUTTER_COGL], [deprecated]) +AC_SUBST([COGL_DRIVER], [deprecated]) dnl === Image loading backend ================================================= IMAGE_PC_FILES="" @@ -508,7 +490,7 @@ dnl === X11 checks, only for X11-based backends =============================== X11_PC_FILES="" x11_tests=no -AS_IF([test "x$SUPPORT_XLIB" = "x1"], +AS_IF([test "x$SUPPORT_X11" = "x1"], [ # base X11 includes and libraries AC_MSG_CHECKING([for X11]) @@ -689,7 +671,7 @@ AS_IF([test "x$SUPPORT_XLIB" = "x1"], ) AM_CONDITIONAL([BUILD_XI2], [test "x$have_xinput2" = "xyes"]) -AM_CONDITIONAL(X11_TESTS, [test "x$x11_tests" = "xyes"]) +AM_CONDITIONAL([X11_TESTS], [test "x$x11_tests" = "xyes"]) dnl === Enable debug level ==================================================== @@ -1012,8 +994,6 @@ echo " • Global:" echo " Prefix: ${prefix}" echo " Libdir: ${libdir}" echo " Sysconfdir: ${sysconfdir}" -echo " Flavour: ${CLUTTER_WINSYS}" -echo " Target library: ${CLUTTER_WINSYS_LIB}" # Compiler/Debug related flags echo "" @@ -1038,21 +1018,29 @@ echo " Build conformance test suite: ${enable_conformance}" # Clutter backend related flags echo "" -echo " • Clutter Backend:" +echo " • Clutter Backends:" if test "x$experimental_backend" = "xno"; then -echo " Windowing system: ${CLUTTER_WINSYS}" +echo " Windowing systems: ${CLUTTER_BACKENDS}" else -echo " Windowing system: ${CLUTTER_WINSYS} (WARNING: Experimental)" +echo " Windowing systems: ${CLUTTER_BACKENDS} (WARNING: Experimental backends enabled)" fi -if test "x$SUPPORT_XLIB" = "x1"; then +if test "x$SUPPORT_X11" = "x1"; then +echo "" echo " Enable XComposite: ${have_xcomposite}" echo " Enable XInput: ${have_xinput}" echo " Enable Xge: ${have_xge}" echo " Enable XI2: ${have_xinput2}" echo " Enable XKB: ${have_xkb}" -echo " Enable X11 tests: ${x11_tests}" +echo " Build X11-specific tests: ${x11_tests}" +fi + +if test "x$SUPPORT_EGL" = "x1"; then +echo "" +echo " Enable TSLib: ${have_tslib}" +echo " Enable evdev: ${have_evdev}" +echo " Enable GDL: ${have_gdl}" fi echo "" diff --git a/doc/cookbook/examples/Makefile.am b/doc/cookbook/examples/Makefile.am index 22694436f..553459bea 100644 --- a/doc/cookbook/examples/Makefile.am +++ b/doc/cookbook/examples/Makefile.am @@ -57,7 +57,7 @@ INCLUDES = \ -I$(top_builddir)/clutter \ $(NULL) -LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la +LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_API_VERSION@.la AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS) diff --git a/doc/reference/cally/Makefile.am b/doc/reference/cally/Makefile.am index 34c408bff..797d463e6 100644 --- a/doc/reference/cally/Makefile.am +++ b/doc/reference/cally/Makefile.am @@ -79,7 +79,7 @@ expand_content_files= \ # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/clutter -I$(top_srcdir)/clutter/cogl -I$(top_builddir) -I$(top_builddir)/clutter -I$(top_builddir)/clutter/cogl $(CLUTTER_CFLAGS) -GTKDOC_LIBS=$(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS) +GTKDOC_LIBS=$(top_builddir)/clutter/libclutter-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make diff --git a/doc/reference/clutter/Makefile.am b/doc/reference/clutter/Makefile.am index 7dc39eeca..901ac5940 100644 --- a/doc/reference/clutter/Makefile.am +++ b/doc/reference/clutter/Makefile.am @@ -162,7 +162,7 @@ expand_content_files= \ # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/clutter -I$(top_srcdir)/clutter/cogl -I$(top_builddir) -I$(top_builddir)/clutter -I$(top_builddir)/clutter/cogl $(CLUTTER_CFLAGS) -GTKDOC_LIBS=$(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS) +GTKDOC_LIBS=$(top_builddir)/clutter/libclutter-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make diff --git a/tests/accessibility/Makefile.am b/tests/accessibility/Makefile.am index 85aa43a7c..7d8572e94 100644 --- a/tests/accessibility/Makefile.am +++ b/tests/accessibility/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/build/autotools/Makefile.am.silent common_ldadd = \ - $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la + $(top_builddir)/clutter/libclutter-@CLUTTER_API_VERSION@.la common_sources = \ cally-examples-util.c \ diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am index f017f2c7c..84b4c385a 100644 --- a/tests/conform/Makefile.am +++ b/tests/conform/Makefile.am @@ -165,7 +165,7 @@ test_conformance_CPPFLAGS = \ test_conformance_CFLAGS = -g $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS) -test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS) +test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS) test_conformance_LDFLAGS = -export-dynamic diff --git a/tests/interactive/Makefile.am b/tests/interactive/Makefile.am index cf324ec0e..f384742f8 100644 --- a/tests/interactive/Makefile.am +++ b/tests/interactive/Makefile.am @@ -128,7 +128,7 @@ INCLUDES = \ -I$(top_builddir)/clutter \ -I$(top_builddir)/clutter/cogl -common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la +common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_API_VERSION@.la noinst_PROGRAMS = test-interactive diff --git a/tests/micro-bench/Makefile.am b/tests/micro-bench/Makefile.am index 4824bb213..8739da6cc 100644 --- a/tests/micro-bench/Makefile.am +++ b/tests/micro-bench/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/build/autotools/Makefile.am.silent -common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la +common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_API_VERSION@.la noinst_PROGRAMS = \ test-text \ diff --git a/tests/performance/Makefile.am b/tests/performance/Makefile.am index 337cf66a8..14a4415e4 100644 --- a/tests/performance/Makefile.am +++ b/tests/performance/Makefile.am @@ -14,7 +14,7 @@ INCLUDES = \ -I$(top_srcdir)/clutter \ -I$(top_builddir)/clutter -common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la +common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_API_VERSION@.la LDADD = $(common_ldadd) $(CLUTTER_LIBS) -lm