The Pali texts are quite misogynistic and clearly state that a female can never become a Buddha due to the fact that she experiences several karmic disadvantages compared to males, especially menstruation, pregnancy, and childbirth, but also including inferior social status (see Peter Harvey, Introduction to Buddhism, p. 285).
Moreover, females are the "door" through which rebirth occurs, and are thus identified with samsara. Since the bodhisattva in his final birth must be the "best of men," free of all ordinary afflictions, though not yet a Buddha, a bodhisattva will never be reborn as a female in his final rebirth. The 32 marks of a great man clearly include exclusively male attributes. There is no denying that this is the orthodox or traditional attitude of those who accept the Pali Canon as their basis.
Whether this was the actual teaching of the Buddha is less clear, since the Buddha stated that females could attain nirvana and clearly ordained nuns. He also implied that the sangha must include nuns to be complete, and explicitly affirmed women's rights as the fifth principle of a good and strong society. One can criticize this view logically on the grounds that men also suffer various gender-related afflictions, such as excessive lust, aggression, violence, etc. More than five hundred female arhants are mentioned in the Pali Canon (ibid). The Chinese Tientai school and Tibetan Buddhism both recognize female Buddhas (op. cit., p. 186).
The Dalai Lama has clearly stated that a female could become a Dalai Lama, but of course the Dalai Lama is a bodhisattva, not a Buddha, and is not experiencing his final birth (otherwise there would be no lineage of Dalai Lamas). Ajahn Brahm has criticized this doctrine publicly, for which offence he was expelled from his lineage in Thailand. Female ordination is still prohibited in Thailand so far as I know. I have presented a talk on this topic entitled "The Status of Women in Ancient India and the Pali Tradition."