If --disable-client is passed to configure script is possible to build
BlueZ without readline which would cause the following error:
tools/bluetooth-player.c:36:31: fatal error: readline/readline.h: No such file or directory
#include <readline/readline.h>
^
We are currently compiling gdbus 3 times: one for tests, one for
bluetoothd and another for obexd.
$ ls gdbus/*watch.o
gdbus/bluetoothd-watch.o gdbus/obexd-watch.o gdbus/watch.o
Instead of prepending $(gdbus_sources) to several _SOURCES variable, use
a convenience library.
Use rl_printf() from bluetoothctl to consistently display messages. This
is specially important for asynchronous callbacks, where using printf()
may mess up the prompt created by readline.
Now with the addition of src/oui.c that depends on udev, these tools
should also be linked against libudev, in case libudev includes the
function udev_hwdb_new().
Build error:
CCLD tools/hcitool
CCLD tools/sdptool
CCLD tools/ciptool
CCLD tools/bccmd
src/oui.o: In function `batocomp':
/home/vinicius/work/bluez/src/oui.c:42: undefined reference to `udev_new'
/home/vinicius/work/bluez/src/oui.c:46: undefined reference to `udev_hwdb_new'
/home/vinicius/work/bluez/src/oui.c:50: undefined reference to `udev_hwdb_get_properties_list_entry'
/home/vinicius/work/bluez/src/oui.c:53: undefined reference to `udev_list_entry_get_name'
/home/vinicius/work/bluez/src/oui.c:52: undefined reference to `udev_list_entry_get_next'
/home/vinicius/work/bluez/src/oui.c:61: undefined reference to `udev_hwdb_unref'
/home/vinicius/work/bluez/src/oui.c:64: undefined reference to `udev_unref'
/home/vinicius/work/bluez/src/oui.c:56: undefined reference to `udev_list_entry_get_value'
collect2: error: ld returned 1 exit status
make[1]: *** [tools/hcitool] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2