build: make wayland support unconditional

In the wayland branch of mutter, we want to build a wayland version
of the mutter libraries, and that's much easier if we just build
wayland support unconditionally.
The define is kept to avoid a huge diff, but should be removed
in a later patch.
Also, wayland support can still be disable at runtime, by
launching mutter without the --nested switch.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
This commit is contained in:
Giovanni Campagna 2013-08-16 13:49:03 +02:00
parent 1617323dca
commit 91cdfab495
3 changed files with 13 additions and 47 deletions

View File

@ -113,11 +113,6 @@ AC_ARG_ENABLE(shape,
[disable mutter's use of the shaped window extension]),,
enable_shape=auto)
AC_ARG_ENABLE(wayland,
AC_HELP_STRING([--enable-wayland],
[Enable support for running as a hybrid X and Wayland compositor]),,
enable_wayland=no)
## Wayland support requires the xserver.xml protocol extension found in the weston
## repository but since there aren't currently established conventions for
## installing and discovering these we simply require a location to be given
@ -216,29 +211,16 @@ if test x$have_xcursor = xyes; then
AC_DEFINE(HAVE_XCURSOR, , [Building with Xcursor support])
fi
have_wayland=no
if test x$enable_wayland = "xyes"; then
WAYLAND_VERSION=0.1
AC_MSG_CHECKING([Wayland >= $WAYLAND_VERSION])
if ! $PKG_CONFIG --atleast-version $WAYLAND_VERSION wayland-server; then
AC_MSG_ERROR([wayland support enabled but no suitable wayland-server package found])
fi
AC_MSG_RESULT(yes)
# We always build with wayland enabled
AC_DEFINE(HAVE_WAYLAND, , [Building with Wayland support])
AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no])
AS_IF([test "x$WAYLAND_SCANNER" = "xno"],
AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols]))
AC_SUBST([WAYLAND_SCANNER])
AC_SUBST(XWAYLAND_PATH)
MUTTER_PC_MODULES="$MUTTER_PC_MODULES wayland-server"
AC_DEFINE(HAVE_WAYLAND, , [Building with Wayland support])
have_wayland=yes
fi
AM_CONDITIONAL(HAVE_WAYLAND, test x$have_wayland = "xyes")
AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no])
AS_IF([test "x$WAYLAND_SCANNER" = "xno"],
AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols]))
AC_SUBST([WAYLAND_SCANNER])
AC_SUBST(XWAYLAND_PATH)
MUTTER_PC_MODULES="$MUTTER_PC_MODULES wayland-server"
PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
PKG_CHECK_EXISTS([xi >= 1.6.99.1],
@ -496,14 +478,12 @@ fi
dnl ==========================================================================
echo "
mutter-$VERSION
mutter-wayland-$VERSION
prefix: ${prefix}
source code location: ${srcdir}
compiler: ${CC}
Wayland: ${have_wayland}
Startup notification: ${have_startup_notification}
libcanberra: ${have_libcanberra}
Introspection: ${found_introspection}

View File

@ -1,7 +1,3 @@
defaultcursordir = $(datadir)/mutter/cursors
dist_defaultcursor_DATA =
if HAVE_WAYLAND
dist_defaultcursor_DATA += left_ptr.png
endif
dist_defaultcursor_DATA = left_ptr.png

View File

@ -29,24 +29,18 @@ INCLUDES= \
-DMUTTER_PLUGIN_DIR=\"@MUTTER_PLUGIN_DIR@\" \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
if HAVE_WAYLAND
INCLUDES += \
-I$(srcdir)/wayland \
-I$(builddir)/wayland \
-DXWAYLAND_PATH='"@XWAYLAND_PATH@"'
endif
mutter_built_sources = \
$(dbus_idle_built_sources) \
mutter-enum-types.h \
mutter-enum-types.c
if HAVE_WAYLAND
mutter_built_sources += \
$(dbus_idle_built_sources) \
mutter-enum-types.h \
mutter-enum-types.c \
wayland/xserver-protocol.c \
wayland/xserver-server-protocol.h \
wayland/xserver-client-protocol.h
endif
libmutter_la_SOURCES = \
core/async-getprop.c \
@ -178,7 +172,6 @@ libmutter_la_SOURCES = \
ui/ui.c \
$(mutter_built_sources)
if HAVE_WAYLAND
libmutter_la_SOURCES += \
wayland/meta-wayland.c \
wayland/meta-wayland-private.h \
@ -194,7 +187,6 @@ libmutter_la_SOURCES += \
wayland/meta-wayland-seat.h \
wayland/meta-wayland-stage.h \
wayland/meta-wayland-stage.c
endif
libmutter_la_LDFLAGS = -no-undefined
libmutter_la_LIBADD = $(MUTTER_LIBS)
@ -376,7 +368,6 @@ $(dbus_idle_built_sources) : Makefile.am idle-monitor.xml
--c-generate-object-manager \
$(srcdir)/idle-monitor.xml
if HAVE_WAYLAND
wayland/%-protocol.c : $(top_builddir)/protocol/%.xml
mkdir -p wayland
$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
@ -386,4 +377,3 @@ wayland/%-server-protocol.h : $(top_builddir)/protocol/%.xml
wayland/%-client-protocol.h : $(top_builddir)/protocol/%.xml
mkdir -p wayland
$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
endif