Right now FFTW3 claims to support FFTW3_LIBS (in configuration.ccl) but ignores the user provided value and always uses fftw3, it does not allow FFTW3_INC_DIRS or LLTW3_LIB_DIRS to be set at all.
The attached patch changes this such that if those variables are specified in the option list, they override whatever detect.sh may want to use. This can be used to make use of the fftw implementation inside of MKL which stores its include files inside $MKL_ROOT/include/fftw and which should be used by sepcifying jsut `-mkl}} to the compiler rather than an actual library file.
This is a bug since FFTW3_LIBS is documented but does not behave as documented. It is major since this should be fixed before the next release.