United States President Barack Obama is in Senegal at the start of a visit to Africa for a week.
It is Mr Obama's second trip to Africa since he became president in 2008. He will also visit Tanzania and South Africa.
After meeting President Macky Sall at the Presidential Palace in Dakar on Thursday, Mr Obama called on African governments to give gay people equal rights by decriminalising homosexual acts.
Mr Sall said Senegal was a "very tolerant" country but it was "not ready to decriminalise homosexuality".
Homosexual acts are still a crime in 38 African countries, where most people hold conservative religious views.
At a news conference, Mr Obama said the issue did not come up in his discussions with Mr Sall.
Nevertheless, he believed that while different customs and religions should be respected, the law should treat everybody equally, he said.
Mr Sall said Senegal was still not ready to change its laws, but that "does not mean we are homophobic''.
Mr Obama's previous African trip during his first term was a one-day stopover in Ghana.
He is to travel by ferry with his wife Michelle and children to the House of Slaves on Goree Island, which was a transit point for slaves before they were shipped across the Atlantic. It is now a museum.
Mr Obama is due to end his African tour with a visit to Tanzania, where he will pay his respects at a memorial outside the US embassy in Dar es Salaam, in honour of 11 people killed in a bombing by al-Qaeda in 1998.