~ubuntu-branches/ubuntu/lucid/perl-tk/lucid

« back to all changes in this revision

Viewing changes to PNG/libpng/INSTALL

  • Committer: Bazaar Package Importer
  • Author(s): Colin Tuckley
  • Date: 2008-02-15 13:56:59 UTC
  • mfrom: (1.1.3 upstream) (4.1.1 hardy)
  • Revision ID: james.westby@ubuntu.com-20080215135659-ru2oqlykuju20fav
Tags: 1:804.028-1
* New Upstream Release (Closes: #463080).
* Update to Debhelper v5.
* Build with XFT=1 (Closes: #411129).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
 
Installing libpng version 1.2.5 - October 3, 2002
3
 
 
4
 
Before installing libpng, you must first install zlib.  zlib
5
 
can usually be found wherever you got libpng.  zlib can be
6
 
placed in another directory, at the same level as libpng.
7
 
Note that your system might already have a preinstalled
8
 
zlib, but you will still need to have access to the
9
 
zlib.h and zconf.h include files that correspond to the
10
 
version of zlib that's installed.
 
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.
11
38
 
12
39
You can rename the directories that you downloaded (they
13
 
might be called "libpng-1.2.5" or "lpng109" and "zlib-1.1.4"
14
 
or "zlib114") so that you have directories called "zlib" and "libpng".
 
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".
15
42
 
16
43
Your directory structure should look like this:
17
44
 
23
50
          *.c
24
51
          contrib
25
52
             gregbook
26
 
             msvctest
27
53
             pngminus
28
54
             pngsuite
29
55
             visupng
30
56
          projects
31
57
             beos
32
 
             borland
33
 
             msvc
 
58
             c5builder (Borland)
 
59
             visualc6 (msvc)
34
60
             netware.txt
35
61
             wince.txt
36
62
          scripts
37
63
             makefile.*
38
 
             libpng*.in
39
64
          pngtest.png
40
65
          etc.
41
66
      zlib
49
74
distribution of libpng.  It is available in both tar.gz (UNIX style line
50
75
endings) and zip (DOS style line endings) formats.
51
76
 
52
 
If you are building libpng with MSVC, you can enter the libpng\msvc directory
53
 
and follow the instructions in msvc\README.txt.
 
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.
54
80
 
55
 
You can build libpng for WindowsCE by entering the downloading and installing
56
 
the libpng\wince directory as instructed in the projects\wince.txt file, and
 
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
57
83
then following the instructions in the README* files.  Similarly, you can
58
 
build libpng for Netware as instructed in projects\netware.txt.
 
84
build libpng for Netware or Beos as instructed in projects\netware.txt
 
85
or projects\beos.
59
86
 
60
87
Else enter the zlib directory and follow the instructions in zlib/README,
61
 
then come back here and choose the appropriate makefile.sys in the scripts
62
 
directory.
 
88
then come back here and run "configure" or choose the appropriate
 
89
makefile.sys in the scripts directory.
63
90
 
64
91
The files that are presently available in the scripts directory
65
92
include
66
93
 
67
94
 makefile.std      =>  Generic UNIX makefile (cc, creates static libpng.a)
68
 
 makefile.linux    =>  Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.5)
69
 
 makefile.gcmmx    =>  Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.5,
 
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,
70
101
                       uses assembler code tuned for Intel MMX platform)
71
102
 makefile.gcc      =>  Generic makefile (gcc, creates static libpng.a)
72
103
 makefile.knr      =>  Archaic UNIX Makefile that converts files with
74
105
                       ftp://ftp.cs.wisc.edu/ghost)
75
106
 makefile.aix      =>  AIX/gcc makefile
76
107
 makefile.cygwin   =>  Cygwin/gcc makefile
77
 
 makefile.darwin   =>  Darwin makefile
 
108
 makefile.darwin   =>  Darwin makefile, can use on MacosX
78
109
 makefile.dec      =>  DEC Alpha UNIX makefile
79
 
 makefile.hpgcc    =>  FreeBSD makefile
 
110
 makefile.freebsd  =>  FreeBSD makefile
80
111
 makefile.hpgcc    =>  HPUX makefile using gcc
81
112
 makefile.hpux     =>  HPUX (10.20 and 11.00) makefile
 
113
 makefile.hp64     =>  HPUX (10.20 and 11.00) makefile, 64-bit
82
114
 makefile.ibmc     =>  IBM C/C++ version 3.x for Win32 and OS/2 (static)
83
115
 makefile.intel    =>  Intel C/C++ version 4.0 and later
84
116
 libpng.icc        =>  Project file for IBM VisualAge/C++ version 4.0 or later
85
 
 makefile.macosx   =>  MACOS X Makefile
86
117
 makefile.netbsd   =>  NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so.
87
 
 makefile.ne0bsd  =>  NetBSD/cc makefile, uses PNGGCCRD, makes libpng0.so
 
118
 makefile.ne12bsd  =>  NetBSD/cc makefile, uses PNGGCCRD,
 
119
                       makes libpng12.so
88
120
 makefile.openbsd  =>  OpenBSD makefile
89
121
 makefile.sgi      =>  Silicon Graphics IRIX makefile (cc, creates static lib)
90
 
 makefile.sggcc    =>  Silicon Graphics (gcc, creates libpng12.so.0.1.2.5)
 
122
 makefile.sggcc    =>  Silicon Graphics (gcc,
 
123
                       creates libpng12.so.0.1.2.12)
91
124
 makefile.sunos    =>  Sun makefile
92
 
 makefile.solaris  =>  Solaris 2.X makefile (gcc, creates libpng12.so.0.1.2.5)
93
 
 makefile.so9      =>  Solaris 9 makefile (gcc, creates libpng12.so.0.1.2.5)
 
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)
94
129
 makefile.32sunu   =>  Sun Ultra 32-bit makefile
95
130
 makefile.64sunu   =>  Sun Ultra 64-bit makefile
96
131
 makefile.sco      =>  For SCO OSr5  ELF and Unixware 7 with Native cc
103
138
 makefile.beos     =>  BEOS makefile for X86
104
139
 makefile.bor      =>  Borland makefile (uses bcc)
105
140
 makefile.bc32     =>  32-bit Borland C++ (all modules compiled in C mode)
106
 
 makefile.bd32     =>  To make a png32bd.dll with Borland C++ 4.5
107
141
 makefile.tc3      =>  Turbo C 3.0 makefile
108
142
 makefile.dj2      =>  DJGPP 2 makefile
109
143
 makefile.msc      =>  Microsoft C makefile
116
150
 makefile.watcom   =>  Watcom 10a+ Makefile, 32-bit flat memory model
117
151
 makevms.com       =>  VMS build script
118
152
 descrip.mms       =>  VMS makefile for MMS or MMK
119
 
 pngdef.pas        =>  Defines for a png32bd.dll with Borland C++ 4.5
120
153
 SCOPTIONS.ppc     =>  Used with smakefile.ppc
121
154
 
122
155
Copy the file (or files) that you need from the
131
164
Then read pngconf.h to see if you want to make any configuration
132
165
changes.
133
166
 
134
 
Then just run "make test" which will create the libpng library in
135
 
this directory and run a quick test that reads the "pngtest.png"
136
 
file and writes a "pngout.png" file that should be identical to it.
137
 
Look for "9782 zero samples" in the output of the test.  For more
138
 
confidence, you can run another test by typing "pngtest pngnow.png"
139
 
and looking for "289 zero samples" in the output.  Also, you can
140
 
run "pngtest -m *.png" in the "contrib/pngsuite" directory and compare
 
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
141
174
your output with the result shown in contrib/pngsuite/README.
142
175
 
143
176
Most of the makefiles will allow you to run "make install" to
146
179
Some also allow you to run "make test-installed" after you have
147
180
run "make install".
148
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
 
149
193
Further information can be found in the README and libpng.txt
150
 
files, in the individual makefiles, in png.h, in the README files in
151
 
subdirectories of the LIB directory, and the manual pages libpng.3 and png.5.
 
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