File: BuildSource.txt

package info (click to toggle)
mp4v2 2.0.0~dfsg0-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,616 kB
  • ctags: 4,288
  • sloc: cpp: 32,148; sh: 10,293; ansic: 1,581; makefile: 21
file content (561 lines) | stat: -rw-r--r-- 18,574 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
MP4v2 2.0.0 Building the Source
*******************************

Table of Contents
*****************

1 Overview
2 Introduction
3 Quickstart
4 Build Process
  4.1 Extract
  4.2 Configure
  4.3 Build
  4.4 Install
5 Platform Notes
  5.1 Mac OS X
    5.1.1 Default Binaries
    5.1.2 Release Binaries
    5.1.3 Developer Binaries
    5.1.4 Universal Binaries - all architectures
    5.1.5 Universal Binaries - selected architectures
  5.2 Linux
    5.2.1 Default Binaries
    5.2.2 Release Binaries
    5.2.3 Developer Binaries
    5.2.4 Bi-arch compilation
  5.3 FreeBSD
    5.3.1 Default Binaries
    5.3.2 Release Binaries
    5.3.3 Developer Binaries
    5.3.4 Bi-arch compilation
  5.4 Solaris
    5.4.1 Default Binaries
    5.4.2 Release Binaries
    5.4.3 Developer Binaries
    5.4.4 Bi-arch compilation
  5.5 Cygwin
    5.5.1 Default Binaries
    5.5.2 Release Binaries
    5.5.3 Developer Binaries
  5.6 Windows


1 Overview
**********

The documented and supported method to build MP4v2 uses the GNU build
system (also known as the Autotools). You must first obtain the sources
by either downloading and extracting the source-distribution bundle or
working directly MP4v2's Subversion repository. We have build documents
for both methods, but unless you are a member of the MP4v2 project, you
are strongly encouraged to use the source-distribution method.

On other supported platforms which lack Autotools we provide an
alternative method for building the software. Please see the
appropriate platform section.

2 Introduction
**************

This document describes the recommended process to build MP4v2 from a
source-distribution bundle. This process is a subset of the process to
build directly from the project's repository. If you are interested in
building from the repository then this document is not for you.

3 Quickstart
************

This chapter is for the impatient or those just looking for a quick
summary of all the commands used in a typical build. You may skip this
summary and jump to *note Build Process::.

     tar xf mp4v2-2.0.0.tar.bz2
     cd mp4v2-2.0.0/
     rm -fr build/
     mkdir build/
     cd build/
     ../configure
     make
     make install
     make install-man

4 Build Process
***************

4.1 Extract
===========

Extract sources from a source-distribution bundle. Releases are
available from `http://code.google.com/p/mp4v2' in the downloads
(http://code.google.com/p/mp4v2/downloads/list) section.

     tar xf mp4v2-2.0.0.tar.bz2
     cd mp4v2-2.0.0/

Older versions of `tar' may not automatically uncompress the bundle, so
you might have to either enter additional flags manually, or first
decompress the bundle before extracting. Some possible command
variations for uncompressing a `bz2' file:

     tar xjf mp4v2-2.0.0.tar.bz2
     bunzip2 -c mp4v2-2.0.0.tar.bz2 | tar xf -
     bzcat mp4v2-2.0.0.tar.bz2 | tar xf -

And for a `gz' file:

     tar xzf mp4v2-2.0.0.tar.gz
     gunzip -c mp4v2-2.0.0.tar.gz | tar xf -
     gzcat mp4v2-2.0.0.tar.gz | tar xf -

4.2 Configure
=============

The following command configures the project for a build.  It is highly
recommended that you invoke configure from an empty directory.

     rm -fr build/
     mkdir build/
     cd build/
     ../configure

Please see `INSTALL' for details on configure usage, and standard
options. Additionally, the following custom options have been added to
`configure':

`--disable-debug'
     Do not generate debug information.  Do not direct compiler to
     generate debugging information. By default the compiler will
     generate debug information if the platform supports it.

`--disable-optimize'
     Do not optimize. Do not direct compiler to optimize code. By
     default compiler optimization is enabled if the platform supports
     it.

