Bug 471854 - Build error in accessible/public/msaa on x64 Windows with VC8; (Bv1) Sync comm-central after (m-c) bug 471451 and bug 471854; r=kairo
authorSerge Gautherie <sgautherie.bz@free.fr>
Thu, 22 Jan 2009 19:42:43 +0100
changeset 1721 1a9b710f8ea632ad0220bcfd0fa5c1c60df2548b
parent 1720 3f42754a51184416f5944ec07576e8a265105b68
child 1722 31bb673606da594f50bdec4175e3e765366cde33
push idunknown
push userunknown
push dateunknown
reviewerskairo
bugs471854, 471451
Bug 471854 - Build error in accessible/public/msaa on x64 Windows with VC8; (Bv1) Sync comm-central after (m-c) bug 471451 and bug 471854; r=kairo
configure.in
--- a/configure.in
+++ b/configure.in
@@ -556,34 +556,36 @@ case "$target" in
         fi
         INCREMENTAL_LINKER=1
 
         # Check midl version
         _MIDL_FULL_VERSION=`"${MIDL}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
         _MIDL_MAJOR_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
         _MIDL_MINOR_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $2 }'`
         _MIDL_REV_VERSION=`echo ${_MIDL_FULL_VERSION} | $AWK -F\. '{ print $3 }'`
-         # Add flags if necessary
-         AC_MSG_CHECKING([for midl flags])
-         if test \( "$_MIDL_MAJOR_VERSION" -gt "6" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" -gt "0" \) -o \( "$_MIDL_MAJOR_VERSION" = "6" -a "$_MIDL_MINOR_VERSION" = "00" -a "$_MIDL_REV_VERSION" -gt "359" \); then
-             # Starting with MIDL version 6.0.359, the MIDL compiler
-             # generates /Oicf /robust stubs by default, which is not
-             # compatible with versions of Windows older than Win2k.
-             # This switches us back to the old behaviour. When we drop
-             # support for Windows older than Win2k, we should remove
-             # this.
-             MIDL_FLAGS="${MIDL_FLAGS} -no_robust"
-             AC_MSG_RESULT([need -no_robust])
-         else
-             MIDL_FLAGS="${MIDL_FLAGS}"
-             AC_MSG_RESULT([none needed])
-        fi
-        
+        # Add flags if necessary
+        AC_MSG_CHECKING([for midl flags])
+        case "$target" in
+        i*86-*)
+            if test \( "$_MIDL_MAJOR_VERSION" = "7" -a "$_MIDL_MINOR_VERSION" = "00" -a "$_MIDL_REV_VERSION" = "0499" \); then
+                # MIDL version 7.00.0499 defaults /env win64 on x64 platforms.
+                # MIDL version 7.00.0500 or later has no problem.
+                MIDL_FLAGS="${MIDL_FLAGS} -env win32"
+                AC_MSG_RESULT([need -env win32])
+            else
+                AC_MSG_RESULT([none needed])
+            fi
+            ;;
+        *)
+            AC_MSG_RESULT([none needed])
+            ;;
+        esac
+
         unset _MSVC_VER_FILTER
-        
+
     else
         # Check w32api version
         _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'`
         _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'`
         AC_MSG_CHECKING([for w32api version >= $W32API_VERSION])
         AC_TRY_COMPILE([#include <w32api.h>],
             #if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \
                 (__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \