summaryrefslogtreecommitdiff
blob: f4403d76973bc0bd72a32b03a8a52d051aeb65e9 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
=== modified file 'configure.in'
--- configure.in	2010-04-09 04:05:31 +0000
+++ configure.in	2010-04-09 04:10:45 +0000
@@ -360,7 +360,26 @@
 
 AC_SUBST(STRICT_OPTIONS)
 
-AC_CONFIG_SUBDIRS( mediastreamer2 )
+AC_ARG_ENABLE(external-mediastreamer,
+      [  --enable-external-mediastreamer Use external mediastreamer library],
+      [case "${enableval}" in
+        yes) external_mediastreamer=true ;;
+        no)  external_mediastreamer=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-external-mediastreamer) ;;
+      esac],[external_mediastreamer=false])
+
+if test "$external_mediastreamer" = 'true'; then
+	LP_CHECK_MSTREAMER
+else
+	AC_CONFIG_SUBDIRS( mediastreamer2 )
+	MSTREAMER_CFLAGS="-I\$(top_srcdir)/mediastreamer2/include"
+	MSTREAMER_LIBS="\$(top_builddir)/mediastreamer2/src/libmediastreamer.la"
+fi
+
+AC_SUBST(MSTREAMER_CFLAGS)
+AC_SUBST(MSTREAMER_LIBS)
+
+AM_CONDITIONAL(EXTERNAL_MSTREAMER, [test "$external_mediastreamer" = 'true'])
 
 dnl check for db2html (docbook) to generate html user manual
 AC_CHECK_PROG(have_sgmltools,sgmltools, yes, no)

=== modified file 'console/Makefile.am'
--- console/Makefile.am	2010-04-09 04:05:31 +0000
+++ console/Makefile.am	2010-04-09 04:10:45 +0000
@@ -9,7 +9,7 @@
 	-I$(top_srcdir)/coreapi\
 	$(ORTP_CFLAGS) \
 	-I$(top_srcdir)/exosip \
-	-I$(top_srcdir)/mediastreamer2/include
+	$(MSTREAMER_CFLAGS)
 
 
 
@@ -22,7 +22,7 @@
 linphonec_SOURCES = linphonec.c linphonec.h commands.c
 linphonec_CFLAGS=$(COMMON_CFLAGS) $(CONSOLE_FLAGS)
 linphonec_LDADD = $(top_builddir)/coreapi/liblinphone.la $(READLINE_LIBS)  \
-		$(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+		$(MSTREAMER_LIBS) \
 		$(ORTP_LIBS) \
 		$(SPEEX_LIBS) \
 		$(OSIP_LIBS)
@@ -41,7 +41,7 @@
 
 sipomatic_LDADD= 	$(INTLLIBS)  \
 			$(top_builddir)/coreapi/liblinphone.la \
-			$(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+			$(MSTREAMER_LIBS) \
 			$(ORTP_LIBS) \
 			$(SPEEX_LIBS) \
 			$(OSIP_LIBS)

=== modified file 'coreapi/Makefile.am'
--- coreapi/Makefile.am	2010-04-09 04:05:31 +0000
+++ coreapi/Makefile.am	2010-04-09 04:10:45 +0000
@@ -10,7 +10,7 @@
 
 INCLUDES = \
 	-I$(top_srcdir)\
-	-I$(top_srcdir)/mediastreamer2/include
+	$(MSTREAMER_CFLAGS)
 
 
 lib_LTLIBRARIES=liblinphone.la
@@ -41,7 +41,7 @@
 
 liblinphone_la_LIBADD= \
 		$(EXOSIP_LIBS) \
-		$(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+		$(MSTREAMER_LIBS) \
 		$(ORTP_LIBS)
 
 if BUILD_WIN32

=== modified file 'gtk-glade/Makefile.am'
--- gtk-glade/Makefile.am	2010-04-09 04:05:31 +0000
+++ gtk-glade/Makefile.am	2010-04-09 04:11:22 +0000
@@ -47,8 +47,8 @@
 			loginframe.c \
 			linphone.h 
 
-linphone_3_LDADD=$(top_builddir)/oRTP/src/libortp.la \
-		$(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+linphone_3_LDADD=$(ORTP_LIBS) \
+		$(MSTREAMER_LIBS) \
 		$(top_builddir)/coreapi/liblinphone.la \
 			$(LIBGTK_LIBS) $(INTLLIBS) \
 			$(LIBGLADE_LIBS)
@@ -77,7 +77,7 @@
 
 
 AM_CFLAGS= -DIN_LINPHONE -I$(top_srcdir)/coreapi/ \
-		-I$(top_srcdir)/mediastreamer2/include/ \
+		$(MSTREAMER_CFLAGS) \
 		$(ORTP_CFLAGS) \
 		$(LIBGLADE_CFLAGS) $(STRICT_OPTIONS) $(LIBGTK_CFLAGS) $(IPV6_CFLAGS) \
 		$(OSIP_CFLAGS) 

=== added file 'm4/mstreamer.m4'
--- m4/mstreamer.m4	1970-01-01 00:00:00 +0000
+++ m4/mstreamer.m4	2010-02-11 15:16:28 +0000
@@ -0,0 +1,11 @@
+AC_DEFUN([LP_CHECK_MSTREAMER],[
+
+PKG_CHECK_MODULES([MSTREAMER], [mediastreamer >= 2.2.3], , [ms_failed=true])
+
+if test "$ms_failed" = "true"; then
+	AC_MSG_ERROR("External mediastreamer library not found")
+fi
+
+AC_SUBST([MSTREAMER_LIBS])
+AC_SUBST([MSTREAMER_CFLAGS])
+])