`--disable-fvisibility'
     Do not set default ELF symbol visibility. By default configure
     attempts to detect if the compiler supports this feature. However
     on some platforms detecting incompatibilty of this feature might
     not be accurate in which case this option should be given.

`--disable-gch'
     By default certain platforms are marked to use GCC precompiled
     headers. Generally this greatly decrease build times but may
     require more diligence for iterative development; that is to say
     dependencies may not properly be tracked and more frequent `make
     clean' may be required when headers are changed. Use this option
     to disable GCC precompiled headers.

`--disable-largefile'
     On some 32-bit platforms or configurations it might be desirable
     to build without largefile (LFS) support. By default configure
     attempts to detect formal LFS support and enables it if found.

`--disable-util'
     Do not build/install utilities. This is convenience option for
     users who desire to skip building the utilities (eg. command-line
     executables) which are enabled by default.

`--enable-bi=ARCH'
     On bi-arch capable platforms it is possible to generate 32 or 64
     bit code. This is supported by adding arguments `-m32' or `-m64',
     respectively, when compiling or linking. Use this option to
     override the platform-specific default.

`--enable-ub[=ARCHS]'
     On OSX systems it is possible to generate universal binaries. This
     is supported by adding one or more argument patterns `-arch ARCH'
     when compiling or linking. Use this option to either target an
     architecture different from the platform default, or to produce
     universal binaries.

`--enable-dependency-tracking'
     Enable automatic dependency tracking for include-files. By default
     this feature is disabled.


4.3 Build
=========

The following command will build MP4v2.

     make

On some platforms `make' refers to a BSD-flavor of make which is not
compatible with this project. Check if `gmake' is installed, and if it
is, substitute `gmake' wherever you may see `make' in this document.
Otherwise you will need to install GNU make package version 3.81 or
higher. Lower versions might work.

4.4 Install
===========

The following command will install MP4v2.

     make install
     make install-man

5 Platform Notes
****************

MP4v2 builds on many unix-style platforms, also commonly referred to as
posix-style systems. Building on Mac OS X, Linux, FreeBSD, Solaris,
Cygwin, Windows are known to work.

Similar platforms should also work. Please see the following platform
specific notes for instructions on commonly used options for various
platforms.

5.1 Mac OS X
============

Building on Mac OS X is well supported as it is used by maintainers of
this project. The following are the recommended specifications for this
platform; but is not necessarily the only configuration that is
possible:

   * Mac Intel hardware

   * Mac OS X 10.5.7

   * Xcode-3.1.2

   * gcc 4.0.1 (Apple Inc. build 5493)

   * gcc 4.2.1 (Apple Inc. build 5570)

     Note: It is recommended to use the platform distribution's bundled
     compiler for maximum C++ compatibility. If you build with a custom
     compiler it will likely introduce non-standard runtime
     requirements for your users. There are of course many valid
     reasons to build with unbundled compilers, but be aware that is
     generally unsupported and left as an exercise to the reader.

5.1.1 Default Binaries
----------------------

The preferred method to produce default binaries is to run configure
without any options which will compile with debug+optimize and produce
static+shared libraries and dynamic executables.

     ../configure

5.1.2 Release Binaries
----------------------

The preferred method to produce binaries suitable for releases, (ie.
which does not contain debug information) is to pass the following to
configure:

     ../configure --disable-debug

5.1.3 Developer Binaries
------------------------

The preferred method to produce binaries suitable for development is to
pass the following to configure.  Default Binaries will work, however
for the best debugging experience we recommend no optimize and no
static libraries.

     ../configure --disable-optimize --disable-static

5.1.4 Universal Binaries - all architectures
--------------------------------------------

The preferred method to produce universal binaries for all supported
architectures is to pass the following option to configure. As of this
writing, architectures { i386, x86_64, ppc, ppc64 } are built.

     ../configure --enable-ub

5.1.5 Universal Binaries - selected architectures
-------------------------------------------------

The preferred method to produce universal binaries for selected
architectures is to specify a comma-delimited list specifying the
desired architecture identifiers. Passing the following option will
produce universal binaries for architectures { i386, x86_64 }.

     ../configure --enable-ub=i386,x86_64

