Extand graphical lib 

On my machine with Ubuntu 12.04 after installing libjpeg via 'sudo apt-get install libjpeg8-dev'when I run 'ldconfig -p | grep libjpeg' I see

libjpeg.so.8 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libjpeg.so.8
libjpeg.so.8 (libc6) => /usr/lib/i386-linux-gnu/libjpeg.so.8

So the provided regexp of detecting if libjpeg is installed doesn't work for me.

uname -a on my machine is
Linux zozulyak-v 3.5.0-32-generic #53~precise1-Ubuntu SMP Wed May 29 20:33:37 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

libjpeg8-dev version is 8c-2ubuntu7

Note: my colleagues have similar issues on CentOs