A surge in agriculture has helped lift Africa’s biggest economies out of their slumps, but the recovery may be weak. Gross domestic product in Nigeria, the continent’s largest crude producer, advanced for the first time in six quarters in the three months ended June from a year earlier, growing 0.55 percent, the statistics agency said. In South Africa, GDP expanded 2.5 percent from the previous quarter, ending the second recession in almost a decade. Both economies had agriculture largely to thank: in South Africa, a bumper corn harvest following the worst drought in more than a century saw the sector surge 34 percent from the prior quarter, while in Nigeria, where farming vies with industries as the second-biggest contributor to...