Ahead of this week’s trip, several African leaders have warned Obama against making similar comments. A month after the Supreme Court made gay marriage legal throughout the U.S., Nigerian newspapers arewarning that Obama will press the continent to do the same.

There is no indication that the president plans to bring up the issue in meetings with African heads of state. But where survey data is available, it suggests that the African leaders have public opinion firmly behind them — and that if Obama reiterates his remarks, he’ll find little support. A large majority of adults in several Saharan and sub-Saharan countries polled say homosexuality should not be accepted.

In many countries around the world where a majority opposes homosexuality, young adults are far more likely than older ones to support acceptance. But that isn’t the case generally in African nations that have been polled, suggesting that generational replacement won’t change public opinion as it might elsewhere and has already in the U.S.

In 2013, just before Obama’s trip, the Pew Research Center polled nearly 38,000 people in 39 countries and territories, asking them, “Should society accept homosexuality?” Three in five Americans said “yes.” At least 80 percent of Spaniards, Germans, Czechs and Canadians agreed. Pew found very different results in the eight African countries where it polled: In seven of them — including Kenya and two Saharan countries, Egypt and Tunisia — 90 percent or more of respondents answered “no.” (Three of the 31 other places registered “no” support that high: Indonesia, Jordan and the Palestinian territories.)

South Africa was the lone African exception, but 61 percent of respondents there still answered “no.” (It is the only African country that recognizes same-sex marriage.) On average, “no” outpolled “yes” by 84 percentage points in African nations polled, compared to a near-tie (an edge of 2 percentage points) for “yes” to acceptance elsewhere.

COUNTRY

YES, SOCIETY SHOULD ACCEPT HOMOSEXUALITY

NO

NET

Spain

88%

11%

+77

Germany

87

11

+76

Canada

80

14

+66

Czech Republic

80

16

+64

Australia

79

18

+61

Britain

76

18

+58

Italy

74

18

+56

France

77

22

+55

Argentina

74

21

+53

Philippines

73

26

+47

Chile

68

24

+44

Mexico

61

30

+31

U.S.

60

33

+27

Brazil

60

36

+24

Japan

54

36

+18

Greece

53

40

+13

Venezuela

51

42

+9

Poland

42

46

-4

Bolivia

43

49

-6

Israel

40

47

-7

South Korea

39

59

-20

El Salvador

34

62

-28

South Africa

32

61

-29

China

21

57

-36

Russia

16

74

-58

Lebanon

18

80

-62

Turkey

9

78

-69

Malaysia

9

86

-77

Kenya

8

90

-82

Pakistan

2

87

-85

Palestinian territories

4

93

-89

Indonesia

3

93

-90

Uganda

4

96

-92

Egypt

3

95

-92

Tunisia

2

94

-92

Ghana

3

96

-93

Senegal

3

96

-93

Jordan

3

97

-94

Nigeria

1

98

-97

Young Africans were almost as likely as older ones to oppose societal acceptance of homosexuality. On average, the percentage of respondents ages 18 to 29 who answered “yes” was just 1 percentage point higher than the proportion of those age 50 or older who said “yes.” The average gap in other countries polled was 14 percentage points. In South Africa, 35 percent of young people said “yes” to acceptance; everywhere else in Africa, the proportion was 7 percent or less.

This consistent opposition to societal acceptance across age groups has empowered African leaders to maintain or toughen anti-gay laws, even though aid from the U.S. and Europe increasingly is tied to acceptance of gay rights.

Pew identified religion as one factor tied to public opinion on homosexuality. Pew reported a strong correlation between religiosity, as measured by factors such as daily prayer, and anti-gay sentiment. All of the African countries polled scored above average in religiosity — but also supported acceptance of homosexuality at a lower rate than would be expected based solely on religiosity.

Pew didn’t poll a majority of African nations, and it’s unwise to extrapolate results in eight countries to a continent more than three times as large and as populous as the U.S. Another set of survey results, though, was consistent. The World Values Survey asked adults in nine African countries — five of them sub-Saharan — whether homosexuality is justifiable in its latest wave of polls between 2010 and 2014. Five of the nine countries weren’t polled by Pew. Less than 5 percent of respondents in each of the African nations said homosexuality is always justifiable, compared with an average of 9 percent in the other 49 countries polled. And like Pew, the World Values Survey found little difference among young Africans: Less than 5 percent of people under 29 in each African nation polled said homosexuality is always justifiable.