PKG_CHECK_MODULES(WAYLAND, [wayland-server])
PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment])
+dnl ========================================================================
+# checks for wayland only argument
+dnl ========================================================================
+have_wayland_only=no
+AC_ARG_ENABLE([wayland-only],
+ AS_HELP_STRING([--enable-wayland-only],[enable wayland-only version of enlightenment @<:@default=disabled@:>@]),
+ [have_wayland_only=$enableval],
+ [have_wayland_only=no])
+AC_MSG_CHECKING([whether wayland-only version is enabled])
+AM_CONDITIONAL(WAYLAND_ONLY, test x$have_wayland_only = xyes)
+if test "x${have_wayland_only}" != "xno"; then
+ AC_DEFINE_UNQUOTED([HAVE_WAYLAND_ONLY],[1],[enable wayland-only version of enlightenment])
+fi
+
+dnl ========================================================================
+# checks for wayland only argument
+dnl ========================================================================
+if test "x${have_wayland_only}" = "xyes"; then
+ PKG_CHECK_MODULES(WAYLAND, [wayland-server])
+fi
+
AC_SUBST(ENLIGHTENMENT_CFLAGS)
AC_SUBST(ENLIGHTENMENT_LIBS)
BuildRequires: pkgconfig(enlightenment)
BuildRequires: gettext
%if %{with x}
+BuildRequires: pkgconfig(x11)
%endif
%if %{with wayland}
BuildRequires: pkgconfig(wayland-server)
%autogen
%if %{with wayland}
-%configure --prefix=/usr
+%configure --prefix=/usr --enable-wayland-only
%else
%configure --prefix=/usr
%endif
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
+
+if WAYLAND_ONLY
module_la_SOURCES = e_mod_main.c eom-protocol.c
module_la_LIBADD =
module_la_CFLAGS = @WAYLAND_CFLAGS@ @ENLIGHTENMENT_CFLAGS@ -DHAVE_WAYLAND_ONLY
%-client-protocol.h : $(top_srcdir)/protocol/%.xml
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
+else
+module_la_SOURCES = e_mod_main_x11.c
+module_la_LIBADD =
+module_la_CFLAGS = @ENLIGHTENMENT_CFLAGS@
+module_la_LDFLAGS = -module -avoid-version @ENLIGHTENMENT_LIBS@
+endif
--- /dev/null
+#include "e.h"
+#include "e_mod_main.h"
+
+EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "EOM Module of Window Manager" };
+
+EAPI void *
+e_modapi_init(E_Module *m)
+{
+
+ return m;
+}
+
+EAPI int
+e_modapi_shutdown(E_Module *m EINA_UNUSED)
+{
+
+ return 1;
+}
+
+EAPI int
+e_modapi_save(E_Module *m EINA_UNUSED)
+{
+ /* Save something to be kept */
+ return 1;
+}
+
--- /dev/null
+#ifndef E_MOD_MAIN_H
+#define E_MOD_MAIN_H
+
+/*** E Module ***/
+EAPI extern E_Module_Api e_modapi;
+
+EAPI void *e_modapi_init(E_Module *m);
+EAPI int e_modapi_shutdown(E_Module *m);
+EAPI int e_modapi_save(E_Module *m);
+
+#endif