how to compile imagick with png support?
Posted: 2018-06-06T09:43:19-07:00
I have installed jpeg,png at /home/www/jpeg,/home/www/png。I do not want to use sys default 。
jpegsrc.v9a.tar.gz
libpng-1.6.19.tar.gz
I use the following commands let it to find jpeg and png。
but,it only finds jpeg,no png。 How to specify the path?
jpegsrc.v9a.tar.gz
libpng-1.6.19.tar.gz
I use the following commands let it to find jpeg and png。
Code: Select all
export CFLAGS="-I/home/www/jpeg/include -I/home/www/png/include"
export LDFLAGS="-L/home/www/jpeg/lib -L/home/www/png/lib"
export LD_LIBRARY_PATH="/home/www/jpeg/lib:/home/www/png/lib"
Code: Select all
[www@6rooms ImageMagick-7.0.7-38]$ pwd
/home/www/softwares/ImageMagick-7.0.7-38
[www@6rooms ImageMagick-7.0.7-38]$ cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[www@6rooms ImageMagick-7.0.7-38]$ ./configure --prefix=/home/www/ImageMagick5
the last part of output :
-------------------------------------------------------------
checking for PNG... no
.......
configure:
==============================================================================
ImageMagick is configured as follows. Please verify that this configuration
matches your expectations.
Host system type: x86_64-pc-linux-gnu
Build system type: x86_64-pc-linux-gnu
Option Value
------------------------------------------------------------------------------
Shared libraries --enable-shared=yes yes
Static libraries --enable-static=yes yes
Build utilities --with-utilities=yes yes
Module support --with-modules=no no
GNU ld --with-gnu-ld=yes yes
Quantum depth --with-quantum-depth=16 16
High Dynamic Range Imagery
--enable-hdri=yes yes
Install documentation: yes
Delegate Library Configuration:
BZLIB --with-bzlib=yes no
Autotrace --with-autotrace=no no
DJVU --with-djvu=yes no
DPS --with-dps=yes no
FFTW --with-fftw=yes no
FLIF --with-flif=yes no
FlashPIX --with-fpx=yes no
FontConfig --with-fontconfig=yes no
FreeType --with-freetype=yes no
Ghostscript lib --with-gslib=no no
Graphviz --with-gvc=yes no
HEIC --with-heic=yes no
JBIG --with-jbig=yes no
[color=#FF0000] JPEG v1 --with-jpeg=yes yes[/color]
LCMS --with-lcms=yes no
LQR --with-lqr=yes no
LTDL --with-ltdl=yes no
LZMA --with-lzma=yes yes
Magick++ --with-magick-plus-plus=yes yes
OpenEXR --with-openexr=yes no
OpenJP2 --with-openjp2=yes no
PANGO --with-pango=yes no
PERL --with-perl=no no
[color=#FF0000] PNG --with-png=yes no[/color]
RAQM --with-raqm=yes no
RAW --with-raw=yes no
RSVG --with-rsvg=no no
TIFF --with-tiff=yes no
WEBP --with-webp=yes no
WMF --with-wmf=yes no
X11 --with-x= no
XML --with-xml=yes yes
ZLIB --with-zlib=yes yes
Delegate Program Configuration:
GhostPCL None pcl6 (unknown)
GhostXPS None gxps (unknown)
Ghostscript None gs (unknown)
Font Configuration:
Apple fonts --with-apple-font-dir=default
Dejavu fonts --with-dejavu-font-dir=default none
Ghostscript fonts --with-gs-font-dir=default none
URW-base35 fonts --with-urw-base35-font-dir=default none
Windows fonts --with-windows-font-dir=default none
X11 Configuration:
X_CFLAGS =
X_PRE_LIBS =
X_LIBS =
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /home/www/ImageMagick5
EXEC-PREFIX = /home/www/ImageMagick5
VERSION = 7.0.7
CC = gcc -std=gnu99 -std=gnu99
CFLAGS = -I/usr/include/libxml2 -fopenmp -I/home/www/jpeg/include -I/home/www/png/include -Wall -mtune=core2 -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
CPPFLAGS = -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
PCFLAGS =
DEFS = -DHAVE_CONFIG_H
LDFLAGS = -L/home/www/jpeg/lib -L/home/www/png/lib
LIBS =
CXX = g++
CXXFLAGS = -g -O2 -pthread
FEATURES = DPC HDRI Cipher OpenMP
DELEGATES = mpeg [color=#FF0000]jpeg[/color] lzma xml zlib
[www@6rooms ImageMagick-7.0.7-38]$ ll /home/www/png/include/
total 0
drwxr-xr-x 2 www yunwei 56 May 31 19:32 libpng16
lrwxrwxrwx 1 www yunwei 18 May 31 19:32 pngconf.h -> libpng16/pngconf.h
lrwxrwxrwx 1 www yunwei 14 May 31 19:32 png.h -> libpng16/png.h
lrwxrwxrwx 1 www yunwei 21 May 31 19:32 pnglibconf.h -> libpng16/pnglibconf.h
[www@6rooms ImageMagick-7.0.7-38]$ ll /home/www/png/lib/
total 2216
-rw-r--r-- 1 www yunwei 1426600 May 31 19:32 libpng16.a
-rwxr-xr-x 1 www yunwei 961 May 31 19:32 libpng16.la
lrwxrwxrwx 1 www yunwei 19 May 31 19:32 libpng16.so -> libpng16.so.16.19.0
lrwxrwxrwx 1 www yunwei 19 May 31 19:32 libpng16.so.16 -> libpng16.so.16.19.0
-rwxr-xr-x 1 www yunwei 832960 May 31 19:32 libpng16.so.16.19.0
lrwxrwxrwx 1 www yunwei 10 May 31 19:32 libpng.a -> libpng16.a
lrwxrwxrwx 1 www yunwei 11 May 31 19:32 libpng.la -> libpng16.la
lrwxrwxrwx 1 www yunwei 11 May 31 19:32 libpng.so -> libpng16.so
drwxr-xr-x 2 www yunwei 42 May 31 19:32 pkgconfig