5.2 Linux
=========

Building on Linux is well supported as it is used by maintainers of
this project. The following are the recommended specifications for this
platform; but is not necessarily the only configuration that is
possible:

   * Intel 32-bit or 64-bit hardware

   * Fedora 10, gcc 4.3.2

   * gcc 3.4.0 or higher is reported to work

     Note: It is recommended to use the platform distribution's bundled
     compiler for maximum C++ compatibility. If you build with a custom
     compiler it will likely introduce non-standard runtime
     requirements for your users. There are of course many valid
     reasons to build with unbundled compilers, but be aware that is
     generally unsupported and left as an exercise to the reader.

5.2.1 Default Binaries
----------------------

The preferred method to produce default binaries is to run configure
without any options which will compile with debug+optimize and produce
static+shared libraries and dynamic executables.

     ../configure

5.2.2 Release Binaries
----------------------

The preferred method to produce binaries suitable for releases, (ie.
which does not contain debug information) is to pass the following to
configure:

     ../configure --disable-debug

5.2.3 Developer Binaries
------------------------

The preferred method to produce binaries suitable for development is to
pass the following to configure.  Default Binaries will work, however
for the best debugging experience we recommend no optimize and no
static libraries.

     ../configure --disable-optimize --disable-static

5.2.4 Bi-arch compilation
-------------------------

The preferred method to produce a bi-arch binary is to specify the
target (eg. 32-bit) with the following option to configure. This
example will produce a 32-bit binary if compiling on a platform which
defaults to producing 64-bit binaries. The inverse is also possible.

     ../configure --enable-bi=32

     Warning: Currently bi-arch cross-compilation is not supported due
     to a bug with libtool which fails miserably during linking.

5.3 FreeBSD
===========

Building on FreeBSD is supported. The following are the recommended
specifications for this platform; but is not necessarily the only
configuration that is possible:

   * Intel 32-bit or 64-bit hardware

   * FreeBSD 7.0 Release, gcc 4.2.1

   * gcc 3.4.0 or higher is reported to work

     Note: It is recommended to use the platform distribution's bundled
     compiler for maximum C++ compatibility. If you build with a custom
     compiler it will likely introduce non-standard runtime
     requirements for your users. There are of course many valid
     reasons to build with unbundled compilers, but be aware that is
     generally unsupported and left as an exercise to the reader.

5.3.1 Default Binaries
----------------------

The preferred method to produce default binaries is to run configure
without any options which will compile with debug+optimize and produce
static+shared libraries and dynamic executables.

     ../configure

5.3.2 Release Binaries
----------------------

The preferred method to produce binaries suitable for releases, (ie.
which does not contain debug information) is to pass the following to
configure:

     ../configure --disable-debug

5.3.3 Developer Binaries
------------------------

The preferred method to produce binaries suitable for development is to
pass the following to configure.  Default Binaries will work, however
for the best debugging experience we recommend no optimize and no
static libraries.

     ../configure --disable-optimize --disable-static

5.3.4 Bi-arch compilation
-------------------------

The preferred method to produce a bi-arch binary is to specify the
target (eg. 32-bit) with the following option to configure. This
example will produce a 32-bit binary if compiling on a platform which
defaults to producing 64-bit binaries. The inverse is also possible.

     ../configure --enable-bi=32

     Warning: Currently bi-arch cross-compilation is not supported due
     to a bug with libtool which fails miserably during linking.

5.4 Solaris
===========

