From e42bc02dc6a521e663f1f0511958ee841618bcc7 Mon Sep 17 00:00:00 2001 From: Maarten Bosmans Date: Wed, 29 Jun 2011 15:16:08 +0200 Subject: [PATCH] build-sys: Move some more defines to configure.ac --- configure.ac | 13 +++++++++++++ man/Makefile.am | 4 +--- man/default.pa.5.xml.in | 4 ++-- man/pax11publish.1.xml.in | 2 +- man/pulse-client.conf.5.xml.in | 4 ++-- man/pulse-daemon.conf.5.xml.in | 8 ++++---- man/pulseaudio.1.xml.in | 6 +++--- src/Makefile.am | 21 +++++---------------- src/daemon/daemon.conf.in | 2 +- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/configure.ac b/configure.ac index 7f7970b..ab88bb7 100644 --- a/configure.ac +++ b/configure.ac @@ -1098,6 +1098,19 @@ AX_DEFINE_DIR(PA_SYSTEM_CONFIG_PATH, PA_SYSTEM_CONFIG_PATH, [System config dir]) PA_SYSTEM_STATE_PATH="${localstatedir}/lib/pulse" AX_DEFINE_DIR(PA_SYSTEM_STATE_PATH, PA_SYSTEM_STATE_PATH, [System state dir]) +PA_BINARY=${bindir}/pulseaudio${EXEEXT} +AX_DEFINE_DIR(PA_BINARY, PA_BINARY, [Location of pulseaudio binary]) + +PACTL_BINARY=${bindir}/pactl${EXEEXT} +AX_DEFINE_DIR(PACTL_BINARY, PACTL_BINARY, [Location of pactl binary]) + +AC_SUBST(PA_SOEXT, [.so]) + +AC_SUBST(pulseconfdir, ["${sysconfdir}/pulse"]) +AX_DEFINE_DIR(PA_DEFAULT_CONFIG_DIR, pulseconfdir, [Location of configuration files]) + +AC_DEFINE_UNQUOTED(PA_BUILDDIR, "${ac_pwd}/src", [Location of uninstalled binaries]) + #### Mac OSX specific stuff ##### AC_ARG_ENABLE(mac-universal, diff --git a/man/Makefile.am b/man/Makefile.am index 8457e03..dd228f7 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -15,8 +15,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA. -pulseconfdir=$(sysconfdir)/pulse - CLEANFILES = \ $(noinst_DATA) @@ -35,7 +33,7 @@ noinst_DATA = \ default.pa.5.xml %.xml: %.xml.in Makefile - $(AM_V_GEN) sed -e 's,@pulseconfdir\@,$(pulseconfdir),g' \ + $(AM_V_GEN) sed -e 's,@PA_DEFAULT_CONFIG_DIR\@,$(PA_DEFAULT_CONFIG_DIR),g' \ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@ diff --git a/man/default.pa.5.xml.in b/man/default.pa.5.xml.in index 4caad7c..1ec618d 100644 --- a/man/default.pa.5.xml.in +++ b/man/default.pa.5.xml.in @@ -26,13 +26,13 @@ USA.

~/.pulse/default.pa

-

@pulseconfdir@/default.pa

+

@PA_DEFAULT_CONFIG_DIR@/default.pa

The PulseAudio sound server interprets the file ~/.pulse/default.pa on startup, and when that file - doesn't exist @pulseconfdir@/default.pa. It + doesn't exist @PA_DEFAULT_CONFIG_DIR@/default.pa. It should contain directives in the PulseAudio CLI languages, as documented on .

diff --git a/man/pax11publish.1.xml.in b/man/pax11publish.1.xml.in index 3b40b97..be9ce0b 100644 --- a/man/pax11publish.1.xml.in +++ b/man/pax11publish.1.xml.in @@ -84,7 +84,7 @@ USA. the data from the $PULSE_SERVER, $PULSE_SINK, $PULSE_SOURCE environment variables and combines them with the data from ~/.pulse/client.conf (or - @pulseconfdir@/client.conf if that file does not + @PA_DEFAULT_CONFIG_DIR@/client.conf if that file does not exist). If specific options are passed on the command line (-S, -O, -I, -c, see below), they take precedence. Also uploads the local diff --git a/man/pulse-client.conf.5.xml.in b/man/pulse-client.conf.5.xml.in index 739fae4..dc9ae0b 100644 --- a/man/pulse-client.conf.5.xml.in +++ b/man/pulse-client.conf.5.xml.in @@ -26,14 +26,14 @@ USA.

~/.pulse/client.conf

-

@pulseconfdir@/client.conf

+

@PA_DEFAULT_CONFIG_DIR@/client.conf

The PulseAudio client library reads configuration directives from a file ~/.pulse/client.conf on startup and when that file doesn't exist from - @pulseconfdir@/client.conf.

+ @PA_DEFAULT_CONFIG_DIR@/client.conf.

The configuration file is a simple collection of variable declarations. If the configuration file parser encounters either ; diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in index ded3cb4..6fcdd0e 100644 --- a/man/pulse-daemon.conf.5.xml.in +++ b/man/pulse-daemon.conf.5.xml.in @@ -26,14 +26,14 @@ USA.

~/.pulse/daemon.conf

-

@pulseconfdir@/daemon.conf

+

@PA_DEFAULT_CONFIG_DIR@/daemon.conf

The PulseAudio sound server reads configuration directives from a file ~/.pulse/daemon.conf on startup and when that file doesn't exist from - @pulseconfdir@/daemon.conf. Please note that the + @PA_DEFAULT_CONFIG_DIR@/daemon.conf. Please note that the server also reads a configuration script on startup default.pa which also contains runtime configuration directives.

