From 1f6192b49ab890b798a78452b484db70582d253f Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Tue, 16 Aug 2011 05:44:46 +0000 Subject: Re #1324: Add checking of iOS SDK frameworks in the configure script git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3701 74dad513-b988-da41-8d7b-12977e46ad98 --- aconfigure.ac | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'aconfigure.ac') diff --git a/aconfigure.ac b/aconfigure.ac index 4159f205..d055e826 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -599,10 +599,19 @@ else case $target in arm-apple-darwin*) ac_pjmedia_video=iphone_os + AC_SUBST(ac_pjmedia_video_has_ios) AC_SUBST(ac_ios_cflags) - ac_ios_cflags="-DPJMEDIA_VIDEO_DEV_HAS_IOS=1" - LIBS="$LIBS -framework AVFoundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia" - AC_MSG_RESULT([Checking video device backend... AVFoundation]) + SAVED_LIBS="$LIBS" + LIBS="-framework AVFoundation -framework UIKit -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]) + LIBS="$SAVED_LIBS" + if test "$ac_pjmedia_video_has_ios" = "yes"; then + ac_ios_cflags="-DPJMEDIA_VIDEO_DEV_HAS_IOS=1" + LIBS="$LIBS -framework AVFoundation -framework UIKit -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 -- cgit v1.2.3