Use pkgconfig

Add basic tests to call C functions.
Copy dims before calling n-dim FFT function.