We prove that the quasiclassical tau-function of the multi-support solutions to matrix models, proposed recently by Dijkgraaf and Vafa to be related to the Cachazo-Intrilligator-Vafa superpotentials of the N = 1 supersymmetric Yang-Mills theories, satisfies the Witten-Dijkgraaf-Verlinde-Verlinde equations. (C) 2003 Published by Elsevier Science B.V.