Fix building wxMediaCtrl with OS X 10.12 SDK
Since OS X Sierra 10.12 QTKit has been removed. wxMediaCtrl for OS X already had a fallback to AVFoundation implemented. This makes sure this will be used and the correct media Frameworks are used for linking.
(cherry picked from commit 281610142b
)
This commit is contained in:
121
configure
vendored
121
configure
vendored
@@ -3339,6 +3339,97 @@ fi
|
|||||||
as_fn_set_status $ac_retval
|
as_fn_set_status $ac_retval
|
||||||
|
|
||||||
} # ac_fn_cxx_try_run
|
} # ac_fn_cxx_try_run
|
||||||
|
|
||||||
|
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
|
||||||
|
# -------------------------------------------------------
|
||||||
|
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
|
||||||
|
# the include files in INCLUDES and setting the cache variable VAR
|
||||||
|
# accordingly.
|
||||||
|
ac_fn_c_check_header_mongrel ()
|
||||||
|
{
|
||||||
|
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||||
|
if eval \${$3+:} false; then :
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||||
|
$as_echo_n "checking for $2... " >&6; }
|
||||||
|
if eval \${$3+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
fi
|
||||||
|
eval ac_res=\$$3
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||||
|
$as_echo "$ac_res" >&6; }
|
||||||
|
else
|
||||||
|
# Is the header compilable?
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
|
||||||
|
$as_echo_n "checking $2 usability... " >&6; }
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
$4
|
||||||
|
#include <$2>
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
ac_header_compiler=yes
|
||||||
|
else
|
||||||
|
ac_header_compiler=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
|
||||||
|
$as_echo "$ac_header_compiler" >&6; }
|
||||||
|
|
||||||
|
# Is the header present?
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
|
||||||
|
$as_echo_n "checking $2 presence... " >&6; }
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <$2>
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||||
|
ac_header_preproc=yes
|
||||||
|
else
|
||||||
|
ac_header_preproc=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
|
||||||
|
$as_echo "$ac_header_preproc" >&6; }
|
||||||
|
|
||||||
|
# So? What about this header?
|
||||||
|
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
|
||||||
|
yes:no: )
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||||
|
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||||
|
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||||
|
;;
|
||||||
|
no:yes:* )
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
|
||||||
|
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
|
||||||
|
$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
|
||||||
|
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
|
||||||
|
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||||
|
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||||
|
( $as_echo "## ----------------------------------------- ##
|
||||||
|
## Report this to wx-dev@lists.wxwidgets.org ##
|
||||||
|
## ----------------------------------------- ##"
|
||||||
|
) | sed "s/^/$as_me: WARNING: /" >&2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||||
|
$as_echo_n "checking for $2... " >&6; }
|
||||||
|
if eval \${$3+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
eval "$3=\$ac_header_compiler"
|
||||||
|
fi
|
||||||
|
eval ac_res=\$$3
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||||
|
$as_echo "$ac_res" >&6; }
|
||||||
|
fi
|
||||||
|
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||||
|
|
||||||
|
} # ac_fn_c_check_header_mongrel
|
||||||
cat >config.log <<_ACEOF
|
cat >config.log <<_ACEOF
|
||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
@@ -37365,7 +37456,37 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
elif test "$wxUSE_MAC" = 1; then
|
elif test "$wxUSE_MAC" = 1; then
|
||||||
|
if test "$wxUSE_OSX_IPHONE" = 1; then
|
||||||
|
GST_LIBS="-framework AVFoundation -framework CoreMedia"
|
||||||
|
else
|
||||||
|
|
||||||
|
old_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="-x objective-c++ $CPPFLAGS"
|
||||||
|
ac_fn_c_check_header_mongrel "$LINENO" "QTKit/QTKit.h" "ac_cv_header_QTKit_QTKit_h" "$ac_includes_default"
|
||||||
|
if test "x$ac_cv_header_QTKit_QTKit_h" = xyes; then :
|
||||||
|
|
||||||
GST_LIBS="-framework QTKit"
|
GST_LIBS="-framework QTKit"
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
$as_echo "#define wxOSX_USE_QTKIT 0" >>confdefs.h
|
||||||
|
|
||||||
|
GST_LIBS="-framework AVFoundation -framework CoreMedia"
|
||||||
|
|
||||||
|
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 :
|
||||||
|
|
||||||
|
GST_LIBS="$GST_LIBS -framework AVKit"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
CPPFLAGS="$old_CPPFLAGS"
|
||||||
|
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $USE_MEDIA = 1; then
|
if test $USE_MEDIA = 1; then
|
||||||
|
23
configure.in
23
configure.in
@@ -7591,9 +7591,32 @@ if test "$wxUSE_MEDIACTRL" = "yes" -o "$wxUSE_MEDIACTRL" = "auto"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
elif test "$wxUSE_MAC" = 1; then
|
elif test "$wxUSE_MAC" = 1; then
|
||||||
|
if test "$wxUSE_OSX_IPHONE" = 1; then
|
||||||
|
dnl this will also be used for cocoa in the future
|
||||||
|
GST_LIBS="-framework AVFoundation -framework CoreMedia"
|
||||||
|
else
|
||||||
dnl We always have the necessary libraries under Mac
|
dnl We always have the necessary libraries under Mac
|
||||||
dnl but we need to link with it explicitly.
|
dnl but we need to link with it explicitly.
|
||||||
|
dnl QTKit is no longer available as of 10.12 SDK
|
||||||
|
|
||||||
|
old_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="-x objective-c++ $CPPFLAGS"
|
||||||
|
AC_CHECK_HEADER([QTKit/QTKit.h],
|
||||||
|
[
|
||||||
GST_LIBS="-framework QTKit"
|
GST_LIBS="-framework QTKit"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_DEFINE(wxOSX_USE_QTKIT,0)
|
||||||
|
GST_LIBS="-framework AVFoundation -framework CoreMedia"
|
||||||
|
])
|
||||||
|
dnl AVKit is only available since OS X 10.9
|
||||||
|
AC_CHECK_HEADER([AVKit/AVKit.h],
|
||||||
|
[
|
||||||
|
GST_LIBS="$GST_LIBS -framework AVKit"
|
||||||
|
])
|
||||||
|
CPPFLAGS="$old_CPPFLAGS"
|
||||||
|
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $USE_MEDIA = 1; then
|
if test $USE_MEDIA = 1; then
|
||||||
|
@@ -871,6 +871,11 @@
|
|||||||
*/
|
*/
|
||||||
#define wxUSE_WEBKIT 0
|
#define wxUSE_WEBKIT 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
* wxMediaCtrl on OS X
|
||||||
|
*/
|
||||||
|
#undef wxOSX_USE_QTKIT
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Objective-C class name uniquifying
|
* Objective-C class name uniquifying
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user