Skip to content

Commit 0657aee

Browse files
committed
Add vorbis dependencies when building examples.
The decoder_example program calls floor() which requires its own -lm on the link line to resolve the local reference. It seems on most platforms this was shadowed by the transitive dependency in the vorbis libraries, but it results in an unddefined reference error on e.g. debian 10 mipsel. Signed-off-by: Mark Harris <[email protected]>
1 parent eb40ca5 commit 0657aee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: examples/Makefile.am

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ AM_CPPFLAGS = -I$(top_srcdir)/include @OGG_CFLAGS@
1313
#LDFLAGS = -all-static
1414

1515
decoder_example_SOURCES = decoder_example.c
16-
decoder_example_LDADD = $(top_builddir)/lib/libvorbis.la @OGG_LIBS@
16+
decoder_example_LDADD = $(top_builddir)/lib/libvorbis.la @VORBIS_LIBS@ @OGG_LIBS@
1717

1818
encoder_example_SOURCES = encoder_example.c
19-
encoder_example_LDADD = $(top_builddir)/lib/libvorbisenc.la $(top_builddir)/lib/libvorbis.la @OGG_LIBS@
19+
encoder_example_LDADD = $(top_builddir)/lib/libvorbisenc.la $(top_builddir)/lib/libvorbis.la @VORBIS_LIBS@ @OGG_LIBS@
2020

2121
chaining_example_SOURCES = chaining_example.c
22-
chaining_example_LDADD = $(top_builddir)/lib/libvorbisfile.la $(top_builddir)/lib/libvorbis.la @OGG_LIBS@
22+
chaining_example_LDADD = $(top_builddir)/lib/libvorbisfile.la $(top_builddir)/lib/libvorbis.la @VORBIS_LIBS@ @OGG_LIBS@
2323

2424
vorbisfile_example_SOURCES = vorbisfile_example.c
25-
vorbisfile_example_LDADD = $(top_builddir)/lib/libvorbisfile.la $(top_builddir)/lib/libvorbis.la @OGG_LIBS@
25+
vorbisfile_example_LDADD = $(top_builddir)/lib/libvorbisfile.la $(top_builddir)/lib/libvorbis.la @VORBIS_LIBS@ @OGG_LIBS@
2626

2727
seeking_example_SOURCES = seeking_example.c
28-
seeking_example_LDADD = $(top_builddir)/lib/libvorbisfile.la $(top_builddir)/lib/libvorbis.la @OGG_LIBS@
28+
seeking_example_LDADD = $(top_builddir)/lib/libvorbisfile.la $(top_builddir)/lib/libvorbis.la @VORBIS_LIBS@ @OGG_LIBS@
2929

3030
debug:
3131
$(MAKE) all CFLAGS="@DEBUG@"

0 commit comments

Comments
 (0)