It means the header files for that library cannot be found, which are required to compile it.
Try searching in your package manager for "imlib2".
Depending on which distribution you are using, you may also need to install "imlib2-dev" or similar.
For example, on ubuntu/debian based distributions,
xorg-dev provides header files for x11
libimlib2-dev provides header files for imlib2