Blame | Last modification | View Log | RSS feed
Installing libpng version 1.0.5 - October 15, 1999Before installing libpng, you must first install zlib. zlibcan usually be found wherever you got libpng. zlib can beplaced in another directory, at the same level as libpng.Note that your system might already have a preinstalledzlib, but you will still need to have access to thezlib.h and zconf.h include files that correspond to theversion of zlib that's installed.You can rename the directories that you downloaded (theymight be called "libpng-1.0.5" or "lpng103" and "zlib-1.1.3"or "zlib113") so that you have directories called "zlib" and "libpng".Your directory structure should look like this:.. (the parent directory)libpng (this directory)INSTALL (this file)README*.h*.ccontribgregbookscriptsmakefile.*pngtest.pngetc.zlibREADME*.h*.ccontribetc.First enter the zlib directory and follow the instructionsin zlib/README. Then come back here and choose theappropriate makefile.sys in the scripts directory.The files that are presently available in the scripts directoryincludedescrip.mms => VMS makefile for MMS or MMKmakefile.std => Generic UNIX makefilemakefile.knr => Archaic UNIX Makefile that converts files withansi2knr (Requires ansi2knr.c fromftp://ftp.cs.wisc.edu/ghost)makefile.dec => DEC Alpha UNIX makefilemakefile.hpux => HPUX (10.20 and 11.00) makefilemakefile.sgi => Silicon Graphics IRIX makefilemakefile.sunos => Sun makefilemakefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.5)makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.5)makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native ccmakefile.mips => MIPS makefilemakefile.acorn => Acorn makefilemakefile.amiga => Amiga makefilesmakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler(Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc)makefile.atari => Atari makefilemakefile.beos => BEOS makefile for X86makefile.borland => Borland makefilebuild.bat => MS-DOS batch file for Borland compilermakefile.dj2 => DJGPP 2 makefilemakefile.msc => Microsoft C makefilemakefile.vcawin32 => makefile for Microsoft Visual C++ 5.0 and later (usesassembler code)makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later (doesnot use assembler code)makefile.turboc3 => Turbo C 3.0 makefilemakefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)pngos2.def => OS/2 module definition file used by makefile.os2makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory modelmakevms.com => VMS build scriptpngdll.mak => To make a png32bd.dll with Borland C++ 4.5pngdef.pas => Defines for a png32bd.dll with Borland C++ 4.5SCOPTIONS.ppc => Used with smakefile.ppcCopy the file (or files) that you need from thescripts directory into this directory, for exampleMSDOS example: copy scripts\makefile.msc makefileUNIX example: cp scripts/makefile.std makefileRead the makefile to see if you need to change any source ortarget directories to match your preferences.Then read pngconf.h to see if you want to make any configurationchanges.Then just run "make test" which will create the libpng library inthis directory and run a quick test that reads the "pngtest.png"file and writes a "pngout.png" file that should be identical to it.Look for "9782 zero samples" in the output of the test. For moreconfidence, you can run another test by typing "pngtest pngnow.png"and looking for "289 zero samples" in the output.Most of the makefiles will allow you to run "make install" toput the library in its final resting place (if you want todo that, run "make install" in the zlib directory first if necessary).Further information can be found in the README and libpng.txtfiles, in the individual makefiles, and in png.h, and the manualpages libpng.3 and png.5.