5 This driver is for GD, a library for dynamic creation of PNG and JPEG
6 images: line drawing, polygons, text, and lots more.
8 See http://www.boutell.com/gd/ for source distributions for GD, which
9 is a prerequisite for attempting to build this driver. Please follow
10 the instructions later in this file to build the libgd.so shared
13 The only functions in the GD API that are not supported are:
14 gdImageCreateFromPngSource(), gdImageDashedLine(), gdImageString16()
15 and gdImageStringUp16(), and True-Type font functions. Why the
16 True-Type font functions?
18 1. I don't have the fonts installed on my machine,
20 2. EDTK cannot currently pass floating-point values.
22 Once you've compiled and installed libgd.so and the GD header files
23 (gd.h, gd_io.h, ...), you'll *must* follow the instructions found in
24 the file GDConfig.mk.sample.
26 Once everything is compiled cleanly, run the regression test:
28 % cd CVSROOT/jungerl/lib/gd1_drv/test
31 You should see the message "All regression tests PASSED."
33 If you have problems compiling or using this driver, please email me
34 at slfritchie at snookles dot com.
37 Creating a shared library version of libgd
38 ==========================================
40 You will need to compile & install the GD library (version 1.8.4,
41 please!). Unfortunately, the build scheme used by GD 1.8.4 does not
42 create a shared library. So, you'll have to resort to some brutal
43 hacks to do so. Fortunately, it's pretty easy to do.
45 0. Get the source distribution for libgd version 1.8.4. Unpack it
48 1. Apply the patch below to the top-level "Makefile". This should
49 work if you're using GCC for your compiler. If not, you may need
50 to do whatever equivalent things for your compiler & linker. You
51 may need to use "-fpic" instead of "-fPIC", for example.
53 NOTE: The patch adds "-ljpeg" to the list of libraries added to the
54 libgd.so shared library. If you do not include libjpeg, you will
55 probably have problems with unresolvable symbols later on.
57 2. Follow the instructions in "index.html". See the "How do I build
58 gd?" link near the top of that file to jump to the compilation
61 You will want to build a version that has support for libpng and
62 libjpeg. This driver does not implement GD's TrueType font
63 functions, so don't bother trying to compile for it.
65 Here's the patch for "Makefile". Change directory to the top of the
66 GD source distribution, then run "patch < /path/to/this/README".
68 --- gd-1.8.4/Makefile Thu Feb 22 11:03:43 2001
69 +++ ./Makefile Thu Oct 17 02:20:13 2002
72 #If the ar command fails on your system, consult the ar manpage
75 +AR="do not use AR variable"
77 #If you don't have FreeType, libjpeg and/or Xpm installed, including the
78 #header files, uncomment this (default). You really must install
79 #libpng and zlib to get anywhere if you wish to create PNG images.
80 -CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG
81 +CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG -fPIC
83 #If you do have FreeType, libjpeg and/or Xpm fully installed, uncomment a
84 #variation of this and comment out the line above. See also LIBS below.
86 #Some systems are very picky about link order. They don't all agree
87 #on the right order, either.
89 -LIBS=-lgd -lpng -lz -lm
90 +LIBS=-lgd -lpng -lz -lm -ljpeg
92 #If you do have FreeType, JPEG and/or Xpm fully installed, uncomment a
93 #variation of this and comment out the line above. Note that
95 all: libgd.a $(PROGRAMS)
97 install: libgd.a $(BIN_PROGRAMS)
98 - sh ./install-item 644 libgd.a $(INSTALL_LIB)/libgd.a
99 + sh ./install-item 755 libgd.so $(INSTALL_LIB)/libgd.so
100 sh ./install-item 755 pngtogd $(INSTALL_BIN)/pngtogd
101 sh ./install-item 755 pngtogd2 $(INSTALL_BIN)/pngtogd2
102 sh ./install-item 755 gdtopng $(INSTALL_BIN)/gdtopng
104 gd_wbmp.o gdhelpers.o gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h \
105 gdfontg.h gdhelpers.h
107 - $(AR) rc libgd.a gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o \
108 + gcc -shared -o libgd.so gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o \
109 gd_io_file.o gd_ss.o gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o \
110 gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \
111 gdtables.o gdft.o gdttf.o gdcache.o gdkanji.o wbmp.o \