@@ -262,8 +262,8 @@ USA. default script file. The default behaviour is to load ~/.pulse/default.pa, and if that file does not exist fall back to the system wide installed version - @pulseconfdir@/default.pa. If run in system-wide - mode the file @pulseconfdir@/system.pa is used + @PA_DEFAULT_CONFIG_DIR@/default.pa. If run in system-wide + mode the file @PA_DEFAULT_CONFIG_DIR@/system.pa is used instead. If -n is passed on the command line or default-script-file= is disabled the default configuration script is ignored.

diff --git a/man/pulseaudio.1.xml.in b/man/pulseaudio.1.xml.in index 8810e90..4e58ffb 100644 --- a/man/pulseaudio.1.xml.in +++ b/man/pulseaudio.1.xml.in @@ -314,21 +314,21 @@ USA.

~/.pulse/daemon.conf, - @pulseconfdir@/daemon.conf: configuration settings + @PA_DEFAULT_CONFIG_DIR@/daemon.conf: configuration settings for the PulseAudio daemon. If the version in the user's home directory does not exist the global configuration file is loaded. See for more information.

~/.pulse/default.pa, - @pulseconfdir@/default.pa: the default configuration + @PA_DEFAULT_CONFIG_DIR@/default.pa: the default configuration script to execute when the PulseAudio daemon is started. If the version in the user's home directory does not exist the global configuration script is loaded. See for more information.

~/.pulse/client.conf, - @pulseconfdir@/client.conf: configuration settings + @PA_DEFAULT_CONFIG_DIR@/client.conf: configuration settings for PulseAudio client applications. If the version in the user's home directory does not exist the global configuration file is loaded. See for diff --git a/src/Makefile.am b/src/Makefile.am index d675273..98a7385 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,7 +25,6 @@ pulseincludedir=$(includedir)/pulse pulsecoreincludedir=$(includedir)/pulsecore -pulseconfdir=$(sysconfdir)/pulse pulselibexecdir=$(libexecdir)/pulse if HAVE_X11 xdgautostartdir=$(sysconfdir)/xdg/autostart @@ -39,13 +38,6 @@ dbuspolicydir=$(sysconfdir)/dbus-1/system.d endif ################################### -# Defines # -################################### - -PA_BINARY=$(bindir)/pulseaudio$(EXEEXT) -PA_DEFAULT_CONFIG_DIR=$(pulseconfdir) - -################################### # Compiler/linker flags # ################################### @@ -54,9 +46,6 @@ AM_CFLAGS = \ -I$(top_srcdir)/src/modules \ -I$(top_builddir)/src/modules \ $(PTHREAD_CFLAGS) \ - -DPA_BUILDDIR=\"$(abs_builddir)\" \ - -DPA_DEFAULT_CONFIG_DIR=\"$(PA_DEFAULT_CONFIG_DIR)\" \ - -DPA_BINARY=\"$(PA_BINARY)\" \ -DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \ -DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\" @@ -1896,12 +1885,12 @@ esdcompat: daemon/esdcompat.in Makefile start-pulseaudio-x11: daemon/start-pulseaudio-x11.in Makefile $(AM_V_GEN) sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' \ - -e 's,@PACTL_BINARY\@,$(bindir)/pactl,g' < $< > $@ + -e 's,@PACTL_BINARY\@,$(PACTL_BINARY),g' < $< > $@ $(AM_V_at) chmod +x start-pulseaudio-x11 start-pulseaudio-kde: daemon/start-pulseaudio-kde.in Makefile $(AM_V_GEN) sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' \ - -e 's,@PACTL_BINARY\@,$(bindir)/pactl,g' < $< > $@ + -e 's,@PACTL_BINARY\@,$(PACTL_BINARY),g' < $< > $@ $(AM_V_at) chmod +x start-pulseaudio-kde client.conf: pulse/client.conf.in Makefile @@ -1916,16 +1905,16 @@ else default.pa: daemon/default.pa.in Makefile $(AM_V_GEN) sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' \ -e 's,@PA_DLSEARCHPATH\@,$(modlibexecdir),g' \ - -e 's,@PA_SOEXT\@,.so,g' < $< > $@ + -e 's,@PA_SOEXT\@,$(PA_SOEXT),g' < $< > $@ system.pa: daemon/system.pa.in Makefile $(AM_V_GEN) sed -e 's,@PA_BINARY\@,$(PA_BINARY),g' \ -e 's,@PA_DLSEARCHPATH\@,$(modlibexecdir),g' \ - -e 's,@PA_SOEXT\@,.so,g' < $< > $@ + -e 's,@PA_SOEXT\@,$(PA_SOEXT),g' < $< > $@ endif daemon.conf: daemon/daemon.conf.in Makefile $(AM_V_GEN) sed -e 's,@PA_DLSEARCHPATH\@,$(modlibexecdir),g' \ - -e 's,@PA_DEFAULT_CONFIG_FILE\@,$(DEFAULT_CONFIG_DIR),g' < $< > $@ + -e 's,@PA_DEFAULT_CONFIG_DIR\@,$(PA_DEFAULT_CONFIG_DIR),g' < $< > $@ if OS_IS_WIN32 SYMLINK_PROGRAM=cd $(DESTDIR)$(bindir) && cp diff --git a/src/daemon/daemon.conf.in b/src/daemon/daemon.conf.in index 9beba85..9eee664 100644 --- a/src/daemon/daemon.conf.in +++ b/src/daemon/daemon.conf.in @@ -43,7 +43,7 @@ ; dl-search-path = (depends on architecture) ; load-default-script-file = yes -; default-script-file = @PA_DEFAULT_CONFIG_FILE@ +; default-script-file = @PA_DEFAULT_CONFIG_DIR@/default.pa ; log-target = auto ; log-level = notice -- 2.7.4