Building SDL_Mixer from source?

Hello everyone, I hope you are all having a nice day,
I am trying to build SDL_Mixer from source but when I do it and try to use it it says that
it wasn’t built with Ogg Vorbis support (or any file support really). What do I need to do
to make it work with ogg, flac, etc…?
I’m on windows using code::blocks mingw32

Thanks in advance