summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2025-07-09 21:33:46 +0300
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2025-07-09 21:39:24 +0300
commitcd23cd83bb62695c82019d1bedb83f07fbf79a4a (patch)
tree8b0168f44db770ea5fd6e56a4f9a4498ab5fcb29 /meson.build
parentda9cd06fceeee54623000637fedfa93fba8138a9 (diff)
build: add cond dep on g_mime_object_write_content_to_stream
This function only appeared in gmime versions newer than the minimum one we require; since we only need this function in the new/experimental "scm", we make the latter conditional on that function. Fixes #2859.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 11 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index de37e8b..4578d5e 100644
--- a/meson.build
+++ b/meson.build
@@ -191,7 +191,15 @@ glib_dep = dependency('glib-2.0', version: '>= 2.60')
gobject_dep = dependency('gobject-2.0', version: '>= 2.60')
gio_dep = dependency('gio-2.0', version: '>= 2.60')
gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.60')
-gmime_dep = dependency('gmime-3.0', version: '>= 3.2')
+gmime_dep = dependency('gmime-3.0', version: '>= 3.2')
+
+# note: g_mime_object_write_content_to_stream is not available
+# in the gmime we still support for normal mu build.; we only need
+# for scm (see beloww)
+gmime_scm_ok = cc.has_function('g_mime_object_write_content_to_stream',
+ prefix : '#include <gmime/gmime.h>',
+ dependencies: gmime_dep)
+
thread_dep = dependency('threads')
# we need Xapian 1.4
@@ -308,7 +316,8 @@ if not get_option('guile').disabled() and guile_dep.found()
endif
# this must happen _after_ subdir('lib')
-if not get_option('scm').disabled() and guile_dep.found()
+
+if not get_option('scm').disabled() and guile_dep.found() and gmime_scm_ok
config_h_data.set('BUILD_SCM', 1)
subdir('scm')
else