From 1c0343dcc2d3cb31b2a081c6c964c3e00fe2694e Mon Sep 17 00:00:00 2001 From: Conrad Parker Date: Mon, 30 Aug 2004 12:33:07 +0000 Subject: add support for speex headers in new location (eg. ) for libspeex-1.1.x: - Retain compatability for etc. from libspeex-1.0.x - Also try speex via pkg-config, and fall back to old AM_PATH_SPEEX CVS patchset: 6920 CVS date: 2004/08/30 12:33:07 --- configure.ac | 25 ++++++++++++++++++++----- src/demuxers/demux_ogg.c | 9 ++++++++- src/libspeex/xine_decoder.c | 10 +++++++++- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index cdec66471..2a7d85d17 100644 --- a/configure.ac +++ b/configure.ac @@ -918,11 +918,26 @@ dnl --------------------------------------------- dnl Ogg/Speex libs. dnl --------------------------------------------- -AM_PATH_OGG( - [ AM_PATH_SPEEX(AC_DEFINE(HAVE_SPEEX,1,[Define this if you have speex]), - AC_MSG_RESULT([*** All OGG/SPEEX dependent parts will be disabled ***])) - ], - AC_MSG_RESULT([*** All of OGG/Speex dependent parts will be disabled ***])) +PKG_CHECK_MODULES(SPEEX, speex, no_speex="no", no_speex="yes") + +if test "x$no_speex" = "xyes" ; then + AM_PATH_OGG([ AM_PATH_SPEEX(no_speex="no")]) +fi + +if test "x$no_speex" = "xyes" ; then + AC_MSG_RESULT([*** All OGG/SPEEX dependent parts will be disabled ***]) +else + AC_DEFINE(HAVE_SPEEX,1,[Define this if you have speex]) + + dnl Test whether Speex headers are eg. or + dnl Speex headers were moved in mid-2004; 1.0.x has backwards compatible headers, 1.1.x does not + AC_CHECK_HEADER([speex/speex.h], + AC_DEFINE(HAVE_SPEEX_SUBDIR, [1], [Define to 1 if speex headers are eg. ]) + ) + + AC_SUBST(SPEEX_CFLAGS) + AC_SUBST(SPEEX_LIBS) +fi AM_CONDITIONAL(HAVE_SPEEX, [test x"$no_ogg" != "xyes" -a x"$no_speex" != "xyes"]) diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index 4a19aa022..304142bc9 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -19,7 +19,7 @@ */ /* - * $Id: demux_ogg.c,v 1.151 2004/07/25 17:08:07 mroi Exp $ + * $Id: demux_ogg.c,v 1.152 2004/08/30 12:33:07 conrad Exp $ * * demultiplexer for ogg streams * @@ -43,11 +43,18 @@ #include #ifdef HAVE_SPEEX +#ifdef HAVE_SPEEX_SUBDIR +#include +#include +#include +#include +#else #include #include #include #include #endif +#endif #ifdef HAVE_THEORA #include diff --git a/src/libspeex/xine_decoder.c b/src/libspeex/xine_decoder.c index 4092d8dfe..4a2eae746 100644 --- a/src/libspeex/xine_decoder.c +++ b/src/libspeex/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.11 2004/01/12 17:35:17 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.12 2004/08/30 12:33:08 conrad Exp $ * * (ogg/)speex audio decoder plugin (libspeex wrapper) for xine */ @@ -40,10 +40,18 @@ #include "buffer.h" #include + +#ifndef HAVE_SPEEX_SUBDIR #include #include #include #include +#else +#include +#include +#include +#include +#endif #define MAX_FRAME_SIZE 2000 -- cgit v1.2.3