[PATCH 2/2] Only link against libogg (and libm) if needed

Ulrich Klauer ulrich at chirlu.de
Sat Apr 6 12:28:25 PDT 2013


Most of the programs don't use libogg or libm directly and should not
link to them (overlinking).
---
 examples/c/decode/file/Makefile.am    |    4 +---
 src/flac/Makefile.am                  |    1 -
 src/metaflac/Makefile.am              |    4 +---
 src/plugin_xmms/Makefile.am           |    1 -
 src/test_grabbag/cuesheet/Makefile.am |    4 +---
 src/test_grabbag/picture/Makefile.am  |    4 +---
 src/test_seeking/Makefile.am          |    4 +---
 7 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/examples/c/decode/file/Makefile.am b/examples/c/decode/file/Makefile.am
index 7926e48..d3b2b0e 100644
--- a/examples/c/decode/file/Makefile.am
+++ b/examples/c/decode/file/Makefile.am
@@ -22,8 +22,6 @@ EXTRA_DIST = \
 AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include
 noinst_PROGRAMS = example_c_decode_file
 example_c_decode_file_LDADD = \
-	$(top_builddir)/src/libFLAC/libFLAC.la \
-	@OGG_LIBS@ \
-	-lm
+	$(top_builddir)/src/libFLAC/libFLAC.la
 
 example_c_decode_file_SOURCES = main.c
diff --git a/src/flac/Makefile.am b/src/flac/Makefile.am
index 6f0145b..ceae6a5 100644
--- a/src/flac/Makefile.am
+++ b/src/flac/Makefile.am
@@ -50,7 +50,6 @@ flac_LDADD = \
 	$(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
 	$(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \
 	$(top_builddir)/src/libFLAC/libFLAC.la \
-	@OGG_LIBS@ \
 	@LIBICONV@ \
 	-lm
 
diff --git a/src/metaflac/Makefile.am b/src/metaflac/Makefile.am
index dc286dc..bd54356 100644
--- a/src/metaflac/Makefile.am
+++ b/src/metaflac/Makefile.am
@@ -47,8 +47,6 @@ metaflac_LDADD = \
 	$(top_builddir)/src/share/getopt/libgetopt.la \
 	$(top_builddir)/src/share/utf8/libutf8.la \
 	$(top_builddir)/src/libFLAC/libFLAC.la \
-	@OGG_LIBS@ \
-	@LIBICONV@ \
-	-lm
+	@LIBICONV@
 
 CLEANFILES = metaflac.exe
diff --git a/src/plugin_xmms/Makefile.am b/src/plugin_xmms/Makefile.am
index 84c4106..ffb76a1 100644
--- a/src/plugin_xmms/Makefile.am
+++ b/src/plugin_xmms/Makefile.am
@@ -60,7 +60,6 @@ libxmms_flac_la_LIBADD = \
 	$(top_builddir)/src/share/utf8/libutf8.la \
 	$(top_builddir)/src/libFLAC/libFLAC.la \
 	-L$(top_builddir)/src/libFLAC/.libs \
-	@OGG_LIBS@ \
 	@XMMS_LIBS@ \
 	@LIBICONV@
 libxmms_flac_la_LDFLAGS = -module -avoid-version
diff --git a/src/test_grabbag/cuesheet/Makefile.am b/src/test_grabbag/cuesheet/Makefile.am
index 2b240e1..b4d7824 100644
--- a/src/test_grabbag/cuesheet/Makefile.am
+++ b/src/test_grabbag/cuesheet/Makefile.am
@@ -26,8 +26,6 @@ test_cuesheet_SOURCES = \
 test_cuesheet_LDADD = \
 	$(top_builddir)/src/share/grabbag/libgrabbag.la \
 	$(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
-	$(top_builddir)/src/libFLAC/libFLAC.la \
-	@OGG_LIBS@ \
-	-lm
+	$(top_builddir)/src/libFLAC/libFLAC.la
 
 CLEANFILES = test_cuesheet.exe
diff --git a/src/test_grabbag/picture/Makefile.am b/src/test_grabbag/picture/Makefile.am
index d40eb68..d7e0c54 100644
--- a/src/test_grabbag/picture/Makefile.am
+++ b/src/test_grabbag/picture/Makefile.am
@@ -26,8 +26,6 @@ test_picture_SOURCES = \
 
 test_picture_LDADD = \
 	$(top_builddir)/src/share/grabbag/libgrabbag.la \
-	$(top_builddir)/src/libFLAC/libFLAC.la \
-	@OGG_LIBS@ \
-	-lm
+	$(top_builddir)/src/libFLAC/libFLAC.la
 
 CLEANFILES = test_picture.exe
diff --git a/src/test_seeking/Makefile.am b/src/test_seeking/Makefile.am
index 806f3a1..55d0fe0 100644
--- a/src/test_seeking/Makefile.am
+++ b/src/test_seeking/Makefile.am
@@ -25,9 +25,7 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include
 
 noinst_PROGRAMS = test_seeking
 test_seeking_LDADD = \
-	$(top_builddir)/src/libFLAC/libFLAC.la \
-	@OGG_LIBS@ \
-	-lm
+	$(top_builddir)/src/libFLAC/libFLAC.la
 
 test_seeking_SOURCES = \
 	main.c
-- 
1.7.10.4


--=_zgXxQ3sVxI23LNoRrdaXaA1--



More information about the flac-dev mailing list