Make libmutter and friends parallel installable

In order to minimize the amount of breakage, while at the same time
making it easier to make backward incompatible changes needed to
continue turning libmutter into a capable Wayland compositor, make the
libmutter and friends (libmutter-clutter, libmutter-cogl*) parallel
installable by adding a version number to the name. This changes
various filenames, for example what previously was libmutter.so is now
libmutter-0.so (assuming the version for now is 0), and
libmutter-clutter-1.0.so is now libmutter-clutter-0.so. The pkg-config
filenames and GObject introspection has been renamed to reflect this as
well.

This enables a downstream compositor rely on a specific version of the
libmutter API, while gracefully handling API/ABI changes by having to
update to the new version at their own pace.

https://bugzilla.gnome.org/show_bug.cgi?id=777317
This commit is contained in:
Jonas Ådahl 2016-11-26 00:16:07 +08:00
parent 7c80e80a92
commit 4ebc55f2b3
26 changed files with 230 additions and 181 deletions

1
.gitignore vendored
View File

@ -86,6 +86,7 @@ src/pointer-constraints-unstable-v*-server-protocol.h
src/xdg-foreign-unstable-v*-protocol.c
src/xdg-foreign-unstable-v*-server-protocol.h
src/meta/meta-version.h
src/libmutter-*.pc
doc/reference/*.args
doc/reference/*.bak
doc/reference/*.hierarchy

View File

@ -37,7 +37,7 @@ AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
INTROSPECTION_GIRS =
# the base include path for headers
clutter_base_includedir = $(includedir)/mutter/clutter-$(CLUTTER_API_VERSION)
clutter_base_includedir = $(includedir)/mutter/clutter-$(LIBMUTTER_API_VERSION)
clutter_includedir = $(clutter_base_includedir)/clutter
clutter_deprecateddir = $(clutter_base_includedir)/clutter/deprecated
@ -356,7 +356,7 @@ EXTRA_DIST += clutter-version.h.in clutter-version.h
# key symbol update script
EXTRA_DIST += clutter-keysyms-update.pl
pc_files += mutter-clutter-$(CLUTTER_API_VERSION).pc
pc_files += mutter-clutter-$(LIBMUTTER_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
@ -442,10 +442,10 @@ x11_introspection = $(x11_source_c) $(x11_source_h)
clutterx11_includedir = $(clutter_includedir)/x11
clutterx11_include_HEADERS = $(x11_source_h)
mutter-clutter-x11-$(CLUTTER_API_VERSION).pc: mutter-clutter-$(CLUTTER_API_VERSION).pc
mutter-clutter-x11-@LIBMUTTER_API_VERSION@.pc: mutter-clutter-$(LIBMUTTER_API_VERSION).pc
$(QUIET_GEN)cp -f $< $(@F)
pc_files += mutter-clutter-x11-$(CLUTTER_API_VERSION).pc
pc_files += mutter-clutter-x11-$(LIBMUTTER_API_VERSION).pc
# Shared cogl backend files
cogl_source_h =
@ -583,17 +583,17 @@ nodist_clutter_include_HEADERS = clutter-config.h $(built_source_h)
clutter_deprecated_HEADERS = $(deprecated_h)
mutterlibdir = $(libdir)/mutter
mutterlib_LTLIBRARIES = libmutter-clutter-@CLUTTER_API_VERSION@.la
mutterlib_LTLIBRARIES = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
libmutter_clutter_@CLUTTER_API_VERSION@_la_LIBADD = \
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_LIBADD = \
$(LIBM) \
$(CLUTTER_LIBS) \
$(top_builddir)/../cogl/cogl/libmutter-cogl.la \
$(top_builddir)/../cogl/cogl-pango/libmutter-cogl-pango.la \
$(top_builddir)/../cogl/cogl-path/libmutter-cogl-path.la \
$(top_builddir)/../cogl/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la \
$(top_builddir)/../cogl/cogl-pango/libmutter-cogl-pango-$(LIBMUTTER_API_VERSION).la \
$(top_builddir)/../cogl/cogl-path/libmutter-cogl-path-$(LIBMUTTER_API_VERSION).la \
$(NULL)
libmutter_clutter_@CLUTTER_API_VERSION@_la_SOURCES = \
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
$(backend_source_c) \
$(backend_source_h) \
$(backend_source_c_priv) \
@ -611,12 +611,12 @@ libmutter_clutter_@CLUTTER_API_VERSION@_la_SOURCES = \
$(cally_sources_private) \
$(NULL)
nodist_libmutter_clutter_@CLUTTER_API_VERSION@_la_SOURCES = \
nodist_libmutter_clutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
$(backend_source_built) \
$(built_source_c) \
$(built_source_h)
libmutter_clutter_@CLUTTER_API_VERSION@_la_LDFLAGS = \
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
$(CLUTTER_LINK_FLAGS) \
$(CLUTTER_LT_LDFLAGS) \
-export-dynamic \
@ -630,13 +630,13 @@ install-exec-local:
rm -f $$lib.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION); \
) ; \
(cd $(DESTDIR)$(mutterlibdir) && \
{ ln -s -f libmutter-clutter-$(CLUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0 || \
{ rm -f $$lib.0 && ln -s libmutter-clutter-1.0.so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0; }; \
{ ln -s -f libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0 || \
{ rm -f $$lib.0 && ln -s libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0; }; \
} \
) ; \
(cd $(DESTDIR)$(mutterlibdir) && \
{ ln -s -f libmutter-clutter-$(CLUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib || \
{ rm -f $$lib && ln -s libmutter-clutter-1.0.so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib; }; \
{ ln -s -f libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib || \
{ rm -f $$lib && ln -s libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib; }; \
} \
) ; \
done
@ -644,59 +644,65 @@ install-exec-local:
# gobject-introspection rules
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_builddir)/../cogl/cogl --add-include-path=$(top_builddir)/../cogl/cogl-pango
INTROSPECTION_COMPILER_ARGS = --includedir=$(top_builddir)/../cogl/cogl --includedir=$(top_builddir)/../cogl/cogl-pango
INTROSPECTION_SCANNER_ARGS = \
--add-include-path=$(top_builddir)/../cogl/cogl \
--add-include-path=$(top_builddir)/../cogl/cogl-pango
INTROSPECTION_COMPILER_ARGS = \
--includedir=$(top_builddir)/../cogl/cogl \
--includedir=$(top_builddir)/../cogl/cogl-pango
INTROSPECTION_SCANNER_ENV = \
PKG_CONFIG_PATH=$(top_builddir)/../cogl/cogl/:$(top_builddir)/../cogl/cogl-pango/:$${PKG_CONFIG_PATH}
Clutter-@CLUTTER_API_VERSION@.gir: libmutter-clutter-@CLUTTER_API_VERSION@.la Makefile
Clutter-@LIBMUTTER_API_VERSION@.gir: libmutter-clutter-@LIBMUTTER_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 = libmutter-clutter-@CLUTTER_API_VERSION@.la
Clutter_@CLUTTER_API_VERSION_AM@_gir_FILES = \
Clutter_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = Clutter
Clutter_@LIBMUTTER_API_VERSION@_gir_VERSION = @LIBMUTTER_API_VERSION@
Clutter_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
Clutter_@LIBMUTTER_API_VERSION@_gir_FILES = \
$(clutter_include_HEADERS) \
$(clutter_deprecated_HEADERS) \
$(nodist_clutter_include_HEADERS) \
$(source_c) \
$(deprecated_c) \
$(built_source_c)
Clutter_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
Clutter_@CLUTTER_API_VERSION_AM@_gir_INCLUDES = GL-1.0 GObject-2.0 cairo-1.0 Cogl-1.0 CoglPango-1.0 Atk-1.0 Json-1.0
Clutter_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \
Clutter_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
Clutter_@LIBMUTTER_API_VERSION@_gir_INCLUDES = GL-1.0 GObject-2.0 cairo-1.0 Cogl-@LIBMUTTER_API_VERSION@ CoglPango-@LIBMUTTER_API_VERSION@ Atk-1.0 Json-1.0
Clutter_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
--warn-all \
--c-include='clutter/clutter.h' \
--pkg-export=mutter-clutter-@CLUTTER_API_VERSION@
--pkg-export=mutter-clutter-@LIBMUTTER_API_VERSION@
INTROSPECTION_GIRS += Clutter-@CLUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += Clutter-@LIBMUTTER_API_VERSION@.gir
Cally-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir
Cally-@LIBMUTTER_API_VERSION@.gir: Makefile Clutter-@LIBMUTTER_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 = libmutter-clutter-@CLUTTER_API_VERSION@.la
Cally_@CLUTTER_API_VERSION_AM@_gir_FILES = $(cally_sources_h) $(cally_sources_c)
Cally_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
Cally_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \
Cally_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = Cally
Cally_@LIBMUTTER_API_VERSION@_gir_VERSION = @LIBMUTTER_API_VERSION@
Cally_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
Cally_@LIBMUTTER_API_VERSION@_gir_FILES = $(cally_sources_h) $(cally_sources_c)
Cally_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
Cally_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
--warn-all \
--c-include='cally/cally.h' \
--pkg-export=mutter-cally-@CLUTTER_API_VERSION@ \
--include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir
--pkg-export=mutter-cally-@LIBMUTTER_API_VERSION@ \
--include-uninstalled=$(top_builddir)/clutter/Clutter-@LIBMUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += Cally-@CLUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += Cally-@LIBMUTTER_API_VERSION@.gir
ClutterX11-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir
ClutterX11-@LIBMUTTER_API_VERSION@.gir: Makefile Clutter-@LIBMUTTER_API_VERSION@.gir
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_NAMESPACE = ClutterX11
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_INCLUDES = xlib-2.0
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_LIBS = libmutter-clutter-@CLUTTER_API_VERSION@.la
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_FILES = $(x11_introspection)
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \
ClutterX11_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = ClutterX11
ClutterX11_@LIBMUTTER_API_VERSION@_gir_INCLUDES = xlib-2.0
ClutterX11_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
ClutterX11_@LIBMUTTER_API_VERSION@_gir_FILES = $(x11_introspection)
ClutterX11_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
ClutterX11_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
--warn-all \
--c-include='clutter/x11/clutter-x11.h' \
--pkg-export=mutter-clutter-x11-@CLUTTER_API_VERSION@ \
--include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir
--pkg-export=mutter-clutter-x11-@LIBMUTTER_API_VERSION@ \
--include-uninstalled=$(top_builddir)/clutter/Clutter-@LIBMUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += ClutterX11-@CLUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += ClutterX11-@LIBMUTTER_API_VERSION@.gir
# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
# install anything - we need to install inside our prefix.

View File

@ -3,8 +3,8 @@ exec_prefix=@exec_prefix@
libdir=@libdir@/mutter
includedir=@includedir@/mutter
apiversion=@CLUTTER_API_VERSION@
requires=@CLUTTER_REQUIRES@ mutter-cogl-1.0
apiversion=@LIBMUTTER_API_VERSION@
requires=@CLUTTER_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@
requires_private=@CLUTTER_REQUIRES_PRIVATE@
backends=@CLUTTER_BACKENDS@
@ -17,7 +17,7 @@ cogl_driver=deprecated
Name: Mutter Clutter
Description: Mutter's Clutter Private Library
Version: @VERSION@
Version: @MUTTER_VERSION@
Libs: -L${libdir} -lmutter-clutter-${apiversion}
Cflags: -I${includedir}/clutter-${apiversion}
Requires: ${requires}

View File

@ -42,9 +42,6 @@ m4_define([clutter_release_status],
m4_define([clutter_version], [clutter_major_version.clutter_minor_version.clutter_micro_version])
# change this only when breaking the API
m4_define([clutter_api_version], [1.0])
AC_PREREQ([2.63])
AC_INIT([clutter],
@ -61,12 +58,18 @@ AC_CONFIG_MACRO_DIR([build/autotools])
AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
AM_SILENT_RULES([yes])
dnl = Check that we are configured by mutter ==============================
AC_ARG_VAR([MUTTER_VERSION])
AC_ARG_VAR([LIBMUTTER_API_VERSION])
AS_IF([test "x$MUTTER_VERSION" = "x"],
[AC_MSG_ERROR([Clutter can only be configured by mutter])],)
AC_SUBST([CLUTTER_MAJOR_VERSION], [clutter_major_version])
AC_SUBST([CLUTTER_MINOR_VERSION], [clutter_minor_version])
AC_SUBST([CLUTTER_MICRO_VERSION], [clutter_micro_version])
AC_SUBST([CLUTTER_VERSION], [clutter_version])
AC_SUBST([CLUTTER_API_VERSION], [clutter_api_version])
AC_SUBST([CLUTTER_API_VERSION_AM], [$CLUTTER_MAJOR_VERSION\_0])
AC_SUBST([CLUTTER_RELEASE_STATUS], [clutter_release_status])
m4_define([lt_current], [m4_eval(100 * clutter_minor_version + clutter_micro_version - clutter_interface_age)])
@ -781,7 +784,7 @@ AC_CONFIG_FILES([
clutter/Makefile
clutter/clutter-config.h
clutter/clutter-version.h
clutter/mutter-clutter-$CLUTTER_API_VERSION.pc:clutter/mutter-clutter.pc.in
clutter/mutter-clutter-$LIBMUTTER_API_VERSION.pc:clutter/mutter-clutter.pc.in
tests/Makefile
tests/accessibility/Makefile

View File

@ -21,7 +21,7 @@ all_examples += \
image-content
endif
LDADD = $(top_builddir)/clutter/libmutter-clutter-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS) $(GDK_PIXBUF_LIBS) $(LIBM)
LDADD = $(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la $(CLUTTER_LIBS) $(GDK_PIXBUF_LIBS) $(LIBM)
AM_CFLAGS = $(CLUTTER_CFLAGS) $(GDK_PIXBUF_CFLAGS) $(MAINTAINER_CFLAGS)
AM_CPPFLAGS = \
-DG_DISABLE_SINGLE_INCLUDES \

View File

@ -1,5 +1,5 @@
common_ldadd = \
$(top_builddir)/clutter/libmutter-clutter-@CLUTTER_API_VERSION@.la
$(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la
common_sources = \
cally-examples-util.c \

View File

@ -3,7 +3,7 @@ installed_testdir = $(libexecdir)/installed-tests/mutter-clutter
include $(top_srcdir)/build/autotools/glib-tap.mk
AM_CFLAGS = -g $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
LDADD = $(top_builddir)/../cogl/cogl/libmutter-cogl.la $(top_builddir)/clutter/libmutter-clutter-1.0.la $(CLUTTER_LIBS) $(LIBM)
LDADD = $(top_builddir)/../cogl/cogl/libmutter-cogl-@LIBMUTTER_API_VERSION@.la $(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la $(CLUTTER_LIBS) $(LIBM)
AM_LDFLAGS = -export-dynamic
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Clutter-Conform\" \

View File

@ -110,8 +110,8 @@ clean-wrappers:
.PHONY: wrappers clean-wrappers
common_ldadd = \
$(top_builddir)/clutter/libmutter-clutter-@CLUTTER_API_VERSION@.la \
$(top_builddir)/../cogl/cogl/libmutter-cogl.la
$(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la \
$(top_builddir)/../cogl/cogl/libmutter-cogl-@LIBMUTTER_API_VERSION@.la
check_PROGRAMS = test-interactive
check_SCRIPTS = wrappers

View File

@ -1,6 +1,6 @@
common_ldadd = \
$(top_builddir)/clutter/libmutter-clutter-@CLUTTER_API_VERSION@.la \
$(top_builddir)/../cogl/cogl/libmutter-cogl.la
$(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la \
$(top_builddir)/../cogl/cogl/libmutter-cogl-@LIBMUTTER_API_VERSION@.la
check_PROGRAMS = \

View File

@ -7,7 +7,7 @@ check_PROGRAMS = \
test-state-mini \
test-state-pick
common_ldadd = $(top_builddir)/clutter/libmutter-clutter-@CLUTTER_API_VERSION@.la
common_ldadd = $(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la
LDADD = $(common_ldadd) $(CLUTTER_LIBS) $(LIBM)

View File

@ -3,7 +3,7 @@
NULL =
mutterlibdir = $(libdir)/mutter
mutterlib_LTLIBRARIES = libmutter-cogl-gles2.la
mutterlib_LTLIBRARIES = libmutter-cogl-gles2-@LIBMUTTER_API_VERSION@.la
AM_CPPFLAGS = \
-I$(top_srcdir) \
@ -11,8 +11,8 @@ AM_CPPFLAGS = \
AM_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libmutter_cogl_gles2_la_SOURCES = cogl-gles2-api.c
libmutter_cogl_gles2_la_LDFLAGS = \
libmutter_cogl_gles2_@LIBMUTTER_API_VERSION@_la_SOURCES = cogl-gles2-api.c
libmutter_cogl_gles2_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
-no-undefined \
-rpath $(mutterlibdir) \
-avoid-version \
@ -25,7 +25,7 @@ coglgles2include_HEADERS = \
GLES2/gl2ext.h \
GLES2/gl2platform.h
pc_files = mutter-cogl-gles2-1.0.pc
pc_files = mutter-cogl-gles2-$(LIBMUTTER_API_VERSION).pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)

View File

@ -2,12 +2,12 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@/mutter
includedir=@includedir@/mutter
apiversion=1.0
requires=@COGL_PKG_REQUIRES@ mutter-cogl-1.0
apiversion=@LIBMUTTER_API_VERSION@
requires=@COGL_PKG_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@
Name: Cogl
Description: An object oriented GL/GLES Abstraction/Utility Layer
Version: @COGL_1_VERSION@
Libs: -L${libdir} -lmutter-cogl-gles2
Version: @MUTTER_VERSION@
Libs: -L${libdir} -lmutter-cogl-gles2-@LIBMUTTER_API_VERSION@
Cflags: -I${includedir}/cogl
Requires: ${requires}

View File

@ -23,13 +23,13 @@ source_h_priv = \
$(NULL)
mutterlibdir = $(libdir)/mutter
mutterlib_LTLIBRARIES = libmutter-cogl-pango.la
mutterlib_LTLIBRARIES = libmutter-cogl-pango-@LIBMUTTER_API_VERSION@.la
libmutter_cogl_pango_la_SOURCES = $(source_c) $(source_h) $(source_h_priv)
libmutter_cogl_pango_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libmutter_cogl_pango_la_LIBADD = $(top_builddir)/cogl/libmutter-cogl.la
libmutter_cogl_pango_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_PANGO_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
libmutter_cogl_pango_la_LDFLAGS = \
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_SOURCES = $(source_c) $(source_h) $(source_h_priv)
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_LIBADD = $(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_PANGO_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
-export-dynamic \
-rpath $(mutterlibdir) \
-export-symbols-regex "^cogl_pango_.*" \
@ -49,7 +49,7 @@ cogl_base_includedir = $(includedir)/mutter
cogl_pangoheadersdir = $(cogl_base_includedir)/cogl/cogl-pango
cogl_pangoheaders_HEADERS = $(source_h)
pc_files = mutter-cogl-pango-1.0.pc
pc_files = mutter-cogl-pango-$(LIBMUTTER_API_VERSION).pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)
@ -65,23 +65,23 @@ INTROSPECTION_GIRS =
if HAVE_INTROSPECTION
INTROSPECTION_COMPILER_ARGS=--includedir=$(top_builddir)/cogl
CoglPango-1.0.gir: libmutter-cogl-pango.la Makefile
CoglPango-@LIBMUTTER_API_VERSION@.gir: libmutter-cogl-pango-$(LIBMUTTER_API_VERSION).la Makefile
CoglPango_1_0_gir_NAMESPACE = CoglPango
CoglPango_1_0_gir_VERSION = 1.0
CoglPango_1_0_gir_LIBS = $(top_builddir)/cogl/libmutter-cogl.la libmutter-cogl-pango.la
CoglPango_1_0_gir_FILES = $(source_h) $(source_c)
CoglPango_1_0_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS)
CoglPango_1_0_gir_INCLUDES = Pango-1.0 PangoCairo-1.0
CoglPango_1_0_gir_EXPORT_PACKAGES = mutter-cogl-pango-1.0
CoglPango_1_0_gir_SCANNERFLAGS = \
CoglPango_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = CoglPango
CoglPango_@LIBMUTTER_API_VERSION@_gir_VERSION = @LIBMUTTER_API_VERSION@
CoglPango_@LIBMUTTER_API_VERSION@_gir_LIBS = $(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la libmutter-cogl-pango-$(LIBMUTTER_API_VERSION).la
CoglPango_@LIBMUTTER_API_VERSION@_gir_FILES = $(source_h) $(source_c)
CoglPango_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS)
CoglPango_@LIBMUTTER_API_VERSION@_gir_INCLUDES = Pango-1.0 PangoCairo-1.0
CoglPango_@LIBMUTTER_API_VERSION@_gir_EXPORT_PACKAGES = mutter-cogl-pango-@LIBMUTTER_API_VERSION@
CoglPango_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
--warn-all \
--identifier-prefix=CoglPango \
--symbol-prefix=cogl_pango \
--c-include='cogl-pango/cogl-pango.h' \
--include-uninstalled=$(top_builddir)/cogl/Cogl-1.0.gir
--include-uninstalled=$(top_builddir)/cogl/Cogl-@LIBMUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += CoglPango-1.0.gir
INTROSPECTION_GIRS += CoglPango-@LIBMUTTER_API_VERSION@.gir
girdir = $(mutterlibdir)
gir_DATA = $(INTROSPECTION_GIRS)

View File

@ -2,12 +2,12 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@/mutter
includedir=@includedir@/mutter
apiversion=1.0
requires=@COGL_PKG_REQUIRES@ mutter-cogl-1.0
apiversion=@LIBMUTTER_API_VERSION@
requires=@COGL_PKG_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@
Name: Cogl
Description: An object oriented GL/GLES Abstraction/Utility Layer
Version: @COGL_1_VERSION@
Libs: -L${libdir} -lmutter-cogl-pango
Version: @MUTTER_VERSION@
Libs: -L${libdir} -lmutter-cogl-pango-@LIBMUTTER_API_VERSION@
Cflags: -I${includedir}/cogl
Requires: ${requires}

View File

@ -65,14 +65,14 @@ glib_enum_headers = $(source_1_x_h)
include $(top_srcdir)/build/autotools/Makefile.am.enums
mutterlibdir = $(libdir)/mutter
mutterlib_LTLIBRARIES = libmutter-cogl-path.la
mutterlib_LTLIBRARIES = libmutter-cogl-path-@LIBMUTTER_API_VERSION@.la
libmutter_cogl_path_la_SOURCES = $(source_c) $(source_h)
nodist_libmutter_cogl_path_la_SOURCES = $(BUILT_SOURCES)
libmutter_cogl_path_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libmutter_cogl_path_la_LIBADD = $(top_builddir)/cogl/libmutter-cogl.la
libmutter_cogl_path_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
libmutter_cogl_path_la_LDFLAGS = \
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_SOURCES = $(source_c) $(source_h)
nodist_libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_LIBADD = $(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
-export-dynamic \
-export-symbols-regex "^(cogl|cogl2)_(framebuffer|path|is|clip|[sg]et)_.*" \
-no-undefined \
@ -94,7 +94,7 @@ cogl_pathheadersdir = $(cogl_base_includedir)/cogl/cogl-path
cogl_pathheaders_HEADERS = $(source_h)
nodist_cogl_pathheaders_HEADERS = cogl-path-enum-types.h
pc_files = mutter-cogl-path-1.0.pc
pc_files = mutter-cogl-path-$(LIBMUTTER_API_VERSION).pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)

View File

@ -2,12 +2,12 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@/mutter
includedir=@includedir@/mutter
apiversion=1.0
requires=@COGL_PKG_REQUIRES@ mutter-cogl-1.0
apiversion=@LIBMUTTER_API_VERSION@
requires=@COGL_PKG_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@
Name: Cogl
Description: A 2D path drawing library for Cogl
Version: @COGL_1_VERSION@
Libs: -L${libdir} -lmutter-cogl-path
Version: @MUTTER_VERSION@
Libs: -L${libdir} -lmutter-cogl-path-@LIBMUTTER_API_VERSION@
Cflags: -I${includedir}/cogl
Requires: ${requires}

View File

@ -41,7 +41,7 @@ BUILT_SOURCES += cogl-defines.h cogl-egl-defines.h cogl-gl-header.h
DISTCLEANFILES += cogl-defines.h cogl-egl-defines.h cogl-gl-header.h
EXTRA_DIST += cogl-defines.h.in cogl-egl-defines.h.in cogl-gl-header.h.in
pc_files = mutter-cogl-1.0.pc
pc_files = mutter-cogl-$(LIBMUTTER_API_VERSION).pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)
@ -439,23 +439,23 @@ cogl_sources_c += \
endif
mutterlibdir = $(libdir)/mutter
mutterlib_LTLIBRARIES = libmutter-cogl.la
mutterlib_LTLIBRARIES = libmutter-cogl-@LIBMUTTER_API_VERSION@.la
libmutter_cogl_la_LIBADD = $(LIBM) $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_LIBADD = $(LIBM) $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
if UNIT_TESTS
libmutter_cogl_la_LIBADD += $(top_builddir)/test-fixtures/libtest-fixtures.la
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_LIBADD += $(top_builddir)/test-fixtures/libtest-fixtures.la
endif
# XXX: The aim is to eventually get rid of all private API exports
# for cogl-pango.
libmutter_cogl_la_LDFLAGS = \
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
-no-undefined \
-avoid-version \
-export-dynamic \
-rpath $(mutterlibdir) \
-export-symbols-regex "^(cogl|_cogl_debug_flags|_cogl_atlas_new|_cogl_atlas_add_reorganize_callback|_cogl_atlas_reserve_space|_cogl_callback|_cogl_util_get_eye_planes_for_screen_poly|_cogl_atlas_texture_remove_reorganize_callback|_cogl_atlas_texture_add_reorganize_callback|_cogl_texture_get_format|_cogl_texture_foreach_sub_texture_in_region|_cogl_texture_set_region|_cogl_profile_trace_message|_cogl_context_get_default|_cogl_framebuffer_get_stencil_bits|_cogl_clip_stack_push_rectangle|_cogl_framebuffer_get_modelview_stack|_cogl_object_default_unref|_cogl_pipeline_foreach_layer_internal|_cogl_clip_stack_push_primitive|_cogl_buffer_unmap_for_fill_or_fallback|_cogl_framebuffer_draw_primitive|_cogl_debug_instances|_cogl_framebuffer_get_projection_stack|_cogl_pipeline_layer_get_texture|_cogl_buffer_map_for_fill_or_fallback|_cogl_texture_can_hardware_repeat|_cogl_pipeline_prune_to_n_layers|_cogl_primitive_draw|test_|unit_test_|_cogl_winsys_glx_get_vtable|_cogl_winsys_egl_xlib_get_vtable|_cogl_winsys_egl_get_vtable|_cogl_closure_disconnect|_cogl_onscreen_notify_complete|_cogl_onscreen_notify_frame_sync|_cogl_winsys_egl_renderer_connect_common|_cogl_winsys_error_quark|_cogl_set_error|_cogl_poll_renderer_add_fd|_cogl_poll_renderer_add_idle|_cogl_framebuffer_winsys_update_size|_cogl_winsys_egl_make_current|_cogl_pixel_format_get_bytes_per_pixel).*"
libmutter_cogl_la_SOURCES = $(cogl_sources_c)
nodist_libmutter_cogl_la_SOURCES = $(BUILT_SOURCES)
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_SOURCES = $(cogl_sources_c)
nodist_libmutter_cogl_@LIBMUTTER_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
# Cogl installed headers
cogl_headers = \
@ -483,22 +483,22 @@ EXTRA_DIST += \
INTROSPECTION_GIRS =
if HAVE_INTROSPECTION
Cogl-1.0.gir: libmutter-cogl.la Makefile
Cogl-@LIBMUTTER_API_VERSION@.gir: libmutter-cogl-$(LIBMUTTER_API_VERSION).la Makefile
Cogl_1_0_gir_NAMESPACE = Cogl
Cogl_1_0_gir_VERSION = 1.0
Cogl_1_0_gir_LIBS = libmutter-cogl.la
Cogl_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = Cogl
Cogl_@LIBMUTTER_API_VERSION@_gir_VERSION = $(LIBMUTTER_API_VERSION)
Cogl_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-cogl-$(LIBMUTTER_API_VERSION).la
if UNIT_TESTS
Cogl_1_0_gir_LIBS += $(top_builddir)/test-fixtures/libtest-fixtures.la
Cogl_@LIBMUTTER_API_VERSION@_gir_LIBS += $(top_builddir)/test-fixtures/libtest-fixtures.la
endif
Cogl_1_0_gir_FILES = $(cogl_1_public_h)
Cogl_@LIBMUTTER_API_VERSION@_gir_FILES = $(cogl_1_public_h)
Cogl_1_0_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) -UCOGL_COMPILATION -D__COGL_H_INSIDE__ -D__COGL_XLIB_H_INSIDE__ -D__COGL_EGL_H_INSIDE__ -D__COGL_GLX_H_INSIDE__ -DCOGL_GIR_SCANNING
Cogl_1_0_gir_INCLUDES = GL-1.0 GObject-2.0
Cogl_1_0_gir_EXPORT_PACKAGES = mutter-cogl-1.0
Cogl_1_0_gir_SCANNERFLAGS = --warn-all --c-include='cogl/cogl.h'
Cogl_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) -UCOGL_COMPILATION -D__COGL_H_INSIDE__ -D__COGL_XLIB_H_INSIDE__ -D__COGL_EGL_H_INSIDE__ -D__COGL_GLX_H_INSIDE__ -DCOGL_GIR_SCANNING
Cogl_@LIBMUTTER_API_VERSION@_gir_INCLUDES = GL-1.0 GObject-2.0
Cogl_@LIBMUTTER_API_VERSION@_gir_EXPORT_PACKAGES = mutter-cogl-@LIBMUTTER_API_VERSION@
Cogl_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = --warn-all --c-include='cogl/cogl.h'
INTROSPECTION_GIRS += Cogl-1.0.gir
INTROSPECTION_GIRS += Cogl-@LIBMUTTER_API_VERSION@.gir
girdir = $(mutterlibdir)
gir_DATA = $(INTROSPECTION_GIRS)

View File

@ -2,12 +2,12 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@/mutter
includedir=@includedir@/mutter
apiversion=1.0
apiversion=@LIBMUTTER_API_VERSION@
requires=@COGL_PKG_REQUIRES@
Name: Cogl
Description: An object oriented GL/GLES Abstraction/Utility Layer
Version: @COGL_1_VERSION@
Libs: -L${libdir} -lmutter-cogl
Version: @MUTTER_VERSION@
Libs: -L${libdir} -lmutter-cogl-@LIBMUTTER_API_VERSION@
Cflags: -I${includedir}/cogl
Requires: ${requires}

View File

@ -83,6 +83,16 @@ AC_CONFIG_HEADERS(cogl-config.h)
AC_CONFIG_HEADERS(cogl-mutter-config.h)
AC_GNU_SOURCE
dnl ================================================================
dnl Check that we are configured by mutter
dnl ================================================================
AC_ARG_VAR([MUTTER_VERSION])
AC_ARG_VAR([LIBMUTTER_API_VERSION])
AS_IF([test "x$MUTTER_VERSION" = "x"],
[AC_MSG_ERROR([Clutter can only be configured by mutter])],)
dnl ================================================================
dnl Required versions for dependencies
dnl ================================================================
@ -945,16 +955,16 @@ AC_OUTPUT(
Makefile
test-fixtures/Makefile
cogl/Makefile
cogl/mutter-cogl-1.0.pc
cogl/mutter-cogl-$LIBMUTTER_API_VERSION.pc:cogl/mutter-cogl.pc.in
cogl/cogl-defines.h
cogl/cogl-gl-header.h
cogl/cogl-egl-defines.h
cogl-pango/Makefile
cogl-pango/mutter-cogl-pango-1.0.pc
cogl-pango/mutter-cogl-pango-$LIBMUTTER_API_VERSION.pc:cogl-pango/mutter-cogl-pango.pc.in
cogl-path/Makefile
cogl-path/mutter-cogl-path-1.0.pc
cogl-path/mutter-cogl-path-$LIBMUTTER_API_VERSION.pc:cogl-path/mutter-cogl-path.pc.in
cogl-gles2/Makefile
cogl-gles2/mutter-cogl-gles2-1.0.pc
cogl-gles2/mutter-cogl-gles2-$LIBMUTTER_API_VERSION.pc:cogl-gles2/mutter-cogl-gles2.pc.in
tests/Makefile
tests/config.env
tests/conform/Makefile

View File

@ -131,10 +131,10 @@ AM_CPPFLAGS += \
test_conformance_CFLAGS = -g3 -O0 $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) -Wno-error=maybe-uninitialized -Wno-error=nested-externs -Wno-error=missing-prototypes
test_conformance_LDADD = \
$(COGL_DEP_LIBS) \
$(top_builddir)/cogl/libmutter-cogl.la \
$(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la \
$(LIBM)
if BUILD_COGL_PATH
test_conformance_LDADD += $(top_builddir)/cogl-path/libmutter-cogl-path.la
test_conformance_LDADD += $(top_builddir)/cogl-path/libmutter-cogl-path-$(LIBMUTTER_API_VERSION).la
endif
test_conformance_LDFLAGS = -export-dynamic

View File

@ -17,7 +17,7 @@ AM_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS)
common_ldadd = \
$(COGL_DEP_LIBS) \
$(top_builddir)/cogl/libmutter-cogl.la \
$(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la \
$(LIBM)
test_journal_SOURCES = test-journal.c

View File

@ -13,7 +13,7 @@ wrappers: stamp-test-unit
@true
stamp-test-unit: Makefile test-unit$(EXEEXT)
@mkdir -p wrappers
. $(top_builddir)/cogl/libmutter-cogl.la ; \
. $(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la ; \
$(NM) $(top_builddir)/cogl/.libs/"$$dlname"| \
grep '[DR] _\?unit_test_'|sed 's/.\+ [DR] _\?//' > unit-tests
@chmod +x $(top_srcdir)/tests/test-launcher.sh
@ -62,7 +62,7 @@ AM_CPPFLAGS += \
test_unit_CFLAGS = -g3 -O0 $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS)
test_unit_LDADD = \
$(COGL_DEP_LIBS) \
$(top_builddir)/cogl/libmutter-cogl.la \
$(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la \
$(LIBM)
test_unit_LDFLAGS = -export-dynamic

View File

@ -9,6 +9,8 @@ m4_define([mutter_version],
m4_define([mutter_plugin_api_version], [3])
m4_define([libmutter_api_version], [0])
AC_INIT([mutter], [mutter_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=mutter])
@ -27,11 +29,18 @@ AC_GNU_SOURCE
MUTTER_MAJOR_VERSION=mutter_major_version
MUTTER_MINOR_VERSION=mutter_minor_version
MUTTER_MICRO_VERSION=mutter_micro_version
MUTTER_VERSION=mutter_version
MUTTER_PLUGIN_API_VERSION=mutter_plugin_api_version
LIBMUTTER_API_VERSION=libmutter_api_version
AC_SUBST(MUTTER_MAJOR_VERSION)
AC_SUBST(MUTTER_MINOR_VERSION)
AC_SUBST(MUTTER_MICRO_VERSION)
AC_SUBST(MUTTER_PLUGIN_API_VERSION)
AC_SUBST(MUTTER_VERSION)
AC_SUBST(LIBMUTTER_API_VERSION)
# Make the mutter versions visible to the cogl and clutter subdirs
export LIBMUTTER_API_VERSION MUTTER_VERSION
MUTTER_PLUGIN_DIR="$libdir/$PACKAGE/plugins"
AC_SUBST(MUTTER_PLUGIN_DIR)
@ -228,13 +237,6 @@ GOBJECT_INTROSPECTION_CHECK([$INTROSPECTION_VERSION])
if test x$found_introspection != xno; then
AC_DEFINE(HAVE_INTROSPECTION, 1, [Define if GObject introspection is available])
MUTTER_PC_MODULES="$MUTTER_PC_MODULES gobject-introspection-1.0"
# Since we don't make any guarantees about stability and we don't support
# parallel install, there's no real reason to change directories, filenames,
# etc. as we change the Mutter tarball version. Note that this must match
# api_version in src/Makefile.am
META_GIR=Meta_3_0_gir
# META_GIR=[Meta_]mutter_major_version[_]mutter_minor_version[_gir]
AC_SUBST(META_GIR)
fi
AC_SUBST(XWAYLAND_PATH)
@ -461,7 +463,7 @@ data/Makefile
doc/Makefile
doc/man/Makefile
src/Makefile
src/libmutter.pc
src/libmutter-$LIBMUTTER_API_VERSION.pc:src/libmutter.pc.in
src/compositor/plugins/Makefile
src/meta/meta-version.h
po/Makefile.in
@ -469,6 +471,16 @@ po/Makefile.in
AC_OUTPUT
# Check that cogl and clutter have their .pc files regenerated with the correct version
COGL_PC_VERSION=$(grep Version: cogl/cogl/mutter-cogl-$LIBMUTTER_API_VERSION.pc|awk '{ print $2; }')
AS_IF([test "x$COGL_PC_VERSION" != "x$MUTTER_VERSION"],
[AC_MSG_ERROR([mutter-cogl pkg-config file not updated, rerun ./configure])])
CLUTTER_PC_VERSION=$(grep Version: clutter/clutter/mutter-clutter-$LIBMUTTER_API_VERSION.pc|awk '{ print $2; }')
AS_IF([test "x$CLUTTER_PC_VERSION" != "x$MUTTER_VERSION"],
[AC_MSG_ERROR([mutter-clutter pkg-config file not updated, rerun ./configure])])
if test x$enable_verbose_mode = xno; then
echo "*** WARNING WARNING WARNING WARNING WARNING"
echo "*** Building without verbose mode"

View File

@ -27,10 +27,10 @@ endif
EXTRA_DIST += tests/mutter-all.test.in
mutter_test_client_SOURCES = tests/test-client.c
mutter_test_client_LDADD = $(MUTTER_LIBS) libmutter.la
mutter_test_client_LDADD = $(MUTTER_LIBS) libmutter-$(LIBMUTTER_API_VERSION).la
mutter_test_runner_SOURCES = tests/test-runner.c
mutter_test_runner_LDADD = $(MUTTER_LIBS) libmutter.la
mutter_test_runner_LDADD = $(MUTTER_LIBS) libmutter-$(LIBMUTTER_API_VERSION).la
mutter_test_unit_tests_SOURCES = \
tests/unit-tests.c \
@ -45,7 +45,7 @@ mutter_test_unit_tests_SOURCES = \
tests/monitor-unit-tests.c \
tests/monitor-unit-tests.h \
$(NULL)
mutter_test_unit_tests_LDADD = $(MUTTER_LIBS) libmutter.la
mutter_test_unit_tests_LDADD = $(MUTTER_LIBS) libmutter-$(LIBMUTTER_API_VERSION).la
.PHONY: run-tests run-test-runner-tests run-unit-tests
@ -62,6 +62,6 @@ endif
# Some random test programs for bits of the code
testboxes_SOURCES = core/testboxes.c
testboxes_LDADD = $(MUTTER_LIBS) libmutter.la
testboxes_LDADD = $(MUTTER_LIBS) libmutter-$(LIBMUTTER_API_VERSION).la
noinst_PROGRAMS += testboxes

View File

@ -1,7 +1,7 @@
# Flag build for parallelism; see https://savannah.gnu.org/patch/?6905
.AUTOPARALLEL:
lib_LTLIBRARIES = libmutter.la
lib_LTLIBRARIES = libmutter-@LIBMUTTER_API_VERSION@.la
SUBDIRS=compositor/plugins
@ -79,7 +79,7 @@ wayland_protocols = \
wayland/protocol/gtk-primary-selection.xml \
$(NULL)
libmutter_la_SOURCES = \
libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
backends/meta-backend.c \
meta/meta-backend.h \
backends/meta-backend-private.h \
@ -285,7 +285,7 @@ libmutter_la_SOURCES = \
$(NULL)
if HAVE_WAYLAND
libmutter_la_SOURCES += \
libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES += \
compositor/meta-surface-actor-wayland.c \
compositor/meta-surface-actor-wayland.h \
wayland/meta-wayland.c \
@ -369,7 +369,7 @@ libmutter_la_SOURCES += \
endif
if HAVE_NATIVE_BACKEND
libmutter_la_SOURCES += \
libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES += \
backends/native/meta-backend-native.c \
backends/native/meta-backend-native.h \
backends/native/meta-backend-native-private.h \
@ -397,13 +397,14 @@ libmutter_la_SOURCES += \
$(NULL)
endif
nodist_libmutter_la_SOURCES = $(mutter_built_sources)
nodist_libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = $(mutter_built_sources)
libmutter_la_LDFLAGS = -no-undefined -export-symbols-regex "^(meta|ag)_.*"
libmutter_la_LIBADD = \
libmutter_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
-no-undefined -export-symbols-regex "^(meta|ag)_.*"
libmutter_@LIBMUTTER_API_VERSION@_la_LIBADD = \
$(MUTTER_LIBS) \
$(MUTTER_NATIVE_BACKEND_LIBS) \
$(top_builddir)/clutter/clutter/libmutter-clutter-1.0.la \
$(top_builddir)/clutter/clutter/libmutter-clutter-$(LIBMUTTER_API_VERSION).la \
$(NULL)
# Headers installed for plugins; introspected information will
@ -462,7 +463,7 @@ bin_PROGRAMS=mutter
noinst_PROGRAMS=
mutter_SOURCES = core/mutter.c
mutter_LDADD = $(MUTTER_LIBS) libmutter.la
mutter_LDADD = $(MUTTER_LIBS) libmutter-@LIBMUTTER_API_VERSION@.la
libexec_PROGRAMS = mutter-restart-helper
mutter_restart_helper_SOURCES = core/restart-helper.c
@ -471,36 +472,51 @@ mutter_restart_helper_LDADD = $(MUTTER_LIBS)
include Makefile-tests.am
if HAVE_INTROSPECTION
include $(INTROSPECTION_MAKEFILE)
# Since we don't make any guarantees about stability and we don't support
# parallel install, there's no real reason to change directories, filenames,
# etc. as we change the Mutter tarball version.
#api_version = $(MUTTER_MAJOR_VERSION).$(MUTTER_MINOR_VERSION)
api_version = 3.0
include $(INTROSPECTION_MAKEFILE)
# These files are in package-private directories, even though they may be used
# by plugins. If you're writing a plugin, use g-ir-compiler --add-include-path
# and g-ir-compiler --includedir.
girdir = $(pkglibdir)
gir_DATA = Meta-$(api_version).gir
gir_DATA = Meta-$(LIBMUTTER_API_VERSION).gir
typelibdir = $(pkglibdir)
typelib_DATA = Meta-$(api_version).typelib
typelib_DATA = Meta-$(LIBMUTTER_API_VERSION).typelib
INTROSPECTION_GIRS = Meta-$(api_version).gir
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_builddir)/clutter/clutter --add-include-path=$(top_builddir)/cogl/cogl --add-include-path=$(top_builddir)/cogl/cogl-pango
INTROSPECTION_COMPILER_ARGS = --includedir=$(top_builddir)/clutter/clutter --includedir=$(top_builddir)/cogl/cogl --includedir=$(top_builddir)/cogl/cogl-pango
INTROSPECTION_GIRS = Meta-$(LIBMUTTER_API_VERSION).gir
INTROSPECTION_SCANNER_ARGS = \
--add-include-path=$(top_builddir)/clutter/clutter \
--add-include-path=$(top_builddir)/cogl/cogl \
--add-include-path=$(top_builddir)/cogl/cogl-pango \
$(NULL)
INTROSPECTION_COMPILER_ARGS = \
--includedir=$(top_builddir)/clutter/clutter \
--includedir=$(top_builddir)/cogl/cogl \
--includedir=$(top_builddir)/cogl/cogl-pango \
$(NULL)
INTROSPECTION_SCANNER_ENV = \
PKG_CONFIG_PATH=$(top_builddir)/clutter/clutter/:$(top_builddir)/cogl/cogl/:$(top_builddir)/cogl/cogl-pango/:$${PKG_CONFIG_PATH}
Meta-$(api_version).gir: libmutter.la
@META_GIR@_INCLUDES = GObject-2.0 GDesktopEnums-3.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0 Cogl-1.0
@META_GIR@_EXPORT_PACKAGES = libmutter
@META_GIR@_CFLAGS = $(AM_CPPFLAGS)
@META_GIR@_LIBS = libmutter.la
@META_GIR@_FILES = \
Meta-@LIBMUTTER_API_VERSION@.gir: libmutter-$(LIBMUTTER_API_VERSION).la
Meta_@LIBMUTTER_API_VERSION@_gir_VERSION = $(LIBMUTTER_API_VERSION)
Meta_@LIBMUTTER_API_VERSION@_gir_INCLUDES = \
GObject-2.0 \
GDesktopEnums-3.0 \
Gdk-3.0 \
Gtk-3.0 \
Cogl-$(LIBMUTTER_API_VERSION) \
Clutter-$(LIBMUTTER_API_VERSION) \
xlib-2.0 \
xfixes-4.0 \
$(NULL)
Meta_@LIBMUTTER_API_VERSION@_gir_EXPORT_PACKAGES = libmutter-$(LIBMUTTER_API_VERSION)
Meta_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS)
Meta_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-$(LIBMUTTER_API_VERSION).la
Meta_@LIBMUTTER_API_VERSION@_gir_FILES = \
$(libmutterinclude_base_headers) \
$(filter %.c,$(libmutter_la_SOURCES) $(nodist_libmutter_la_SOURCES))
@META_GIR@_SCANNERFLAGS = --warn-all --warn-error
$(filter %.c,$(libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES) $(nodist_libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES))
Meta_@LIBMUTTER_API_VERSION@_SCANNERFLAGS = --warn-all --warn-error
endif
@ -515,7 +531,7 @@ DISTCLEANFILES = \
$(libmutterinclude_built_headers)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libmutter.pc
pkgconfig_DATA = libmutter-$(LIBMUTTER_API_VERSION).pc
EXTRA_DIST += \
$(wayland_protocols) \

View File

@ -4,10 +4,11 @@ libdir=@libdir@
includedir=@includedir@
girdir=@libdir@/mutter
typelibdir=@libdir@/mutter
apiversion=@LIBMUTTER_API_VERSION@
Name: libmutter
Description: Mutter window manager library
Requires: gsettings-desktop-schemas gtk+-3.0 mutter-clutter-1.0 x11
Requires: gsettings-desktop-schemas gtk+-3.0 mutter-clutter-@LIBMUTTER_API_VERSION@ x11
Version: @VERSION@
Libs: -L${libdir} -lmutter
Libs: -L${libdir} -lmutter-@LIBMUTTER_API_VERSION@
Cflags: -I${includedir}/mutter