diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2026-01-21 22:40:25 +0200 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2026-01-22 16:30:10 +0200 |
| commit | 86ad8d63e82bbf4d5c11feccf128b813fecd0f88 (patch) | |
| tree | 7f012fae4bea2b14fca45e85aa000c7a51ceddc4 | |
| parent | f95d60c5694e9f0fef46126f42f48f3289c4d1cc (diff) | |
guile: deprecate; instead use scm
Deprecate the long-deprecated guile support in the build-system too.
Needs explicit -Dguile=enabled
| -rw-r--r-- | Makefile | 10 | ||||
| -rw-r--r-- | meson.build | 46 | ||||
| -rw-r--r-- | meson_options.txt | 19 |
3 files changed, 40 insertions, 35 deletions
@@ -1,4 +1,4 @@ -## Copyright (C) 2008-2025 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> +## Copyright (C) 2008-2026 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -33,13 +33,13 @@ ifneq ($(V),0) VERBOSE=--verbose endif -# when MU_HACKER is set, do a debug build -# MU_HACKER is for djcb & compatible developers -# note that mu uses C++17, we only pass C++23 here -# for the better error messages (esp. for fmt). +# when MU_HACKER is set, do a debug build MU_HACKER is for djcb & compatible +# developers note that mu requires C++20, we only pass C++23 here for the better +# error messages (esp. for fmt). ifneq (${MU_HACKER},) MESON_FLAGS:=$(MESON_FLAGS) '-Dbuildtype=debug' \ '-Dreadline=enabled' \ + '-Dguile=enabled' \ '-Dcpp_std=c++23' endif diff --git a/meson.build b/meson.build index bbb1264..87fcdc6 100644 --- a/meson.build +++ b/meson.build @@ -208,13 +208,7 @@ gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.80') # gmime gmime_dep = dependency('gmime-3.0', version: '>= 3.2.13') - -# 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) +# 3.2.13 version has g_mime_object_write_content_to_stream thread_dep = dependency('threads') @@ -278,9 +272,11 @@ endif # # guile -guile_dep = dependency('guile-3.0', required: get_option('guile')) -# allow for a custom guile-extension-dir -if guile_dep.found() +guile_required=get_option('guile').enabled() or get_option('scm').enabled() +guile_dep = dependency('guile-3.0', required: guile_required) + +# allow for a custom guile-extension-dir (for old-style guile-support) +if guile_dep.found() and get_option('guile').enabled() custom_guile_xd=get_option('guile-extension-dir') if custom_guile_xd == '' guile_extension_dir = guile_dep.get_variable(pkgconfig: 'extensiondir') @@ -341,21 +337,27 @@ install_data('NEWS.org', 'IDEAS.org', subdir('lib') # this must happen _after_ subdir('lib') -if not get_option('guile').disabled() and guile_dep.found() - config_h_data.set('BUILD_GUILE', 1) - config_h_data.set_quoted('GUILE_BINARY', +if guile_dep.found() + + # modern guile support + if not get_option('scm').disabled() and guile_dep.found() + config_h_data.set('BUILD_SCM', 1) + subdir('scm') + else + # dummy-dep. + mu_scm_dep = declare_dependency() + endif + + # old-style guile-support (deprecated) + if not get_option('guile').disabled() + message('old-style gulie support is deprecated') + config_h_data.set('BUILD_GUILE', 1) + config_h_data.set_quoted('GUILE_BINARY', guile_dep.get_variable(pkgconfig: 'guile')) - subdir('guile') -endif + subdir('guile') + endif -# this must happen _after_ subdir('lib') -if not get_option('scm').disabled() and guile_dep.found() and gmime_scm_ok - config_h_data.set('BUILD_SCM', 1) - subdir('scm') -else - # dummy-dep. - mu_scm_dep = declare_dependency() endif subdir('mu') diff --git a/meson_options.txt b/meson_options.txt index fcffae7..ba5137c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,4 @@ -## Copyright (C) 2022-2024 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> +## Copyright (C) 2022-2026 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -54,12 +54,20 @@ option('lispdir', # -# guile & scm +# scm & guile (both use GNU Guile) # +option('scm', + type : 'feature', + value: 'auto', + description: 'build the guile scripting support (requires guile-3.x)') + +# old-style guile has been deprecated for years, and is now +# disabled by default. It will be removed in some future release. option('guile', type : 'feature', - value: 'auto', + value: 'disabled', + deprecated: true, description: 'build the guile scripting support (requires guile-3.x)') # by default, this uses guile_dep.get_variable(pkgconfig: 'extensiondir') @@ -67,11 +75,6 @@ option('guile-extension-dir', type: 'string', description: 'custom install path for the guile extension module') -option('scm', - type : 'feature', - value: 'auto', - description: 'build the guile scripting support (requires guile-3.x)') - # # misc # |
