Bring a large pot of salted water to a boil. Cook macaroni according to package directions until al dente. Two minutes before cook time ends, add broccoli. When macaroni is done, drain immediately and set aside.
Melt butter in a large saucepan over medium heat. Add in flour and whisk into butter; continue to heat until mixture is golden brown, 3–5 minutes.
Slowly add milk to flour mixture, whisking constantly. Once sauce is smooth, cook until slightly thickened (about 3 minutes), continuing to whisk constantly.
Remove sauce from heat. Whisk in fontina and parmesan cheese, pesto, and salt and pepper. Fold in elbow macaroni and broccoli. Divide into bowls and top with toasted panko, if desired.
Toasted Panko Topping
Heat olive oil in small skillet over medium heat. Add panko and cook until golden brown, 3–5 minutes.
To make this Pesto Mac into a casserole, after pasta and broccoli have been incorporated into the cheese sauce, transfer Pesto Mac to small (about 9 x 9) casserole dish. Top with panko and additional shredded cheese; bake at 350°F for about 20 minutes. If top is not browned, broil for about 5 more minutes.