From eef680c35082a768c98d841299d16c49c03f0369 Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Tue, 4 Mar 2014 16:00:41 +0100 Subject: [PATCH] Remove dependency on objc compiler, and let the final application in iOS use the liblinphonetester.a library to implement unit tests --- configure.ac | 1 - tester/Makefile.am | 9 +------ tester/liblinphonetester_ios.h | 24 ------------------ tester/liblinphonetester_ios.m | 46 ---------------------------------- 4 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 tester/liblinphonetester_ios.h delete mode 100644 tester/liblinphonetester_ios.m diff --git a/configure.ac b/configure.ac index 20148b3f6..9bbf1b359 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,6 @@ AC_CONFIG_MACRO_DIR([m4]) dnl don't put anythingelse before AC_PROG_CC unless checking if macro still work for clang AC_PROG_CXX(["xcrun clang++" g++]) AC_PROG_CC(["xcrun clang" gcc]) -AC_PROG_OBJC(["xcrun clang" gcc]) gl_LD_OUTPUT_DEF diff --git a/tester/Makefile.am b/tester/Makefile.am index 95beaf139..fde5246c8 100644 --- a/tester/Makefile.am +++ b/tester/Makefile.am @@ -26,14 +26,7 @@ liblinphonetester_la_SOURCES = tester.c \ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/coreapi AM_CFLAGS = $(STRICT_OPTIONS) -DIN_LINPHONE $(ORTP_CFLAGS) $(MEDIASTREAMER_CFLAGS) $(CUNIT_CFLAGS) $(BELLESIP_CFLAGS) $(LIBXML2_CFLAGS) -if BUILD_IOS - -#we build the liblinphonetester as a library, not as an executable, so that it is usable in XCode -liblinphonetester_la_OBJCFLAGS = $(AM_CFLAGS) -liblinphonetester_la_SOURCES += liblinphonetester_ios.m liblinphonetester_ios.h -liblinphonetester_la_LDFLAGS = -framework CoreFoundation -framework AudioToolbox -framework CoreAudio -framework Foundation -framework QuartzCore -framework OpenGLES -framework UIKit -framework AVFoundation $(CUNIT_LIBS) - -else +if !BUILD_IOS noinst_PROGRAMS = liblinphone_tester diff --git a/tester/liblinphonetester_ios.h b/tester/liblinphonetester_ios.h deleted file mode 100644 index a3b6177c3..000000000 --- a/tester/liblinphonetester_ios.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - liblinphone_tester - liblinphone test suite - Copyright (C) 2013 Belledonne Communications SARL - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - */ - - -#include "ortp/ortp.h" - -int apple_start_tests(int argc, char* argv[]); - -void liblinphone_tester_ios_log_handler(OrtpLogLevel level, const char* fmt, va_list args); \ No newline at end of file diff --git a/tester/liblinphonetester_ios.m b/tester/liblinphonetester_ios.m deleted file mode 100644 index 8b853da51..000000000 --- a/tester/liblinphonetester_ios.m +++ /dev/null @@ -1,46 +0,0 @@ -/* - liblinphone_tester - liblinphone test suite - Copyright (C) 2013 Belledonne Communications SARL - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - */ - -#include "liblinphonetester_ios.h" - -#include -#import -#import - -extern int ios_tester_main(int argc, char * argv[]); - -int g_argc; -char** g_argv; - -static void* apple_main(void* data) { - ios_tester_main(g_argc,g_argv); - return NULL; -} - -int apple_start_tests(int argc, char* argv[]) -{ - pthread_t main_thread; - g_argc=argc; - g_argv=argv; - return (int)pthread_create(&main_thread,NULL,apple_main,NULL); -} - -void liblinphone_tester_ios_log_handler(OrtpLogLevel level, const char* fmt, va_list args) -{ - NSLogv([NSString stringWithUTF8String:fmt], args); -}