Software product line engineering is a discipline that facilitates a systematic reuse-based approach by formally representing commonalities and variabilities between the applications of a target domain. As one of the main artifacts of the software product line, a feature model represents the possible configuration space and can be customized based on the stakeholders' needs.Considering the complexity of the variabilities represented by feature models and the diversity of the stakeholders' expectations, the configuration process can be viewed as a complex optimization problem. In previous research, researchers have bridged the gap between requirement and product line engineering by integrating feature models and goal models. In this paper, we propose an approach for the configuration process that seeks to satisfy the stakeholders' requirements as well as the feature models' structural and integrity constraints. We model stakeholders' functional and nonfunctional needs and their preferences using requirement engineering goal models. We formalize the structure of the feature model, the stakeholders' objectives, and their preferences in the form of an integer linear program to conduct a semi-automated feature model configuration process. Our experimental results show that the proposed configuration framework is scalable when considering both functional and nonfunctional requirements of stakeholders.