Debian Codegraph @

PNG/libpng/INSTALL

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