From 425e6e395f6bcaff77d0393126e1253066ddcd8a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 3 Mar 2012 17:17:31 +0000 Subject: [PATCH] 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 --- configure.ac | 6 ++++++ ext/amrnb/amrnbdec.h | 5 +++++ ext/amrnb/amrnbenc.h | 7 ++++++- ext/amrwbdec/amrwbdec.h | 6 ++++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3c2e341..18f2904 100644 --- a/configure.ac +++ b/configure.ac @@ -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" diff --git a/ext/amrnb/amrnbdec.h b/ext/amrnb/amrnbdec.h index 1e81839..5fe6982 100644 --- a/ext/amrnb/amrnbdec.h +++ b/ext/amrnb/amrnbdec.h @@ -22,7 +22,12 @@ #include #include + +#ifdef HAVE_OPENCORE_AMRNB_0_1_3_OR_LATER +#include +#else #include +#endif G_BEGIN_DECLS diff --git a/ext/amrnb/amrnbenc.h b/ext/amrnb/amrnbenc.h index 7f673ac..48a8fe8 100644 --- a/ext/amrnb/amrnbenc.h +++ b/ext/amrnb/amrnbenc.h @@ -21,9 +21,14 @@ #define __GST_AMRNBENC_H__ #include -#include #include +#ifdef HAVE_OPENCORE_AMRNB_0_1_3_OR_LATER +#include +#else +#include +#endif + G_BEGIN_DECLS #define GST_TYPE_AMRNBENC \ diff --git a/ext/amrwbdec/amrwbdec.h b/ext/amrwbdec/amrwbdec.h index c3528fc..6b82ae9 100644 --- a/ext/amrwbdec/amrwbdec.h +++ b/ext/amrwbdec/amrwbdec.h @@ -22,8 +22,14 @@ #include #include + +#ifdef HAVE_OPENCORE_AMRWB_0_1_3_OR_LATER +#include +#include +#else #include #include +#endif G_BEGIN_DECLS -- 2.7.4