Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
Installing libpng version 1.2.4 - July 8, 2002
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
Before installing libpng, you must first install zlib.  zlib
Toshihiro Shimizu 890ddd
can usually be found wherever you got libpng.  zlib can be
Toshihiro Shimizu 890ddd
placed in another directory, at the same level as libpng.
Toshihiro Shimizu 890ddd
Note that your system might already have a preinstalled
Toshihiro Shimizu 890ddd
zlib, but you will still need to have access to the
Toshihiro Shimizu 890ddd
zlib.h and zconf.h include files that correspond to the
Toshihiro Shimizu 890ddd
version of zlib that's installed.
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
You can rename the directories that you downloaded (they
Toshihiro Shimizu 890ddd
might be called "libpng-1.2.4" or "lpng109" and "zlib-1.1.4"
Toshihiro Shimizu 890ddd
or "zlib114") so that you have directories called "zlib" and "libpng".
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
Your directory structure should look like this:
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
   ..       (the parent directory)
Toshihiro Shimizu 890ddd
      libpng  (this directory)
Toshihiro Shimizu 890ddd
          INSTALL (this file)
Toshihiro Shimizu 890ddd
          README
Toshihiro Shimizu 890ddd
          *.h
Toshihiro Shimizu 890ddd
          *.c
Toshihiro Shimizu 890ddd
          contrib
Toshihiro Shimizu 890ddd
             gregbook
Toshihiro Shimizu 890ddd
             msvctest
Toshihiro Shimizu 890ddd
             pngminus
Toshihiro Shimizu 890ddd
             pngsuite
Toshihiro Shimizu 890ddd
             visupng
Toshihiro Shimizu 890ddd
          projects
Toshihiro Shimizu 890ddd
             beos
Toshihiro Shimizu 890ddd
             borland
Toshihiro Shimizu 890ddd
             msvc
Toshihiro Shimizu 890ddd
             netware.txt
Toshihiro Shimizu 890ddd
             wince.txt
Toshihiro Shimizu 890ddd
          scripts
Toshihiro Shimizu 890ddd
             makefile.*
Toshihiro Shimizu 890ddd
             libpng*.in
Toshihiro Shimizu 890ddd
          mangle
Toshihiro Shimizu 890ddd
             makefile.*
Toshihiro Shimizu 890ddd
             mangle.in
Toshihiro Shimizu 890ddd
          pngtest.png
Toshihiro Shimizu 890ddd
          etc.
Toshihiro Shimizu 890ddd
      zlib
Toshihiro Shimizu 890ddd
          README
Toshihiro Shimizu 890ddd
          *.h
Toshihiro Shimizu 890ddd
          *.c
Toshihiro Shimizu 890ddd
          contrib
Toshihiro Shimizu 890ddd
          etc.
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
If the line endings in the files look funny, you may wish to get the other
Toshihiro Shimizu 890ddd
distribution of libpng.  It is available in both tar.gz (UNIX style line
Toshihiro Shimizu 890ddd
endings) and zip (DOS style line endings) formats.
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
If you are building libpng with MSVC, you can enter the libpng\msvc directory
Toshihiro Shimizu 890ddd
and follow the instructions in msvc\README.txt.
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
You can build libpng for WindowsCE by entering the downloading and installing
Toshihiro Shimizu 890ddd
the libpng\wince directory as instructed in the projects\wince.txt file, and
Toshihiro Shimizu 890ddd
then following the instructions in the README* files.  Similarly, you can
Toshihiro Shimizu 890ddd
build libpng for Netware as instructed in projects\netware.txt.
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
Else enter the zlib directory and follow the instructions in zlib/README,
Toshihiro Shimizu 890ddd
then come back here and choose the appropriate makefile.sys in the scripts
Toshihiro Shimizu 890ddd
directory.
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
The files that are presently available in the scripts directory
Toshihiro Shimizu 890ddd
include
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
 makefile.std      =>  Generic UNIX makefile (cc, creates static libpng.a)
Toshihiro Shimizu 890ddd
 makefile.linux    =>  Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.4)
Toshihiro Shimizu 890ddd
 makefile.gcmmx    =>  Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.4,
Toshihiro Shimizu 890ddd
                       uses assembler code tuned for Intel MMX platform)
Toshihiro Shimizu 890ddd
 makefile.gcc      =>  Generic makefile (gcc, creates static libpng.a)
Toshihiro Shimizu 890ddd
 makefile.knr      =>  Archaic UNIX Makefile that converts files with
