Enable jpeg in PHP GD support

I have a PHP 5.5.13 which is compiled from source. With GD support.

I saw some image thumb is not shown in the webpage of Joomla. The error log has following errors:
Call to undefined function: imagecreatefromjpeg()

When I check the phpinfo, I saw GIF enabled, PNG enabled, WBMP enabled, XBM enabled, but jpeg is missing.
The screenshot above is get from inside of Joomla system information.

I checked the PHP official site. The solution is as below.

1) Make sure JPEG is installed

<br />
yum install libjpeg libjpeg-devel<br />

2) Re-compile PHP 5.5.13
Because I make and install PHP just hours ago in the same source folder, I have to clean the folder first.

<br />
cd php-5.5.13<br />
make clean<br />

Then, make and install (Because it is a X86 system, or 32bit system, the lib directory is lib, jpeg-dir is /usr/lib)

<br />
./configure --prefix=/usr/local/php55 \<br />
    --with-config-file-path=/etc/php55 \<br />
    --with-config-file-scan-dir=/etc/php55/php.d \<br />
    --with-libdir=lib \<br />
    --with-mysql \<br />
    --with-mysqli \<br />
    --enable-mbstring \<br />
    --disable-debug \<br />
    --disable-rpath \<br />
    --with-bz2 \<br />
    --with-curl \<br />
    --with-gettext \<br />
    --with-iconv \<br />
    --with-openssl \<br />
    --with-gd \<br />
    --with-mcrypt \<br />
    --with-pcre-regex \<br />
    --with-zlib \<br />
    --enable-cgi \<br />
    --enable-exif \<br />
    --enable-zip \<br />
    --with-gmp \<br />
    --enable-ftp \<br />
    --enable-shmop \<br />
    --enable-sockets \<br />
    --with-jpeg-dir=/usr/lib<br />
make<br />
make install<br />

It is just a re-compiling for PHP, nothing else changed. So restart Apache to make it effect.

It is from phpinfo page.