We present a general model of the evolution of dispersal in a population with any distribution of dispersal distance. We use this model to analyse evolutionarily stable (ES) dispersal rates for the classical island model of dispersal and for three different stepping-stone models. Using general techniques to compute relatedness coefficients in the different dispersal models which we consider, we find that the distribution of dispersal distance may affect the ES dispersal rate when the cost of dispersal is low. In this case the ES dispersal rate increases with the number of demes that can be reached by one dispersal event. However, for increasing cost the ES dispersal rate converges to a value independent of the distribution of dispersal distance. These results are in contrast to previous analyses of similar models. The effects of the size (number of demes) and shape (ratio between the width and the length) of the population on the evolution of dispersal are also studied. We find that larger and more elongated populations lead generally to higher ES dispersal rates. However, both of these effects can only be observed for extreme parameter values (i.e. for very small and very elongated populations). The direct fitness method and the analytical techniques used here to compute relatedness coefficients provide an efficient way to analyse ES strategies in subdivided populations.