[pulseaudio-discuss] [PATCH 03/10] build-sys: Reset CFLAGS after DBUS check
Maarten Bosmans
mkbosmans at gmail.com
Wed Jun 22 06:55:21 PDT 2011
2011/6/22 Colin Guthrie <gmane at colin.guthr.ie>:
> 'Twas brillig, and Maarten Bosmans at 21/06/11 15:01 did gyre and gimble:
>> ---
>> configure.ac | 8 ++++----
>> src/Makefile.am | 5 +++++
>> 2 files changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 4e03996..f5e2f5a 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -971,11 +971,11 @@ AS_IF([test "x$enable_dbus" = "xyes" && test "x$HAVE_DBUS" = "x0"],
>>
>> AS_IF([test "x$HAVE_DBUS" = "x1"],
>> [
>> - saved_LIBS="$LIBS"
>> - LIBS="$LIBS $DBUS_LIBS"
>> - CFLAGS="$CFLAGS $DBUS_CFLAGS"
>> + save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $DBUS_CFLAGS"
>> + save_LIBS="$LIBS"; LIBS="$LIBS $DBUS_LIBS"
>> AC_CHECK_FUNCS(dbus_watch_get_unix_fd)
>> - LIBS="$saved_LIBS"
>> + CFLAGS="$save_CFLAGS"
>> + LIBS="$save_LIBS"
>> ])
>>
>> AC_SUBST(DBUS_CFLAGS)
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index 4990ac3..b76cb40 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -998,8 +998,13 @@ libprotocol_http_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
>> libprotocol_http_la_LIBADD = $(AM_LIBADD) libpulsecore- at PA_MAJORMINOR@.la libpulsecommon- at PA_MAJORMINOR@.la libpulse.la
>>
>> libprotocol_native_la_SOURCES = pulsecore/protocol-native.c pulsecore/protocol-native.h pulsecore/native-common.h
>> +libprotocol_native_la_CFLAGS = $(AM_CFLAGS)
>> libprotocol_native_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
>> libprotocol_native_la_LIBADD = $(AM_LIBADD) libpulsecore- at PA_MAJORMINOR@.la libpulsecommon- at PA_MAJORMINOR@.la libpulse.la
>> +if HAVE_DBUS
>> +libprotocol_native_la_CFLAGS += $(DBUS_CFLAGS)
>> +libprotocol_native_la_LIBADD += $(DBUS_LIBS)
>> +endif
>>
>> libprotocol_esound_la_SOURCES = pulsecore/protocol-esound.c pulsecore/protocol-esound.h pulsecore/esound.h
>> libprotocol_esound_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
>
>
> Not sure if it's related to this, but I now get this during a distcheck:
>
> In file included from ../../src/modules/module-equalizer-sink.c:70:0:
> ../../src/pulsecore/protocol-dbus.h:25:23: fatal error: dbus/dbus.h: No
> such file or directory
> compilation terminated.
> make[4]: *** [module_equalizer_sink_la-module-equalizer-sink.lo] Error 1
> make[4]: *** Waiting for unfinished jobs....
> make[4]: Leaving directory
> `/home/colin/Development/Personal/Mageia/pulse/pulseaudio/SOURCES/pulseaudio/dc/pulseaudio-1.0-dev-392-ga1f8/_build/src'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory
> `/home/colin/Development/Personal/Mageia/pulse/pulseaudio/SOURCES/pulseaudio/dc/pulseaudio-1.0-dev-392-ga1f8/_build/src'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory
> `/home/colin/Development/Personal/Mageia/pulse/pulseaudio/SOURCES/pulseaudio/dc/pulseaudio-1.0-dev-392-ga1f8/_build'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory
> `/home/colin/Development/Personal/Mageia/pulse/pulseaudio/SOURCES/pulseaudio/dc/pulseaudio-1.0-dev-392-ga1f8/_build'
> make: *** [distcheck] Error 1
Yup, previously you got away with that because the DBUS_CFLAGS leaked
into CFLAGS. I didn't have fftw development files installed, so mod-eq
was not tested by me.
> Which was fairly trivial to fix:
> commit c3056ce5301c06159139cd79cc2bd65744b4170f
> Author: Colin Guthrie <colin at mageia.org>
> Date: Wed Jun 22 14:16:21 2011 +0100
>
> build-sys: module-equalizer-sink needs dbus.
>
> diff --git a/src/Makefile.am b/src/Makefile.am
> index b76cb40..aa6b445 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -1548,6 +1548,11 @@ module_equalizer_sink_la_CFLAGS = $(AM_CFLAGS)
> $(FFTW_CFLAGS)
> module_equalizer_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
> module_equalizer_sink_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS)
> $(FFTW_LIBS)
>
> +if HAVE_DBUS
> +module_equalizer_sink_la_CFLAGS += $(DBUS_CFLAGS)
> +module_equalizer_sink_la_LIBADD += $(DBUS_LIBS)
> +endif
> +
> module_match_la_SOURCES = modules/module-match.c
> module_match_la_LDFLAGS = $(MODULE_LDFLAGS)
> module_match_la_LIBADD = $(MODULE_LIBADD)
Looks like the right solution indeed.
> As distcheck passed, I'll push this shortly.
Thanks, that's quick.
> Col
Maarten
More information about the pulseaudio-discuss
mailing list