]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
flac: Try to link also without -logg.
authorAndre Noll <maan@systemlinux.org>
Mon, 27 Jan 2014 12:54:49 +0000 (13:54 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 22 Feb 2014 15:52:06 +0000 (16:52 +0100)
If libflac was compiled without ogg support, the build system should
include flac even if libogg is not installed. Currently this does
not work because the autoconf test tries to link with -logg, so it
always fails if libogg is not available.

Fix this by trying both with and without libogg.

configure.ac

index 087002ddfa6b561ccba8ec0620192a9557053716..b456b53d148bfdfc81096e28376244e9ca979c1e 100644 (file)
@@ -580,7 +580,11 @@ if test -n "$with_flac_libs"; then
        LDFLAGS="$LDFLAGS $flac_libs"
 fi
 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
        LDFLAGS="$LDFLAGS $flac_libs"
 fi
 AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
-AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no, -logg -lm)
+AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], [
+       # nope, try again with -logg
+       AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [],
+               have_flac=no, -lm -logg)
+       ], -lm)
 if test "$have_flac" = "yes"; then
        AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
        AC_SUBST(flac_cppflags)
 if test "$have_flac" = "yes"; then
        AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
        AC_SUBST(flac_cppflags)