Sexual differentiation depends sex hormones affecting the sex chromosomes (XX or XY). This begins to influence our sexuality well before birth. The middle third of pregnancy is critical for sex differentiation in the human brain. (Wilson, Glenn.The Great Sex Divide. p 26-28. England: Peter Owen Publishers, 1989.

The action of sex hormones is responsible for sexual differentiation and gender-specific behaviors. If the testes of a genetically male don’t produce androgens or if the hormones cannot act on the developing tissues, the fetus will develop as a female. (Springer, Sally p., and Georg Deutsch. Left Brain, Right Brain. p 149-150. NY:W.H. Freeman and Co., 1997.)