I don’t have sources, only recent experience to go on in my own parish. Our pastor does discourage couples who become pregnant out of wedlock from marrying because of the pregnancy most of the time.
We have had situations where a couple in love has become pregnant after an engagement (usually without any concrete marriage plans), and they will plan to marry shortly after a baby is born with the support of the pastor and the parish, but that is a case where the free will aspect of sacramental marriage is not in question. It’s obviously not condoned that couples do it this way, but it is a solution to a specific kind of event, and we all pray for and look forward to a happy life for that couple and their child (and any future children).
In the case of a dating couple who has not discerned marriage, our pastor recommends not marrying, because too often the Church sees these marriages annulled later on. We have seen babies born out of wedlock be adopted by loving couples who cannot conceive, we’ve seen two dating people who get pregnant work to strengthen their bond as parents go on to get married out of free will and have a good, strong marriage after their first child is born, and we’ve seen relationships between dating couples who get pregnant end, though with a shared sense of responsibility and a commitment to doing the best they can for the child they conceived together.
We’ve only rarely seen disastrous results, typically because two people who are seeking counsel from a priest and actively involved in parish life do have the values necessary to achieve a positive outcome for their child. Usually when the results are bad, one or both of the people involved decides they don’t want to seek the counsel of our pastor, deacons, or other leaders in the parish.
EDIT - My point (which I didn’t get to, sorry!) is that our pastor has stated explicitly that what he wants is what’s best for the child, and he works to get surprised, unmarried parents-to-be prepared for the responsibility of having and raising that child in a loving, Christian home, whether that be their own or someone else’s. Typically he spends a good part of the pregnancy trying to advise against abandonment or abortion, and he tries to get the couple past feelings of betrayal (that she “tricked” him into fatherhood; that he wanted nothing to do with her once she got pregnant). He has said that, oftentimes, couples who are committed to counseling with him and other church leaders turn out to be great parents and oftentimes even wind up finding love through their shared bond of parenthood.
So I don’t think the Church discourages marriage due to pregnancy through any kind of concession to modern morality (or lack thereof), but rather in an attempt to create the kind of loving situation in which children and marriages flourish.
It’s a touchy subject, though. But I like the way our pastor and parish have handled it.