INSTALL 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. Installing libpng version 1.2.8 - December 3, 2004
  2. Before installing libpng, you must first install zlib. zlib
  3. can usually be found wherever you got libpng. zlib can be
  4. placed in another directory, at the same level as libpng.
  5. Note that your system might already have a preinstalled
  6. zlib, but you will still need to have access to the
  7. zlib.h and zconf.h include files that correspond to the
  8. version of zlib that's installed.
  9. You can rename the directories that you downloaded (they
  10. might be called "libpng-1.2.8" or "lpng109" and "zlib-1.2.1"
  11. or "zlib121") so that you have directories called "zlib" and "libpng".
  12. Your directory structure should look like this:
  13. .. (the parent directory)
  14. libpng (this directory)
  15. INSTALL (this file)
  16. README
  17. *.h
  18. *.c
  19. contrib
  20. gregbook
  21. pngminus
  22. pngsuite
  23. visupng
  24. projects
  25. beos
  26. c5builder (Borland)
  27. visualc6 (msvc)
  28. netware.txt
  29. wince.txt
  30. scripts
  31. makefile.*
  32. pngtest.png
  33. etc.
  34. zlib
  35. README
  36. *.h
  37. *.c
  38. contrib
  39. etc.
  40. If the line endings in the files look funny, you may wish to get the other
  41. distribution of libpng. It is available in both tar.gz (UNIX style line
  42. endings) and zip (DOS style line endings) formats.
  43. If you are building libpng with MSVC, you can enter the
  44. libpng projects\visualc6 directory and follow the instructions in
  45. projects\visualc6\README.txt.
  46. You can build libpng for WindowsCE by downloading and installing
  47. the projects\wince directory as instructed in the projects\wince.txt file, and
  48. then following the instructions in the README* files. Similarly, you can
  49. build libpng for Netware or Beos as instructed in projects\netware.txt
  50. or projects\beos.
  51. Else enter the zlib directory and follow the instructions in zlib/README,
  52. then come back here and choose the appropriate makefile.sys in the scripts
  53. directory.
  54. The files that are presently available in the scripts directory
  55. include
  56. makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
  57. makefile.elf => Linux/ELF makefile symbol versioning,
  58. gcc, creates libpng12.so.0.1.2.8)
  59. makefile.linux => Linux/ELF makefile
  60. (gcc, creates libpng12.so.0.1.2.8)
  61. makefile.gcmmx => Linux/ELF makefile
  62. (gcc, creates libpng12.so.0.1.2.8,
  63. uses assembler code tuned for Intel MMX platform)
  64. makefile.gcc => Generic makefile (gcc, creates static libpng.a)
  65. makefile.knr => Archaic UNIX Makefile that converts files with
  66. ansi2knr (Requires ansi2knr.c from
  67. ftp://ftp.cs.wisc.edu/ghost)
  68. makefile.aix => AIX/gcc makefile
  69. makefile.cygwin => Cygwin/gcc makefile
  70. makefile.darwin => Darwin makefile, can use on MacosX
  71. makefile.dec => DEC Alpha UNIX makefile
  72. makefile.freebsd => FreeBSD makefile
  73. makefile.hpgcc => HPUX makefile using gcc
  74. makefile.hpux => HPUX (10.20 and 11.00) makefile
  75. makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit
  76. makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
  77. makefile.intel => Intel C/C++ version 4.0 and later
  78. libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later
  79. makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so.
  80. makefile.ne12bsd => NetBSD/cc makefile, uses PNGGCCRD,
  81. makes libpng12.so
  82. makefile.openbsd => OpenBSD makefile
  83. makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
  84. makefile.sggcc => Silicon Graphics (gcc,
  85. creates libpng12.so.0.1.2.8)
  86. makefile.sunos => Sun makefile
  87. makefile.solaris => Solaris 2.X makefile (gcc,
  88. creates libpng12.so.0.1.2.8)
  89. makefile.so9 => Solaris 9 makefile (gcc,
  90. creates libpng12.so.0.1.2.8)
  91. makefile.32sunu => Sun Ultra 32-bit makefile
  92. makefile.64sunu => Sun Ultra 64-bit makefile
  93. makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
  94. makefile.mips => MIPS makefile
  95. makefile.acorn => Acorn makefile
  96. makefile.amiga => Amiga makefile
  97. smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler
  98. (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc)
  99. makefile.atari => Atari makefile
  100. makefile.beos => BEOS makefile for X86
  101. makefile.bor => Borland makefile (uses bcc)
  102. makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
  103. makefile.tc3 => Turbo C 3.0 makefile
  104. makefile.dj2 => DJGPP 2 makefile
  105. makefile.msc => Microsoft C makefile
  106. makefile.vcawin32 => makefile for Microsoft Visual C++ 5.0 and later (uses
  107. assembler code tuned for Intel MMX platform)
  108. makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later (does
  109. not use assembler code)
  110. makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
  111. pngos2.def => OS/2 module definition file used by makefile.os2
  112. makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
  113. makevms.com => VMS build script
  114. descrip.mms => VMS makefile for MMS or MMK
  115. SCOPTIONS.ppc => Used with smakefile.ppc
  116. Copy the file (or files) that you need from the
  117. scripts directory into this directory, for example
  118. MSDOS example: copy scripts\makefile.msc makefile
  119. UNIX example: cp scripts/makefile.std makefile
  120. Read the makefile to see if you need to change any source or
  121. target directories to match your preferences.
  122. Then read pngconf.h to see if you want to make any configuration
  123. changes.
  124. Then just run "make" which will create the libpng library in
  125. this directory and "make test" which will run a quick test that reads
  126. the "pngtest.png" file and writes a "pngout.png" file that should be
  127. identical to it. Look for "9782 zero samples" in the output of the
  128. test. For more confidence, you can run another test by typing
  129. "pngtest pngnow.png" and looking for "289 zero samples" in the output.
  130. Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare
  131. your output with the result shown in contrib/pngsuite/README.
  132. Most of the makefiles will allow you to run "make install" to
  133. put the library in its final resting place (if you want to
  134. do that, run "make install" in the zlib directory first if necessary).
  135. Some also allow you to run "make test-installed" after you have
  136. run "make install".
  137. If you encounter a compiler error message complaining about the
  138. lines
  139. __png.h__ already includes setjmp.h;
  140. __dont__ include it again.;
  141. This means you have compiled another module that includes setjmp.h,
  142. which is hazardous because the two modules might not include exactly
  143. the same setjmp.h. If you are sure that you know what you are doing
  144. and that they are exactly the same, then you can comment out or
  145. delete the two lines. Better yet, use the cexcept interface
  146. instead, as demonstrated in contrib/visupng of the libpng distribution.
  147. Further information can be found in the README and libpng.txt
  148. files, in the individual makefiles, in png.h, and the manual pages
  149. libpng.3 and png.5.