From d0644169cbb76202d28ba42c6a357d03cb5ad7c8 Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Thu, 16 Jun 2016 10:38:34 +0000 Subject: Re #1931: Add support for AVFoundation on Mac - Deprecate QTKit - Rename ios_dev.m to darwin_dev.m - Important: Re-run configure and make dep after applying this change! git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5347 74dad513-b988-da41-8d7b-12977e46ad98 --- aconfigure | 79 +++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 24 deletions(-) (limited to 'aconfigure') diff --git a/aconfigure b/aconfigure index d7db69f9..7125d622 100755 --- a/aconfigure +++ b/aconfigure @@ -669,8 +669,9 @@ ac_no_large_filter ac_no_small_filter ac_qt_cflags ac_pjmedia_video_has_qt -ac_ios_cflags -ac_pjmedia_video_has_ios +ac_darwin_cflags +ac_pjmedia_video_has_ios_opengl +ac_pjmedia_video_has_darwin ac_android_cflags ac_pjmedia_video_has_android ac_pjmedia_video @@ -6278,8 +6279,9 @@ $as_echo "Checking if OpenGL ES 2 is available... no" >&6; } fi ac_android_cflags="$ac_android_cflags -DPJMEDIA_VIDEO_DEV_HAS_ANDROID=1" ;; - *-apple-darwin_ios*) - ac_pjmedia_video=iphone_os + *darwin*) + ac_pjmedia_video=darwin_os + SAVED_LIBS="$LIBS" @@ -6296,30 +6298,58 @@ main () } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_pjmedia_video_has_ios=yes + ac_pjmedia_video_has_darwin=yes else - ac_pjmedia_video_has_ios=no + ac_pjmedia_video_has_darwin=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="-framework OpenGLES" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_pjmedia_video_has_ios_opengl=yes +else + ac_pjmedia_video_has_ios_opengl=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$SAVED_LIBS" - if test "$ac_pjmedia_video_has_ios" = "yes"; then - ac_ios_cflags="-DPJMEDIA_VIDEO_DEV_HAS_IOS=1 -DPJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL=1" - LIBS="$LIBS -framework OpenGLES -framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" + if test "$ac_pjmedia_video_has_darwin" = "yes"; then + ac_darwin_cflags="-DPJMEDIA_VIDEO_DEV_HAS_DARWIN=1" + LIBS="$LIBS -framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if AVFoundation framework is available... yes" >&5 $as_echo "Checking if AVFoundation framework is available... yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if AVFoundation framework is available... no" >&5 $as_echo "Checking if AVFoundation framework is available... no" >&6; } fi - ;; - *darwin*) - ac_pjmedia_video=mac_os + if test "$ac_pjmedia_video_has_ios_opengl" = "yes"; then + ac_darwin_cflags="-DPJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL=1" + LIBS="$LIBS -framework OpenGLES" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGLES framework is available... yes" >&5 +$as_echo "Checking if OpenGLES framework is available... yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if OpenGLES framework is available... no" >&5 +$as_echo "Checking if OpenGLES framework is available... no" >&6; } + fi + if false; then + # QTKit is deprecated, see ticket #1931. + ac_pjmedia_video=mac_os - SAVED_LIBS="$LIBS" - LIBS="-framework QTKit" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + SAVED_LIBS="$LIBS" + LIBS="-framework QTKit" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6337,17 +6367,18 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LIBS="$SAVED_LIBS" - if test "$ac_pjmedia_video_has_qt" = "yes"; then - ac_qt_cflags="-DPJMEDIA_VIDEO_DEV_HAS_QT=1" - LIBS="$LIBS -framework QTKit -framework QuartzCore -framework OpenGL" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... yes" >&5 + LIBS="$SAVED_LIBS" + if test "$ac_pjmedia_video_has_qt" = "yes"; then + ac_qt_cflags="-DPJMEDIA_VIDEO_DEV_HAS_QT=1" + LIBS="$LIBS -framework QTKit -framework QuartzCore -framework OpenGL" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... yes" >&5 $as_echo "Checking if QTKit framework is available... yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... no" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if QTKit framework is available... no" >&5 $as_echo "Checking if QTKit framework is available... no" >&6; } - fi - ;; + fi + fi + ;; esac fi -- cgit v1.2.3