Thread (5 messages) 5 messages, 2 authors, 2021-07-17
STALE1901d

[PATCH 2/4] configure.ac: specify phonebook plugin at build time

From: Dylan Van Assche <hidden>
Date: 2021-07-17 12:55:29
Subsystem: the rest · Maintainer: Linus Torvalds

From: Juho Hamalainen <redacted>

Various phonebook plugins are available, by default
phonebook-dummy is always built. Allow to specify
which plugin to use at build time.

Cherry-picked from https://github.com/sailfishos/bluez5/commit/d39ed9e2db8d4f9ab239a859c777e5504459b9dd

Co-authored-by: Dylan Van Assche [off-list ref]
Signed-off-by: Dylan Van Assche <redacted>
---
 Makefile.obexd | 2 +-
 configure.ac   | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile.obexd b/Makefile.obexd
index 6f5dc04c0..285a56197 100644
--- a/Makefile.obexd
+++ b/Makefile.obexd
@@ -41,7 +41,7 @@ obexd_builtin_modules += pbap
 obexd_builtin_sources += obexd/plugins/pbap.c \
 				obexd/plugins/vcard.h obexd/plugins/vcard.c \
 				obexd/plugins/phonebook.h \
-				obexd/plugins/phonebook-dummy.c
+				obexd/plugins/phonebook-@PLUGIN_PHONEBOOK@.c
 
 obexd_builtin_modules += mas
 obexd_builtin_sources += obexd/plugins/mas.c obexd/src/map_ap.h \
diff --git a/configure.ac b/configure.ac
index be32782a6..113ab0e0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -416,4 +416,12 @@ fi
 AC_DEFINE_UNQUOTED(ANDROID_STORAGEDIR, "${storagedir}/android",
 			[Directory for the Android daemon storage files])
 
+AC_ARG_WITH([phonebook], AC_HELP_STRING([--with-phonebook=PLUGIN],
+				[obexd phonebook plugin (default=dummy)]),
+					[plugin_phonebook=${withval}])
+if (test -z "${plugin_phonebook}"); then
+	plugin_phonebook=dummy
+fi
+AC_SUBST(PLUGIN_PHONEBOOK, [${plugin_phonebook}])
+
 AC_OUTPUT(Makefile src/bluetoothd.rst lib/bluez.pc mesh/bluetooth-meshd.rst)
-- 
2.32.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help