=== 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]) +])