% ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql41 --with-gd=shared,/usr/local --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local '--with-xpm-dir=/usr/X11R6 ' '--with-zlib-dir=/usr ' '--enable-gd-native-ttf=yes
checking for GD support... yes, shared
checking for the location of libjpeg... /usr/local
checking for the location of libpng... /usr/local
checking for the location of libXpm... /usr/X11R6
checking for FreeType 1.x support... no
checking for FreeType 2... /usr/local
checking for T1lib support... no
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for jpeg_read_header in -ljpeg... (cached) yes
.. snip ..
% sapi/cli/php -d extension=gd.so -i
.. snip ..
gd
GD Support => enabled
GD Version => 2.0 or higher
GIF Read Support => enabled
GIF Create Support => enabled
JPG Support => enabled
PNG Support => enabled
WBMP Support => enabled