On gluino condensation in supersymmetric gauge theories with SU(N) and O(N) groups