"Aucun fichier ou dossier de ce type" == "No such file or directory"
PKG_CONFIG_PATH contains (non-default) paths to add in order to find extra .pc files, not the packages themselves. If you have the correct .pc file in that directory it should work.
Check the output of:
pkg-config --cflags --libs glib-2.0
(with and without setting PKG_CONFIG_PATH)
It should show your glib-2.0 install path for includes & libraries, this is mine, installed to /usr/local/:
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include \
-L/usr/local/lib -lglib-2.0
If it's wrong then check the .pc file.
However, the path you give for glib.h looks more like it's just the unpacked source, not a complete installation of glib-2.0.
Did you have glib-2.0 installed and built already? If you are building it following the instructions URL then it does not seem correct, and you need to repeat that step.
There's no reason not to do a normal configure/make/install of some of these packages to /usr/local, especially glib-2.0, zlib, libpng, libXML2 -- unless they conflict with something you already have installed.
The logic behind the RRDtool build document is to build everything under /tmp and install everything under /opt to make it as self-contained as possible. While it's likely to be a reasonably robust method, there are some drawbacks to it (including the requirement to set various magic environment variables).
Update: the problem is the install path of glib-2.0 is conflicting with the includes used in rrdtool . When you install it to
/usr/local/glib-2.34.0/ the
.pc is built to specify an include directory of
/usr/local/glib-2.34.0/include/glib-2.0. This path
already contains the sub-directory glib-2.0 so when rrdtool tries to include
<glib-2.0/glib.h> it fails. I believe this to be an rrdtool issue, it is masked when glib-2.0 is installed to an "expected" place under
/usr or
/usr/local (and presumably when you use the build guideline paths exactly).
If you install to /usr/local, an include path of /usr/local/include will cause "#include <glib-2.0/glib.h>" to work correctly.
As a fix I suggest either building and installing all the dependencies in /usr/local (then you only need to set PKG_CONFIG_PATH=/usr/local/lib/pkgconfig) or following the rrdtool build instructions exactly, or you can set CFLAGS to where you installed glib-2.0 before you run configure, e.g.:
export CFLAGS="-I/usr/local/glib-2.34.0/include"
(i.e. one directory above that reported by pkg-config --cflags glib-2.0)
You can see better what's going on if the compile breaks by running:
make AM_DEFAULT_VERBOSITY=1
just after an error, the commands used will be retried and printed this time, so you can check the gcc -I flags.
OK, Found a bug report, it's fixed (though the title "Fix build with non-standard glib location" is slightly misleading). There has been no new stable release since then though. FWIW, there are several unanswered questions on the user list that seem to be this same problem.