Sync curl build from sources logic.