mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
Use standard introspection configure/Makefile bits
This changes the introspection configure flag from --with/--without-introspection to --enable/--disable-introspection, and changes it so that trying to enable introspection when g-i is not installed results in an error, rather than being silently ignored. https://bugzilla.gnome.org/show_bug.cgi?id=643959
This commit is contained in:
parent
7841e80496
commit
a66ae4ad55
30
configure.in
30
configure.in
@ -96,11 +96,6 @@ AC_ARG_ENABLE(startup-notification,
|
|||||||
[disable mutter's startup notification support, for embedded/size-sensitive custom non-GNOME builds]),,
|
[disable mutter's startup notification support, for embedded/size-sensitive custom non-GNOME builds]),,
|
||||||
enable_startup_notification=auto)
|
enable_startup_notification=auto)
|
||||||
|
|
||||||
AC_ARG_WITH(introspection,
|
|
||||||
AC_HELP_STRING([--without-introspection],
|
|
||||||
[disable the use of GObject introspection]),,
|
|
||||||
with_introspection=auto)
|
|
||||||
|
|
||||||
AC_ARG_WITH(libcanberra,
|
AC_ARG_WITH(libcanberra,
|
||||||
AC_HELP_STRING([--without-libcanberra],
|
AC_HELP_STRING([--without-libcanberra],
|
||||||
[disable the use of libcanberra for playing sounds]),,
|
[disable the use of libcanberra for playing sounds]),,
|
||||||
@ -214,24 +209,15 @@ else
|
|||||||
AC_MSG_ERROR([no. Mutter requires Clutter version $CLUTTER_VERSION.])
|
AC_MSG_ERROR([no. Mutter requires Clutter version $CLUTTER_VERSION.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$with_introspection != xno; then
|
INTROSPECTION_VERSION=0.9.5
|
||||||
PKG_CHECK_MODULES(INTROSPECTION, gobject-introspection-1.0 >= 0.9.5, have_introspection=yes, have_introspection=no)
|
GOBJECT_INTROSPECTION_CHECK([$INTROSPECTION_VERSION])
|
||||||
if test x$have_introspection=xyes; then
|
|
||||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES gobject-introspection-1.0"
|
if test x$found_introspection != xno; then
|
||||||
AC_DEFINE(HAVE_INTROSPECTION, 1, [Define if GObject introspection is available])
|
AC_DEFINE(HAVE_INTROSPECTION, 1, [Define if GObject introspection is available])
|
||||||
G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
|
MUTTER_PC_MODULES="$MUTTER_PC_MODULES gobject-introspection-1.0"
|
||||||
AC_SUBST(G_IR_SCANNER)
|
META_GIR=[Meta_]mutter_major_version[_]mutter_minor_version[_gir]
|
||||||
G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
|
AC_SUBST(META_GIR)
|
||||||
AC_SUBST(G_IR_COMPILER)
|
|
||||||
G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
|
|
||||||
AC_SUBST(G_IR_GENERATE)
|
|
||||||
GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
|
|
||||||
AC_SUBST(GIRDIR)
|
|
||||||
TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
|
|
||||||
AC_SUBST(TYPELIBDIR)
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(WITH_INTROSPECTION, test "$have_introspection" = "yes")
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([Xcursor])
|
AC_MSG_CHECKING([Xcursor])
|
||||||
if $PKG_CONFIG xcursor; then
|
if $PKG_CONFIG xcursor; then
|
||||||
@ -561,7 +547,7 @@ mutter-$VERSION
|
|||||||
Solaris Xinerama: ${use_solaris_xinerama}
|
Solaris Xinerama: ${use_solaris_xinerama}
|
||||||
Startup notification: ${have_startup_notification}
|
Startup notification: ${have_startup_notification}
|
||||||
libcanberra: ${have_libcanberra}
|
libcanberra: ${have_libcanberra}
|
||||||
Introspection: ${have_introspection}
|
Introspection: ${found_introspection}
|
||||||
Session management: ${found_sm}
|
Session management: ${found_sm}
|
||||||
Shape extension: ${found_shape}
|
Shape extension: ${found_shape}
|
||||||
Xsync: ${found_xsync}
|
Xsync: ${found_xsync}
|
||||||
|
@ -196,9 +196,11 @@ mutter_theme_viewer_SOURCES= \
|
|||||||
|
|
||||||
bin_PROGRAMS=mutter mutter-theme-viewer
|
bin_PROGRAMS=mutter mutter-theme-viewer
|
||||||
|
|
||||||
|
if HAVE_INTROSPECTION
|
||||||
|
include $(INTROSPECTION_MAKEFILE)
|
||||||
|
|
||||||
api_version = $(MUTTER_MAJOR_VERSION).$(MUTTER_MINOR_VERSION)
|
api_version = $(MUTTER_MAJOR_VERSION).$(MUTTER_MINOR_VERSION)
|
||||||
|
|
||||||
if WITH_INTROSPECTION
|
|
||||||
# These files are in package-private directories, even though they may be used
|
# 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
|
# by plugins. If you're writing a plugin, use g-ir-compiler --add-include-path
|
||||||
# and g-ir-compiler --includedir.
|
# and g-ir-compiler --includedir.
|
||||||
@ -208,33 +210,19 @@ gir_DATA = Meta-$(api_version).gir
|
|||||||
typelibdir = $(pkglibdir)
|
typelibdir = $(pkglibdir)
|
||||||
typelib_DATA = Meta-$(api_version).typelib
|
typelib_DATA = Meta-$(api_version).typelib
|
||||||
|
|
||||||
# We need to strip out the attribute that would point back to libmutter-introspect
|
INTROSPECTION_GIRS = Meta-$(api_version).gir
|
||||||
# so that libgirepository looks for symbols in the executable instead
|
|
||||||
Meta-$(api_version).gir: $(G_IR_SCANNER) mutter $(libmutterinclude_HEADERS) $(mutter_SOURCES) Makefile
|
Meta-$(api_version).gir: mutter
|
||||||
$(AM_V_GEN) pwd=`pwd` ; \
|
@META_GIR@_INCLUDES = GObject-2.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0
|
||||||
cd $(srcdir) && \
|
@META_GIR@_PACKAGES = clutter-1.0 gtk+-3.0
|
||||||
$(G_IR_SCANNER) \
|
@META_GIR@_CFLAGS = $(INCLUDES)
|
||||||
--namespace=Meta \
|
@META_GIR@_PROGRAM = $(builddir)/mutter
|
||||||
--nsversion=$(api_version) \
|
@META_GIR@_FILES = \
|
||||||
--warn-all \
|
mutter-enum-types.h \
|
||||||
--warn-error \
|
$(libmutterinclude_base_headers) \
|
||||||
--include=GObject-2.0 \
|
$(filter %.c,$(mutter_SOURCES))
|
||||||
--include=Gdk-3.0 \
|
@META_GIR@_SCANNERFLAGS = --warn-all --warn-error
|
||||||
--include=Gtk-3.0 \
|
|
||||||
--include=Clutter-1.0 \
|
|
||||||
--pkg=clutter-1.0 \
|
|
||||||
--pkg=gtk+-3.0 \
|
|
||||||
--include=xlib-2.0 \
|
|
||||||
--include=xfixes-4.0 \
|
|
||||||
--program=$$pwd/mutter \
|
|
||||||
mutter-enum-types.h \
|
|
||||||
$(filter %.c,$(mutter_SOURCES)) \
|
|
||||||
$(libmutterinclude_base_headers) \
|
|
||||||
$(INCLUDES) \
|
|
||||||
-o $$pwd/$@
|
|
||||||
|
|
||||||
Meta-$(api_version).typelib: $(G_IR_COMPILER) Meta-$(api_version).gir
|
|
||||||
$(AM_V_GEN) LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(G_IR_COMPILER) Meta-$(api_version).gir -o $@
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EFENCE=
|
EFENCE=
|
||||||
|
Loading…
Reference in New Issue
Block a user