I almost ran out of hair trying to figure this out. Eventually I just changed the "--with-mysql" line with "--with-mysql-client" and it worked!
Separate names with a comma.