Toshihiro Shimizu 890ddd
                       ansi2knr (Requires ansi2knr.c from
Toshihiro Shimizu 890ddd
                       ftp://ftp.cs.wisc.edu/ghost)
Toshihiro Shimizu 890ddd
 makefile.aix      =>  AIX makefile
Toshihiro Shimizu 890ddd
 makefile.cygwin   =>  Cygwin/gcc makefile
Toshihiro Shimizu 890ddd
 makefile.darwin   =>  Darwin makefile
Toshihiro Shimizu 890ddd
 makefile.dec      =>  DEC Alpha UNIX makefile
Toshihiro Shimizu 890ddd
 makefile.hpgcc    =>  FreeBSD makefile
Toshihiro Shimizu 890ddd
 makefile.hpgcc    =>  HPUX makefile using gcc
Toshihiro Shimizu 890ddd
 makefile.hpux     =>  HPUX (10.20 and 11.00) makefile
Toshihiro Shimizu 890ddd
 makefile.ibmc     =>  IBM C/C++ version 3.x for Win32 and OS/2 (static)
Toshihiro Shimizu 890ddd
 makefile.intel    =>  Intel C/C++ version 4.0 and later
Toshihiro Shimizu 890ddd
 libpng.icc        =>  Project file for IBM VisualAge/C++ version 4.0 or later
Toshihiro Shimizu 890ddd
 makefile.macosx   =>  MACOS X Makefile
Toshihiro Shimizu 890ddd
 makefile.netbsd   =>  NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so.
Toshihiro Shimizu 890ddd
 makefile.ne0bsd  =>  NetBSD/cc makefile, uses PNGGCCRD, makes libpng0.so
Toshihiro Shimizu 890ddd
 makefile.openbsd  =>  OpenBSD makefile
Toshihiro Shimizu 890ddd
 makefile.sgi      =>  Silicon Graphics IRIX makefile (cc, creates static lib)
Toshihiro Shimizu 890ddd
 makefile.sggcc    =>  Silicon Graphics (gcc, creates libpng12.so.0.1.2.4)
Toshihiro Shimizu 890ddd
 makefile.sunos    =>  Sun makefile
Toshihiro Shimizu 890ddd
 makefile.solaris  =>  Solaris 2.X makefile (gcc, creates libpng12.so.0.1.2.4)
Toshihiro Shimizu 890ddd
 makefile.so9      =>  Solaris 9 makefile (gcc, creates libpng12.so.0.1.2.4)
Toshihiro Shimizu 890ddd
 makefile.32sunu   =>  Sun Ultra 32-bit makefile
Toshihiro Shimizu 890ddd
 makefile.64sunu   =>  Sun Ultra 64-bit makefile
Toshihiro Shimizu 890ddd
 makefile.sco      =>  For SCO OSr5  ELF and Unixware 7 with Native cc
Toshihiro Shimizu 890ddd
 makefile.mips     =>  MIPS makefile
Toshihiro Shimizu 890ddd
 makefile.acorn    =>  Acorn makefile
Toshihiro Shimizu 890ddd
 makefile.amiga    =>  Amiga makefile
Toshihiro Shimizu 890ddd
 smakefile.ppc     =>  AMIGA smakefile for SAS C V6.58/7.00 PPC compiler
Toshihiro Shimizu 890ddd
                       (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc)
Toshihiro Shimizu 890ddd
 makefile.atari    =>  Atari makefile
Toshihiro Shimizu 890ddd
 makefile.beos     =>  BEOS makefile for X86
Toshihiro Shimizu 890ddd
 makefile.bor      =>  Borland makefile (uses bcc)
Toshihiro Shimizu 890ddd
 makefile.bc32     =>  32-bit Borland C++ (all modules compiled in C mode)
Toshihiro Shimizu 890ddd
 makefile.bd32     =>  To make a png32bd.dll with Borland C++ 4.5
Toshihiro Shimizu 890ddd
 makefile.tc3      =>  Turbo C 3.0 makefile
Toshihiro Shimizu 890ddd
 makefile.dj2      =>  DJGPP 2 makefile
Toshihiro Shimizu 890ddd
 makefile.msc      =>  Microsoft C makefile
Toshihiro Shimizu 890ddd
 makefile.vcawin32 =>  makefile for Microsoft Visual C++ 5.0 and later (uses
Toshihiro Shimizu 890ddd
                       assembler code tuned for Intel MMX platform)
Toshihiro Shimizu 890ddd
 makefile.vcwin32  =>  makefile for Microsoft Visual C++ 4.0 and later (does
Toshihiro Shimizu 890ddd
                       not use assembler code)
Toshihiro Shimizu 890ddd
 makefile.os2      =>  OS/2 Makefile (gcc and emx, requires pngos2.def)
Toshihiro Shimizu 890ddd
 pngos2.def        =>  OS/2 module definition file used by makefile.os2
Toshihiro Shimizu 890ddd
 makefile.watcom   =>  Watcom 10a+ Makefile, 32-bit flat memory model
Toshihiro Shimizu 890ddd
 makevms.com       =>  VMS build script
Toshihiro Shimizu 890ddd
 descrip.mms       =>  VMS makefile for MMS or MMK
Toshihiro Shimizu 890ddd
 pngdef.pas        =>  Defines for a png32bd.dll with Borland C++ 4.5
Toshihiro Shimizu 890ddd
 SCOPTIONS.ppc     =>  Used with smakefile.ppc
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
Copy the file (or files) that you need from the
Toshihiro Shimizu 890ddd
scripts directory into this directory, for example
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
   MSDOS example: copy scripts\makefile.msc makefile
Toshihiro Shimizu 890ddd
   UNIX example:    cp scripts/makefile.std makefile
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
Read the makefile to see if you need to change any source or
Toshihiro Shimizu 890ddd
target directories to match your preferences.
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
Then read pngconf.h to see if you want to make any configuration
Toshihiro Shimizu 890ddd
changes.
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
Then just run "make test" which will create the libpng library in
Toshihiro Shimizu 890ddd
this directory and run a quick test that reads the "pngtest.png"
Toshihiro Shimizu 890ddd
file and writes a "pngout.png" file that should be identical to it.
Toshihiro Shimizu 890ddd
Look for "9782 zero samples" in the output of the test.  For more
Toshihiro Shimizu 890ddd
confidence, you can run another test by typing "pngtest pngnow.png"
Toshihiro Shimizu 890ddd
and looking for "289 zero samples" in the output.  Also, you can
Toshihiro Shimizu 890ddd
run "pngtest -m *.png" in the "contrib/pngsuite" directory and compare
Toshihiro Shimizu 890ddd
your output with the result shown in contrib/pngsuite/README.
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
Most of the makefiles will allow you to run "make install" to
Toshihiro Shimizu 890ddd
put the library in its final resting place (if you want to
Toshihiro Shimizu 890ddd
do that, run "make install" in the zlib directory first if necessary).
Toshihiro Shimizu 890ddd
Some also allow you to run "make test-installed" after you have
Toshihiro Shimizu 890ddd
run "make install".  This will build and run executables called "pngtesti"
Toshihiro Shimizu 890ddd
and "mangle/pngtestm".
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
The files that are presently available in the mangle directory include the
Toshihiro Shimizu 890ddd
following.  The makefiles are automatically run by the corresponding makefiles
Toshihiro Shimizu 890ddd
in the scripts directory when you run "make", "make install", or
Toshihiro Shimizu 890ddd
"make test-installed".
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
 mangle.in        =>  Function-decoration macros added to png.h by the
Toshihiro Shimizu 890ddd
                      makefiles.
Toshihiro Shimizu 890ddd
 makefile.linux   =>  Linux/ELF makefile
Toshihiro Shimizu 890ddd
                      (gcc, creates libpng12m.so.0.1.2.4)
Toshihiro Shimizu 890ddd
 makefile.gcmmx   =>  Linux/ELF makefile (gcc, creates
Toshihiro Shimizu 890ddd
                      libpng12.so.0m.1.2.4, uses assembler code
Toshihiro Shimizu 890ddd
                      tuned for Intel MMX platform)
Toshihiro Shimizu 890ddd
 makefile.sgi     =>  Silicon Graphics (cc, creates libpng12m.so)
Toshihiro Shimizu 890ddd
 makefile.sggcc   =>  Silicon Graphics (gcc, creates libpng12m.so)
Toshihiro Shimizu 890ddd

Toshihiro Shimizu 890ddd
Further information can be found in the README and libpng.txt
Toshihiro Shimizu 890ddd
files, in the individual makefiles, in png.h, in the README files in
Toshihiro Shimizu 890ddd
subdirectories of the LIB directory, and the manual pages libpng.3 and png.5.