*** gd-1.8.4/Makefile	Fri May 11 15:34:05 2001
--- gd-1.8.4/Makefile	Fri May 11 16:25:27 2001
***************
*** 3,9 ****
  #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
  
  #If the ar command fails on your system, consult the ar manpage
  #for your system. 
--- 3,9 ----
  #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=xlc
  
  #If the ar command fails on your system, consult the ar manpage
  #for your system. 
***************
*** 12,23 ****
  #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
  
  #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.
! #CFLAGS=-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG \
! #	-DHAVE_LIBFREETYPE -DHAVE_LIBTTF 
  
  #To use the old FreeType 1.x library, add this additional #define
  #to the line above
--- 12,23 ----
  #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
  
  #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.
! CFLAGS=-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG \
! 	-DHAVE_LIBTTF 
  
  #To use the old FreeType 1.x library, add this additional #define
  #to the line above
***************
*** 30,42 ****
  #Some systems are very picky about link order. They don't all agree
  #on the right order, either.
  
! LIBS=-lgd -lpng -lz -lm
  
  #If you do have FreeType, JPEG and/or Xpm fully installed, uncomment a 
  #variation of this and comment out the line above. Note that
  #Xpm requires X11. See also CFLAGS above.
  
! #LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lm -lttf
  
  #Note: for Freetype 1.x, use DHAVE_LIBTTF and -lttf instead.
  
--- 30,42 ----
  #Some systems are very picky about link order. They don't all agree
  #on the right order, either.
  
! #LIBS=-lgd -lpng -lz -lm
  
  #If you do have FreeType, JPEG and/or Xpm fully installed, uncomment a 
  #variation of this and comment out the line above. Note that
  #Xpm requires X11. See also CFLAGS above.
  
! LIBS=-lgd -lpng -lz -ljpeg -lm -lttf
  
  #Note: for Freetype 1.x, use DHAVE_LIBTTF and -lttf instead.
  
***************
*** 45,51 ****
  #ensure that the version of gd you are installing is used, and not an 
  #older release in your directory tree somewhere.
  
! INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include 
  
  #Typical install locations for freetype, zlib, xpm and libpng libraries.
  #If yours are somewhere else, other than a standard location
--- 45,51 ----
  #ensure that the version of gd you are installing is used, and not an 
  #older release in your directory tree somewhere.
  
! INCLUDEDIRS=-I. -I/usr/include/freetype -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include 
  
  #Typical install locations for freetype, zlib, xpm and libpng libraries.
  #If yours are somewhere else, other than a standard location
***************
*** 55,70 ****
  #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
  
  #Location where libgd.a should be installed by "make install".
! INSTALL_LIB=/usr/local/lib
  
  #Location where .h files should be installed by "make install".
! INSTALL_INCLUDE=/usr/local/include
  
  #Location where useful non-test programs should be installed by "make install".
! INSTALL_BIN=/usr/local/bin
  
  #
  #
--- 55,70 ----
  #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/opt/freeware/lib -L/usr/lib/X11 -L/usr/X11R6/lib
  
  #Location where libgd.a should be installed by "make install".
! INSTALL_LIB=/opt/freeware/lib
  
  #Location where .h files should be installed by "make install".
! INSTALL_INCLUDE=/opt/freeware/include
  
  #Location where useful non-test programs should be installed by "make install".
! INSTALL_BIN=/opt/freeware/bin
  
  #
  #
***************
*** 134,142 ****
  	$(CC) gd2time.o -o gd2time	$(LIBDIRS) $(LIBS)
  
  gdtestft: gdtestft.o libgd.a
! 	$(CC) --verbose gdtestft.o -o gdtestft $(LIBDIRS) $(LIBS)
  gdtestttf: gdtestttf.o libgd.a
! 	$(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 \
--- 134,142 ----
  	$(CC) gd2time.o -o gd2time	$(LIBDIRS) $(LIBS)
  
  gdtestft: gdtestft.o libgd.a
! 	$(CC) gdtestft.o -o gdtestft $(LIBDIRS) $(LIBS)
  gdtestttf: gdtestttf.o libgd.a
! 	$(CC) 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 \
***************
*** 150,155 ****
--- 150,167 ----
  		gdtables.o gdft.o gdttf.o gdcache.o gdkanji.o wbmp.o \
  		gd_wbmp.o gdhelpers.o
  	-ranlib libgd.a
+ 	#Added for AIX, to make this a shared library.
+ 	rm -f libgd.syms shr.o
+ 	echo "#!" > libgd.syms
+ 	/bin/dump -g libgd.a | sed -n -e \
+ 		's/^[     ]*[0-9][0-9]*[   ]*\([^  .][^   ]*\)$$/\1/p' \
+ 		>> libgd.syms
+ 	$(LD) -o shr.o libgd.a -H512 -T512 -bM\:SRE -bE\:libgd.syms \
+ 		-lc -lpng -lz -ljpeg -lm -lttf -L/opt/freeware/lib
+ 	rm -f libgd.syms libgd.a
+ 	$(AR) rc libgd.a shr.o
+ 	rm -f shr.o
+ 
  
  clean:
  	rm -f *.o *.a ${PROGRAMS} test/gdtest.jpg test/gdtest.wbmp
