cpp replacement fails to search paths given with -I for #include <foo/bar.itp>
With git master, if a topology file contains a line like
it only works if foo is in the current directory, or in the directory given with GMXLIB, but not if foo is in a directory given with -I. In 4.0.7, it worked if foo is in the current directory, and kind of worked (due to fortunate cancellation of errors, and if bar.itp didn't include anything) also if foo was in a directory given with -I, but not with GMXLIB.
Most of the code to handle all these cases is already there in src/gmxlib/gmxcpp.c, but it's called in the wrong order (gmxlibfn gives a fatal error if it doesn't find the directory before the code even checks for the -I paths). Some additional code would be needed to correctly handle cases where bar.itp is in a -I path and includes other files.
I can try to get this working. I think the best way would be to search the current directory first, then all the paths given with -I, and finally the GMXLIB path. With some additional work, we could perhaps also support the difference between <> and "" as cpp does, but that's probably less important. Any comments?