database: use existing database matching same architecture prefix
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>
Sun, 29 Nov 2020 12:16:26 +0000 (15:16 +0300)
committerPulseAudio Marge Bot <pulseaudio-maintainers@lists.freedesktop.org>
Thu, 7 Jan 2021 23:27:16 +0000 (23:27 +0000)
commitae9d0cf307e731a02cdde38fb1632b20322f9f68
tree5ef61a6239dfe4aee52d5ba106fcb847c5d28c19
parent0ac6b16787b201025498063d3b48db4a86f48d2b
database: use existing database matching same architecture prefix

State database binary file format may depend on system architecture,
for instance gdbm binary format depends on architecture word size,
making x86 and x64 gdbm files incompatible.

If this is the case, it is handled by adding system architecture name to
database file name using automatically configured CANONICAL_HOST string.
Meson build define CANONICAL_HOST to be system architecture name, while
autotools build extends this with vendor and and operating system components.

Switch autotools build to use host_cpu for CANONICAL_HOST to match Meson
configuration. For backwards compatibility always use existing database file
matching CANONICAL_HOST prefix if it exists.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
configure.ac
src/pulsecore/database.c
src/pulsecore/database.h