Two generic drugmakers have agreed to the national settlement of a class action alleging that their version of a popular antidepressant drug was not as therapeutically effective as the brand-name drug.

The drugmakers have agreed to give injunctive relief to the class by changing their product labels and taking other measures that the plaintiffs say will protect consumers.