Created attachment 567226 [details] [diff] [review]
I had the June 2010 DirectX SDK installed, and I was building Mozilla just fine.
Then I installed the February 2010 DirectX SDK in order to be able to build WebKit (they don't support June 2010 yet). This appears to have overwritten $DXSDK_DIR to point to the February 2010 SDK.
We set up the include path when building libEGL and libGLESv2 to include both -I"$(DXSDK_DIR)/include" and -I"$(MOZ_DIRECTX_SDK_PATH)/include". If the two agree, everything's fine, it's just a redundant include path. But if the two conflict, things break pretty horribly when include files from two different SDKs get used at once.
Per bug 676315 comment 2, "checking DXSDK_DIR here is useless and could even cause trouble in case of multiple DXSDKs installed". Based on my experience, this does cause trouble, perhaps if you install the SDKs in reverse order. And based on that comment, and on a smidgen of intuition, and on testing this patch, removing the DXSDK_DIR lines should fix things. So let's do that so nobody else has to hit this and so I can remove |unset DXSDK_DIR| from my ~/.bash_profile. :-)
Note that we already have code in configure.in to explicitly prefer the June 2010 version if it's present. So with your patch, we should really never fail to build, as long as the June 2010 version is present.
Also note that Chrome uses the June 2010 version. So it's a bit strange that WebKit would want the February 2010 version. Maybe that only concerns Safari on Windows.