  We construct local geometric model in terms of F- and M-theory
compactification on Calabi-Yau fourfolds which lead to N=1 Yang-Mills theory in
d=4 and its reduction on a circle to d=3. We compute the superpotential in d=3,
as a function of radius, which is generated by the Euclidean 5-brane
instantons. The superpotential turns out to be the same as the potential for
affine Toda theories. In the limit of vanishing radius the affine Toda
potential reduces to the Toda potential.
