diff options
author | Liong Sauw Ming <ming@teluu.com> | 2016-06-16 10:38:34 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2016-06-16 10:38:34 +0000 |
commit | d0644169cbb76202d28ba42c6a357d03cb5ad7c8 (patch) | |
tree | b5c4612cb53587044c8020c09e0ba320d8b23572 /aconfigure.ac | |
parent | 3fd9e3846649c9cd033f1a791fe7c5f9aab33944 (diff) |
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
Diffstat (limited to 'aconfigure.ac')
-rw-r--r-- | aconfigure.ac | 61 |
1 files changed, 38 insertions, 23 deletions
diff --git a/aconfigure.ac b/aconfigure.ac index 846a7825..306ee873 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -733,38 +733,53 @@ else fi ac_android_cflags="$ac_android_cflags -DPJMEDIA_VIDEO_DEV_HAS_ANDROID=1" ;; - *-apple-darwin_ios*) - ac_pjmedia_video=iphone_os - AC_SUBST(ac_pjmedia_video_has_ios) - AC_SUBST(ac_ios_cflags) + *darwin*) + ac_pjmedia_video=darwin_os + AC_SUBST(ac_pjmedia_video_has_darwin) + AC_SUBST(ac_pjmedia_video_has_ios_opengl) + AC_SUBST(ac_darwin_cflags) SAVED_LIBS="$LIBS" LIBS="-framework AVFoundation -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[ac_pjmedia_video_has_ios=yes],[ac_pjmedia_video_has_ios=no]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])], + [ac_pjmedia_video_has_darwin=yes], + [ac_pjmedia_video_has_darwin=no]) + LIBS="-framework OpenGLES" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])], + [ac_pjmedia_video_has_ios_opengl=yes], + [ac_pjmedia_video_has_ios_opengl=no]) 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" AC_MSG_RESULT([Checking if AVFoundation framework is available... yes]) else AC_MSG_RESULT([Checking if AVFoundation framework is available... no]) fi - ;; - *darwin*) - ac_pjmedia_video=mac_os - AC_SUBST(ac_pjmedia_video_has_qt) - AC_SUBST(ac_qt_cflags) - SAVED_LIBS="$LIBS" - LIBS="-framework QTKit" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[ac_pjmedia_video_has_qt=yes],[ac_pjmedia_video_has_qt=no]) - 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" - AC_MSG_RESULT([Checking if QTKit framework is available... yes]) + if test "$ac_pjmedia_video_has_ios_opengl" = "yes"; then + ac_darwin_cflags="-DPJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL=1" + LIBS="$LIBS -framework OpenGLES" + AC_MSG_RESULT([Checking if OpenGLES framework is available... yes]) else - AC_MSG_RESULT([Checking if QTKit framework is available... no]) + AC_MSG_RESULT([Checking if OpenGLES framework is available... no]) fi - ;; + if false; then + # QTKit is deprecated, see ticket #1931. + ac_pjmedia_video=mac_os + AC_SUBST(ac_pjmedia_video_has_qt) + AC_SUBST(ac_qt_cflags) + SAVED_LIBS="$LIBS" + LIBS="-framework QTKit" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[ac_pjmedia_video_has_qt=yes],[ac_pjmedia_video_has_qt=no]) + 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" + AC_MSG_RESULT([Checking if QTKit framework is available... yes]) + else + AC_MSG_RESULT([Checking if QTKit framework is available... no]) + fi + fi + ;; esac fi |