INSTALL 8.1 KB

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