Using numerical simulations of a simple sea-coast mechanical erosion model, we investigate the effect of spatial long-range correlations in the lithology of coastal landscapes on the fractal behavior of the corresponding coastlines. In the model, the resistance of a coast section to erosion depends on the local lithology configuration as well as on the number of neighboring sea sides. For weak sea forces, the sea is trapped by the coastline and the eroding process stops after some time. For strong sea forces erosion is perpetual. The transition between these two regimes takes place at a critical sea force, characterized by a fractal coastline front. For uncorrelated landscapes, we obtain, at the critical value, a fractal dimension D=1.33, which is consistent with the dimension of the accessible external perimeter of the spanning cluster in two-dimensional percolation. For sea forces above the critical value, our results indicate that the coastline is self-affine and belongs to the Kardar-Parisi-Zhang universality class. In the case of landscapes generated with power-law spatial long-range correlations, the coastline fractal dimension changes continuously with the Hurst exponent H, decreasing from D=1.34 to 1.04, for H=0 and 1, respectively. This nonuniversal behavior is compatible with the multitude of fractal dimensions found for real coastlines.