[xiph-commits] r3370 - libfishsound/branches/1.0-stable
conrad at svn.annodex.net
conrad at svn.annodex.net
Sun Jan 20 19:32:45 PST 2008
Author: conrad
Date: 2008-01-20 19:32:44 -0800 (Sun, 20 Jan 2008)
New Revision: 3370
Modified:
libfishsound/branches/1.0-stable/config.h.in
libfishsound/branches/1.0-stable/configure.ac
Log:
reword existing libFLAC configure checks to check for 1.1.2
Modified: libfishsound/branches/1.0-stable/config.h.in
===================================================================
--- libfishsound/branches/1.0-stable/config.h.in 2008-01-21 02:55:52 UTC (rev 3369)
+++ libfishsound/branches/1.0-stable/config.h.in 2008-01-21 03:32:44 UTC (rev 3370)
@@ -15,6 +15,9 @@
/* Define to 1 if you have libFLAC */
#undef HAVE_FLAC
+/* Define to 1 if you have libFLAC 1.1.2 */
+#undef HAVE_FLAC_1_1_2
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
Modified: libfishsound/branches/1.0-stable/configure.ac
===================================================================
--- libfishsound/branches/1.0-stable/configure.ac 2008-01-21 02:55:52 UTC (rev 3369)
+++ libfishsound/branches/1.0-stable/configure.ac 2008-01-21 03:32:44 UTC (rev 3370)
@@ -248,6 +248,7 @@
dnl
HAVE_FLAC=no
+HAVE_FLAC_1_1_2=no
FLAC_SUPPORT=no
ac_enable_flac=yes
@@ -256,15 +257,38 @@
[ ac_enable_flac=no ], [ ac_enable_flac=yes] )
if test "x${ac_enable_flac}" = xyes ; then
- AC_CHECK_LIB(FLAC, FLAC__stream_decoder_init, HAVE_FLAC="maybe", , [-lm -logg])
- if test "x$HAVE_FLAC" = xmaybe; then
- AC_CHECK_HEADER(FLAC/all.h, HAVE_FLAC="yes", HAVE_FLAC="no")
+ PKG_CHECK_MODULES(FLAC, flac, HAVE_FLAC="yes", HAVE_FLAC="no")
+
+ if test "x$HAVE_FLAC" = "xno" ; then
+ AC_CHECK_LIB(FLAC, FLAC__stream_decoder_init, HAVE_FLAC="maybe", , [-lm -logg])
+ if test "x$HAVE_FLAC" = xmaybe; then
+ AC_CHECK_HEADER(FLAC/all.h, HAVE_FLAC="yes", HAVE_FLAC="no")
+ fi
+ if test "x$HAVE_FLAC" = "xyes" ; then
+ FLAC_CFLAGS=""
+ FLAC_LIBS="-lFLAC -logg -lm"
+ fi
fi
+
if test "x$HAVE_FLAC" = xyes ; then
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $FLAC_CFLAGS"
+
+ dnl Test for libFLAC 1.1.2
+ AC_CHECK_LIB(FLAC, FLAC__stream_decoder_init, HAVE_FLAC_1_1_2="yes",
+ HAVE_FLAC_1_1_2="no", [$FLAC_LIBS])
+ if test "x$HAVE_FLAC_1_1_2" = xyes ; then
+ AC_DEFINE(HAVE_FLAC_1_1_2, [1], [Define to 1 if you have libFLAC 1.1.2])
+ FLAC_SUPPORT="yes (1.1.2)"
+ fi
+
+ CFLAGS="$saved_CFLAGS"
+
AC_DEFINE(HAVE_FLAC, [1], [Define to 1 if you have libFLAC])
- FLAC_LIBS="-lFLAC -logg -lm"
+ AC_SUBST(FLAC_CFLAGS)
AC_SUBST(FLAC_LIBS)
- FLAC_SUPPORT="yes"
+
+ fishsound_pkgdeps="$fishsound_pkgdeps flac"
else
AC_DEFINE(HAVE_FLAC, [0], [Define to 1 if you have libFLAC])
fi
More information about the commits
mailing list