From b6c7050f63cb0fa16e9b0af4354e7cb065587d0b Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 13 Sep 2013 05:36:22 +0000 Subject: [PATCH] build: cppflags/ldflags conversion: libspeex. This fixes the --with-speex-headers option, which has never worked, by adding the speex_cppflags output variable and including the given flags in CPPFLAGS for the three objects that need it. The straight-forward conversion for speex linker flags is also performed in this patch. --- Makefile.in | 11 +++++++---- configure.ac | 11 ++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile.in b/Makefile.in index b04cbdb7..dee22037 100644 --- a/Makefile.in +++ b/Makefile.in @@ -19,9 +19,12 @@ GENGETOPT := @gengetopt@ HELP2MAN := @help2man@ MKDIR_P := mkdir -p +speex_cppflags := @speex_cppflags@ + id3tag_ldflags := @id3tag_ldflags@ ogg_ldflags := @ogg_ldflags@ vorbis_ldflags := @vorbis_ldflags@ +speex_ldflags := @speex_ldflags@ build_date := $(shell date) uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") @@ -160,15 +163,15 @@ $(object_dir)/crypt.o: crypt.c | $(object_dir) $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @openssl_cppflags@ $< $(object_dir)/spx_common.o: spx_common.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) @ogg_cppflags@ $< $(object_dir)/spxdec_filter.o: spxdec_filter.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) @ogg_cppflags@ $< $(object_dir)/spx_afh.o: spx_afh.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) @ogg_cppflags@ $< $(object_dir)/oggdec_filter.o: oggdec_filter.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' @@ -263,7 +266,7 @@ para_audiod \ para_play \ para_afh \ para_recv \ -: LDFLAGS += $(ogg_ldflags) $(vorbis_ldflags) +: LDFLAGS += $(ogg_ldflags) $(vorbis_ldflags) $(speex_ldflags) para_recv: $(recv_objs) diff --git a/configure.ac b/configure.ac index 0dd08a48..b12dc181 100644 --- a/configure.ac +++ b/configure.ac @@ -646,14 +646,11 @@ if test "$have_vorbis" = "yes"; then fi if test "$have_speex" = "yes"; then AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support) + AC_SUBST(speex_cppflags) + speex_ldflags="$speex_libs -lspeex" + AC_SUBST(speex_ldflags) + filters="$filters spxdec" - speex_libs="-lspeex" - server_ldflags="$server_ldflags $speex_libs" - filter_ldflags="$filter_ldflags $speex_libs" - audiod_ldflags="$audiod_ldflags $speex_libs" - play_ldflags="$play_ldflags $speex_libs" - afh_ldflags="$afh_ldflags $speex_libs" - recv_ldflags="$recv_ldflags $speex_libs" server_errlist_objs="$server_errlist_objs spx_afh spx_common" filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common" -- 2.39.5