How to include  outside the .ino file As I understand, Arduino IDE considers two paths for the libraries:

first, 


  "C:\Program Files\Arduino\libraries"


and second, the "libraries" folder next to the schetchbook.

I have a configuration.h file, that I include in the main file, Test.ino, like this:

#include &lt;configuration.h&gt;


and in the configuration.h file I try to include SPI.h like this:

#include &lt;SPI.h&gt;


But I get the following error:

fatal error: SPI.h: No such file or directory


It seems that I am obliged to include SPI.h only from the ino file. But why?
And how can I do what I want here? do I have to change IDE?

P.S: the software is large and I am improving maintainability.
See my answer How the IDE organizes things. There is no easy way to avoid having to put an include in the main .ino file, unless you write your own build process (or perhaps use another toolchain).

I think you could put SPI.h (and other things, like Wire.h) in the main .ino file, even if they aren't used due to your configuration parameters. The linker would strip them out because the modules were not referenced.