gd-1.8
Pericles S. Nacionales
pnaciona at gis.umn.edu
Fri Mar 10 16:51:27 PST 2000
Frank Koormann wrote:
> I have compiled mapserver 3.3-008 with GD 1.8 successfully.
> Steve, you are right, GD has to be compiled without jpeg support.
> Here the steps:
>
> o in the Makefile of gd sources:
> - CFLAGS=-O -DHAVE_XPM -DHAVE_LIBTTF
> - LIBS=-lm -lgd -lpng -lz -lttf -lXpm -lX11
> - VERSION=1.8 # :)
>
> o make libgd.a
>
> o in the Makefile of mapserver:
> - As described in the GD Section, add -lpng and -lz to
> GD_LIB for png-support and set GD=-DUSE_GD_1_6
> - modify the path to libgd
> - #MAKE_GD=gd
> (to suppress compilation of gd-1.2 packed with the
> mapserver)
>
> o make
To those who wish to compile MapServer 3.3.008 and GD-1.8 with JPEG
support, here are the steps I used.
I'm assuming you have the supporting library sources under the
ms_3.3.008 directory tree and that you already have libpng and zlib.
I'm also assuming your JPEG directory is called "jpeg6b" and your gd-1.8
directory is "gd-1.8".
1. Compile JPEG
$ ./configure
$ make
$ make install
2. Edit GD-1.8 Makefile
- Add the JPEG source path to INCLUDEDIRS:
INCLUDEDIRS=-I../gd-1.8 -I../jpeg-6b -I/usr/include -I/usr/local/include
-I/usr/include/X11 -I/usr/X11R6/include/X11
3. Edit ms_3.3.008 Makefile
- Change all gd paths to gd-1.8
- Change GD=-DUSE_GD_1_2 to GD=-DUSE_GD_1_6
- Add "-lpng -lz" to GD_LIB=-L./gd-1.8 -lgd
Here's a Makefile snippet:
***
GDFONT_OBJ=gd-1.8/gdfontt.o gd-1.8/gdfonts.o gd-1.8/gdfontmb.o
gd-1.8/gdfontl.o gd-1.8/gdfontg.o
GD_INC=-I./gd-1.8
GD_LIB=-L./gd-1.8 -lgd -lpng -lz
GD=-DUSE_GD_1_6
MAKE_GD=gd
.
.
.
gd::
cd gd-1.8; make; cd ..
***
4. Edit gdft Makefile to make use of gd-1.8 stuff
Here's a snippet of gdft Makefile
***
GD_INC=-I../gd-1.8
GD_LIB=-L../gd-1.8 -lgd -lpng -lz
GD=-DUSE_GD_1_6
***
5. Compile MapServer
The key step is in configuring the JPEG source. When you run
"./configure", it copies jinclude.h from one of the architecture
dependent jinclude files (i.e., jinclude.linux, jinclude.sgi). Gd-1.8
looks for this file during compile.
Hope this helps.
Perry N.
More information about the MapServer-users
mailing list