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

Charles Davis cdavis5x at gmail.com
Mon Jan 26 17:28:10 CST 2015


The QuickTime framework can't be linked on 64-bit--it only has a 32-bit
slice. But the headers are still (for now) present, because 32-bit
programs can still use QuickTime. So, check that QuickTime.framework can
be linked before trying to use it.
---
 configure.ac | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 957e67c..0e283b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -813,9 +813,21 @@ uninstall::
     fi
     if test "$ac_cv_header_QuickTime_ImageCompression_h" = "yes"
     then
-        AC_SUBST(QUICKTIME_LIBS,"-framework QuickTime -framework ApplicationServices -framework CoreVideo")
-        enable_wineqtdecoder=${enable_wineqtdecoder:-yes}
-    else
+        dnl Make sure we can actually use the QuickTime framework
+        QUICKTIME_LIBS="-framework QuickTime -framework ApplicationServices -framework CoreVideo"
+        ac_save_LIBS="$LIBS"
+        LIBS="$LIBS $QUICKTIME_LIBS"
+        AC_MSG_CHECKING([if the QuickTime framework can be used])
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <QuickTime/ImageCompression.h>]],[[CodecManagerVersion(NULL);]])],
+                       [AC_MSG_RESULT([yes])
+                        AC_SUBST(QUICKTIME_LIBS)
+                        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.])
     fi
     if test "$ac_cv_header_Carbon_Carbon_h" = "yes"
-- 
2.2.2




More information about the wine-patches mailing list