Package: gmerlin-avdecoder / 2.0.0~svn6298~dfsg0-5

DEBIAN_system-gsm.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Description: use system libgsm
 use system's libgsm (+headers), since the version that ships with
 upstream is removed (for policy reasons) and the two are supposed to be
 compatible
Author: IOhannes m zmölnig <zmoelnig@iem.at>
Forwarded: not-needed
Last-Update: 2011-01-10

--- gmerlin-avdecoder.orig/configure.ac
+++ gmerlin-avdecoder/configure.ac
@@ -397,6 +397,18 @@
     [disable libgsm]),
     have_libgsm="false", have_libgsm="true")
 
+AC_SUBST(GSM_LIBS)
+if test "x$have_libgsm" = "xtrue"; then
+ have_sysgsm="false"
+ AC_CHECK_HEADER(gsm/gsm.h,
+   [AC_CHECK_LIB(gsm, gsm_create, have_sysgsm="true")]
+ )
+ if test "x$have_sysgsm" = "xtrue"; then
+    GSM_LIBS="-lgsm"
+    AC_DEFINE([HAVE_GSM_GSM_H], [1], [define if you have 'gsm/gsm.h'])
+ fi
+fi
+
 if test "x$have_libgsm" = "xtrue"; then
 AC_DEFINE([HAVE_LIBGSM])
 fi
--- gmerlin-avdecoder.orig/lib/audio_gsm.c
+++ gmerlin-avdecoder/lib/audio_gsm.c
@@ -23,7 +23,11 @@
 #include <avdec_private.h>
 #include <codecs.h>
 
-#include "GSM610/gsm.h"
+#ifdef HAVE_GSM_GSM_H
+# include "gsm/gsm.h"
+#else
+# include "GSM610/gsm.h"
+#endif
 
 /* Audio decoder for the internal libgsm */
 
--- gmerlin-avdecoder.orig/lib/Makefile.am
+++ gmerlin-avdecoder/lib/Makefile.am
@@ -222,8 +222,8 @@
 
 if HAVE_LIBGSM
 gsm_sources = audio_gsm.c
-gsm_subdirs = GSM610
-gsm_libs = $(top_builddir)/lib/GSM610/libgsm.la
+gsm_subdirs =
+gsm_libs = @GSM_LIBS@
 else
 gsm_sources =
 gsm_subdirs =