summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2015-09-29 11:41:51 +0300
committerDavid Henningsson <david.henningsson@canonical.com>2015-12-07 10:41:37 +0100
commit74c9c410313b1419beff90468923c574f54eda88 (patch)
tree7b5d3dc3a1da5745f43bf0433bdc8b3993e54c88
parent96f4b4ffe341a4d7c4a84dd46a9c9f60d94928d2 (diff)
downloadpulseaudio-74c9c410313b1419beff90468923c574f54eda88.tar.gz
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
-rw-r--r--configure.ac3
-rw-r--r--src/Makefile.am3
2 files changed, 2 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 91f9ab6e4..86b28d397 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,9 +108,6 @@ AM_GNU_GETTEXT([external])
GETTEXT_PACKAGE=pulseaudio
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
-
-pulselocaledir='${prefix}/${DATADIRNAME}/locale'
-AX_DEFINE_DIR(PULSE_LOCALEDIR, pulselocaledir, [Gettext locale dir])
else
# workaround till an intltool m4 bug is fixed upstream
# (https://bugs.launchpad.net/intltool/+bug/904647)
diff --git a/src/Makefile.am b/src/Makefile.am
index 0c58d37b2..de975c5ba 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -46,7 +46,8 @@ AM_CPPFLAGS = \
-DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
-DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\" \
-DPA_SRCDIR=\"$(abs_srcdir)\" \
- -DPA_BUILDDIR=\"$(abs_builddir)\"
+ -DPA_BUILDDIR=\"$(abs_builddir)\" \
+ -DPULSE_LOCALEDIR=\"$(localedir)\"
AM_CFLAGS = \
$(PTHREAD_CFLAGS)
AM_CXXFLAGS = $(AM_CFLAGS)