Implementation of FFT algorithm in C Programming
I just did exactly what you are asking for a few weeks ago. Try the Matlab coder. It turns your scripts into C funtions. This is what i did, maybe you can try it and see if it works for you:

1 - Make a simple function in matlab like this

function [y] = myfft(x)

y = fft(x,2^nextpow2(length(x)));

end
2 - Run the matlab coder.

3 - Set the input values to double and sizes of the inputs and outputs (You can read a little bit of the help for this, it is easy to understand).

4 - Build a static library based on this code

The result was that matlab created a few source and header files with initialization code, as well as a function with the actual algorithm, i think it used a global variable for the twiddle factors in the Cooley-Tukey algorithm and then just performed the radix-2 computations. So i ended up with the complete source code as well as the compiled myfft.so binary to include in any desired project.

Try it out, maybe you'll need to do some configurations, i use linux so i guess it was implied for matlab that the compiler would be gcc.

Hope it helps,