|
学习动态网页技术PHP:GD库安装问题详解(2) Before installing libpng, you must first install zlib. zlib can usually be found wherever you got libpng. zlib can be placed in another directory, at the same level as libpng. Note that your system might already have a preinstalled zlib, but you will still need to have Access to the zlib.h and zconf.h include files that correspond to the version of zlib that's installed. http://www.gzip.org/zlib/ ftp://ftp.uu.net/graphics/png/src/zlib-1.1.3.tar.gz ./configure make make install
4. libpng 安装:
Read INSTALL http://www.libpng.org/pub/png/ libpng-1.2.0.tar.gz Unix example: cp scripts/makefile.std makefile make make install
5.GD-1.8.3的安装和配置
GD的主要文件有gd.h, libgd.a等。获取GD源码的地址为:http://www.boutell.com/gd/
取得的文件为gd-1.8.3.tar.gz,放于/usr/src目录下。已知道该版本的GD不支持GIF,但想来象我一样希望GD同时支持GIF和JPEG的人不少,于是有人做了个补丁,把对GIF的支持加回去了。看起来这是个英国人吧, 他的Email地址为adam@elysium.ltd.uk。获取补丁源码的地址为:http://www.webofsin.com/gd-1.8.3-gif.patch 取得的文件为gd-1.8.3-gif.patch,放于/usr/src目录下。进入/usr/src:
cd /usr/src
解开压缩文件:
tar xzvf gd-1.8.3.tar.gz
命令完成后多了一个子目录gd-1.8.3,GD的源码文件就在其中。给源码打补丁:
patch -p0
命令完成后gd-1.8.3子目录下多了个gd_gif.c文件,而文件gd.h和Makefile也被作了相应修改。进入该子目录:
cd gd-1.8.3
缺省情况下,GD库编译时并不加入JPEG支持,得修改Makefile文件。修改Makefile文件,使得:
CFLAGS=-O -DHAVE_XPM -DHAVE_JPEG -DHAVE_LIBTTF
|