summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac55
1 files changed, 54 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3b2c0b2d..c2441888 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,7 @@
# along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.
m4_define([mate_utils_major], [1])
-m4_define([mate_utils_minor], [26])
+m4_define([mate_utils_minor], [28])
m4_define([mate_utils_micro], [0])
m4_define([mate_utils_version], [mate_utils_major.mate_utils_minor.mate_utils_micro])
@@ -99,6 +99,7 @@ GTK_REQUIRED=3.22.0
LIBMATE_PANEL_APPLET_REQUIRED=1.17.0
LIBGTOP_REQUIRED=2.12.0
LIBCANBERRA_GTK_REQUIRED=0.4
+MATE_DESKTOP_REQUIRED=1.27.1
UDISKS2_REQUIRED=1.90.0
AC_SUBST(GTK_REQUIRED)
@@ -124,6 +125,10 @@ PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQUIRED)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
+PKG_CHECK_MODULES(MATE_DESKTOP, mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED)
+AC_SUBST(MATE_DESKTOP_CFLAGS)
+AC_SUBST(MATE_DESKTOP_LIBS)
+
AC_ARG_ENABLE([disk-image-mounter],
[AS_HELP_STRING([--enable-disk-image-mounter=@<:@yes/no@:>@],
[Whether to build the Disk Image Mounter utility])],
@@ -206,6 +211,52 @@ AS_CASE([$enable_gdict_applet],
AM_CONDITIONAL([BUILD_GDICT_APPLET], [test "x$enable_gdict_applet" = "xyes"])
+#============================================================================
+# Dictionary Applet in-process and Wayland support
+#============================================================================
+
+AC_ARG_ENABLE([wayland],
+ [AS_HELP_STRING([--enable-wayland],
+ [Explicitly enable or disable Wayland support
+ (default is to enable only if Wayland client development library is detected)])],
+ [enable_wayland=$enableval],
+ [enable_wayland=auto])
+AC_ARG_ENABLE([in-process],
+ [AS_HELP_STRING([--enable-in-process],
+ [Enable in-process build of dictionary applet (default: no, required for wayland)])],
+ [enable_in_process=$enableval],
+ [dnl the default follows whether Wayland is requested or not,
+ dnl as Wayland support requires it but we d rather not have it
+ dnl otherwise for the moment
+ enable_in_process=$enable_wayland])
+
+dnl $enable_in_process is gonna be either:
+dnl - "no" if explicitly disabled
+dnl - "yes" if explicitly enabled or if Wayland is explicitly enabled
+dnl - "auto" if nothing specific is requested, in which case, default back to "no"
+AS_IF([test "x$enable_in_process" != xyes], [enable_in_process=no])
+
+WAYLAND_DEPS="gtk-layer-shell-0 >= $GTK_LAYER_SHELL_REQUIRED_VERSION wayland-client gdk-wayland-3.0 >= $GDK_WAYLAND_REQUIRED_VERSION"
+AS_CASE(["x$enable_wayland$enable_in_process"],
+ [xautoyes], [PKG_CHECK_MODULES([WAYLAND], [$WAYLAND_DEPS],
+ [enable_wayland=yes], [enable_wayland=no])],
+ [xyesyes], [PKG_CHECK_MODULES([WAYLAND], [$WAYLAND_DEPS])],
+ [xyes*], [AC_MSG_ERROR([--enable-wayland requires --enable-in-process])],
+ [enable_wayland=no])
+
+AM_CONDITIONAL([ENABLE_IN_PROCESS], [test "x$enable_in_process" = "xyes"])
+AS_IF([test "x$enable_in_process" = "xyes"],
+ [AC_DEFINE([ENABLE_IN_PROCESS], [1], [Enable if you want to build the panel applet in-process])])
+AM_CONDITIONAL(ENABLE_WAYLAND, [test "x$enable_wayland" = "xyes"])
+AS_IF([test "x$enable_wayland" = "xyes"],
+ [AC_DEFINE([ENABLE_WAYLAND], [1], [Enable if you want to build the panel applet in-process])])
+
+# Convenience C define selecting the right applet factory
+AS_IF([test "x$enable_in_process" = "xyes"],
+ [factory=MATE_PANEL_APPLET_IN_PROCESS_FACTORY],
+ [factory=MATE_PANEL_APPLET_OUT_PROCESS_FACTORY])
+AC_DEFINE_UNQUOTED([PANEL_APPLET_FACTORY], [$factory], [Panel applet factory])
+
# Baobab checks
PKG_CHECK_MODULES(LIBGTOP, libgtop-2.0 >= $LIBGTOP_REQUIRED)
AC_SUBST(LIBGTOP_CFLAGS)
@@ -411,5 +462,7 @@ mate-utils $VERSION configuration summary:
API Reference (libmatedict) : $enable_gtk_doc
Logview built with ZLib support : $msg_zlib
Dictionary mate-panel applet : $enable_gdict_applet
+ Dictionary applet in-process : $enable_in_process
+Dictionary applet wayland support : $enable_wayland
Native Language support : ${USE_NLS}
"