configure: Check that we can link to QuickTime.framework before using it.

This commit is contained in:
Charles Davis 2015-01-26 16:28:10 -07:00 committed by Alexandre Julliard
parent e62612b2c3
commit b218e81de3
2 changed files with 45 additions and 6 deletions

34
configure vendored
View File

@ -7949,10 +7949,38 @@ done
fi fi
if test "$ac_cv_header_QuickTime_ImageCompression_h" = "yes" if test "$ac_cv_header_QuickTime_ImageCompression_h" = "yes"
then then
QUICKTIME_LIBS="-framework QuickTime -framework ApplicationServices -framework CoreVideo" ac_save_LIBS="$LIBS"
LIBS="-framework QuickTime -framework ApplicationServices -framework CoreVideo $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the QuickTime framework" >&5
$as_echo_n "checking for the QuickTime framework... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <QuickTime/ImageCompression.h>
int
main ()
{
CodecManagerVersion(NULL);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
QUICKTIME_LIBS="-framework QuickTime -framework ApplicationServices -framework CoreVideo"
enable_wineqtdecoder=${enable_wineqtdecoder:-yes} enable_wineqtdecoder=${enable_wineqtdecoder:-yes}
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
ac_cv_header_QuickTime_ImageCompression_h=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$ac_save_LIBS"
fi
if test "$ac_cv_header_QuickTime_ImageCompression_h" != "yes"
then
as_fn_append wine_notices "|QuickTime ${notice_platform}development files not found, video decoding won't be supported." as_fn_append wine_notices "|QuickTime ${notice_platform}development files not found, video decoding won't be supported."
fi fi
if test "$ac_cv_header_Carbon_Carbon_h" = "yes" if test "$ac_cv_header_Carbon_Carbon_h" = "yes"

View File

@ -813,9 +813,20 @@ uninstall::
fi fi
if test "$ac_cv_header_QuickTime_ImageCompression_h" = "yes" if test "$ac_cv_header_QuickTime_ImageCompression_h" = "yes"
then then
AC_SUBST(QUICKTIME_LIBS,"-framework QuickTime -framework ApplicationServices -framework CoreVideo") dnl Make sure we can actually use the QuickTime framework
enable_wineqtdecoder=${enable_wineqtdecoder:-yes} ac_save_LIBS="$LIBS"
else LIBS="-framework QuickTime -framework ApplicationServices -framework CoreVideo $LIBS"
AC_MSG_CHECKING([for the QuickTime framework])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <QuickTime/ImageCompression.h>]],[[CodecManagerVersion(NULL);]])],
[AC_MSG_RESULT([yes])
AC_SUBST(QUICKTIME_LIBS,"-framework QuickTime -framework ApplicationServices -framework CoreVideo")
enable_wineqtdecoder=${enable_wineqtdecoder:-yes}],
[AC_MSG_RESULT([no])
ac_cv_header_QuickTime_ImageCompression_h=no])
LIBS="$ac_save_LIBS"
fi
if test "$ac_cv_header_QuickTime_ImageCompression_h" != "yes"
then
WINE_NOTICE([QuickTime ${notice_platform}development files not found, video decoding won't be supported.]) WINE_NOTICE([QuickTime ${notice_platform}development files not found, video decoding won't be supported.])
fi fi
if test "$ac_cv_header_Carbon_Carbon_h" = "yes" if test "$ac_cv_header_Carbon_Carbon_h" = "yes"