Fix MacOSX compilation for non xcrun clang compiler

parent a773cb8a
......@@ -55,20 +55,6 @@ Compilation and installation
2) Download latest linphone-deps-win32 zip from http://download-mirror.savannah.gnu.org/releases/linphone/misc/ and unpack it in the linphone-deps directory.
3) open build/win32native/mediastreamer2.sln
* Known issues on MacOSX
If you get the following error during 'make' command:
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
This is probably because you set CC to something else than 'xcrun clang'.
However this is the only compiler supported to link correctly objective C
files (.m) and c in .la library file. Try unsetting your custom CC compiler
and reconfigure:
$> unset CC
$> ./configure && make
Contact information:
-------------------------------------
......
......@@ -35,6 +35,24 @@ BUILT_SOURCES=basedescs.h $(GITVERSION_FILE) yuv2rgb.fs.h yuv2rgb.vs.h
CLEANFILES=basedescs.h voipdescs.h basedescs.txt voipdescs.txt $(GITVERSION_FILE) yuv2rgb.fs.h yuv2rgb.vs.h
libmediastreamer_voip_la_LIBADD= libmediastreamer_base.la \
$(ORTP_LIBS) \
$(VP8_LIBS) \
$(PORTAUDIO_LIBS) \
$(ALSA_LIBS) \
$(QSA_LIBS) \
$(ARTS_LIBS) \
$(LIBPULSE_LIBS) \
$(SPEEX_LIBS) \
$(GSM_LIBS) \
$(LIBV4L1_LIBS) \
$(LIBV4L2_LIBS) \
$(LIBV4LCONVERT_LIBS) \
$(SPANDSP_LIBS) \
$(PCAP_LIBS) \
$(OPUS_LIBS)
lib_LTLIBRARIES=libmediastreamer_base.la
if BUILD_VOIP_LIBRARY
lib_LTLIBRARIES+=libmediastreamer_voip.la
......@@ -176,10 +194,15 @@ endif
if BUILD_VIDEO
if BUILD_MACOSX
libmediastreamer_voip_la_SOURCES+= videofilters/qtcapture.m \
noinst_LTLIBRARIES=libqtcapture_cocoa.la
libqtcapture_cocoa_la_LIBTOOLFLAGS= --tag=CC
libqtcapture_cocoa_la_SOURCES = videofilters/qtcapture.m \
videofilters/msosxdisplay.m \
utils/shaders.c utils/shaders.h \
libqtcapture_cocoa_la_SOURCES += utils/shaders.c utils/shaders.h \
utils/opengles_display.c utils/opengles_display.h
libmediastreamer_voip_la_LIBADD+=libqtcapture_cocoa.la
nodist_libmediastreamer_voip_la_SOURCES = yuv2rgb.fs.h yuv2rgb.fs.h
endif
......@@ -369,23 +392,6 @@ AM_CFLAGS+=$(VIDEO_CFLAGS) $(GLEW_CFLAGS)
endif
libmediastreamer_voip_la_LIBADD= libmediastreamer_base.la \
$(ORTP_LIBS) \
$(VP8_LIBS) \
$(PORTAUDIO_LIBS) \
$(ALSA_LIBS) \
$(QSA_LIBS) \
$(ARTS_LIBS) \
$(LIBPULSE_LIBS) \
$(SPEEX_LIBS) \
$(GSM_LIBS) \
$(LIBV4L1_LIBS) \
$(LIBV4L2_LIBS) \
$(LIBV4LCONVERT_LIBS) \
$(SPANDSP_LIBS) \
$(PCAP_LIBS) \
$(OPUS_LIBS)
if BUILD_WIN32
libmediastreamer_voip_la_LIBADD+= -lole32 \
-loleaut32\
......
......@@ -21,6 +21,10 @@
#include "mediastreamer2/mscommon.h"
#include "shaders.h"
#ifdef __cplusplus
extern "C"{
#endif
enum ImageType {
REMOTE_IMAGE = 0,
PREVIEW_IMAGE,
......@@ -590,3 +594,7 @@ JNIEXPORT void JNICALL Java_org_linphone_mediastream_video_display_OpenGLESDispl
ogl_display_render(d, 0);
}
#endif
#ifdef __cplusplus
}
#endif
......@@ -33,6 +33,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer2/mscodecutils.h"
#include "mediastreamer2/msfilter.h"
#ifdef __cplusplus
extern "C"{
#endif
extern void __register_ffmpeg_encoders_if_possible(MSFactory *factory);
extern void ms_ffmpeg_check_init();
extern bool_t libmsandroiddisplay_init(MSFactory *factory);
......@@ -250,12 +254,12 @@ static int managers_ref=0;
void ms_factory_init_voip(MSFactory *obj){
MSSndCardManager *cm;
int i;
/* register builtin VoIP MSFilter's */
for (i=0;ms_voip_filter_descs[i]!=NULL;i++){
ms_factory_register_filter(obj,ms_voip_filter_descs[i]);
}
if (managers_ref==0){
managers_ref++;
cm=ms_snd_card_manager_get();
......@@ -279,7 +283,7 @@ void ms_factory_init_voip(MSFactory *obj){
}
#endif
}
#if defined(VIDEO_ENABLED) && defined(MS2_FILTERS) && !defined(NO_FFMPEG) && defined(HAVE_LIBAVCODEC_AVCODEC_H)
ms_ffmpeg_check_init();
__register_ffmpeg_encoders_if_possible(obj);
......@@ -317,3 +321,7 @@ void ms_voip_exit(){
}
ms_factory_uninit_voip(ms_factory_get_fallback());
}
#ifdef __cplusplus
}
#endif
......@@ -37,6 +37,7 @@ LDADD=$(top_builddir)/src/libmediastreamer_base.la \
if BUILD_MACOSX
noinst_LTLIBRARIES=libmediastreamer2_tester_cocoa.la
libmediastreamer2_tester_cocoa_la_LIBTOOLFLAGS = --tag=CC
libmediastreamer2_tester_cocoa_la_SOURCES = mediastream_tester_cocoa.m
LDADD+=libmediastreamer2_tester_cocoa.la
endif BUILD_MACOSX
......
......@@ -62,6 +62,7 @@ if BUILD_MACOSX
noinst_LTLIBRARIES=libmediastream_cocoa.la
libmediastream_cocoa_la_LIBTOOLFLAGS = --tag=CC
libmediastream_cocoa_la_SOURCES = mediastream_cocoa.m
mediastream_LDADD+=libmediastream_cocoa.la
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment