That's very cool. While searching for it, I only found an older blog post where it said that internally it can do that, but there wasn't an option yet.
For anyone else trying this, it seems like Autotools/configure doesn't like CC with arguments, creating a wrapper script works though.