How to compile with debug symbols (autotools)?

I’m trying to investigate a crash.
How can I compile SDL2 with debug symbols (using autotools)?

cd SDL
mkdir build
cd build
CFLAGS="-O0 -ggdb3" ../configure
make