summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac87
1 files changed, 79 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 8991cc91..c2441888 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,20 @@
+# This file is part of MATE Utils.
+#
+# MATE Utils is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# MATE Utils is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with MATE Utils. If not, see <https://www.gnu.org/licenses/>.
+
m4_define([mate_utils_major], [1])
-m4_define([mate_utils_minor], [25])
+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])
@@ -84,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)
@@ -109,8 +125,12 @@ 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],
- [AC_HELP_STRING([--enable-disk-image-mounter=@<:@yes/no@:>@],
+ [AS_HELP_STRING([--enable-disk-image-mounter=@<:@yes/no@:>@],
[Whether to build the Disk Image Mounter utility])],
[],
[enable_disk_image_mounter=yes])
@@ -170,7 +190,7 @@ PKG_CHECK_MODULES(XSHAPE, xext x11,
AC_SUBST(XSHAPE_LIBS)
AC_ARG_ENABLE([gdict-applet],
- [AC_HELP_STRING([--enable-gdict-applet=@<:@yes/no@:>@],
+ [AS_HELP_STRING([--enable-gdict-applet=@<:@yes/no@:>@],
[Whether to build the Dictionary mate-panel applet])],
[],
[enable_gdict_applet=yes])
@@ -191,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)
@@ -215,7 +281,7 @@ AC_SUBST(GDICT_DEBUG_CFLAGS)
dnl IPv6 support
AC_MSG_CHECKING([whether to enable IPv6])
AC_ARG_ENABLE([ipv6],
- [AC_HELP_STRING([--enable-ipv6=@<:@yes/no@:>@],
+ [AS_HELP_STRING([--enable-ipv6=@<:@yes/no@:>@],
[Enables compilation of IPv6 code])],
[],
[enable_ipv6=yes])
@@ -261,7 +327,7 @@ AS_IF([test "x$have_ipv6" = "xyes"],
dnl mate-search-tool checks
withval=""
AC_ARG_WITH([grep],
- AC_HELP_STRING([--with-grep=@<:@grep command@:>@]
+ AS_HELP_STRING([--with-grep=@<:@grep command@:>@]
[Specify where to find the grep binary]),
[
AS_IF([test x$withval != x],
@@ -282,7 +348,7 @@ AC_SUBST(GREP_COMMAND)
dnl logview checks
AC_ARG_ENABLE([zlib],
- [AC_HELP_STRING([--disable-zlib], [disable zlib support])])
+ [AS_HELP_STRING([--disable-zlib], [disable zlib support])])
msg_zlib=no
Z_LIBS=
@@ -303,10 +369,12 @@ AS_IF([test "x$enable_zlib" != "xno"],
AC_SUBST(Z_LIBS)
dnl Internationalization
-AM_GNU_GETTEXT_VERSION([0.19.8])
AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.8])
+AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8])
+AM_CONDITIONAL([USE_NLS], [test "x${USE_NLS}" = "xyes"])
-GETTEXT_PACKAGE=mate-utils
+GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [Define the gettext package to use])
AC_SUBST(GETTEXT_PACKAGE)
@@ -394,4 +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}
"