Bug 919069 - Set -env win32 for x86 targets regardless of MIDL version. r=ted

This commit is contained in:
David Major 2013-09-26 10:11:37 -04:00
parent 07eb20909d
commit b7d543e4d2

View File

@ -490,30 +490,14 @@ case "$target" in
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])
# Set midl environment
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
MIDL_FLAGS="${MIDL_FLAGS} -env win32"
;;
x86_64-*)
MIDL_FLAGS="${MIDL_FLAGS} -env x64"
;;
*)
AC_MSG_RESULT([none needed])
;;
esac
unset _MSVC_VER_FILTER