We compute the high-temperature limit of the free energy for four-dimensional N=4 supersymmetric SU(N_c) Yang-Mills theory. At weak coupling we do so for a general ultrastatic background spacetime, and in the presence of slowly-varying background gauge fields. Using Maldacena's conjectured duality, we calculate the strong-coupling large-N_c expression for the special case that the three-space has constant curvature. We compare the two results paying particular attention to curvature corrections to the leading order expressions.