Check deployment target for usage of AVKit

The AVKit framework should only be linked for OS X 10.9+
This commit is contained in:
Tobias Taschner
2016-10-21 11:13:04 +02:00
parent 4dad61831a
commit 7bf25ee2de
3 changed files with 41 additions and 13 deletions

30
configure vendored
View File

@@ -37523,22 +37523,40 @@ else
$as_echo "#define wxOSX_USE_QTKIT 0" >>confdefs.h
wxOSX_USE_QTKIT=no
GST_LIBS="-framework AVFoundation -framework CoreMedia"
fi
fi
ac_fn_c_check_header_mongrel "$LINENO" "AVKit/AVKit.h" "ac_cv_header_AVKit_AVKit_h" "$ac_includes_default"
if test "x$ac_cv_header_AVKit_AVKit_h" = xyes; then :
if test "$wxOSX_USE_QTKIT" = "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if AVKit is availble" >&5
$as_echo_n "checking if AVKit is availble... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "AvailabilityMacros.h"
int
main ()
{
GST_LIBS="$GST_LIBS -framework AVKit"
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
// AVKit available
#else
choke me
#endif
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
GST_LIBS="$GST_LIBS -framework AVKit"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
CPPFLAGS="$old_CPPFLAGS"
fi
fi

View File

@@ -7615,16 +7615,26 @@ if test "$wxUSE_MEDIACTRL" = "yes" -o "$wxUSE_MEDIACTRL" = "auto"; then
],
[
AC_DEFINE(wxOSX_USE_QTKIT,0)
wxOSX_USE_QTKIT=no
GST_LIBS="-framework AVFoundation -framework CoreMedia"
])
fi
dnl AVKit is only available since OS X 10.9
AC_CHECK_HEADER([AVKit/AVKit.h],
[
GST_LIBS="$GST_LIBS -framework AVKit"
])
if test "$wxOSX_USE_QTKIT" = "no"; then
dnl AVKit is only available since OS X 10.9
AC_MSG_CHECKING([if AVKit is availble])
AC_TRY_COMPILE(
[#include "AvailabilityMacros.h"],
[
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
// AVKit available
#else
choke me
#endif
],
GST_LIBS="$GST_LIBS -framework AVKit"
)
fi
CPPFLAGS="$old_CPPFLAGS"
fi
fi

View File

@@ -52,7 +52,7 @@
#endif
#endif
#if wxOSX_USE_AVFOUNDATION && wxOSX_USE_COCOA && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
#if wxOSX_USE_AVFOUNDATION && wxOSX_USE_COCOA && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
#define wxOSX_USE_AVKIT 1
#else
#define wxOSX_USE_AVKIT 0