guile: make guile-extension-dir configurable

We use
   guile_dep.get_variable(pkgconfig: 'extensiondir')
but that's not good for everyone.
This commit is contained in:
Dirk-Jan C. Binnema 2023-08-09 20:17:25 +03:00
parent 31bb84182b
commit 52e3a4766e
3 changed files with 18 additions and 3 deletions

View File

@ -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()

View File

@ -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
#
@ -165,6 +165,16 @@ config_h_data.set_quoted('GZIP_PROGRAM', gzip.full_path())
# soft dependencies
guile_dep = dependency('guile-3.0', required: get_option('guile'))
# 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')

View File

@ -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',