summaryrefslogtreecommitdiff
path: root/aconfigure
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2016-06-16 10:38:34 +0000
committerLiong Sauw Ming <ming@teluu.com>2016-06-16 10:38:34 +0000
commitd0644169cbb76202d28ba42c6a357d03cb5ad7c8 (patch)
treeb5c4612cb53587044c8020c09e0ba320d8b23572 /aconfigure
parent3fd9e3846649c9cd033f1a791fe7c5f9aab33944 (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')
-rwxr-xr-xaconfigure79
1 files changed, 55 insertions, 24 deletions
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