amrnb, amrwbdec: fix build with opencore-amr >= 0.1.3

In previous versions, the opencore-amr include sub-directory
would be specified in the include path in the CFLAGS, but this
is no longer the case in newer versions, so we need to add those
to our include directives.

Based on patch by: Christian Morales Vega

https://bugzilla.gnome.org/show_bug.cgi?id=671123
This commit is contained in:
Tim-Philipp Müller 2012-03-03 17:17:31 +00:00
parent 593ddf4bb9
commit 425e6e395f
4 changed files with 23 additions and 1 deletions

View file

@ -251,6 +251,9 @@ dnl *** amr-nb ***
translit(dnm, m, l) AM_CONDITIONAL(USE_AMRNB, true)
AG_GST_CHECK_FEATURE(AMRNB, [amrnb library], amrnb, [
PKG_CHECK_MODULES(AMRNB, opencore-amrnb, [
if $PKG_CONFIG --atleast-version=0.1.3 opencore-amrnb; then
AC_DEFINE(HAVE_OPENCORE_AMRNB_0_1_3_OR_LATER, 1, [Defined for newer opencore-amrnb])
fi
HAVE_AMRNB="yes"
], [
HAVE_AMRNB="no"
@ -263,6 +266,9 @@ dnl *** amr-wb dec ***
translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true)
AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwbdec, [
PKG_CHECK_MODULES(AMRWB, opencore-amrwb, [
if $PKG_CONFIG --atleast-version=0.1.3 opencore-amrwb; then
AC_DEFINE(HAVE_OPENCORE_AMRWB_0_1_3_OR_LATER, 1, [Defined for newer opencore-amrwb])
fi
HAVE_AMRWB="yes"
], [
HAVE_AMRWB="no"

View file

@ -22,7 +22,12 @@
#include <gst/gst.h>
#include <gst/audio/gstaudiodecoder.h>
#ifdef HAVE_OPENCORE_AMRNB_0_1_3_OR_LATER
#include <opencore-amrnb/interf_dec.h>
#else
#include <interf_dec.h>
#endif
G_BEGIN_DECLS

View file

@ -21,9 +21,14 @@
#define __GST_AMRNBENC_H__
#include <gst/gst.h>
#include <interf_enc.h>
#include <gst/audio/gstaudioencoder.h>
#ifdef HAVE_OPENCORE_AMRNB_0_1_3_OR_LATER
#include <opencore-amrnb/interf_enc.h>
#else
#include <interf_enc.h>
#endif
G_BEGIN_DECLS
#define GST_TYPE_AMRNBENC \

View file

@ -22,8 +22,14 @@
#include <gst/gst.h>
#include <gst/audio/gstaudiodecoder.h>
#ifdef HAVE_OPENCORE_AMRWB_0_1_3_OR_LATER
#include <opencore-amrwb/dec_if.h>
#include <opencore-amrwb/if_rom.h>
#else
#include <dec_if.h>
#include <if_rom.h>
#endif
G_BEGIN_DECLS