[EMAIL PROTECTED] (nellA hciR) wrote:
>i have been attempting to get the GD.pm module working unders X to be 
>able to create charts on the fly. I have not been able to find the 
>jpeg.lib library which from what i've read is required to be installed. 
>can anyone tell me where i can find this lib?

Here's an answer to a different question: how to build GD.pm without
JPEG support.  There are two options, actually.

1) if you want GIF support (and not PNG support), you must download
version 1.19 of GD.pm and install it.  Later versions won't work.  The
installation should go smoothly, with nothing special needing to be done
for Darwin.

2) if you want PNG support (and not GIF support), it takes several steps:

  a) Download 'libpng' version 1.0.11 (or later, I suppose) from
  http://www.libpng.org/pub/png and install it according to the
  instructions provided.  It will involve these steps:
      % cp scripts/makefile.macosx makefile
      % make
      % sudo make install
 
  b) Download 'libgd' from
  http://www.freesoftware.com/pub/png/src/libpng-1.0.11.tar.gz and apply
  the following patch to the file 'Makefile' (probably easiest to just do
  this by hand-editing):

==============================================================
--- gd-orig/gd-1.8.4/Makefile   Thu Feb 22 11:03:43 2001
+++ gd-1.8.4/Makefile   Thu Jun  7 14:12:58 2001
@@ -3,7 +3,7 @@
 #If you do not have gcc, change the setting for COMPILER, but you must
 #use an ANSI standard C compiler (NOT the old SunOS 4.1.3 cc
 #compiler; get gcc if you are still using it). 
-COMPILER=gcc
+COMPILER=cc
 
 #If the ar command fails on your system, consult the ar manpage
 #for your system. 
@@ -12,7 +12,7 @@
 #If you don't have FreeType, libjpeg and/or Xpm installed, including the
 #header files, uncomment this (default). You really must install
 #libpng and zlib to get anywhere if you wish to create PNG images.
-CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG
+CFLAGS=-O -DHAVE_LIBPNG
 
 #If you do have FreeType, libjpeg and/or Xpm fully installed, uncomment a
 #variation of this and comment out the line above. See also LIBS below.
@@ -55,7 +55,7 @@
 #on your system can't cause conflicts while building a new one.
 #This line shouldn't hurt if you don't actually have some of the
 #optional libraries and directories.
-LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
+LIBDIRS=-L. -L/usr/local/lib
 
 #Location where libgd.a should be installed by "make install".
 INSTALL_LIB=/usr/local/lib
@@ -139,13 +139,13 @@
        $(CC) --verbose gdtestttf.o -o gdtestttf $(LIBDIRS) $(LIBS)
 
 libgd.a: gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o gd_io_file.o gd_ss.o \
-       gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o 
\
+       gd_io_ss.o gd_png.o gdxpm.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o \
        gdfontg.o gdtables.o gdft.o gdttf.o gdcache.o gdkanji.o wbmp.o \
        gd_wbmp.o gdhelpers.o gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h \
        gdfontg.h gdhelpers.h
        rm -f libgd.a
        $(AR) rc libgd.a gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o \
-               gd_io_file.o gd_ss.o gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o \
+               gd_io_file.o gd_ss.o gd_io_ss.o gd_png.o gdxpm.o \
                gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \
                gdtables.o gdft.o gdttf.o gdcache.o gdkanji.o wbmp.o \
                gd_wbmp.o gdhelpers.o
==============================================================

  b-continued) I didn't want to run 'make install', because I didn't want
  to install 'libgd' since I want version 1.19 as the standard version on
  my system.  So I just left 'libgd.a' and 'gd.h' in the build directory.
  
  c) Download GD-1.33 (or later) from CPAN.  If you didn't do 'make
  install' in the previous step, edit 'Makefile.PL' by adjusting @INC and
  @LIBPATH to point to wherever 'libgd.a' and 'gd.h' are.  For instance,
  my modifications look like this (a hand-built patch):
  
  -my @INC     = qw(-I/usr/local/include -I/usr/local/include/gd); 
  -my @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/local/lib );
  +my @INC     = qw(-I/usr/local/include -I/Users/ken/Downloads/gd-1.8.4); 
  +my @LIBPATH = qw(-L/usr/local/lib -L/Users/ken/Downloads/gd-1.8.4);

  Then do the standard steps:
    % perl Makefile.PL
    % make test
    % make install

Works for me, anyway.  I hope that having this is a suitable answer to
some of the many GD questions that have been flying around the list.


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  [EMAIL PROTECTED]                            The Math Forum

Reply via email to