summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2023-08-09 20:17:25 +0300
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2023-08-30 22:22:39 +0300
commit52a26504488c3a8f190436abbce78717e9f9891f (patch)
tree2aeeb09dc9d2ef2c04b0bf2814aea07007f3e8e1
parent7d85b4acce363e4c62257538169aa0ce5b977edd (diff)
guile: make guile-extension-dir configurable
We use guile_dep.get_variable(pkgconfig: 'extensiondir') but that's not good for everyone.
-rw-r--r--guile/meson.build2
-rw-r--r--meson.build14
-rw-r--r--meson_options.txt7
3 files changed, 19 insertions, 4 deletions
diff --git a/guile/meson.build b/guile/meson.build
index 933553c..4a372ef 100644
--- a/guile/meson.build
+++ b/guile/meson.build
@@ -74,7 +74,7 @@ lib_guile_mu = shared_module(
'mu-guile-message.cc' ],
dependencies: [guile_dep, glib_dep, lib_mu_dep, config_h_dep, thread_dep ],
install: true,
- install_dir: guile_dep.get_variable(pkgconfig: 'extensiondir')
+ install_dir: guile_extension_dir
)
if makeinfo.found()
diff --git a/meson.build b/meson.build
index ecea0d9..587b48a 100644
--- a/meson.build
+++ b/meson.build
@@ -36,13 +36,13 @@ mandir = prefixdir / get_option('mandir')
infodir = prefixdir / get_option('infodir')
# allow for configuring lispdir, as with autotools.
-# default to <p
if get_option('lispdir') == ''
mu4e_lispdir= datadir / join_paths('emacs', 'site-lisp', 'mu4e')
else
mu4e_lispdir= get_option('lispdir') / 'mu4e'
endif
+
################################################################################
# compilers / flags
#
@@ -136,7 +136,17 @@ gzip=find_program('gzip')
# soft dependencies
guile_dep = dependency('guile-3.0', required: get_option('guile'))
-# soft dependencies
+
+# allow for a custom guile-extension-dir
+if guile_dep.found()
+ custom_guile_xd=get_option('guile-extension-dir')
+ if custom_guile_xd == ''
+ guile_extension_dir = guile_dep.get_variable(pkgconfig: 'extensiondir')
+ else
+ guile_extension_dir = custom_guile_xd
+ endif
+ config_h_data.set_quoted('MU_GUILE_EXTENSION_DIR', guile_extension_dir)
+endif
# emacs -- needed for mu4e compilation
emacs_name=get_option('emacs')
diff --git a/meson_options.txt b/meson_options.txt
index 587b479..2214cbe 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,4 +1,4 @@
-## Copyright (C) 2022 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
+## Copyright (C) 2022-2023 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
@@ -20,6 +20,11 @@ option('guile',
value: 'auto',
description: 'build the guile scripting support (requires guile-3.x)')
+# by default, this uses guile_dep.get_variable(pkgconfig: 'extensiondir')
+option('guile-extension-dir',
+ type: 'string',
+ description: 'custom install path for the guile extension module')
+
option('readline',
type: 'feature',
value: 'auto',