5.1 Surround on GameCube is only supported through its RCA (red/white) audio cables with a Dolby Pro Logic II-enabled receiver. There's no official way of routing GameCube audio through an optical cable; furthermore, the optical cable won't give you anything meaningful since Pro Logic II audio is designed solely for RCA audio cables. (optical is meant for Dolby Digital/DTS 5.1, but Pro Logic II is not a digital format, so it stays with RCA).
If you have a receiver that supports Pro Logic II, then you're in good shape, and just need to connect the GameCubes audio cables. If not, then you're outta luck, and will probably achieve Dolby Pro Logic (4.1 sound) at most.