[easytag] Add checks for extra id3lib declarations
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Add checks for extra id3lib declarations
- Date: Fri, 6 Feb 2015 21:03:38 +0000 (UTC)
commit 54ba8cf11c92650ab20d33670df66144c6ee2e67
Author: David King <amigadave amigadave com>
Date: Fri Feb 6 20:43:33 2015 +0000
Add checks for extra id3lib declarations
Fix compilation of id3lib wrapper on Debian, which includes some C
wrapper functions which were not in the id3lib 3.8.3 release, by
checking for the declarations with AC_CHECK_DECLS.
configure.ac | 7 ++++++-
src/tags/id3lib/id3_bugfix.h | 20 +++++++++++++-------
2 files changed, 19 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 82463e1..146a42b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -277,7 +277,12 @@ AS_IF([test "x$have_mp3" = "xyes" -a "x$enable_id3v23" != "xno"],
AC_SUBST([ID3LIB_LIBS], [$ac_cv_search_ID3Tag_Link])
AC_DEFINE([ENABLE_ID3LIB], [], [Define for ID3v2.3 support])
- ID3LIB_VERSION="(id3lib-$ID3LIB_MAJOR.$ID3LIB_MINOR.$ID3LIB_PATCH)"],
+ ID3LIB_VERSION="(id3lib-$ID3LIB_MAJOR.$ID3LIB_MINOR.$ID3LIB_PATCH)"
+ AC_CHECK_DECLS([ID3Field_SetEncoding,
+ ID3Field_GetEncoding,
+ ID3Field_IsEncodable],
+ [], [],
+ [[#include <id3.h>]])],
[have_id3lib=no])
diff --git a/src/tags/id3lib/id3_bugfix.h b/src/tags/id3lib/id3_bugfix.h
index f21f9ed..5eb39cf 100644
--- a/src/tags/id3lib/id3_bugfix.h
+++ b/src/tags/id3lib/id3_bugfix.h
@@ -28,13 +28,19 @@
G_BEGIN_DECLS
- ID3_C_EXPORT bool CCONV ID3Field_SetEncoding (ID3Field *field, ID3_TextEnc enc);
- ID3_C_EXPORT ID3_TextEnc CCONV ID3Field_GetEncoding (const ID3Field *field);
- ID3_C_EXPORT bool CCONV ID3Field_IsEncodable (const ID3Field *field);
- ID3_C_EXPORT ID3_FieldType CCONV ID3Field_GetType (const ID3Field *field);
- //ID3_C_EXPORT ID3_FieldID CCONV ID3Field_GetID (const ID3Field *field);
-
- ID3_C_EXPORT const Mp3_Headerinfo* CCONV ID3Tag_GetMp3HeaderInfo (ID3Tag *tag);
+#if !HAVE_DECL_ID3FIELD_SETENCODING
+ID3_C_EXPORT bool CCONV ID3Field_SetEncoding (ID3Field *field, ID3_TextEnc enc);
+#endif /* !HAVE_DECL_ID3FIELD_SETENCODING */
+#if !HAVE_DECL_ID3FIELD_GETENCODING
+ID3_C_EXPORT ID3_TextEnc CCONV ID3Field_GetEncoding (const ID3Field *field);
+#endif /* !HAVE_DECL_ID3FIELD_GETENCODING */
+#if !HAVE_DECL_ID3FIELD_ISENCODABLE
+ID3_C_EXPORT bool CCONV ID3Field_IsEncodable (const ID3Field *field);
+#endif /* !HAVE_DECL_ID3FIELD_ISENCODABLE */
+ID3_C_EXPORT ID3_FieldType CCONV ID3Field_GetType (const ID3Field *field);
+//ID3_C_EXPORT ID3_FieldID CCONV ID3Field_GetID (const ID3Field *field);
+
+ID3_C_EXPORT const Mp3_Headerinfo* CCONV ID3Tag_GetMp3HeaderInfo (ID3Tag *tag);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]