http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54304
--- Comment #12 from Tobias Schlüter <tobi at gcc dot gnu.org> 2012-08-17 21:35:50 UTC --- Well, directories given by -I are searched before system directories, -L adds directories to the end of the library search list, so their functions are not equivalent. Which is the root of my problem, and which will always lead to conflicts if a library is installed both in a system dir and under some prefix specified via a --with-lib-prefix= option. Ugly.