Index: /pjproject/trunk/aconfigure
===================================================================
--- /pjproject/trunk/aconfigure	(revision 3700)
+++ /pjproject/trunk/aconfigure	(revision 3701)
@@ -697,4 +697,5 @@
 ac_pa_use_oss
 ac_pjmedia_video
+ac_pjmedia_video_has_ios
 ac_ios_cflags
 ac_pjmedia_video_has_qt
@@ -11682,8 +11683,60 @@
 	ac_pjmedia_video=iphone_os
 
-	ac_ios_cflags="-DPJMEDIA_VIDEO_DEV_HAS_IOS=1"
-	LIBS="$LIBS -framework AVFoundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia"
-	{ echo "$as_me:$LINENO: result: Checking video device backend... AVFoundation" >&5
-echo "${ECHO_T}Checking video device backend... AVFoundation" >&6; }
+
+	SAVED_LIBS="$LIBS"
+	LIBS="-framework AVFoundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia"
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_pjmedia_video_has_ios=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_pjmedia_video_has_ios=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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"
+	  LIBS="$LIBS -framework AVFoundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework CoreVideo -framework CoreMedia"
+	  { echo "$as_me:$LINENO: result: Checking if AVFoundation framework is available... yes" >&5
+echo "${ECHO_T}Checking if AVFoundation framework is available... yes" >&6; }
+	else
+	  { echo "$as_me:$LINENO: result: Checking if AVFoundation framework is available... no" >&5
+echo "${ECHO_T}Checking if AVFoundation framework is available... no" >&6; }
+	fi
 	;;
   *darwin*)
@@ -14087,4 +14140,5 @@
 ac_pa_use_oss!$ac_pa_use_oss$ac_delim
 ac_pjmedia_video!$ac_pjmedia_video$ac_delim
+ac_pjmedia_video_has_ios!$ac_pjmedia_video_has_ios$ac_delim
 ac_ios_cflags!$ac_ios_cflags$ac_delim
 ac_pjmedia_video_has_qt!$ac_pjmedia_video_has_qt$ac_delim
@@ -14099,5 +14153,4 @@
 ac_no_g7221_codec!$ac_no_g7221_codec$ac_delim
 ac_no_speex_codec!$ac_no_speex_codec$ac_delim
-ac_no_ilbc_codec!$ac_no_ilbc_codec$ac_delim
 _ACEOF
 
@@ -14141,4 +14194,5 @@
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+ac_no_ilbc_codec!$ac_no_ilbc_codec$ac_delim
 ac_sdl_cflags!$ac_sdl_cflags$ac_delim
 ac_sdl_ldflags!$ac_sdl_ldflags$ac_delim
@@ -14160,5 +14214,5 @@
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 17; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 18; then
     break
   elif $ac_last_try; then
Index: /pjproject/trunk/aconfigure.ac
===================================================================
--- /pjproject/trunk/aconfigure.ac	(revision 3700)
+++ /pjproject/trunk/aconfigure.ac	(revision 3701)
@@ -600,8 +600,17 @@
   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*)
