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

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jan 27 16:23:59 CST 2015


Module: wine
Branch: master
Commit: b218e81de352e3cf457b08ad358ea42028358c44
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b218e81de352e3cf457b08ad358ea42028358c44

Author: Charles Davis <cdavis5x at gmail.com>
Date:   Mon Jan 26 16:28:10 2015 -0700

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

---

 configure    | 34 +++++++++++++++++++++++++++++++---
 configure.ac | 17 ++++++++++++++---
 2 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 7413f28..0431209 100755
--- a/configure
+++ b/configure
@@ -7949,10 +7949,38 @@ done
     fi
     if test "$ac_cv_header_QuickTime_ImageCompression_h" = "yes"
     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}
-    else
+                        enable_wineqtdecoder=${enable_wineqtdecoder:-yes}
+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."
     fi
     if test "$ac_cv_header_Carbon_Carbon_h" = "yes"
diff --git a/configure.ac b/configure.ac
index 95c230b..a931730 100644
--- a/configure.ac
+++ b/configure.ac
@@ -813,9 +813,20 @@ 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
+        ac_save_LIBS="$LIBS"
+        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.])
     fi
     if test "$ac_cv_header_Carbon_Carbon_h" = "yes"




More information about the wine-cvs mailing list