summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuho Hamalainen <juho.hamalainen@jolla.com>2021-07-23 15:58:22 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-07-23 14:47:37 -0700
commitb1c73f4d4cca9ffbbe16e325be8975002de20d9f (patch)
treee9b6c0ba6f69e6009ff792a30dba2e654a7bf9b6
parentbdeaad3fa02825e32f2fb52ba2fee0dece856f60 (diff)
downloadbluez-b1c73f4d4cca9ffbbe16e325be8975002de20d9f.tar.gz
configure.ac: specify phonebook plugin at build time
Various phonebook plugins are available, by default phonebook-dummy is always built. Allow to specify which plugin to use at build time.
-rw-r--r--Makefile.obexd2
-rw-r--r--configure.ac8
2 files changed, 9 insertions, 1 deletions
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)