Should just work the way you use it, except that glMultiTexCoord0 needs to be gl_MultiTexCoord0.
If you haven’t changed the matrix with
something like
glActiveTexture(GL_TEXTURE0);
glLoadMatrixf(myTextureMatrix);
there should be the identity matrix in it
Does the shader work if you replace this with glLoadIdentity()?
Does it work if you just don’t multiple with the matrix at all.
After assuming this part as being right, and much head scratching on the rest, I finally found what was wrong: I was using the texture matrix for reflection purposes, thus with a projective part.
Apparently the drivers automatically take that into account when the texture matrix is used directly, but when using a vertex shader (or doing the transformation “manually” CPU-side) you have to perform the division by the projective component explicitly (or use texture2DProj in the fragment shader).