Building on Solaris is supported. The following are the recommended
specifications for this platform; but is not necessarily the only
configuration that is possible:

   * Intel 32-bit or 64-bit hardware

   * Solaris 10u6, gcc 3.4.3

   * gcc 3.4.0 or higher is reported to work

     Note: It is recommended to use the platform distribution's bundled
     compiler for maximum C++ compatibility. If you build with a custom
     compiler it will likely introduce non-standard runtime
     requirements for your users. There are of course many valid
     reasons to build with unbundled compilers, but be aware that is
     generally unsupported and left as an exercise to the reader.

     Note: Solaris does not (yet) really bundle a compiler. The
     recommendation is to use the companion-disk compiler for maximum
     C++ runtime compatibility. It is usually found in `/usr/sfw/bin'.

5.4.1 Default Binaries
----------------------

The preferred method to produce default binaries is to run configure
without any options which will compile with debug+optimize and produce
static+shared libraries and dynamic executables.

     ../configure

5.4.2 Release Binaries
----------------------

The preferred method to produce binaries suitable for releases, (ie.
which does not contain debug information) is to pass the following to
configure:

     ../configure --disable-debug

5.4.3 Developer Binaries
------------------------

The preferred method to produce binaries suitable for development is to
pass the following to configure.  Default Binaries will work, however
for the best debugging experience we recommend no optimize and no
static libraries.

     ../configure --disable-optimize --disable-static

5.4.4 Bi-arch compilation
-------------------------

The preferred method to produce a bi-arch binary is to specify the
target (eg. 32-bit) with the following option to configure. This
example will produce a 32-bit binary if compiling on a platform which
defaults to producing 64-bit binaries. The inverse is also possible.

     ../configure --enable-bi=32

     Warning: Currently bi-arch cross-compilation is not supported due
     to a bug with libtool which fails miserably during linking.

5.5 Cygwin
==========

Building on Cygwin is supported. The following are the recommended
specifications for this platform; but is not necessarily the only
configuration that is possible:

   * Intel 32-bit or 64-bit hardware

   * Cygwin, gcc 4.3.2

   * gcc 3.4.0 or higher is reported to work

     Note: As of this writing, Cygwin has available to it several
     versions of gcc; only one of which may be found and used in the
     path as `gcc' and `g++'. Configure will thus find what is probably
     the older more stable version of gcc in a typical Cygwin
     environment. If you desire to build with the newer gcc, it is
     found in the path as `gcc-4' and `g++-4' respectively and you must
     indicate to configure the desired versions. Defining the following
     variables beforing running configure should do the trick:

     setenv CC gcc-4
     setenv CXX gcc-4
     ../configure

5.5.1 Default Binaries
----------------------

The preferred method to produce default binaries is to run configure
without any options which will compile with debug+optimize and produce
static+shared libraries and dynamic executables.

     ../configure

5.5.2 Release Binaries
----------------------

The preferred method to produce binaries suitable for releases, (ie.
which does not contain debug information) is to pass the following to
configure:

     ../configure --disable-debug

5.5.3 Developer Binaries
------------------------

The preferred method to produce binaries suitable for development is to
pass the following to configure.  Default Binaries will work, however
for the best debugging experience we recommend no optimize and no
static libraries.

     ../configure --disable-optimize --disable-static

5.6 Windows
===========

Native builds on Windows is supported via Microsoft's Visual Studio
package. Both the commercial version and free version (express) are
known to work. The following are the recommended specifications for
this platform; but is not necessarily the only configuration that is
possible:

   * Intel 32-bit or 64-bit hardware

   * Windows 2000 or higher, Visual Studio 9.0 (aka. Visual Studio 2008)

   * Visual Studio 9.0 Express is reported to work

Only 32-bit binaries are targeted, and win32-API is set to Windows 2000
or higher. Older versions of Windows, or win32-API are not supported.

MP4v2 has directory `vstudio9.0/' which contains the necessary
solution+project files to produce a basic build of libmp4v2's DLL and
several command-line executables. Enabling things such as debugging,
optimization, etc, are all left as an exercise to the user.

     Warning: Project meta-data is stored in header `project.h'. A
     proper source distribution is built using autotools and generates
     `TOP/include/mp4v2/project.h' correctly, which is then bundled
     with our source distribution. This is adequate for building on the
     Windows platform.

     However, if you are building from the repository, be warned that
     there is no method to automatically generate `project.h' on
     Windows. Instead, we periodically checkin a copy of this file
     (generated using autotools) as
     `vstudio9.0/include/mp4v2/project.h' which may from time to time
     get out of date. If it is significantly out of date, you should
     find the latest source distribution and copy the `project.h' from
     there.