build-sys: fix PULSE_LOCALEDIR definition
On some systems (at least Arch) DATADIRNAME is not defined. This
caused PULSE_LOCALEDIR to point to a wrong directory. This seemed like
an issue introduced in 7.0, but probably something else was updated in
Arch at the same time, causing DATADIRNAME to become undefined,
because there were no changes between 6.0 and 7.0 that could have
caused this.
After noticing that localedir is a standard variable, my first idea
was to use pulselocaledir='${localedir}' in configure.ac, but Jan
Steffens pointed out that it causes the final PULSE_LOCALEDIR to
become "${prefix}/share/locale", that is, the variables weren't fully
expanded. I then found a FAQ item in Autoconf's manual[1], which
recommends not to define any absolute installation directories in
configure.ac, because the installation directories should be possible
to change when running make. The recommended solution is to define the
constant in AM_CPPFLAGS instead, so that's what this patch does.
[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Defining-Directories.html