From b2ba4403aab430c4b1bdb4304b62860a7ebb854b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 29 Sep 2024 20:41:15 +0200 Subject: Remove mp4v2, which is no longer required. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- debian/mp4v2/mp4v2-2.0.0~dfsg0/COPYING | 458 - debian/mp4v2/mp4v2-2.0.0~dfsg0/GNUmakefile.am | 322 - debian/mp4v2/mp4v2-2.0.0~dfsg0/GNUmakefile.in | 1878 -- debian/mp4v2/mp4v2-2.0.0~dfsg0/INSTALL | 237 - debian/mp4v2/mp4v2-2.0.0~dfsg0/README | 5 - debian/mp4v2/mp4v2-2.0.0~dfsg0/aclocal.m4 | 8917 ---------- .../mp4v2/mp4v2-2.0.0~dfsg0/autoaux/config.guess | 1533 -- debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/config.sub | 1693 -- debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/depcomp | 630 - debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/install-sh | 520 - debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/ltmain.sh | 8413 --------- debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/missing | 376 - debian/mp4v2/mp4v2-2.0.0~dfsg0/configure | 17429 ------------------- debian/mp4v2/mp4v2-2.0.0~dfsg0/configure.ac | 419 - debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/changelog | 109 - debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/compat | 1 - debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/control | 98 - debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/copyright | 517 - debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/gbp.conf | 8 - .../mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-2.docs | 3 - .../mp4v2-2.0.0~dfsg0/debian/libmp4v2-2.install | 1 - .../mp4v2-2.0.0~dfsg0/debian/libmp4v2-dev.install | 2 - .../mp4v2-2.0.0~dfsg0/debian/mp4v2-utils.install | 2 - .../patches/0001-Fix_mp4tags_corruption.patch | 20 - .../debian/patches/0002-Fix_m4_error.patch | 27 - .../debian/patches/0003-Reproducible_build.patch | 20 - .../debian/patches/0004-Fix_ftbfs_with_gcc7.diff | 13 - .../debian/patches/0005-Fix_FTBFS_narrowing.diff | 79 - .../debian/patches/0006-Fix_FTBFS_with_cxx11.diff | 23 - .../mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/series | 6 - debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.local | 2 - debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.sh | 161 - debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.stub | 82 - debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/rules | 31 - .../mp4v2/mp4v2-2.0.0~dfsg0/debian/source/format | 1 - .../mp4v2/mp4v2-2.0.0~dfsg0/debian/source/options | 3 - debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/watch | 4 - debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/Authors.txt | 22 - .../mp4v2-2.0.0~dfsg0/doc/BuildRepository.txt | 720 - debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/BuildSource.txt | 561 - .../mp4v2/mp4v2-2.0.0~dfsg0/doc/Documentation.txt | 33 - debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/GNUmakefile.mk | 387 - .../mp4v2/mp4v2-2.0.0~dfsg0/doc/ReleaseNotes.txt | 127 - debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/ToolGuide.txt | 415 - .../mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4art.1 | 98 - .../mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4file.1 | 75 - .../mp4v2-2.0.0~dfsg0/doc/man/man1/mp4subtitle.1 | 87 - .../mp4v2-2.0.0~dfsg0/doc/man/man1/mp4track.1 | 161 - .../mp4v2-2.0.0~dfsg0/include/mp4v2/chapter.h | 176 - .../mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/file.h | 362 - .../mp4v2-2.0.0~dfsg0/include/mp4v2/file_prop.h | 148 - .../mp4v2-2.0.0~dfsg0/include/mp4v2/general.h | 495 - .../mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/isma.h | 96 - .../mp4v2-2.0.0~dfsg0/include/mp4v2/itmf_generic.h | 207 - .../mp4v2-2.0.0~dfsg0/include/mp4v2/itmf_tags.h | 289 - .../mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/mp4v2.h | 83 - .../mp4v2-2.0.0~dfsg0/include/mp4v2/platform.h | 95 - .../mp4v2-2.0.0~dfsg0/include/mp4v2/project.h | 31 - .../mp4v2-2.0.0~dfsg0/include/mp4v2/project.h.in | 31 - .../mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/sample.h | 557 - .../mp4v2-2.0.0~dfsg0/include/mp4v2/streaming.h | 163 - .../mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/track.h | 451 - .../mp4v2-2.0.0~dfsg0/include/mp4v2/track_prop.h | 337 - .../mp4v2-2.0.0~dfsg0/libplatform/config.h.in | 65 - .../mp4v2/mp4v2-2.0.0~dfsg0/libplatform/endian.h | 42 - debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/impl.h | 13 - .../mp4v2-2.0.0~dfsg0/libplatform/io/File.cpp | 185 - .../mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File.h | 208 - .../libplatform/io/FileSystem.cpp | 103 - .../mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem.h | 215 - .../libplatform/io/FileSystem_posix.cpp | 65 - .../libplatform/io/FileSystem_win32.cpp | 146 - .../libplatform/io/File_posix.cpp | 109 - .../libplatform/io/File_win32.cpp | 258 - .../mp4v2-2.0.0~dfsg0/libplatform/number/random.h | 18 - .../libplatform/number/random_posix.cpp | 24 - .../libplatform/number/random_win32.cpp | 24 - .../mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform.h | 43 - .../mp4v2-2.0.0~dfsg0/libplatform/platform_base.h | 34 - .../mp4v2-2.0.0~dfsg0/libplatform/platform_posix.h | 77 - .../mp4v2-2.0.0~dfsg0/libplatform/platform_win32.h | 93 - .../libplatform/process/process.h | 16 - .../libplatform/process/process_posix.cpp | 15 - .../libplatform/process/process_win32.cpp | 16 - .../mp4v2-2.0.0~dfsg0/libplatform/prog/option.cpp | 637 - .../mp4v2-2.0.0~dfsg0/libplatform/prog/option.h | 174 - .../mp4v2-2.0.0~dfsg0/libplatform/sys/error.cpp | 31 - .../mp4v2-2.0.0~dfsg0/libplatform/sys/error.h | 16 - .../mp4v2-2.0.0~dfsg0/libplatform/time/time.cpp | 15 - .../mp4v2-2.0.0~dfsg0/libplatform/time/time.h | 48 - .../libplatform/time/time_posix.cpp | 19 - .../libplatform/time/time_win32.cpp | 18 - .../mp4v2/mp4v2-2.0.0~dfsg0/libplatform/warning.h | 30 - .../mp4v2/mp4v2-2.0.0~dfsg0/libutil/Database.cpp | 225 - debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Database.h | 105 - .../mp4v2/mp4v2-2.0.0~dfsg0/libutil/Timecode.cpp | 591 - debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Timecode.h | 119 - .../mp4v2-2.0.0~dfsg0/libutil/TrackModifier.cpp | 503 - .../mp4v2-2.0.0~dfsg0/libutil/TrackModifier.h | 160 - debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Utility.cpp | 758 - debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Utility.h | 205 - debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/crc.cpp | 110 - debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/crc.h | 38 - debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/impl.h | 10 - debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/other.cpp | 106 - debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/other.h | 40 - debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/util.h | 34 - debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4 | 25 - .../mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4.in | 25 - .../mp4v2-2.0.0~dfsg0/project/project.m4sugar | 15 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/3gp.cpp | 69 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ac3.cpp | 71 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_amr.cpp | 75 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_avc1.cpp | 93 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_avcC.cpp | 273 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_chpl.cpp | 65 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_colr.cpp | 55 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_d263.cpp | 98 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_dac3.cpp | 245 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_damr.cpp | 69 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_dref.cpp | 67 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_elst.cpp | 89 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_enca.cpp | 71 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_encv.cpp | 91 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_free.cpp | 56 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ftab.cpp | 42 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ftyp.cpp | 62 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_gmin.cpp | 58 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hdlr.cpp | 95 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hinf.cpp | 64 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hnti.cpp | 50 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_href.cpp | 50 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mdat.cpp | 48 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mdhd.cpp | 98 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_meta.cpp | 153 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mp4s.cpp | 49 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mp4v.cpp | 91 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mvhd.cpp | 146 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_nmhd.cpp | 35 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ohdr.cpp | 106 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_pasp.cpp | 52 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_root.cpp | 160 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_rtp.cpp | 158 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_s263.cpp | 88 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sdp.cpp | 63 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sdtp.cpp | 47 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_smi.cpp | 50 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sound.cpp | 139 - .../mp4v2/mp4v2-2.0.0~dfsg0/src/atom_standard.cpp | 420 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stbl.cpp | 66 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stdp.cpp | 59 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsc.cpp | 88 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsd.cpp | 85 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsz.cpp | 79 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stz2.cpp | 108 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_text.cpp | 147 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tfhd.cpp | 79 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tkhd.cpp | 145 - .../mp4v2/mp4v2-2.0.0~dfsg0/src/atom_treftype.cpp | 57 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_trun.cpp | 89 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tx3g.cpp | 73 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_udta.cpp | 56 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_url.cpp | 73 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_urn.cpp | 54 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_uuid.cpp | 50 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_video.cpp | 88 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_vmhd.cpp | 46 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atoms.h | 829 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/bmff.h | 43 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/impl.h | 34 - .../mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/typebmff.cpp | 531 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/typebmff.h | 528 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/cmeta.cpp | 1558 -- debian/mp4v2/mp4v2-2.0.0~dfsg0/src/descriptors.cpp | 616 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/descriptors.h | 178 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/enum.h | 110 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/enum.tcc | 121 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/exception.cpp | 96 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/exception.h | 70 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/impl.h | 10 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/isma.cpp | 967 - .../mp4v2-2.0.0~dfsg0/src/itmf/CoverArtBox.cpp | 261 - .../mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/CoverArtBox.h | 121 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/Tags.cpp | 897 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/Tags.h | 210 - .../mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/generic.cpp | 476 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/generic.h | 66 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/impl.h | 34 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/itmf.h | 45 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/type.cpp | 314 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/type.h | 296 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/log.cpp | 534 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/log.h | 93 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4.cpp | 4563 ----- debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4array.h | 145 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4atom.cpp | 1017 -- debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4atom.h | 263 - .../mp4v2/mp4v2-2.0.0~dfsg0/src/mp4container.cpp | 228 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4container.h | 94 - .../mp4v2/mp4v2-2.0.0~dfsg0/src/mp4descriptor.cpp | 215 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4descriptor.h | 104 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file.cpp | 4364 ----- debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file.h | 991 -- debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file_io.cpp | 581 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4info.cpp | 625 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4property.cpp | 1190 -- debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4property.h | 663 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4track.cpp | 1910 -- debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4track.h | 294 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4util.cpp | 352 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4util.h | 113 - .../mp4v2/mp4v2-2.0.0~dfsg0/src/ocidescriptors.cpp | 320 - .../mp4v2/mp4v2-2.0.0~dfsg0/src/ocidescriptors.h | 151 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/odcommands.cpp | 113 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/odcommands.h | 83 - .../mp4v2/mp4v2-2.0.0~dfsg0/src/qosqualifiers.cpp | 174 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qosqualifiers.h | 65 - .../src/qtff/ColorParameterBox.cpp | 345 - .../mp4v2-2.0.0~dfsg0/src/qtff/ColorParameterBox.h | 207 - .../src/qtff/PictureAspectRatioBox.cpp | 313 - .../src/qtff/PictureAspectRatioBox.h | 188 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/coding.cpp | 95 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/coding.h | 37 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/impl.h | 34 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/qtff.h | 45 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/rtphint.cpp | 1358 -- debian/mp4v2/mp4v2-2.0.0~dfsg0/src/rtphint.h | 362 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/src.h | 52 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/text.cpp | 41 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/text.h | 17 - debian/mp4v2/mp4v2-2.0.0~dfsg0/src/util.h | 82 - debian/mp4v2/mp4v2-2.0.0~dfsg0/util/impl.h | 10 - debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4art.cpp | 438 - debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4chaps.cpp | 1157 -- debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4extract.cpp | 252 - debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4file.cpp | 224 - debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4info.cpp | 249 - .../mp4v2/mp4v2-2.0.0~dfsg0/util/mp4subtitle.cpp | 209 - debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4tags.cpp | 599 - debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4track.cpp | 997 -- .../mp4v2/mp4v2-2.0.0~dfsg0/util/mp4trackdump.cpp | 242 - debian/mp4v2/mp4v2_2.0.0~dfsg0.orig.tar.bz2 | Bin 496887 -> 0 bytes 242 files changed, 96538 deletions(-) delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/COPYING delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/GNUmakefile.am delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/GNUmakefile.in delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/INSTALL delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/README delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/aclocal.m4 delete mode 100755 debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/config.guess delete mode 100755 debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/config.sub delete mode 100755 debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/depcomp delete mode 100755 debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/install-sh delete mode 100755 debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/ltmain.sh delete mode 100755 debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/missing delete mode 100755 debian/mp4v2/mp4v2-2.0.0~dfsg0/configure delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/configure.ac delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/changelog delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/compat delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/control delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/copyright delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/gbp.conf delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-2.docs delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-2.install delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-dev.install delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/mp4v2-utils.install delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0001-Fix_mp4tags_corruption.patch delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0002-Fix_m4_error.patch delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0003-Reproducible_build.patch delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0004-Fix_ftbfs_with_gcc7.diff delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0005-Fix_FTBFS_narrowing.diff delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0006-Fix_FTBFS_with_cxx11.diff delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/series delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.local delete mode 100755 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.sh delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.stub delete mode 100755 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/rules delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/source/format delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/source/options delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/watch delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/Authors.txt delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/BuildRepository.txt delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/BuildSource.txt delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/Documentation.txt delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/GNUmakefile.mk delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/ReleaseNotes.txt delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/ToolGuide.txt delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4art.1 delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4file.1 delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4subtitle.1 delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4track.1 delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/chapter.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/file.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/file_prop.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/general.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/isma.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/itmf_generic.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/itmf_tags.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/mp4v2.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/platform.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/project.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/project.h.in delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/sample.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/streaming.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/track.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/track_prop.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/config.h.in delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/endian.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/impl.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem_posix.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem_win32.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File_posix.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File_win32.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random_posix.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random_win32.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_base.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_posix.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_win32.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process_posix.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process_win32.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/prog/option.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/prog/option.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/sys/error.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/sys/error.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time_posix.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time_win32.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/warning.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Database.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Database.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Timecode.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Timecode.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/TrackModifier.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/TrackModifier.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Utility.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Utility.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/crc.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/crc.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/impl.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/other.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/other.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/util.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4 delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4.in delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4sugar delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/3gp.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ac3.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_amr.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_avc1.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_avcC.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_chpl.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_colr.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_d263.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_dac3.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_damr.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_dref.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_elst.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_enca.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_encv.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_free.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ftab.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ftyp.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_gmin.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hdlr.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hinf.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hnti.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_href.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mdat.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mdhd.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_meta.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mp4s.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mp4v.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mvhd.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_nmhd.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ohdr.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_pasp.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_root.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_rtp.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_s263.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sdp.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sdtp.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_smi.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sound.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_standard.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stbl.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stdp.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsc.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsd.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsz.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stz2.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_text.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tfhd.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tkhd.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_treftype.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_trun.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tx3g.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_udta.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_url.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_urn.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_uuid.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_video.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_vmhd.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atoms.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/bmff.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/impl.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/typebmff.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/typebmff.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/cmeta.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/descriptors.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/descriptors.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/enum.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/enum.tcc delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/exception.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/exception.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/impl.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/isma.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/CoverArtBox.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/CoverArtBox.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/Tags.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/Tags.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/generic.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/generic.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/impl.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/itmf.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/type.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/type.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/log.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/log.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4array.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4atom.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4atom.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4container.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4container.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4descriptor.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4descriptor.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file_io.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4info.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4property.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4property.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4track.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4track.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4util.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4util.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/ocidescriptors.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/ocidescriptors.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/odcommands.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/odcommands.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qosqualifiers.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qosqualifiers.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/ColorParameterBox.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/ColorParameterBox.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/PictureAspectRatioBox.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/PictureAspectRatioBox.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/coding.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/coding.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/impl.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/qtff.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/rtphint.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/rtphint.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/src.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/text.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/text.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/src/util.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/util/impl.h delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4art.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4chaps.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4extract.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4file.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4info.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4subtitle.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4tags.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4track.cpp delete mode 100644 debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4trackdump.cpp delete mode 100644 debian/mp4v2/mp4v2_2.0.0~dfsg0.orig.tar.bz2 (limited to 'debian/mp4v2') diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/COPYING b/debian/mp4v2/mp4v2-2.0.0~dfsg0/COPYING deleted file mode 100644 index 0c3dd64e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/COPYING +++ /dev/null @@ -1,458 +0,0 @@ - MOZILLA PUBLIC LICENSE - Version 1.1 - - --------------- - -1. Definitions. - - 1.0.1. "Commercial Use" means distribution or otherwise making the - Covered Code available to a third party. - - 1.1. "Contributor" means each entity that creates or contributes to - the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Code, prior Modifications used by a Contributor, and the Modifications - made by that particular Contributor. - - 1.3. "Covered Code" means the Original Code or Modifications or the - combination of the Original Code and Modifications, in each case - including portions thereof. - - 1.4. "Electronic Distribution Mechanism" means a mechanism generally - accepted in the software development community for the electronic - transfer of data. - - 1.5. "Executable" means Covered Code in any form other than Source - Code. - - 1.6. "Initial Developer" means the individual or entity identified - as the Initial Developer in the Source Code notice required by Exhibit - A. - - 1.7. "Larger Work" means a work which combines Covered Code or - portions thereof with code not governed by the terms of this License. - - 1.8. "License" means this document. - - 1.8.1. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means any addition to or deletion from the - substance or structure of either the Original Code or any previous - Modifications. When Covered Code is released as a series of files, a - Modification is: - A. Any addition to or deletion from the contents of a file - containing Original Code or previous Modifications. - - B. Any new file that contains any part of the Original Code or - previous Modifications. - - 1.10. "Original Code" means Source Code of computer software code - which is described in the Source Code notice required by Exhibit A as - Original Code, and which, at the time of its release under this - License is not already Covered Code governed by this License. - - 1.10.1. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.11. "Source Code" means the preferred form of the Covered Code for - making modifications to it, including all modules it contains, plus - any associated interface definition files, scripts used to control - compilation and installation of an Executable, or source code - differential comparisons against either the Original Code or another - well known, available Covered Code of the Contributor's choice. The - Source Code can be in a compressed or archival form, provided the - appropriate decompression or de-archiving software is widely available - for no charge. - - 1.12. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, this - License or a future version of this License issued under Section 6.1. - For legal entities, "You" includes any entity which controls, is - controlled by, or is under common control with You. For purposes of - this definition, "control" means (a) the power, direct or indirect, - to cause the direction or management of such entity, whether by - contract or otherwise, or (b) ownership of more than fifty percent - (50%) of the outstanding shares or beneficial ownership of such - entity. - -2. Source Code License. - - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, - non-exclusive license, subject to third party intellectual property - claims: - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Code (or portions thereof) with or without Modifications, and/or - as part of a Larger Work; and - - (b) under Patents Claims infringed by the making, using or - selling of Original Code, to make, have made, use, practice, - sell, and offer for sale, and/or otherwise dispose of the - Original Code (or portions thereof). - - (c) the licenses granted in this Section 2.1(a) and (b) are - effective on the date Initial Developer first distributes - Original Code under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: 1) for code that You delete from the Original Code; 2) - separate from the Original Code; or 3) for infringements caused - by: i) the modification of the Original Code or ii) the - combination of the Original Code with other software or devices. - - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor - hereby grants You a world-wide, royalty-free, non-exclusive license - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor, to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof) either on an - unmodified basis, with other Modifications, as Covered Code - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or - selling of Modifications made by that Contributor either alone - and/or in combination with its Contributor Version (or portions - of such combination), to make, use, sell, offer for sale, have - made, and/or otherwise dispose of: 1) Modifications made by that - Contributor (or portions thereof); and 2) the combination of - Modifications made by that Contributor with its Contributor - Version (or portions of such combination). - - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are - effective on the date Contributor first makes Commercial Use of - the Covered Code. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: 1) for any code that Contributor has deleted from the - Contributor Version; 2) separate from the Contributor Version; - 3) for infringements caused by: i) third party modifications of - Contributor Version or ii) the combination of Modifications made - by that Contributor with other software (except as part of the - Contributor Version) or other devices; or 4) under Patent Claims - infringed by Covered Code in the absence of Modifications made by - that Contributor. - -3. Distribution Obligations. - - 3.1. Application of License. - The Modifications which You create or to which You contribute are - governed by the terms of this License, including without limitation - Section 2.2. The Source Code version of Covered Code may be - distributed only under the terms of this License or a future version - of this License released under Section 6.1, and You must include a - copy of this License with every copy of the Source Code You - distribute. You may not offer or impose any terms on any Source Code - version that alters or restricts the applicable version of this - License or the recipients' rights hereunder. However, You may include - an additional document offering the additional rights described in - Section 3.5. - - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be - made available in Source Code form under the terms of this License - either on the same media as an Executable version or via an accepted - Electronic Distribution Mechanism to anyone to whom you made an - Executable version available; and if made available via Electronic - Distribution Mechanism, must remain available for at least twelve (12) - months after the date it initially became available, or at least six - (6) months after a subsequent version of that particular Modification - has been made available to such recipients. You are responsible for - ensuring that the Source Code version remains available even if the - Electronic Distribution Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a - file documenting the changes You made to create that Covered Code and - the date of any change. You must include a prominent statement that - the Modification is derived, directly or indirectly, from Original - Code provided by the Initial Developer and including the name of the - Initial Developer in (a) the Source Code, and (b) in any notice in an - Executable version or related documentation in which You describe the - origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's - intellectual property rights is required to exercise the rights - granted by such Contributor under Sections 2.1 or 2.2, - Contributor must include a text file with the Source Code - distribution titled "LEGAL" which describes the claim and the - party making the claim in sufficient detail that a recipient will - know whom to contact. If Contributor obtains such knowledge after - the Modification is made available as described in Section 3.2, - Contributor shall promptly modify the LEGAL file in all copies - Contributor makes available thereafter and shall take other steps - (such as notifying appropriate mailing lists or newsgroups) - reasonably calculated to inform those who received the Covered - Code that new knowledge has been obtained. - - (b) Contributor APIs. - If Contributor's Modifications include an application programming - interface and Contributor has knowledge of patent licenses which - are reasonably necessary to implement that API, Contributor must - also include this information in the LEGAL file. - - (c) Representations. - Contributor represents that, except as disclosed pursuant to - Section 3.4(a) above, Contributor believes that Contributor's - Modifications are Contributor's original creation(s) and/or - Contributor has sufficient rights to grant the rights conveyed by - this License. - - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source - Code. If it is not possible to put such notice in a particular Source - Code file due to its structure, then You must include such notice in a - location (such as a relevant directory) where a user would be likely - to look for such a notice. If You created one or more Modification(s) - You may add your name as a Contributor to the notice described in - Exhibit A. You must also duplicate this License in any documentation - for the Source Code where You describe recipients' rights or ownership - rights relating to Covered Code. You may choose to offer, and to - charge a fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Code. However, You - may do so only on Your own behalf, and not on behalf of the Initial - Developer or any Contributor. You must make it absolutely clear than - any such warranty, support, indemnity or liability obligation is - offered by You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred by the - Initial Developer or such Contributor as a result of warranty, - support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the - requirements of Section 3.1-3.5 have been met for that Covered Code, - and if You include a notice stating that the Source Code version of - the Covered Code is available under the terms of this License, - including a description of how and where You have fulfilled the - obligations of Section 3.2. The notice must be conspicuously included - in any notice in an Executable version, related documentation or - collateral in which You describe recipients' rights relating to the - Covered Code. You may distribute the Executable version of Covered - Code or ownership rights under a license of Your choice, which may - contain terms different from this License, provided that You are in - compliance with the terms of this License and that the license for the - Executable version does not attempt to limit or alter the recipient's - rights in the Source Code version from the rights set forth in this - License. If You distribute the Executable version under a different - license You must make it absolutely clear that any terms which differ - from this License are offered by You alone, not by the Initial - Developer or any Contributor. You hereby agree to indemnify the - Initial Developer and every Contributor for any liability incurred by - the Initial Developer or such Contributor as a result of any such - terms You offer. - - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code - not governed by the terms of this License and distribute the Larger - Work as a single product. In such a case, You must make sure the - requirements of this License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - - If it is impossible for You to comply with any of the terms of this - License with respect to some or all of the Covered Code due to - statute, judicial order, or regulation then You must: (a) comply with - the terms of this License to the maximum extent possible; and (b) - describe the limitations and the code they affect. Such description - must be included in the LEGAL file described in Section 3.4 and must - be included with all distributions of the Source Code. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Application of this License. - - This License applies to code to which the Initial Developer has - attached the notice in Exhibit A and to related Covered Code. - -6. Versions of the License. - - 6.1. New Versions. - Netscape Communications Corporation ("Netscape") may publish revised - and/or new versions of the License from time to time. Each version - will be given a distinguishing version number. - - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the - License, You may always continue to use it under the terms of that - version. You may also choose to use such Covered Code under the terms - of any subsequent version of the License published by Netscape. No one - other than Netscape has the right to modify the terms applicable to - Covered Code created under this License. - - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may - only do in order to apply it to code which is not already Covered Code - governed by this License), You must (a) rename Your license so that - the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", - "MPL", "NPL" or any confusingly similar phrase do not appear in your - license (except to note that your license differs from this License) - and (b) otherwise make it clear that Your version of the license - contains terms which differ from the Mozilla Public License and - Netscape Public License. (Filling in the name of the Initial - Developer, Original Code or Contributor in the notice described in - Exhibit A shall not of themselves be deemed to be modifications of - this License.) - -7. DISCLAIMER OF WARRANTY. - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF - DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. - THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE - IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, - YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE - COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER - OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -8. TERMINATION. - - 8.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to cure - such breach within 30 days of becoming aware of the breach. All - sublicenses to the Covered Code which are properly granted shall - survive any termination of this License. Provisions which, by their - nature, must remain in effect beyond the termination of this License - shall survive. - - 8.2. If You initiate litigation by asserting a patent infringement - claim (excluding declatory judgment actions) against Initial Developer - or a Contributor (the Initial Developer or Contributor against whom - You file such action is referred to as "Participant") alleging that: - - (a) such Participant's Contributor Version directly or indirectly - infringes any patent, then any and all rights granted by such - Participant to You under Sections 2.1 and/or 2.2 of this License - shall, upon 60 days notice from Participant terminate prospectively, - unless if within 60 days after receipt of notice You either: (i) - agree in writing to pay Participant a mutually agreeable reasonable - royalty for Your past and future use of Modifications made by such - Participant, or (ii) withdraw Your litigation claim with respect to - the Contributor Version against such Participant. If within 60 days - of notice, a reasonable royalty and payment arrangement are not - mutually agreed upon in writing by the parties or the litigation claim - is not withdrawn, the rights granted by Participant to You under - Sections 2.1 and/or 2.2 automatically terminate at the expiration of - the 60 day notice period specified above. - - (b) any software, hardware, or device, other than such Participant's - Contributor Version, directly or indirectly infringes any patent, then - any rights granted to You by such Participant under Sections 2.1(b) - and 2.2(b) are revoked effective as of the date You first made, used, - sold, distributed, or had made, Modifications made by that - Participant. - - 8.3. If You assert a patent infringement claim against Participant - alleging that such Participant's Contributor Version directly or - indirectly infringes any patent where such claim is resolved (such as - by license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 8.4. In the event of termination under Sections 8.1 or 8.2 above, - all end user license agreements (excluding distributors and resellers) - which have been validly granted by You or any distributor hereunder - prior to termination shall survive termination. - -9. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL - DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, - OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR - ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY - CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, - WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY - RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW - PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE - EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO - THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - - The Covered Code is a "commercial item," as that term is defined in - 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" and "commercial computer software documentation," as such - terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 - C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), - all U.S. Government End Users acquire Covered Code with only those - rights set forth herein. - -11. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - California law provisions (except to the extent applicable law, if - any, provides otherwise), excluding its conflict-of-law provisions. - With respect to disputes in which at least one party is a citizen of, - or an entity chartered or registered to do business in the United - States of America, any litigation relating to this License shall be - subject to the jurisdiction of the Federal Courts of the Northern - District of California, with venue lying in Santa Clara County, - California, with the losing party responsible for costs, including - without limitation, court costs and reasonable attorneys' fees and - expenses. The application of the United Nations Convention on - Contracts for the International Sale of Goods is expressly excluded. - Any law or regulation which provides that the language of a contract - shall be construed against the drafter shall not apply to this - License. - -12. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - -13. MULTIPLE-LICENSED CODE. - - Initial Developer may designate portions of the Covered Code as - "Multiple-Licensed". "Multiple-Licensed" means that the Initial - Developer permits you to utilize portions of the Covered Code under - Your choice of the NPL or the alternative licenses, if any, specified - by the Initial Developer in the file described in Exhibit A. - -EXHIBIT A -Mozilla Public License. - - ``The contents of this file are subject to the Mozilla Public License - Version 1.1 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - License for the specific language governing rights and limitations - under the License. - - The Original Code is MPEG4IP. - - The Initial Developer of the Original Code is Cisco Systems Inc. - Portions created by Cisco Systems Inc are - Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - - Contributor(s): ... - - [NOTE: The text of this Exhibit A may differ slightly from the text of - the notices in the Source Code files of the Original Code. You should - use the text of this Exhibit A rather than the text found in the - Original Code Source Code for Your Modifications.] diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/GNUmakefile.am b/debian/mp4v2/mp4v2-2.0.0~dfsg0/GNUmakefile.am deleted file mode 100644 index 947e6e3a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/GNUmakefile.am +++ /dev/null @@ -1,322 +0,0 @@ -lib_LTLIBRARIES = libmp4v2.la - -bin_PROGRAMS = - -check_PROGRAMS = - -############################################################################### - -libmp4v2_la_LDFLAGS = \ - $(AM_LDFLAGS) \ - -version-number $(PROJECT_version_major):$(PROJECT_version_minor):$(PROJECT_version_point) $(X_libmp4v2_la_LDFLAGS) - -libmp4v2_la_SOURCES = \ - src/3gp.cpp \ - src/atom_ac3.cpp \ - src/atom_amr.cpp \ - src/atom_avc1.cpp \ - src/atom_avcC.cpp \ - src/atom_chpl.cpp \ - src/atom_colr.cpp \ - src/atom_d263.cpp \ - src/atom_dac3.cpp \ - src/atom_damr.cpp \ - src/atom_dref.cpp \ - src/atom_elst.cpp \ - src/atom_enca.cpp \ - src/atom_encv.cpp \ - src/atom_free.cpp \ - src/atom_ftyp.cpp \ - src/atom_ftab.cpp \ - src/atom_gmin.cpp \ - src/atom_hdlr.cpp \ - src/atom_hinf.cpp \ - src/atom_hnti.cpp \ - src/atom_href.cpp \ - src/atom_mdat.cpp \ - src/atom_mdhd.cpp \ - src/atom_meta.cpp \ - src/atom_mp4s.cpp \ - src/atom_mp4v.cpp \ - src/atom_mvhd.cpp \ - src/atom_nmhd.cpp \ - src/atom_ohdr.cpp \ - src/atom_pasp.cpp \ - src/atom_root.cpp \ - src/atom_rtp.cpp \ - src/atom_s263.cpp \ - src/atom_sdp.cpp \ - src/atom_sdtp.cpp \ - src/atom_smi.cpp \ - src/atom_sound.cpp \ - src/atom_standard.cpp \ - src/atom_stbl.cpp \ - src/atom_stdp.cpp \ - src/atom_stsc.cpp \ - src/atom_stsd.cpp \ - src/atom_stsz.cpp \ - src/atom_stz2.cpp \ - src/atom_text.cpp \ - src/atom_tfhd.cpp \ - src/atom_tkhd.cpp \ - src/atom_treftype.cpp \ - src/atom_trun.cpp \ - src/atom_tx3g.cpp \ - src/atom_udta.cpp \ - src/atom_url.cpp \ - src/atom_urn.cpp \ - src/atom_uuid.cpp \ - src/atom_video.cpp \ - src/atom_vmhd.cpp \ - src/atoms.h \ - src/cmeta.cpp \ - src/descriptors.cpp \ - src/descriptors.h \ - src/exception.cpp \ - src/exception.h \ - src/enum.h \ - src/enum.tcc \ - src/impl.h \ - src/isma.cpp \ - src/log.h \ - src/log.cpp \ - src/mp4.cpp \ - src/mp4array.h \ - src/mp4atom.cpp \ - src/mp4atom.h \ - src/mp4container.cpp \ - src/mp4container.h \ - src/mp4descriptor.cpp \ - src/mp4descriptor.h \ - src/mp4file.cpp \ - src/mp4file.h \ - src/mp4file_io.cpp \ - src/mp4info.cpp \ - src/mp4property.cpp \ - src/mp4property.h \ - src/mp4track.cpp \ - src/mp4track.h \ - src/mp4util.cpp \ - src/mp4util.h \ - src/ocidescriptors.cpp \ - src/ocidescriptors.h \ - src/odcommands.cpp \ - src/odcommands.h \ - src/qosqualifiers.cpp \ - src/qosqualifiers.h \ - src/rtphint.cpp \ - src/rtphint.h \ - src/src.h \ - src/text.cpp \ - src/text.h \ - src/util.h - -libmp4v2_la_SOURCES += \ - src/bmff/bmff.h \ - src/bmff/impl.h \ - src/bmff/typebmff.cpp \ - src/bmff/typebmff.h - -libmp4v2_la_SOURCES += \ - src/itmf/CoverArtBox.cpp \ - src/itmf/CoverArtBox.h \ - src/itmf/Tags.cpp \ - src/itmf/Tags.h \ - src/itmf/generic.cpp \ - src/itmf/generic.h \ - src/itmf/impl.h \ - src/itmf/itmf.h \ - src/itmf/type.cpp \ - src/itmf/type.h - -libmp4v2_la_SOURCES += \ - src/qtff/ColorParameterBox.cpp \ - src/qtff/ColorParameterBox.h \ - src/qtff/PictureAspectRatioBox.cpp \ - src/qtff/PictureAspectRatioBox.h \ - src/qtff/coding.cpp \ - src/qtff/coding.h \ - src/qtff/impl.h \ - src/qtff/qtff.h - -libmp4v2_la_SOURCES += \ - libplatform/endian.h \ - libplatform/impl.h \ - libplatform/io/File.cpp \ - libplatform/io/File.h \ - libplatform/io/FileSystem.cpp \ - libplatform/io/FileSystem.h \ - libplatform/number/random.h \ - libplatform/platform.h \ - libplatform/platform_base.h \ - libplatform/platform_posix.h \ - libplatform/platform_win32.h \ - libplatform/process/process.h \ - libplatform/prog/option.cpp \ - libplatform/prog/option.h \ - libplatform/sys/error.cpp \ - libplatform/sys/error.h \ - libplatform/time/time.cpp \ - libplatform/time/time.h \ - libplatform/warning.h - -if ADD_PLATFORM_POSIX - libmp4v2_la_SOURCES += \ - libplatform/io/File_posix.cpp \ - libplatform/io/FileSystem_posix.cpp \ - libplatform/number/random_posix.cpp \ - libplatform/process/process_posix.cpp \ - libplatform/time/time_posix.cpp -endif -if ADD_PLATFORM_WIN32 - libmp4v2_la_SOURCES += \ - libplatform/io/File_win32.cpp \ - libplatform/io/FileSystem_win32.cpp \ - libplatform/number/random_win32.cpp \ - libplatform/process/process_win32.cpp \ - libplatform/time/time_win32.cpp -endif - -if ADD_UTIL - libmp4v2_la_SOURCES += \ - libutil/Database.cpp \ - libutil/Database.h \ - libutil/Timecode.cpp \ - libutil/Timecode.h \ - libutil/TrackModifier.cpp \ - libutil/TrackModifier.h \ - libutil/Utility.cpp \ - libutil/Utility.h \ - libutil/crc.cpp \ - libutil/crc.h \ - libutil/impl.h \ - libutil/other.cpp \ - libutil/other.h \ - libutil/util.h - - bin_PROGRAMS += mp4art - bin_PROGRAMS += mp4chaps - bin_PROGRAMS += mp4extract - bin_PROGRAMS += mp4file - bin_PROGRAMS += mp4info - bin_PROGRAMS += mp4subtitle - bin_PROGRAMS += mp4tags - bin_PROGRAMS += mp4track - bin_PROGRAMS += mp4trackdump -endif - -mp4art_SOURCES = util/impl.h util/mp4art.cpp -mp4chaps_SOURCES = util/impl.h util/mp4chaps.cpp -mp4extract_SOURCES = util/impl.h util/mp4extract.cpp -mp4file_SOURCES = util/impl.h util/mp4file.cpp -mp4info_SOURCES = util/impl.h util/mp4info.cpp -mp4subtitle_SOURCES = util/impl.h util/mp4subtitle.cpp -mp4tags_SOURCES = util/impl.h util/mp4tags.cpp -mp4track_SOURCES = util/impl.h util/mp4track.cpp -mp4trackdump_SOURCES = util/impl.h util/mp4trackdump.cpp - -mp4art_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4chaps_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4extract_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4file_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4info_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4subtitle_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4tags_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4track_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4trackdump_LDADD = libmp4v2.la $(X_LDFLAGS) - -############################################################################### - -DEJATOOL = main - -TESTLOGDIR = $(top_builddir)/testlog - -override RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir/testsuite --outdir $(TESTLOGDIR) - -############################################################################### - -mp4v2incdir = $(pkgincludedir) - -mp4v2inc_HEADERS = \ - include/mp4v2/project.h \ - \ - include/mp4v2/chapter.h \ - include/mp4v2/file.h \ - include/mp4v2/file_prop.h \ - include/mp4v2/general.h \ - include/mp4v2/isma.h \ - include/mp4v2/itmf_generic.h \ - include/mp4v2/itmf_tags.h \ - include/mp4v2/mp4v2.h \ - include/mp4v2/platform.h \ - include/mp4v2/sample.h \ - include/mp4v2/streaming.h \ - include/mp4v2/track.h \ - include/mp4v2/track_prop.h - -############################################################################### - -EXTRA_DIST = project/project.m4 - -############################################################################### - -clean-local: - -distclean-local: - rm -f $(top_builddir)/Makefile - rm -f $(top_builddir)/testlog/*.log - rm -f $(top_builddir)/testlog/*.sum - -############################################################################### - -AM_CPPFLAGS = $(strip $(MK_CXX_ARCH) $(X_CXX_ARCH) $(MK_CXX_I) $(X_CXX_I)) - -AM_LDFLAGS = $(strip $(MK_CXX_ARCH) $(X_CXX_ARCH)) - -AM_CXXFLAGS = $(strip $(MK_CXX_W) $(X_CXX_W)) - -LIBS := $(LIBS) $(X_MINGW_LIBS) - -############################################################################### - -MK_CXX_ARCH = -MK_CXX_W = -Wall -Wformat -MK_CXX_D = - -MK_CXX_I = \ - -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir) -I$(top_srcdir) - -############################################################################### - -if ADD_UTIL -if ADD_MANS - man1_MANS = \ - doc/man/man1/mp4art.1 \ - doc/man/man1/mp4file.1 \ - doc/man/man1/mp4subtitle.1 \ - doc/man/man1/mp4track.1 -endif -endif - -############################################################################### - -## -## workaround: DejaGNU adds a hard-coded dependency on Makefile -## and need to create logdir -## -Makefile: ${Makefile} - touch $@ - $(mkdir_p) $(TESTLOGDIR) - -dist-hook: - -############################################################################### - -## -## include GNUmakefiles which are not full-fledged automake citizens but -## they are aware of automake variables and targets. Note that we purposely -## use a GNUmakefile extension (-include) to prevent automake from parsing -## the file. -## --include $(top_srcdir)/doc/GNUmakefile.mk diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/GNUmakefile.in b/debian/mp4v2/mp4v2-2.0.0~dfsg0/GNUmakefile.in deleted file mode 100644 index 9ff18b8f..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/GNUmakefile.in +++ /dev/null @@ -1,1878 +0,0 @@ -# GNUmakefile.in generated by automake 1.11.1 from GNUmakefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = $(am__EXEEXT_1) -check_PROGRAMS = -@ADD_PLATFORM_POSIX_TRUE@am__append_1 = \ -@ADD_PLATFORM_POSIX_TRUE@ libplatform/io/File_posix.cpp \ -@ADD_PLATFORM_POSIX_TRUE@ libplatform/io/FileSystem_posix.cpp \ -@ADD_PLATFORM_POSIX_TRUE@ libplatform/number/random_posix.cpp \ -@ADD_PLATFORM_POSIX_TRUE@ libplatform/process/process_posix.cpp \ -@ADD_PLATFORM_POSIX_TRUE@ libplatform/time/time_posix.cpp - -@ADD_PLATFORM_WIN32_TRUE@am__append_2 = \ -@ADD_PLATFORM_WIN32_TRUE@ libplatform/io/File_win32.cpp \ -@ADD_PLATFORM_WIN32_TRUE@ libplatform/io/FileSystem_win32.cpp \ -@ADD_PLATFORM_WIN32_TRUE@ libplatform/number/random_win32.cpp \ -@ADD_PLATFORM_WIN32_TRUE@ libplatform/process/process_win32.cpp \ -@ADD_PLATFORM_WIN32_TRUE@ libplatform/time/time_win32.cpp - -@ADD_UTIL_TRUE@am__append_3 = \ -@ADD_UTIL_TRUE@ libutil/Database.cpp \ -@ADD_UTIL_TRUE@ libutil/Database.h \ -@ADD_UTIL_TRUE@ libutil/Timecode.cpp \ -@ADD_UTIL_TRUE@ libutil/Timecode.h \ -@ADD_UTIL_TRUE@ libutil/TrackModifier.cpp \ -@ADD_UTIL_TRUE@ libutil/TrackModifier.h \ -@ADD_UTIL_TRUE@ libutil/Utility.cpp \ -@ADD_UTIL_TRUE@ libutil/Utility.h \ -@ADD_UTIL_TRUE@ libutil/crc.cpp \ -@ADD_UTIL_TRUE@ libutil/crc.h \ -@ADD_UTIL_TRUE@ libutil/impl.h \ -@ADD_UTIL_TRUE@ libutil/other.cpp \ -@ADD_UTIL_TRUE@ libutil/other.h \ -@ADD_UTIL_TRUE@ libutil/util.h - -@ADD_UTIL_TRUE@am__append_4 = mp4art mp4chaps mp4extract mp4file \ -@ADD_UTIL_TRUE@ mp4info mp4subtitle mp4tags mp4track \ -@ADD_UTIL_TRUE@ mp4trackdump -subdir = . -DIST_COMMON = README $(am__configure_deps) $(mp4v2inc_HEADERS) \ - $(srcdir)/GNUmakefile.am $(srcdir)/GNUmakefile.in \ - $(top_srcdir)/configure \ - $(top_srcdir)/include/mp4v2/project.h.in \ - $(top_srcdir)/libplatform/config.h.in \ - $(top_srcdir)/project/project.m4.in COPYING INSTALL \ - autoaux/config.guess autoaux/config.sub autoaux/depcomp \ - autoaux/install-sh autoaux/ltmain.sh autoaux/missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/project/project.m4sugar \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/libplatform/config.h -CONFIG_CLEAN_FILES = include/mp4v2/project.h project/project.m4 -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(mp4v2incdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libmp4v2_la_LIBADD = -am__libmp4v2_la_SOURCES_DIST = src/3gp.cpp src/atom_ac3.cpp \ - src/atom_amr.cpp src/atom_avc1.cpp src/atom_avcC.cpp \ - src/atom_chpl.cpp src/atom_colr.cpp src/atom_d263.cpp \ - src/atom_dac3.cpp src/atom_damr.cpp src/atom_dref.cpp \ - src/atom_elst.cpp src/atom_enca.cpp src/atom_encv.cpp \ - src/atom_free.cpp src/atom_ftyp.cpp src/atom_ftab.cpp \ - src/atom_gmin.cpp src/atom_hdlr.cpp src/atom_hinf.cpp \ - src/atom_hnti.cpp src/atom_href.cpp src/atom_mdat.cpp \ - src/atom_mdhd.cpp src/atom_meta.cpp src/atom_mp4s.cpp \ - src/atom_mp4v.cpp src/atom_mvhd.cpp src/atom_nmhd.cpp \ - src/atom_ohdr.cpp src/atom_pasp.cpp src/atom_root.cpp \ - src/atom_rtp.cpp src/atom_s263.cpp src/atom_sdp.cpp \ - src/atom_sdtp.cpp src/atom_smi.cpp src/atom_sound.cpp \ - src/atom_standard.cpp src/atom_stbl.cpp src/atom_stdp.cpp \ - src/atom_stsc.cpp src/atom_stsd.cpp src/atom_stsz.cpp \ - src/atom_stz2.cpp src/atom_text.cpp src/atom_tfhd.cpp \ - src/atom_tkhd.cpp src/atom_treftype.cpp src/atom_trun.cpp \ - src/atom_tx3g.cpp src/atom_udta.cpp src/atom_url.cpp \ - src/atom_urn.cpp src/atom_uuid.cpp src/atom_video.cpp \ - src/atom_vmhd.cpp src/atoms.h src/cmeta.cpp \ - src/descriptors.cpp src/descriptors.h src/exception.cpp \ - src/exception.h src/enum.h src/enum.tcc src/impl.h \ - src/isma.cpp src/log.h src/log.cpp src/mp4.cpp src/mp4array.h \ - src/mp4atom.cpp src/mp4atom.h src/mp4container.cpp \ - src/mp4container.h src/mp4descriptor.cpp src/mp4descriptor.h \ - src/mp4file.cpp src/mp4file.h src/mp4file_io.cpp \ - src/mp4info.cpp src/mp4property.cpp src/mp4property.h \ - src/mp4track.cpp src/mp4track.h src/mp4util.cpp src/mp4util.h \ - src/ocidescriptors.cpp src/ocidescriptors.h src/odcommands.cpp \ - src/odcommands.h src/qosqualifiers.cpp src/qosqualifiers.h \ - src/rtphint.cpp src/rtphint.h src/src.h src/text.cpp \ - src/text.h src/util.h src/bmff/bmff.h src/bmff/impl.h \ - src/bmff/typebmff.cpp src/bmff/typebmff.h \ - src/itmf/CoverArtBox.cpp src/itmf/CoverArtBox.h \ - src/itmf/Tags.cpp src/itmf/Tags.h src/itmf/generic.cpp \ - src/itmf/generic.h src/itmf/impl.h src/itmf/itmf.h \ - src/itmf/type.cpp src/itmf/type.h \ - src/qtff/ColorParameterBox.cpp src/qtff/ColorParameterBox.h \ - src/qtff/PictureAspectRatioBox.cpp \ - src/qtff/PictureAspectRatioBox.h src/qtff/coding.cpp \ - src/qtff/coding.h src/qtff/impl.h src/qtff/qtff.h \ - libplatform/endian.h libplatform/impl.h \ - libplatform/io/File.cpp libplatform/io/File.h \ - libplatform/io/FileSystem.cpp libplatform/io/FileSystem.h \ - libplatform/number/random.h libplatform/platform.h \ - libplatform/platform_base.h libplatform/platform_posix.h \ - libplatform/platform_win32.h libplatform/process/process.h \ - libplatform/prog/option.cpp libplatform/prog/option.h \ - libplatform/sys/error.cpp libplatform/sys/error.h \ - libplatform/time/time.cpp libplatform/time/time.h \ - libplatform/warning.h libplatform/io/File_posix.cpp \ - libplatform/io/FileSystem_posix.cpp \ - libplatform/number/random_posix.cpp \ - libplatform/process/process_posix.cpp \ - libplatform/time/time_posix.cpp libplatform/io/File_win32.cpp \ - libplatform/io/FileSystem_win32.cpp \ - libplatform/number/random_win32.cpp \ - libplatform/process/process_win32.cpp \ - libplatform/time/time_win32.cpp libutil/Database.cpp \ - libutil/Database.h libutil/Timecode.cpp libutil/Timecode.h \ - libutil/TrackModifier.cpp libutil/TrackModifier.h \ - libutil/Utility.cpp libutil/Utility.h libutil/crc.cpp \ - libutil/crc.h libutil/impl.h libutil/other.cpp libutil/other.h \ - libutil/util.h -am__dirstamp = $(am__leading_dot)dirstamp -@ADD_PLATFORM_POSIX_TRUE@am__objects_1 = libplatform/io/File_posix.lo \ -@ADD_PLATFORM_POSIX_TRUE@ libplatform/io/FileSystem_posix.lo \ -@ADD_PLATFORM_POSIX_TRUE@ libplatform/number/random_posix.lo \ -@ADD_PLATFORM_POSIX_TRUE@ libplatform/process/process_posix.lo \ -@ADD_PLATFORM_POSIX_TRUE@ libplatform/time/time_posix.lo -@ADD_PLATFORM_WIN32_TRUE@am__objects_2 = libplatform/io/File_win32.lo \ -@ADD_PLATFORM_WIN32_TRUE@ libplatform/io/FileSystem_win32.lo \ -@ADD_PLATFORM_WIN32_TRUE@ libplatform/number/random_win32.lo \ -@ADD_PLATFORM_WIN32_TRUE@ libplatform/process/process_win32.lo \ -@ADD_PLATFORM_WIN32_TRUE@ libplatform/time/time_win32.lo -@ADD_UTIL_TRUE@am__objects_3 = libutil/Database.lo libutil/Timecode.lo \ -@ADD_UTIL_TRUE@ libutil/TrackModifier.lo libutil/Utility.lo \ -@ADD_UTIL_TRUE@ libutil/crc.lo libutil/other.lo -am_libmp4v2_la_OBJECTS = src/3gp.lo src/atom_ac3.lo src/atom_amr.lo \ - src/atom_avc1.lo src/atom_avcC.lo src/atom_chpl.lo \ - src/atom_colr.lo src/atom_d263.lo src/atom_dac3.lo \ - src/atom_damr.lo src/atom_dref.lo src/atom_elst.lo \ - src/atom_enca.lo src/atom_encv.lo src/atom_free.lo \ - src/atom_ftyp.lo src/atom_ftab.lo src/atom_gmin.lo \ - src/atom_hdlr.lo src/atom_hinf.lo src/atom_hnti.lo \ - src/atom_href.lo src/atom_mdat.lo src/atom_mdhd.lo \ - src/atom_meta.lo src/atom_mp4s.lo src/atom_mp4v.lo \ - src/atom_mvhd.lo src/atom_nmhd.lo src/atom_ohdr.lo \ - src/atom_pasp.lo src/atom_root.lo src/atom_rtp.lo \ - src/atom_s263.lo src/atom_sdp.lo src/atom_sdtp.lo \ - src/atom_smi.lo src/atom_sound.lo src/atom_standard.lo \ - src/atom_stbl.lo src/atom_stdp.lo src/atom_stsc.lo \ - src/atom_stsd.lo src/atom_stsz.lo src/atom_stz2.lo \ - src/atom_text.lo src/atom_tfhd.lo src/atom_tkhd.lo \ - src/atom_treftype.lo src/atom_trun.lo src/atom_tx3g.lo \ - src/atom_udta.lo src/atom_url.lo src/atom_urn.lo \ - src/atom_uuid.lo src/atom_video.lo src/atom_vmhd.lo \ - src/cmeta.lo src/descriptors.lo src/exception.lo src/isma.lo \ - src/log.lo src/mp4.lo src/mp4atom.lo src/mp4container.lo \ - src/mp4descriptor.lo src/mp4file.lo src/mp4file_io.lo \ - src/mp4info.lo src/mp4property.lo src/mp4track.lo \ - src/mp4util.lo src/ocidescriptors.lo src/odcommands.lo \ - src/qosqualifiers.lo src/rtphint.lo src/text.lo \ - src/bmff/typebmff.lo src/itmf/CoverArtBox.lo src/itmf/Tags.lo \ - src/itmf/generic.lo src/itmf/type.lo \ - src/qtff/ColorParameterBox.lo \ - src/qtff/PictureAspectRatioBox.lo src/qtff/coding.lo \ - libplatform/io/File.lo libplatform/io/FileSystem.lo \ - libplatform/prog/option.lo libplatform/sys/error.lo \ - libplatform/time/time.lo $(am__objects_1) $(am__objects_2) \ - $(am__objects_3) -libmp4v2_la_OBJECTS = $(am_libmp4v2_la_OBJECTS) -libmp4v2_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libmp4v2_la_LDFLAGS) $(LDFLAGS) -o $@ -@ADD_UTIL_TRUE@am__EXEEXT_1 = mp4art$(EXEEXT) mp4chaps$(EXEEXT) \ -@ADD_UTIL_TRUE@ mp4extract$(EXEEXT) mp4file$(EXEEXT) \ -@ADD_UTIL_TRUE@ mp4info$(EXEEXT) mp4subtitle$(EXEEXT) \ -@ADD_UTIL_TRUE@ mp4tags$(EXEEXT) mp4track$(EXEEXT) \ -@ADD_UTIL_TRUE@ mp4trackdump$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) -am_mp4art_OBJECTS = util/mp4art.$(OBJEXT) -mp4art_OBJECTS = $(am_mp4art_OBJECTS) -mp4art_DEPENDENCIES = libmp4v2.la -am_mp4chaps_OBJECTS = util/mp4chaps.$(OBJEXT) -mp4chaps_OBJECTS = $(am_mp4chaps_OBJECTS) -mp4chaps_DEPENDENCIES = libmp4v2.la -am_mp4extract_OBJECTS = util/mp4extract.$(OBJEXT) -mp4extract_OBJECTS = $(am_mp4extract_OBJECTS) -mp4extract_DEPENDENCIES = libmp4v2.la -am_mp4file_OBJECTS = util/mp4file.$(OBJEXT) -mp4file_OBJECTS = $(am_mp4file_OBJECTS) -mp4file_DEPENDENCIES = libmp4v2.la -am_mp4info_OBJECTS = util/mp4info.$(OBJEXT) -mp4info_OBJECTS = $(am_mp4info_OBJECTS) -mp4info_DEPENDENCIES = libmp4v2.la -am_mp4subtitle_OBJECTS = util/mp4subtitle.$(OBJEXT) -mp4subtitle_OBJECTS = $(am_mp4subtitle_OBJECTS) -mp4subtitle_DEPENDENCIES = libmp4v2.la -am_mp4tags_OBJECTS = util/mp4tags.$(OBJEXT) -mp4tags_OBJECTS = $(am_mp4tags_OBJECTS) -mp4tags_DEPENDENCIES = libmp4v2.la -am_mp4track_OBJECTS = util/mp4track.$(OBJEXT) -mp4track_OBJECTS = $(am_mp4track_OBJECTS) -mp4track_DEPENDENCIES = libmp4v2.la -am_mp4trackdump_OBJECTS = util/mp4trackdump.$(OBJEXT) -mp4trackdump_OBJECTS = $(am_mp4trackdump_OBJECTS) -mp4trackdump_DEPENDENCIES = libmp4v2.la -DEFAULT_INCLUDES = -depcomp = $(SHELL) $(top_srcdir)/autoaux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libmp4v2_la_SOURCES) $(mp4art_SOURCES) $(mp4chaps_SOURCES) \ - $(mp4extract_SOURCES) $(mp4file_SOURCES) $(mp4info_SOURCES) \ - $(mp4subtitle_SOURCES) $(mp4tags_SOURCES) $(mp4track_SOURCES) \ - $(mp4trackdump_SOURCES) -DIST_SOURCES = $(am__libmp4v2_la_SOURCES_DIST) $(mp4art_SOURCES) \ - $(mp4chaps_SOURCES) $(mp4extract_SOURCES) $(mp4file_SOURCES) \ - $(mp4info_SOURCES) $(mp4subtitle_SOURCES) $(mp4tags_SOURCES) \ - $(mp4track_SOURCES) $(mp4trackdump_SOURCES) -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(man1_MANS) -HEADERS = $(mp4v2inc_HEADERS) -ETAGS = etags -CTAGS = ctags -RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir -EXPECT = expect -RUNTEST = runtest -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -GZIP_ENV = --best -DIST_ARCHIVES = $(distdir).tar.bz2 $(distdir).zip -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FOUND_HELP2MAN = @FOUND_HELP2MAN@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS := $(LIBS) $(X_MINGW_LIBS) -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PROJECT_bugreport = @PROJECT_bugreport@ -PROJECT_build = @PROJECT_build@ -PROJECT_irc = @PROJECT_irc@ -PROJECT_name = @PROJECT_name@ -PROJECT_name_formal = @PROJECT_name_formal@ -PROJECT_name_lower = @PROJECT_name_lower@ -PROJECT_name_upper = @PROJECT_name_upper@ -PROJECT_repo_branch = @PROJECT_repo_branch@ -PROJECT_repo_date = @PROJECT_repo_date@ -PROJECT_repo_rev = @PROJECT_repo_rev@ -PROJECT_repo_root = @PROJECT_repo_root@ -PROJECT_repo_type = @PROJECT_repo_type@ -PROJECT_repo_url = @PROJECT_repo_url@ -PROJECT_repo_uuid = @PROJECT_repo_uuid@ -PROJECT_url_discussion = @PROJECT_url_discussion@ -PROJECT_url_downloads = @PROJECT_url_downloads@ -PROJECT_url_website = @PROJECT_url_website@ -PROJECT_version = @PROJECT_version@ -PROJECT_version_hex = @PROJECT_version_hex@ -PROJECT_version_major = @PROJECT_version_major@ -PROJECT_version_minor = @PROJECT_version_minor@ -PROJECT_version_point = @PROJECT_version_point@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -X_CXX_ARCH = @X_CXX_ARCH@ -X_CXX_D = @X_CXX_D@ -X_CXX_I = @X_CXX_I@ -X_CXX_W = @X_CXX_W@ -X_GCH = @X_GCH@ -X_GCH_FLAGS = @X_GCH_FLAGS@ -X_GCH_SHARED = @X_GCH_SHARED@ -X_GCH_SHARED_FLAGS = @X_GCH_SHARED_FLAGS@ -X_GCH_STATIC = @X_GCH_STATIC@ -X_GCH_STATIC_FLAGS = @X_GCH_STATIC_FLAGS@ -X_MINGW_LIBS = @X_MINGW_LIBS@ -X_libmp4v2_la_LDFLAGS = @X_libmp4v2_la_LDFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libmp4v2.la - -############################################################################### -libmp4v2_la_LDFLAGS = \ - $(AM_LDFLAGS) \ - -version-number $(PROJECT_version_major):$(PROJECT_version_minor):$(PROJECT_version_point) $(X_libmp4v2_la_LDFLAGS) - -libmp4v2_la_SOURCES = src/3gp.cpp src/atom_ac3.cpp src/atom_amr.cpp \ - src/atom_avc1.cpp src/atom_avcC.cpp src/atom_chpl.cpp \ - src/atom_colr.cpp src/atom_d263.cpp src/atom_dac3.cpp \ - src/atom_damr.cpp src/atom_dref.cpp src/atom_elst.cpp \ - src/atom_enca.cpp src/atom_encv.cpp src/atom_free.cpp \ - src/atom_ftyp.cpp src/atom_ftab.cpp src/atom_gmin.cpp \ - src/atom_hdlr.cpp src/atom_hinf.cpp src/atom_hnti.cpp \ - src/atom_href.cpp src/atom_mdat.cpp src/atom_mdhd.cpp \ - src/atom_meta.cpp src/atom_mp4s.cpp src/atom_mp4v.cpp \ - src/atom_mvhd.cpp src/atom_nmhd.cpp src/atom_ohdr.cpp \ - src/atom_pasp.cpp src/atom_root.cpp src/atom_rtp.cpp \ - src/atom_s263.cpp src/atom_sdp.cpp src/atom_sdtp.cpp \ - src/atom_smi.cpp src/atom_sound.cpp src/atom_standard.cpp \ - src/atom_stbl.cpp src/atom_stdp.cpp src/atom_stsc.cpp \ - src/atom_stsd.cpp src/atom_stsz.cpp src/atom_stz2.cpp \ - src/atom_text.cpp src/atom_tfhd.cpp src/atom_tkhd.cpp \ - src/atom_treftype.cpp src/atom_trun.cpp src/atom_tx3g.cpp \ - src/atom_udta.cpp src/atom_url.cpp src/atom_urn.cpp \ - src/atom_uuid.cpp src/atom_video.cpp src/atom_vmhd.cpp \ - src/atoms.h src/cmeta.cpp src/descriptors.cpp \ - src/descriptors.h src/exception.cpp src/exception.h src/enum.h \ - src/enum.tcc src/impl.h src/isma.cpp src/log.h src/log.cpp \ - src/mp4.cpp src/mp4array.h src/mp4atom.cpp src/mp4atom.h \ - src/mp4container.cpp src/mp4container.h src/mp4descriptor.cpp \ - src/mp4descriptor.h src/mp4file.cpp src/mp4file.h \ - src/mp4file_io.cpp src/mp4info.cpp src/mp4property.cpp \ - src/mp4property.h src/mp4track.cpp src/mp4track.h \ - src/mp4util.cpp src/mp4util.h src/ocidescriptors.cpp \ - src/ocidescriptors.h src/odcommands.cpp src/odcommands.h \ - src/qosqualifiers.cpp src/qosqualifiers.h src/rtphint.cpp \ - src/rtphint.h src/src.h src/text.cpp src/text.h src/util.h \ - src/bmff/bmff.h src/bmff/impl.h src/bmff/typebmff.cpp \ - src/bmff/typebmff.h src/itmf/CoverArtBox.cpp \ - src/itmf/CoverArtBox.h src/itmf/Tags.cpp src/itmf/Tags.h \ - src/itmf/generic.cpp src/itmf/generic.h src/itmf/impl.h \ - src/itmf/itmf.h src/itmf/type.cpp src/itmf/type.h \ - src/qtff/ColorParameterBox.cpp src/qtff/ColorParameterBox.h \ - src/qtff/PictureAspectRatioBox.cpp \ - src/qtff/PictureAspectRatioBox.h src/qtff/coding.cpp \ - src/qtff/coding.h src/qtff/impl.h src/qtff/qtff.h \ - libplatform/endian.h libplatform/impl.h \ - libplatform/io/File.cpp libplatform/io/File.h \ - libplatform/io/FileSystem.cpp libplatform/io/FileSystem.h \ - libplatform/number/random.h libplatform/platform.h \ - libplatform/platform_base.h libplatform/platform_posix.h \ - libplatform/platform_win32.h libplatform/process/process.h \ - libplatform/prog/option.cpp libplatform/prog/option.h \ - libplatform/sys/error.cpp libplatform/sys/error.h \ - libplatform/time/time.cpp libplatform/time/time.h \ - libplatform/warning.h $(am__append_1) $(am__append_2) \ - $(am__append_3) -mp4art_SOURCES = util/impl.h util/mp4art.cpp -mp4chaps_SOURCES = util/impl.h util/mp4chaps.cpp -mp4extract_SOURCES = util/impl.h util/mp4extract.cpp -mp4file_SOURCES = util/impl.h util/mp4file.cpp -mp4info_SOURCES = util/impl.h util/mp4info.cpp -mp4subtitle_SOURCES = util/impl.h util/mp4subtitle.cpp -mp4tags_SOURCES = util/impl.h util/mp4tags.cpp -mp4track_SOURCES = util/impl.h util/mp4track.cpp -mp4trackdump_SOURCES = util/impl.h util/mp4trackdump.cpp -mp4art_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4chaps_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4extract_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4file_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4info_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4subtitle_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4tags_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4track_LDADD = libmp4v2.la $(X_LDFLAGS) -mp4trackdump_LDADD = libmp4v2.la $(X_LDFLAGS) - -############################################################################### -DEJATOOL = main -TESTLOGDIR = $(top_builddir)/testlog - -############################################################################### -mp4v2incdir = $(pkgincludedir) -mp4v2inc_HEADERS = \ - include/mp4v2/project.h \ - \ - include/mp4v2/chapter.h \ - include/mp4v2/file.h \ - include/mp4v2/file_prop.h \ - include/mp4v2/general.h \ - include/mp4v2/isma.h \ - include/mp4v2/itmf_generic.h \ - include/mp4v2/itmf_tags.h \ - include/mp4v2/mp4v2.h \ - include/mp4v2/platform.h \ - include/mp4v2/sample.h \ - include/mp4v2/streaming.h \ - include/mp4v2/track.h \ - include/mp4v2/track_prop.h - - -############################################################################### -EXTRA_DIST = project/project.m4 - -############################################################################### -AM_CPPFLAGS = $(strip $(MK_CXX_ARCH) $(X_CXX_ARCH) $(MK_CXX_I) $(X_CXX_I)) -AM_LDFLAGS = $(strip $(MK_CXX_ARCH) $(X_CXX_ARCH)) -AM_CXXFLAGS = $(strip $(MK_CXX_W) $(X_CXX_W)) - -############################################################################### -MK_CXX_ARCH = -MK_CXX_W = -Wall -Wformat -MK_CXX_D = -MK_CXX_I = \ - -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir) -I$(top_srcdir) - - -############################################################################### -@ADD_MANS_TRUE@@ADD_UTIL_TRUE@man1_MANS = \ -@ADD_MANS_TRUE@@ADD_UTIL_TRUE@ doc/man/man1/mp4art.1 \ -@ADD_MANS_TRUE@@ADD_UTIL_TRUE@ doc/man/man1/mp4file.1 \ -@ADD_MANS_TRUE@@ADD_UTIL_TRUE@ doc/man/man1/mp4subtitle.1 \ -@ADD_MANS_TRUE@@ADD_UTIL_TRUE@ doc/man/man1/mp4track.1 - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -am--refresh: - @: -$(srcdir)/GNUmakefile.in: $(srcdir)/GNUmakefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign GNUmakefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign GNUmakefile -.PRECIOUS: GNUmakefile -GNUmakefile: $(srcdir)/GNUmakefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -libplatform/config.h: libplatform/stamp-h1 - @if test ! -f $@; then \ - rm -f libplatform/stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) libplatform/stamp-h1; \ - else :; fi - -libplatform/stamp-h1: $(top_srcdir)/libplatform/config.h.in $(top_builddir)/config.status - @rm -f libplatform/stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status libplatform/config.h -$(top_srcdir)/libplatform/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f libplatform/stamp-h1 - touch $@ - -distclean-hdr: - -rm -f libplatform/config.h libplatform/stamp-h1 -include/mp4v2/project.h: $(top_builddir)/config.status $(top_srcdir)/include/mp4v2/project.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -project/project.m4: $(top_builddir)/config.status $(top_srcdir)/project/project.m4.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -src/$(am__dirstamp): - @$(MKDIR_P) src - @: > src/$(am__dirstamp) -src/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/$(DEPDIR) - @: > src/$(DEPDIR)/$(am__dirstamp) -src/3gp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_ac3.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_amr.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_avc1.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_avcC.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_chpl.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_colr.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_d263.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_dac3.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_damr.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_dref.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_elst.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_enca.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_encv.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_free.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_ftyp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_ftab.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_gmin.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_hdlr.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_hinf.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_hnti.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_href.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_mdat.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_mdhd.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_meta.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_mp4s.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_mp4v.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_mvhd.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_nmhd.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_ohdr.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_pasp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_root.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_rtp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_s263.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_sdp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_sdtp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_smi.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_sound.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_standard.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/atom_stbl.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_stdp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_stsc.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_stsd.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_stsz.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_stz2.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_text.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_tfhd.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_tkhd.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_treftype.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/atom_trun.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_tx3g.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_udta.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_url.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_urn.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_uuid.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_video.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/atom_vmhd.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/cmeta.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/descriptors.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/exception.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/isma.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/log.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/mp4.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/mp4atom.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/mp4container.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/mp4descriptor.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/mp4file.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/mp4file_io.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/mp4info.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/mp4property.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/mp4track.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/mp4util.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/ocidescriptors.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/odcommands.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/qosqualifiers.lo: src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -src/rtphint.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/text.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) -src/bmff/$(am__dirstamp): - @$(MKDIR_P) src/bmff - @: > src/bmff/$(am__dirstamp) -src/bmff/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/bmff/$(DEPDIR) - @: > src/bmff/$(DEPDIR)/$(am__dirstamp) -src/bmff/typebmff.lo: src/bmff/$(am__dirstamp) \ - src/bmff/$(DEPDIR)/$(am__dirstamp) -src/itmf/$(am__dirstamp): - @$(MKDIR_P) src/itmf - @: > src/itmf/$(am__dirstamp) -src/itmf/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/itmf/$(DEPDIR) - @: > src/itmf/$(DEPDIR)/$(am__dirstamp) -src/itmf/CoverArtBox.lo: src/itmf/$(am__dirstamp) \ - src/itmf/$(DEPDIR)/$(am__dirstamp) -src/itmf/Tags.lo: src/itmf/$(am__dirstamp) \ - src/itmf/$(DEPDIR)/$(am__dirstamp) -src/itmf/generic.lo: src/itmf/$(am__dirstamp) \ - src/itmf/$(DEPDIR)/$(am__dirstamp) -src/itmf/type.lo: src/itmf/$(am__dirstamp) \ - src/itmf/$(DEPDIR)/$(am__dirstamp) -src/qtff/$(am__dirstamp): - @$(MKDIR_P) src/qtff - @: > src/qtff/$(am__dirstamp) -src/qtff/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/qtff/$(DEPDIR) - @: > src/qtff/$(DEPDIR)/$(am__dirstamp) -src/qtff/ColorParameterBox.lo: src/qtff/$(am__dirstamp) \ - src/qtff/$(DEPDIR)/$(am__dirstamp) -src/qtff/PictureAspectRatioBox.lo: src/qtff/$(am__dirstamp) \ - src/qtff/$(DEPDIR)/$(am__dirstamp) -src/qtff/coding.lo: src/qtff/$(am__dirstamp) \ - src/qtff/$(DEPDIR)/$(am__dirstamp) -libplatform/io/$(am__dirstamp): - @$(MKDIR_P) libplatform/io - @: > libplatform/io/$(am__dirstamp) -libplatform/io/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) libplatform/io/$(DEPDIR) - @: > libplatform/io/$(DEPDIR)/$(am__dirstamp) -libplatform/io/File.lo: libplatform/io/$(am__dirstamp) \ - libplatform/io/$(DEPDIR)/$(am__dirstamp) -libplatform/io/FileSystem.lo: libplatform/io/$(am__dirstamp) \ - libplatform/io/$(DEPDIR)/$(am__dirstamp) -libplatform/prog/$(am__dirstamp): - @$(MKDIR_P) libplatform/prog - @: > libplatform/prog/$(am__dirstamp) -libplatform/prog/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) libplatform/prog/$(DEPDIR) - @: > libplatform/prog/$(DEPDIR)/$(am__dirstamp) -libplatform/prog/option.lo: libplatform/prog/$(am__dirstamp) \ - libplatform/prog/$(DEPDIR)/$(am__dirstamp) -libplatform/sys/$(am__dirstamp): - @$(MKDIR_P) libplatform/sys - @: > libplatform/sys/$(am__dirstamp) -libplatform/sys/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) libplatform/sys/$(DEPDIR) - @: > libplatform/sys/$(DEPDIR)/$(am__dirstamp) -libplatform/sys/error.lo: libplatform/sys/$(am__dirstamp) \ - libplatform/sys/$(DEPDIR)/$(am__dirstamp) -libplatform/time/$(am__dirstamp): - @$(MKDIR_P) libplatform/time - @: > libplatform/time/$(am__dirstamp) -libplatform/time/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) libplatform/time/$(DEPDIR) - @: > libplatform/time/$(DEPDIR)/$(am__dirstamp) -libplatform/time/time.lo: libplatform/time/$(am__dirstamp) \ - libplatform/time/$(DEPDIR)/$(am__dirstamp) -libplatform/io/File_posix.lo: libplatform/io/$(am__dirstamp) \ - libplatform/io/$(DEPDIR)/$(am__dirstamp) -libplatform/io/FileSystem_posix.lo: libplatform/io/$(am__dirstamp) \ - libplatform/io/$(DEPDIR)/$(am__dirstamp) -libplatform/number/$(am__dirstamp): - @$(MKDIR_P) libplatform/number - @: > libplatform/number/$(am__dirstamp) -libplatform/number/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) libplatform/number/$(DEPDIR) - @: > libplatform/number/$(DEPDIR)/$(am__dirstamp) -libplatform/number/random_posix.lo: \ - libplatform/number/$(am__dirstamp) \ - libplatform/number/$(DEPDIR)/$(am__dirstamp) -libplatform/process/$(am__dirstamp): - @$(MKDIR_P) libplatform/process - @: > libplatform/process/$(am__dirstamp) -libplatform/process/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) libplatform/process/$(DEPDIR) - @: > libplatform/process/$(DEPDIR)/$(am__dirstamp) -libplatform/process/process_posix.lo: \ - libplatform/process/$(am__dirstamp) \ - libplatform/process/$(DEPDIR)/$(am__dirstamp) -libplatform/time/time_posix.lo: libplatform/time/$(am__dirstamp) \ - libplatform/time/$(DEPDIR)/$(am__dirstamp) -libplatform/io/File_win32.lo: libplatform/io/$(am__dirstamp) \ - libplatform/io/$(DEPDIR)/$(am__dirstamp) -libplatform/io/FileSystem_win32.lo: libplatform/io/$(am__dirstamp) \ - libplatform/io/$(DEPDIR)/$(am__dirstamp) -libplatform/number/random_win32.lo: \ - libplatform/number/$(am__dirstamp) \ - libplatform/number/$(DEPDIR)/$(am__dirstamp) -libplatform/process/process_win32.lo: \ - libplatform/process/$(am__dirstamp) \ - libplatform/process/$(DEPDIR)/$(am__dirstamp) -libplatform/time/time_win32.lo: libplatform/time/$(am__dirstamp) \ - libplatform/time/$(DEPDIR)/$(am__dirstamp) -libutil/$(am__dirstamp): - @$(MKDIR_P) libutil - @: > libutil/$(am__dirstamp) -libutil/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) libutil/$(DEPDIR) - @: > libutil/$(DEPDIR)/$(am__dirstamp) -libutil/Database.lo: libutil/$(am__dirstamp) \ - libutil/$(DEPDIR)/$(am__dirstamp) -libutil/Timecode.lo: libutil/$(am__dirstamp) \ - libutil/$(DEPDIR)/$(am__dirstamp) -libutil/TrackModifier.lo: libutil/$(am__dirstamp) \ - libutil/$(DEPDIR)/$(am__dirstamp) -libutil/Utility.lo: libutil/$(am__dirstamp) \ - libutil/$(DEPDIR)/$(am__dirstamp) -libutil/crc.lo: libutil/$(am__dirstamp) \ - libutil/$(DEPDIR)/$(am__dirstamp) -libutil/other.lo: libutil/$(am__dirstamp) \ - libutil/$(DEPDIR)/$(am__dirstamp) -libmp4v2.la: $(libmp4v2_la_OBJECTS) $(libmp4v2_la_DEPENDENCIES) - $(libmp4v2_la_LINK) -rpath $(libdir) $(libmp4v2_la_OBJECTS) $(libmp4v2_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -util/$(am__dirstamp): - @$(MKDIR_P) util - @: > util/$(am__dirstamp) -util/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) util/$(DEPDIR) - @: > util/$(DEPDIR)/$(am__dirstamp) -util/mp4art.$(OBJEXT): util/$(am__dirstamp) \ - util/$(DEPDIR)/$(am__dirstamp) -mp4art$(EXEEXT): $(mp4art_OBJECTS) $(mp4art_DEPENDENCIES) - @rm -f mp4art$(EXEEXT) - $(CXXLINK) $(mp4art_OBJECTS) $(mp4art_LDADD) $(LIBS) -util/mp4chaps.$(OBJEXT): util/$(am__dirstamp) \ - util/$(DEPDIR)/$(am__dirstamp) -mp4chaps$(EXEEXT): $(mp4chaps_OBJECTS) $(mp4chaps_DEPENDENCIES) - @rm -f mp4chaps$(EXEEXT) - $(CXXLINK) $(mp4chaps_OBJECTS) $(mp4chaps_LDADD) $(LIBS) -util/mp4extract.$(OBJEXT): util/$(am__dirstamp) \ - util/$(DEPDIR)/$(am__dirstamp) -mp4extract$(EXEEXT): $(mp4extract_OBJECTS) $(mp4extract_DEPENDENCIES) - @rm -f mp4extract$(EXEEXT) - $(CXXLINK) $(mp4extract_OBJECTS) $(mp4extract_LDADD) $(LIBS) -util/mp4file.$(OBJEXT): util/$(am__dirstamp) \ - util/$(DEPDIR)/$(am__dirstamp) -mp4file$(EXEEXT): $(mp4file_OBJECTS) $(mp4file_DEPENDENCIES) - @rm -f mp4file$(EXEEXT) - $(CXXLINK) $(mp4file_OBJECTS) $(mp4file_LDADD) $(LIBS) -util/mp4info.$(OBJEXT): util/$(am__dirstamp) \ - util/$(DEPDIR)/$(am__dirstamp) -mp4info$(EXEEXT): $(mp4info_OBJECTS) $(mp4info_DEPENDENCIES) - @rm -f mp4info$(EXEEXT) - $(CXXLINK) $(mp4info_OBJECTS) $(mp4info_LDADD) $(LIBS) -util/mp4subtitle.$(OBJEXT): util/$(am__dirstamp) \ - util/$(DEPDIR)/$(am__dirstamp) -mp4subtitle$(EXEEXT): $(mp4subtitle_OBJECTS) $(mp4subtitle_DEPENDENCIES) - @rm -f mp4subtitle$(EXEEXT) - $(CXXLINK) $(mp4subtitle_OBJECTS) $(mp4subtitle_LDADD) $(LIBS) -util/mp4tags.$(OBJEXT): util/$(am__dirstamp) \ - util/$(DEPDIR)/$(am__dirstamp) -mp4tags$(EXEEXT): $(mp4tags_OBJECTS) $(mp4tags_DEPENDENCIES) - @rm -f mp4tags$(EXEEXT) - $(CXXLINK) $(mp4tags_OBJECTS) $(mp4tags_LDADD) $(LIBS) -util/mp4track.$(OBJEXT): util/$(am__dirstamp) \ - util/$(DEPDIR)/$(am__dirstamp) -mp4track$(EXEEXT): $(mp4track_OBJECTS) $(mp4track_DEPENDENCIES) - @rm -f mp4track$(EXEEXT) - $(CXXLINK) $(mp4track_OBJECTS) $(mp4track_LDADD) $(LIBS) -util/mp4trackdump.$(OBJEXT): util/$(am__dirstamp) \ - util/$(DEPDIR)/$(am__dirstamp) -mp4trackdump$(EXEEXT): $(mp4trackdump_OBJECTS) $(mp4trackdump_DEPENDENCIES) - @rm -f mp4trackdump$(EXEEXT) - $(CXXLINK) $(mp4trackdump_OBJECTS) $(mp4trackdump_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f libplatform/io/File.$(OBJEXT) - -rm -f libplatform/io/File.lo - -rm -f libplatform/io/FileSystem.$(OBJEXT) - -rm -f libplatform/io/FileSystem.lo - -rm -f libplatform/io/FileSystem_posix.$(OBJEXT) - -rm -f libplatform/io/FileSystem_posix.lo - -rm -f libplatform/io/FileSystem_win32.$(OBJEXT) - -rm -f libplatform/io/FileSystem_win32.lo - -rm -f libplatform/io/File_posix.$(OBJEXT) - -rm -f libplatform/io/File_posix.lo - -rm -f libplatform/io/File_win32.$(OBJEXT) - -rm -f libplatform/io/File_win32.lo - -rm -f libplatform/number/random_posix.$(OBJEXT) - -rm -f libplatform/number/random_posix.lo - -rm -f libplatform/number/random_win32.$(OBJEXT) - -rm -f libplatform/number/random_win32.lo - -rm -f libplatform/process/process_posix.$(OBJEXT) - -rm -f libplatform/process/process_posix.lo - -rm -f libplatform/process/process_win32.$(OBJEXT) - -rm -f libplatform/process/process_win32.lo - -rm -f libplatform/prog/option.$(OBJEXT) - -rm -f libplatform/prog/option.lo - -rm -f libplatform/sys/error.$(OBJEXT) - -rm -f libplatform/sys/error.lo - -rm -f libplatform/time/time.$(OBJEXT) - -rm -f libplatform/time/time.lo - -rm -f libplatform/time/time_posix.$(OBJEXT) - -rm -f libplatform/time/time_posix.lo - -rm -f libplatform/time/time_win32.$(OBJEXT) - -rm -f libplatform/time/time_win32.lo - -rm -f libutil/Database.$(OBJEXT) - -rm -f libutil/Database.lo - -rm -f libutil/Timecode.$(OBJEXT) - -rm -f libutil/Timecode.lo - -rm -f libutil/TrackModifier.$(OBJEXT) - -rm -f libutil/TrackModifier.lo - -rm -f libutil/Utility.$(OBJEXT) - -rm -f libutil/Utility.lo - -rm -f libutil/crc.$(OBJEXT) - -rm -f libutil/crc.lo - -rm -f libutil/other.$(OBJEXT) - -rm -f libutil/other.lo - -rm -f src/3gp.$(OBJEXT) - -rm -f src/3gp.lo - -rm -f src/atom_ac3.$(OBJEXT) - -rm -f src/atom_ac3.lo - -rm -f src/atom_amr.$(OBJEXT) - -rm -f src/atom_amr.lo - -rm -f src/atom_avc1.$(OBJEXT) - -rm -f src/atom_avc1.lo - -rm -f src/atom_avcC.$(OBJEXT) - -rm -f src/atom_avcC.lo - -rm -f src/atom_chpl.$(OBJEXT) - -rm -f src/atom_chpl.lo - -rm -f src/atom_colr.$(OBJEXT) - -rm -f src/atom_colr.lo - -rm -f src/atom_d263.$(OBJEXT) - -rm -f src/atom_d263.lo - -rm -f src/atom_dac3.$(OBJEXT) - -rm -f src/atom_dac3.lo - -rm -f src/atom_damr.$(OBJEXT) - -rm -f src/atom_damr.lo - -rm -f src/atom_dref.$(OBJEXT) - -rm -f src/atom_dref.lo - -rm -f src/atom_elst.$(OBJEXT) - -rm -f src/atom_elst.lo - -rm -f src/atom_enca.$(OBJEXT) - -rm -f src/atom_enca.lo - -rm -f src/atom_encv.$(OBJEXT) - -rm -f src/atom_encv.lo - -rm -f src/atom_free.$(OBJEXT) - -rm -f src/atom_free.lo - -rm -f src/atom_ftab.$(OBJEXT) - -rm -f src/atom_ftab.lo - -rm -f src/atom_ftyp.$(OBJEXT) - -rm -f src/atom_ftyp.lo - -rm -f src/atom_gmin.$(OBJEXT) - -rm -f src/atom_gmin.lo - -rm -f src/atom_hdlr.$(OBJEXT) - -rm -f src/atom_hdlr.lo - -rm -f src/atom_hinf.$(OBJEXT) - -rm -f src/atom_hinf.lo - -rm -f src/atom_hnti.$(OBJEXT) - -rm -f src/atom_hnti.lo - -rm -f src/atom_href.$(OBJEXT) - -rm -f src/atom_href.lo - -rm -f src/atom_mdat.$(OBJEXT) - -rm -f src/atom_mdat.lo - -rm -f src/atom_mdhd.$(OBJEXT) - -rm -f src/atom_mdhd.lo - -rm -f src/atom_meta.$(OBJEXT) - -rm -f src/atom_meta.lo - -rm -f src/atom_mp4s.$(OBJEXT) - -rm -f src/atom_mp4s.lo - -rm -f src/atom_mp4v.$(OBJEXT) - -rm -f src/atom_mp4v.lo - -rm -f src/atom_mvhd.$(OBJEXT) - -rm -f src/atom_mvhd.lo - -rm -f src/atom_nmhd.$(OBJEXT) - -rm -f src/atom_nmhd.lo - -rm -f src/atom_ohdr.$(OBJEXT) - -rm -f src/atom_ohdr.lo - -rm -f src/atom_pasp.$(OBJEXT) - -rm -f src/atom_pasp.lo - -rm -f src/atom_root.$(OBJEXT) - -rm -f src/atom_root.lo - -rm -f src/atom_rtp.$(OBJEXT) - -rm -f src/atom_rtp.lo - -rm -f src/atom_s263.$(OBJEXT) - -rm -f src/atom_s263.lo - -rm -f src/atom_sdp.$(OBJEXT) - -rm -f src/atom_sdp.lo - -rm -f src/atom_sdtp.$(OBJEXT) - -rm -f src/atom_sdtp.lo - -rm -f src/atom_smi.$(OBJEXT) - -rm -f src/atom_smi.lo - -rm -f src/atom_sound.$(OBJEXT) - -rm -f src/atom_sound.lo - -rm -f src/atom_standard.$(OBJEXT) - -rm -f src/atom_standard.lo - -rm -f src/atom_stbl.$(OBJEXT) - -rm -f src/atom_stbl.lo - -rm -f src/atom_stdp.$(OBJEXT) - -rm -f src/atom_stdp.lo - -rm -f src/atom_stsc.$(OBJEXT) - -rm -f src/atom_stsc.lo - -rm -f src/atom_stsd.$(OBJEXT) - -rm -f src/atom_stsd.lo - -rm -f src/atom_stsz.$(OBJEXT) - -rm -f src/atom_stsz.lo - -rm -f src/atom_stz2.$(OBJEXT) - -rm -f src/atom_stz2.lo - -rm -f src/atom_text.$(OBJEXT) - -rm -f src/atom_text.lo - -rm -f src/atom_tfhd.$(OBJEXT) - -rm -f src/atom_tfhd.lo - -rm -f src/atom_tkhd.$(OBJEXT) - -rm -f src/atom_tkhd.lo - -rm -f src/atom_treftype.$(OBJEXT) - -rm -f src/atom_treftype.lo - -rm -f src/atom_trun.$(OBJEXT) - -rm -f src/atom_trun.lo - -rm -f src/atom_tx3g.$(OBJEXT) - -rm -f src/atom_tx3g.lo - -rm -f src/atom_udta.$(OBJEXT) - -rm -f src/atom_udta.lo - -rm -f src/atom_url.$(OBJEXT) - -rm -f src/atom_url.lo - -rm -f src/atom_urn.$(OBJEXT) - -rm -f src/atom_urn.lo - -rm -f src/atom_uuid.$(OBJEXT) - -rm -f src/atom_uuid.lo - -rm -f src/atom_video.$(OBJEXT) - -rm -f src/atom_video.lo - -rm -f src/atom_vmhd.$(OBJEXT) - -rm -f src/atom_vmhd.lo - -rm -f src/bmff/typebmff.$(OBJEXT) - -rm -f src/bmff/typebmff.lo - -rm -f src/cmeta.$(OBJEXT) - -rm -f src/cmeta.lo - -rm -f src/descriptors.$(OBJEXT) - -rm -f src/descriptors.lo - -rm -f src/exception.$(OBJEXT) - -rm -f src/exception.lo - -rm -f src/isma.$(OBJEXT) - -rm -f src/isma.lo - -rm -f src/itmf/CoverArtBox.$(OBJEXT) - -rm -f src/itmf/CoverArtBox.lo - -rm -f src/itmf/Tags.$(OBJEXT) - -rm -f src/itmf/Tags.lo - -rm -f src/itmf/generic.$(OBJEXT) - -rm -f src/itmf/generic.lo - -rm -f src/itmf/type.$(OBJEXT) - -rm -f src/itmf/type.lo - -rm -f src/log.$(OBJEXT) - -rm -f src/log.lo - -rm -f src/mp4.$(OBJEXT) - -rm -f src/mp4.lo - -rm -f src/mp4atom.$(OBJEXT) - -rm -f src/mp4atom.lo - -rm -f src/mp4container.$(OBJEXT) - -rm -f src/mp4container.lo - -rm -f src/mp4descriptor.$(OBJEXT) - -rm -f src/mp4descriptor.lo - -rm -f src/mp4file.$(OBJEXT) - -rm -f src/mp4file.lo - -rm -f src/mp4file_io.$(OBJEXT) - -rm -f src/mp4file_io.lo - -rm -f src/mp4info.$(OBJEXT) - -rm -f src/mp4info.lo - -rm -f src/mp4property.$(OBJEXT) - -rm -f src/mp4property.lo - -rm -f src/mp4track.$(OBJEXT) - -rm -f src/mp4track.lo - -rm -f src/mp4util.$(OBJEXT) - -rm -f src/mp4util.lo - -rm -f src/ocidescriptors.$(OBJEXT) - -rm -f src/ocidescriptors.lo - -rm -f src/odcommands.$(OBJEXT) - -rm -f src/odcommands.lo - -rm -f src/qosqualifiers.$(OBJEXT) - -rm -f src/qosqualifiers.lo - -rm -f src/qtff/ColorParameterBox.$(OBJEXT) - -rm -f src/qtff/ColorParameterBox.lo - -rm -f src/qtff/PictureAspectRatioBox.$(OBJEXT) - -rm -f src/qtff/PictureAspectRatioBox.lo - -rm -f src/qtff/coding.$(OBJEXT) - -rm -f src/qtff/coding.lo - -rm -f src/rtphint.$(OBJEXT) - -rm -f src/rtphint.lo - -rm -f src/text.$(OBJEXT) - -rm -f src/text.lo - -rm -f util/mp4art.$(OBJEXT) - -rm -f util/mp4chaps.$(OBJEXT) - -rm -f util/mp4extract.$(OBJEXT) - -rm -f util/mp4file.$(OBJEXT) - -rm -f util/mp4info.$(OBJEXT) - -rm -f util/mp4subtitle.$(OBJEXT) - -rm -f util/mp4tags.$(OBJEXT) - -rm -f util/mp4track.$(OBJEXT) - -rm -f util/mp4trackdump.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/io/$(DEPDIR)/File.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/io/$(DEPDIR)/FileSystem.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/io/$(DEPDIR)/FileSystem_posix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/io/$(DEPDIR)/FileSystem_win32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/io/$(DEPDIR)/File_posix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/io/$(DEPDIR)/File_win32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/number/$(DEPDIR)/random_posix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/number/$(DEPDIR)/random_win32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/process/$(DEPDIR)/process_posix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/process/$(DEPDIR)/process_win32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/prog/$(DEPDIR)/option.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/sys/$(DEPDIR)/error.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/time/$(DEPDIR)/time.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/time/$(DEPDIR)/time_posix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libplatform/time/$(DEPDIR)/time_win32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libutil/$(DEPDIR)/Database.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libutil/$(DEPDIR)/Timecode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libutil/$(DEPDIR)/TrackModifier.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libutil/$(DEPDIR)/Utility.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libutil/$(DEPDIR)/crc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libutil/$(DEPDIR)/other.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/3gp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_ac3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_amr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_avc1.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_avcC.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_chpl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_colr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_d263.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_dac3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_damr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_dref.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_elst.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_enca.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_encv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_free.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_ftab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_ftyp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_gmin.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_hdlr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_hinf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_hnti.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_href.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_mdat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_mdhd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_meta.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_mp4s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_mp4v.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_mvhd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_nmhd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_ohdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_pasp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_root.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_rtp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_s263.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_sdp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_sdtp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_smi.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_sound.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_standard.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_stbl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_stdp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_stsc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_stsd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_stsz.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_stz2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_text.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_tfhd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_tkhd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_treftype.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_trun.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_tx3g.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_udta.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_url.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_urn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_uuid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_video.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/atom_vmhd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/cmeta.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/descriptors.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/exception.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/isma.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/log.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mp4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mp4atom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mp4container.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mp4descriptor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mp4file.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mp4file_io.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mp4info.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mp4property.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mp4track.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mp4util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ocidescriptors.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/odcommands.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/qosqualifiers.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/rtphint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/text.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/bmff/$(DEPDIR)/typebmff.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/itmf/$(DEPDIR)/CoverArtBox.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/itmf/$(DEPDIR)/Tags.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/itmf/$(DEPDIR)/generic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/itmf/$(DEPDIR)/type.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/qtff/$(DEPDIR)/ColorParameterBox.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/qtff/$(DEPDIR)/PictureAspectRatioBox.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/qtff/$(DEPDIR)/coding.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/mp4art.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/mp4chaps.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/mp4extract.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/mp4file.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/mp4info.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/mp4subtitle.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/mp4tags.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/mp4track.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/mp4trackdump.Po@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -rm -rf libplatform/io/.libs libplatform/io/_libs - -rm -rf libplatform/number/.libs libplatform/number/_libs - -rm -rf libplatform/process/.libs libplatform/process/_libs - -rm -rf libplatform/prog/.libs libplatform/prog/_libs - -rm -rf libplatform/sys/.libs libplatform/sys/_libs - -rm -rf libplatform/time/.libs libplatform/time/_libs - -rm -rf libutil/.libs libutil/_libs - -rm -rf src/.libs src/_libs - -rm -rf src/bmff/.libs src/bmff/_libs - -rm -rf src/itmf/.libs src/itmf/_libs - -rm -rf src/qtff/.libs src/qtff/_libs - -distclean-libtool: - -rm -f libtool config.lt -install-man1: $(man1_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } -install-mp4v2incHEADERS: $(mp4v2inc_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(mp4v2incdir)" || $(MKDIR_P) "$(DESTDIR)$(mp4v2incdir)" - @list='$(mp4v2inc_HEADERS)'; test -n "$(mp4v2incdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(mp4v2incdir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(mp4v2incdir)" || exit $$?; \ - done - -uninstall-mp4v2incHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(mp4v2inc_HEADERS)'; test -n "$(mp4v2incdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(mp4v2incdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(mp4v2incdir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-DEJAGNU: site.exp - srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ - EXPECT=$(EXPECT); export EXPECT; \ - runtest=$(RUNTEST); \ - if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ - exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \ - if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ - then :; else exit_status=1; fi; \ - done; \ - else echo "WARNING: could not find \`runtest'" 1>&2; :;\ - fi; \ - exit $$exit_status -site.exp: Makefile - @echo 'Making a new site.exp file...' - @echo '## these variables are automatically generated by make ##' >site.tmp - @echo '# Do not edit here. If you wish to override these values' >>site.tmp - @echo '# edit the last section' >>site.tmp - @echo 'set srcdir $(srcdir)' >>site.tmp - @echo "set objdir `pwd`" >>site.tmp - @echo 'set build_alias "$(build_alias)"' >>site.tmp - @echo 'set build_triplet $(build_triplet)' >>site.tmp - @echo 'set host_alias "$(host_alias)"' >>site.tmp - @echo 'set host_triplet $(host_triplet)' >>site.tmp - @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp - @test ! -f site.exp || \ - sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp - @-rm -f site.bak - @test ! -f site.exp || mv site.exp site.bak - @mv site.tmp site.exp - -distclean-DEJAGNU: - -rm -f site.exp site.bak - -l='$(DEJATOOL)'; for tool in $$l; do \ - rm -f $$tool.sum $$tool.log; \ - done - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU -check: check-am -all-am: GNUmakefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS) -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(mp4v2incdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f libplatform/io/$(DEPDIR)/$(am__dirstamp) - -rm -f libplatform/io/$(am__dirstamp) - -rm -f libplatform/number/$(DEPDIR)/$(am__dirstamp) - -rm -f libplatform/number/$(am__dirstamp) - -rm -f libplatform/process/$(DEPDIR)/$(am__dirstamp) - -rm -f libplatform/process/$(am__dirstamp) - -rm -f libplatform/prog/$(DEPDIR)/$(am__dirstamp) - -rm -f libplatform/prog/$(am__dirstamp) - -rm -f libplatform/sys/$(DEPDIR)/$(am__dirstamp) - -rm -f libplatform/sys/$(am__dirstamp) - -rm -f libplatform/time/$(DEPDIR)/$(am__dirstamp) - -rm -f libplatform/time/$(am__dirstamp) - -rm -f libutil/$(DEPDIR)/$(am__dirstamp) - -rm -f libutil/$(am__dirstamp) - -rm -f src/$(DEPDIR)/$(am__dirstamp) - -rm -f src/$(am__dirstamp) - -rm -f src/bmff/$(DEPDIR)/$(am__dirstamp) - -rm -f src/bmff/$(am__dirstamp) - -rm -f src/itmf/$(DEPDIR)/$(am__dirstamp) - -rm -f src/itmf/$(am__dirstamp) - -rm -f src/qtff/$(DEPDIR)/$(am__dirstamp) - -rm -f src/qtff/$(am__dirstamp) - -rm -f util/$(DEPDIR)/$(am__dirstamp) - -rm -f util/$(am__dirstamp) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf libplatform/io/$(DEPDIR) libplatform/number/$(DEPDIR) libplatform/process/$(DEPDIR) libplatform/prog/$(DEPDIR) libplatform/sys/$(DEPDIR) libplatform/time/$(DEPDIR) libutil/$(DEPDIR) src/$(DEPDIR) src/bmff/$(DEPDIR) src/itmf/$(DEPDIR) src/qtff/$(DEPDIR) util/$(DEPDIR) - -rm -f GNUmakefile -distclean-am: clean-am distclean-DEJAGNU distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-local distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man install-mp4v2incHEADERS - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf libplatform/io/$(DEPDIR) libplatform/number/$(DEPDIR) libplatform/process/$(DEPDIR) libplatform/prog/$(DEPDIR) libplatform/sys/$(DEPDIR) libplatform/time/$(DEPDIR) libutil/$(DEPDIR) src/$(DEPDIR) src/bmff/$(DEPDIR) src/itmf/$(DEPDIR) src/qtff/$(DEPDIR) util/$(DEPDIR) - -rm -f GNUmakefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ - uninstall-man uninstall-mp4v2incHEADERS - -uninstall-man: uninstall-man1 - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS all all-am am--refresh check check-DEJAGNU \ - check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ - ctags dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzma \ - dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-DEJAGNU distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-local distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-libLTLIBRARIES \ - install-man install-man1 install-mp4v2incHEADERS install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-libLTLIBRARIES uninstall-man uninstall-man1 \ - uninstall-mp4v2incHEADERS - - -override RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir/testsuite --outdir $(TESTLOGDIR) - -############################################################################### - -clean-local: - -distclean-local: - rm -f $(top_builddir)/Makefile - rm -f $(top_builddir)/testlog/*.log - rm -f $(top_builddir)/testlog/*.sum - -############################################################################### - -Makefile: ${Makefile} - touch $@ - $(mkdir_p) $(TESTLOGDIR) - -dist-hook: - -############################################################################### - --include $(top_srcdir)/doc/GNUmakefile.mk - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/INSTALL b/debian/mp4v2/mp4v2-2.0.0~dfsg0/INSTALL deleted file mode 100644 index d3c5b40a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/INSTALL +++ /dev/null @@ -1,237 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007 Free Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 6. Often, you can also type `make uninstall' to remove the installed - files again. - -Compilers and Options -===================== - -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - -You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - -Installation Names -================== - -By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/README b/debian/mp4v2/mp4v2-2.0.0~dfsg0/README deleted file mode 100644 index bce10aff..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/README +++ /dev/null @@ -1,5 +0,0 @@ -All docs are located in doc/ subdirectory. Useful starting points: - -Release Notes -- doc/ReleaseNotes.txt -Building the Source -- doc/BuildSource.txt -Building the Repository -- doc/BuildRepository.txt diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/aclocal.m4 b/debian/mp4v2/mp4v2-2.0.0~dfsg0/aclocal.m4 deleted file mode 100644 index 91c7b241..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/aclocal.m4 +++ /dev/null @@ -1,8917 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3017 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/config.guess b/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/config.guess deleted file mode 100755 index e3a2116a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/config.guess +++ /dev/null @@ -1,1533 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-06-10' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd | genuineintel) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/config.sub b/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/config.sub deleted file mode 100755 index eb0389a6..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/config.sub +++ /dev/null @@ -1,1693 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-06-11' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/depcomp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/depcomp deleted file mode 100755 index df8eea7e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/depcomp +++ /dev/null @@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/install-sh b/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/install-sh deleted file mode 100755 index 6781b987..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/install-sh +++ /dev/null @@ -1,520 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2009-04-28.21; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/ltmain.sh b/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/ltmain.sh deleted file mode 100755 index 7ed280bc..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/ltmain.sh +++ /dev/null @@ -1,8413 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6b -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" -TIMESTAMP="" -package_revision=1.3017 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# Generated shell functions inserted here. - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_emit_wrapper_part1 [arg=no] -# -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -# define setmode _setmode -#else -# include -# include -# ifdef __CYGWIN__ -# include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); - for (i = 0; i < newargc; i++) - { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); - } - -EOF - - case $host_os in - mingw*) - cat <<"EOF" - /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); - if (rval == -1) - { - /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); - return 127; - } - return rval; -EOF - ;; - *) - cat <<"EOF" - execv (lt_argv_zero, newargz); - return rval; /* =127, but avoids unused variable warning */ -EOF - ;; - esac - - cat <<"EOF" -} - -void * -xmalloc (size_t num) -{ - void *p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), - string) : NULL; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char) name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable (const char *path) -{ - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} - -void -lt_setenv (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - - -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - *) - func_fatal_configuration "$modename: unknown library version type \`$version_type'" - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/missing b/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/missing deleted file mode 100755 index 28055d2a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/autoaux/missing +++ /dev/null @@ -1,376 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/configure b/debian/mp4v2/mp4v2-2.0.0~dfsg0/configure deleted file mode 100755 index 21b2dc03..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/configure +++ /dev/null @@ -1,17429 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for MP4v2 2.0.0. -# -# Report bugs to . -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and kidjan@gmail.com -$0: about your system, including any error possibly output -$0: before this message. Then install a modern shell, or -$0: manually run the script under such a shell if you do -$0: have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='MP4v2' -PACKAGE_TARNAME='mp4v2' -PACKAGE_VERSION='2.0.0' -PACKAGE_STRING='MP4v2 2.0.0' -PACKAGE_BUGREPORT='kidjan@gmail.com' -PACKAGE_URL='' - -ac_unique_file="src/mp4.cpp" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -X_MINGW_LIBS -X_CXX_I -X_CXX_D -X_CXX_W -X_CXX_ARCH -ADD_MANS_FALSE -ADD_MANS_TRUE -ADD_UTIL_FALSE -ADD_UTIL_TRUE -ADD_PLATFORM_WIN32_FALSE -ADD_PLATFORM_WIN32_TRUE -ADD_PLATFORM_POSIX_FALSE -ADD_PLATFORM_POSIX_TRUE -X_GCH_SHARED_FLAGS -X_GCH_SHARED -X_GCH_STATIC_FLAGS -X_GCH_STATIC -X_GCH_FLAGS -X_GCH -X_libmp4v2_la_LDFLAGS -PROJECT_build -PROJECT_repo_type -PROJECT_repo_date -PROJECT_repo_rev -PROJECT_repo_uuid -PROJECT_repo_root -PROJECT_repo_branch -PROJECT_repo_url -PROJECT_version_point -PROJECT_version_minor -PROJECT_version_major -PROJECT_version_hex -PROJECT_version -PROJECT_bugreport -PROJECT_irc -PROJECT_url_discussion -PROJECT_url_downloads -PROJECT_url_website -PROJECT_name_formal -PROJECT_name_upper -PROJECT_name_lower -PROJECT_name -FOUND_HELP2MAN -CXXCPP -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -lt_ECHO -RANLIB -AR -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -ac_ct_CC -CFLAGS -CC -LIBTOOL -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CXX -CPPFLAGS -LDFLAGS -CXXFLAGS -CXX -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_debug -enable_optimize -enable_fvisibility -enable_gch -enable_largefile -enable_util -enable_bi -enable_ub -enable_cygwin_win32 -enable_mingw_mt -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -enable_libtool_lock -' - ac_precious_vars='build_alias -host_alias -target_alias -CXX -CXXFLAGS -LDFLAGS -LIBS -CPPFLAGS -CCC -CC -CFLAGS -CPP -CXXCPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures MP4v2 2.0.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/mp4v2] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of MP4v2 2.0.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-debug disable debugging compilation - --disable-optimize disable optimizing compilation - --disable-fvisibility disable use of -fvisibility - --disable-gch disable GCC precompiled-headers - --disable-largefile disable LFS (large file support) - --disable-util disable build of command-line utilities - --enable-bi=ARCH enable -mARCH for bi-arch compilation - --enable-ub[=ARCHS] enable -arch ARCH for universal-binaries (OSX only) - --enable-cygwin-win32 when building with Cygwin use -mwin32 - --enable-mingw-threads when building with MinGW use -mthreads - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - -Some influential environment variables: - CXX C++ compiler command - CXXFLAGS C++ compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CC C compiler command - CFLAGS C compiler flags - CPP C preprocessor - CXXCPP C++ preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -MP4v2 configure 2.0.0 -generated by GNU Autoconf 2.65 - -Copyright (C) 2009 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by MP4v2 $as_me 2.0.0, which was -generated by GNU Autoconf 2.65. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: - --> - --> Configuring MP4v2 2.0.0 - -->" >&5 -$as_echo "$as_me: - --> - --> Configuring MP4v2 2.0.0 - -->" >&6;} - -ac_aux_dir= -for ac_dir in autoaux "$srcdir"/autoaux; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in autoaux \"$srcdir\"/autoaux" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -am__api_version='1.11' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='mp4v2' - VERSION='2.0.0' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - - - -# disable unused langs (improves config speed, reduces configure file size) - - - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - -############################################################################### -# add configure options -############################################################################### - -if test -z "$enable_dependency_tracking"; then - enable_dependency_tracking=no -fi - -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; -fi - -# Check whether --enable-optimize was given. -if test "${enable_optimize+set}" = set; then : - enableval=$enable_optimize; -fi - -# Check whether --enable-fvisibility was given. -if test "${enable_fvisibility+set}" = set; then : - enableval=$enable_fvisibility; -fi - -# Check whether --enable-gch was given. -if test "${enable_gch+set}" = set; then : - enableval=$enable_gch; -fi - -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi - -# Check whether --enable-util was given. -if test "${enable_util+set}" = set; then : - enableval=$enable_util; -fi - -# Check whether --enable-bi was given. -if test "${enable_bi+set}" = set; then : - enableval=$enable_bi; -fi - -# Check whether --enable-ub was given. -if test "${enable_ub+set}" = set; then : - enableval=$enable_ub; -fi - -# Check whether --enable-cygwin_win32 was given. -if test "${enable_cygwin_win32+set}" = set; then : - enableval=$enable_cygwin_win32; -fi - -# Check whether --enable-mingw_mt was given. -if test "${enable_mingw_mt+set}" = set; then : - enableval=$enable_mingw_mt; -fi - - -############################################################################### -# checks for programs -############################################################################### - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 -$as_echo_n "checking whether the C++ compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C++ compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 -$as_echo_n "checking for C++ compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C++ compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.6b' -macro_revision='1.3017' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5035: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:5038: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:5041: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 6247 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -_lt_caught_CXX_error=yes; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - - - - - - - - - - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8300: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:8304: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8639: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:8643: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8744: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:8748: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8799: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:8803: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - link_all_deplibs=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - link_all_deplibs=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo(void) {} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 11183 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 11279 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec_CXX='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - gnu*) - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5]* | *pgcpp\ [1-5]*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no - - GCC_CXX="$GXX" - LD_CXX="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13235: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:13239: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13334: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13338: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13386: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13390: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - link_all_deplibs_CXX=no - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 -$as_echo "$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - -# Extract the first word of "help2man", so it can be a program name with args. -set dummy help2man; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_FOUND_HELP2MAN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$FOUND_HELP2MAN"; then - ac_cv_prog_FOUND_HELP2MAN="$FOUND_HELP2MAN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_FOUND_HELP2MAN="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_FOUND_HELP2MAN" && ac_cv_prog_FOUND_HELP2MAN="no" -fi -fi -FOUND_HELP2MAN=$ac_cv_prog_FOUND_HELP2MAN -if test -n "$FOUND_HELP2MAN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOUND_HELP2MAN" >&5 -$as_echo "$FOUND_HELP2MAN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -############################################################################### -# top-level platform check -############################################################################### - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $PACKAGE_NAME platform portability" >&5 -$as_echo_n "checking $PACKAGE_NAME platform portability... " >&6; } -X_PLATFORM=posix -case ${host} in -*-*-cygwin) - X_CXX_W="$X_CXX_W -Wno-format" - if test "$enable_cygwin_win32" = "yes"; then - X_PLATFORM=win32 - X_CXX_ARCH="$X_CXX_ARCH -mwin32" - fi - ;; -*-*-mingw*) - # do not support shared - enable_shared=no - X_PLATFORM=win32 - X_MINGW_LIBS="$X_MINGW_LIBS" - X_CXX_W="$X_CXX_W -Wno-format" - if test "$enable_mingw_threads" = "yes"; then - X_CXX_ARCH="$X_CXX_ARCH -mthreads" - fi - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $X_PLATFORM" >&5 -$as_echo "$X_PLATFORM" >&6; } - -############################################################################### -# prepare project metadata -############################################################################### - -PROJECT_name="MP4v2" -PROJECT_name_lower="mp4v2" -PROJECT_name_upper="MP4V2" -PROJECT_name_formal="MP4v2 2.0.0" -PROJECT_url_website="http://code.google.com/p/mp4v2" -PROJECT_url_downloads="http://code.google.com/p/mp4v2/downloads/list" -PROJECT_url_discussion="http://groups.google.com/group/mp4v2" -PROJECT_irc="irc://irc.freenode.net/handbrake" -PROJECT_bugreport="" - -PROJECT_version="2.0.0" -PROJECT_version_hex="0x00020000" -PROJECT_version_major="2" -PROJECT_version_minor="0" -PROJECT_version_point="0" -PROJECT_repo_url="https://mp4v2.googlecode.com/svn/releases/2.0.0" -PROJECT_repo_branch="2.0.0" -PROJECT_repo_root="https://mp4v2.googlecode.com/svn" -PROJECT_repo_uuid="6e6572fa-98a6-11dd-ad9f-f77439c74b79" -PROJECT_repo_rev="493" -PROJECT_repo_date="2012-05-20 15:16:54 -0700 (Sun, 20 May 2012)" -PROJECT_repo_type="stable" -PROJECT_build="`date`" - -test -z "$PROJECT_version_hex" && PROJECT_version_hex="0x0000000000000000LL" -test -z "$PROJECT_version_major" && PROJECT_version_major="0" -test -z "$PROJECT_version_minor" && PROJECT_version_minor="0" -test -z "$PROJECT_version_point" && PROJECT_version_point="0" -test -z "$PROJECT_repo_url" && PROJECT_repo_url="svn://nowhere.com/project/unknown" -test -z "$PROJECT_repo_branch" && PROJECT_repo_branch="unknown" -test -z "$PROJECT_repo_root" && PROJECT_repo_root="svn://nowhere.com/project" -test -z "$PROJECT_repo_uuid" && PROJECT_repo_uuid="00000000-0000-0000-0000-000000000000" -test -z "$PROJECT_repo_rev" && PROJECT_repo_rev="0" -test -z "$PROJECT_repo_date" && PROJECT_repo_date="unknown" -test -z "$PROJECT_repo_type" && PROJECT_repo_type="unknown" -test -z "$PROJECT_build" && PROJECT_build="unknown" - - - - - - - - - - - - - - - - - - - - - - - - -############################################################################### -# checks for libraries -############################################################################### - -############################################################################### -# checks for header files -############################################################################### - -############################################################################### -# checks for typedefs, structures, and compiler characteristics -############################################################################### - -############################################################################### -# replace -ggdb3 with -ggdb2 to avoid GNU 'as' from failing -# See http://code.google.com/p/mp4v2/issues/detail?id=27 -############################################################################### -if test "$GXX" = "yes"; then - CXXFLAGS_GGDB3=`echo "$CXXFLAGS" | sed -e 's/-ggdb3/-ggdb2/'` - CXXFLAGS="$CXXFLAGS_GGDB3" -fi - -############################################################################### -# additional ldflags -############################################################################### - -case ${host} in - *-*-darwin*) - X_libmp4v2_la_LDFLAGS='-Wl,-current_version,$(PROJECT_version_major).$(PROJECT_version_minor).$(PROJECT_version_point) -Wl,-compatibility_version,$(PROJECT_version_major).0.0' - ;; - *-*-cygwin*) - X_libmp4v2_la_LDFLAGS='-no-undefined' - ;; - *) - X_libmp4v2_la_LDFLAGS= - ;; -esac - - - -############################################################################### -# check for --disable-fvisibility -############################################################################### - -if test "$enable_fvisibility" != "no" -a "$GXX" = "yes"; then - case ${host} in - *-*-cygwin) - ;; - *-*-mingw*) - ;; - *) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -fvisibility" >&5 -$as_echo_n "checking if $CXX supports -fvisibility... " >&6; } -if test "${x_cv_fvisibility+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - x_save="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -fvisibility=hidden" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - x_cv_fvisibility=yes -else - x_cv_fvisibility=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$x_cv_fvisibility" != "yes"; then - CXXFLAGS="$x_save" - fi - x_save= - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $x_cv_fvisibility" >&5 -$as_echo "$x_cv_fvisibility" >&6; } - ;; - esac -fi - -############################################################################### -# check for --disable-gch -############################################################################### - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GCC precompiled-headers should be created" >&5 -$as_echo_n "checking if GCC precompiled-headers should be created... " >&6; } - -X_GCH=0 -X_GCH_FLAGS= -X_GCH_STATIC=0 -X_GCH_STATIC_FLAGS="$lt_prog_compiler_static_CXX" -X_GCH_SHARED=0 -X_GCH_SHARED_FLAGS="$lt_prog_compiler_pic_CXX" - -if test "$enable_gch" = "yes"; then - X_GCH=1 -elif test "$enable_gch" != "no"; then - if test "$GXX" = "yes"; then - case ${host_os} in - cygwin*|darwin*|freebsd*|linux*|mingw*|solaris*) - X_GCH=1 - ;; - esac - fi -fi - -if test "$X_GCH" -eq 1; then - x_gch_result="yes" - if test "$enable_static" = "yes"; then - X_GCH_STATIC=1 - fi - if test "$enable_shared" = "yes"; then - X_GCH_SHARED=1 - fi -else - x_gch_result="no" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $x_gch_result" >&5 -$as_echo "$x_gch_result" >&6; } - - - - - - - - -############################################################################### -# check for --disable-largefile -############################################################################### - -if test "$enable_largefile" != "no" -a "$ac_cv_header_unistd_h" = "yes"; then - case ${host_cpu} in - i?86|ppc) - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LFS (large file support) is required" >&5 -$as_echo_n "checking if LFS (large file support) is required... " >&6; } -if test "${x_cv_largefile+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifndef _LFS_LARGEFILE - error: not LFS conformant -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - x_cv_largefile=yes -else - x_cv_largefile=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $x_cv_largefile" >&5 -$as_echo "$x_cv_largefile" >&6; } - if test "$x_cv_largefile" = "yes"; then - -$as_echo "#define NEED_LFS_ACTIVATION 1" >>confdefs.h - - fi - ;; - esac -fi - -############################################################################### -# set arch flags -############################################################################### - -if test "$GXX" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking arch flags" >&5 -$as_echo_n "checking arch flags... " >&6; } - x_flags= - x_save_IFS=$IFS; IFS=, - for arch in ${enable_ub}; do - case "$arch" in - ""|no) - ;; - yes) - case ${host} in - *-*-darwin*) - x_flags="$xflags -arch i386 -arch x86_64 -arch ppc -arch ppc64" - ;; - esac - ;; - *) - x_flags="$x_flags -arch $arch" - ;; - esac - done - IFS=$x_save_IFS - - case "$enable_bi" in - ""|no|yes) - ;; - *) - x_flags="$x_flags -m${enable_bi}" - ;; - esac - - if test -n "$x_flags"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $x_flags" >&5 -$as_echo "$x_flags" >&6; } - X_CXX_ARCH="$X_CXX_ARCH $x_flags" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } - fi - - x_flags= -fi - -############################################################################### -# disable debugging -############################################################################### - -if test "$enable_debug" = "no"; then - if test "$GCC" = "yes"; then - CFLAGS=`echo "$CFLAGS" | sed -e 's/-g[^ ]*[ ]*//' -e 's/^ //' -e 's/ $//'` - fi - if test "$GXX" = "yes"; then - CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/-g[^ ]*[ ]*//' -e 's/^ //' -e 's/ $//'` - fi - fi - -############################################################################### -# disable optimizing -############################################################################### - -if test "$enable_optimize" = "no"; then - if test "$GCC" = "yes"; then - CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[^ ]*[ ]*//' -e 's/^ //' -e 's/ $//'` - fi - if test "$GXX" = "yes"; then - CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/-O[^ ]*[ ]*//' -e 's/^ //' -e 's/ $//'` - fi - fi - -############################################################################### -# checks for library functions -############################################################################### - -############################################################################### -# conditional compilation -############################################################################### - - if test "$X_PLATFORM" = "posix"; then - ADD_PLATFORM_POSIX_TRUE= - ADD_PLATFORM_POSIX_FALSE='#' -else - ADD_PLATFORM_POSIX_TRUE='#' - ADD_PLATFORM_POSIX_FALSE= -fi - - if test "$X_PLATFORM" = "win32"; then - ADD_PLATFORM_WIN32_TRUE= - ADD_PLATFORM_WIN32_FALSE='#' -else - ADD_PLATFORM_WIN32_TRUE='#' - ADD_PLATFORM_WIN32_FALSE= -fi - - - if test "$enable_util" != "no"; then - ADD_UTIL_TRUE= - ADD_UTIL_FALSE='#' -else - ADD_UTIL_TRUE='#' - ADD_UTIL_FALSE= -fi - - if test "$X_PLATFORM" != "win32"; then - ADD_MANS_TRUE= - ADD_MANS_FALSE='#' -else - ADD_MANS_TRUE='#' - ADD_MANS_FALSE= -fi - - -############################################################################### -# declare common substitutions -############################################################################### - - - - - - - -############################################################################### -# output files -############################################################################### - -ac_config_headers="$ac_config_headers libplatform/config.h" - - -ac_config_files="$ac_config_files GNUmakefile" - -ac_config_files="$ac_config_files include/mp4v2/project.h" - -ac_config_files="$ac_config_files project/project.m4" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ADD_PLATFORM_POSIX_TRUE}" && test -z "${ADD_PLATFORM_POSIX_FALSE}"; then - as_fn_error "conditional \"ADD_PLATFORM_POSIX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ADD_PLATFORM_WIN32_TRUE}" && test -z "${ADD_PLATFORM_WIN32_FALSE}"; then - as_fn_error "conditional \"ADD_PLATFORM_WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ADD_UTIL_TRUE}" && test -z "${ADD_UTIL_FALSE}"; then - as_fn_error "conditional \"ADD_UTIL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ADD_MANS_TRUE}" && test -z "${ADD_MANS_FALSE}"; then - as_fn_error "conditional \"ADD_MANS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by MP4v2 $as_me 2.0.0, which was -generated by GNU Autoconf 2.65. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -MP4v2 config.status 2.0.0 -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2009 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_flag_spec_ld_CXX \ -hardcode_libdir_separator_CXX \ -fix_srcfile_path_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "libplatform/config.h") CONFIG_HEADERS="$CONFIG_HEADERS libplatform/config.h" ;; - "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;; - "include/mp4v2/project.h") CONFIG_FILES="$CONFIG_FILES include/mp4v2/project.h" ;; - "project/project.m4") CONFIG_FILES="$CONFIG_FILES project/project.m4" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="CXX " - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/configure.ac b/debian/mp4v2/mp4v2-2.0.0~dfsg0/configure.ac deleted file mode 100644 index 7c514ebc..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/configure.ac +++ /dev/null @@ -1,419 +0,0 @@ -############################################################################### -# prelude -############################################################################### - -m4_include([project/project.m4sugar]) - -m4_define([SVNINFO],m4_esyscmd([LANG=en svn info 2>/dev/null])) - -changequote(<<,>>)dnl - m4_define(<>,m4_bregexp(SVNINFO,<<^URL: *\(.+\)>>,<<\1>>)) - m4_define(<>,m4_bregexp(PRJ_repo_url,<<\([^/]+\)$>>,<<\1>>)) - m4_define(<>,m4_bregexp(SVNINFO,<<^Repository Root: *\(.+\)>>,<<\1>>)) - m4_define(<>,m4_bregexp(SVNINFO,<<^Repository UUID: *\(.+\)>>,<<\1>>)) - m4_define(<>,m4_bregexp(SVNINFO,<<^Last Changed Rev: *\(.+\)>>,<<\1>>)) - m4_define(<>,m4_bregexp(SVNINFO,<<^Last Changed Date: *\(.+\)>>,<<\1>>)) - m4_define(<>,ifelse(m4_bregexp(PRJ_repo_url,<>),<<-1>>,<>,<>)) -changequote([,])dnl - -m4_define([PRJ_version_hex],m4_format([0x%04x%02x%02x],PRJ_version_major,PRJ_version_minor,PRJ_version_point)) - -m4_define([PRJ_version],ifelse( - PRJ_repo_type,[stable],m4_format([%s],PRJ_repo_branch), - m4_format([%s-r%d],PRJ_repo_branch,PRJ_repo_rev))) - -############################################################################### -# initialization -############################################################################### - -AC_PREREQ([2.61]) -AC_INIT(PRJ_name,PRJ_version,PRJ_bugreport) - -AC_MSG_NOTICE([ - --> - --> Configuring ]AC_PACKAGE_STRING[ - -->]) - -AC_CONFIG_AUX_DIR([autoaux]) -AM_INIT_AUTOMAKE([1.9.6 foreign -Wall -Wno-portability -Werror subdir-objects nostdinc no-dist-gzip dist-bzip2 dist-zip dejagnu]) - -AC_CONFIG_SRCDIR([src/mp4.cpp]) - -# disable unused langs (improves config speed, reduces configure file size) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [:]) -AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [:]) -AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [:]) - -AC_CANONICAL_HOST - -############################################################################### -# add configure options -############################################################################### - -if test -z "$enable_dependency_tracking"; then - enable_dependency_tracking=no -fi - -AC_ARG_ENABLE([debug], - [AS_HELP_STRING([--disable-debug],[disable debugging compilation])]) -AC_ARG_ENABLE([optimize], - [AS_HELP_STRING([--disable-optimize],[disable optimizing compilation])]) -AC_ARG_ENABLE([fvisibility], - [AS_HELP_STRING([--disable-fvisibility],[disable use of -fvisibility])]) -AC_ARG_ENABLE([gch], - [AS_HELP_STRING([--disable-gch],[disable GCC precompiled-headers])]) -AC_ARG_ENABLE([largefile], - [AS_HELP_STRING([--disable-largefile],[disable LFS (large file support)])]) -AC_ARG_ENABLE([util], - [AS_HELP_STRING([--disable-util],[disable build of command-line utilities])]) -AC_ARG_ENABLE([bi], - [AS_HELP_STRING([--enable-bi=ARCH],[enable -mARCH for bi-arch compilation])]) -AC_ARG_ENABLE([ub], - [AS_HELP_STRING([--enable-ub@<:@=ARCHS@:>@],[enable -arch ARCH for universal-binaries (OSX only)])]) -AC_ARG_ENABLE([cygwin_win32], - [AS_HELP_STRING([--enable-cygwin-win32],[when building with Cygwin use -mwin32])]) -AC_ARG_ENABLE([mingw_mt], - [AS_HELP_STRING([--enable-mingw-threads],[when building with MinGW use -mthreads])]) - -############################################################################### -# checks for programs -############################################################################### - -AC_PROG_CXX -AC_PROG_LIBTOOL - -AC_CHECK_PROG([FOUND_HELP2MAN],[help2man],[yes],[no]) - -############################################################################### -# top-level platform check -############################################################################### - -AC_MSG_CHECKING([$PACKAGE_NAME platform portability]) -X_PLATFORM=posix -case ${host} in -*-*-cygwin) - X_CXX_W="$X_CXX_W -Wno-format" - if test "$enable_cygwin_win32" = "yes"; then - X_PLATFORM=win32 - X_CXX_ARCH="$X_CXX_ARCH -mwin32" - fi - ;; -*-*-mingw*) - # do not support shared - enable_shared=no - X_PLATFORM=win32 - X_MINGW_LIBS="$X_MINGW_LIBS" - X_CXX_W="$X_CXX_W -Wno-format" - if test "$enable_mingw_threads" = "yes"; then - X_CXX_ARCH="$X_CXX_ARCH -mthreads" - fi - ;; -esac -AC_MSG_RESULT([$X_PLATFORM]) - -############################################################################### -# prepare project metadata -############################################################################### - -PROJECT_name="PRJ_name" -PROJECT_name_lower="PRJ_name_lower" -PROJECT_name_upper="PRJ_name_upper" -PROJECT_name_formal="PRJ_name PRJ_version" -PROJECT_url_website="PRJ_url_website" -PROJECT_url_downloads="PRJ_url_downloads" -PROJECT_url_discussion="PRJ_url_discussion" -PROJECT_irc="PRJ_irc" -PROJECT_bugreport="" - -PROJECT_version="PRJ_version" -PROJECT_version_hex="PRJ_version_hex" -PROJECT_version_major="PRJ_version_major" -PROJECT_version_minor="PRJ_version_minor" -PROJECT_version_point="PRJ_version_point" -PROJECT_repo_url="PRJ_repo_url" -PROJECT_repo_branch="PRJ_repo_branch" -PROJECT_repo_root="PRJ_repo_root" -PROJECT_repo_uuid="PRJ_repo_uuid" -PROJECT_repo_rev="PRJ_repo_rev" -PROJECT_repo_date="PRJ_repo_date" -PROJECT_repo_type="PRJ_repo_type" -PROJECT_build="`date`" - -test -z "$PROJECT_version_hex" && PROJECT_version_hex="0x0000000000000000LL" -test -z "$PROJECT_version_major" && PROJECT_version_major="0" -test -z "$PROJECT_version_minor" && PROJECT_version_minor="0" -test -z "$PROJECT_version_point" && PROJECT_version_point="0" -test -z "$PROJECT_repo_url" && PROJECT_repo_url="svn://nowhere.com/project/unknown" -test -z "$PROJECT_repo_branch" && PROJECT_repo_branch="unknown" -test -z "$PROJECT_repo_root" && PROJECT_repo_root="svn://nowhere.com/project" -test -z "$PROJECT_repo_uuid" && PROJECT_repo_uuid="00000000-0000-0000-0000-000000000000" -test -z "$PROJECT_repo_rev" && PROJECT_repo_rev="0" -test -z "$PROJECT_repo_date" && PROJECT_repo_date="unknown" -test -z "$PROJECT_repo_type" && PROJECT_repo_type="unknown" -test -z "$PROJECT_build" && PROJECT_build="unknown" - -AC_SUBST([PROJECT_name]) -AC_SUBST([PROJECT_name_lower]) -AC_SUBST([PROJECT_name_upper]) -AC_SUBST([PROJECT_name_formal]) -AC_SUBST([PROJECT_url_website]) -AC_SUBST([PROJECT_url_downloads]) -AC_SUBST([PROJECT_url_discussion]) -AC_SUBST([PROJECT_irc]) -AC_SUBST([PROJECT_bugreport]) -AC_SUBST([PROJECT_version]) -AC_SUBST([PROJECT_version_hex]) -AC_SUBST([PROJECT_version_major]) -AC_SUBST([PROJECT_version_minor]) -AC_SUBST([PROJECT_version_point]) -AC_SUBST([PROJECT_repo_url]) -AC_SUBST([PROJECT_repo_branch]) -AC_SUBST([PROJECT_repo_root]) -AC_SUBST([PROJECT_repo_uuid]) -AC_SUBST([PROJECT_repo_rev]) -AC_SUBST([PROJECT_repo_date]) -AC_SUBST([PROJECT_repo_type]) -AC_SUBST([PROJECT_build]) - -############################################################################### -# checks for libraries -############################################################################### - -############################################################################### -# checks for header files -############################################################################### - -############################################################################### -# checks for typedefs, structures, and compiler characteristics -############################################################################### - -############################################################################### -# replace -ggdb3 with -ggdb2 to avoid GNU 'as' from failing -# See http://code.google.com/p/mp4v2/issues/detail?id=27 -############################################################################### -if test "$GXX" = "yes"; then - CXXFLAGS_GGDB3=`echo "$CXXFLAGS" | sed -e 's/-ggdb3/-ggdb2/'` - CXXFLAGS="$CXXFLAGS_GGDB3" -fi - -############################################################################### -# additional ldflags -############################################################################### - -case ${host} in - *-*-darwin*) - X_libmp4v2_la_LDFLAGS='-Wl,-current_version,$(PROJECT_version_major).$(PROJECT_version_minor).$(PROJECT_version_point) -Wl,-compatibility_version,$(PROJECT_version_major).0.0' - ;; - *-*-cygwin*) - X_libmp4v2_la_LDFLAGS='-no-undefined' - ;; - *) - X_libmp4v2_la_LDFLAGS= - ;; -esac - -AC_SUBST([X_libmp4v2_la_LDFLAGS]) - -############################################################################### -# check for --disable-fvisibility -############################################################################### - -if test "$enable_fvisibility" != "no" -a "$GXX" = "yes"; then - case ${host} in - *-*-cygwin) - ;; - *-*-mingw*) - ;; - *) - AC_LANG(C++) - AC_CACHE_CHECK([if $CXX supports -fvisibility],[x_cv_fvisibility],[ - x_save="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -fvisibility=hidden" - AC_TRY_COMPILE([],[],[x_cv_fvisibility=yes],[x_cv_fvisibility=no]) - if test "$x_cv_fvisibility" != "yes"; then - CXXFLAGS="$x_save" - fi - x_save= - ]) - ;; - esac -fi - -############################################################################### -# check for --disable-gch -############################################################################### - -AC_MSG_CHECKING([if GCC precompiled-headers should be created]) - -X_GCH=0 -X_GCH_FLAGS= -X_GCH_STATIC=0 -X_GCH_STATIC_FLAGS="$lt_prog_compiler_static_CXX" -X_GCH_SHARED=0 -X_GCH_SHARED_FLAGS="$lt_prog_compiler_pic_CXX" - -if test "$enable_gch" = "yes"; then - X_GCH=1 -elif test "$enable_gch" != "no"; then - if test "$GXX" = "yes"; then - case ${host_os} in - cygwin*|darwin*|freebsd*|linux*|mingw*|solaris*) - X_GCH=1 - ;; - esac - fi -fi - -if test "$X_GCH" -eq 1; then - x_gch_result="yes" - if test "$enable_static" = "yes"; then - X_GCH_STATIC=1 - fi - if test "$enable_shared" = "yes"; then - X_GCH_SHARED=1 - fi -else - x_gch_result="no" -fi - -AC_MSG_RESULT([$x_gch_result]) - -AC_SUBST([X_GCH]) -AC_SUBST([X_GCH_FLAGS]) -AC_SUBST([X_GCH_STATIC]) -AC_SUBST([X_GCH_STATIC_FLAGS]) -AC_SUBST([X_GCH_SHARED]) -AC_SUBST([X_GCH_SHARED_FLAGS]) - -############################################################################### -# check for --disable-largefile -############################################################################### - -if test "$enable_largefile" != "no" -a "$ac_cv_header_unistd_h" = "yes"; then - case ${host_cpu} in - i?86|ppc) - AC_LANG(C++) - AC_CACHE_CHECK([if LFS (large file support) is required],[x_cv_largefile],[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#ifndef _LFS_LARGEFILE - error: not LFS conformant -#endif - ]])],[x_cv_largefile=yes],[x_cv_largefile=no]) - ]) - if test "$x_cv_largefile" = "yes"; then - AC_DEFINE([NEED_LFS_ACTIVATION],[1],[Define to 1 if LFS should be activated]) - fi - ;; - esac -fi - -############################################################################### -# set arch flags -############################################################################### - -if test "$GXX" = "yes"; then - AC_MSG_CHECKING([arch flags]) - x_flags= - x_save_IFS=$IFS; IFS=, - for arch in ${enable_ub}; do - case "$arch" in - ""|no) - ;; - yes) - case ${host} in - *-*-darwin*) - x_flags="$xflags -arch i386 -arch x86_64 -arch ppc -arch ppc64" - ;; - esac - ;; - *) - x_flags="$x_flags -arch $arch" - ;; - esac - done - IFS=$x_save_IFS - - case "$enable_bi" in - ""|no|yes) - ;; - *) - x_flags="$x_flags -m${enable_bi}" - ;; - esac - - if test -n "$x_flags"; then - AC_MSG_RESULT([$x_flags]) - X_CXX_ARCH="$X_CXX_ARCH $x_flags" - else - AC_MSG_RESULT([none]) - fi - - x_flags= -fi - -############################################################################### -# disable debugging -############################################################################### - -if test "$enable_debug" = "no"; then - changequote(<<,>>)dnl - if test "$GCC" = "yes"; then - CFLAGS=`echo "$CFLAGS" | sed -e 's/-g[^ ]*[ ]*//' -e 's/^ //' -e 's/ $//'` - fi - if test "$GXX" = "yes"; then - CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/-g[^ ]*[ ]*//' -e 's/^ //' -e 's/ $//'` - fi - changequote([,])dnl -fi - -############################################################################### -# disable optimizing -############################################################################### - -if test "$enable_optimize" = "no"; then - changequote(<<,>>)dnl - if test "$GCC" = "yes"; then - CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[^ ]*[ ]*//' -e 's/^ //' -e 's/ $//'` - fi - if test "$GXX" = "yes"; then - CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/-O[^ ]*[ ]*//' -e 's/^ //' -e 's/ $//'` - fi - changequote([,])dnl -fi - -############################################################################### -# checks for library functions -############################################################################### - -############################################################################### -# conditional compilation -############################################################################### - -AM_CONDITIONAL([ADD_PLATFORM_POSIX],[test "$X_PLATFORM" = "posix"]) -AM_CONDITIONAL([ADD_PLATFORM_WIN32],[test "$X_PLATFORM" = "win32"]) - -AM_CONDITIONAL([ADD_UTIL],[test "$enable_util" != "no"]) -AM_CONDITIONAL([ADD_MANS],[test "$X_PLATFORM" != "win32"]) - -############################################################################### -# declare common substitutions -############################################################################### - -AC_SUBST([X_CXX_ARCH]) -AC_SUBST([X_CXX_W]) -AC_SUBST([X_CXX_D]) -AC_SUBST([X_CXX_I]) -AC_SUBST([X_MINGW_LIBS]) - -############################################################################### -# output files -############################################################################### - -AC_CONFIG_HEADERS([libplatform/config.h]) - -AC_CONFIG_FILES([GNUmakefile]) -AC_CONFIG_FILES([include/mp4v2/project.h]) -AC_CONFIG_FILES([project/project.m4]) - -AC_OUTPUT diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/changelog b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/changelog deleted file mode 100644 index f0385efe..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/changelog +++ /dev/null @@ -1,109 +0,0 @@ -mp4v2 (2.0.0~dfsg0-5~debian11.0.0+4~a) bullseye; urgency=medium - - * debian/patches/: patchset updated - - 0006-Fix_FTBFS_with_cxx11.diff - - -- Michele Calgaro Fri, 23 Jul 2021 12:20:48 +0900 - -mp4v2 (2.0.0~dfsg0-5~debian11.0.0+3~a) bullseye; urgency=medium - - * debian/patches/: patchset updated - - 0005-Fix_FTBFS_narrowing.diff - - -- Michele Calgaro Mon, 08 Sep 2020 01:06:27 +0900 - -mp4v2 (2.0.0~dfsg0-5~debian11.0.0+2~a) bullseye; urgency=medium - - * Package was added to Trinity repository - * debian/patches/: patchset updated - - 0004-Fix_ftbfs_with_gcc7.diff - - -- Slávek Banko Mon, 04 Sep 2017 23:45:48 +0200 - -mp4v2 (2.0.0~dfsg0-5) unstable; urgency=medium - - * debian/patches/: patchset updated - - 0003-Reproducible_build.patch added (Closes: #834159) - Thanks to Chris Lamb (lamby) for the patch. - * debian/control: S-V bump 3.9.6 => 3.9.8 (no changes needed) - * debian/control: Vcs-* fields updated for https:// usage - - -- Matteo F. Vescovi Fri, 12 Aug 2016 23:12:34 +0200 - -mp4v2 (2.0.0~dfsg0-4) unstable; urgency=medium - - * debian/patches/: patchset refreshed - - 0001-Fix_mp4tags_corruption.patch updated (Closes: #804127) - - m4error.patch renamed to 0002-Fix_m4_error.patch - * debian/control: - - Uploader e-mail address updated - - S-V bump 3.9.5 => 3.9.6 (no changes needed) - * debian/gbp.conf: [git-dch] => [dch] - - -- Matteo F. Vescovi Thu, 05 Nov 2015 21:01:06 +0100 - -mp4v2 (2.0.0~dfsg0-3) unstable; urgency=medium - - * Team upload. - - [ Matteo F. Vescovi ] - * debian/control: Uploader e-mail address updated - * debian/control: S-V bump 3.9.4 => 3.9.5 (no changes needed) - - [ Sebastian Ramacher ] - * debian/patches/m4error.patch: Add upstream patch to fix m4 error while - running autoreconf. - * debian/{rules,control}: Use dh-autoreconf instead of autotools-dev. - (Closes: #744632) - - -- Sebastian Ramacher Sat, 30 Aug 2014 22:14:59 +0200 - -mp4v2 (2.0.0~dfsg0-2) unstable; urgency=low - - * debian/control: DMUA flag dropped - * debian/control: S-V 3.9.3 => 3.9.4 (no changes needed) - * debian/control: Vcs-Git URL updated - * debian/patches/: #0001 added to fix mp4tags corruption. - Thanks to Jonathan David Amery for the hint. (Closes: #709127) - - -- Matteo F. Vescovi Tue, 04 Jun 2013 18:16:52 +0200 - -mp4v2 (2.0.0~dfsg0-1) unstable; urgency=low - - [ Matteo F. Vescovi ] - * New upstream release (Closes: #659856) - * debian/control: Standards-Version bumped to 3.9.3 - * debian/: 8 => 9 dh bump - * debian/: Multi-Arch support added - * debian/watch: uscan path updated - * debian/control: DMUA flag set - * debian/: repack stuff added - - [ Alessio Treglia ] - * Add get-orig-source target into debian/rules. - - -- Matteo F. Vescovi Sat, 02 Jun 2012 11:13:11 +0200 - -mp4v2 (1.9.1+svn479~dfsg0-3) unstable; urgency=low - - * debian/rules: "--disable-optimize" parameter added (Closes: #646236) - - -- Matteo F. Vescovi Mon, 24 Oct 2011 23:51:35 +0200 - -mp4v2 (1.9.1+svn479~dfsg0-2) unstable; urgency=low - - [ Reinhard Tartler ] - * make package libmp4v2-dev arch: any (Closes: #637758) - - [ Alessio Treglia ] - * debian/control: Adjust -DEV's Depends field. - * debian/copyright: - - Add licensing and copyright info on libplatform/prog/option.cpp. - - -- Alessio Treglia Tue, 16 Aug 2011 09:11:09 +0200 - -mp4v2 (1.9.1+svn479~dfsg0-1) unstable; urgency=low - - * Initial release (Closes: #552705) - - -- Matteo F. Vescovi Wed, 10 Aug 2011 13:39:09 +0200 diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/compat b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/compat deleted file mode 100644 index ec635144..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/control b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/control deleted file mode 100644 index 1c235138..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/control +++ /dev/null @@ -1,98 +0,0 @@ -Source: mp4v2 -Section: deps-r14/sound -Priority: optional -Maintainer: Debian Multimedia Maintainers -Uploaders: - Alessio Treglia , - Matteo F. Vescovi -Build-Depends: - debhelper (>= 9), - dh-autoreconf, - help2man -Standards-Version: 3.9.8 -Homepage: http://code.google.com/p/mp4v2/ -Vcs-Git: https://anonscm.debian.org/git/pkg-multimedia/mp4v2.git -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-multimedia/mp4v2.git - -Package: libmp4v2-2 -Section: deps-r14/libs -Architecture: any -Pre-Depends: ${misc:Pre-Depends} -Depends: - ${misc:Depends}, - ${shlibs:Depends} -Enhances: gtkpod (>> 0.99.16) -Description: library to read, create, and modify mp4 files (shared library) - The MP4v2 library provides an API to create and modify mp4 files as - defined by ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is - derived from Apple's QuickTime file format that has been used as a - multimedia file format in a variety of platforms and applications. It is - a very powerful and extensible format that can accommodate practically - any type of media. - . - MP4v2 was originally bundled with mpeg4ip library, but has been moved - into its own maintained library due to a combination of the cessation of - support of mpeg4ip and the usefulness of this library on its own. - . - This package contains the shared library. - -Package: libmp4v2-dev -Section: deps-r14/libdevel -Architecture: any -Depends: - libmp4v2-2 (= ${binary:Version}), - ${misc:Depends} -Description: library to read, create, and modify mp4 files (development files) - The MP4v2 library provides an API to create and modify mp4 files as - defined by ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is - derived from Apple's QuickTime file format that has been used as a - multimedia file format in a variety of platforms and applications. It is - a very powerful and extensible format that can accommodate practically - any type of media. - . - MP4v2 was originally bundled with mpeg4ip library, but has been moved - into its own maintained library due to a combination of the cessation of - support of mpeg4ip and the usefulness of this library on its own. - . - This package contains development files. - -Package: mp4v2-dbg -Architecture: any -Section: deps-r14/debug -Priority: extra -Depends: - libmp4v2-2 (= ${binary:Version}), - mp4v2-utils (= ${binary:Version}), - ${misc:Depends} -Description: library to read, create, and modify mp4 files (debug) - The MP4v2 library provides an API to create and modify mp4 files as - defined by ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is - derived from Apple's QuickTime file format that has been used as a - multimedia file format in a variety of platforms and applications. It is - a very powerful and extensible format that can accommodate practically - any type of media. - . - MP4v2 was originally bundled with mpeg4ip library, but has been moved - into its own maintained library due to a combination of the cessation of - support of mpeg4ip and the usefulness of this library on its own. - . - This package contains the debugging symbols. - -Package: mp4v2-utils -Architecture: any -Depends: - ${misc:Depends}, - ${shlibs:Depends} -Description: library to read, create, and modify mp4 files (frontends) - The MP4v2 library provides an API to create and modify mp4 files as - defined by ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is - derived from Apple's QuickTime file format that has been used as a - multimedia file format in a variety of platforms and applications. It is - a very powerful and extensible format that can accommodate practically - any type of media. - . - MP4v2 was originally bundled with mpeg4ip library, but has been moved - into its own maintained library due to a combination of the cessation of - support of mpeg4ip and the usefulness of this library on its own. - . - This package contains the command line frontends. diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/copyright b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/copyright deleted file mode 100644 index 96ca80bd..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/copyright +++ /dev/null @@ -1,517 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: mp4v2 -Upstream-Contact: - Edward Groenendaal - Jonathon Rubin jb.rubin@gmail.com> - Kona Blend - Rouven Wessling - Dave Mackie - Alix Marchandise-Franquet - Bill May - Ximpo Group Ltd - Danijel Kopcinovic -Source: http://code.google.com/p/mp4v2/downloads/list -Comment: The tarball was repack'd to remove the vstudio9.0 directory as it is - unnecessary. - -Files: * -Copyright: 2001-2005, Cisco Systems Inc. - 2003-2004, Ximpo Group Ltd. - 2005, Adnecto d.o.o. - 2008, Kona Blend -License: MPL-1.1 - MOZILLA PUBLIC LICENSE - Version 1.1 - . - --------------- - . - 1. Definitions. - . - 1.0.1. "Commercial Use" means distribution or otherwise making the - Covered Code available to a third party. - . - 1.1. "Contributor" means each entity that creates or contributes to - the creation of Modifications. - . - 1.2. "Contributor Version" means the combination of the Original - Code, prior Modifications used by a Contributor, and the Modifications - made by that particular Contributor. - . - 1.3. "Covered Code" means the Original Code or Modifications or the - combination of the Original Code and Modifications, in each case - including portions thereof. - . - 1.4. "Electronic Distribution Mechanism" means a mechanism generally - accepted in the software development community for the electronic - transfer of data. - . - 1.5. "Executable" means Covered Code in any form other than Source - Code. - . - 1.6. "Initial Developer" means the individual or entity identified - as the Initial Developer in the Source Code notice required by Exhibit - A. - . - 1.7. "Larger Work" means a work which combines Covered Code or - portions thereof with code not governed by the terms of this License. - . - 1.8. "License" means this document. - . - 1.8.1. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - . - 1.9. "Modifications" means any addition to or deletion from the - substance or structure of either the Original Code or any previous - Modifications. When Covered Code is released as a series of files, a - Modification is: - A. Any addition to or deletion from the contents of a file - containing Original Code or previous Modifications. - . - B. Any new file that contains any part of the Original Code or - previous Modifications. - . - 1.10. "Original Code" means Source Code of computer software code - which is described in the Source Code notice required by Exhibit A as - Original Code, and which, at the time of its release under this - License is not already Covered Code governed by this License. - . - 1.10.1. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - . - 1.11. "Source Code" means the preferred form of the Covered Code for - making modifications to it, including all modules it contains, plus - any associated interface definition files, scripts used to control - compilation and installation of an Executable, or source code - differential comparisons against either the Original Code or another - well known, available Covered Code of the Contributor's choice. The - Source Code can be in a compressed or archival form, provided the - appropriate decompression or de-archiving software is widely available - for no charge. - . - 1.12. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, this - License or a future version of this License issued under Section 6.1. - For legal entities, "You" includes any entity which controls, is - controlled by, or is under common control with You. For purposes of - this definition, "control" means (a) the power, direct or indirect, - to cause the direction or management of such entity, whether by - contract or otherwise, or (b) ownership of more than fifty percent - (50%) of the outstanding shares or beneficial ownership of such - entity. - . - 2. Source Code License. - . - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, - non-exclusive license, subject to third party intellectual property - claims: - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Code (or portions thereof) with or without Modifications, and/or - as part of a Larger Work; and - . - (b) under Patents Claims infringed by the making, using or - selling of Original Code, to make, have made, use, practice, - sell, and offer for sale, and/or otherwise dispose of the - Original Code (or portions thereof). - . - (c) the licenses granted in this Section 2.1(a) and (b) are - effective on the date Initial Developer first distributes - Original Code under the terms of this License. - . - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: 1) for code that You delete from the Original Code; 2) - separate from the Original Code; or 3) for infringements caused - by: i) the modification of the Original Code or ii) the - combination of the Original Code with other software or devices. - . - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor - hereby grants You a world-wide, royalty-free, non-exclusive license - . - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor, to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof) either on an - unmodified basis, with other Modifications, as Covered Code - and/or as part of a Larger Work; and - . - (b) under Patent Claims infringed by the making, using, or - selling of Modifications made by that Contributor either alone - and/or in combination with its Contributor Version (or portions - of such combination), to make, use, sell, offer for sale, have - made, and/or otherwise dispose of: 1) Modifications made by that - Contributor (or portions thereof); and 2) the combination of - Modifications made by that Contributor with its Contributor - Version (or portions of such combination). - . - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are - effective on the date Contributor first makes Commercial Use of - the Covered Code. - . - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: 1) for any code that Contributor has deleted from the - Contributor Version; 2) separate from the Contributor Version; - 3) for infringements caused by: i) third party modifications of - Contributor Version or ii) the combination of Modifications made - by that Contributor with other software (except as part of the - Contributor Version) or other devices; or 4) under Patent Claims - infringed by Covered Code in the absence of Modifications made by - that Contributor. - . - 3. Distribution Obligations. - . - 3.1. Application of License. - The Modifications which You create or to which You contribute are - governed by the terms of this License, including without limitation - Section 2.2. The Source Code version of Covered Code may be - distributed only under the terms of this License or a future version - of this License released under Section 6.1, and You must include a - copy of this License with every copy of the Source Code You - distribute. You may not offer or impose any terms on any Source Code - version that alters or restricts the applicable version of this - License or the recipients' rights hereunder. However, You may include - an additional document offering the additional rights described in - Section 3.5. - . - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be - made available in Source Code form under the terms of this License - either on the same media as an Executable version or via an accepted - Electronic Distribution Mechanism to anyone to whom you made an - Executable version available; and if made available via Electronic - Distribution Mechanism, must remain available for at least twelve (12) - months after the date it initially became available, or at least six - (6) months after a subsequent version of that particular Modification - has been made available to such recipients. You are responsible for - ensuring that the Source Code version remains available even if the - Electronic Distribution Mechanism is maintained by a third party. - . - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a - file documenting the changes You made to create that Covered Code and - the date of any change. You must include a prominent statement that - the Modification is derived, directly or indirectly, from Original - Code provided by the Initial Developer and including the name of the - Initial Developer in (a) the Source Code, and (b) in any notice in an - Executable version or related documentation in which You describe the - origin or ownership of the Covered Code. - . - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's - intellectual property rights is required to exercise the rights - granted by such Contributor under Sections 2.1 or 2.2, - Contributor must include a text file with the Source Code - distribution titled "LEGAL" which describes the claim and the - party making the claim in sufficient detail that a recipient will - know whom to contact. If Contributor obtains such knowledge after - the Modification is made available as described in Section 3.2, - Contributor shall promptly modify the LEGAL file in all copies - Contributor makes available thereafter and shall take other steps - (such as notifying appropriate mailing lists or newsgroups) - reasonably calculated to inform those who received the Covered - Code that new knowledge has been obtained. - . - (b) Contributor APIs. - If Contributor's Modifications include an application programming - interface and Contributor has knowledge of patent licenses which - are reasonably necessary to implement that API, Contributor must - also include this information in the LEGAL file. - . - (c) Representations. - Contributor represents that, except as disclosed pursuant to - Section 3.4(a) above, Contributor believes that Contributor's - Modifications are Contributor's original creation(s) and/or - Contributor has sufficient rights to grant the rights conveyed by - this License. - . - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source - Code. If it is not possible to put such notice in a particular Source - Code file due to its structure, then You must include such notice in a - location (such as a relevant directory) where a user would be likely - to look for such a notice. If You created one or more Modification(s) - You may add your name as a Contributor to the notice described in - Exhibit A. You must also duplicate this License in any documentation - for the Source Code where You describe recipients' rights or ownership - rights relating to Covered Code. You may choose to offer, and to - charge a fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Code. However, You - may do so only on Your own behalf, and not on behalf of the Initial - Developer or any Contributor. You must make it absolutely clear than - any such warranty, support, indemnity or liability obligation is - offered by You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred by the - Initial Developer or such Contributor as a result of warranty, - support, indemnity or liability terms You offer. - . - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the - requirements of Section 3.1-3.5 have been met for that Covered Code, - and if You include a notice stating that the Source Code version of - the Covered Code is available under the terms of this License, - including a description of how and where You have fulfilled the - obligations of Section 3.2. The notice must be conspicuously included - in any notice in an Executable version, related documentation or - collateral in which You describe recipients' rights relating to the - Covered Code. You may distribute the Executable version of Covered - Code or ownership rights under a license of Your choice, which may - contain terms different from this License, provided that You are in - compliance with the terms of this License and that the license for the - Executable version does not attempt to limit or alter the recipient's - rights in the Source Code version from the rights set forth in this - License. If You distribute the Executable version under a different - license You must make it absolutely clear that any terms which differ - from this License are offered by You alone, not by the Initial - Developer or any Contributor. You hereby agree to indemnify the - Initial Developer and every Contributor for any liability incurred by - the Initial Developer or such Contributor as a result of any such - terms You offer. - . - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code - not governed by the terms of this License and distribute the Larger - Work as a single product. In such a case, You must make sure the - requirements of this License are fulfilled for the Covered Code. - . - 4. Inability to Comply Due to Statute or Regulation. - . - If it is impossible for You to comply with any of the terms of this - License with respect to some or all of the Covered Code due to - statute, judicial order, or regulation then You must: (a) comply with - the terms of this License to the maximum extent possible; and (b) - describe the limitations and the code they affect. Such description - must be included in the LEGAL file described in Section 3.4 and must - be included with all distributions of the Source Code. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - . - 5. Application of this License. - . - This License applies to code to which the Initial Developer has - attached the notice in Exhibit A and to related Covered Code. - . - 6. Versions of the License. - . - 6.1. New Versions. - Netscape Communications Corporation ("Netscape") may publish revised - and/or new versions of the License from time to time. Each version - will be given a distinguishing version number. - . - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the - License, You may always continue to use it under the terms of that - version. You may also choose to use such Covered Code under the terms - of any subsequent version of the License published by Netscape. No one - other than Netscape has the right to modify the terms applicable to - Covered Code created under this License. - . - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may - only do in order to apply it to code which is not already Covered Code - governed by this License), You must (a) rename Your license so that - the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", - "MPL", "NPL" or any confusingly similar phrase do not appear in your - license (except to note that your license differs from this License) - and (b) otherwise make it clear that Your version of the license - contains terms which differ from the Mozilla Public License and - Netscape Public License. (Filling in the name of the Initial - Developer, Original Code or Contributor in the notice described in - Exhibit A shall not of themselves be deemed to be modifications of - this License.) - . - 7. DISCLAIMER OF WARRANTY. - . - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF - DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. - THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE - IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, - YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE - COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER - OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - . - 8. TERMINATION. - . - 8.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to cure - such breach within 30 days of becoming aware of the breach. All - sublicenses to the Covered Code which are properly granted shall - survive any termination of this License. Provisions which, by their - nature, must remain in effect beyond the termination of this License - shall survive. - . - 8.2. If You initiate litigation by asserting a patent infringement - claim (excluding declatory judgment actions) against Initial Developer - or a Contributor (the Initial Developer or Contributor against whom - You file such action is referred to as "Participant") alleging that: - . - (a) such Participant's Contributor Version directly or indirectly - infringes any patent, then any and all rights granted by such - Participant to You under Sections 2.1 and/or 2.2 of this License - shall, upon 60 days notice from Participant terminate prospectively, - unless if within 60 days after receipt of notice You either: (i) - agree in writing to pay Participant a mutually agreeable reasonable - royalty for Your past and future use of Modifications made by such - Participant, or (ii) withdraw Your litigation claim with respect to - the Contributor Version against such Participant. If within 60 days - of notice, a reasonable royalty and payment arrangement are not - mutually agreed upon in writing by the parties or the litigation claim - is not withdrawn, the rights granted by Participant to You under - Sections 2.1 and/or 2.2 automatically terminate at the expiration of - the 60 day notice period specified above. - . - (b) any software, hardware, or device, other than such Participant's - Contributor Version, directly or indirectly infringes any patent, then - any rights granted to You by such Participant under Sections 2.1(b) - and 2.2(b) are revoked effective as of the date You first made, used, - sold, distributed, or had made, Modifications made by that - Participant. - . - 8.3. If You assert a patent infringement claim against Participant - alleging that such Participant's Contributor Version directly or - indirectly infringes any patent where such claim is resolved (such as - by license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - . - 8.4. In the event of termination under Sections 8.1 or 8.2 above, - all end user license agreements (excluding distributors and resellers) - which have been validly granted by You or any distributor hereunder - prior to termination shall survive termination. - . - 9. LIMITATION OF LIABILITY. - . - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL - DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, - OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR - ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY - CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, - WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY - RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW - PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE - EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO - THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - . - 10. U.S. GOVERNMENT END USERS. - . - The Covered Code is a "commercial item," as that term is defined in - 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" and "commercial computer software documentation," as such - terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 - C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), - all U.S. Government End Users acquire Covered Code with only those - rights set forth herein. - . - 11. MISCELLANEOUS. - . - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - California law provisions (except to the extent applicable law, if - any, provides otherwise), excluding its conflict-of-law provisions. - With respect to disputes in which at least one party is a citizen of, - or an entity chartered or registered to do business in the United - States of America, any litigation relating to this License shall be - subject to the jurisdiction of the Federal Courts of the Northern - District of California, with venue lying in Santa Clara County, - California, with the losing party responsible for costs, including - without limitation, court costs and reasonable attorneys' fees and - expenses. The application of the United Nations Convention on - Contracts for the International Sale of Goods is expressly excluded. - Any law or regulation which provides that the language of a contract - shall be construed against the drafter shall not apply to this - License. - . - 12. RESPONSIBILITY FOR CLAIMS. - . - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - . - 13. MULTIPLE-LICENSED CODE. - . - Initial Developer may designate portions of the Covered Code as - "Multiple-Licensed". "Multiple-Licensed" means that the Initial - Developer permits you to utilize portions of the Covered Code under - Your choice of the NPL or the alternative licenses, if any, specified - by the Initial Developer in the file described in Exhibit A. - . - EXHIBIT A -Mozilla Public License. - . - ``The contents of this file are subject to the Mozilla Public License - Version 1.1 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - . - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - License for the specific language governing rights and limitations - under the License. - . - The Original Code is ______________________________________. - . - The Initial Developer of the Original Code is ________________________. - Portions created by ______________________ are Copyright (C) ______ - _______________________. All Rights Reserved. - . - Contributor(s): ______________________________________. - . - Alternatively, the contents of this file may be used under the terms - of the _____ license (the "[___] License"), in which case the - provisions of [______] License are applicable instead of those - above. If you wish to allow use of your version of this file only - under the terms of the [____] License and not to allow others to use - your version of this file under the MPL, indicate your decision by - deleting the provisions above and replace them with the notice and - other provisions required by the [___] License. If you do not delete - the provisions above, a recipient may use your version of this file - under either the MPL or the [___] License." - . - [NOTE: The text of this Exhibit A may differ slightly from the text of - the notices in the Source Code files of the Original Code. You should - use the text of this Exhibit A rather than the text found in the - Original Code Source Code for Your Modifications.] - -Files: libplatform/prog/option.cpp -Copyright: 2002, Todd C. Miller -License: other - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - . - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - . - Sponsored in part by the Defense Advanced Research Projects - Agency (DARPA) and Air Force Research Laboratory, Air Force - Materiel Command, USAF, under agreement number F39502-99-1-0512. - -Files: debian/* -Copyright: 2009, Fabian Greffrath -License: GAP - Copying and distribution of the Debian packaging, with or without modification, - are permitted in any medium without royalty provided the copyright - notice and this notice are preserved. diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/gbp.conf b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/gbp.conf deleted file mode 100644 index a1cda443..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/gbp.conf +++ /dev/null @@ -1,8 +0,0 @@ -[DEFAULT] -pristine-tar = True -compression = bzip2 - -[dch] -ignore-regex = (Signed-off|Acked)-by: -meta = True -meta-closes = Closes|LP|BZ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-2.docs b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-2.docs deleted file mode 100644 index d24b284b..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-2.docs +++ /dev/null @@ -1,3 +0,0 @@ -doc/Documentation.txt -doc/ToolGuide.txt -doc/Authors.txt diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-2.install b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-2.install deleted file mode 100644 index ecfb6c77..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-2.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libmp4v2.so.* diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-dev.install b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-dev.install deleted file mode 100644 index 0cc2cd1f..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/libmp4v2-dev.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/include -usr/lib/*/libmp4v2.so diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/mp4v2-utils.install b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/mp4v2-utils.install deleted file mode 100644 index f7177e8d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/mp4v2-utils.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/bin -usr/share diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0001-Fix_mp4tags_corruption.patch b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0001-Fix_mp4tags_corruption.patch deleted file mode 100644 index 182d41bb..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0001-Fix_mp4tags_corruption.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: "Matteo F. Vescovi" -Date: Thu, 5 Nov 2015 15:26:00 +0100 -Subject: Fix_mp4tags_corruption - ---- - util/mp4tags.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/util/mp4tags.cpp b/util/mp4tags.cpp -index 1b9e866..80e89d4 100644 ---- a/util/mp4tags.cpp -+++ b/util/mp4tags.cpp -@@ -539,6 +539,7 @@ extern "C" int - else { - fprintf( stderr, "Art file %s not found\n", tags[i] ); - } -+ break; - } - case OPT_ALBUM_ARTIST: - MP4TagsSetAlbumArtist( mdata, tags[i] ); diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0002-Fix_m4_error.patch b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0002-Fix_m4_error.patch deleted file mode 100644 index c17998c6..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0002-Fix_m4_error.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Sebastian Ramacher -Date: Thu, 5 Nov 2015 20:53:13 +0100 -Subject: Fix_m4_error - -Fix m4 error while running autoreconf - -Origin: upstream, https://code.google.com/p/mp4v2/source/detail?r=496 -Last-Update: 2014-08-30 - -Signed-off-by: Matteo F. Vescovi ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 7c514eb..83e9dce 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -20,7 +20,7 @@ m4_define([PRJ_version_hex],m4_format([0x%04x%02x%02x],PRJ_version_major,PRJ_ver - - m4_define([PRJ_version],ifelse( - PRJ_repo_type,[stable],m4_format([%s],PRJ_repo_branch), -- m4_format([%s-r%d],PRJ_repo_branch,PRJ_repo_rev))) -+ m4_format([%s-r%s],PRJ_repo_branch,PRJ_repo_rev))) - - ############################################################################### - # initialization diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0003-Reproducible_build.patch b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0003-Reproducible_build.patch deleted file mode 100644 index ef97f6e7..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0003-Reproducible_build.patch +++ /dev/null @@ -1,20 +0,0 @@ -Description: Make the build reproducible -Author: Chris Lamb -Last-Update: 2016-08-12 - ---- mp4v2-2.0.0~dfsg0.orig/configure.ac -+++ mp4v2-2.0.0~dfsg0/configure.ac -@@ -137,7 +137,12 @@ PROJECT_repo_uuid="PRJ_repo_uuid" - PROJECT_repo_rev="PRJ_repo_rev" - PROJECT_repo_date="PRJ_repo_date" - PROJECT_repo_type="PRJ_repo_type" --PROJECT_build="`date`" -+ -+if test -n "$SOURCE_DATE_EPOCH"; then -+ PROJECT_build="`LC_ALL=C date --utc --date="@$SOURCE_DATE_EPOCH"`" -+else -+ PROJECT_build="`date`" -+fi - - test -z "$PROJECT_version_hex" && PROJECT_version_hex="0x0000000000000000LL" - test -z "$PROJECT_version_major" && PROJECT_version_major="0" diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0004-Fix_ftbfs_with_gcc7.diff b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0004-Fix_ftbfs_with_gcc7.diff deleted file mode 100644 index f31afa7e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0004-Fix_ftbfs_with_gcc7.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: b/src/rtphint.cpp -=================================================================== ---- a/src/rtphint.cpp -+++ b/src/rtphint.cpp -@@ -339,7 +339,7 @@ - pSlash = strchr(pSlash, '/'); - if (pSlash != NULL) { - pSlash++; -- if (pSlash != '\0') { -+ if (pSlash[0] != '\0') { - length = (uint32_t)strlen(pRtpMap) - (pSlash - pRtpMap); - *ppEncodingParams = (char *)MP4Calloc(length + 1); - strncpy(*ppEncodingParams, pSlash, length); diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0005-Fix_FTBFS_narrowing.diff b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0005-Fix_FTBFS_narrowing.diff deleted file mode 100644 index 1769fc0e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0005-Fix_FTBFS_narrowing.diff +++ /dev/null @@ -1,79 +0,0 @@ -Fix FTBFS due to narrowing conversion from 'unsigned int' to 'int'. -Index: mp4v2-2.0.0~dfsg0/libutil/Utility.cpp -=================================================================== ---- mp4v2-2.0.0~dfsg0.orig/libutil/Utility.cpp -+++ mp4v2-2.0.0~dfsg0/libutil/Utility.cpp -@@ -493,7 +493,7 @@ Utility::process_impl() - if( codes.find( code ) == codes.end() ) - continue; - -- switch( code ) { -+ switch( (unsigned int)code ) { - case 'z': - _optimize = true; - break; -Index: mp4v2-2.0.0~dfsg0/util/mp4art.cpp -=================================================================== ---- mp4v2-2.0.0~dfsg0.orig/util/mp4art.cpp -+++ mp4v2-2.0.0~dfsg0/util/mp4art.cpp -@@ -376,7 +376,7 @@ ArtUtility::utility_option( int code, bo - { - handled = true; - -- switch( code ) { -+ switch( (unsigned int)code ) { - case LC_ART_ANY: - _artFilter = numeric_limits::max(); - break; -Index: mp4v2-2.0.0~dfsg0/util/mp4chaps.cpp -=================================================================== ---- mp4v2-2.0.0~dfsg0.orig/util/mp4chaps.cpp -+++ mp4v2-2.0.0~dfsg0/util/mp4chaps.cpp -@@ -632,7 +632,7 @@ ChapterUtility::utility_option( int code - { - handled = true; - -- switch( code ) { -+ switch( (unsigned int)code ) { - case 'A': - case LC_CHPT_ANY: - _ChapterType = MP4ChapterTypeAny; -Index: mp4v2-2.0.0~dfsg0/util/mp4file.cpp -=================================================================== ---- mp4v2-2.0.0~dfsg0.orig/util/mp4file.cpp -+++ mp4v2-2.0.0~dfsg0/util/mp4file.cpp -@@ -189,7 +189,7 @@ FileUtility::utility_option( int code, b - { - handled = true; - -- switch( code ) { -+ switch( (unsigned int)code ) { - case LC_LIST: - _action = &FileUtility::actionList; - break; -Index: mp4v2-2.0.0~dfsg0/util/mp4subtitle.cpp -=================================================================== ---- mp4v2-2.0.0~dfsg0.orig/util/mp4subtitle.cpp -+++ mp4v2-2.0.0~dfsg0/util/mp4subtitle.cpp -@@ -164,7 +164,7 @@ SubtitleUtility::utility_option( int cod - { - handled = true; - -- switch( code ) { -+ switch( (unsigned int)code ) { - case LC_LIST: - _action = &SubtitleUtility::actionList; - break; -Index: mp4v2-2.0.0~dfsg0/util/mp4track.cpp -=================================================================== ---- mp4v2-2.0.0~dfsg0.orig/util/mp4track.cpp -+++ mp4v2-2.0.0~dfsg0/util/mp4track.cpp -@@ -788,7 +788,7 @@ TrackUtility::utility_option( int code, - { - handled = true; - -- switch( code ) { -+ switch( (unsigned int)code ) { - case LC_TRACK_WILDCARD: - _trackMode = TM_WILDCARD; - break; diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0006-Fix_FTBFS_with_cxx11.diff b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0006-Fix_FTBFS_with_cxx11.diff deleted file mode 100644 index d73b1b85..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/0006-Fix_FTBFS_with_cxx11.diff +++ /dev/null @@ -1,23 +0,0 @@ -Fixed FTBFS caused by c++11. ---- a/src/mp4.cpp -+++ b/src/mp4.cpp -@@ -870,7 +870,7 @@ - } - - catch (...) { -- return MP4_INVALID_TRACK_ID; -+ return NULL; - } - } - ---- a/src/mp4util.h -+++ b/src/mp4util.h -@@ -33,7 +33,7 @@ - #ifndef ASSERT - # define ASSERT(expr) \ - if (!(expr)) { \ -- throw new Exception("assert failure: "LIBMPV42_STRINGIFY((expr)), __FILE__, __LINE__, __FUNCTION__ ); \ -+ throw new Exception("assert failure: " LIBMPV42_STRINGIFY((expr)), __FILE__, __LINE__, __FUNCTION__ ); \ - } - #endif - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/series b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/series deleted file mode 100644 index 0de0a03c..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/patches/series +++ /dev/null @@ -1,6 +0,0 @@ -0001-Fix_mp4tags_corruption.patch -0002-Fix_m4_error.patch -0003-Reproducible_build.patch -0004-Fix_ftbfs_with_gcc7.diff -0005-Fix_FTBFS_narrowing.diff -0006-Fix_FTBFS_with_cxx11.diff diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.local b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.local deleted file mode 100644 index be7900ce..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.local +++ /dev/null @@ -1,2 +0,0 @@ -SUFFIX=~dfsg0 -rm vstudio9.0/ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.sh b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.sh deleted file mode 100755 index 4d1d55de..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.sh +++ /dev/null @@ -1,161 +0,0 @@ -#!/bin/sh - -# see the repack.stub for how to use - -# TODO: provide example watch files and repack.locals -# TODO: test suite. problems fixed that need to be tested: -# * globbing -# * whitespace and then comments in the MANIFEST -# TODO: does / in weird places work? test suite too. -# TODO: I actually broke stuff with the MANIFEST change not thinking.. -# TODO: allow for a sepearate (and multiple) MANIFEST files, then -# de-uglify libsyntax-highlight-engine-kate-perl. -# TODO: have each mv and rm check that something actually changed, and -# if not, die - -set -e -set -u - -usage() { - echo "Usage: repack.sh --upstream-version " - exit 1 -} - -if [ "$#" != "3" ]; then - usage -fi -if [ "$1" != "--upstream-version" ]; then - usage -fi -if [ ! -f "$3" ]; then - if [ -n "$3" ]; then - echo "$3 doesn't exist" - fi - usage -fi -VER="$2" -FILE="$3" -PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'` - -SUFFIX="~dfsg" - -echo -echo "Repackaging $FILE" -echo - -DIR=`mktemp -d ./tmpRepackXXXXXX` -DIR=$(readlink -f "$DIR") -trap "/bin/rm -rf \"$DIR\"" QUIT INT EXIT - -# Create an extra directory to cope with rootless tarballs -UP_BASE="$DIR/unpack" -mkdir "$UP_BASE" -tar xf "$FILE" -C "$UP_BASE" || unzip "$FILE" -d "$UP_BASE" - -if [ `ls -1 "$UP_BASE" | wc -l` -eq 1 ]; then - # Tarball does contain a root directory - UP_BASE="$UP_BASE/`ls -1 "$UP_BASE"`" -fi - -RM_OPTS="-vrf" - -real_rm(){ - /bin/rm "$@" -} - -real_mv(){ - /bin/mv "$@" -} - -rm(){ - set +f - MYOLDPWD=$(pwd) - cd "$UP_BASE" - if [ "$MANIFEST" = "1" ]; then - PERM=$(stat --format=%a "MANIFEST") - chmod u+w "MANIFEST" - fi - for i in $@; do - if [ "$MANIFEST" = "1" ]; then - PATTERN="^$i" - if [ -d "$i" ]; then - if ! { echo "$PATTERN" | grep -q "/$" ; }; then - PATTERN="${PATTERN}/" - fi - else - PATTERN="${PATTERN}\s?" - fi - grep -Ev "$PATTERN" "MANIFEST" > "$DIR/MANIFEST" - real_mv "$DIR/MANIFEST" "MANIFEST" - fi - real_rm "$RM_OPTS" "$i" - done - if [ "$MANIFEST" = "1" ]; then - chmod $PERM "MANIFEST" - fi - cd $MYOLDPWD - set -f -} - -mv(){ - set +f - OLD=$(pwd) - cd $UP_BASE - real_mv "$@" - cd $OLD - if [ "$MANIFEST" = "1" ]; then - echo "MANIFEST cannot be manipulated with mv yet, patches welcome" - exit 1 - fi - set -f -} - -# bump with incompatible changes -REPACK_VERSION=3 - -requires_version(){ - if [ $REPACK_VERSION -lt $1 ]; then - echo "repack.sh is not up to date enough for this package. you need at least version $1, while this script is only version $REPACK_VERSION" - exit 1 - fi -} - -MANIFEST=0 -## Remove stuff -set -f -MYORIGPWD=$(pwd) -cd "$UP_BASE" -. "$MYORIGPWD/debian/repack.local" -cd $MYORIGPWD -set +f -## End - -REPACK_DIR="$PKG-${VER}${SUFFIX}.orig" # DevRef § 6.7.8.2 -DFSG_TAR="$(dirname $FILE)/${PKG}_${VER}${SUFFIX}.orig.tar" - -real_mv "$UP_BASE" "$DIR/$REPACK_DIR" - -# .gz or .bz2? -FILETYPE=$(file --brief --mime-type --dereference "$FILE") -case "$FILETYPE" in - application/x-gzip|application/zip) - C_PROGRAM="gzip" - C_SUFFIX="gz" - ;; - application/x-bzip2) - C_PROGRAM="bzip2" - C_SUFFIX="bz2" - ;; - *) - echo "E: Unknown filetye $FILETYPE" - exit 1 - ;; -esac - -# Using a pipe hides tar errors! -tar cfC "$DIR/repacked.tar" "$DIR" "$REPACK_DIR" -$C_PROGRAM -9 < "$DIR/repacked.tar" > "$DIR/repacked.tar.$C_SUFFIX" - -real_mv "$DIR/repacked.tar.$C_SUFFIX" "$DFSG_TAR.$C_SUFFIX" - -echo "*** $DFSG_TAR.$C_SUFFIX ready" diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.stub b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.stub deleted file mode 100644 index a07c135a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/repack.stub +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh - -: <<=cut -=pod - -=head1 NAME - -repack.stub - script to repack upstream tarballs from uscan - -=head1 INSTRUCTIONS - -put this in debian/repack.stub and add "debian sh debian/repack.stub" to -the end of the line in debian/watch. you will also need to add a version -mangle to debian/watch. - -then create a debian/repack.local. this is a shell script that is -sources under "set -e", so be careful to check returns codes. - -=head1 FUNCTIONS - -=over 4 - -=item rm - -rm is replaced by a function that does some magic ("rm -rv" by default), but also changes MANIFEST if $MANIFEST is 1 - -=item mv - -mv is replaced by a function that just does mv (by default), but also changes MANIFEST if $MANIFEST is 1 - -=item requires_version - -requires_version is there for future usage for requiring certain versions of the script - -=back - -=head1 VARIABLES - -=over 4 - -=item SUFFIX - -defaults to ~dfsg - -what to append to the upstream version - -=item RM_OPTS - -defaults to -vrf - -options to pass to rm - -=item MANIFEST - -defaults to 0, set to 1 to turn on. - -this will manipulate MANIFEST files in CPAN tarballs. - -=item UP_BASE - -this is the directory where the upstream source is. - -=back - -=cut - -if [ -z "$REPACK_SH" ]; then - if [ -f ../../scripts/repack.sh ]; then - REPACK_SH=../../scripts/repack.sh - fi - if [ -z "$REPACK_SH" ] && which repack.sh > /dev/null; then - REPACK_SH=$(which repack.sh) - fi -fi - -if [ ! -f "$REPACK_SH" ]; then - echo "Couldn't find a repack.sh. please put it in your PATH, put it at ../../scripts/repack.sh, or put it somewhere else and set the REPACK_SH variable" - echo "You can get it from http://svn.debian.org/viewsvn/pkg-perl/scripts/repack.sh" - exit 1 -fi - -exec "$REPACK_SH" "$@" diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/rules b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/rules deleted file mode 100755 index 0e6131ed..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/rules +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/make -f -export DH_OPTIONS - -export REPACK_SH=$(CURDIR)/debian/repack.sh -DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) - -ifeq ($(DEB_HOST_ARCH),armhf) - confflags += --disable-optimize -endif - -%: - dh $@ --parallel --with autoreconf - -override_dh_auto_configure: - dh_auto_configure -- --enable-static=no $(confflags) - -override_dh_auto_test: - dh_auto_test || true - -override_dh_strip: - dh_strip --dbg-package=mp4v2-dbg - -override_dh_installchangelogs: - dh_installchangelogs -plibmp4v2-2 doc/ReleaseNotes.txt - dh_installchangelogs --remaining-packages - -override_dh_installdocs: - dh_installdocs --link-doc=libmp4v2-2 - -get-orig-source: - uscan --force-download diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/source/format b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/source/format deleted file mode 100644 index 163aaf8d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/source/options b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/source/options deleted file mode 100644 index d71748bb..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/source/options +++ /dev/null @@ -1,3 +0,0 @@ -# Use xz instead of gzip -compression = "xz" -compression-level = 9 diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/watch b/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/watch deleted file mode 100644 index 5132b53e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/debian/watch +++ /dev/null @@ -1,4 +0,0 @@ -version=3 -opts="dversionmangle=s/\~dfsg.*//" \ -http://code.google.com/p/mp4v2/downloads/list?can=1 \ -.*/mp4v2-(\d[\d.]*)\.(?:tar\.gz|tar\.bz2) diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/Authors.txt b/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/Authors.txt deleted file mode 100644 index c2fc0201..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/Authors.txt +++ /dev/null @@ -1,22 +0,0 @@ -MP4v2 2.0.0 Authors -******************* - -This document lists significant contributors to MP4v2. If any -contributors are missing please contact one of the project members. -More extensive contributor information may be found in sources, docs, -and other files where appropriate. - - Edward Groenendaal egroenen@cisco.com - Jonathon Rubin jb.rubin@gmail.com - Kona Blend kona8lend@gmail.com - Rouven Wessling mp4v2@rouvenwessling.de - -Authors from original MPEG4IP/libmp4v2 -====================================== - - Dave Mackie dmackie@cisco.com - Alix Marchandise-Franquet alix@cisco.com - Bill May wmay@cisco.com - Ximpo Group Ltd. mp4v2@ximpo.com - Danijel Kopcinovic danijel.kopcinovic@adnecto.net - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/BuildRepository.txt b/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/BuildRepository.txt deleted file mode 100644 index aab40aa8..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/BuildRepository.txt +++ /dev/null @@ -1,720 +0,0 @@ -MP4v2 2.0.0 Building the Repository -*********************************** - -Table of Contents -***************** - -1 Overview -2 Introduction -3 Quickstart -4 Build Process - 4.1 Checkout Sources - 4.2 Boostrap (Autotools) - 4.3 Configure - 4.4 Build - 4.5 Install - 4.6 Create Distribution - 4.7 Build Documentation - 4.8 Post Site and API Documentation to project website. -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 the -repository. This process is a superset of the process to build from a -source-distribution bundle. If you are interested in building from a -source-distribution bundle 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::. - - svn checkout https://mp4v2.googlecode.com/svn/releases/2.0.0 mp4v2 - cd mp4v2 - autoreconf -fiv - rm -fr build/ - mkdir build/ - cd build/ - ../configure - make - make install - make install-man - make dist - -4 Build Process -*************** - -4.1 Checkout Sources -==================== - -Checkout sources from the project's Subversion repository. - -Sources are checked out from either the trunk, release or a branch. -This document was generated from one of those, and for example -purposes, we will use exactly the same URL which used to create the -distribution which contains this document. - -If you are a project member, then you may add the appropriate -login/password information as needed. - - svn checkout https://mp4v2.googlecode.com/svn/releases/2.0.0 mp4v2 - cd mp4v2 - -It is recommended to use Subversion 1.5.0 or higher. Lower versions -might work. - -4.2 Boostrap (Autotools) -======================== - -The following command causes forces Autotools to regenerate all files -and install helper scripts needed at configure-time and to regenerate -all files. - - autoreconf -fiv - -If you are a project member and preparing for a release, it is -important to note that the versions of Autotools available in your path -will directly effect files added to the bundle. At the time of writing, -the following versions of Autotools are recommended; in some cases a -minimum is hard-coded and warnings will be issued if in violation: - - * GNU autoconf 2.61 or higher (lower versions might work) - - * GNU automake 1.10 or higher (lower versions might work) - - * GNU libtool 1.5.26 or higher (lower versions might work) - -4.3 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.4 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.5 Install -=========== - -The following command will install MP4v2. - - make install - make install-man - -4.6 Create Distribution -======================= - -The following command will create a MP4v2 source distribution. It is -during this step that shipped documentation is generated. - - make dist - -This step in the build process introduces additional requirements to -the host system. While most of the following utilities are generally -available, `help2man' is used to generate man-pages; however if this -command is not available the man-pages will be empty. This is -acceptable for non-release builds but for full quality builds this -command is required. - - * GNU help2man 1.36 or higher (lower versions should work) - - * GNU tar 1.15.1 or higher (lower versions should work) - - * GNU gzip 1.3.10 or higher (lower versions should work) - - * bzip2 1.0.4 or higher (lower versions should work) - - * Info-ZIP zip 2.32 or higher (lower versions should work) - -4.7 Build Documentation -======================= - -This step in the build process introduces some significant requirements -to the host system: - - * GNU texinfo 4.8 or higher (lower versions should work) - - * Doxygen 1.5.7 or higher (lower versions should work) - -Documentation that is shipped with source-distribution is generated as -part of the *note Build Process:: step. This section documents builds -all of the supported methods to build documentation. There are three -kinds of documentation in this project; man-pages, articles and API. -Documentation must be build from the repository. - -Man-pages are automatically generated for command-line utilities by -using `html2man' which invokes standard options `--help' and -`--version' and gleans the information, generating a man-page in nroff -script. Note that the utilities will first be built as they are -depdendencies of man-page generation. - -Artcles are usually hand-written and authored in Texinfo format which -permits macro-expansions, simple formatting and conversion to several -popular formats using the GNU `makeinfo'. A Texinfo manual -(http://www.gnu.org/software/texinfo) is available. - -API is documented inline to C and C++ source files, usually headers -using Doxygen comment-formatting. Doxygen is then used to post-process -these files and generate documentation in various formats. A Doxygen -manual is available at it's main site (http://www.doxygen.org) . - -The project's goal is to document as thoroughly as possible the public -API in MP4v2. Since we never have enough time to document everything, -we try to set some priorities in this regard. Generally the public API -is the highest priority to document. Next most important is probably -underlying utility code which is shared by many developers; for example -libplatform. - -If you need examples of how to document C-compatible source see -`include/mp4v2/mp4v2.h' and for C++-only source see -`libplatform/io/File.h' . - -The following table describes the various make targets available for -building docs. Note you must first have completed the *note Configure:: -step. - -`make man' - Generate man-pages for command-line utilities. - -`make html' - Generate articles in HTML format from `texi' files. - -`make txt' - Generate articles in plaintext format from `texi' files. - -`make wiki' - Generate articles in Google Code Wiki format from `texi' files. - -`make xml' - Generate articles in (Texinfo) XML format from `texi' files. - -`make api' - Generate API in HTML format from header files. - -`make articles' - Convenience; the equivalent of `make html txt wiki xml' . - -`make doc' - Convenience; the equivalent of `make man articles api' . - - -And finally all of the document targets have a corresponding clean -target which cleans up generated files. Simply prefix as follows: - - make manclean - make htmlclean - make txtclean - make wikiclean - make xmlclean - make apiclean - make articlesclean - make docclean - -4.8 Post Site and API Documentation to project website. -======================================================= - -This step is for project maintainers and can be used to update Site and -API documentation. The following components are updated: - - * Featured Wiki article: BuildRepository - - * Featured Wiki article: BuildSource - - * MP4v2 (trunk) docs (includes Release Notes and other articles, and - API docs). - -This procedure may only be run from a *nix platform and has only been -tested on Mac OS X. - -`make google.clean' - Clean any local working copy of google changeset. - -`make google.post' - Generate required docs, sparse-checkout google tree, remove files - which are no longer generated, add new files which are generated, - and update existing files. - -`svn ci -m "-refreshed GoogleCode site+api docs." google/.' - Check-in changes. This might take several minutes, especially if - your upstream bandwidth is limited. - - -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. - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/BuildSource.txt b/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/BuildSource.txt deleted file mode 100644 index 5a880b98..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/BuildSource.txt +++ /dev/null @@ -1,561 +0,0 @@ -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. - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/Documentation.txt b/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/Documentation.txt deleted file mode 100644 index a0e1a1a1..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/Documentation.txt +++ /dev/null @@ -1,33 +0,0 @@ -MP4v2 2.0.0 Documentation -************************* - -Introduction -============ - -Project MP4v2 consists of a C-library and various command-line -utilities which permit creation and modification of MP4 files as -defined by as defined by `ISO base media file format', document number -`ISO/IEC 14496-12:2005(E)'. - -Official website -================ - -The official website (http://code.google.com/p/mp4v2) makes various -downloads (http://code.google.com/p/mp4v2/downloads/list) available and -archives online browesable documentation for releases, including API -Reference. Questions, bug-reports and general feedback may be submitted -to the discussion (http://groups.google.com/group/mp4v2) group. - -Articles -******** - -See Release Notes (`doc/ReleaseNotes.txt') -See Building the Source (`doc/BuildSource.txt') -See Building the Repository (`doc/BuildRepository.txt') -See Authors (`doc/Authors.txt') - -Guides -****** - -See Command-line Tools Guide (`doc/ToolGuide.txt') - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/GNUmakefile.mk b/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/GNUmakefile.mk deleted file mode 100644 index 131b03fa..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/GNUmakefile.mk +++ /dev/null @@ -1,387 +0,0 @@ -############################################################################### -## -## makefile for documentation creation -## -## INTPUT FILES (SOURCE/doc) -## doc/ -## dox/ <-- generated API docs support files -## doxygen/ <-- generated API docs support files -## texi/ <-- hand-written project articles -## -## OUTPUT FILES (BUILD/doc) -## doc/ -## doc/ -## api/ -## html/ <-- API in html format -## xml/ <-- API in xml format -## articles/ -## html/ <-- articles in html format -## txt/ <-- articles in txt format -## wiki/ <-- articles in Google Code Wiki format -## xml/ <-- articles in xml-texinfo format -## man/ -## man1/ <-- man-pages for utilities -## -############################################################################### - -# Conventional VPATH directive breaks too many things so we use vpath and its -# pattern-spec feature. If new files or extensions are introduced they may need -# to be added here. - -VPATH = - -vpath COPYING $(top_srcdir) -vpath INSTALL $(top_srcdir) -vpath README $(top_srcdir) -vpath autoaux/% $(top_srcdir) -vpath %.1 $(top_srcdir) -vpath %.cpp $(top_srcdir) -vpath %.h $(top_srcdir) -vpath %.m4 $(top_srcdir) -vpath %.tcc $(top_srcdir) - -############################################################################### - -SOURCE/ = $(top_srcdir)/ -BUILD/ = $(top_builddir)/ - -DOC.in/ = $(SOURCE/)doc/ -DOC.out/ = $(BUILD/)doc/ - -DOC.out.api/ = $(DOC.out/)api/ -DOC.out.articles/ = $(DOC.out/)articles/ -DOC.out.site/ = $(DOC.out/)site/ - -############################################################################### - -M4 = m4 -M4.flags = -I$(BUILD/)project -M4.cmd = $(M4) $(M4.flags) $(1) > $(2) -M4.deps = $(BUILD/)project/project.m4 - -ifeq ($(FOUND_HELP2MAN),yes) -HELP2MAN = help2man -HELP2MAN.flags = -m "$(PROJECT_name) Utilities" -N -HELP2MAN.cmd = $(HELP2MAN) $(HELP2MAN.flags) ./$(1) -o $(2) -else -HELP2MAN.cmd = touch $(2) -endif - -MAKEINFO.flags = -I$(DOC.in/)texi -I$(DOC.out/)texi -MAKEINFO.flags.html = --html --no-headers --no-split -MAKEINFO.flags.txt = --plaintext --no-headers -MAKEINFO.flags.xml = --xml --output-indent=4 -MAKEINFO.cmd = makeinfo $(MAKEINFO.flags) $(MAKEINFO.flags.$(1)) $(2) -o $(3) - -HTMLCOMBINE = $(SOURCE/)project/htmlcombine.py -HTMLCOMBINE.cmd = $(HTMLCOMBINE) --header $(1) --footer $(2) --body $(3) > $(4) -HTMLCOMBINE.deps = $(HTMLCOMBINE) - -XML2WIKI = $(SOURCE/)project/xml2wiki.py -XML2WIKI.flags = --date --toc -XML2WIKI.cmd = $(XML2WIKI) $(XML2WIKI.flags) $(1) > $(2) -XML2WIKI.deps = $(XML2WIKI) - -DOXYGEN = doxygen -DOXYGEN.cmd = $(DOXYGEN) $(1) - -############################################################################### - -DOC.m4.out = \ - doc/texi/base/project.texi \ - doc/doxygen/Doxyfile \ - doc/doxygen/header.html \ - doc/doxygen/footer.html \ - doc/html/header.html \ - doc/html/footer.html - -DOC.man.utils = mp4art mp4file mp4subtitle mp4track -DOC.man.out = $(DOC.man.utils:%=$(DOC.out/)man/man1/%.1) - -DOC.texi.articles = $(wildcard $(DOC.in/)texi/*.texi $(DOC.out/)texi/*.texi) - -DOC.texi.includes = \ - doc/texi/base/project.texi \ - $(wildcard $(DOC.in/)texi/*/*.texi $(DOC.out/)texi/*/*.texi) - -DOC.texi2html.out = $(DOC.texi.articles:$(DOC.in/)texi/%.texi=$(DOC.out.articles/)html/%.html) -DOC.texi2txt.out = $(DOC.texi.articles:$(DOC.in/)texi/%.texi=$(DOC.out.articles/)txt/%.txt) -DOC.texi2xml.out = $(DOC.texi.articles:$(DOC.in/)texi/%.texi=$(DOC.out.articles/)xml/%.xml) - -DOC.xml2wiki.out = $(DOC.texi2xml.out:$(DOC.out.articles/)xml/%.xml=$(DOC.out.articles/)wiki/%.wiki) - -DOC.api.out = $(DOC.out.api/).stamp - -DOC.site.out = $(DOC.out.site/).stamp -DOC.site.out.copy = $(patsubst $(DOC.in/)html/%,$(DOC.out.site/)%, \ - $(filter-out %.in,$(wildcard $(DOC.in/)html/*))) -DOC.site.out.index = $(DOC.out.site/)index.html -DOC.site.out.html = $(patsubst $(DOC.out.articles/)html/%,$(DOC.out.site/)%, \ - $(filter-out %/Documentation.html,$(DOC.texi2html.out))) - -############################################################################### - -MKDIRS += $(dir $(DOC.m4.out)) -MKDIRS += $(DOC.out/)man/man1/ -MKDIRS += $(foreach n,html man texi txt wiki xml,$(DOC.out.articles/)$n) -MKDIRS += $(DOC.out.api/) -MKDIRS += $(DOC.out.site/) - -############################################################################### - -EXTRA_DIST += \ - $(SOURCE/)vstudio9.0/include/mp4v2/project.h \ - $(SOURCE/)vstudio9.0/mp4v2.sln \ - $(wildcard $(SOURCE/)vstudio9.0/*/*.vcproj) - -############################################################################### - -dist-hook: $(DOC.texi2txt.out) $(DOC.man.out) - rm -fr $(distdir)/doc - $(mkdir_p) $(distdir)/doc - $(INSTALL_DATA) $(DOC.in/)GNUmakefile.mk $(distdir)/doc/. -ifneq (,$(DOC.texi2txt.out)) - $(INSTALL_DATA) $(DOC.texi2txt.out) $(distdir)/doc/. -endif -ifneq (,$(DOC.man.out)) - $(mkdir_p) $(distdir)/doc/man/man1 - $(INSTALL_DATA) $(DOC.man.out) $(distdir)/doc/man/man1 -endif - -distclean-local: docclean - -############################################################################### - -$(DOC.m4.out): %: %.m4 $(M4.deps) | $(dir $(DOC.m4.out)) - $(call M4.cmd,$<,$@) - -############################################################################### - -.PHONY: articles doc -articles: html txt xml wiki -doc: man articles api site - -.PHONY: articlesclean apiclean docclean -articlesclean: htmlclean txtclean xmlclean wikiclean -docclean: manclean articlesclean apiclean siteclean - -.PHONY: man html txt xml wiki api -man: $(DOC.man.out) -html: $(DOC.texi2html.out) -txt: $(DOC.texi2txt.out) -xml: $(DOC.texi2xml.out) -wiki: $(DOC.xml2wiki.out) -api: $(DOC.api.out) -site: $(DOC.site.out) - -.PHONY: manclean htmlclean txtclean xmlclean wikiclean apiclean -manclean: - rm -f $(DOC.man.out) - -htmlclean: - rm -f $(DOC.texi2html.out) - -txtclean: - rm -f $(DOC.texi2txt.out) - -xmlclean: - rm -f $(DOC.texi2xml.out) - -wikiclean: - rm -f $(DOC.xml2wiki.out) - -apiclean: - rm -f $(DOC.api.out) - rm -fr $(DOC.out.api/)html/ $(DOC.out.api/)xml/ - -siteclean: - rm -fr $(DOC.out.site/) - -############################################################################### - -$(DOC.man.out): | $(dir $(DOC.man.out)) -$(DOC.man.out): $(DOC.out/)man/man1/%.1: $(BUILD/)%$(EXEEXT) - $(call HELP2MAN.cmd,$<,$@) - -$(DOC.texi2html.out): $(DOC.texi.includes) | $(dir $(DOC.texi2html.out)) -$(DOC.texi2html.out): $(DOC.out.articles/)html/%.html: $(DOC.in/)texi/%.texi - $(call MAKEINFO.cmd,html,$<,$@) - -$(DOC.texi2txt.out): $(DOC.texi.includes) | $(dir $(DOC.texi2txt.out)) -$(DOC.texi2txt.out): $(DOC.out.articles/)txt/%.txt: $(DOC.in/)texi/%.texi - $(call MAKEINFO.cmd,txt,$<,$@) - -$(DOC.texi2xml.out): $(DOC.texi.includes) | $(dir $(DOC.texi2xml.out)) -$(DOC.texi2xml.out): $(DOC.out.articles/)xml/%.xml: $(DOC.in/)texi/%.texi - $(call MAKEINFO.cmd,xml,$<,$@) - -$(DOC.xml2wiki.out): $(XML2WIKI.deps) | $(dir $(DOC.xml2wiki.out)) -$(DOC.xml2wiki.out): $(DOC.out.articles/)wiki/%.wiki: $(DOC.out.articles/)xml/%.xml - $(call XML2WIKI.cmd,$<,$@) - -$(DOC.api.out): | $(dir $(DOC.api.out)) -$(DOC.api.out): $(DOC.in/)doxygen/banner.png -$(DOC.api.out): $(DOC.in/)doxygen/project.css -$(DOC.api.out): $(DOC.out/)doxygen/header.html -$(DOC.api.out): $(DOC.out/)doxygen/footer.html -$(DOC.api.out): $(DOC.out/)doxygen/Doxyfile - $(call DOXYGEN.cmd,$<) - $(INSTALL_DATA) $(DOC.in/)doxygen/banner.png $(DOC.out.api/)html/ - touch $@ - -############################################################################### - -$(DOC.site.out): | $(DOC.out.site/)articles -$(DOC.site.out): | $(DOC.out.site/)api -$(DOC.site.out): $(DOC.site.out.copy) -$(DOC.site.out): $(DOC.site.out.index) -$(DOC.site.out): $(DOC.site.out.html) - -$(DOC.out.site/)articles: | html $(DOC.out.site/) - rm -f $@ - ln -s ../articles/html $@ - -$(DOC.out.site/)api: | api $(DOC.out.site/) - rm -f $@ - ln -s ../api/html $@ - -$(DOC.site.out.copy): $(DOC.out.site/)%: $(DOC.in/)html/% - $(INSTALL_DATA) $^ $(@D)/. - -$(DOC.site.out.index): $(DOC.out/)html/header.html $(DOC.out/)html/footer.html -$(DOC.site.out.index): $(HTMLCOMBINE.deps) -$(DOC.site.out.index): $(DOC.out.articles/)html/Documentation.html - $(call HTMLCOMBINE.cmd,$(word 2,$^),$(word 3,$^),$<,$@) - -$(DOC.site.out.html): $(DOC.out/)html/header.html $(DOC.out/)html/footer.html -$(DOC.site.out.html): $(HTMLCOMBINE.deps) -$(DOC.site.out.html): $(DOC.out.site/)%: $(DOC.out.articles/)html/% - $(call HTMLCOMBINE.cmd,$(word 2,$^),$(word 3,$^),$<,$@) - -############################################################################### - -GOOGLE.out/ = $(top_builddir)/google/ -GOOGLE.repo.doc = $(PROJECT_repo_branch) - -google.clean: - rm -fr $(GOOGLE.out/) - -google.post: site wiki -google.post: | $(GOOGLE.out/) -google.post: google.rsync google.rm google.add google.propset - -$(GOOGLE.out/): - svn co --depth immediates $(PROJECT_repo_root) $(GOOGLE.out/) - svn update --set-depth immediates google/wiki - svn update --set-depth infinity google/doc/$(GOOGLE.repo.doc) - -google.rsync: - rsync -vrptPL --delete \ - --exclude=".svn/*" --exclude=".svn" \ - --exclude="*/.svn/*" --exclude="*/.svn" \ - --exclude=".stamp" --exclude="*/.stamp" \ - --exclude="*.m4" --exclude="*/*.m4" \ - $(DOC.out.site/). $(GOOGLE.out/)doc/$(GOOGLE.repo.doc)/. - $(INSTALL_DATA) $(DOC.out.articles/)wiki/BuildRepository.wiki $(GOOGLE.out/)wiki/. - $(INSTALL_DATA) $(DOC.out.articles/)wiki/BuildSource.wiki $(GOOGLE.out/)wiki/. - -google.rm: - @files=`svn status $(GOOGLE.out/) | grep '^!' | awk '{ print $$2 }'`; \ - if [ -n "$$files" ]; then \ - svn rm $$files; \ - fi - -google.add: - @files=`svn status $(GOOGLE.out/) | grep '^?' | awk '{ print $$2 }'`; \ - if [ -n "$$files" ]; then \ - svn add $$files; \ - fi - -google.propset: - find $(GOOGLE.out/)doc/$(GOOGLE.repo.doc) -type f -a \( -name "*.html" -o -name "*.css" \) -print0 \ - | xargs -0 svn propset svn:eol-style native - find $(GOOGLE.out/)doc/$(GOOGLE.repo.doc) -type f -a -name "*.html" -print0 \ - | xargs -0 svn propset svn:mime-type "text/html" - -############################################################################### - -dist-hb: distdir=lib$(PACKAGE) -dist-hb: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >lib$(PACKAGE)-$(VERSION).tar.gz - $(am__remove_distdir) - -############################################################################### - -## Precompiled header support is tricky given libtool's complexity and its -## historical aversion to supporting it. -## -## What we do is add rules to precompile. Unfortunately, we cannot -## automatically determine what flags libtool adds for compilation variants; -## ie: PIC or non-PIC compilation. So instead we will hardcode the flags -## to match. The reason for this is the precompiled-header will not be used if -## (relevent) compilation flags differ. - -CXX.gch.static.flags = $(X_GCH_STATIC_FLAGS) -CXX.gch.static.in = libplatform/impl.h src/impl.h libutil/impl.h -CXX.gch.static.out = $(CXX.gch.static.in:%=$(BUILD/)%.gch/static) - -CXX.gch.shared.flags = $(X_GCH_SHARED_FLAGS) -CXX.gch.shared.in = libplatform/impl.h src/impl.h libutil/impl.h -CXX.gch.shared.out = $(CXX.gch.shared.in:%=$(BUILD/)%.gch/shared) - -CXX.gch.exe.flags = $(X_GCH_FLAGS) -CXX.gch.exe.in = util/impl.h -CXX.gch.exe.out = $(CXX.gch.exe.in:%=$(BUILD/)%.gch/exe) - -CXX.gch.static.dependents = $(libmp4v2_la_OBJECTS) -CXX.gch.shared.dependents = $(libmp4v2_la_OBJECTS) - -CXX.gch.exe.dependents = \ - $(mp4art_OBJECTS) \ - $(mp4chaps_OBJECTS) \ - $(mp4extract_OBJECTS) \ - $(mp4file_OBJECTS) \ - $(mp4info_OBJECTS) \ - $(mp4subtitle_OBJECTS) \ - $(mp4syncfiles_OBJECTS) \ - $(mp4tags_OBJECTS) \ - $(mp4track_OBJECTS) \ - $(mp4trackdump_OBJECTS) - -ifeq ($(X_GCH_STATIC),1) -$(CXX.gch.static.dependents): $(CXX.gch.static.out) -endif - -ifeq ($(X_GCH_SHARED),1) -$(CXX.gch.shared.dependents): $(CXX.gch.shared.out) -endif - -ifeq ($(X_GCH),1) -$(CXX.gch.exe.dependents): $(CXX.gch.exe.out) -endif - -$(CXX.gch.static.out): | $(sort $(dir $(CXX.gch.static.out))) -$(CXX.gch.static.out): $(BUILD/)%.gch/static: % - $(CXXCOMPILE) $(CXX.gch.static.flags) -c $< -o $@ - -$(CXX.gch.shared.out): | $(sort $(dir $(CXX.gch.shared.out))) -$(CXX.gch.shared.out): $(BUILD/)%.gch/shared: % - $(CXXCOMPILE) $(CXX.gch.shared.flags) -c $< -o $@ - -$(CXX.gch.exe.out): | $(sort $(dir $(CXX.gch.exe.out))) -$(CXX.gch.exe.out): $(BUILD/)%.gch/exe: % - $(CXXCOMPILE) $(CXX.gch.exe.flags) -c $< -o $@ - -MKDIRS += $(dir $(CXX.gch.static.out)) -MKDIRS += $(dir $(CXX.gch.shared.out)) -MKDIRS += $(dir $(CXX.gch.exe.out)) - -clean-local: - rm -f $(CXX.gch.static.out) - rm -f $(CXX.gch.shared.out) - rm -f $(CXX.gch.exe.out) - -############################################################################### - -$(sort $(MKDIRS)): - $(mkdir_p) $@ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/ReleaseNotes.txt b/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/ReleaseNotes.txt deleted file mode 100644 index 7c59b365..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/ReleaseNotes.txt +++ /dev/null @@ -1,127 +0,0 @@ -MP4v2 2.0.0 Release Notes -************************* - -Table of Contents -***************** - -1 What's New? -2 Breaking Changes - 2.1 Removed deprecated metadata/free-form API. -Appendix A Changelog - A.1 Version 2.0 - A.2 Version 1.9 - A.3 Version 1.6 -Appendix B SCM repository details - - -1 What's New? -************* - -[TODO] - -2 Breaking Changes -****************** - -2.1 Removed deprecated metadata/free-form API. -============================================== - -The following functions have been removed and replaced with iTMF -Generic and Tags API. Detailed documentation can be found under API -modules section. - -DeleteMetadataAtom(), DeleteMetadataFreeForm(), DeleteMetadataGenre(), -GetMetadataByIndex(), GetMetadataCoverArt(), GetMetadataCoverArtCount(), -GetMetadataDisk(), GetMetadataFreeForm(), GetMetadataGenre(), -GetMetadataString(), GetMetadataTrack(), GetMetadataUint16(), -GetMetadataUint8(), MetadataDelete(), SetMetadataCoverArt(), -SetMetadataDisk(), SetMetadataFreeForm(), SetMetadataGenre(), -SetMetadataString(), SetMetadataTrack(), SetMetadataUint16(), -SetMetadataUint8(). - -Appendix A Changelog -******************** - -A.1 Version 2.0 -=============== - - 1. Removed deprecated metadata/free-form API and replaced with iTMF - Generic and Tags API. - - 2. Added new public-API: MP4SetLogCallback(). - - -A.2 Version 1.9 -=============== - - 1. Renamed public API top-level header to `' and added - namespaces for implementation (private) symbols. Only public API - symbols are exported for dynamic (shared) or DLL libraries. All - other symbols are now private, notwithstanding static-library - usage. - - 2. Added initial AC3 support. - - 3. Added native Windows port. The port targets `WINVER 0x0500' which - is Windows 2000 or higher. - - 4. Added QuickTime and Nero chapter support. See `mp4chaps' - command-line utility. - Contributed by Ullrich Pollähne . - - 5. Enhanced `mp4art' to support multiple cover-art atoms. - - 6. Dropped `mp4dump' and replaced with `mp4file' which supports - general file operations. - - 7. Added `mp4track' with colr-box and pasp-box support. - - 8. Fixed corruption of udta.name atom during read-in. - - 9. Enhanced `mp4file --dump' to show hexdump-style canonical - hex+ASCII data. - - 10. Enhanced `mp4file --dump' to show human-readble value for tag - typeCode values. - - 11. Enhanced `mp4file --dump' to show human-readble value for - ISO-639-2/T language codes. - - 12. Added new public-API: MP4GetTrackLanguage(). - - 13. Added new public-API: MP4SetTrackLanguage(). - - 14. Added support for GCC precompiled-headers on various *nix - platforms to speed up builds as we are using quite a few C++ - headers. - - 15. Enhanced `mp4track' to facilitate modification of { enabled, - inmovie, inpreview, altgroup, volume, width, height, language, - hdlrname, udtaname } properties. - - 16. Added new public-API: MP4GetTrackDurationPerChunk(). - - 17. Added new public-API: MP4SetTrackDurationPerChunk() to override - default per-track chunk duration. - - 18. Added new public-API: MP4WriteSampleDependency(). - - 19. Replaced (undocumented) public-API: MP4CreateEx() with - MP4CreateProvider(). - - 20. Added new public-API for iTMF Generic functionality. - -A.3 Version 1.6 -=============== - - 1. Branched libmp4v2 module from mpeg4ip project version 1.6.1. - -Appendix B SCM repository details -********************************* - - url: https://mp4v2.googlecode.com/svn/releases/2.0.0 - root: https://mp4v2.googlecode.com/svn - uuid: 6e6572fa-98a6-11dd-ad9f-f77439c74b79 - rev: 493 - date: 2012-05-20 15:16:54 -0700 (Sun, 20 May 2012) - type: stable - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/ToolGuide.txt b/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/ToolGuide.txt deleted file mode 100644 index e7c08a29..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/ToolGuide.txt +++ /dev/null @@ -1,415 +0,0 @@ -MP4v2 2.0.0 Command-line Tools Guide -************************************ - -Table of Contents -***************** - -1 Overview -2 Introduction -3 Common Options -4 mp4file -5 mp4track -6 mp4art - - -1 Overview -********** - -MP4v2 bundles several command-line tools which, in general, allow some -basic manipulation of mp4 files which have been created by other means. -They are not meant to be a complete solution to management of mp4 file -structure. - -The following is a brief summary of the tools available and the -functionality offered. Other tools may be packaged with the -distribution but are not yet stable enough to even document. User -beware. - -`mp4file' - Operates on the entire file with actions such as list (summary - information), optimization and ASCII dumps. - -`mp4track' - Operates on individual tracks with actions such as colr-box and - pasp-box manipulation. - -`mp4art' - Operates on iTunes Metadata Cover-art Boxes with actions such as - list, add, replace, remove and extraction of Cover-art images. - -2 Introduction -************** - -The tools are invoked by their command-name, followed by one or more -options, actions, parameters for actions, and finally one or more files -on which the tool will operate. Options are specified in one of two -ways; in short or long syntax. A short-syntax option is prefixed with -exactly one dash while a long-syntax option is prefixed with exactly -two dashes. Depending on the option, it may or may not expect an -argument. Specifying an option which expects an argument usually -follows either of the following patterns: - - toolname --something value ... - toolname --something=value ... - -The rest of this guide will use the equals sign method. - -3 Common Options -**************** - -Many of the tools share a common set of options which. These common -options usually have identically behaving short or long syntax. In some -cases short-syntax differs from long-syntax in that it may not require -an argument. This style is used sparingly and only when truly -convenient. Even though it is common practice in many unix-style tools -to permit optional arguments, the tools used in this project will tend -to avoid that because it can create a great deal of confusion. - -The following is a list of common options available: - -`-y, --dryrun' - do not actually create or modify any files. In situations where - the command will create new or modify existing files, specifying - this option will cause the tool to do as much as possible stopping - short of performing any actual writes. This is useful to guard - against user mistakes or unexpected behavior. - -`-k, --keepgoing' - continue batch processing even after errors. When actions involve - multiple files or operations, the default behavior is to stop and - exit on the first error encountered. Specify this option if it is - desirable to record the error but continue processing. - -`-o, --overwrite' - overwrite existing files when creating. In situations where a new - file will be created, the default behavior is to not overwrite a - file if it already exists. Use this option to allow overwriting. - -`-f, --force' - force overwrite even if file is read-only. If overwriting is - enabled, file permissions may prevent writes. Specify this option - to try and overwrite the file anyways. This usually involves - deleting the file, then creating a new one. - -`-q, --quiet' - equivalent to -verbose 0. Default behavior is to print a low - amount of informative information, usually one line of text per - action/file. Specify this option to omit normal messages. Errors - will still be reported. - -`-d, --debug NUM' - increase debug or long-option to set NUM. File I/O with mp4 file - structures have special debug options available to users - interested in all the fine details. Default is level 1 . The - short-syntax is accumulative and takes no argument, while - long-syntax takes an argument. For exmaple, the following are - equivalent and would set level 3: `-dd' or `-d -d' or `--debug=3'. - The following levels are available: - 0. supressed - - 1. add warnings and errors (default) - - 2. add table details - - 3. add implicits - - 4. everything - -`-v, --verbose NUM' - increase verbosity or long-option to set NUM. Tool activity by - default will generally print one informative message per - action/file. Specify this option to change the default behavior. - The short-syntax is accumulative and takes no argument, while - long-syntax takes an argument. - 0. warnings and errors - - 1. normal informative messages (default) - - 2. more informative messages - - 3. everything - -`-h, --help' - print brief help or long-option for extended help. The - short-syntax will produce brief help. Specify the long-option for - more extensive help. - -`--version' - print version information and exit. Extended version information - used for SCM purposes is not listed in help, but is available by - specifying `--verionx'. - -4 mp4file -********* - -`--list' - list (summary information). This will produce brief report when - summarizing each mp4 file. BRAND shows the file's main brand - identifier. COMPAT shows additional brands for which the file - purports to be comaptible with. SIZING displays if the file has - 64-bit extensions of any kind, otherwise 32-bit. Example output: - BRAND COMPAT SIZING FILE - ---------------------------------------------------------------------- - M4A M4A,isom,mp42 32-bit Song.m4a - mp42 isom,mp42 32-bit Movie1.m4v - mp42 isom,mp42 32-bit Movie2.m4v - -`--optimize' - optimize mp4 structure. This will rewrite the entire mp4 file - which, if needed, will clean up any unused (free) sections, and - re-order the atoms in a manner somewhat consistent with the - best-practices described in the ISO base media file specification. - -`--dump' - dump mp4 structure in human-readable format. An ASCII dump of mp4 - atoms is printed to stdout. This action is heavily influenced by - `--debug' option. - - Example, list some files: - mp4file --list *.mp4 *.m4a *.m4v - - Example, dump a file with more than usual debugging information: - mp4file -dd --dump movie.m4v - -5 mp4track -********** - -This tool is used to manage various aspects of individual tracks in an -mp4 file. Some of the actions are mp4 (generic) while others may -support standards based on mp4 files such as `.m4a' or `.m4v' files. -Each action has an appropriate scope upon which it acts. See individual -actions for details. The following parameters are used to set scopes -for actions: - -`--track-any' - act on any/all tracks. - -`--track-index IDX' - act on a single track specified by index value. A track index is - 0-based and counts upwards for each track available. - -`--track-id ID' - act on a single track specified by id value. A track id is a - unique value assigned to each track and never changes. - -The list action will produce a brief report of each track for each mp4 -file. Many (but not all) of the values shown may be modified by -actions documented later in this article. This will produce a brief -report of each track for each mp4 file. - -`--list' - list all tracks in mp4. Example output: - track[0] id=1 - type = video - enabled = true - inMovie = false - inPreview = false - layer = 0 - alternateGroup = 0 - volume = 0.0000 - width = 850.96295166 - height = 360.00000000 - language = UNDEFINED(0) - handlerName = - userDataName = - -The following group of actions are used to modify the values shown by --list action. The modification of these values should be done with -great care on any files, and as always you are cautioned to backup your -media files before modification. - -`--enabled BOOL' - set trak.tkhd.flags (enabled bit). When true indicates the track - is enabled. - -`--inmovie BOOL' - set trak.tkhd.flags (inMovie bit). When true indicates the track - is used in the movie. - -`--inpreview BOOL' - set trak.tkhd.flags (inPreview bit). When true indicates the - track is used in the movie's preview. - -`--layer NUM' - set trak.tkhd.layer. Specifies the front-to-back ordering of - video tracks; tracks with lower numbers are closer to the viewer. - 0 is the normal value, and -1 would be in front of track 0, and so - on. - -`--altgroup NUM' - set trak.tkhd.alternate_group. An integer that specifies a group - or collection of tracks. If this field is 0 there is no - information on possible relations to other tracks. If this field - is not 0, it should be the same for tracks that contain alternate - data for one another and different for tracks belonging to - different such groups. Only one track within an alternate group - should be played or streamed at any one time, and must be - distinguishable from other tracks in the group via attributes such - as bitrate, codec, language, packet size etc. A group may have - only one member. - -`--volume FLOAT' - set trak.tkhd.volume. Specifies the track's relative audio - volume. Full volume is 1.0 and is the normal value. - -`--width FLOAT' - set trak.tkhd.width. Specifies the track's visual presentation - width. By default this is the same as the pixel width of the - images. All images in the sequence are scaled to this size before - any overall transformation by the matrix. - -`--height FLOAT' - set trak.tkhd.height. Specifies the track's visual presentation - height. By default this is the same as the pixel width of the - images. All images in the sequence are scaled to this size before - any overall transformation by the matrix. - -`--language CODE' - set trak.mdia.mdhd.language. Specifies the ISO-639-2/T langauge - code of the track. For example, `eng' for English, `fra' for - French. - -`--hdlrname STR' - set trak.mdia.hdlr.name. Specifies a human-readable track type - (for debugging and inspection purposes). - -`--udtaname STR' - set trak.udta.name.value. Specifies an arbitrary track-name. This - value is optional (may be absent). - -`--udtaname-remove' - remove trak.udta.name atom. This action will remove the optional - atom. - - -The colr related actions manage Color Parameter boxes which are used by -QuickTime to map numerical values of pixels in a file to a common -representation of color for video tracks. They may or may not be -suitable for other Apple media players. Community feedback on -compatibility is welcome. - -`--colr-list' - list all colr-boxes in mp4. - -`--colr-add' - add colr-box to a video track. An individual track must be - specified. - -`--colr-set' - set colr-box parms. An individual track must be specified. - -`--colr-remove' - remove colr-box from track. By default all colr-boxes will be - removed unless an individual track is specified. - -`--colr-parms CSV' - where CSV is IDX1,IDX2,IDX3 . Specify the exact parameters of an - NCLC Color Parameter box as specified in the QuickTime - specification. IDX1 correlates to the 16-bit primaries index. - IDX2 correlates to the 16-bit transferFunction index. IDX3 - correlates to the 16-bit matrixIndex index. Effects actions - -colr-add, -colr-set. - -`--colr-parm-hd' - equivalent to -colr-parms=1,1,1 . This is a convenience setting - generally suitable for HD content. Effects actions -colr-add, - -colr-set. - -`--colr-parm-sd' - equivalent to -colr-parms=6,1,6 . This is a convenience setting - generally suitable for SD content. Effects actions -colr-add, - -colr-set. - - Example, add a colr-box tuned for HD content: - mp4track --track-id=1 --colr-add --colr-parm-hd mymovie.m4v - - Example, add a colr-box with arbitrary index parameters: - mp4track --track-id=1 --colr-add --colr-parms=2,3,4 mymovie.m4v - - -The pasp related actions manage Picture Aspect Ratio boxes which are -used by QuickTime to specify height-to-width ratio of pixels for video -tracks. They may or may not be suitable for other Apple media players. -Community feedback on compatibility is welcome. - -`--pasp-list' - list all pasp-boxes in mp4. - -`--pasp-add' - add pasp-box to a video track. An individual track must be - specified. - -`--pasp-set' - set pasp-box parms. An individual track must be specified. - -`--pasp-remove' - remove pasp-box from track By default all pasp-boxes will be - removed unless an individual track is specified. - -`--pasp-parms CSV' - where CSV is hSPACING,vSPACING. Specify the exact parameters of - Picture Aspect Ratio box as specified in the QuickTime - specification. Effects actions -pasp-add, -pasp-set. - - Example, add a pasp-box with default (1,1) parameters for square - pixels: - mp4track --track-id=1 --pasp-add --pasp-parms=1,1 mymovie.m4v - - Example, add a pasp-box for 16:9 digital 525 (NTSC): - mp4track --track-id=1 --pasp-add --pasp-parms=40,33 mymovie.m4v - - Example, add a pasp-box for 16:9 digital 625 (PAL): - mp4track --track-id=1 --pasp-add --pasp-parms=118,81 mymovie.m4v - - -6 mp4art -******** - -This tool is used to manage iTunes Metadata Cover-art which is -typically used to embed an image to a song file. For example, the songs -in an album collection might all contain an image of the album cover -art. This data is usually found in `.m4a', `.m4v' and `.mov' files. - -`--art-any' - act on all covr-boxes (default). Specifies the scope of the - action to operate on all, if applicable, covr-boxes. - -`--art-index IDX' - act on covr-box index IDX. Specifies the scope of the action to - operate on single covr-box INDEX. - -`--list' - list all covr-boxes. - IDX BYTES CRC32 TYPE FILE - ---------------------------------------------------------------------- - 0 173613 710a3ec9 JPEG 01 Life In Technicolor.m4a - 0 173613 710a3ec9 JPEG 02 Cemeteries Of London.m4a - 0 173613 710a3ec9 JPEG 03 Lost!.m4a - 0 173613 710a3ec9 JPEG 04 42.m4a - 0 173613 710a3ec9 JPEG 05 Lovers In Japan _ Reign Of Love.m4a - 0 173613 710a3ec9 JPEG 06 Yes.m4a - 0 173613 710a3ec9 JPEG 07 Viva La Vida.m4a - 0 173613 710a3ec9 JPEG 08 Violet Hill.m4a - 0 173613 710a3ec9 JPEG 09 Strawberry Swing.m4a - 0 173613 710a3ec9 JPEG 10 Death And All His Friends.m4a - -`--add IMG' - add covr-box from IMG file. - -`--replace IMG' - replace covr-box with IMG file. - -`--remove' - remove covr-box. - -`--extract' - extract covr-box. This will extract all covr-box data to image - files in the format of `BASENAME.art[INDEX].TYPE' . - - Example, add PNG image file: - mp4art --add ACDC.png mysong.m4a - - Example, extract image files from file: - mp4art --extract mysong.m4a - - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4art.1 b/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4art.1 deleted file mode 100644 index 6bea9467..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4art.1 +++ /dev/null @@ -1,98 +0,0 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH MP4ART "1" "May 2012" "mp4art - MP4v2 2.0.0" "MP4v2 Utilities" -.SH NAME -mp4art \- manual page for mp4art - MP4v2 2.0.0 -.SH SYNOPSIS -.B mp4art -[\fIOPTION\fR]... \fIACTION file\fR... -.SH DESCRIPTION -For each mp4 (m4a) file specified, perform the specified ACTION. An action -must be specified. Some options are not applicable for some actions. -.PP -ACTIONS -.TP -\fB\-\-list\fR -list all covr\-boxes -.TP -\fB\-\-add\fR IMG -add covr\-box from IMG file -.TP -\fB\-\-replace\fR IMG -replace covr\-box with IMG file -.TP -\fB\-\-remove\fR -remove covr\-box -.TP -\fB\-\-extract\fR -extract covr\-box -.PP -ACTION PARAMETERS -.TP -\fB\-\-art\-any\fR -act on all covr\-boxes (default) -.TP -\fB\-\-art\-index\fR IDX -act on covr\-box index IDX -.PP -OPTIONS -.TP -\fB\-z\fR, \fB\-\-optimize\fR -optimize mp4 file after modification -.TP -\fB\-y\fR, \fB\-\-dryrun\fR -do not actually create or modify any files -.TP -\fB\-k\fR, \fB\-\-keepgoing\fR -continue batch processing even after errors -.TP -\fB\-o\fR, \fB\-\-overwrite\fR -overwrite existing files when creating -.TP -\fB\-f\fR, \fB\-\-force\fR -force overwrite even if file is read\-only -.TP -\fB\-q\fR, \fB\-\-quiet\fR -equivalent to \fB\-\-verbose\fR 0 -.TP -\fB\-d\fR, \fB\-\-debug\fR NUM -increase debug or long\-option to set NUM -.TP -\fB\-v\fR, \fB\-\-verbose\fR NUM -increase verbosity or long\-option to set NUM -.TP -\fB\-h\fR, \fB\-\-help\fR -print brief help or long\-option for extended help -.TP -\fB\-\-version\fR -print version information and exit -.PP -DEBUG LEVELS (for raw mp4 file I/O) -.TP -0 -supressed -.TP -1 -add warnings and errors (default) -.TP -2 -add table details -.TP -3 -add implicits -.TP -4 -everything -.PP -VERBOSE LEVELS -.TP -0 -warnings and errors -.TP -1 -normal informative messages (default) -.TP -2 -more informative messages -.TP -3 -everything diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4file.1 b/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4file.1 deleted file mode 100644 index 8d58e2a2..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4file.1 +++ /dev/null @@ -1,75 +0,0 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH MP4FILE "1" "May 2012" "mp4file - MP4v2 2.0.0" "MP4v2 Utilities" -.SH NAME -mp4file \- manual page for mp4file - MP4v2 2.0.0 -.SH SYNOPSIS -.B mp4file -[\fIOPTION\fR]... \fIACTION file\fR... -.SH DESCRIPTION -For each mp4 file specified, perform the specified ACTION. An action must be -specified. Some options are not applicable to some actions. -.PP -ACTIONS -.TP -\fB\-\-list\fR -list (summary information) -.TP -\fB\-\-optimize\fR -optimize mp4 structure -.TP -\fB\-\-dump\fR -dump mp4 structure in human\-readable format -.PP -OPTIONS -.TP -\fB\-y\fR, \fB\-\-dryrun\fR -do not actually create or modify any files -.TP -\fB\-k\fR, \fB\-\-keepgoing\fR -continue batch processing even after errors -.TP -\fB\-q\fR, \fB\-\-quiet\fR -equivalent to \fB\-\-verbose\fR 0 -.TP -\fB\-d\fR, \fB\-\-debug\fR NUM -increase debug or long\-option to set NUM -.TP -\fB\-v\fR, \fB\-\-verbose\fR NUM -increase verbosity or long\-option to set NUM -.TP -\fB\-h\fR, \fB\-\-help\fR -print brief help or long\-option for extended help -.TP -\fB\-\-version\fR -print version information and exit -.PP -DEBUG LEVELS (for raw mp4 file I/O) -.TP -0 -supressed -.TP -1 -add warnings and errors (default) -.TP -2 -add table details -.TP -3 -add implicits -.TP -4 -everything -.PP -VERBOSE LEVELS -.TP -0 -warnings and errors -.TP -1 -normal informative messages (default) -.TP -2 -more informative messages -.TP -3 -everything diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4subtitle.1 b/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4subtitle.1 deleted file mode 100644 index 357bca06..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4subtitle.1 +++ /dev/null @@ -1,87 +0,0 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH MP4SUBTITLE "1" "May 2012" "mp4subtitle - MP4v2 2.0.0" "MP4v2 Utilities" -.SH NAME -mp4subtitle \- manual page for mp4subtitle - MP4v2 2.0.0 -.SH SYNOPSIS -.B mp4subtitle -[\fIOPTION\fR]... \fIACTION file\fR... -.SH DESCRIPTION -For each mp4 file specified, perform the specified ACTION. An action must be -specified. Some options are not applicable to some actions. -.PP -ACTIONS -.TP -\fB\-\-list\fR -list available subtitles -.TP -\fB\-\-export\fR TXT -export subtitles to TXT -.TP -\fB\-\-import\fR TXT -import subtitles from TXT -.TP -\fB\-\-remove\fR -remove all subtitles -.PP -OPTIONS -.TP -\fB\-z\fR, \fB\-\-optimize\fR -optimize mp4 file after modification -.TP -\fB\-y\fR, \fB\-\-dryrun\fR -do not actually create or modify any files -.TP -\fB\-k\fR, \fB\-\-keepgoing\fR -continue batch processing even after errors -.TP -\fB\-o\fR, \fB\-\-overwrite\fR -overwrite existing files when creating -.TP -\fB\-f\fR, \fB\-\-force\fR -force overwrite even if file is read\-only -.TP -\fB\-q\fR, \fB\-\-quiet\fR -equivalent to \fB\-\-verbose\fR 0 -.TP -\fB\-d\fR, \fB\-\-debug\fR NUM -increase debug or long\-option to set NUM -.TP -\fB\-v\fR, \fB\-\-verbose\fR NUM -increase verbosity or long\-option to set NUM -.TP -\fB\-h\fR, \fB\-\-help\fR -print brief help or long\-option for extended help -.TP -\fB\-\-version\fR -print version information and exit -.PP -DEBUG LEVELS (for raw mp4 file I/O) -.TP -0 -supressed -.TP -1 -add warnings and errors (default) -.TP -2 -add table details -.TP -3 -add implicits -.TP -4 -everything -.PP -VERBOSE LEVELS -.TP -0 -warnings and errors -.TP -1 -normal informative messages (default) -.TP -2 -more informative messages -.TP -3 -everything diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4track.1 b/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4track.1 deleted file mode 100644 index 556d6e3a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/doc/man/man1/mp4track.1 +++ /dev/null @@ -1,161 +0,0 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH MP4TRACK "1" "May 2012" "mp4track - MP4v2 2.0.0" "MP4v2 Utilities" -.SH NAME -mp4track \- manual page for mp4track - MP4v2 2.0.0 -.SH SYNOPSIS -.B mp4track -[\fIOPTION\fR]... [\fIPARAMETERS\fR]... \fIACTION file\fR... -.SH DESCRIPTION -For each mp4 file specified, perform the specified ACTION. An action must be -specified. Some options are not applicable to some actions. -.PP -ACTIONS -.TP -\fB\-\-list\fR -list all tracks in mp4 -.TP -\fB\-\-enabled\fR BOOL -set trak.tkhd.flags (enabled bit) -.TP -\fB\-\-inmovie\fR BOOL -set trak.tkhd.flags (inMovie bit) -.TP -\fB\-\-inpreview\fR BOOL -set trak.tkhd.flags (inPreview bit) -.TP -\fB\-\-layer\fR NUM -set trak.tkhd.layer -.TP -\fB\-\-altgroup\fR NUM -set trak.tkhd.alternate_group -.TP -\fB\-\-volume\fR FLOAT -set trak.tkhd.volume -.TP -\fB\-\-width\fR FLOAT -set trak.tkhd.width -.TP -\fB\-\-height\fR FLOAT -set trak.tkhd.height -.TP -\fB\-\-language\fR CODE -set trak.mdia.mdhd.language -.TP -\fB\-\-hdlrname\fR STR -set trak.mdia.hdlr.name -.TP -\fB\-\-udtaname\fR STR -set trak.udta.name.value -.TP -\fB\-\-udtaname\-remove\fR -remove trak.udta.name atom -.TP -\fB\-\-colr\-list\fR -list all colr\-boxes in mp4 -.TP -\fB\-\-colr\-add\fR -add colr\-box to a video track -.TP -\fB\-\-colr\-set\fR -set colr\-box parms -.TP -\fB\-\-colr\-remove\fR -remove colr\-box from track -.TP -\fB\-\-pasp\-list\fR -list all pasp\-boxes in mp4 -.TP -\fB\-\-pasp\-add\fR -add pasp\-box to a video track -.TP -\fB\-\-pasp\-set\fR -set pasp\-box parms -.TP -\fB\-\-pasp\-remove\fR -remove pasp\-box from track -.PP -PARAMETERS -.TP -\fB\-\-track\-any\fR -act on any/all tracks -.TP -\fB\-\-track\-index\fR IDX -act on track index IDX -.TP -\fB\-\-track\-id\fR ID -act on track id ID -.TP -\fB\-\-colr\-parms\fR CSV -where CSV is IDX1,IDX2,IDX3 -.TP -\fB\-\-colr\-parm\-hd\fR -equivalent to \fB\-\-colr\-parms\fR=\fI1\fR,1,1 -.TP -\fB\-\-colr\-parm\-sd\fR -equivalent to \fB\-\-colr\-parms\fR=\fI6\fR,1,6 -.TP -\fB\-\-pasp\-parms\fR CSV -where CSV is hSPACING,vSPACING -.PP -OPTIONS -.TP -\fB\-z\fR, \fB\-\-optimize\fR -optimize mp4 file after modification -.TP -\fB\-y\fR, \fB\-\-dryrun\fR -do not actually create or modify any files -.TP -\fB\-k\fR, \fB\-\-keepgoing\fR -continue batch processing even after errors -.TP -\fB\-o\fR, \fB\-\-overwrite\fR -overwrite existing files when creating -.TP -\fB\-f\fR, \fB\-\-force\fR -force overwrite even if file is read\-only -.TP -\fB\-q\fR, \fB\-\-quiet\fR -equivalent to \fB\-\-verbose\fR 0 -.TP -\fB\-d\fR, \fB\-\-debug\fR NUM -increase debug or long\-option to set NUM -.TP -\fB\-v\fR, \fB\-\-verbose\fR NUM -increase verbosity or long\-option to set NUM -.TP -\fB\-h\fR, \fB\-\-help\fR -print brief help or long\-option for extended help -.TP -\fB\-\-version\fR -print version information and exit -.PP -DEBUG LEVELS (for raw mp4 file I/O) -.TP -0 -supressed -.TP -1 -add warnings and errors (default) -.TP -2 -add table details -.TP -3 -add implicits -.TP -4 -everything -.PP -VERBOSE LEVELS -.TP -0 -warnings and errors -.TP -1 -normal informative messages (default) -.TP -2 -more informative messages -.TP -3 -everything diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/chapter.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/chapter.h deleted file mode 100644 index 5b493a53..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/chapter.h +++ /dev/null @@ -1,176 +0,0 @@ -#ifndef MP4V2_CHAPTER_H -#define MP4V2_CHAPTER_H - -/**************************************************************************//** - * - * @defgroup mp4_chapter MP4v2 Chapter - * @{ - * - *****************************************************************************/ - -/** The maximum length of a QuickTime chapter title (in 8-bit chars) - */ -#define MP4V2_CHAPTER_TITLE_MAX 1023 - -/** Chapter item. - * This item defines various attributes for a chapter. - * @ingroup mp4_chapter - */ -typedef struct MP4Chapter_s { - MP4Duration duration; /**< duration of chapter in milliseconds */ - char title[MP4V2_CHAPTER_TITLE_MAX+1]; /**< title of chapter */ -} MP4Chapter_t; - -/** Known chapter types. - * @ingroup mp4_chapter - */ -typedef enum { - MP4ChapterTypeNone = 0, /**< no chapters found return value */ - MP4ChapterTypeAny = 1, /**< any or all known chapter types */ - MP4ChapterTypeQt = 2, /**< QuickTime chapter type */ - MP4ChapterTypeNero = 4 /**< Nero chapter type */ -} MP4ChapterType; - -/** Add a QuickTime chapter. - * - * This function adds a QuickTime chapter to file hFile. - * - * @param hFile handle of file to add chapter. - * @param chapterTrackId ID of chapter track or #MP4_INVALID_TRACK_ID - * if unknown. - * @param chapterDuration duration (in the timescale of the chapter track). - * @param chapterTitle title text for the chapter or NULL to use default - * title format ("Chapter %03d", n) where n is the chapter number. - */ -MP4V2_EXPORT -void MP4AddChapter( - MP4FileHandle hFile, - MP4TrackId chapterTrackId, - MP4Duration chapterDuration, - const char* chapterTitle DEFAULT(0)); - -/** Add a QuickTime chapter track. - * - * This function adds a chapter (text) track to file hFile. - * The optional parameter timescale may be supplied to give the new - * chapter a specific timescale. Otherwise the chapter track will have - * the same timescale as the reference track defined in parameter refTrackId. - * - * @param hFile handle of file to add chapter track. - * @param refTrackId ID of the track that will reference the chapter track. - * @param timescale the timescale of the chapter track or 0 to use the - * timescale of track specified by refTrackId. - * - * @return ID of the created chapter track. - */ -MP4V2_EXPORT -MP4TrackId MP4AddChapterTextTrack( - MP4FileHandle hFile, - MP4TrackId refTrackId, - uint32_t timescale DEFAULT(0) ); - -/** Add a Nero chapter. - * - * This function adds a Nero chapter to file hFile. - * - * @param hFile handle of file to add chapter. - * @param chapterStart the start time of the chapter in 100 nanosecond units - * @param chapterTitle title text for the chapter or NULL to use default - * title format ("Chapter %03d", n) where n is the chapter number. - */ -MP4V2_EXPORT -void MP4AddNeroChapter( - MP4FileHandle hFile, - MP4Timestamp chapterStart, - const char* chapterTitle DEFAULT(0)); - -/** Convert chapters to another type. - * - * This function converts existing chapters in file hFile - * from one type to another type. - * Conversion from Nero to QuickTime or QuickTime to Nero is supported. - * - * @param hFile handle of file to convert. - * @param toChapterType the chapter type to convert to: - * @li #MP4ChapterTypeQt (convert from Nero to Qt) - * @li #MP4ChapterTypeNero (convert from Qt to Nero) - * - * @return the chapter type before conversion or #MP4ChapterTypeNone - * if the source chapters do not exist - * or invalid toChapterType was specified. - */ -MP4V2_EXPORT -MP4ChapterType MP4ConvertChapters( - MP4FileHandle hFile, - MP4ChapterType toChapterType DEFAULT(MP4ChapterTypeQt)); - -/** Delete chapters. - * - * This function deletes existing chapters in file hFile. - * - * @param hFile handle of file to delete chapters. - * @param chapterType the type of chapters to delete: - * @li #MP4ChapterTypeAny (delete all known chapter types) - * @li #MP4ChapterTypeQt - * @li #MP4ChapterTypeNero - * @param chapterTrackId ID of the chapter track if known, - * or #MP4_INVALID_TRACK_ID. - * Only applies when chapterType=#MP4ChapterTypeQt. - * - * @return the type of deleted chapters - */ -MP4V2_EXPORT -MP4ChapterType MP4DeleteChapters( - MP4FileHandle hFile, - MP4ChapterType chapterType DEFAULT(MP4ChapterTypeQt), - MP4TrackId chapterTrackId DEFAULT(MP4_INVALID_TRACK_ID) ); - -/** Get list of chapters. - * - * This function gets a chpter list from file hFile. - * - * @param hFile handle of file to read. - * @param chapterList address receiving array of chapter items. - * If a non-NULL is received the caller is responsible for freeing the - * memory with MP4Free(). - * @param chapterCount address receiving count of items in array. - * @param chapterType the type of chapters to read: - * @li #MP4ChapterTypeAny (any chapters, searched in order of Qt, Nero) - * @li #MP4ChapterTypeQt - * @li #MP4ChapterTypeNero - * - * @result the first type of chapters found. - */ -MP4V2_EXPORT -MP4ChapterType MP4GetChapters( - MP4FileHandle hFile, - MP4Chapter_t** chapterList, - uint32_t* chapterCount, - MP4ChapterType chapterType DEFAULT(MP4ChapterTypeQt)); - -/** Set list of chapters OKOK. - * - * This functions sets the complete chapter list in file hFile. - * If any chapters of the same type already exist they will first - * be deleted. - * - * @param hFile handle of file to modify. - * @param chapterList array of chapters items. - * @param chapterCount count of items in array. - * @param chapterType type of chapters to write: - * @li #MP4ChapterTypeAny (chapters of all types are written) - * @li #MP4ChapterTypeQt - * @li #MP4ChapterTypeNero - * - * @return the type of chapters written. - */ -MP4V2_EXPORT -MP4ChapterType MP4SetChapters( - MP4FileHandle hFile, - MP4Chapter_t* chapterList, - uint32_t chapterCount, - MP4ChapterType chapterType DEFAULT(MP4ChapterTypeQt)); - -/** @} ***********************************************************************/ - -#endif /* MP4V2_CHAPTER_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/file.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/file.h deleted file mode 100644 index fc0c5ef9..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/file.h +++ /dev/null @@ -1,362 +0,0 @@ -#ifndef MP4V2_FILE_H -#define MP4V2_FILE_H - -/**************************************************************************//** - * - * @defgroup mp4_file MP4v2 File I/O - * @{ - * - *****************************************************************************/ - -/** Bit: enable 64-bit data-atoms. */ -#define MP4_CREATE_64BIT_DATA 0x01 -/** Bit: enable 64-bit time-atoms. @note Incompatible with QuickTime. */ -#define MP4_CREATE_64BIT_TIME 0x02 -/** Bit: do not recompute avg/max bitrates on file close. @note See http://code.google.com/p/mp4v2/issues/detail?id=66 */ -#define MP4_CLOSE_DO_NOT_COMPUTE_BITRATE 0x01 - -/** Enumeration of file modes for custom file provider. */ -typedef enum MP4FileMode_e -{ - FILEMODE_UNDEFINED, /**< undefined */ - FILEMODE_READ, /**< file may be read */ - FILEMODE_MODIFY, /**< file may be read/written */ - FILEMODE_CREATE /**< file will be created/truncated for read/write */ -} MP4FileMode; - -/** Structure of functions implementing custom file provider. - * - * Except for open, all the functions must return a true value - * to indicate failure or false on success. The open function must return - * a pointer or handle which represents the open file, otherwise NULL. - * - * maxChunkSize is a hint suggesting what the max size of data should be read - * as in underlying read/write operations. A value of 0 indicates there is no hint. - */ -typedef struct MP4FileProvider_s -{ - void* ( *open )( const char* name, MP4FileMode mode ); - int ( *seek )( void* handle, int64_t pos ); - int ( *read )( void* handle, void* buffer, int64_t size, int64_t* nin, int64_t maxChunkSize ); - int ( *write )( void* handle, const void* buffer, int64_t size, int64_t* nout, int64_t maxChunkSize ); - int ( *close )( void* handle ); -} MP4FileProvider; - -/** Close an mp4 file. - * MP4Close closes a previously opened mp4 file. If the file was opened - * writable with MP4Create() or MP4Modify(), then MP4Close() will write - * out all pending information to disk. - * - * @param hFile handle of file to close. - * @param flags bitmask that allows the user to set extra options for the - * close commands. Valid options include: - * @li #MP4_CLOSE_DO_NOT_COMPUTE_BITRATE - */ -MP4V2_EXPORT -void MP4Close( - MP4FileHandle hFile, - uint32_t flags DEFAULT(0) ); - -/** Create a new mp4 file. - * - * MP4Create is the first call that should be used when you want to create - * a new, empty mp4 file. It is equivalent to opening a file for writing, - * but also involved with creation of necessary mp4 framework structures. - * ie. invoking MP4Create() followed by MP4Close() will result in a file - * with a non-zero size. - * - * @param fileName pathname of the file to be created. - * On Windows, this should be a UTF-8 encoded string. - * On other platforms, it should be an 8-bit encoding that is - * appropriate for the platform, locale, file system, etc. - * (prefer to use UTF-8 when possible). - * @param flags bitmask that allows the user to set 64-bit values for - * data or time atoms. Valid bits may be any combination of: - * @li #MP4_CREATE_64BIT_DATA - * @li #MP4_CREATE_64BIT_TIME - * - * @return On success a handle of the newly created file for use in - * subsequent calls to the library. - * On error, #MP4_INVALID_FILE_HANDLE. - */ -MP4V2_EXPORT -MP4FileHandle MP4Create( - const char* fileName, - uint32_t flags DEFAULT(0) ); - -/** Create a new mp4 file with extended options. - * - * MP4CreateEx is an extended version of MP4Create(). - * - * @param fileName pathname of the file to be created. - * On Windows, this should be a UTF-8 encoded string. - * On other platforms, it should be an 8-bit encoding that is - * appropriate for the platform, locale, file system, etc. - * (prefer to use UTF-8 when possible). - * @param flags bitmask that allows the user to set 64-bit values for - * data or time atoms. Valid bits may be any combination of: - * @li #MP4_CREATE_64BIT_DATA - * @li #MP4_CREATE_64BIT_TIME - * @param add_ftyp if true an ftyp atom is automatically created. - * @param add_iods if true an iods atom is automatically created. - * @param majorBrand ftyp brand identifier. - * @param minorVersion ftyp informative integer for the minor version - * of the major brand. - * @param compatibleBrands ftyp list of compatible brands. - * @param compatibleBrandsCount is the count of items specified in - * compatibleBrands. - * - * @return On success a handle of the newly created file for use in - * subsequent calls to the library. - * On error, #MP4_INVALID_FILE_HANDLE. - */ -MP4V2_EXPORT -MP4FileHandle MP4CreateEx( - const char* fileName, - uint32_t flags DEFAULT(0), - int add_ftyp DEFAULT(1), - int add_iods DEFAULT(1), - char* majorBrand DEFAULT(0), - uint32_t minorVersion DEFAULT(0), - char** compatibleBrands DEFAULT(0), - uint32_t compatibleBrandsCount DEFAULT(0) ); - -/** Dump mp4 file contents as ASCII either to stdout or the - * log callback (@p see MP4SetLogCallback) - * - * Dump is an invaluable debugging tool in that in can reveal all the details - * of the mp4 control structures. However, the output will not make much sense - * until you familiarize yourself with the mp4 specification (or the Quicktime - * File Format specification). - * - - * Note that MP4Dump() will not print the individual values of control tables, - * such as the size of each sample, unless the current log level is at least - * #MP4_LOG_VERBOSE2. @p see MP4LogSetLevel() for how to set this. - * - * @param hFile handle of file to dump. - * @param dumpImplicits prints properties which would not actually be - * written to the mp4 file, but still exist in mp4 control structures. - * ie. they are implicit given the current values of other controlling - * properties. - * - * @return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4Dump( - MP4FileHandle hFile, - bool dumpImplicits DEFAULT(0) ); - -/** Return a textual summary of an mp4 file. - * - * MP4FileInfo provides a string that contains a textual summary of the - * contents of an mp4 file. This includes the track id's, the track type, - * and track specific information. For example, for a video track, media - * encoding, image size, frame rate, and bitrate are summarized. - * - * Note that the returned string is malloc'ed, so it is the caller's - * responsibility to free() the string. Also note that the returned string - * contains newlines and tabs which may or may not be desirable. - * - * The following is an example of the output of MP4Info(): -@verbatim -Track Type Info -1 video MPEG-4 Simple @ L3, 119.625 secs, 1008 kbps, 352x288 @ 24.00 fps -2 audio MPEG-4, 119.327 secs, 128 kbps, 44100 Hz -3 hint Payload MP4V-ES for track 1 -4 hint Payload mpeg4-generic for track 2 -5 od Object Descriptors -6 scene BIFS -@endverbatim - * - * @param fileName pathname to mp4 file to summarize. - * On Windows, this should be a UTF-8 encoded string. - * On other platforms, it should be an 8-bit encoding that is - * appropriate for the platform, locale, file system, etc. - * (prefer to use UTF-8 when possible). - * @param trackId specifies track to summarize. If the value is - * #MP4_INVALID_TRACK_ID, the summary info is created for all - * tracks in the file. - * - * @return On success a malloc'd string containing summary information. - * On failure, NULL. - * - * @see MP4Info(). - */ -MP4V2_EXPORT -char* MP4FileInfo( - const char* fileName, - MP4TrackId trackId DEFAULT(MP4_INVALID_TRACK_ID) ); - -/** Accessor for the filename associated with a file handle - * - * @param hFile a file handle - * - * @return the NUL-terminated, UTF-8 encoded filename - * associated with @p hFile - */ -MP4V2_EXPORT -const char* MP4GetFilename( - MP4FileHandle hFile ); - -/** Return a textual summary of an mp4 file. - * - * MP4FileInfo provides a string that contains a textual summary of the - * contents of an mp4 file. This includes the track id's, the track type, - * and track specific information. For example, for a video track, media - * encoding, image size, frame rate, and bitrate are summarized. - * - * Note that the returned string is malloc'ed, so it is the caller's - * responsibility to free() the string. Also note that the returned string - * contains newlines and tabs which may or may not be desirable. - * - * The following is an example of the output of MP4Info(): -@verbatim -Track Type Info -1 video MPEG-4 Simple @ L3, 119.625 secs, 1008 kbps, 352x288 @ 24.00 fps -2 audio MPEG-4, 119.327 secs, 128 kbps, 44100 Hz -3 hint Payload MP4V-ES for track 1 -4 hint Payload mpeg4-generic for track 2 -5 od Object Descriptors -6 scene BIFS -@endverbatim - * - * @param hFile handle of file to summarize. - * @param trackId specifies track to summarize. If the value is - * #MP4_INVALID_TRACK_ID, the summary info is created for all - * tracks in the file. - * - * @return On success a malloc'd string containing summary information. - * On failure, NULL. - * - * @see MP4FileInfo(). - */ -MP4V2_EXPORT -char* MP4Info( - MP4FileHandle hFile, - MP4TrackId trackId DEFAULT(MP4_INVALID_TRACK_ID) ); - -/** Modify an existing mp4 file. - * - * MP4Modify is the first call that should be used when you want to modify - * an existing mp4 file. It is roughly equivalent to opening a file in - * read/write mode. - * - * Since modifications to an existing mp4 file can result in a sub-optimal - * file layout, you may want to use MP4Optimize() after you have modified - * and closed the mp4 file. - * - * @param fileName pathname of the file to be modified. - * On Windows, this should be a UTF-8 encoded string. - * On other platforms, it should be an 8-bit encoding that is - * appropriate for the platform, locale, file system, etc. - * (prefer to use UTF-8 when possible). - * @param flags currently ignored. - * - * @return On success a handle of the target file for use in subsequent calls - * to the library. - * On error, #MP4_INVALID_FILE_HANDLE. - */ -MP4V2_EXPORT -MP4FileHandle MP4Modify( - const char* fileName, - uint32_t flags DEFAULT(0) ); - -/** Optimize the layout of an mp4 file. - * - * MP4Optimize reads an existing mp4 file and writes a new version of the - * file with the two important changes: - * - * First, the mp4 control information is moved to the beginning of the file. - * (Frequenty it is at the end of the file due to it being constantly - * modified as track samples are added to an mp4 file). This optimization - * is useful in that in allows the mp4 file to be HTTP streamed. - * - * Second, the track samples are interleaved so that the samples for a - * particular instant in time are colocated within the file. This - * eliminates disk seeks during playback of the file which results in - * better performance. - * - * There are also two important side effects of MP4Optimize(): - * - * First, any free blocks within the mp4 file are eliminated. - * - * Second, as a side effect of the sample interleaving process any media - * data chunks that are not actually referenced by the mp4 control - * structures are deleted. This is useful if you have called MP4DeleteTrack() - * which only deletes the control information for a track, and not the - * actual media data. - * - * @param fileName pathname of (existing) file to be optimized. - * On Windows, this should be a UTF-8 encoded string. - * On other platforms, it should be an 8-bit encoding that is - * appropriate for the platform, locale, file system, etc. - * (prefer to use UTF-8 when possible). - * @param newFileName pathname of the new optimized file. - * On Windows, this should be a UTF-8 encoded string. - * On other platforms, it should be an 8-bit encoding that is - * appropriate for the platform, locale, file system, etc. - * (prefer to use UTF-8 when possible). - * If NULL a temporary file in the same directory as the - * fileName will be used and fileName - * will be over-written upon successful completion. - * - * @return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4Optimize( - const char* fileName, - const char* newFileName DEFAULT(NULL) ); - - -/** Read an existing mp4 file. - * - * MP4Read is the first call that should be used when you want to just - * read an existing mp4 file. It is equivalent to opening a file for - * reading, but in addition the mp4 file is parsed and the control - * information is loaded into memory. Note that actual track samples are not - * read into memory until MP4ReadSample() is called. - * - * @param fileName pathname of the file to be read. - * On Windows, this should be a UTF-8 encoded string. - * On other platforms, it should be an 8-bit encoding that is - * appropriate for the platform, locale, file system, etc. - * (prefer to use UTF-8 when possible). -( - * @return On success a handle of the file for use in subsequent calls to - * the library. - * On error, #MP4_INVALID_FILE_HANDLE. - */ -MP4V2_EXPORT -MP4FileHandle MP4Read( - const char* fileName ); - -/** Read an existing mp4 file. - * - * MP4ReadProvider is the first call that should be used when you want to just - * read an existing mp4 file. It is equivalent to opening a file for - * reading, but in addition the mp4 file is parsed and the control - * information is loaded into memory. Note that actual track samples are not - * read into memory until MP4ReadSample() is called. - * - * @param fileName pathname of the file to be read. - * On Windows, this should be a UTF-8 encoded string. - * On other platforms, it should be an 8-bit encoding that is - * appropriate for the platform, locale, file system, etc. - * (prefer to use UTF-8 when possible). - * @param fileProvider custom implementation of file I/O operations. - * All functions in structure must be implemented. - * The structure is immediately copied internally. - * - * @return On success a handle of the file for use in subsequent calls to - * the library. - * On error, #MP4_INVALID_FILE_HANDLE. - */ -MP4V2_EXPORT -MP4FileHandle MP4ReadProvider( - const char* fileName, - const MP4FileProvider* fileProvider DEFAULT(NULL) ); - -/** @} ***********************************************************************/ - -#endif /* MP4V2_FILE_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/file_prop.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/file_prop.h deleted file mode 100644 index 15435e83..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/file_prop.h +++ /dev/null @@ -1,148 +0,0 @@ -#ifndef MP4V2_FILE_PROP_H -#define MP4V2_FILE_PROP_H - -/**************************************************************************//** - * - * @defgroup mp4_file_prop MP4v2 File Property - * @{ - * - *****************************************************************************/ - -/* generic props */ - -MP4V2_EXPORT -bool MP4HaveAtom( - MP4FileHandle hFile, - const char* atomName ); - -MP4V2_EXPORT -bool MP4GetIntegerProperty( - MP4FileHandle hFile, - const char* propName, - uint64_t* retval ); - -MP4V2_EXPORT -bool MP4GetFloatProperty( - MP4FileHandle hFile, - const char* propName, - float* retvalue ); - -MP4V2_EXPORT -bool MP4GetStringProperty( - MP4FileHandle hFile, - const char* propName, - const char** retvalue ); - -MP4V2_EXPORT -bool MP4GetBytesProperty( - MP4FileHandle hFile, - const char* propName, - uint8_t** ppValue, - uint32_t* pValueSize ); - -MP4V2_EXPORT -bool MP4SetIntegerProperty( - MP4FileHandle hFile, - const char* propName, - int64_t value ); - -MP4V2_EXPORT -bool MP4SetFloatProperty( - MP4FileHandle hFile, - const char* propName, - float value ); - -MP4V2_EXPORT -bool MP4SetStringProperty( - MP4FileHandle hFile, - const char* propName, - const char* value ); - -MP4V2_EXPORT -bool MP4SetBytesProperty( - MP4FileHandle hFile, - const char* propName, - const uint8_t* pValue, - uint32_t valueSize ); - -/* specific props */ - -MP4V2_EXPORT -MP4Duration MP4GetDuration( MP4FileHandle hFile ); - -/** Get the time scale of the movie (file). - * - * MP4GetTimeScale returns the time scale in units of ticks per second for - * the mp4 file. Caveat: tracks may use the same time scale as the movie - * or may use their own time scale. - * - * @param hFile handle of file for operation. - * - * @return timescale (ticks per second) of the mp4 file. - */ -MP4V2_EXPORT -uint32_t MP4GetTimeScale( MP4FileHandle hFile ); - -/** Set the time scale of the movie (file). - * - * MP4SetTimeScale sets the time scale of the mp4 file. The time scale is - * in the number of clock ticks per second. Caveat: tracks may use the - * same time scale as the movie or may use their own time scale. - * - * @param hFile handle of file for operation. - * @param value desired timescale for the movie. - * - * @return On success, true. On failure, false. - */ -MP4V2_EXPORT -bool MP4SetTimeScale( MP4FileHandle hFile, uint32_t value ); - -/** Change the general timescale of file hFile. - * - * This function changes the general timescale of the file hFile - * to the new timescale value by recalculating all values that depend - * on the timescale in "moov.mvhd". - * - * If the timescale is already equal to value nothing is done. - * - * @param hFile handle of file to change. - * @param value the new timescale. - */ -MP4V2_EXPORT -void MP4ChangeMovieTimeScale( MP4FileHandle hFile, uint32_t value ); - -MP4V2_EXPORT -uint8_t MP4GetODProfileLevel( MP4FileHandle hFile ); - -MP4V2_EXPORT -bool MP4SetODProfileLevel( MP4FileHandle hFile, uint8_t value ); - -MP4V2_EXPORT -uint8_t MP4GetSceneProfileLevel( MP4FileHandle hFile ); - -MP4V2_EXPORT -bool MP4SetSceneProfileLevel( MP4FileHandle hFile, uint8_t value ); - -MP4V2_EXPORT -uint8_t MP4GetVideoProfileLevel( - MP4FileHandle hFile, - MP4TrackId trackId DEFAULT(MP4_INVALID_TRACK_ID) ); - -MP4V2_EXPORT -void MP4SetVideoProfileLevel( MP4FileHandle hFile, uint8_t value ); - -MP4V2_EXPORT -uint8_t MP4GetAudioProfileLevel( MP4FileHandle hFile ); - -MP4V2_EXPORT -void MP4SetAudioProfileLevel( MP4FileHandle hFile, uint8_t value ); - -MP4V2_EXPORT -uint8_t MP4GetGraphicsProfileLevel( MP4FileHandle hFile ); - -MP4V2_EXPORT -bool MP4SetGraphicsProfileLevel( MP4FileHandle hFile, uint8_t value ); - -/** @} ***********************************************************************/ - -#endif /* MP4V2_FILE_PROP_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/general.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/general.h deleted file mode 100644 index f9713bf7..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/general.h +++ /dev/null @@ -1,495 +0,0 @@ -#ifndef MP4V2_GENERAL_H -#define MP4V2_GENERAL_H - -/**************************************************************************//** - * - * @defgroup mp4_general MP4v2 General - * @{ - * - *****************************************************************************/ - -/* MP4 API types */ -typedef void* MP4FileHandle; -typedef uint32_t MP4TrackId; -typedef uint32_t MP4SampleId; -typedef uint64_t MP4Timestamp; -typedef uint64_t MP4Duration; -typedef uint32_t MP4EditId; - -typedef enum { - MP4_LOG_NONE = 0, - MP4_LOG_ERROR = 1, - MP4_LOG_WARNING = 2, - MP4_LOG_INFO = 3, - MP4_LOG_VERBOSE1 = 4, - MP4_LOG_VERBOSE2 = 5, - MP4_LOG_VERBOSE3 = 6, - MP4_LOG_VERBOSE4 = 7 -} MP4LogLevel; - -/*****************************************************************************/ - -typedef void (*MP4LogCallback)( - MP4LogLevel loglevel, - const char* fmt, - va_list ap ); - -/*****************************************************************************/ - -/** Encryption function pointer. - * - * @see MP4EncAndCopySample(). - * @see MP4EncAndCopyTrack(). - */ -typedef uint32_t (*encryptFunc_t)( uint32_t, uint32_t, uint8_t*, uint32_t*, uint8_t** ); - -/*****************************************************************************/ - -#define MP4_INVALID_FILE_HANDLE ((MP4FileHandle)NULL) /**< Constant: invalid MP4FileHandle. */ -#define MP4_INVALID_TRACK_ID ((MP4TrackId)0) /**< Constant: invalid MP4TrackId. */ -#define MP4_INVALID_SAMPLE_ID ((MP4SampleId)0) /**< Constant: invalid MP4SampleId. */ -#define MP4_INVALID_TIMESTAMP ((MP4Timestamp)-1) /**< Constant: invalid MP4Timestamp. */ -#define MP4_INVALID_DURATION ((MP4Duration)-1) /**< Constant: invalid MP4Duration. */ -#define MP4_INVALID_EDIT_ID ((MP4EditId)0) /**< Constant: invalid MP4EditId. */ - -/* Macros to test for API type validity */ -#define MP4_IS_VALID_FILE_HANDLE(x) ((x) != MP4_INVALID_FILE_HANDLE) -#define MP4_IS_VALID_TRACK_ID(x) ((x) != MP4_INVALID_TRACK_ID) -#define MP4_IS_VALID_SAMPLE_ID(x) ((x) != MP4_INVALID_SAMPLE_ID) -#define MP4_IS_VALID_TIMESTAMP(x) ((x) != MP4_INVALID_TIMESTAMP) -#define MP4_IS_VALID_DURATION(x) ((x) != MP4_INVALID_DURATION) -#define MP4_IS_VALID_EDIT_ID(x) ((x) != MP4_INVALID_EDIT_ID) - -/* - * MP4 Known track type names - e.g. MP4GetNumberOfTracks(type) - * - * Note this first group of track types should be created - * via the MP4AddTrack() functions, and not MP4AddTrack(type) - */ -#define MP4_OD_TRACK_TYPE "odsm" /**< Constant: OD track. */ -#define MP4_SCENE_TRACK_TYPE "sdsm" /**< Constant: scene track. */ -#define MP4_AUDIO_TRACK_TYPE "soun" /**< Constant: audio track. */ -#define MP4_VIDEO_TRACK_TYPE "vide" /**< Constant: video track. */ -#define MP4_HINT_TRACK_TYPE "hint" /**< Constant: hint track. */ -#define MP4_CNTL_TRACK_TYPE "cntl" /**< Constant: control track. */ -#define MP4_TEXT_TRACK_TYPE "text" /**< Constant: text track. */ -#define MP4_SUBTITLE_TRACK_TYPE "sbtl" /**< Constant: subtitle track. */ -#define MP4_SUBPIC_TRACK_TYPE "subp" /**< Constant: subpic track. */ -/* - * This second set of track types should be created - * via MP4AddSystemsTrack(type) - */ -#define MP4_CLOCK_TRACK_TYPE "crsm" /**< Constant: clock track. */ -#define MP4_MPEG7_TRACK_TYPE "m7sm" /**< Constant: mpeg7 track. */ -#define MP4_OCI_TRACK_TYPE "ocsm" /**< Constant: OCI track. */ -#define MP4_IPMP_TRACK_TYPE "ipsm" /**< Constant: IPMP track. */ -#define MP4_MPEGJ_TRACK_TYPE "mjsm" /**< Constant: MPEGJ track. */ - -#define MP4_IS_VIDEO_TRACK_TYPE(type) \ - (!strcasecmp(type, MP4_VIDEO_TRACK_TYPE)) - -#define MP4_IS_AUDIO_TRACK_TYPE(type) \ - (!strcasecmp(type, MP4_AUDIO_TRACK_TYPE)) - -#define MP4_IS_CNTL_TRACK_TYPE(type) \ - (!strcasecmp(type, MP4_CNTL_TRACK_TYPE)) - -#define MP4_IS_OD_TRACK_TYPE(type) \ - (!strcasecmp(type, MP4_OD_TRACK_TYPE)) - -#define MP4_IS_SCENE_TRACK_TYPE(type) \ - (!strcasecmp(type, MP4_SCENE_TRACK_TYPE)) - -#define MP4_IS_HINT_TRACK_TYPE(type) \ - (!strcasecmp(type, MP4_HINT_TRACK_TYPE)) - -#define MP4_IS_SYSTEMS_TRACK_TYPE(type) \ - (!strcasecmp(type, MP4_CLOCK_TRACK_TYPE) \ - || !strcasecmp(type, MP4_MPEG7_TRACK_TYPE) \ - || !strcasecmp(type, MP4_OCI_TRACK_TYPE) \ - || !strcasecmp(type, MP4_IPMP_TRACK_TYPE) \ - || !strcasecmp(type, MP4_MPEGJ_TRACK_TYPE)) - -/* MP4 Audio track types - see MP4AddAudioTrack()*/ -#define MP4_INVALID_AUDIO_TYPE 0x00 -#define MP4_MPEG1_AUDIO_TYPE 0x6B -#define MP4_MPEG2_AUDIO_TYPE 0x69 -#define MP4_MP3_AUDIO_TYPE MP4_MPEG2_AUDIO_TYPE -#define MP4_MPEG2_AAC_MAIN_AUDIO_TYPE 0x66 -#define MP4_MPEG2_AAC_LC_AUDIO_TYPE 0x67 -#define MP4_MPEG2_AAC_SSR_AUDIO_TYPE 0x68 -#define MP4_MPEG2_AAC_AUDIO_TYPE MP4_MPEG2_AAC_MAIN_AUDIO_TYPE -#define MP4_MPEG4_AUDIO_TYPE 0x40 -#define MP4_PRIVATE_AUDIO_TYPE 0xC0 -#define MP4_PCM16_LITTLE_ENDIAN_AUDIO_TYPE 0xE0 /* a private definition */ -#define MP4_VORBIS_AUDIO_TYPE 0xE1 /* a private definition */ -#define MP4_AC3_AUDIO_TYPE 0xE2 /* a private definition */ -#define MP4_ALAW_AUDIO_TYPE 0xE3 /* a private definition */ -#define MP4_ULAW_AUDIO_TYPE 0xE4 /* a private definition */ -#define MP4_G723_AUDIO_TYPE 0xE5 /* a private definition */ -#define MP4_PCM16_BIG_ENDIAN_AUDIO_TYPE 0xE6 /* a private definition */ - -/* MP4 MPEG-4 Audio types from 14496-3 Table 1.5.1 */ -#define MP4_MPEG4_INVALID_AUDIO_TYPE 0 -#define MP4_MPEG4_AAC_MAIN_AUDIO_TYPE 1 -#define MP4_MPEG4_AAC_LC_AUDIO_TYPE 2 -#define MP4_MPEG4_AAC_SSR_AUDIO_TYPE 3 -#define MP4_MPEG4_AAC_LTP_AUDIO_TYPE 4 -#define MP4_MPEG4_AAC_HE_AUDIO_TYPE 5 -#define MP4_MPEG4_AAC_SCALABLE_AUDIO_TYPE 6 -#define MP4_MPEG4_CELP_AUDIO_TYPE 8 -#define MP4_MPEG4_HVXC_AUDIO_TYPE 9 -#define MP4_MPEG4_TTSI_AUDIO_TYPE 12 -#define MP4_MPEG4_MAIN_SYNTHETIC_AUDIO_TYPE 13 -#define MP4_MPEG4_WAVETABLE_AUDIO_TYPE 14 -#define MP4_MPEG4_MIDI_AUDIO_TYPE 15 -#define MP4_MPEG4_ALGORITHMIC_FX_AUDIO_TYPE 16 -#define MP4_MPEG4_ALS_AUDIO_TYPE 31 -#define MP4_MPEG4_LAYER1_AUDIO_TYPE 32 -#define MP4_MPEG4_LAYER2_AUDIO_TYPE 33 -#define MP4_MPEG4_LAYER3_AUDIO_TYPE 34 -#define MP4_MPEG4_SLS_AUDIO_TYPE 35 - -/* MP4 Audio type utilities following common usage */ -#define MP4_IS_MP3_AUDIO_TYPE(type) \ - ((type) == MP4_MPEG1_AUDIO_TYPE || (type) == MP4_MPEG2_AUDIO_TYPE) - -#define MP4_IS_MPEG2_AAC_AUDIO_TYPE(type) \ - (((type) >= MP4_MPEG2_AAC_MAIN_AUDIO_TYPE \ - && (type) <= MP4_MPEG2_AAC_SSR_AUDIO_TYPE)) - -#define MP4_IS_MPEG4_AAC_AUDIO_TYPE(mpeg4Type) \ - (((mpeg4Type) >= MP4_MPEG4_AAC_MAIN_AUDIO_TYPE \ - && (mpeg4Type) <= MP4_MPEG4_AAC_HE_AUDIO_TYPE) \ - || (mpeg4Type) == MP4_MPEG4_AAC_SCALABLE_AUDIO_TYPE \ - || (mpeg4Type) == 17) - -#define MP4_IS_AAC_AUDIO_TYPE(type) \ - (MP4_IS_MPEG2_AAC_AUDIO_TYPE(type) \ - || (type) == MP4_MPEG4_AUDIO_TYPE) - -/* MP4 Video track types - see MP4AddVideoTrack() */ -#define MP4_INVALID_VIDEO_TYPE 0x00 -#define MP4_MPEG1_VIDEO_TYPE 0x6A -#define MP4_MPEG2_SIMPLE_VIDEO_TYPE 0x60 -#define MP4_MPEG2_MAIN_VIDEO_TYPE 0x61 -#define MP4_MPEG2_SNR_VIDEO_TYPE 0x62 -#define MP4_MPEG2_SPATIAL_VIDEO_TYPE 0x63 -#define MP4_MPEG2_HIGH_VIDEO_TYPE 0x64 -#define MP4_MPEG2_442_VIDEO_TYPE 0x65 -#define MP4_MPEG2_VIDEO_TYPE MP4_MPEG2_MAIN_VIDEO_TYPE -#define MP4_MPEG4_VIDEO_TYPE 0x20 -#define MP4_JPEG_VIDEO_TYPE 0x6C -#define MP4_PRIVATE_VIDEO_TYPE 0xD0 -#define MP4_YUV12_VIDEO_TYPE 0xF0 /* a private definition */ -#define MP4_H263_VIDEO_TYPE 0xF2 /* a private definition */ -#define MP4_H261_VIDEO_TYPE 0xF3 /* a private definition */ - -/* MP4 Video type utilities */ -#define MP4_IS_MPEG1_VIDEO_TYPE(type) \ - ((type) == MP4_MPEG1_VIDEO_TYPE) - -#define MP4_IS_MPEG2_VIDEO_TYPE(type) \ - (((type) >= MP4_MPEG2_SIMPLE_VIDEO_TYPE \ - && (type) <= MP4_MPEG2_442_VIDEO_TYPE) \ - || MP4_IS_MPEG1_VIDEO_TYPE(type)) - -#define MP4_IS_MPEG4_VIDEO_TYPE(type) \ - ((type) == MP4_MPEG4_VIDEO_TYPE) - -/* Mpeg4 Visual Profile Defines - ISO/IEC 14496-2:2001/Amd.2:2002(E) */ -#define MPEG4_SP_L1 (0x1) -#define MPEG4_SP_L2 (0x2) -#define MPEG4_SP_L3 (0x3) -#define MPEG4_SP_L0 (0x8) -#define MPEG4_SSP_L1 (0x11) -#define MPEG4_SSP_L2 (0x12) -#define MPEG4_CP_L1 (0x21) -#define MPEG4_CP_L2 (0x22) -#define MPEG4_MP_L2 (0x32) -#define MPEG4_MP_L3 (0x33) -#define MPEG4_MP_L4 (0x34) -#define MPEG4_NBP_L2 (0x42) -#define MPEG4_STP_L1 (0x51) -#define MPEG4_SFAP_L1 (0x61) -#define MPEG4_SFAP_L2 (0x62) -#define MPEG4_SFBAP_L1 (0x63) -#define MPEG4_SFBAP_L2 (0x64) -#define MPEG4_BATP_L1 (0x71) -#define MPEG4_BATP_L2 (0x72) -#define MPEG4_HP_L1 (0x81) -#define MPEG4_HP_L2 (0x82) -#define MPEG4_ARTSP_L1 (0x91) -#define MPEG4_ARTSP_L2 (0x92) -#define MPEG4_ARTSP_L3 (0x93) -#define MPEG4_ARTSP_L4 (0x94) -#define MPEG4_CSP_L1 (0xa1) -#define MPEG4_CSP_L2 (0xa2) -#define MPEG4_CSP_L3 (0xa3) -#define MPEG4_ACEP_L1 (0xb1) -#define MPEG4_ACEP_L2 (0xb2) -#define MPEG4_ACEP_L3 (0xb3) -#define MPEG4_ACEP_L4 (0xb4) -#define MPEG4_ACP_L1 (0xc1) -#define MPEG4_ACP_L2 (0xc2) -#define MPEG4_AST_L1 (0xd1) -#define MPEG4_AST_L2 (0xd2) -#define MPEG4_AST_L3 (0xd3) -#define MPEG4_S_STUDIO_P_L1 (0xe1) -#define MPEG4_S_STUDIO_P_L2 (0xe2) -#define MPEG4_S_STUDIO_P_L3 (0xe3) -#define MPEG4_S_STUDIO_P_L4 (0xe4) -#define MPEG4_C_STUDIO_P_L1 (0xe5) -#define MPEG4_C_STUDIO_P_L2 (0xe6) -#define MPEG4_C_STUDIO_P_L3 (0xe7) -#define MPEG4_C_STUDIO_P_L4 (0xe8) -#define MPEG4_ASP_L0 (0xF0) -#define MPEG4_ASP_L1 (0xF1) -#define MPEG4_ASP_L2 (0xF2) -#define MPEG4_ASP_L3 (0xF3) -#define MPEG4_ASP_L4 (0xF4) -#define MPEG4_ASP_L5 (0xF5) -#define MPEG4_ASP_L3B (0xF7) -#define MPEG4_FGSP_L0 (0xf8) -#define MPEG4_FGSP_L1 (0xf9) -#define MPEG4_FGSP_L2 (0xfa) -#define MPEG4_FGSP_L3 (0xfb) -#define MPEG4_FGSP_L4 (0xfc) -#define MPEG4_FGSP_L5 (0xfd) - -/*****************************************************************************/ - -/* 3GP specific utilities */ - -MP4V2_EXPORT -bool MP4Make3GPCompliant( - const char* fileName, - char* majorBrand DEFAULT(0), - uint32_t minorVersion DEFAULT(0), - char** supportedBrands DEFAULT(NULL), - uint32_t supportedBrandsCount DEFAULT(0), - bool deleteIodsAtom DEFAULT(true) ); - -/* NOTE this section of functionality has not yet been fully tested */ - -MP4V2_EXPORT -MP4EditId MP4AddTrackEdit( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId DEFAULT(MP4_INVALID_EDIT_ID), - MP4Timestamp startTime DEFAULT(0), - MP4Duration duration DEFAULT(0), - bool dwell DEFAULT(false) ); - -MP4V2_EXPORT -bool MP4DeleteTrackEdit( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId ); - -MP4V2_EXPORT -uint32_t MP4GetTrackNumberOfEdits( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -MP4Timestamp MP4GetTrackEditStart( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId ); - -MP4V2_EXPORT -MP4Duration MP4GetTrackEditTotalDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId DEFAULT(MP4_INVALID_EDIT_ID) ); - -MP4V2_EXPORT -MP4Timestamp MP4GetTrackEditMediaStart( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId ); - -MP4V2_EXPORT -bool MP4SetTrackEditMediaStart( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId, - MP4Timestamp startTime ); - -MP4V2_EXPORT -MP4Duration MP4GetTrackEditDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId ); - -MP4V2_EXPORT -bool MP4SetTrackEditDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId, - MP4Duration duration ); - -MP4V2_EXPORT -int8_t MP4GetTrackEditDwell( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId ); - -MP4V2_EXPORT -bool MP4SetTrackEditDwell( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId, - bool dwell ); - -MP4V2_EXPORT -bool MP4ReadSampleFromEditTime( - /* input parameters */ - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Timestamp when, - /* input/output parameters */ - uint8_t** ppBytes, - uint32_t* pNumBytes, - /* output parameters */ - MP4Timestamp* pStartTime DEFAULT(NULL), - MP4Duration* pDuration DEFAULT(NULL), - MP4Duration* pRenderingOffset DEFAULT(NULL), - bool* pIsSyncSample DEFAULT(NULL) ); - -MP4V2_EXPORT -MP4SampleId MP4GetSampleIdFromEditTime( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Timestamp when, - MP4Timestamp* pStartTime DEFAULT(NULL), - MP4Duration* pDuration DEFAULT(NULL) ); - -/* time conversion utilties */ - -/* predefined values for timeScale parameter below */ -#define MP4_SECONDS_TIME_SCALE 1 -#define MP4_MILLISECONDS_TIME_SCALE 1000 -#define MP4_MICROSECONDS_TIME_SCALE 1000000 -#define MP4_NANOSECONDS_TIME_SCALE 1000000000 - -#define MP4_SECS_TIME_SCALE MP4_SECONDS_TIME_SCALE -#define MP4_MSECS_TIME_SCALE MP4_MILLISECONDS_TIME_SCALE -#define MP4_USECS_TIME_SCALE MP4_MICROSECONDS_TIME_SCALE -#define MP4_NSECS_TIME_SCALE MP4_NANOSECONDS_TIME_SCALE - -MP4V2_EXPORT -uint64_t MP4ConvertFromMovieDuration( - MP4FileHandle hFile, - MP4Duration duration, - uint32_t timeScale ); - -MP4V2_EXPORT -uint64_t MP4ConvertFromTrackTimestamp( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Timestamp timeStamp, - uint32_t timeScale ); - -MP4V2_EXPORT -MP4Timestamp MP4ConvertToTrackTimestamp( - MP4FileHandle hFile, - MP4TrackId trackId, - uint64_t timeStamp, - uint32_t timeScale ); - -/** Convert duration from track time scale to an arbitrary time scale. - * - * MP4ConvertFromTrackDuration converts a duration such as a sample duration - * from the track time scale to another time scale. This can be used by a - * player application to map all track samples to a common time scale. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param duration value to be converted. - * @param timeScale time scale in ticks per second. - * - * @return On success, the duration in arbitrary time scale units. - * On error, 0. - * - * @see MP4GetSampleDuration(). - * @see MP4ConvertToTrackDuration(). - */ -MP4V2_EXPORT -uint64_t MP4ConvertFromTrackDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Duration duration, - uint32_t timeScale ); - -/** Convert duration from arbitrary time scale to track time scale. - * - * MP4ConvertToTrackDuration converts a duration such as a sample duration - * from the specified time scale to the track time scale. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param duration value to be converted. - * @param timeScale time scale in ticks per second. - * - * @return On success, the duration in track time scale units. - * On error, #MP4_INVALID_DURATION. - * - * @see MP4ConvertFromTrackDuration(). - */ -MP4V2_EXPORT -MP4Duration MP4ConvertToTrackDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - uint64_t duration, - uint32_t timeScale ); - -MP4V2_EXPORT -char* MP4BinaryToBase16( - const uint8_t* pData, - uint32_t dataSize ); - -MP4V2_EXPORT -char* MP4BinaryToBase64( - const uint8_t* pData, - uint32_t dataSize ); - -MP4V2_EXPORT -uint8_t* Base64ToBinary( - const char* pData, - uint32_t decodeSize, - uint32_t* pDataSize ); - -MP4V2_EXPORT -void MP4Free( - void* p ); - -/** Set the function to call in place of default logging behavior - * - * @param cb_func the function to call - */ -MP4V2_EXPORT -void MP4SetLogCallback( - MP4LogCallback cb_func ); -/** @} ***********************************************************************/ - -/** - * Accessor for the maximum level for diagnostic information - * - * @return the maximum level for diagnostic information - * - * @see MP4LogSetLevel() for further details. - */ -MP4V2_EXPORT -MP4LogLevel MP4LogGetLevel( void ); - -/** - * Set the maximum level for diagnostic information - * - * @param verbosity the level to set - */ -MP4V2_EXPORT -void MP4LogSetLevel( MP4LogLevel verbosity ); - -#endif /* MP4V2_GENERAL_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/isma.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/isma.h deleted file mode 100644 index 074a06e8..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/isma.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef MP4V2_ISMA_H -#define MP4V2_ISMA_H - -/**************************************************************************//** - * - * @defgroup mp4_isma MP4v2 ISMA (Internet Streaming Media Alliance) - * @{ - * - *****************************************************************************/ - -/** something */ -typedef struct mp4v2_ismacryp_session_params { - uint32_t scheme_type; - uint16_t scheme_version; - uint8_t key_ind_len; - uint8_t iv_len; - uint8_t selective_enc; - const char* kms_uri; -} mp4v2_ismacrypParams; - -/* - * API to initialize ismacryp properties to sensible defaults - * if input param is null then mallocs a params struct - */ - -MP4V2_EXPORT -mp4v2_ismacrypParams* MP4DefaultISMACrypParams( mp4v2_ismacrypParams* ptr ); - -MP4V2_EXPORT -MP4TrackId MP4AddEncAudioTrack( - MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - mp4v2_ismacrypParams* icPp, - uint8_t audioType DEFAULT(MP4_MPEG4_AUDIO_TYPE) ); - -MP4V2_EXPORT -MP4TrackId MP4AddEncVideoTrack( - MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - mp4v2_ismacrypParams* icPp, - uint8_t videoType DEFAULT(MP4_MPEG4_VIDEO_TYPE), - const char* oFormat DEFAULT(NULL) ); - -MP4V2_EXPORT -MP4TrackId MP4AddEncH264VideoTrack( - MP4FileHandle dstFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - mp4v2_ismacrypParams* icPp ); - -MP4V2_EXPORT -MP4TrackId MP4EncAndCloneTrack( - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - mp4v2_ismacrypParams* icPp, - MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE), - MP4TrackId dstHintTrackReferenceTrack DEFAULT(MP4_INVALID_TRACK_ID) ); - -MP4V2_EXPORT -MP4TrackId MP4EncAndCopyTrack( - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - mp4v2_ismacrypParams* icPp, - encryptFunc_t encfcnp, - uint32_t encfcnparam1, - MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE), - bool applyEdits DEFAULT(false), - MP4TrackId dstHintTrackReferenceTrack DEFAULT(MP4_INVALID_TRACK_ID) ); - -MP4V2_EXPORT -bool MP4MakeIsmaCompliant( - const char* fileName, - bool addIsmaComplianceSdp DEFAULT(true) ); - -MP4V2_EXPORT -char* MP4MakeIsmaSdpIod( - uint8_t videoProfile, - uint32_t videoBitrate, - uint8_t* videoConfig, - uint32_t videoConfigLength, - uint8_t audioProfile, - uint32_t audioBitrate, - uint8_t* audioConfig, - uint32_t audioConfigLength ); - -/** @} ***********************************************************************/ - -#endif /* MP4V2_ISMA_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/itmf_generic.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/itmf_generic.h deleted file mode 100644 index b780b1ec..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/itmf_generic.h +++ /dev/null @@ -1,207 +0,0 @@ -#ifndef MP4V2_ITMF_GENERIC_H -#define MP4V2_ITMF_GENERIC_H - -/**************************************************************************//** - * - * @defgroup mp4_itmf_generic MP4v2 iTMF (iTunes Metadata Format) Generic - * @{ - * - * This is a low-level API used to manage iTMF metadata. - * - * It provides support for virtually any kind of iTMF metadata item, - * including meaning atoms, sometimes referred to as reverse-DNS meanings. - * Structures are directly modified; ie: there are no fuctions which - * modify values for you. There is little type-safety, logic checks, or - * specifications compliance checks. For these reasons it is recommended - * to use iTMF Tags API when possible. - * - * At the heart of this API is an #MP4ItmfItem which corresponds to an - * iTMF metadata item atom. The item, and any recursive data structures - * contained within require manual memory management. The general - * rule to follow is that you must always check/free a ptr if you intend - * to resize data. In cases where you know the existing data size is - * exactly what is needed, you may overwrite the buffer contents. - * - * Each item always has at least 1 data elements which corresponds to - * a data atom. Additionally, each item has optional mean and - * name values which correspond to mean and name atoms. - * - * Each #MP4ItmfItem has a list of #MP4ItmfData. Similarily, care must - * be taken to manage memory with one key difference; these structures - * also have a valueSize field. If value is NULL then set valueSize=0. - * Otherwise, set valueSize to the size (in bytes) of value buffer. - * - * In rare cases where the number of data elements in a single item - * is > 1, the user must manually free/alloc/copy the elements - * buffer and update size accordingly. - * - * The mp4 file structure is modified only when MP4AddItem(), - * MP4SetItem() and MP4RemoveItem() are used. Simply free'ing - * the item list does not modify the mp4 file. - * - * iTMF Generic read workflow: - * - * @li MP4ItmfGetItems() - * @li inspect each item... - * @li MP4ItmfItemListFree() - * - * iTMF Generic read/modify/remove workflow: - * - * @li MP4ItmfGetItems() - * @li inspect/modify item... - * @li MP4ItmfSetItem() each modified item... - * @li MP4ItmfRemoveItem()... - * @li MP4ItmfItemListFree() - * - * iTMF Generic add workflow: - * - * @li MP4ItmfItemAlloc() - * @li MP4ItmfAddItem() - * @li MP4ItmfItemFree() - * - * @par Warning: - * Care must be taken when using multiple mechanisms to modify an open mp4 - * file as it is not thread-safe, nor does it permit overlapping different - * API workflows which have a begin/end to their workflow. That is to say - * do not interleave an iTMF Generic workflow with an iTMF Tags workflow. - * - *****************************************************************************/ - -/** Basic types of value data as enumerated in spec. */ -typedef enum MP4ItmfBasicType_e -{ - MP4_ITMF_BT_IMPLICIT = 0, /**< for use with tags for which no type needs to be indicated */ - MP4_ITMF_BT_UTF8 = 1, /**< without any count or null terminator */ - MP4_ITMF_BT_UTF16 = 2, /**< also known as UTF-16BE */ - MP4_ITMF_BT_SJIS = 3, /**< deprecated unless it is needed for special Japanese characters */ - MP4_ITMF_BT_HTML = 6, /**< the HTML file header specifies which HTML version */ - MP4_ITMF_BT_XML = 7, /**< the XML header must identify the DTD or schemas */ - MP4_ITMF_BT_UUID = 8, /**< also known as GUID; stored as 16 bytes in binary (valid as an ID) */ - MP4_ITMF_BT_ISRC = 9, /**< stored as UTF-8 text (valid as an ID) */ - MP4_ITMF_BT_MI3P = 10, /**< stored as UTF-8 text (valid as an ID) */ - MP4_ITMF_BT_GIF = 12, /**< (deprecated) a GIF image */ - MP4_ITMF_BT_JPEG = 13, /**< a JPEG image */ - MP4_ITMF_BT_PNG = 14, /**< a PNG image */ - MP4_ITMF_BT_URL = 15, /**< absolute, in UTF-8 characters */ - MP4_ITMF_BT_DURATION = 16, /**< in milliseconds, 32-bit integer */ - MP4_ITMF_BT_DATETIME = 17, /**< in UTC, counting seconds since midnight, January 1, 1904; 32 or 64-bits */ - MP4_ITMF_BT_GENRES = 18, /**< a list of enumerated values */ - MP4_ITMF_BT_INTEGER = 21, /**< a signed big-endian integer with length one of { 1,2,3,4,8 } bytes */ - MP4_ITMF_BT_RIAA_PA = 24, /**< RIAA parental advisory; { -1=no, 1=yes, 0=unspecified }, 8-bit ingteger */ - MP4_ITMF_BT_UPC = 25, /**< Universal Product Code, in text UTF-8 format (valid as an ID) */ - MP4_ITMF_BT_BMP = 27, /**< Windows bitmap image */ - - MP4_ITMF_BT_UNDEFINED = 255 /**< undefined */ -} MP4ItmfBasicType; - -/** Data structure. - * Models an iTMF data atom contained in an iTMF metadata item atom. - */ -typedef struct MP4ItmfData_s -{ - uint8_t typeSetIdentifier; /**< always zero. */ - MP4ItmfBasicType typeCode; /**< iTMF basic type. */ - uint32_t locale; /**< always zero. */ - uint8_t* value; /**< may be NULL. */ - uint32_t valueSize; /**< value size in bytes. */ -} MP4ItmfData; - -/** List of data. */ -typedef struct MP4ItmfDataList_s -{ - MP4ItmfData* elements; /**< flat array. NULL when size is zero. */ - uint32_t size; /**< number of elements. */ -} MP4ItmfDataList; - -/** Item structure. - * Models an iTMF metadata item atom contained in an ilst atom. - */ -typedef struct MP4ItmfItem_s -{ - void* __handle; /**< internal use only. */ - - char* code; /**< four-char code identifing atom type. NULL-terminated. */ - char* mean; /**< may be NULL. UTF-8 meaning. NULL-terminated. */ - char* name; /**< may be NULL. UTF-8 name. NULL-terminated. */ - MP4ItmfDataList dataList; /**< list of data. can be zero length. */ -} MP4ItmfItem; - -/** List of items. */ -typedef struct MP4ItmfItemList_s -{ - MP4ItmfItem* elements; /**< flat array. NULL when size is zero. */ - uint32_t size; /**< number of elements. */ -} MP4ItmfItemList; - -/** Allocate an item on the heap. - * @param code four-char code identifying atom type. NULL-terminated. - * @param numData number of data elements to allocate. Must be >= 1. - * @return newly allocated item. - */ -MP4V2_EXPORT MP4ItmfItem* -MP4ItmfItemAlloc( const char* code, uint32_t numData ); - -/** Free an item (deep free). - * @param item to be free'd. - */ -MP4V2_EXPORT void -MP4ItmfItemFree( MP4ItmfItem* item ); - -/** Free an item list (deep free). - * @param itemList to be free'd. - */ -MP4V2_EXPORT void -MP4ItmfItemListFree( MP4ItmfItemList* itemList ); - -/** Get list of all items from file. - * @param hFile handle of file to operate on. - * @return On succes, list of items, which must be free'd. On failure, NULL. - */ -MP4V2_EXPORT MP4ItmfItemList* -MP4ItmfGetItems( MP4FileHandle hFile ); - -/** Get list of items by code from file. - * @param hFile handle of file to operate on. - * @param code four-char code identifying atom type. NULL-terminated. - * @return On succes, list of items, which must be free'd. On failure, NULL. - */ -MP4V2_EXPORT MP4ItmfItemList* -MP4ItmfGetItemsByCode( MP4FileHandle hFile, const char* code ); - -/** Get list of items by meaning from file. - * Implicitly only returns atoms of code @b{----}. - * @param hFile handle of file to operate on. - * @param meaning UTF-8 meaning. NULL-terminated. - * @param name may be NULL. UTF-8 name. NULL-terminated. - * @return On succes, list of items, which must be free'd. On failure, NULL. - */ -MP4V2_EXPORT MP4ItmfItemList* -MP4ItmfGetItemsByMeaning( MP4FileHandle hFile, const char* meaning, const char* name ); - -/** Add an item to file. - * @param hFile handle of file to operate on. - * @param item object to add. - * @return true on success, false on failure. - */ -MP4V2_EXPORT bool -MP4ItmfAddItem( MP4FileHandle hFile, const MP4ItmfItem* item ); - -/** Overwrite an existing item in file. - * @param hFile handle of file to operate on. - * @param item object to overwrite. Must have a valid index obtained from prior get. - * @return true on success, false on failure. - */ -MP4V2_EXPORT bool -MP4ItmfSetItem( MP4FileHandle hFile, const MP4ItmfItem* item ); - -/** Remove an existing item from file. - * @param hFile handle of file to operate on. - * @param item object to remove. Must have a valid index obtained from prior get. - * @return true on success, false on failure. - */ -MP4V2_EXPORT bool -MP4ItmfRemoveItem( MP4FileHandle hFile, const MP4ItmfItem* item ); - -/** @} ***********************************************************************/ - -#endif /* MP4V2_ITMF_GENERIC_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/itmf_tags.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/itmf_tags.h deleted file mode 100644 index 3115a3cd..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/itmf_tags.h +++ /dev/null @@ -1,289 +0,0 @@ -#ifndef MP4V2_ITMF_TAGS_H -#define MP4V2_ITMF_TAGS_H - -/**************************************************************************//** - * - * @defgroup mp4_itmf_tags MP4v2 iTMF (iTunes Metadata Format) Tags - * @{ - * - * This is a high-level API used to manage iTMF metadata. - * - * It provides more type-safety and simplified memory management as compared - * to iTMF Generic API. - * - * At the heart of this API is a read-only structure that holds all known - * items and their current values. The value is always a pointer which if - * NULL indicates its corresponding atom does not exist. Thus, one must - * always check if the pointer is non-NULL before attempting to extract - * its value. - * - * The structure may not be directly modified. Instead, set functions - * corresponding to each item are used to modify the backing-store of - * the read-only structure. Setting the value ptr to NULL will effectively - * remove it. Setting the value ptr to real data will immediately make a - * copy of the value in the backing-store and the read-only structure - * will correctly reflect the change. - * - * The hidden data cache memory is automatically managed. Thus the user need - * only guarantee the data is available during the lifetime of the set-function - * call. - * - * iTMF Tags read workflow: - * - * @li MP4TagsAlloc() - * @li MP4TagsFetch() - * @li inspect each tag of interest... - * @li MP4TagsStore() (if modified) - * @li MP4TagsFree() - * - * iTMF Tags read/modify/add/remove workflow: - * - * @li MP4TagsAlloc() - * @li MP4TagsFetch() - * @li inspect each tag of interest... - * @li MP4TagsSetName(), MP4TagsSetArtist()... - * @li MP4TagsStore() - * @li MP4TagsFree() - * - * @par Warning: - * Care must be taken when using multiple mechanisms to modify an open mp4 - * file as it is not thread-safe, nor does it permit overlapping different - * API workflows which have a begin/end to their workflow. That is to say - * do not interleave an iTMF Generic workflow with an iTMF Tags workflow. - * - *****************************************************************************/ - -/** Enumeration of possible MP4TagArtwork::type values. */ -typedef enum MP4TagArtworkType_e -{ - MP4_ART_UNDEFINED = 0, - MP4_ART_BMP = 1, - MP4_ART_GIF = 2, - MP4_ART_JPEG = 3, - MP4_ART_PNG = 4 -} MP4TagArtworkType; - -/** Data object representing a single piece of artwork. */ -typedef struct MP4TagArtwork_s -{ - void* data; /**< raw picture data */ - uint32_t size; /**< data size in bytes */ - MP4TagArtworkType type; /**< data type */ -} MP4TagArtwork; - -typedef struct MP4TagTrack_s -{ - uint16_t index; - uint16_t total; -} MP4TagTrack; - -typedef struct MP4TagDisk_s -{ - uint16_t index; - uint16_t total; -} MP4TagDisk; - -/** Tags convenience structure. - * - * This structure is used in the tags convenience API which allows for - * simplified retrieval and modification of the majority of known tags. - * - * This is a read-only structure and each tag is present if and only if the - * pointer is a non-NULL value. The actual data is backed by a hidden - * data cache which is only updated when the appropriate metadata set - * function is used, or if MP4TagsFetch() is invoked. Thus, if other API - * is used to manipulate relevent atom structure of the MP4 file, the user - * is responsible for re-fetching the data in this structure. - */ -typedef struct MP4Tags_s -{ - void* __handle; /* internal use only */ - - const char* name; - const char* artist; - const char* albumArtist; - const char* album; - const char* grouping; - const char* composer; - const char* comments; - const char* genre; - const uint16_t* genreType; - const char* releaseDate; - const MP4TagTrack* track; - const MP4TagDisk* disk; - const uint16_t* tempo; - const uint8_t* compilation; - - const char* tvShow; - const char* tvNetwork; - const char* tvEpisodeID; - const uint32_t* tvSeason; - const uint32_t* tvEpisode; - - const char* description; - const char* longDescription; - const char* lyrics; - - const char* sortName; - const char* sortArtist; - const char* sortAlbumArtist; - const char* sortAlbum; - const char* sortComposer; - const char* sortTVShow; - - const MP4TagArtwork* artwork; - uint32_t artworkCount; - - const char* copyright; - const char* encodingTool; - const char* encodedBy; - const char* purchaseDate; - - const uint8_t* podcast; - const char* keywords; /* TODO: Needs testing */ - const char* category; - - const uint8_t* hdVideo; - const uint8_t* mediaType; - const uint8_t* contentRating; - const uint8_t* gapless; - - const char* iTunesAccount; - const uint8_t* iTunesAccountType; - const uint32_t* iTunesCountry; - const uint32_t* contentID; - const uint32_t* artistID; - const uint64_t* playlistID; - const uint32_t* genreID; - const uint32_t* composerID; - const char* xid; -} MP4Tags; - -/** Allocate tags convenience structure for reading and settings tags. - * - * This function allocates a new structure which represents a snapshot - * of all the tags therein, tracking if the tag is missing, - * or present and with value. It is the caller's responsibility to free - * the structure with MP4TagsFree(). - * - * @return structure with all tags missing. - */ -MP4V2_EXPORT -const MP4Tags* MP4TagsAlloc( void ); - -/** Fetch data from mp4 file and populate structure. - * - * The tags structure and its hidden data-cache is updated to - * reflect the actual tags values found in the hFile. - * - * @param tags structure to fetch (write) into. - * @param hFile handle of file to fetch data from. - * - * @return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4TagsFetch( const MP4Tags* tags, MP4FileHandle hFile ); - -/** Store data to mp4 file from structure. - * - * The tags structure is pushed out to the mp4 file, - * adding tags if needed, removing tags if needed, and updating - * the values to modified tags. - * - * @param tags structure to store (read) from. - * @param hFile handle of file to store data to. - * - * @return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4TagsStore( const MP4Tags* tags, MP4FileHandle hFile ); - -/** Free tags convenience structure. - * - * This function frees memory associated with the structure. - * - * @param tags structure to destroy. - */ -MP4V2_EXPORT -void MP4TagsFree( const MP4Tags* tags ); - -/** Accessor that indicates whether a tags structure - * contains any metadata - * - * @param tags the structure to inspect - * - * @param hasMetadata populated with false if @p tags - * contains no metadata, true if @p tags contains metadata - * - * @retval false error determining if @p tags contains - * metadata - * - * @retval true successfully determined if @p tags contains - * metadata - */ -MP4V2_EXPORT -bool MP4TagsHasMetadata ( const MP4Tags* tags, bool *hasMetadata ); - -MP4V2_EXPORT bool MP4TagsSetName ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetArtist ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetAlbumArtist ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetAlbum ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetGrouping ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetComposer ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetComments ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetGenre ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetGenreType ( const MP4Tags*, const uint16_t* ); -MP4V2_EXPORT bool MP4TagsSetReleaseDate ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetTrack ( const MP4Tags*, const MP4TagTrack* ); -MP4V2_EXPORT bool MP4TagsSetDisk ( const MP4Tags*, const MP4TagDisk* ); -MP4V2_EXPORT bool MP4TagsSetTempo ( const MP4Tags*, const uint16_t* ); -MP4V2_EXPORT bool MP4TagsSetCompilation ( const MP4Tags*, const uint8_t* ); - -MP4V2_EXPORT bool MP4TagsSetTVShow ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetTVNetwork ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetTVEpisodeID ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetTVSeason ( const MP4Tags*, const uint32_t* ); -MP4V2_EXPORT bool MP4TagsSetTVEpisode ( const MP4Tags*, const uint32_t* ); - -MP4V2_EXPORT bool MP4TagsSetDescription ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetLongDescription ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetLyrics ( const MP4Tags*, const char* ); - -MP4V2_EXPORT bool MP4TagsSetSortName ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetSortArtist ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetSortAlbumArtist ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetSortAlbum ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetSortComposer ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetSortTVShow ( const MP4Tags*, const char* ); - -MP4V2_EXPORT bool MP4TagsAddArtwork ( const MP4Tags*, MP4TagArtwork* ); -MP4V2_EXPORT bool MP4TagsSetArtwork ( const MP4Tags*, uint32_t, MP4TagArtwork* ); -MP4V2_EXPORT bool MP4TagsRemoveArtwork ( const MP4Tags*, uint32_t ); - -MP4V2_EXPORT bool MP4TagsSetCopyright ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetEncodingTool ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetEncodedBy ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetPurchaseDate ( const MP4Tags*, const char* ); - -MP4V2_EXPORT bool MP4TagsSetPodcast ( const MP4Tags*, const uint8_t* ); -MP4V2_EXPORT bool MP4TagsSetKeywords ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetCategory ( const MP4Tags*, const char* ); - -MP4V2_EXPORT bool MP4TagsSetHDVideo ( const MP4Tags*, const uint8_t* ); -MP4V2_EXPORT bool MP4TagsSetMediaType ( const MP4Tags*, const uint8_t* ); -MP4V2_EXPORT bool MP4TagsSetContentRating ( const MP4Tags*, const uint8_t* ); -MP4V2_EXPORT bool MP4TagsSetGapless ( const MP4Tags*, const uint8_t* ); - -MP4V2_EXPORT bool MP4TagsSetITunesAccount ( const MP4Tags*, const char* ); -MP4V2_EXPORT bool MP4TagsSetITunesAccountType ( const MP4Tags*, const uint8_t* ); -MP4V2_EXPORT bool MP4TagsSetITunesCountry ( const MP4Tags*, const uint32_t* ); -MP4V2_EXPORT bool MP4TagsSetContentID ( const MP4Tags*, const uint32_t* ); -MP4V2_EXPORT bool MP4TagsSetArtistID ( const MP4Tags*, const uint32_t* ); -MP4V2_EXPORT bool MP4TagsSetPlaylistID ( const MP4Tags*, const uint64_t* ); -MP4V2_EXPORT bool MP4TagsSetGenreID ( const MP4Tags*, const uint32_t* ); -MP4V2_EXPORT bool MP4TagsSetComposerID ( const MP4Tags*, const uint32_t* ); -MP4V2_EXPORT bool MP4TagsSetXID ( const MP4Tags*, const char* ); - -/** @} ***********************************************************************/ - -#endif /* MP4V2_ITMF_TAGS_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/mp4v2.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/mp4v2.h deleted file mode 100644 index 4d8e8071..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/mp4v2.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001 - 2005. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Alix Marchandise-Franquet alix@cisco.com - * Ximpo Group Ltd. mp4v2@ximpo.com - * Bill May wmay@cisco.com - */ -#ifndef MP4V2_MP4V2_H -#define MP4V2_MP4V2_H - -/*****************************************************************************/ - -#include -#include - -/*****************************************************************************/ - -/* exploit C++ ability of default values for function parameters */ -#if defined( DEFAULT ) -# define __MP4V2_SAVE_DEFAULT DEFAULT -#endif -#undef DEFAULT -#if defined( __cplusplus ) -# define DEFAULT(x) =x -#else -# define DEFAULT(x) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/*****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/*****************************************************************************/ - -/* restore macro DEFAULT to state prior to mp4v2 headers */ -#undef DEFAULT -#if defined( __MP4V2_SAVE_DEFAULT ) -# define DEFAULT __MP4V2_SAVE_DEFAULT -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -/*****************************************************************************/ - -#endif /* MP4V2_MP4V2_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/platform.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/platform.h deleted file mode 100644 index d400edf3..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/platform.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef MP4V2_PLATFORM_H -#define MP4V2_PLATFORM_H - -/*****************************************************************************/ - -#include -#include -#include - -// Thanks, MSFT, for making C99 a total PITA. Declare this not to define any stdint stuff; this is useful -// if you're going to be using mp4v2 on windows with some other library that defines its own stdint. -// TODO msft has finally re-included stdint in vs2010, so maybe at some point in the future this won't be needed. -#ifndef MP4V2_NO_STDINT_DEFS - #if defined( _WIN32 ) && !defined( __MINGW32__ ) - typedef char int8_t; - typedef short int16_t; - typedef int int32_t; - typedef long long int64_t; - - typedef unsigned char uint8_t; - typedef unsigned short uint16_t; - typedef unsigned int uint32_t; - typedef unsigned long long uint64_t; - #else - #include - #endif -#endif - -#if defined( _WIN32 ) || defined( __MINGW32__ ) -# if defined( MP4V2_EXPORTS ) -# define MP4V2_EXPORT __declspec(dllexport) -# elif defined( MP4V2_USE_DLL_IMPORT ) || !defined( MP4V2_USE_STATIC_LIB ) -# define MP4V2_EXPORT __declspec(dllimport) -# else -# define MP4V2_EXPORT -# endif -#else -# define MP4V2_EXPORT __attribute__((visibility("default"))) -#endif - -#if defined( __GNUC__ ) -# define MP4V2_DEPRECATED __attribute__((deprecated)) -#else -# define MP4V2_DEPRECATED -#endif - -/****************************************************************************** - * - * TODO-KB: cleanup -- absolutely no need for a C-API to fuss with reserved - * C++ keywords. This will involve changing the public interface and current - * plan of action: - * - * typdef enum { - * mp4_false, - * mp4_true, - * } mp4_bool_t; - * - * followed by updating all public signatures and implementation. - */ - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -#if !defined( __cplusplus ) -#ifndef bool -#if SIZEOF_BOOL == 8 -typedef uint64_t bool; -#else -#if SIZEOF_BOOL == 4 -typedef uint32_t bool; -#else -#if SIZEOF_BOOL == 2 -typedef uint16_t bool; -#else -typedef unsigned char bool; -#endif -#endif -#endif -#ifndef false -#define false FALSE -#endif -#ifndef true -#define true TRUE -#endif -#endif -#endif - -/*****************************************************************************/ - -#endif /* MP4V2_PLATFORM_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/project.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/project.h deleted file mode 100644 index 75af58f6..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/project.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef MP4V2_PROJECT_H -#define MP4V2_PROJECT_H - -/*****************************************************************************/ - -#define MP4V2_PROJECT_name "MP4v2" -#define MP4V2_PROJECT_name_lower "mp4v2" -#define MP4V2_PROJECT_name_upper "MP4V2" -#define MP4V2_PROJECT_name_formal "MP4v2 2.0.0" -#define MP4V2_PROJECT_url_website "http://code.google.com/p/mp4v2" -#define MP4V2_PROJECT_url_downloads "http://code.google.com/p/mp4v2/downloads/list" -#define MP4V2_PROJECT_url_discussion "http://groups.google.com/group/mp4v2" -#define MP4V2_PROJECT_irc "irc://irc.freenode.net/handbrake" -#define MP4V2_PROJECT_bugreport "" -#define MP4V2_PROJECT_version "2.0.0" -#define MP4V2_PROJECT_version_hex 0x00020000 -#define MP4V2_PROJECT_version_major 2 -#define MP4V2_PROJECT_version_minor 0 -#define MP4V2_PROJECT_version_point 0 -#define MP4V2_PROJECT_repo_url "https://mp4v2.googlecode.com/svn/releases/2.0.0" -#define MP4V2_PROJECT_repo_branch "2.0.0" -#define MP4V2_PROJECT_repo_root "https://mp4v2.googlecode.com/svn" -#define MP4V2_PROJECT_repo_uuid "6e6572fa-98a6-11dd-ad9f-f77439c74b79" -#define MP4V2_PROJECT_repo_rev 493 -#define MP4V2_PROJECT_repo_date "2012-05-20 15:16:54 -0700 (Sun, 20 May 2012)" -#define MP4V2_PROJECT_repo_type "stable" -#define MP4V2_PROJECT_build "Sun May 20 15:18:53 PDT 2012" - -/*****************************************************************************/ - -#endif /* MP4V2_PROJECT_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/project.h.in b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/project.h.in deleted file mode 100644 index 59777c64..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/project.h.in +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef MP4V2_PROJECT_H -#define MP4V2_PROJECT_H - -/*****************************************************************************/ - -#define MP4V2_PROJECT_name "@PROJECT_name@" -#define MP4V2_PROJECT_name_lower "@PROJECT_name_lower@" -#define MP4V2_PROJECT_name_upper "@PROJECT_name_upper@" -#define MP4V2_PROJECT_name_formal "@PROJECT_name_formal@" -#define MP4V2_PROJECT_url_website "@PROJECT_url_website@" -#define MP4V2_PROJECT_url_downloads "@PROJECT_url_downloads@" -#define MP4V2_PROJECT_url_discussion "@PROJECT_url_discussion@" -#define MP4V2_PROJECT_irc "@PROJECT_irc@" -#define MP4V2_PROJECT_bugreport "@PROJECT_bugreport@" -#define MP4V2_PROJECT_version "@PROJECT_version@" -#define MP4V2_PROJECT_version_hex @PROJECT_version_hex@ -#define MP4V2_PROJECT_version_major @PROJECT_version_major@ -#define MP4V2_PROJECT_version_minor @PROJECT_version_minor@ -#define MP4V2_PROJECT_version_point @PROJECT_version_point@ -#define MP4V2_PROJECT_repo_url "@PROJECT_repo_url@" -#define MP4V2_PROJECT_repo_branch "@PROJECT_repo_branch@" -#define MP4V2_PROJECT_repo_root "@PROJECT_repo_root@" -#define MP4V2_PROJECT_repo_uuid "@PROJECT_repo_uuid@" -#define MP4V2_PROJECT_repo_rev @PROJECT_repo_rev@ -#define MP4V2_PROJECT_repo_date "@PROJECT_repo_date@" -#define MP4V2_PROJECT_repo_type "@PROJECT_repo_type@" -#define MP4V2_PROJECT_build "@PROJECT_build@" - -/*****************************************************************************/ - -#endif /* MP4V2_PROJECT_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/sample.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/sample.h deleted file mode 100644 index ba35a572..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/sample.h +++ /dev/null @@ -1,557 +0,0 @@ -#ifndef MP4V2_SAMPLE_H -#define MP4V2_SAMPLE_H - -/**************************************************************************//** - * - * @defgroup mp4_sample MP4v2 Sample - * @{ - * - *****************************************************************************/ - -/** Sample dependency types. - * - * Bit combinations 0x03, 0x30, 0xc0 are reserved. - */ -typedef enum MP4SampleDependencyType_e { - MP4_SDT_UNKNOWN = 0x00, /**< unknown */ - MP4_SDT_HAS_REDUNDANT_CODING = 0x01, /**< contains redundant coding */ - MP4_SDT_HAS_NO_REDUNDANT_CODING = 0x02, /**< does not contain redundant coding */ - MP4_SDT_HAS_DEPENDENTS = 0x04, /**< referenced by other samples */ - MP4_SDT_HAS_NO_DEPENDENTS = 0x08, /**< not referenced by other samples */ - MP4_SDT_IS_DEPENDENT = 0x10, /**< references other samples */ - MP4_SDT_IS_INDEPENDENT = 0x20, /**< does not reference other samples */ - MP4_SDT_EARLIER_DISPLAY_TIMES_ALLOWED = 0x40, /**< subequent samples in GOP may display earlier */ - _MP4_SDT_RESERVED = 0x80 /**< reserved */ -} MP4SampleDependencyType; - -/** Read a track sample. - * - * MP4ReadSample reads the specified sample from the specified track. - * Typically this sample is then decoded in a codec dependent fashion and - * rendered in an appropriate fashion. - * - * The argument ppBytes allows for two possible approaches for - * buffering: - * - * If the calling application wishes to handle its own buffering it can set - * *ppBytes to the buffer it wishes to use. The calling application is - * responsible for ensuring that the buffer is large enough to hold the - * sample. This can be done by using either MP4GetSampleSize() or - * MP4GetTrackMaxSampleSize() to determine before-hand how large the - * receiving buffer must be. - * - * If the value of *ppBytes is NULL, then an appropriately sized buffer is - * automatically malloc'ed for the sample data and *ppBytes set to this - * pointer. The calling application is responsible for free'ing this - * memory. - * - * The last four arguments are pointers to variables that can receive - * optional sample information. - * - * Typically for audio none of these are needed. MPEG audio such as MP3 or - * AAC has a fixed sample duration and every sample can be accessed at - * random. - * - * For video, all of these optional values could be needed. MPEG video can - * be encoded at a variable frame rate, with only occasional random access - * points, and with "B frames" which cause the rendering (display) order - * of the video frames to differ from the storage/decoding order. - * - * Other media types fall between these two extremes. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param sampleId specifies which sample is to be read. - * Caveat: the first sample has id 1 not 0. - * @param ppBytes pointer to the pointer to the sample data. - * @param pNumBytes pointer to variable that will be hold the size in bytes - * of the sample. - * @param pStartTime if non-NULL, pointer to variable that will receive the - * starting timestamp for this sample. Caveat: The timestamp is in - * trackId's timescale. - * @param pDuration if non-NULL, pointer to variable that will receive the - * duration for this sample. Caveat: The duration is in - * trackId's timescale. - * @param pRenderingOffset if non-NULL, pointer to variable that will - * receive the rendering offset for this sample. Currently the only - * media type that needs this feature is MPEG video. Caveat: The offset - * is in trackId's timescale. - * @param pIsSyncSample if non-NULL, pointer to variable that will receive - * the state of the sync/random access flag for this sample. - * - * @return true on success, false on failure. - * - * @see MP4GetSampleSize(). - * @see MP4GetTrackMaxSampleSize(). - */ -MP4V2_EXPORT -bool MP4ReadSample( - /* input parameters */ - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId, - /* input/output parameters */ - uint8_t** ppBytes, - uint32_t* pNumBytes, - /* output parameters */ - MP4Timestamp* pStartTime DEFAULT(NULL), - MP4Duration* pDuration DEFAULT(NULL), - MP4Duration* pRenderingOffset DEFAULT(NULL), - bool* pIsSyncSample DEFAULT(NULL) ); - -/** Read a track sample based on a specified time. - * - * MP4ReadSampleFromTime is similar to MP4ReadSample() except the sample - * is specified by using a timestamp instead of sampleId. - * Typically this sample is then decoded in a codec dependent fashion and - * rendered in an appropriate fashion. - * - * The argument ppBytes allows for two possible approaches for - * buffering: - * - * If the calling application wishes to handle its own buffering it can set - * *ppBytes to the buffer it wishes to use. The calling application is - * responsible for ensuring that the buffer is large enough to hold the - * sample. This can be done by using either MP4GetSampleSize() or - * MP4GetTrackMaxSampleSize() to determine before-hand how large the - * receiving buffer must be. - * - * If the value of *ppBytes is NULL, then an appropriately sized buffer is - * automatically malloc'ed for the sample data and *ppBytes set to this - * pointer. The calling application is responsible for free'ing this - * memory. - * - * The last four arguments are pointers to variables that can receive - * optional sample information. - * - * Typically for audio none of these are needed. MPEG audio such as MP3 or - * AAC has a fixed sample duration and every sample can be accessed at - * random. - * - * For video, all of these optional values could be needed. MPEG video can - * be encoded at a variable frame rate, with only occasional random access - * points, and with "B frames" which cause the rendering (display) order - * of the video frames to differ from the storage/decoding order. - * - * Other media types fall between these two extremes. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param when specifies which sample is to be read based on a time in the - * track timeline. See MP4GetSampleIdFromTime() for details. - * @param ppBytes pointer to the pointer to the sample data. - * @param pNumBytes pointer to variable that will be hold the size in bytes - * of the sample. - * @param pStartTime if non-NULL, pointer to variable that will receive the - * starting timestamp for this sample. Caveat: The timestamp is in - * trackId's timescale. - * @param pDuration if non-NULL, pointer to variable that will receive the - * duration for this sample. Caveat: The duration is in - * trackId's timescale. - * @param pRenderingOffset if non-NULL, pointer to variable that will - * receive the rendering offset for this sample. Currently the only - * media type that needs this feature is MPEG video. Caveat: The offset - * is in trackId's timescale. - * @param pIsSyncSample if non-NULL, pointer to variable that will receive - * the state of the sync/random access flag for this sample. - * - * @return true on success, false on failure. - * - * @see MP4ReadSample(). - * @see MP4GetSampleIdFromTime(). - * @see MP4GetSampleSize(). - * @see MP4GetTrackMaxSampleSize(). - */ -MP4V2_EXPORT -bool MP4ReadSampleFromTime( - /* input parameters */ - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Timestamp when, - /* input/output parameters */ - uint8_t** ppBytes, - uint32_t* pNumBytes, - /* output parameters */ - MP4Timestamp* pStartTime DEFAULT(NULL), - MP4Duration* pDuration DEFAULT(NULL), - MP4Duration* pRenderingOffset DEFAULT(NULL), - bool* pIsSyncSample DEFAULT(NULL) ); - -/** Write a track sample. - * - * MP4WriteSample writes the given sample at the end of the specified track. - * Currently the library does not support random insertion of samples into - * the track timeline. Note that with mp4 there cannot be any holes or - * overlapping samples in the track timeline. The last three arguments give - * optional sample information. - * - * The value of duration can be given as #MP4_INVALID_DURATION if all samples - * in the track have the same duration. This can be specified with - * MP4AddTrack() and related functions. - * - * Typically for audio none of the optional arguments are needed. MPEG audio - * such as MP3 or AAC has a fixed sample duration and every sample can be - * accessed at random. - * - * For video, all of the optional arguments could be needed. MPEG video - * can be encoded at a variable frame rate, with only occasional random - * access points, and with "B frames" which cause the rendering (display) - * order of the video frames to differ from the storage/decoding order. - * - * Other media types fall between these two extremes. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param pBytes pointer to sample data. - * @param numBytes length of sample data in bytes. - * @param duration sample duration. Caveat: should be in track timescale. - * @param renderingOffset the rendering offset for this sample. - * Currently the only media type that needs this feature is MPEG - * video. Caveat: The offset should be in the track timescale. - * @param isSyncSample the sync/random access flag for this sample. - * - * @return true on success, false on failure. - * - * @see MP4AddTrack(). - */ -MP4V2_EXPORT -bool MP4WriteSample( - MP4FileHandle hFile, - MP4TrackId trackId, - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration DEFAULT(MP4_INVALID_DURATION), - MP4Duration renderingOffset DEFAULT(0), - bool isSyncSample DEFAULT(true) ); - -/** Write a track sample and supply dependency information. - * - * MP4WriteSampleDependency writes the given sample at the end of the specified track. - * Currently the library does not support random insertion of samples into - * the track timeline. Note that with mp4 there cannot be any holes or - * overlapping samples in the track timeline. The last three arguments give - * optional sample information. - * - * The value of duration can be given as #MP4_INVALID_DURATION if all samples - * in the track have the same duration. This can be specified with - * MP4AddTrack() and related functions. - * - * When this method is used instead of MP4WriteSample() it enables sdtp - * atom to be written out. This atom may be used by advanced players to - * optimize trick-operations such as fast-fwd, reverse or scrubbing. - * - * An sdtp atom will always be written out if this method is used. - * To avoid writing the atom, use MP4WriteSample() instead. - * - * Intermixing use of MP4WriteSampleDependency() and MP4WriteSample() on the - * same track is not permitted. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param pBytes pointer to sample data. - * @param numBytes length of sample data in bytes. - * @param duration sample duration. Caveat: should be in track timescale. - * @param renderingOffset the rendering offset for this sample. - * Currently the only media type that needs this feature is MPEG - * video. Caveat: The offset should be in the track timescale. - * @param isSyncSample the sync/random access flag for this sample. - * @param dependencyFlags bitmask specifying sample dependency characteristics. - * See #MP4SampleDependencyType for bit constants. - * - * @return true on success, false on failure. - * - * @see MP4AddTrack(). - */ -MP4V2_EXPORT -bool MP4WriteSampleDependency( - MP4FileHandle hFile, - MP4TrackId trackId, - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration, - MP4Duration renderingOffset, - bool isSyncSample, - uint32_t dependencyFlags ); - -/** Make a copy of a sample. - * - * MP4CopySample creates a new sample based on an existing sample. Note that - * another copy of the media sample data is created in the file using this - * function. ie. this call is equivalent to MP4ReadSample() followed by - * MP4WriteSample(). - * - * Note that is the responsibility of the caller to ensure that the copied - * media sample makes sense in the destination track. eg. copying a video - * sample to an audio track is unlikely to result in anything good happening, - * even copying a sample from video track to another requires that the tracks - * use the same encoding and that issues such as image size are addressed. - * - * @param srcFile source sample file handle. - * @param srcTrackId source sample track id. - * @param srcSampleId source sample id. - * @param dstFile destination file handle for new (copied) sample. - * If the value is #MP4_INVALID_FILE_HANDLE, the copy is created in - * the same file as srcFile. - * @param dstTrackId destination track id for new sample. - * If the value is #MP4_INVALID_TRACK_ID, the the copy is created in - * the same track as the srcTrackId. - * @param dstSampleDuration duration in track timescale for new sample. - * If the value is #MP4_INVALID_DURATION, then the duration of - * the source sample is used. - * - * @return On success, thew id of the new sample. - * On error, #MP4_INVALID_SAMPLE_ID. - * - * @see MP4ReadSample(). - * @see MP4WriteSample(). - */ -MP4V2_EXPORT -bool MP4CopySample( - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - MP4SampleId srcSampleId, - MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE), - MP4TrackId dstTrackId DEFAULT(MP4_INVALID_TRACK_ID), - MP4Duration dstSampleDuration DEFAULT(MP4_INVALID_DURATION) ); - -/** Make a copy of a sample. - * - * MP4EncAndCopySample is similar to MP4CopySample() except that it - * offers an encryption hook to the caller. - * - * @param srcFile source sample file handle. - * @param srcTrackId source sample track id. - * @param srcSampleId source sample id. - * @param encfcnp undocumented. - * @param encfcnparam1 undocumented. - * @param dstFile destination file handle for new (copied) sample. - * If the value is #MP4_INVALID_FILE_HANDLE, the copy is created in - * the same file as srcFile. - * @param dstTrackId destination track id for new sample. - * If the value is #MP4_INVALID_TRACK_ID, the the copy is created in - * the same track as the srcTrackId. - * @param dstSampleDuration duration in track timescale for new sample. - * If the value is #MP4_INVALID_DURATION, then the duration of - * the source sample is used. - * - * @return On success, thew id of the new sample. - * On error, #MP4_INVALID_SAMPLE_ID. - * - * @see MP4CopySample(). - */ -MP4V2_EXPORT -bool MP4EncAndCopySample( - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - MP4SampleId srcSampleId, - encryptFunc_t encfcnp, - uint32_t encfcnparam1, - MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE), - MP4TrackId dstTrackId DEFAULT(MP4_INVALID_TRACK_ID), - MP4Duration dstSampleDuration DEFAULT(MP4_INVALID_DURATION) ); - -/** Not implemented. - */ -MP4V2_EXPORT -bool MP4ReferenceSample( - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - MP4SampleId srcSampleId, - MP4FileHandle dstFile, - MP4TrackId dstTrackId, - MP4Duration dstSampleDuration DEFAULT(MP4_INVALID_DURATION) ); - -/** Get size of a track sample. - * - * MP4GetSampleSize returns the size in bytes of the specified sample from the - * the specified track. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param sampleId id of sample for operation. Caveat: the first sample has - * id 1, not 0. - * - * @return On success the sample size in bytes. On error, 0. - */ -MP4V2_EXPORT -uint32_t MP4GetSampleSize( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId); - -/** Get the maximum sample size of a track. - * - * MP4GetTrackMaxSampleSize returns the maximum size in bytes of all the - * samples in the specified track. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * - * @return On success, the maximum sample size in bytes. On error, 0. - * - * @see MP4GetSampleSize(). - */ -MP4V2_EXPORT -uint32_t MP4GetTrackMaxSampleSize( - MP4FileHandle hFile, - MP4TrackId trackId ); - -/** Get sample id of a specified time. - * - * MP4GetSampleIdFromTime returns the sample id of the track sample in which - * the specified time occurs. - * - * The specified time should be in the track timescale. - * - * It is wise to use MP4GetSampleTime() with the returned sample id so one - * can adjust for any difference between the specified time and the actual - * start time of the sample. - * - * If the calling application needs a sample that can be accessed randomly - * then the wantSyncSample argument should be set to true. This could - * be the case for a player that is implementing a positioning function and - * needs to be able to start decoding a track from the returned sample id. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param when time in track timescale. - * @param wantSyncSample specifies if the result sample id must correspond - * to a sample whose sync/random access flag is true. - * - * @return On success, the sample id that occurs at the specified time. - * On error, #MP4_INVALID_SAMPLE_ID. - * - * @see MP4ConvertToTrackTimestamp() for how to map a time value to this - * timescale. - */ -MP4V2_EXPORT -MP4SampleId MP4GetSampleIdFromTime( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Timestamp when, - bool wantSyncSample DEFAULT(false) ); - -/** Get start time of track sample. - * - * MP4GetSampleTime returns the start time of the specified sample from - * the specified track in the track timescale units. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param sampleId id of sample for operation. Caveat: the first sample has - * id 1, not 0. - * - * @return On success, sample start time in track timescale units. - * On error, #MP4_INVALID_TIMESTAMP. - * - * @see MP4ConvertFromTrackTimestamp() for how to map this value to another - * timescale. - */ -MP4V2_EXPORT -MP4Timestamp MP4GetSampleTime( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId ); - -/** Get the duration of a track sample. - * - * MP4GetSampleDuration returns the duration of the specified sample from - * the specified track in the track timescale units. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param sampleId id of sample for operation. Caveat: the first sample has - * id 1, not 0. - * - * @return On success, the sample duration in track timescale units. - * On error, #MP4_INVALID_DURATION. - * - * @see MP4ConvertFromTrackDuration() for how to map this value to another - * timescale. - */ -MP4V2_EXPORT -MP4Duration MP4GetSampleDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId ); - -/** Get the rendering offset of a track sample. - * - * MP4GetSampleRenderingOffset returns the rendering offset of the specified - * sample from the specified track in the track timescale units. - * - * The sample rendering offset is typically zero for all media types other - * than video. For video, encodings such as those defined by MPEG have - * three types of frames: I, P, and B. To increase coding efficiency B - * frames can depend on I or P frames that should be rendered after the B - * frame. However to decode the B frame the I or P frame must already have - * been decoded. This situation is addressed by placing the frames in - * decoding order in the video track, and then setting the rendering offset - * property to indicate when the video frame should actually be rendered to - * the screen. Hence the start time of a sample indicates when it should be - * decoded, the start time plus the rendering offset indicates when it - * should be rendered. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param sampleId id of sample for operation. Caveat: the first sample has - * id 1, not 0. - * - * @return On success, the rendering offset in track timescale units. - * On error, #MP4_INVALID_DURATION. - * - * @see MP4ConvertFromTrackDuration() for how to map this value to another - * timescale. - */ -MP4V2_EXPORT -MP4Duration MP4GetSampleRenderingOffset( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId ); - -/** Set the rendering offset of a track sample. - * - * MP4SetSampleRenderingOffset sets the rendering offset of the specified - * sample from the specified track in the track timescale units. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param sampleId id of sample for operation. Caveat: the first sample has - * id 1, not 0. - * @param renderingOffset new offset value in timescale units. - * - * @return true on success, false on failure. - * - * @see MP4ConvertToTrackDuration() for how to map this value from another - * timescale. - * @see MP4GetSampleRenderingOffset() for a description of this sample - * property. - */ -MP4V2_EXPORT -bool MP4SetSampleRenderingOffset( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId, - MP4Duration renderingOffset ); - -/** Get sync/random access state of sample. - * - * MP4GetSampleSync returns the state of the sync/random access flag of - * the specified sample from the specified track. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param sampleId id of sample for operation. Caveat: the first sample has - * id 1, not 0. - * - * @return 1 when true, 0 when false. On error, -1. - */ -MP4V2_EXPORT -int8_t MP4GetSampleSync( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId ); - -/* @} ***********************************************************************/ - -#endif /* MP4V2_SAMPLE_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/streaming.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/streaming.h deleted file mode 100644 index 36389d60..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/streaming.h +++ /dev/null @@ -1,163 +0,0 @@ -#ifndef MP4V2_STREAMING_H -#define MP4V2_STREAMING_H - -/**************************************************************************//** - * - * @defgroup mp4_hint MP4v2 Streaming - * @{ - * - *****************************************************************************/ - -MP4V2_EXPORT -bool MP4GetHintTrackRtpPayload( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - char** ppPayloadName DEFAULT(NULL), - uint8_t* pPayloadNumber DEFAULT(NULL), - uint16_t* pMaxPayloadSize DEFAULT(NULL), - char** ppEncodingParams DEFAULT(NULL) ); - -#define MP4_SET_DYNAMIC_PAYLOAD 0xff - -MP4V2_EXPORT -bool MP4SetHintTrackRtpPayload( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - const char* pPayloadName, - uint8_t* pPayloadNumber, - uint16_t maxPayloadSize DEFAULT(0), - const char * encode_params DEFAULT(NULL), - bool include_rtp_map DEFAULT(true), - bool include_mpeg4_esid DEFAULT(true) ); - -MP4V2_EXPORT -const char* MP4GetSessionSdp( - MP4FileHandle hFile ); - -MP4V2_EXPORT -bool MP4SetSessionSdp( - MP4FileHandle hFile, - const char* sdpString ); - -MP4V2_EXPORT -bool MP4AppendSessionSdp( - MP4FileHandle hFile, - const char* sdpString ); - -MP4V2_EXPORT -const char* MP4GetHintTrackSdp( - MP4FileHandle hFile, - MP4TrackId hintTrackId ); - -MP4V2_EXPORT -bool MP4SetHintTrackSdp( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - const char* sdpString ); - -MP4V2_EXPORT -bool MP4AppendHintTrackSdp( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - const char* sdpString ); - -MP4V2_EXPORT -MP4TrackId MP4GetHintTrackReferenceTrackId( - MP4FileHandle hFile, - MP4TrackId hintTrackId ); - -MP4V2_EXPORT -bool MP4ReadRtpHint( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - MP4SampleId hintSampleId, - uint16_t* pNumPackets DEFAULT(NULL) ); - -MP4V2_EXPORT -uint16_t MP4GetRtpHintNumberOfPackets( - MP4FileHandle hFile, - MP4TrackId hintTrackId ); - -MP4V2_EXPORT -int8_t MP4GetRtpPacketBFrame( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - uint16_t packetIndex ); - -MP4V2_EXPORT -int32_t MP4GetRtpPacketTransmitOffset( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - uint16_t packetIndex ); - -MP4V2_EXPORT -bool MP4ReadRtpPacket( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - uint16_t packetIndex, - uint8_t** ppBytes, - uint32_t* pNumBytes, - uint32_t ssrc DEFAULT(0), - bool includeHeader DEFAULT(true), - bool includePayload DEFAULT(true) ); - -MP4V2_EXPORT -MP4Timestamp MP4GetRtpTimestampStart( - MP4FileHandle hFile, - MP4TrackId hintTrackId ); - -MP4V2_EXPORT -bool MP4SetRtpTimestampStart( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - MP4Timestamp rtpStart ); - -MP4V2_EXPORT -bool MP4AddRtpHint( - MP4FileHandle hFile, - MP4TrackId hintTrackId ); - -MP4V2_EXPORT -bool MP4AddRtpVideoHint( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - bool isBframe DEFAULT(false), - uint32_t timestampOffset DEFAULT(0) ); - -MP4V2_EXPORT -bool MP4AddRtpPacket( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - bool setMbit DEFAULT(false), - int32_t transmitOffset DEFAULT(0) ); - -MP4V2_EXPORT -bool MP4AddRtpImmediateData( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - const uint8_t* pBytes, - uint32_t numBytes ); - -MP4V2_EXPORT -bool MP4AddRtpSampleData( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - MP4SampleId sampleId, - uint32_t dataOffset, - uint32_t dataLength ); - -MP4V2_EXPORT -bool MP4AddRtpESConfigurationPacket( - MP4FileHandle hFile, - MP4TrackId hintTrackId ); - -MP4V2_EXPORT -bool MP4WriteRtpHint( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - MP4Duration duration, - bool isSyncSample DEFAULT(true) ); - -/** @} ***********************************************************************/ - -#endif /* MP4V2_STREAMING_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/track.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/track.h deleted file mode 100644 index 90eb7bc8..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/track.h +++ /dev/null @@ -1,451 +0,0 @@ -#ifndef MP4V2_TRACK_H -#define MP4V2_TRACK_H - -/**************************************************************************//** - * - * @defgroup mp4_track MP4v2 Track - * @{ - * - *****************************************************************************/ - -/** Add a user defined track. - * - * MP4AddTrack adds a user defined track to the mp4 file. Care should be - * taken to avoid any of the standardized track type names. A useful - * convention is use only uppercase characters for user defined track types. - * The string should be exactly four characters in length, e.g. "MINE". - * - * Note this should not be used to add any of the known track types defined - * in the MP4 standard (ISO/IEC 14496-1:2001). - * - * @param hFile handle of file for operation. - * @param type specifies the type of track to be added. - * @param timeScale the time scale in ticks per second of the track. Default is 1000. - * - * @return On success, the track-id of new track. - * On failure, #MP4_INVALID_TRACK_ID. - */ -MP4V2_EXPORT -MP4TrackId MP4AddTrack( - MP4FileHandle hFile, - const char* type, - uint32_t timeScale DEFAULT(MP4_MSECS_TIME_SCALE) ); - -/** Add an MPEG-4 systems track. - * - * MP4AddSystemsTrack adds an MPEG-4 Systems track to the mp4 file. Note - * this should not be used to add OD or scene tracks, MP4AddODTrack() and - * MP4AddSceneTrack() should be used for those purposes. Other known - * MPEG-4 System track types are: - * @li #MP4_CLOCK_TRACK_TYPE - * @li #MP4_MPEG7_TRACK_TYPE - * @li #MP4_OCI_TRACK_TYPE - * @li #MP4_IPMP_TRACK_TYPE - * @li #MP4_MPEGJ_TRACK_TYPE - * - * @param hFile handle of file for operation. - * @param type specifies the type of track to be added. - * - * @return On success, the track-id of new track. - * On failure, #MP4_INVALID_TRACK_ID. - */ -MP4V2_EXPORT -MP4TrackId MP4AddSystemsTrack( - MP4FileHandle hFile, - const char* type ); - -/** Add a object descriptor (OD) track. - * - * MP4AddODTrack adds an object descriptor (aka OD) track to the mp4 file. - * MP4WriteSample() can then be used to add the desired OD commands to the - * track. The burden is currently on the calling application to understand - * OD. - * - * Those wishing to have a simple audio/video scene without understanding - * OD may wish to use MP4MakeIsmaCompliant() to create the minimal OD and - * BIFS information. - * - * @param hFile handle of file for operation. - * - * @return On success, the track-id of new track. - * On failure, #MP4_INVALID_TRACK_ID. - */ -MP4V2_EXPORT -MP4TrackId MP4AddODTrack( - MP4FileHandle hFile ); - -/** Add a scene (BIFS) track. - * - * MP4AddSceneTrack adds a scene (aka BIFS) track to the mp4 file. - * MP4WriteSample() can then be used to add the desired BIFS commands to - * the track. The burden is currently on the calling application to - * understand BIFS. - * - * Those wishing to have a simple audio/video scene without understanding - * BIFS may wish to use MP4MakeIsmaCompliant() to create the minimal OD - * and BIFS information. - * - * @param hFile handle of file for operation. - * - * @return On success, the track-id of new track. - * On failure, #MP4_INVALID_TRACK_ID. - */ -MP4V2_EXPORT -MP4TrackId MP4AddSceneTrack( - MP4FileHandle hFile ); - -/** Add audio track to mp4 file. - * - * MP4AddAudioTrack adds an audio track to the mp4 file. MP4WriteSample() - * can then be used to add the desired audio samples. - * - * It is recommended that the time scale be set to the sampling frequency - * (eg. 44100 Hz) of the audio so as to preserve the timing information - * accurately. - * - * If the audio encoding uses a fixed duration for each sample that should - * be specified here. If not then the value #MP4_INVALID_DURATION - * should be given for the sampleDuration argument. - * - * @param hFile handle of file for operation. - * @param timeScale the time scale in ticks per second of the track. - * @param sampleDuration the fixed duration for all track samples. - * Caveat: the value should be in track-timescale units. - * @param audioType the audio encoding type. - * See MP4GetTrackEsdsObjectTypeId() for known values. - * - * @return On success, the track-id of the new track. - * On error, #MP4_INVALID_TRACK_ID. - */ -MP4V2_EXPORT -MP4TrackId MP4AddAudioTrack( - MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint8_t audioType DEFAULT(MP4_MPEG4_AUDIO_TYPE) ); - -/** Add ulaw track to mp4 file. - * - * MP4AddULawAudioTrack adds a ulaw track to the mp4 file. MP4WriteSample() - * can then be used to add the desired audio samples. - * - * @param hFile handle of file for operation. - * @param timeScale the time scale in ticks per second of the track. - * - * @return On success, the track-id of the new track. - * On error, #MP4_INVALID_TRACK_ID. -*/ -MP4V2_EXPORT -MP4TrackId MP4AddULawAudioTrack( - MP4FileHandle hFile, - uint32_t timeScale); - -/** Add alaw track to mp4 file. - * - * MP4AddALawAudioTrack adds a alaw track to the mp4 file. MP4WriteSample() - * can then be used to add the desired audio samples. - * - * @param hFile handle of file for operation. - * @param timeScale the time scale in ticks per second of the track. - * - * @return On success, the track-id of the new track. - * On error, #MP4_INVALID_TRACK_ID. -*/ -MP4V2_EXPORT -MP4TrackId MP4AddALawAudioTrack( - MP4FileHandle hFile, - uint32_t timeScale); - -MP4V2_EXPORT -MP4TrackId MP4AddAC3AudioTrack( - MP4FileHandle hFile, - uint32_t samplingRate, - uint8_t fscod, - uint8_t bsid, - uint8_t bsmod, - uint8_t acmod, - uint8_t lfeon, - uint8_t bit_rate_code ); - -MP4V2_EXPORT -MP4TrackId MP4AddAmrAudioTrack( - MP4FileHandle hFile, - uint32_t timeScale, - uint16_t modeSet, - uint8_t modeChangePeriod, - uint8_t framesPerSample, - bool isAmrWB ); - -MP4V2_EXPORT -void MP4SetAmrVendor( - MP4FileHandle hFile, - MP4TrackId trackId, - uint32_t vendor ); - -MP4V2_EXPORT -void MP4SetAmrDecoderVersion( - MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t decoderVersion ); - -MP4V2_EXPORT -void MP4SetAmrModeSet( - MP4FileHandle hFile, - MP4TrackId trakId, - uint16_t modeSet ); - -MP4V2_EXPORT -uint16_t MP4GetAmrModeSet( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -MP4TrackId MP4AddHrefTrack( - MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - const char* base_url DEFAULT(NULL) ); - -MP4V2_EXPORT -const char* MP4GetHrefTrackBaseUrl( - MP4FileHandle hFile, - MP4TrackId trackId ); - -/** Add a video track. - * - * MP4AddVideoTrack adds a video track to the mp4 file. MP4WriteSample() - * can then be used to add the desired video samples. - * - * It is recommended that the time scale be set to 90000 so as to preserve - * the timing information accurately for the range of video frame rates - * commonly in use. - * - * If the video frame rate is to be fixed then the sampleDuration argument - * should be give the appropriate fixed value. If the video frame rate is - * to be variable then the value #MP4_INVALID_DURATION should be - * given for the sampleDuration argument. - * - * @param hFile handle of file for operation. - * @param timeScale the timescale in ticks per second of the track. - * @param sampleDuration specifies fixed sample duration for all track - * samples. Caveat: the value should be in track timescale units. - * @param width specifies the video frame width in pixels. - * @param height specifies the video frame height in pixels. - * @param videoType specifies the video encoding type. - * See MP4GetTrackVideoType() for known values. - * - * @return On success, the track-id of the new track. - * On error, #MP4_INVALID_TRACK_ID. - */ -MP4V2_EXPORT -MP4TrackId MP4AddVideoTrack( - MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t videoType DEFAULT(MP4_MPEG4_VIDEO_TYPE) ); - -MP4V2_EXPORT -MP4TrackId MP4AddH264VideoTrack( - MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t AVCProfileIndication, - uint8_t profile_compat, - uint8_t AVCLevelIndication, - uint8_t sampleLenFieldSizeMinusOne ); - -MP4V2_EXPORT -void MP4AddH264SequenceParameterSet( - MP4FileHandle hFile, - MP4TrackId trackId, - const uint8_t* pSequence, - uint16_t sequenceLen ); - -MP4V2_EXPORT -void MP4AddH264PictureParameterSet( - MP4FileHandle hFile, - MP4TrackId trackId, - const uint8_t* pPict, - uint16_t pictLen ); - -MP4V2_EXPORT -void MP4SetH263Vendor( - MP4FileHandle hFile, - MP4TrackId trackId, - uint32_t vendor ); - -MP4V2_EXPORT -void MP4SetH263DecoderVersion( - MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t decoderVersion ); - -MP4V2_EXPORT -void MP4SetH263Bitrates( - MP4FileHandle hFile, - MP4TrackId trackId, - uint32_t avgBitrate, - uint32_t maxBitrate ); - -MP4V2_EXPORT -MP4TrackId MP4AddH263VideoTrack( - MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t h263Level, - uint8_t h263Profile, - uint32_t avgBitrate, - uint32_t maxBitrate ); - -/** Add a hint track. - * - * MP4AddHintTrack adds a hint track to the mp4 file. A hint track is used - * to describe how to send the reference media track over a particular - * network transport. In the case of the IETF RTP protocol, the hint track - * describes how the media data should be placed into packets and any - * media specific protocol headers that should be added. - * - * Typically there is a one to one correspondence between reference media - * track samples and hint track samples. The start time, duration, and - * sync flags are typically the same, however provisions are made for - * deviations from this rule. - * - * The MP4 library provides extensive support for RTP hint tracks. This - * includes a easy to use API to create RTP hint tracks, and read out - * fully constructed RTP packets based on the hint track. - * - * @param hFile handle of file for operation. - * @param refTrackId specifies the reference media track for this hint track. - * - * @return On success, the track-id of the new track. - * On error, #MP4_INVALID_TRACK_ID. - */ -MP4V2_EXPORT -MP4TrackId MP4AddHintTrack( - MP4FileHandle hFile, - MP4TrackId refTrackId ); - -MP4V2_EXPORT -MP4TrackId MP4AddTextTrack( - MP4FileHandle hFile, - MP4TrackId refTrackId ); - -MP4V2_EXPORT -MP4TrackId MP4AddSubtitleTrack( - MP4FileHandle hFile, - uint32_t timescale, - uint16_t width, - uint16_t height ); - -MP4V2_EXPORT -MP4TrackId MP4AddSubpicTrack( - MP4FileHandle hFile, - uint32_t timescale, - uint16_t width, - uint16_t height ); - -MP4V2_EXPORT -MP4TrackId MP4AddPixelAspectRatio( - MP4FileHandle hFile, - MP4TrackId refTrackId, - uint32_t hSpacing, - uint32_t vSpacing ); - -MP4V2_EXPORT -MP4TrackId MP4AddColr( - MP4FileHandle hFile, - MP4TrackId refTrackId, - uint16_t primary, - uint16_t transfer, - uint16_t matrix ); - -MP4V2_EXPORT -MP4TrackId MP4CloneTrack( - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE), - MP4TrackId dstHintTrackReferenceTrack DEFAULT(MP4_INVALID_TRACK_ID) ); - -MP4V2_EXPORT -MP4TrackId MP4CopyTrack( - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - MP4FileHandle dstFile DEFAULT(MP4_INVALID_FILE_HANDLE), - bool applyEdits DEFAULT(false), - MP4TrackId dstHintTrackReferenceTrack DEFAULT(MP4_INVALID_TRACK_ID) ); - -MP4V2_EXPORT -bool MP4DeleteTrack( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -uint32_t MP4GetNumberOfTracks( - MP4FileHandle hFile, - const char* type DEFAULT(NULL), - uint8_t subType DEFAULT(0) ); - -MP4V2_EXPORT -MP4TrackId MP4FindTrackId( - MP4FileHandle hFile, - uint16_t index, - const char* type DEFAULT(NULL), - uint8_t subType DEFAULT(0) ); - -MP4V2_EXPORT -uint16_t MP4FindTrackIndex( - MP4FileHandle hFile, - MP4TrackId trackId ); - -/** Get maximum duration of chunk. - * - * MP4GetTrackDurationPerChunk gets the maximum duration for each chunk. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param duration out value of duration in track timescale units. - * - * return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4GetTrackDurationPerChunk( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Duration* duration ); - -/** Set maximum duration of chunk. - * - * MP4SetTrackDurationPerChunk sets the maximum duration for each chunk. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param duration in timescale units. - * - * @return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4SetTrackDurationPerChunk( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Duration duration ); - -/** - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * - * @return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4AddIPodUUID( - MP4FileHandle hFile, - MP4TrackId trackId ); - -/** @} ***********************************************************************/ - -#endif /* MP4V2_TRACK_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/track_prop.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/track_prop.h deleted file mode 100644 index 37d76431..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/include/mp4v2/track_prop.h +++ /dev/null @@ -1,337 +0,0 @@ -#ifndef MP4V2_TRACK_PROP_H -#define MP4V2_TRACK_PROP_H - -/**************************************************************************//** - * - * @defgroup mp4_track_prop MP4v2 Track Property - * @{ - * - *****************************************************************************/ - -/* specific track properties */ - -MP4V2_EXPORT -bool MP4HaveTrackAtom( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* atomname ); - -/** Get the track type. - * - * MP4GetTrackType gets the type of the track with the specified track id. - * - * Note: the library does not provide a MP4SetTrackType function, the - * track type needs to be specified when the track is created, e.g. - * MP4AddSystemsTrack(MP4_OCI_TRACK_TYPE). - * - * Known track types are: - * @li #MP4_OD_TRACK_TYPE - * @li #MP4_SCENE_TRACK_TYPE - * @li #MP4_AUDIO_TRACK_TYPE - * @li #MP4_VIDEO_TRACK_TYPE - * @li #MP4_HINT_TRACK_TYPE - * @li #MP4_CNTL_TRACK_TYPE - * @li #MP4_TEXT_TRACK_TYPE - * @li #MP4_CLOCK_TRACK_TYPE - * @li #MP4_MPEG7_TRACK_TYPE - * @li #MP4_OCI_TRACK_TYPE - * @li #MP4_IPMP_TRACK_TYPE - * @li #MP4_MPEGJ_TRACK_TYPE - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * - * @return On success, a string indicating track type. On failure, NULL. - */ -MP4V2_EXPORT -const char* MP4GetTrackType( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -const char* MP4GetTrackMediaDataName( - MP4FileHandle hFile, - MP4TrackId trackId ); - -/* - * MP4GetTrackMediaDataOriginalFormat is to be used to get the original - * MediaDataName if a track has been encrypted. - */ - -MP4V2_EXPORT -bool MP4GetTrackMediaDataOriginalFormat( - MP4FileHandle hFile, - MP4TrackId trackId, - char* originalFormat, - uint32_t buflen ); - -MP4V2_EXPORT -MP4Duration MP4GetTrackDuration( - MP4FileHandle hFile, - MP4TrackId trackId ); - -/** Get the time scale of a track. - * - * MP4GetTrackTimeScale returns the time scale of the specified track in - * the mp4 file. The time scale determines the number of clock ticks per - * second for this track. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * - * @return timescale (ticks per second) of the track in the mp4 file. - */ -MP4V2_EXPORT -uint32_t MP4GetTrackTimeScale( - MP4FileHandle hFile, - MP4TrackId trackId ); - -/** Set the time scale of a track. - * - * MP4SetTrackTimeScale sets the time scale of the specified track in the - * mp4 file. The time scale determines the number of clock ticks per - * second for this track. - * - * Typically this value is set once when the track is created. However - * this call can be used to modify the value if that is desired. Since - * track sample durations are expressed in units of the track time scale, - * any change to the time scale value will effect the real time duration - * of the samples. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param timeScale desired time scale for the track. - * - * @return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4SetTrackTimeScale( - MP4FileHandle hFile, - MP4TrackId trackId, - uint32_t value ); - -/** Get ISO-639-2/T language code of a track. - * The language code is a 3-char alpha code consisting of lower-case letters. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param code buffer to hold 3-char+null (4-bytes total). - * - * @return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4GetTrackLanguage( - MP4FileHandle hFile, - MP4TrackId trackId, - char* code ); - -/** Set ISO-639-2/T language code of a track. - * The language code is a 3-char alpha code consisting of lower-case letters. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * @param code 3-char language code. - * - * @return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4SetTrackLanguage( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* code ); - -/** Get track name. - * - * MP4GetTrackName gets the name of the track via udta.name property. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * - * @return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4GetTrackName( - MP4FileHandle hFile, - MP4TrackId trackId, - char** name ); - -/** Set track name. - * - * MP4SetTrackName sets the name of the track via udta.name property. - * The udta atom is created if needed. - * - * @param hFile handle of file for operation. - * @param trackId id of track for operation. - * - * @return true on success, false on failure. - */ -MP4V2_EXPORT -bool MP4SetTrackName( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* name ); - -MP4V2_EXPORT -uint8_t MP4GetTrackAudioMpeg4Type( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -uint8_t MP4GetTrackEsdsObjectTypeId( - MP4FileHandle hFile, - MP4TrackId trackId ); - -/* returns MP4_INVALID_DURATION if track samples do not have a fixed duration */ -MP4V2_EXPORT -MP4Duration MP4GetTrackFixedSampleDuration( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -uint32_t MP4GetTrackBitRate( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -bool MP4GetTrackVideoMetadata( - MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t** ppConfig, - uint32_t* pConfigSize ); - -MP4V2_EXPORT -bool MP4GetTrackESConfiguration( - MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t** ppConfig, - uint32_t* pConfigSize ); - -MP4V2_EXPORT -bool MP4SetTrackESConfiguration( - MP4FileHandle hFile, - MP4TrackId trackId, - const uint8_t* pConfig, - uint32_t configSize ); - -/* h264 information routines */ -MP4V2_EXPORT -bool MP4GetTrackH264ProfileLevel( - MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t* pProfile, - uint8_t* pLevel ); - -MP4V2_EXPORT -bool MP4GetTrackH264SeqPictHeaders( - MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t*** pSeqHeaders, - uint32_t** pSeqHeaderSize, - uint8_t*** pPictHeader, - uint32_t** pPictHeaderSize ); - -MP4V2_EXPORT -bool MP4GetTrackH264LengthSize( - MP4FileHandle hFile, - MP4TrackId trackId, - uint32_t* pLength ); - -MP4V2_EXPORT -MP4SampleId MP4GetTrackNumberOfSamples( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -uint16_t MP4GetTrackVideoWidth( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -uint16_t MP4GetTrackVideoHeight( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -double MP4GetTrackVideoFrameRate( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -int MP4GetTrackAudioChannels( - MP4FileHandle hFile, - MP4TrackId trackId ); - -MP4V2_EXPORT -bool MP4IsIsmaCrypMediaTrack( - MP4FileHandle hFile, - MP4TrackId trackId ); - -/* generic track properties */ - -MP4V2_EXPORT -bool MP4HaveTrackAtom( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* atomName ); - -MP4V2_EXPORT -bool MP4GetTrackIntegerProperty( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* propName, - uint64_t* retvalue ); - -MP4V2_EXPORT -bool MP4GetTrackFloatProperty( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* propName, - float* ret_value ); - -MP4V2_EXPORT -bool MP4GetTrackStringProperty( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* propName, - const char** retvalue ); - -MP4V2_EXPORT -bool MP4GetTrackBytesProperty( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* propName, - uint8_t** ppValue, - uint32_t* pValueSize ); - -MP4V2_EXPORT -bool MP4SetTrackIntegerProperty( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* propName, - int64_t value ); - -MP4V2_EXPORT -bool MP4SetTrackFloatProperty( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* propName, - float value ); - -MP4V2_EXPORT -bool MP4SetTrackStringProperty( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* propName, - const char* value ); - -MP4V2_EXPORT -bool MP4SetTrackBytesProperty( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* propName, - const uint8_t* pValue, - uint32_t valueSize); - -/** @} ***********************************************************************/ - -#endif /* MP4V2_TRACK_PROP_H */ diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/config.h.in b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/config.h.in deleted file mode 100644 index 47a5a043..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/config.h.in +++ /dev/null @@ -1,65 +0,0 @@ -/* libplatform/config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Define to 1 if LFS should be activated */ -#undef NEED_LFS_ACTIVATION - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/endian.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/endian.h deleted file mode 100644 index 83fe69e0..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/endian.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef MP4V2_PLATFORM_ENDIAN_H -#define MP4V2_PLATFORM_ENDIAN_H - -/////////////////////////////////////////////////////////////////////////////// - -#define MP4V2_BYTESWAP_16(x) \ - mp4v2::platform::uint16_t( ((mp4v2::platform::uint16_t(x) & 0xff00U) >> 8) \ - | ((mp4v2::platform::uint16_t(x) & 0x00ffU) << 8) ) - -#define MP4V2_BYTESWAP_32(x) \ - mp4v2::platform::uint32_t( ((mp4v2::platform::uint32_t(x) & 0xff000000U) >> 24) \ - | ((mp4v2::platform::uint32_t(x) & 0x00ff0000U) >> 8) \ - | ((mp4v2::platform::uint32_t(x) & 0x0000ff00U) << 8) \ - | ((mp4v2::platform::uint32_t(x) & 0x000000ffU) << 24) ) - -#define MP4V2_BYTESWAP_64(x) \ - mp4v2::platform::uint64_t( ((mp4v2::platform::uint64_t(x) & 0xff00000000000000ULL) >> 56) \ - | ((mp4v2::platform::uint64_t(x) & 0x00ff000000000000ULL) >> 40) \ - | ((mp4v2::platform::uint64_t(x) & 0x0000ff0000000000ULL) >> 24) \ - | ((mp4v2::platform::uint64_t(x) & 0x000000ff00000000ULL) >> 8) \ - | ((mp4v2::platform::uint64_t(x) & 0x00000000ff000000ULL) << 8) \ - | ((mp4v2::platform::uint64_t(x) & 0x0000000000ff0000ULL) << 24) \ - | ((mp4v2::platform::uint64_t(x) & 0x000000000000ff00ULL) << 40) \ - | ((mp4v2::platform::uint64_t(x) & 0x00000000000000ffULL) << 56) ) - -/////////////////////////////////////////////////////////////////////////////// - -#if defined( __BIG_ENDIAN__ ) -# define MP4V2_HTONS(x) (x) -# define MP4V2_HTONL(x) (x) -# define MP4V2_NTOHS(x) (x) -# define MP4V2_NTOHL(x) (x) -#else -# define MP4V2_HTONS(x) MP4V2_BYTESWAP_16(x) -# define MP4V2_HTONL(x) MP4V2_BYTESWAP_32(x) -# define MP4V2_NTOHS(x) MP4V2_BYTESWAP_16(x) -# define MP4V2_NTOHL(x) MP4V2_BYTESWAP_32(x) -#endif - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_PLATFORM_ENDIAN_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/impl.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/impl.h deleted file mode 100644 index 6c0068ce..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/impl.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef MP4V2_PLATFORM_IMPL_H -#define MP4V2_PLATFORM_IMPL_H - -/////////////////////////////////////////////////////////////////////////////// - -#include "libplatform/platform.h" -#if defined _WIN32 -#include "libplatform/platform_win32_impl.h" -#endif - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_PLATFORM_IMPL_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File.cpp deleted file mode 100644 index 893f98c0..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File.cpp +++ /dev/null @@ -1,185 +0,0 @@ -#include "libplatform/impl.h" - -namespace mp4v2 { namespace platform { namespace io { - -/////////////////////////////////////////////////////////////////////////////// - -namespace { - const File::Size __maxChunkSize = 1024*1024; -} - -/////////////////////////////////////////////////////////////////////////////// - -File::File( std::string name_, Mode mode_, FileProvider* provider_ ) - : _name ( name_ ) - , _isOpen ( false ) - , _mode ( mode_ ) - , _size ( 0 ) - , _position ( 0 ) - , _provider ( provider_ ? *provider_ : standard() ) - , name ( _name ) - , isOpen ( _isOpen ) - , mode ( _mode ) - , size ( _size ) - , position ( _position ) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -File::~File() -{ - close(); - delete &_provider; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -File::setMode( Mode mode_ ) -{ - _mode = mode_; -} - -void -File::setName( const std::string& name_ ) -{ - _name = name_; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -File::open( std::string name_, Mode mode_ ) -{ - if( _isOpen ) - return true; - - if( !name_.empty() ) - setName( name_ ); - if( mode_ != MODE_UNDEFINED ) - setMode( mode_ ); - - if( _provider.open( _name, _mode )) - return true; - - FileSystem::getFileSize( _name, _size ); - - _isOpen = true; - return false; -} - -bool -File::seek( Size pos ) -{ - if( !_isOpen ) - return true; - - if( _provider.seek( pos )) - return true; - _position = pos; - return false; -} - -bool -File::read( void* buffer, Size size, Size& nin, Size maxChunkSize ) -{ - nin = 0; - - if( !_isOpen ) - return true; - - if( _provider.read( buffer, size, nin, maxChunkSize )) - return true; - - _position += nin; - if( _position > _size ) - _size = _position; - - return false; -} - -bool -File::write( const void* buffer, Size size, Size& nout, Size maxChunkSize ) -{ - nout = 0; - - if( !_isOpen ) - return true; - - if( _provider.write( buffer, size, nout, maxChunkSize )) - return true; - - _position += nout; - if( _position > _size ) - _size = _position; - - return false; -} - -bool -File::close() -{ - if( !_isOpen ) - return false; - if( _provider.close() ) - return true; - - _isOpen = false; - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -CustomFileProvider::CustomFileProvider( const MP4FileProvider& provider ) - : _handle( NULL ) -{ - memcpy( &_call, &provider, sizeof(MP4FileProvider) ); -} - -bool -CustomFileProvider::open( std::string name, Mode mode ) -{ - MP4FileMode fm; - switch( mode ) { - case MODE_READ: fm = FILEMODE_READ; break; - case MODE_MODIFY: fm = FILEMODE_MODIFY; break; - case MODE_CREATE: fm = FILEMODE_CREATE; break; - - case MODE_UNDEFINED: - default: - fm = FILEMODE_UNDEFINED; - break; - } - - _handle = _call.open( name.c_str(), fm ); - return _handle == NULL; -} - -bool -CustomFileProvider::seek( Size pos ) -{ - return _call.seek( _handle, pos ); -} - -bool -CustomFileProvider::read( void* buffer, Size size, Size& nin, Size maxChunkSize ) -{ - return _call.read( _handle, buffer, size, &nin, maxChunkSize ); -} - -bool -CustomFileProvider::write( const void* buffer, Size size, Size& nout, Size maxChunkSize ) -{ - return _call.write( _handle, buffer, size, &nout, maxChunkSize ); -} - -bool -CustomFileProvider::close() -{ - return _call.close( _handle ); -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::io diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File.h deleted file mode 100644 index 67bb2b6d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File.h +++ /dev/null @@ -1,208 +0,0 @@ -#ifndef MP4V2_PLATFORM_IO_FILE_H -#define MP4V2_PLATFORM_IO_FILE_H - -namespace mp4v2 { namespace platform { namespace io { - -/////////////////////////////////////////////////////////////////////////////// - -class MP4V2_EXPORT FileProvider -{ -public: - static FileProvider& standard(); - -public: - //! file operation mode flags - enum Mode { - MODE_UNDEFINED, //!< undefined - MODE_READ, //!< file may be read - MODE_MODIFY, //!< file may be read/written - MODE_CREATE, //!< file will be created/truncated for read/write - }; - - //! type used to represent all file sizes and offsets - typedef int64_t Size; - -public: - virtual ~FileProvider() { } - - virtual bool open( std::string name, Mode mode ) = 0; - virtual bool seek( Size pos ) = 0; - virtual bool read( void* buffer, Size size, Size& nin, Size maxChunkSize ) = 0; - virtual bool write( const void* buffer, Size size, Size& nout, Size maxChunkSize ) = 0; - virtual bool close() = 0; - -protected: - FileProvider() { } -}; - -/////////////////////////////////////////////////////////////////////////////// -/// -/// File implementation. -/// -/// File objects model real filesystem files in a 1:1 releationship and always -/// treated as binary; there are no translations of text content performed. -/// -/// The interface represents all sizes with a signed 64-bit value, thus -/// the limit to this interface is 63-bits of size, roughly 9.22 million TB. -/// -/////////////////////////////////////////////////////////////////////////////// - -class MP4V2_EXPORT File : public FileProvider -{ -public: - /////////////////////////////////////////////////////////////////////////// - //! - //! Constructor. - //! - //! A new file object is constructed but not opened. - //! - //! @param name filename of file object, or empty-string. - //! On Windows, this should be a UTF-8 encoded string. - //! On other platforms, it should be an 8-bit encoding that is - //! appropriate for the platform, locale, file system, etc. - //! (prefer to use UTF-8 when possible). - //! @param mode bitmask specifying mode flags. - //! See #Mode for bit constants. - //! @param provider a fileprovider instance. If NULL a standard file - //! provider will be used otherwise the supplied provider must be - //! new-allocated and will be delete'd via ~File(). - //! - /////////////////////////////////////////////////////////////////////////// - - explicit File( std::string name = "", Mode mode = MODE_UNDEFINED, FileProvider* = NULL ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Destructor. - //! - //! File object is destroyed. If the file is opened it is closed prior - //! to destruction. - //! - /////////////////////////////////////////////////////////////////////////// - - ~File(); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Open file. - //! - //! @param name filename of file object, or empty-string to use #name. - //! On Windows, this should be a UTF-8 encoded string. - //! On other platforms, it should be an 8-bit encoding that is - //! appropriate for the platform, locale, file system, etc. - //! (prefer to use UTF-8 when possible). - //! - //! @return true on failure, false on success. - //! - /////////////////////////////////////////////////////////////////////////// - - bool open( std::string name = "", Mode mode = MODE_UNDEFINED ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Closes file. - //! - //! If the file has not been opened or is not considered the - //! owner of a filehandle, no action is taken. - //! - //! @return true on failure, false on success. - //! - /////////////////////////////////////////////////////////////////////////// - - bool close(); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Set current file position in bytes. - //! - //! @param pos new file position in bytes. - //! - //! @return true on failure, false on success. - //! - /////////////////////////////////////////////////////////////////////////// - - bool seek( Size pos ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Binary stream read. - //! - //! The function reads up to a maximum size bytes from file, - //! storing them in buffer. The number of bytes actually read are - //! returned in nin. - //! - //! @param buffer storage for data read from file. - //! @param size maximum number of bytes to read from file. - //! @param nin output indicating number of bytes read from file. - //! @param maxChunkSize maximum chunk size for reads issued to operating - //! system or 0 for default. - //! - //! @return true on failure, false on success. - //! - /////////////////////////////////////////////////////////////////////////// - - bool read( void* buffer, Size size, Size& nin, Size maxChunkSize = 0 ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Binary stream write. - //! - //! The function writes up to a maximum size bytes from - //! buffer to file. The number of bytes actually written are - //! returned in nout. - //! - //! @param buffer data to be written out to file. - //! @param size maximum number of bytes to read from file. - //! @param nout output indicating number of bytes written to file. - //! @param maxChunkSize maximum chunk size for writes issued to operating - //! system or 0 for default. - //! - //! @return true on failure, false on success. - //! - /////////////////////////////////////////////////////////////////////////// - - bool write( const void* buffer, Size size, Size& nout, Size maxChunkSize = 0 ); - -private: - std::string _name; - bool _isOpen; - Mode _mode; - Size _size; - Size _position; - FileProvider& _provider; - -public: - const std::string& name; //!< read-only: file pathname or empty-string if not applicable - const bool& isOpen; //!< read-only: true if file is open - const Mode& mode; //!< read-only: file mode - const Size& size; //!< read-only: file size - const Size& position; //!< read-only: file position - -public: - void setName( const std::string& name ); - void setMode( Mode mode ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -class CustomFileProvider : public FileProvider -{ -public: - CustomFileProvider( const MP4FileProvider& ); - - bool open( std::string name, Mode mode ); - bool seek( Size pos ); - bool read( void* buffer, Size size, Size& nin, Size maxChunkSize ); - bool write( const void* buffer, Size size, Size& nout, Size maxChunkSize ); - bool close(); - -private: - MP4FileProvider _call; - void* _handle; -}; - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::io - -#endif // MP4V2_PLATFORM_IO_FILE_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem.cpp deleted file mode 100644 index 073b0261..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem.cpp +++ /dev/null @@ -1,103 +0,0 @@ -#include "libplatform/impl.h" - -namespace mp4v2 { namespace platform { namespace io { - -/////////////////////////////////////////////////////////////////////////////// - -void -FileSystem::pathnameCleanup( string& name ) -{ - string bad; - - // fold repeating directory separators - bad = DIR_SEPARATOR; - bad += DIR_SEPARATOR; - for( string::size_type pos = name.find( bad ); - pos != string::npos; - pos = name.find( bad, pos ) ) - { - name.replace( pos, bad.length(), DIR_SEPARATOR ); - } - - // replace occurances of /./ with / - bad = DIR_SEPARATOR; - bad += '.'; - bad += DIR_SEPARATOR; - for( string::size_type pos = name.find( bad ); - pos != string::npos; - pos = name.find( bad, pos ) ) - { - name.replace( pos, bad.length(), DIR_SEPARATOR ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -FileSystem::pathnameOnlyExtension( string& name ) -{ - // compute basename - string::size_type dot_pos = name.rfind( '.' ); - string::size_type slash_pos = name.rfind( DIR_SEPARATOR ); - - // dot_pos must be after slash_pos - if( slash_pos != string::npos && dot_pos < slash_pos ) - dot_pos = string::npos; - - // return empty-string if no dot - if( dot_pos == string::npos ) { - name.resize( 0 ); - return; - } - - name = name.substr( dot_pos + 1 ); - pathnameCleanup( name ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -FileSystem::pathnameStripExtension( string& name ) -{ - pathnameCleanup( name ); - - // compute basename - string::size_type dot_pos = name.rfind( '.' ); - string::size_type slash_pos = name.rfind( DIR_SEPARATOR ); - - // dot_pos must be after slash_pos - if( slash_pos != string::npos && dot_pos < slash_pos ) - dot_pos = string::npos; - - // chop extension - if( dot_pos != string::npos ) - name.resize( dot_pos ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -FileSystem::pathnameTemp( string& name, string dir, string prefix, string suffix ) -{ - ostringstream buf; - - if( !dir.empty() ) { - buf << dir; - - // add dir separator if needed - // TODO there's a platform specific bug here, if someone passes in a pathname ending - // in '\', which would be legitimate on Windows. - if( dir[dir.length()-1] != '/' ) - buf << '/'; - } - - buf << prefix; - buf << setfill('0') << setw(8) << number::random32(); - buf << suffix; - - name = buf.str(); -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::io diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem.h deleted file mode 100644 index b348752a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem.h +++ /dev/null @@ -1,215 +0,0 @@ -#ifndef MP4V2_PLATFORM_IO_FILESYSTEM_H -#define MP4V2_PLATFORM_IO_FILESYSTEM_H - -namespace mp4v2 { namespace platform { namespace io { - -/////////////////////////////////////////////////////////////////////////////// -/// -/// General file-system abstraction. -/// -/// FileSystem abstracts operations on files and directories. -/// -/////////////////////////////////////////////////////////////////////////////// -class MP4V2_EXPORT FileSystem -{ -public: - static string DIR_SEPARATOR; //!< separator string used in file pathnames - static string PATH_SEPARATOR; //!< separator string used in search-paths - - /////////////////////////////////////////////////////////////////////////// - //! - //! Query file presence. - //! Check if name exists. - //! @param name filename to query. - //! On Windows, this should be a UTF-8 encoded string. - //! On other platforms, it should be an 8-bit encoding that is - //! appropriate for the platform, locale, file system, etc. - //! (prefer to use UTF-8 when possible). - //! @return true if present, false otherwise. - //! - /////////////////////////////////////////////////////////////////////////// - - static bool exists( std::string name ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Query directory type. - //! Check if name exists and is a directory. - //! @param name pathname to query. - //! On Windows, this should be a UTF-8 encoded string. - //! On other platforms, it should be an 8-bit encoding that is - //! appropriate for the platform, locale, file system, etc. - //! (prefer to use UTF-8 when possible). - //! @return true if directory, false otherwise. - //! - /////////////////////////////////////////////////////////////////////////// - - static bool isDirectory( std::string name ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Query file type. - //! Check if name exists and is a file. - //! On Windows, this should be a UTF-8 encoded string. - //! On other platforms, it should be an 8-bit encoding that is - //! appropriate for the platform, locale, file system, etc. - //! (prefer to use UTF-8 when possible). - //! @param name filename to query. - //! @return true if file, false otherwise. - //! - /////////////////////////////////////////////////////////////////////////// - - static bool isFile( std::string name ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Query file size. - //! Check if name exists and is a file. - //! @param name filename to query. - //! On Windows, this should be a UTF-8 encoded string. - //! On other platforms, it should be an 8-bit encoding that is - //! appropriate for the platform, locale, file system, etc. - //! (prefer to use UTF-8 when possible). - //! @param size output indicating file size in bytes. - //! @return true on failure, false on success. - //! - /////////////////////////////////////////////////////////////////////////// - - static bool getFileSize( std::string name, File::Size& size ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Rename file or directory. - //! - //! Rename oldname to newname. - //! If newname exists, it is first removed. - //! Both oldname and newname must be of the same type; - //! that is, both must be either files or directories and must reside on - //! the same filesystem. - //! - //! @param oldname existing pathname to rename. - //! On Windows, this should be a UTF-8 encoded string. - //! On other platforms, it should be an 8-bit encoding that is - //! appropriate for the platform, locale, file system, etc. - //! (prefer to use UTF-8 when possible). - //! @param newname new pathname. - //! On Windows, this should be a UTF-8 encoded string. - //! On other platforms, it should be an 8-bit encoding that is - //! appropriate for the platform, locale, file system, etc. - //! (prefer to use UTF-8 when possible). - //! - //! @return true on failure, false on success. - //! - /////////////////////////////////////////////////////////////////////////// - - static bool rename( std::string oldname, std::string newname ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Generate temporary pathname. - //! - //! @param name output containing generated pathname. - //! @param dir relative or absolute directory of pathname. - //! @param prefix text prepended to base pathname. - //! @param suffix text appended to base pathname. - //! - /////////////////////////////////////////////////////////////////////////// - - static void pathnameTemp( string& name, string dir = ".", string prefix = "tmp", string suffix = "" ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Cleanup pathname. - //! - //! Redundant (repeating) directory-separators are folded into a single - //! directory-separator. - //! - //! Redundant /./ are folded into a single directory-separator. - //! - //! @param name pathname to modify. - //! - /////////////////////////////////////////////////////////////////////////// - - static void pathnameCleanup( string& name ); - -#if 0 -TODO-KB: implement - /////////////////////////////////////////////////////////////////////////// - //! - //! Remove everything after the last directory component. - //! - //! A pathname cleanup is always performed. See pathnameCleanup(). - //! If no directory component is present then "." is assumed. - //! - //! @param name pathname to modify. - //! @param trailing when true all results are suffixed with exactly one - //! directory-separator, otherwise the result is guaranteed to not - //! end in a directory-separator. - //! - /////////////////////////////////////////////////////////////////////////// - static void pathnameOnlyDirectory( string& name, bool trailing = true ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Remove everything except the file component of pathname. - //! - //! A pathname cleanup is always performed. See pathnameCleanup(). - //! If no file component exists then an empty-string is output. - //! A file component may include an extension. - //! - //! @param name pathname to modify. - //! - /////////////////////////////////////////////////////////////////////////// - static void pathnameOnlyFile( string& name ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Remove everything except file basename. - //! - //! A pathname cleanup is always performed. See pathnameCleanup(). - //! A basename is considered to be everything before the last '.' - //! in the file component of a pathname. - //! If no file extension exists then an empty-string is output. - //! - //! @param name pathname to modify. - //! - /////////////////////////////////////////////////////////////////////////// - static void pathnameOnlyBasename( string& name ); -#endif - - /////////////////////////////////////////////////////////////////////////// - //! - //! Remove everything except file extension. - //! - //! A pathname cleanup is always performed. See pathnameCleanup(). - //! A file extension is considered to everything after - //! the last '.' in the file component of a pathname. - //! If no file extension exists then an empty-string is output. - //! - //! @param name pathname to modify. - //! - /////////////////////////////////////////////////////////////////////////// - - static void pathnameOnlyExtension( string& name ); - - /////////////////////////////////////////////////////////////////////////// - //! - //! Remove file extension from pathname. - //! - //! A pathname cleanup is always performed. See pathnameCleanup(). - //! A file extension is considered to everything after - //! the last '.' in the file component of a pathname. - //! The last '.' is also removed. - //! - //! @param name pathname to modify. - //! - /////////////////////////////////////////////////////////////////////////// - - static void pathnameStripExtension( string& name ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::io - -#endif // MP4V2_PLATFORM_IO_FILESYSTEM_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem_posix.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem_posix.cpp deleted file mode 100644 index 46cf9337..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem_posix.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "libplatform/impl.h" -#include - -namespace mp4v2 { namespace platform { namespace io { - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileSystem::exists( string path_ ) -{ - struct stat buf; - return stat( path_.c_str(), &buf ) == 0; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileSystem::isDirectory( string path_ ) -{ - struct stat buf; - if( stat( path_.c_str(), &buf )) - return false; - return S_ISDIR( buf.st_mode ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileSystem::isFile( string path_ ) -{ - struct stat buf; - if( stat( path_.c_str(), &buf )) - return false; - return S_ISREG( buf.st_mode ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileSystem::getFileSize( string path_, File::Size& size_ ) -{ - size_ = 0; - struct stat buf; - if( stat( path_.c_str(), &buf )) - return true; - size_ = buf.st_size; - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileSystem::rename( string from, string to ) -{ - return ::rename( from.c_str(), to.c_str() ) != 0; -} - -/////////////////////////////////////////////////////////////////////////////// - -string FileSystem::DIR_SEPARATOR = "/"; -string FileSystem::PATH_SEPARATOR = ":"; - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::io diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem_win32.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem_win32.cpp deleted file mode 100644 index 4a213819..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/FileSystem_win32.cpp +++ /dev/null @@ -1,146 +0,0 @@ -#include "src/impl.h" -#include "libplatform/impl.h" /* for platform_win32_impl.h which declares Utf8ToFilename */ -#include - -namespace mp4v2 { - using namespace impl; -} - -namespace mp4v2 { namespace platform { namespace io { - -/////////////////////////////////////////////////////////////////////////////// - -static DWORD getAttributes ( string path_ ); - -/** - * Call GetFileAttributesW throw exceptions for errors - * - * @param path_ the path to get attributes for - * - * @retval INVALID_FILE_ATTRIBUTES @p path_ doesn't exist - * @retval anything else the attributes of @p path_ - */ -static DWORD -getAttributes ( string path_ ) -{ - win32::Utf8ToFilename filename(path_); - - if (!filename.IsUTF16Valid()) - { - // throw an exception to avoid changing the - // signature of this function and dealing with all - // the places it's called. - ostringstream msg; - msg << "can't convert file to UTF-16(" << filename.utf8 << ")"; - throw new Exception(msg.str(),__FILE__,__LINE__,__FUNCTION__); - } - - DWORD attributes = ::GetFileAttributesW(filename); - if( attributes == INVALID_FILE_ATTRIBUTES ) - { - DWORD last_err = GetLastError(); - - // Distinguish between an error and the path not existing - if ((last_err == ERROR_FILE_NOT_FOUND) || (last_err == ERROR_PATH_NOT_FOUND)) - { - return attributes; - } - - // Anything else is an error - ostringstream msg; - msg << "GetFileAttributes(" << filename.utf8 << ") failed (" << last_err << ")"; - throw new Exception(msg.str(),__FILE__,__LINE__,__FUNCTION__); - } - - // path exists so return its attributes - return attributes; -} - -bool -FileSystem::exists( string path_ ) -{ - return( getAttributes(path_) != INVALID_FILE_ATTRIBUTES ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileSystem::isDirectory( string path_ ) -{ - DWORD attributes = getAttributes( path_ ); - if( attributes == INVALID_FILE_ATTRIBUTES ) - return false; - - return ( ( attributes & FILE_ATTRIBUTE_DIRECTORY ) == FILE_ATTRIBUTE_DIRECTORY ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileSystem::isFile( string path_ ) -{ - DWORD attributes = getAttributes( path_ ); - if( attributes == INVALID_FILE_ATTRIBUTES ) - return false; - - return ( ( attributes & FILE_ATTRIBUTE_DIRECTORY ) != FILE_ATTRIBUTE_DIRECTORY ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileSystem::getFileSize( string path_, File::Size& size_ ) -{ - win32::Utf8ToFilename filename(path_); - - if (!filename.IsUTF16Valid()) - { - // The logging is done - return true; - } - - size_ = 0; - WIN32_FILE_ATTRIBUTE_DATA data = {0}; - if( !GetFileAttributesExW( filename, GetFileExInfoStandard, (LPVOID)&data ) ) - { - log.errorf("%s: GetFileAttributesExW(%s) failed (%d)",__FUNCTION__,filename.utf8.c_str(), - GetLastError()); - return true; - } - - size_ = ( (File::Size)data.nFileSizeHigh << 32 ) | data.nFileSizeLow; - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileSystem::rename( string from, string to ) -{ - win32::Utf8ToFilename from_file(from); - win32::Utf8ToFilename to_file(to); - - if (!from_file.IsUTF16Valid() || !to_file.IsUTF16Valid()) - { - return true; - } - - if (!::MoveFileExW( from_file, to_file, - MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH ) ) - { - log.errorf("%s: MoveFileExW(%s,%s) failed (%d)",__FUNCTION__,from_file.utf8.c_str(),to_file.utf8.c_str(), - GetLastError()); - return true; - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -string FileSystem::DIR_SEPARATOR = "\\"; -string FileSystem::PATH_SEPARATOR = ";"; - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::io diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File_posix.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File_posix.cpp deleted file mode 100644 index b6fb214a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File_posix.cpp +++ /dev/null @@ -1,109 +0,0 @@ -#include "libplatform/impl.h" - -namespace mp4v2 { namespace platform { namespace io { - -/////////////////////////////////////////////////////////////////////////////// - -class StandardFileProvider : public FileProvider -{ -public: - StandardFileProvider(); - - bool open( std::string name, Mode mode ); - bool seek( Size pos ); - bool read( void* buffer, Size size, Size& nin, Size maxChunkSize ); - bool write( const void* buffer, Size size, Size& nout, Size maxChunkSize ); - bool close(); - -private: - bool _seekg; - bool _seekp; - std::fstream _fstream; -}; - -/////////////////////////////////////////////////////////////////////////////// - -StandardFileProvider::StandardFileProvider() - : _seekg ( false ) - , _seekp ( false ) -{ -} - -bool -StandardFileProvider::open( std::string name, Mode mode ) -{ - ios::openmode om = ios::binary; - switch( mode ) { - case MODE_UNDEFINED: - case MODE_READ: - default: - om |= ios::in; - _seekg = true; - _seekp = false; - break; - - case MODE_MODIFY: - om |= ios::in | ios::out; - _seekg = true; - _seekp = true; - break; - - case MODE_CREATE: - om |= ios::in | ios::out | ios::trunc; - _seekg = true; - _seekp = true; - break; - } - - _fstream.open( name.c_str(), om ); - return _fstream.fail(); -} - -bool -StandardFileProvider::seek( Size pos ) -{ - if( _seekg ) - _fstream.seekg( pos, ios::beg ); - if( _seekp ) - _fstream.seekp( pos, ios::beg ); - return _fstream.fail(); -} - -bool -StandardFileProvider::read( void* buffer, Size size, Size& nin, Size maxChunkSize ) -{ - _fstream.read( (char*)buffer, size ); - if( _fstream.fail() ) - return true; - nin = _fstream.gcount(); - return false; -} - -bool -StandardFileProvider::write( const void* buffer, Size size, Size& nout, Size maxChunkSize ) -{ - _fstream.write( (const char*)buffer, size ); - if( _fstream.fail() ) - return true; - nout = size; - return false; -} - -bool -StandardFileProvider::close() -{ - _fstream.close(); - return _fstream.fail(); -} - -/////////////////////////////////////////////////////////////////////////////// - -FileProvider& -FileProvider::standard() -{ - return *new StandardFileProvider(); -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::io diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File_win32.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File_win32.cpp deleted file mode 100644 index d9101ea3..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/io/File_win32.cpp +++ /dev/null @@ -1,258 +0,0 @@ -#include "src/impl.h" -#include "libplatform/impl.h" /* for platform_win32_impl.h which declares Utf8ToFilename */ -#include - -namespace mp4v2 { - using namespace impl; -} - -/** - * Set this to 1 to compile in extra debugging - */ -#define EXTRA_DEBUG 0 - -/** - * @def LOG_PRINTF - * - * call log.printf if EXTRA_DEBUG is defined to 1. Do - * nothing otherwise - */ -#if EXTRA_DEBUG -#define LOG_PRINTF(X) log.printf X -#else -#define LOG_PRINTF(X) -#endif - -namespace mp4v2 { namespace platform { namespace io { - -/////////////////////////////////////////////////////////////////////////////// - -class StandardFileProvider : public FileProvider -{ -public: - StandardFileProvider(); - - bool open( std::string name, Mode mode ); - bool seek( Size pos ); - bool read( void* buffer, Size size, Size& nin, Size maxChunkSize ); - bool write( const void* buffer, Size size, Size& nout, Size maxChunkSize ); - bool close(); - -private: - HANDLE _handle; - - /** - * The UTF-8 encoded file name - */ - std::string _name; -}; - -/////////////////////////////////////////////////////////////////////////////// - -StandardFileProvider::StandardFileProvider() - : _handle( INVALID_HANDLE_VALUE ) -{ -} - -/** - * Open a file - * - * @param name the name of a file to open - * @param mode the mode to open @p name - * - * @retval false successfully opened @p name - * @retval true error opening @p name - */ -bool -StandardFileProvider::open( std::string name, Mode mode ) -{ - DWORD access = 0; - DWORD share = 0; - DWORD crdisp = 0; - DWORD flags = FILE_ATTRIBUTE_NORMAL; - - switch( mode ) { - case MODE_UNDEFINED: - case MODE_READ: - default: - access |= GENERIC_READ; - share |= FILE_SHARE_READ; - crdisp |= OPEN_EXISTING; - break; - - case MODE_MODIFY: - access |= GENERIC_READ | GENERIC_WRITE; - share |= FILE_SHARE_READ; - crdisp |= OPEN_EXISTING; - break; - - case MODE_CREATE: - access |= GENERIC_READ | GENERIC_WRITE; - share |= FILE_SHARE_READ; - crdisp |= CREATE_ALWAYS; - break; - } - - win32::Utf8ToFilename filename(name); - - if (!filename.IsUTF16Valid()) - { - // The logging is done - return true; - } - - ASSERT(LPCWSTR(filename)); - _handle = CreateFileW( filename, access, share, NULL, crdisp, flags, NULL ); - if (_handle == INVALID_HANDLE_VALUE) - { - log.errorf("%s: CreateFileW(%s) failed (%d)",__FUNCTION__,filename.utf8.c_str(),GetLastError()); - return true; - } - - /* - ** Make a copy of the name for future log messages, etc. - */ - log.verbose2f("%s: CreateFileW(%s) succeeded",__FUNCTION__,filename.utf8.c_str()); - - _name = filename.utf8; - return false; -} - -/** - * Seek to an offset in the file - * - * @param pos the offset from the beginning of the file to - * seek to - * - * @retval false successfully seeked to @p pos - * @retval true error seeking to @p pos - */ -bool -StandardFileProvider::seek( Size pos ) -{ - LARGE_INTEGER n; - - ASSERT(_handle != INVALID_HANDLE_VALUE); - - n.QuadPart = pos; - if (!SetFilePointerEx( _handle, n, NULL, FILE_BEGIN )) - { - log.errorf("%s: SetFilePointerEx(%s,%" PRId64 ") failed (%d)",__FUNCTION__,_name.c_str(), - pos,GetLastError()); - return true; - } - - return false; -} - -/** - * Read from the file - * - * @param buffer populated with at most @p size bytes from - * the file - * - * @param size the maximum number of bytes to read - * - * @param nin the - * - * @retval false successfully read from the file - * @retval true error reading from the file - */ -bool -StandardFileProvider::read( void* buffer, Size size, Size& nin, Size maxChunkSize ) -{ - DWORD nread = 0; - - ASSERT(_handle != INVALID_HANDLE_VALUE); - - // ReadFile takes a DWORD for number of bytes to read so - // make sure we're not asking for more than fits. - // MAXDWORD from WinNT.h. - ASSERT(size <= MAXDWORD); - if( ReadFile( _handle, buffer, (DWORD)(size & MAXDWORD), &nread, NULL ) == 0 ) - { - log.errorf("%s: ReadFile(%s,%d) failed (%d)",__FUNCTION__,_name.c_str(), - (DWORD)(size & MAXDWORD),GetLastError()); - return true; - } - LOG_PRINTF((MP4_LOG_VERBOSE3,"%s: ReadFile(%s,%d) succeeded: read %d byte(s)",__FUNCTION__, - _name.c_str(),(DWORD)(size & MAXDWORD),nread)); - nin = nread; - return false; -} - -/** - * Write to the file - * - * @param buffer the data to write - * - * @param size the number of bytes of @p buffer to write - * - * @param nout populated with the number of bytes actually - * written if the function succeeds - * - * @retval false successfully wrote to the file - * @retval true error writing to the file - */ -bool -StandardFileProvider::write( const void* buffer, Size size, Size& nout, Size maxChunkSize ) -{ - DWORD nwrote = 0; - - ASSERT(_handle != INVALID_HANDLE_VALUE); - - // ReadFile takes a DWORD for number of bytes to read so - // make sure we're not asking for more than fits. - // MAXDWORD from WinNT.h. - ASSERT(size <= MAXDWORD); - if( WriteFile( _handle, buffer, (DWORD)(size & MAXDWORD), &nwrote, NULL ) == 0 ) - { - log.errorf("%s: WriteFile(%s,%d) failed (%d)",__FUNCTION__,_name.c_str(), - (DWORD)(size & MAXDWORD),GetLastError()); - return true; - } - log.verbose2f("%s: WriteFile(%s,%d) succeeded: wrote %d byte(s)",__FUNCTION__, - _name.c_str(),(DWORD)(size & MAXDWORD),nwrote); - nout = nwrote; - return false; -} - -/** - * Close the file - * - * @retval false successfully closed the file - * @retval true error closing the file - */ -bool -StandardFileProvider::close() -{ - BOOL retval; - - retval = CloseHandle( _handle ); - if (!retval) - { - log.errorf("%s: CloseHandle(%s) failed (%d)",__FUNCTION__, - _name.c_str(),GetLastError()); - } - - // Whether we succeeded or not, clear the handle and - // forget the name - _handle = INVALID_HANDLE_VALUE; - _name.clear(); - - // CloseHandle return 0/false to indicate failure, but - // we return 0/false to indicate success, so negate. - return !retval; -} - -/////////////////////////////////////////////////////////////////////////////// - -FileProvider& -FileProvider::standard() -{ - return *new StandardFileProvider(); -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::io diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random.h deleted file mode 100644 index 9d0f105b..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MP4V2_PLATFORM_NUMBER_RANDOM_H -#define MP4V2_PLATFORM_NUMBER_RANDOM_H - -namespace mp4v2 { namespace platform { namespace number { - -/////////////////////////////////////////////////////////////////////////////// - -/// Generate 32-bit pseudo-random number. -MP4V2_EXPORT uint32_t random32(); - -/// Seed pseudo-random number generator. -MP4V2_EXPORT void srandom( uint32_t ); - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::number - -#endif // MP4V2_PLATFORM_NUMBER_RANDOM_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random_posix.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random_posix.cpp deleted file mode 100644 index 0bdcd1db..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random_posix.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "libplatform/impl.h" -#include - -namespace mp4v2 { namespace platform { namespace number { - -/////////////////////////////////////////////////////////////////////////////// - -uint32_t -random32() -{ - return uint32_t( ::random() ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -srandom( uint32_t seed ) -{ - ::srandom( seed ); -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::time diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random_win32.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random_win32.cpp deleted file mode 100644 index f884e5dc..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/number/random_win32.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "libplatform/impl.h" -#include - -namespace mp4v2 { namespace platform { namespace number { - -/////////////////////////////////////////////////////////////////////////////// - -uint32_t -random32() -{ - return uint32_t( ::rand() << 16 | ::rand() ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -srandom( uint32_t seed ) -{ - ::srand( seed ); -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::time diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform.h deleted file mode 100644 index 2868f77e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef MP4V2_PLATFORM_PLATFORM_H -#define MP4V2_PLATFORM_PLATFORM_H - -/// @namespace mp4v2::platform (private) Platform abstraction. -/// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. -/// -/// This namespace implements platform abstractions that are useful for -/// keeping the code base portable. - -/// @namespace mp4v2::platform::io (private) I/O. -/// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. - -/// @namespace mp4v2::platform::number (private) Number. -/// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. - -/// @namespace mp4v2::platform::sys (private) System. -/// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. - -/////////////////////////////////////////////////////////////////////////////// - -#if defined( _WIN32 ) -# include "libplatform/platform_win32.h" -#else -# include "libplatform/platform_posix.h" -#endif - -/////////////////////////////////////////////////////////////////////////////// - -#include "libplatform/warning.h" -#include "libplatform/endian.h" - -#include "libplatform/io/File.h" -#include "libplatform/io/FileSystem.h" - -#include "libplatform/number/random.h" -#include "libplatform/process/process.h" -#include "libplatform/prog/option.h" -#include "libplatform/sys/error.h" -#include "libplatform/time/time.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_PLATFORM_PLATFORM_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_base.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_base.h deleted file mode 100644 index 5b6a263f..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_base.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef MP4V2_PLATFORM_BASE_H -#define MP4V2_PLATFORM_BASE_H - -/////////////////////////////////////////////////////////////////////////////// - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_PLATFORM_BASE_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_posix.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_posix.h deleted file mode 100644 index af5901ad..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_posix.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef MP4V2_PLATFORM_POSIX_H -#define MP4V2_PLATFORM_POSIX_H - -/////////////////////////////////////////////////////////////////////////////// - -#include "libplatform/config.h" - -/////////////////////////////////////////////////////////////////////////////// - -// constant macros are not usually used with C++ so the standard mechanism to -// activate it is to define before stdint.h -#ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS -#endif - -// format macros are not usually used with C++ so the standard mechanism to -// activate it is to define before inttypes.h -#ifndef __STDC_FORMAT_MACROS -# define __STDC_FORMAT_MACROS -#endif - -#ifdef NEED_LFS_ACTIVATION -# ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE -# define _FILE_OFFSET_BITS 64 -# endif -#endif - -/////////////////////////////////////////////////////////////////////////////// - -#include "libplatform/platform_base.h" -#include -#include -#include -#include - -#include - -/////////////////////////////////////////////////////////////////////////////// - -namespace mp4v2 { namespace platform { - using namespace std; - - using ::int8_t; - using ::int16_t; - using ::int32_t; - using ::int64_t; - - using ::uint8_t; - using ::uint16_t; - using ::uint32_t; - using ::uint64_t; -}} // namespace mp4v2::platform - -/////////////////////////////////////////////////////////////////////////////// - -// win32 platform requires O_BINARY when using old open() calls so we add -// this harmless bit-flag for posix to avoid .cpp platform conditionals -#ifndef O_BINARY -# define O_BINARY 0 -#endif - -/////////////////////////////////////////////////////////////////////////////// - -// ARM seems to require integer instructions operands to have 4-byte alignment -// so we set this macro to for some int<->string code to manually copy string -// bytes into an int which aligns it. This is much easier than trying to -// align pertinent string data (constants) from in text sections. -#if defined( __arm__ ) -# define MP4V2_INTSTRING_ALIGNMENT 1 -#else -# undef MP4V2_INTSTRING_ALIGNMENT -#endif - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_PLATFORM_POSIX_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_win32.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_win32.h deleted file mode 100644 index 7e8685a5..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/platform_win32.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef MP4V2_PLATFORM_WIN32_H -#define MP4V2_PLATFORM_WIN32_H - -/////////////////////////////////////////////////////////////////////////////// - -// mingw needs this to enable some newer 64-bit functions -#ifdef __MINGW32__ -# undef __MSVCRT_VERSION__ -# define __MSVCRT_VERSION__ 0x800 -#endif - -// set minimum win32 API requirement to Windows 2000 or higher -#ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0500 -#endif -#ifndef WINVER -# define WINVER 0x0500 -#endif - -/////////////////////////////////////////////////////////////////////////////// - -#include "libplatform/platform_base.h" -#include - -/////////////////////////////////////////////////////////////////////////////// - -namespace mp4v2 { namespace platform { - using namespace std; - - using ::int8_t; - using ::int16_t; - using ::int32_t; - using ::int64_t; - - using ::uint8_t; - using ::uint16_t; - using ::uint32_t; - using ::uint64_t; -}} // namespace mp4v2::platform - -/////////////////////////////////////////////////////////////////////////////// - -// fprintf macros for unsigned types - mingw32 is a good source if more needed -#define PRId8 "d" -#define PRId16 "d" -#define PRId32 "d" -#define PRId64 "I64d" - -#define PRIu8 "u" -#define PRIu16 "u" -#define PRIu32 "u" -#define PRIu64 "I64u" - -#define PRIx8 "x" -#define PRIx16 "x" -#define PRIx32 "x" -#define PRIx64 "I64x" - -/////////////////////////////////////////////////////////////////////////////// - -// some macros for constant expressions -#define INT8_C(x) x -#define INT16_C(x) x -#define INT32_C(x) x ## L -#define INT64_C(x) x ## LL - -#define UINT8_C(x) x -#define UINT16_C(x) x -#define UINT32_C(x) x ## UL -#define UINT64_C(x) x ## ULL - -/////////////////////////////////////////////////////////////////////////////// - -#ifdef min -# undef min -#endif - -#ifdef max -# undef max -#endif - -/////////////////////////////////////////////////////////////////////////////// - -#define snprintf(s,n,...) _snprintf(s,n,__VA_ARGS__) -#define strcasecmp(s1,s2) _stricmp(s1,s2) -#define strdup(s) _strdup(s) - -/////////////////////////////////////////////////////////////////////////////// - -// macro clashes with symbol -#undef LC_NONE - -#endif // MP4V2_PLATFORM_WIN32_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process.h deleted file mode 100644 index 446b100a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MP4V2_PLATFORM_PROCESS_PROCESS_H -#define MP4V2_PLATFORM_PROCESS_PROCESS_H - -/// @namespace mp4v2::platform::process (private) Process. -/// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. -namespace mp4v2 { namespace platform { namespace process { - -/////////////////////////////////////////////////////////////////////////////// - -MP4V2_EXPORT int32_t getpid(); - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::process - -#endif // MP4V2_PLATFORM_PROCESS_PROCESS_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process_posix.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process_posix.cpp deleted file mode 100644 index 74b4e174..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process_posix.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "libplatform/impl.h" - -namespace mp4v2 { namespace platform { namespace process { - -/////////////////////////////////////////////////////////////////////////////// - -int32_t -getpid() -{ - return ::getpid(); -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::process diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process_win32.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process_win32.cpp deleted file mode 100644 index b7846804..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/process/process_win32.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "libplatform/impl.h" -#include - -namespace mp4v2 { namespace platform { namespace process { - -/////////////////////////////////////////////////////////////////////////////// - -int32_t -getpid() -{ - return ::_getpid(); -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::process diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/prog/option.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/prog/option.cpp deleted file mode 100644 index 645dccf7..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/prog/option.cpp +++ /dev/null @@ -1,637 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// branched from: -// FreeBSD 7.0-RELEASE -// $FreeBSD: src/lib/libc/stdlib/getopt_long.c,v 1.15 2006/09/23 14:48:31 ache Exp $ -// -/////////////////////////////////////////////////////////////////////////////// - -/* - * Copyright (c) 2002 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Sponsored in part by the Defense Advanced Research Projects - * Agency (DARPA) and Air Force Research Laboratory, Air Force - * Materiel Command, USAF, under agreement number F39502-99-1-0512. - */ -/*- - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Dieter Baron and Thomas Klausner. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "libplatform/impl.h" - -namespace mp4v2 { -namespace platform { -namespace prog { - -/////////////////////////////////////////////////////////////////////////////// - -#define GNU_COMPATIBLE -#define REPLACE_GETOPT - -namespace { - void warnx( const char* format, ... ) { - va_list ap; - va_start( ap, format ); - vfprintf( stderr, format, ap ); - va_end( ap ); - fprintf( stderr, "\n" ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -#ifdef REPLACE_GETOPT -int opterr = 1; /* if error message should be printed */ -int optind = 1; /* index into parent argv vector */ -int optopt = '?'; /* character checked for validity */ -int optreset; /* reset getopt */ -const char* optarg; /* argument associated with option */ -#endif - -#define PRINT_ERROR ((opterr) && (*options != ':')) - -#define FLAG_PERMUTE 0x01 // permute non-options to the end of argv -#define FLAG_ALLARGS 0x02 // treat non-options as args to option "-1" -#define FLAG_LONGONLY 0x04 // operate as getopt_long_only - -// return values -#define BADCH (int)'?' -#define BADARG ((*options == ':') ? (int)':' : (int)'?') -#define INORDER (int)1 - -#define EMSG "" - -#ifdef GNU_COMPATIBLE -#define NO_PREFIX (-1) -#define D_PREFIX 0 -#define DD_PREFIX 1 -#define W_PREFIX 2 -#endif - -static int getopt_internal(int, char * const *, const char *, const Option*, int*, int); -static int parse_long_options(char * const *, const char *, const Option*, int *, int, int); -static int gcd(int, int); -static void permute_args(int, int, int, char * const *); - -static const char *place = EMSG; /* option letter processing */ - -/* XXX: set optreset to 1 rather than these two */ -static int nonopt_start = -1; /* first non option argument (for permute) */ -static int nonopt_end = -1; /* first option after non options (for permute) */ - -/* Error messages */ -static const char recargchar[] = "option requires an argument -- %c"; -static const char illoptchar[] = "illegal option -- %c"; /* From P1003.2 */ -#ifdef GNU_COMPATIBLE -static int dash_prefix = NO_PREFIX; -static const char gnuoptchar[] = "invalid option -- %c"; - -static const char recargstring[] = "option `%s%s' requires an argument"; -static const char ambig[] = "option `%s%.*s' is ambiguous"; -static const char noarg[] = "option `%s%.*s' doesn't allow an argument"; -static const char illoptstring[] = "unrecognized option `%s%s'"; -#else -static const char recargstring[] = "option requires an argument -- %s"; -static const char ambig[] = "ambiguous option -- %.*s"; -static const char noarg[] = "option doesn't take an argument -- %.*s"; -static const char illoptstring[] = "unknown option -- %s"; -#endif - -/* - * Compute the greatest common divisor of a and b. - */ -static int -gcd(int a, int b) { - int c; - - c = a % b; - while (c != 0) { - a = b; - b = c; - c = a % b; - } - - return (b); -} - -/* - * Exchange the block from nonopt_start to nonopt_end with the block - * from nonopt_end to opt_end (keeping the same order of arguments - * in each block). - */ -static void -permute_args(int panonopt_start, int panonopt_end, int opt_end, - char * const *nargv) { - int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; - char *swap; - - /* - * compute lengths of blocks and number and size of cycles - */ - nnonopts = panonopt_end - panonopt_start; - nopts = opt_end - panonopt_end; - ncycle = gcd(nnonopts, nopts); - cyclelen = (opt_end - panonopt_start) / ncycle; - - for (i = 0; i < ncycle; i++) { - cstart = panonopt_end+i; - pos = cstart; - for (j = 0; j < cyclelen; j++) { - if (pos >= panonopt_end) - pos -= nnonopts; - else - pos += nopts; - swap = nargv[pos]; - /* LINTED const cast */ - ((char **) nargv)[pos] = nargv[cstart]; - /* LINTED const cast */ - ((char **)nargv)[cstart] = swap; - } - } -} - -/* - * parse_long_options -- - * Parse long options in argc/argv argument vector. - * Returns -1 if short_too is set and the option does not match long_options. - */ -static int -parse_long_options(char * const *nargv, const char *options, - const Option* long_options, int* idx, int short_too, int flags) { - const char *current_argv; - char *has_equal; -#ifdef GNU_COMPATIBLE - const char *current_dash; -#endif - size_t current_argv_len; - int i, match, exact_match, second_partial_match; - - current_argv = place; -#ifdef GNU_COMPATIBLE - switch (dash_prefix) { - case D_PREFIX: - current_dash = "-"; - break; - case DD_PREFIX: - current_dash = "--"; - break; - case W_PREFIX: - current_dash = "-W "; - break; - default: - current_dash = ""; - break; - } -#endif - match = -1; - exact_match = 0; - second_partial_match = 0; - - optind++; - - if ((has_equal = (char*)strchr(current_argv, '=')) != NULL) { - /* argument found (--option=arg) */ - current_argv_len = has_equal - current_argv; - has_equal++; - } - else - current_argv_len = strlen(current_argv); - - for (i = 0; long_options[i].name; i++) { - /* find matching long option */ - if (strncmp(current_argv, long_options[i].name, - current_argv_len)) - continue; - - if (strlen(long_options[i].name) == current_argv_len) { - /* exact match */ - match = i; - exact_match = 1; - break; - } - /* - * If this is a known short option, don't allow - * a partial match of a single character. - */ - if (short_too && current_argv_len == 1) - continue; - - if (match == -1) /* first partial match */ - match = i; - else if ((flags & FLAG_LONGONLY) || - long_options[i].type != - long_options[match].type || - long_options[i].flag != long_options[match].flag || - long_options[i].val != long_options[match].val) - second_partial_match = 1; - } - if (!exact_match && second_partial_match) { - /* ambiguous abbreviation */ - if (PRINT_ERROR) - warnx(ambig, -#ifdef GNU_COMPATIBLE - current_dash, -#endif - (int)current_argv_len, - current_argv); - optopt = 0; - return (BADCH); - } - if (match != -1) { /* option found */ - if (long_options[match].type == Option::NO_ARG - && has_equal) { - if (PRINT_ERROR) - warnx(noarg, -#ifdef GNU_COMPATIBLE - current_dash, -#endif - (int)current_argv_len, - current_argv); - /* - * XXX: GNU sets optopt to val regardless of flag - */ - if (long_options[match].flag == NULL) - optopt = long_options[match].val; - else - optopt = 0; -#ifdef GNU_COMPATIBLE - return (BADCH); -#else - return (BADARG); -#endif - } - if (long_options[match].type == Option::REQUIRED_ARG || - long_options[match].type == Option::OPTIONAL_ARG) { - if (has_equal) - optarg = has_equal; - else if (long_options[match].type == Option::REQUIRED_ARG) { - /* - * optional argument doesn't use next nargv - */ - optarg = nargv[optind++]; - } - } - if ((long_options[match].type == Option::REQUIRED_ARG) - && (optarg == NULL)) { - /* - * Missing argument; leading ':' indicates no error - * should be generated. - */ - if (PRINT_ERROR) - warnx(recargstring, -#ifdef GNU_COMPATIBLE - current_dash, -#endif - current_argv); - /* - * XXX: GNU sets optopt to val regardless of flag - */ - if (long_options[match].flag == NULL) - optopt = long_options[match].val; - else - optopt = 0; - --optind; - return (BADARG); - } - } - else { /* unknown option */ - if (short_too) { - --optind; - return (-1); - } - if (PRINT_ERROR) - warnx(illoptstring, -#ifdef GNU_COMPATIBLE - current_dash, -#endif - current_argv); - optopt = 0; - return (BADCH); - } - if (idx) - *idx = match; - if (long_options[match].flag) { - *long_options[match].flag = long_options[match].val; - return (0); - } - else - return (long_options[match].val); -} - -/* - * getopt_internal -- - * Parse argc/argv argument vector. Called by user level routines. - */ -static int -getopt_internal(int nargc, char * const *nargv, const char *options, - const Option* long_options, int* idx, int flags) { - const char *oli; /* option letter list index */ - int optchar, short_too; - int posixly_correct; /* no static, can be changed on the fly */ - - if (options == NULL) - return (-1); - - /* - * Disable GNU extensions if POSIXLY_CORRECT is set or options - * string begins with a '+'. - */ - posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); -#ifdef GNU_COMPATIBLE - if (*options == '-') - flags |= FLAG_ALLARGS; - else if (posixly_correct || *options == '+') - flags &= ~FLAG_PERMUTE; -#else - if (posixly_correct || *options == '+') - flags &= ~FLAG_PERMUTE; - else if (*options == '-') - flags |= FLAG_ALLARGS; -#endif - if (*options == '+' || *options == '-') - options++; - - /* - * XXX Some GNU programs (like cvs) set optind to 0 instead of - * XXX using optreset. Work around this braindamage. - */ - if (optind == 0) - optind = optreset = 1; - - optarg = NULL; - if (optreset) - nonopt_start = nonopt_end = -1; -start: - if (optreset || !*place) { /* update scanning pointer */ - optreset = 0; - if (optind >= nargc) { /* end of argument vector */ - place = EMSG; - if (nonopt_end != -1) { - /* do permutation, if we have to */ - permute_args(nonopt_start, nonopt_end, - optind, nargv); - optind -= nonopt_end - nonopt_start; - } - else if (nonopt_start != -1) { - /* - * If we skipped non-options, set optind - * to the first of them. - */ - optind = nonopt_start; - } - nonopt_start = nonopt_end = -1; - return (-1); - } - if (*(place = nargv[optind]) != '-' || -#ifdef GNU_COMPATIBLE - place[1] == '\0') { -#else - (place[1] == '\0' && strchr(options, '-') == NULL)) { -#endif - place = EMSG; /* found non-option */ - if (flags & FLAG_ALLARGS) { - /* - * GNU extension: - * return non-option as argument to option 1 - */ - optarg = nargv[optind++]; - return (INORDER); - } - if (!(flags & FLAG_PERMUTE)) { - /* - * If no permutation wanted, stop parsing - * at first non-option. - */ - return (-1); - } - /* do permutation */ - if (nonopt_start == -1) - nonopt_start = optind; - else if (nonopt_end != -1) { - permute_args(nonopt_start, nonopt_end, - optind, nargv); - nonopt_start = optind - - (nonopt_end - nonopt_start); - nonopt_end = -1; - } - optind++; - /* process next argument */ - goto start; - } - if (nonopt_start != -1 && nonopt_end == -1) - nonopt_end = optind; - - /* - * If we have "-" do nothing, if "--" we are done. - */ - if (place[1] != '\0' && *++place == '-' && place[1] == '\0') { - optind++; - place = EMSG; - /* - * We found an option (--), so if we skipped - * non-options, we have to permute. - */ - if (nonopt_end != -1) { - permute_args(nonopt_start, nonopt_end, - optind, nargv); - optind -= nonopt_end - nonopt_start; - } - nonopt_start = nonopt_end = -1; - return (-1); - } - } - - /* - * Check long options if: - * 1) we were passed some - * 2) the arg is not just "-" - * 3) either the arg starts with -- we are getopt_long_only() - */ - if (long_options != NULL && place != nargv[optind] && - (*place == '-' || (flags & FLAG_LONGONLY))) { - short_too = 0; -#ifdef GNU_COMPATIBLE - dash_prefix = D_PREFIX; -#endif - if (*place == '-') { - place++; /* --foo long option */ -#ifdef GNU_COMPATIBLE - dash_prefix = DD_PREFIX; -#endif - } - else if (*place != ':' && strchr(options, *place) != NULL) - short_too = 1; /* could be short option too */ - - optchar = parse_long_options(nargv, options, long_options, - idx, short_too, flags); - if (optchar != -1) { - place = EMSG; - return (optchar); - } - } - - if ((optchar = (int)*place++) == (int)':' || - (optchar == (int)'-' && *place != '\0') || - (oli = (const char*)strchr(options, optchar)) == NULL) { - /* - * If the user specified "-" and '-' isn't listed in - * options, return -1 (non-option) as per POSIX. - * Otherwise, it is an unknown option character (or ':'). - */ - if (optchar == (int)'-' && *place == '\0') - return (-1); - if (!*place) - ++optind; -#ifdef GNU_COMPATIBLE - if (PRINT_ERROR) - warnx(posixly_correct ? illoptchar : gnuoptchar, - optchar); -#else - if (PRINT_ERROR) - warnx(illoptchar, optchar); -#endif - optopt = optchar; - return (BADCH); - } - if (long_options != NULL && optchar == 'W' && oli[1] == ';') { - /* -W long-option */ - if (*place) /* no space */ - /* NOTHING */; - else if (++optind >= nargc) { /* no arg */ - place = EMSG; - if (PRINT_ERROR) - warnx(recargchar, optchar); - optopt = optchar; - return (BADARG); - } - else /* white space */ - place = nargv[optind]; -#ifdef GNU_COMPATIBLE - dash_prefix = W_PREFIX; -#endif - optchar = parse_long_options(nargv, options, long_options, - idx, 0, flags); - place = EMSG; - return (optchar); - } - if (*++oli != ':') { /* doesn't take argument */ - if (!*place) - ++optind; - } - else { /* takes (optional) argument */ - optarg = NULL; - if (*place) /* no white space */ - optarg = place; - else if (oli[1] != ':') { /* arg not optional */ - if (++optind >= nargc) { /* no arg */ - place = EMSG; - if (PRINT_ERROR) - warnx(recargchar, optchar); - optopt = optchar; - return (BADARG); - } - else - optarg = nargv[optind]; - } - place = EMSG; - ++optind; - } - /* dump back option letter */ - return (optchar); -} - -#if 0 -#ifdef REPLACE_GETOPT -/* - * getopt -- - * Parse argc/argv argument vector. - * - * [eventually this will replace the BSD getopt] - */ -int -getopt(int nargc, char * const *nargv, const char *options) { - - /* - * We don't pass FLAG_PERMUTE to getopt_internal() since - * the BSD getopt(3) (unlike GNU) has never done this. - * - * Furthermore, since many privileged programs call getopt() - * before dropping privileges it makes sense to keep things - * as simple (and bug-free) as possible. - */ - return (getopt_internal(nargc, nargv, options, NULL, NULL, 0)); -} -#endif /* REPLACE_GETOPT */ -#endif - -/* - * getopt_long -- - * Parse argc/argv argument vector. - */ -int -getOption(int nargc, char * const *nargv, const char *options, - const Option* long_options, int* idx) { - - return (getopt_internal(nargc, nargv, options, long_options, idx, - FLAG_PERMUTE)); -} - -/* - * getopt_long_only -- - * Parse argc/argv argument vector. - */ -int -getOptionSingle(int nargc, char * const *nargv, const char *options, - const Option* long_options, int* idx) { - - return (getopt_internal(nargc, nargv, options, long_options, idx, - FLAG_PERMUTE|FLAG_LONGONLY)); -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::prog diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/prog/option.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/prog/option.h deleted file mode 100644 index 9f7a82a4..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/prog/option.h +++ /dev/null @@ -1,174 +0,0 @@ -#ifndef MP4V2_PLATFORM_PROG_OPTION_H -#define MP4V2_PLATFORM_PROG_OPTION_H - -/////////////////////////////////////////////////////////////////////////////// -/// -/// @namespace mp4v2::platform::prog Command-line argument parsing. -/// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. -/// -/// This namespace provides a mechanism to parse command-line arguments and -/// options for executables. -/// It is identical in behavior to getopt_long functions available -/// with many popular posix-platforms such as Darwin, FreeBSD and Linux. -/// Virtually any OS which has getopt_long will adequately document this -/// functionality. However, to avoid symbol ambiguity with the popular -/// posix implementation, the following identifiers have been renamed: -/// @li getopt_long() -> getOption() -/// @li getopt_long_only() -> getOptionSingle() -/// @li option -> Option -/// @li option.has_arg -> Option.type -//! -/////////////////////////////////////////////////////////////////////////////// -namespace mp4v2 { namespace platform { namespace prog { - -//! On return from getOption() or getOptionSingle(), -//! points to an option argument, if it is anticipated. -MP4V2_EXPORT extern const char* optarg; - -//! On return from getOption() or getOptionSingle(), -//! contains the index to the next argv argument for a subsequent call to -//! getOption() or getOptionSingle(). -//! Initialized to 1 and must be set manually to 1 prior to invoking -//! getOption() or getOptionSingle() to evaluate multiple sets of arguments. -MP4V2_EXPORT extern int optind; - -//! On return from getOption() or getOptionSingle(), -//! saves the last known option character returned by -//! getOption() or getOptionSingle(). -//! On error, contains the character/code of option which caused error. -MP4V2_EXPORT extern int optopt; - -//! Initialized to 1 and may be set to 0 to disable error messages. -MP4V2_EXPORT extern int opterr; - -//! Must be set to 1 before evaluating the 2nd or each additional set -//! of arguments. -MP4V2_EXPORT extern int optreset; - -//! Structure describing a single option. -//! An instance of Option is required for each program option and is -//! initialized before use with getOption() or getOptionWord(). -struct MP4V2_EXPORT Option -{ - //! expectation-type indicating number of arguments expected - //! on the command-line following the option-argument itself - enum Type { - //! indicates exactly 0 arguments follow option - NO_ARG, - //! indicates exactly 1 argument follow option - REQUIRED_ARG, - //! indicates 0 or 1 arguments follow option - OPTIONAL_ARG, - }; - - //! contains the option name without leading double-dash - const char* name; - - //! option expectation-type - Type type; - - //! If not NULL, then the integer pointed to by it will be set to - //! the value in the val field. If the flag field is NULL, then the - //! val field will be returned. - int* flag; - - //! Constant value representing option. This is usually a single-char - //! ASCII value but in case of long-options without a corresponding - //! single-char value it can be a unique integer (beyond ASCII range) - //! which represents the long-option. - int val; -}; - -/////////////////////////////////////////////////////////////////////////////// -//! -//! Get option character from command line argument list. -//! -//! getOption() is similar to posix getopt() but it accepts options in two -//! forms: words and characters. The getOption() function provides a -//! superset of the functionality of getopt(). The getOption() function can -//! be used in two ways. In the first way, every long-option understood by -//! the program has a corresponding short-option, and the Option structure -//! is only used to translate from long-options to short-options. When used -//! in this fashion, getOption() behaves identically to getopt(). This is -//! a good way to add long-option processing to an esxisting program with -//! a minimum of rewriting. -//! -//! In the second mechanism, a long-option sets a flag in the Option -//! structure structure passed, or will store a pointer to the command line -//! argument in the Option structure passed to it for options that take -//! arguments. Additionally, the long-option's argument may be specified as -//! a single argument with an equal sign, eg: -//! @code myprogram --myoption=somevalue -//! @endcode -//! -//! When a long-option is processed, the call to getOption() will return 0. -//! For this reason, long-option processing without shortcuts is not -//! backwards compatible with getopt(). -//! -//! It is possible to combine these methods, providing for long-options -//! processing with short-option equivalents for some options. Less -//! frequently used options would be processed as long-options only. -//! -//! @param argc number of arguments. -//! @param argv argument array of strings. -//! @param optstr string containing the following elements: -//! individual characters, and characters followed by a colon to indicate -//! an option argument is to follow. For example, an option string "x" -//! recognizes an option "-x", and an option string "x:" recognizes an -//! option and argument "-x argument". -//! @param longopts array of Option entries. The last element must be filled -//! with zeroes to indicate end-of-array. -//! @param idx If not NULL, then the integer pointed to it will be set to -//! the index of the long-option relative to longops. -//! -//! @return If the flag field is NULL, val field is returned, -//! which is usually just the corresponding short-option. -//! If flag is not NULL, 0 is returned and val is -//! stored in the location pointed to by flag field. -//! A ':' will be returned if there was a missing option argument. -//! A '?' will be returned if an unknown or ambiguous option was used. -//! A -1 will be returned when the argument list has been exhausted. -//! -/////////////////////////////////////////////////////////////////////////////// -MP4V2_EXPORT -int getOption( int argc, char* const* argv, const char* optstr, const Option* longopts, int* idx ); - -/////////////////////////////////////////////////////////////////////////////// -//! -//! Get option character from command line argument list and allow -//! long-options with single-hyphens. -//! -//! Behaves identically to getOption() with the exception that long-options -//! may start with '-' in addition to '--'. -//! If an option starting with '-' does not match a long option but does match -//! a single-character option, the single-character option is returned. -//! -//! @param argc number of arguments. -//! @param argv argument array of strings. -//! @param optstr string containing the following elements: -//! individual characters, and characters followed by a colon to indicate -//! an option argument is to follow. For example, an option string "x" -//! recognizes an option "-x", and an option string "x:" recognizes an -//! option and argument "-x argument". -//! @param longopts array of Option entries. The last element must be filled -//! with zeroes to indicate end-of-array. -//! @param idx If not NULL, then the integer pointed to it will be set to -//! the index of the long-option relative to longops. -//! -//! @return If the flag field is NULL, val field is returned, -//! which is usually just the corresponding short-option. -//! If flag is not NULL, 0 is returned and val is -//! stored in the location pointed to by flag field. -//! A ':' will be returned if there was a missing option argument. -//! A '?' will be returned if an unknown or ambiguous option was used. -//! A -1 will be returned when the argument list has been exhausted. -//! -/////////////////////////////////////////////////////////////////////////////// -MP4V2_EXPORT -int getOptionSingle( int argc, char* const* argv, const char* optstr, const Option* longopts, int* idx ); - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::prog - -#endif // MP4V2_PLATFORM_PROG_OPTION_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/sys/error.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/sys/error.cpp deleted file mode 100644 index 094ace11..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/sys/error.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "libplatform/impl.h" - -namespace mp4v2 { namespace platform { namespace sys { - -/////////////////////////////////////////////////////////////////////////////// - -const char* -getErrorStr( int errno_ ) -{ - return std::strerror( errno_ ); -} - -/////////////////////////////////////////////////////////////////////////////// - -int -getLastError() -{ - return errno; -} - -/////////////////////////////////////////////////////////////////////////////// - -const char* -getLastErrorStr() -{ - return strerror( errno ); -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::sys diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/sys/error.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/sys/error.h deleted file mode 100644 index 87764585..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/sys/error.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MP4V2_PLATFORM_SYS_ERROR_H -#define MP4V2_PLATFORM_SYS_ERROR_H - -namespace mp4v2 { namespace platform { namespace sys { - -/////////////////////////////////////////////////////////////////////////////// - -MP4V2_EXPORT int getLastError ( ); -MP4V2_EXPORT const char* getLastErrorStr ( ); -MP4V2_EXPORT const char* getErrorStr ( int ); - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::sys - -#endif // MP4V2_PLATFORM_SYS_ERROR_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time.cpp deleted file mode 100644 index 5fe8867d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "libplatform/impl.h" - -namespace mp4v2 { namespace platform { namespace time { - -/////////////////////////////////////////////////////////////////////////////// - -seconds_t -getLocalTimeSeconds() -{ - return getLocalTimeMilliseconds() / 1000; -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::time diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time.h deleted file mode 100644 index d4d8e7a8..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef MP4V2_PLATFORM_TIME_TIME_H -#define MP4V2_PLATFORM_TIME_TIME_H - -/// @namespace mp4v2::platform::time (private) Time. -/// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. -namespace mp4v2 { namespace platform { namespace time { - -//! type used to represent milliseconds -typedef int64_t milliseconds_t; - -//! type used to represent seconds -typedef int64_t seconds_t; - -/////////////////////////////////////////////////////////////////////////////// -//! -//! Get local-time in milliseconds. -//! -//! getLocalTimeMilliseconds obtains the system's notion of current Greenwich -//! time, adjusted according to the current timezone of the host system. -//! The time is expressed as an absolute value since midnight (0 hour), -//! January 1, 1970. This is commonly referred to as the "epoch". -//! -//! @return local-time in milliseconds elapsed since the epoch. -//! -/////////////////////////////////////////////////////////////////////////////// -MP4V2_EXPORT milliseconds_t getLocalTimeMilliseconds(); - -/////////////////////////////////////////////////////////////////////////////// -//! -//! Get local-time in seconds. -//! -//! getLocalTimeMilliseconds obtains the system's notion of current Greenwich -//! time, adjusted according to the current timezone of the host system. -//! The time is expressed as an absolute value since midnight (0 hour), -//! January 1, 1970. This is commonly referred to as the "epoch". -//! -//! @return local-time in seconds elapsed since the epoch. -//! -/////////////////////////////////////////////////////////////////////////////// -MP4V2_EXPORT seconds_t getLocalTimeSeconds(); - -/////////////////////////////////////////////////////////////////////////////// -//! @} -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::time - -#endif // MP4V2_PLATFORM_TIME_TIME_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time_posix.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time_posix.cpp deleted file mode 100644 index e3c82f75..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time_posix.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "libplatform/impl.h" -#include - -namespace mp4v2 { namespace platform { namespace time { - -/////////////////////////////////////////////////////////////////////////////// - -milliseconds_t -getLocalTimeMilliseconds() -{ - timeval buf; - if( gettimeofday( &buf, 0 )) - memset( &buf, 0, sizeof( buf )); - return milliseconds_t( buf.tv_sec ) * 1000 + buf.tv_usec / 1000; -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::time diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time_win32.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time_win32.cpp deleted file mode 100644 index 88a7ea51..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/time/time_win32.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "libplatform/impl.h" -#include - -namespace mp4v2 { namespace platform { namespace time { - -/////////////////////////////////////////////////////////////////////////////// - -milliseconds_t -getLocalTimeMilliseconds() -{ - __timeb64 buf; - _ftime64( &buf ); - return milliseconds_t( buf.time ) * 1000 + buf.millitm; -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::platform::time diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/warning.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/warning.h deleted file mode 100644 index 2a236aba..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libplatform/warning.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef MP4V2_PLATFORM_WARNING_H -#define MP4V2_PLATFORM_WARNING_H - -/////////////////////////////////////////////////////////////////////////////// - -// TODO-KB: clean code to avoid disabling warnings - -#if defined( __GNUC__ ) && ( __GNUC__ >= 4 ) && ( __GNUC_MINOR__ >= 2 ) -# pragma GCC diagnostic ignored "-Wwrite-strings" -#elif defined( _MSC_VER ) -# pragma warning( disable: 4244 ) -# pragma warning( disable: 4251 ) -# pragma warning( disable: 4800 ) -# pragma warning( disable: 4996 ) -#endif - -/////////////////////////////////////////////////////////////////////////////// - -// this macro is used to mark printf-style functions for GCC to examine -// the format string and arguments and issue warnings if needed - -#if defined( __GNUC__ ) -# define MP4V2_WFORMAT_PRINTF(i,j) __attribute__((format(__printf__,i,j))) -#else -# define MP4V2_WFORMAT_PRINTF(i,j) -#endif - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_PLATFORM_WARNING_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Database.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Database.cpp deleted file mode 100644 index 9cd72ed3..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Database.cpp +++ /dev/null @@ -1,225 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "libutil/impl.h" - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -Database::Database( const string& filename, const string& key ) - : _filename ( filename ) - , _key ( key ) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -Database::~Database() -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Database::close() -{ - _stream.close(); - _stream.clear(); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Database::open( bool write, string& fname ) -{ - _currentKeyValue.clear(); - - _stream.clear(); - _stream.open( fname.c_str(), write ? ios::out : ios::in ); - return _stream.rdstate(); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Database::parseData( map& data ) -{ - data.clear(); - - string name; - string value; - - if ( _currentKeyValue.length() ) { - data[ _key ] = _currentKeyValue; - _currentKeyValue.clear(); - } - - while ( !parsePair( name, value ) ) { - if ( name == _key ) { - _currentKeyValue = value; - break; - } - data[ name ] = value; - } -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Database::parsePair( string& name, string& value ) -{ - enum Mode { LTRIM, COMMENT, NAME, DELIM, VALUE }; - Mode mode = LTRIM; - bool delimVisible = false; - - int visibleLength = 0; - - for ( char c; !_stream.get( c ).rdstate(); ) { - switch( mode ) { - case LTRIM: - switch( c ) { - case '\0': // NULL - case '\t': // TAB - case ' ': // SPACE - case '\n': // NEWLINE - case '\r': // CARRIAGE-RETURN - break; - - case '#': // COMMENT - mode = COMMENT; - break; - - default: - mode = NAME; - name = tolower( c ); - break; - } - break; - - case COMMENT: - switch( c ) { - case '\n': // NEWLINE - case '\r': // CARRIAGE-RETURN - mode = LTRIM; - name.clear(); - break; - - default: - break; - } - break; - - case NAME: - switch( c ) { - case '\0': // NULL - break; - - case '\n': // NEWLINE - case '\r': // CARRIAGE-RETURN - mode = LTRIM; - break; - - case '\t': // TAB - case ' ': // SPACE - case '=': // DELIMITER - mode = DELIM; - delimVisible = false; - break; - - default: - name += tolower( c ); - break; - } - break; - - case DELIM: - switch( c ) { - case '\n': // NEWLINE - case '\r': // CARRIAGE-RETURN - mode = LTRIM; - name.clear(); - break; - - case '\0': // NULL - case '\t': // TAB - case ' ': // SPACE - break; - - case '=': // DELIMITER - if( delimVisible ) { - mode = VALUE; - value = c; - visibleLength = (uint32_t)value.length(); - } - delimVisible = true; - break; - - default: - mode = VALUE; - value = c; - visibleLength = (uint32_t)value.length(); - break; - } - break; - - case VALUE: - switch (c) { - case '\0': // NULL - break; - - case '\n': // NEWLINE - case '\r': // CARRIAGE-RETURN - if( visibleLength ) - value.resize( visibleLength ); - return false; - - case '\t': // TAB - case ' ': // SPACE - value += ' '; - break; - - default: - value += c; - visibleLength = (uint32_t)value.length(); - break; - } - break; - - default: - break; - } - } - - if( mode != VALUE ) - return true; - - if( visibleLength ) - value.resize( visibleLength ); - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Database.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Database.h deleted file mode 100644 index 9f96c3e2..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Database.h +++ /dev/null @@ -1,105 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_UTIL_DATABASE_H -#define MP4V2_UTIL_DATABASE_H - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// -/// -/// Database class is the base implementation for persistent databases. -/// -/// All databases use an ASCII file format: -/// @li leading/trailing spaces on any line are trimmed. -/// @li lines beginning with '#' are considered comments. -/// @li lines of { } form NAME/VALUEs pairs. -/// @li cannot contain any characters. -/// @li is any combination of { ' ', '=', '\t' }. -/// @li continues until . -/// @li is optional for last line. -/// @li of value this._key marks the beginning of a new record. -/// @li is case-insensitive. -/// @li subsequent lines of NAME/VALUE pairs are part of the same record. -/// -/////////////////////////////////////////////////////////////////////////////// -class Database { -public: - virtual ~Database(); - -protected: - /// Constructor. - /// - /// @param file specifies filename for IO operations. - /// @param key specifies the name of primary key. - /// - Database( const string& file, const string& key ); - - /// Close database file. - void close(); - - /// Open database file. - /// - /// @param write true to open file for writing, false for reading. - /// @param fname filename to open. - /// On Windows, this should be a UTF-8 encoded string. - /// On other platforms, it should be an 8-bit encoding that is - /// appropriate for the platform, locale, file system, etc. - /// (prefer to use UTF-8 when possible). - /// - /// @return true on error. - /// - bool open( bool write, string& fname ); - - /// Parse a record-data from open intput stream. - /// - /// @param data is populated with NAME/VALUE pairs if any. - /// - void parseData( map& data ); - - /////////////////////////////////////////////////////////////////////////// - - const string _filename; // filename (basename only) used for database - const string _key; // name of key for record boundries - fstream _stream; // // IO object - -private: - /// parse a name/value pair from open input stream. - /// - /// @param name stores the parsed name. - /// @param value stores the parsed value. - /// - /// @return true on error (no name/value pair was parised). - /// - bool parsePair( string& name, string& value ); - - /*************************************************************************/ - - string _currentKeyValue; -}; - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util - -#endif // MP4V2_UTIL_DATABASE_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Timecode.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Timecode.cpp deleted file mode 100644 index 195a009f..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Timecode.cpp +++ /dev/null @@ -1,591 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "libutil/impl.h" - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -Timecode::Timecode( const Timecode& obj ) - : _scale ( 1.0 ) - , _duration ( 0 ) - , _format ( FRAME ) - , _svalue ( "" ) - , _hours ( 0 ) - , _minutes ( 0 ) - , _seconds ( 0 ) - , _subseconds ( 0 ) - , scale ( _scale ) - , duration ( _duration ) - , format ( _format ) - , svalue ( _svalue ) - , hours ( _hours ) - , minutes ( _minutes ) - , seconds ( _seconds ) - , subseconds ( _subseconds ) -{ - operator=( obj ); -} - -/////////////////////////////////////////////////////////////////////////////// - -Timecode::Timecode( const string& time_, double scale_ ) - : _scale ( scale_ < 1.0 ? 1.0 : scale_ ) - , _duration ( 0 ) - , _format ( FRAME ) - , _svalue ( "" ) - , _hours ( 0 ) - , _minutes ( 0 ) - , _seconds ( 0 ) - , _subseconds ( 0 ) - , scale ( _scale ) - , duration ( _duration ) - , format ( _format ) - , svalue ( _svalue ) - , hours ( _hours ) - , minutes ( _minutes ) - , seconds ( _seconds ) - , subseconds ( _subseconds ) -{ - parse( time_ ); -} - -/////////////////////////////////////////////////////////////////////////////// - -Timecode::Timecode( uint64_t duration_, double scale_ ) - : _scale ( scale_ < 1.0 ? 1.0 : scale_ ) - , _duration ( 0 ) - , _format ( FRAME ) - , _svalue ( "" ) - , _hours ( 0 ) - , _minutes ( 0 ) - , _seconds ( 0 ) - , _subseconds ( 0 ) - , scale ( _scale ) - , duration ( _duration ) - , format ( _format ) - , svalue ( _svalue ) - , hours ( _hours ) - , minutes ( _minutes ) - , seconds ( _seconds ) - , subseconds ( _subseconds ) -{ - setDuration( duration_ ); -} - -/////////////////////////////////////////////////////////////////////////////// - -uint64_t -Timecode::convertDuration( const Timecode& obj ) const -{ - if( _scale == obj._scale ) - return obj._duration; - - return static_cast( ( _scale / obj._scale ) * obj._duration ); -} - -/////////////////////////////////////////////////////////////////////////////// - -Timecode& -Timecode::operator=( const Timecode& rhs ) -{ - _scale = rhs._scale; - _duration = rhs._duration; - _format = FRAME; - _svalue = rhs._svalue; - - _hours = rhs._hours; - _minutes = rhs._minutes; - _seconds = rhs._seconds; - _subseconds = rhs._subseconds; - - return *this; -} - -/////////////////////////////////////////////////////////////////////////////// - -Timecode& -Timecode::operator+=( const Timecode& rhs ) -{ - uint64_t dur = _duration + convertDuration( rhs ); - // overflow check - if( dur < _duration ) - dur = numeric_limits::max(); - - setDuration( dur ); - return *this; -} - -/////////////////////////////////////////////////////////////////////////////// - -Timecode& -Timecode::operator-=( const Timecode& rhs ) -{ - uint64_t dur = _duration - convertDuration( rhs ); - // underflow check - if( dur > _duration ) - dur = 0; - - setDuration( dur ); - return *this; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Timecode::operator<( const Timecode& obj ) const -{ - return _duration < convertDuration( obj ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Timecode::operator<=( const Timecode& obj ) const -{ - return _duration <= convertDuration( obj ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Timecode::operator>( const Timecode& obj ) const -{ - return _duration < convertDuration( obj ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Timecode::operator>=( const Timecode& obj ) const -{ - return _duration < convertDuration( obj ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Timecode::operator!=( const Timecode& obj ) const -{ - return _duration != convertDuration( obj ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Timecode::operator==( const Timecode& obj ) const -{ - return _duration == convertDuration( obj ); -} - -/////////////////////////////////////////////////////////////////////////////// - -Timecode -Timecode::operator+( const Timecode& obj ) const -{ - Timecode t( *this ); - t += obj; - return t; -} - -/////////////////////////////////////////////////////////////////////////////// - -Timecode -Timecode::operator-( const Timecode& obj ) const -{ - Timecode t( *this ); - t -= obj; - return t; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Timecode::parse( const string& time, string* outError ) -{ - string outErrorPlacebo; - string& error = outError ? *outError : outErrorPlacebo; - error.clear(); - - _format = FRAME; - _hours = 0; - _minutes = 0; - _seconds = 0; - _subseconds = 0; - - // bail if empty - if( time.empty() ) { - recompute(); - return false; - } - - // count number of ':' - int nsect = 0; - int nsemi = 0; - int ndot = 0; - - const string::size_type max = time.length(); - for( string::size_type i = 0; i < max; i++ ) { - switch( time[i] ) { - case ':': - nsect++; - break; - - case ';': - if( nsemi++ ) { - error = "too many semicolons"; - return true; - } - nsect++; - break; - - case '.': - if( ndot++ ) { - error = "too many periods"; - return true; - } - nsect++; - break; - - default: - break; - } - } - - // bail if impossible number of sections - if( nsect > 3 ) { - recompute(); - error = "too many sections"; - return true; - } - - enum Target { - HOURS, - MINUTES, - SECONDS, - SUBSECONDS, - }; - - // setup target before parsing - Target target; - uint64_t* tvalue; - switch( nsect ) { - default: - case 0: - target = SUBSECONDS; - tvalue = &_subseconds; - break; - - case 1: - target = SECONDS; - tvalue = &_seconds; - break; - - case 2: - target = MINUTES; - tvalue = &_minutes; - break; - - case 3: - target = HOURS; - tvalue = &_hours; - break; - } - - istringstream convert; - string tbuffer; - for( string::size_type i = 0; i < max; i++ ) { - const char c = time[i]; - switch( c ) { - case ':': - switch( target ) { - case HOURS: - convert.clear(); - convert.str( tbuffer ); - if( !tbuffer.empty() && !(convert >> *tvalue) ) { - error = "failed to convert integer"; - return true; - } - tbuffer.clear(); - target = MINUTES; - tvalue = &_minutes; - break; - - case MINUTES: - convert.clear(); - convert.str( tbuffer ); - if( !tbuffer.empty() && !(convert >> *tvalue) ) { - error = "failed to convert integer"; - return true; - } - tbuffer.clear(); - target = SECONDS; - tvalue = &_seconds; - break; - - case SECONDS: - convert.clear(); - convert.str( tbuffer ); - if( !tbuffer.empty() && !(convert >> *tvalue) ) { - error = "failed to convert integer"; - return true; - } - tbuffer.clear(); - target = SUBSECONDS; - tvalue = &_subseconds; - break; - - default: - case SUBSECONDS: - error = "unexpected char ':'"; - return true; - } - break; - - case '.': - { - if( target != SECONDS ) { - error = "unexpected char '.'"; - return true; - } - _format = DECIMAL; - convert.clear(); - convert.str( tbuffer ); - if( !tbuffer.empty() && !(convert >> *tvalue) ) { - error = "failed to convert integer"; - return true; - } - tbuffer.clear(); - target = SUBSECONDS; - tvalue = &_subseconds; - break; - } - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - tbuffer += c; - if( tbuffer.length() > 16 ) { - error = "overflow"; - return true; - } - break; - - default: - error = "unexpected char '"; - error += c; - error += "'"; - return true; - } - } - - // apply final section - if( !tbuffer.empty() ) { - convert.clear(); - convert.str( tbuffer ); - if( !tbuffer.empty() && !(convert >> *tvalue) ) { - error = "failed to convert integer"; - return true; - } - } - - // special post processing - switch( _format ) { - case FRAME: - default: - break; - - case DECIMAL: - { - double div = std::pow( 10.0, static_cast(tbuffer.length()) ); - if( div < 1.0 ) - div = 1.0; - *tvalue = static_cast( static_cast(*tvalue) / div * std::ceil( _scale )); - break; - } - } - - recompute(); - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Timecode::recompute() -{ - // case: 29.97 becomes 30.0 - // case: 30.0 becomes 30.0 - const uint64_t iscale = uint64_t( std::ceil( _scale )); - - if( _subseconds > iscale - 1 ) { - uint64_t n = _subseconds / iscale; - _seconds += n; - _subseconds -= n * iscale; - } - - if( _seconds > 59 ) { - uint64_t n = _seconds / 60; - _minutes += n; - _seconds -= n * 60; - } - - if( _minutes > 59 ) { - uint64_t n = _minutes / 60; - _hours += n; - _minutes -= n * 60; - } - - _duration = _subseconds + (iscale * _seconds) + (iscale * _minutes * 60) + (iscale * _hours * 3600); - - ostringstream oss; - oss << setfill('0') << right - << setw(2) << _hours - << ':' - << setw(2) << _minutes - << ':' - << setw(2) << _seconds; - - switch( _format ) { - case FRAME: - oss << ':' << setw(2) << setfill( '0' ) << _subseconds; - break; - - case DECIMAL: - { - oss << '.' << setw(3) << setfill( '0' ) << static_cast(_subseconds / _scale * 1000.0 + 0.5); - break; - } - } - - _svalue = oss.str(); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Timecode::reset() -{ - setDuration( 0 ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Timecode::setDuration( uint64_t duration_, double scale_ ) -{ - if( scale_ != 0.0 ) { - _scale = scale_; - if( _scale < 1.0 ) - _scale = 1.0; - } - - _duration = duration_; - - const uint64_t iscale = uint64_t( std::ceil( _scale )); - uint64_t i = _duration; - - _hours = i / (iscale * 3600); - i -= (iscale * 3600 * _hours); - - _minutes = i / (iscale * 60); - i -= (iscale * 60 * _minutes); - - _seconds = i / iscale; - i -= (iscale * _seconds); - - _subseconds = i; - - recompute(); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Timecode::setFormat( Format format_ ) -{ - _format = format_; - recompute(); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Timecode::setHours( uint64_t hours_ ) -{ - _hours = hours_; - recompute(); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Timecode::setMinutes( uint64_t minutes_ ) -{ - _minutes = minutes_; - recompute(); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Timecode::setScale( double scale_ ) -{ - const double oldscale = _scale; - _scale = scale_; - if( _scale < 1.0 ) - _scale = 1.0; - - _subseconds = static_cast( (_scale / oldscale) * _subseconds ); - recompute(); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Timecode::setSeconds( uint64_t seconds_ ) -{ - _seconds = seconds_; - recompute(); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Timecode::setSubseconds( uint64_t subseconds_ ) -{ - _subseconds = subseconds_; - recompute(); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Timecode.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Timecode.h deleted file mode 100644 index dd164e69..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Timecode.h +++ /dev/null @@ -1,119 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_UTIL_TIMECODE_H -#define MP4V2_UTIL_TIMECODE_H - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -/// Class representing SMPTE timecode. -/// -/// Objects of this class represent a specific time or duration and can -/// be converted to/from string values, and various epochs. -/// -/// The standard pattern for string representation is as follows: -/// @li HH:MM:SS:FF -/// @li HH:MM:SS.DDD -/// -/// where: -/// @li HH specifies hours -/// @li MM specifies minutes -/// @li SS specifies seconds -/// @li : specifies normal timecode -/// @li FF specifies the frame number -/// @li . specifies decimal fractions of a second follow -/// @li DDD specifies decimal fractions of a second, rounded down to closest scale -/// -class MP4V2_EXPORT Timecode { -public: - enum Format { - FRAME, - DECIMAL, - }; - -private: - double _scale; - uint64_t _duration; - Format _format; - string _svalue; - - uint64_t _hours; - uint64_t _minutes; - uint64_t _seconds; - uint64_t _subseconds; - -public: - const double& scale; - const uint64_t& duration; - const Format& format; - const string& svalue; - - const uint64_t& hours; - const uint64_t& minutes; - const uint64_t& seconds; - const uint64_t& subseconds; - -public: - Timecode( const Timecode& ); - explicit Timecode( const string&, double = 1.0 ); - explicit Timecode( uint64_t = 0, double = 1.0 ); - - Timecode& operator= ( const Timecode& ); - Timecode& operator+= ( const Timecode& ); - Timecode& operator-= ( const Timecode& ); - - bool operator< ( const Timecode& ) const; - bool operator<= ( const Timecode& ) const; - bool operator> ( const Timecode& ) const; - bool operator>= ( const Timecode& ) const; - bool operator!= ( const Timecode& ) const; - bool operator== ( const Timecode& ) const; - - Timecode operator+ ( const Timecode& ) const; - Timecode operator- ( const Timecode& ) const; - - bool parse( const string&, string* = NULL ); - - void reset(); - - void setScale ( double ); - void setDuration ( uint64_t, double = 0.0 ); - void setFormat ( Format ); - - void setHours ( uint64_t ); - void setMinutes ( uint64_t ); - void setSeconds ( uint64_t ); - void setSubseconds ( uint64_t ); - -private: - uint64_t convertDuration( const Timecode& ) const; - void recompute(); -}; - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util - -#endif // MP4V2_UTIL_TIMECODE_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/TrackModifier.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/TrackModifier.cpp deleted file mode 100644 index 2fdae7ea..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/TrackModifier.cpp +++ /dev/null @@ -1,503 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "libutil/impl.h" - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -TrackModifier::TrackModifier( MP4FileHandle file_, uint16_t trackIndex_ ) - : _track ( refTrackAtom( *static_cast(file_), trackIndex_ )) - , _props ( *this ) // must come after _track is initialized - , _enabled ( false ) - , _inMovie ( false ) - , _inPreview ( false ) - , _layer ( 0 ) - , _alternateGroup ( 0 ) - , _volume ( 1.0f ) - , _width ( 0.0f ) - , _height ( 0.0f ) - , _language ( bmff::ILC_UND ) - , _handlerType ( "" ) - , _handlerName ( "" ) - , _userDataName ( "" ) - , file ( *static_cast(file_) ) - , trackIndex ( trackIndex_ ) - , trackId ( MP4FindTrackId( file_, trackIndex_ )) - , enabled ( _enabled ) - , inMovie ( _inMovie ) - , inPreview ( _inPreview ) - , layer ( _layer ) - , alternateGroup ( _alternateGroup ) - , volume ( _volume ) - , width ( _width ) - , height ( _height ) - , language ( _language ) - , handlerType ( _handlerType ) - , handlerName ( _handlerName ) - , userDataName ( _userDataName ) -{ - fetch(); -} - -/////////////////////////////////////////////////////////////////////////////// - -TrackModifier::~TrackModifier() -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::dump( ostream& out, const string& xind ) -{ - const uint32_t w = 14; - const string eq = " = "; - const string ind = " "; - - out << left << xind << "track[" << trackIndex << "] id=" << trackId - << '\n' << xind << ind << setw( w ) << "type" << eq << toStringTrackType( handlerType ) - << '\n' << xind << ind << setw( w ) << "enabled" << eq << toString( enabled ) - << '\n' << xind << ind << setw( w ) << "inMovie" << eq << toString( inMovie ) - << '\n' << xind << ind << setw( w ) << "inPreview" << eq << toString( inPreview ) - << '\n' << xind << ind << setw( w ) << "layer" << eq << layer - << '\n' << xind << ind << setw( w ) << "alternateGroup" << eq << alternateGroup - << '\n' << xind << ind << setw( w ) << "volume" << eq << toString( volume, 8, 8 ) - << '\n' << xind << ind << setw( w ) << "width" << eq << toString( width, 16, 16 ) - << '\n' << xind << ind << setw( w ) << "height" << eq << toString( height, 16, 16 ) - << '\n' << xind << ind << setw( w ) << "language" << eq << bmff::enumLanguageCode.toString( language, true ) - << '\n' << xind << ind << setw( w ) << "handlerName" << eq << handlerName; - - out << '\n' << xind << ind << setw( w ) << "userDataName" << eq - << ( _props.userDataName ? userDataName : "" ); - - out << '\n'; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::fetch() -{ - _props.update(); - - const uint32_t flags = _props.flags.GetValue(); - _enabled = flags & 0x01; - _inMovie = flags & 0x02; - _inPreview = flags & 0x04; - - _layer = _props.layer.GetValue(); - _alternateGroup = _props.alternateGroup.GetValue(); - _volume = _props.volume.GetValue(); - _width = _props.width.GetValue(); - _height = _props.height.GetValue(); - - _language = _props.language.GetValue(); - _handlerType = _props.handlerType.GetValue(); - _handlerName = _props.handlerName.GetValue(); - - if( _props.userDataName ) { - uint8_t* buffer; - uint32_t size; - _props.userDataName->GetValue( &buffer, &size ); - _userDataName = string( reinterpret_cast(buffer), size ); - } - else { - _userDataName.clear(); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -bool& -TrackModifier::fromString( const string& src, bool& dst ) -{ - if( src == "true" ) - dst = true; - else if ( src == "false" ) - dst = false; - else { - istringstream iss( src ); - iss >> dst; - if( iss.rdstate() != ios::eofbit ) { - ostringstream oss; - oss << "invalid value: " << src; - throw new Exception( oss.str(), __FILE__, __LINE__, __FUNCTION__ ); - } - } - - return dst; -} - -/////////////////////////////////////////////////////////////////////////////// - -float& -TrackModifier::fromString( const string& src, float& dst ) -{ - istringstream iss( src ); - iss >> dst; - if( iss.rdstate() != ios::eofbit ) { - ostringstream oss; - oss << "invalid value: " << src; - throw new Exception( oss.str(), __FILE__, __LINE__, __FUNCTION__ ); - } - - return dst; -} - -/////////////////////////////////////////////////////////////////////////////// - -uint16_t& -TrackModifier::fromString( const string& src, uint16_t& dst ) -{ - istringstream iss( src ); - iss >> dst; - if( iss.rdstate() != ios::eofbit ) { - ostringstream oss; - oss << "invalid value: " << src; - throw new Exception( oss.str(), __FILE__, __LINE__, __FUNCTION__ ); - } - - return dst; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackModifier::hasUserDataName() const -{ - return _props.userDataName != NULL; -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4Atom& -TrackModifier::refTrackAtom( MP4File& file, uint16_t index ) -{ - MP4Atom& root = *file.FindAtom( NULL ); - - ostringstream oss; - oss << "moov.trak[" << index << "]"; - MP4Atom* trak = root.FindAtom( oss.str().c_str() ); - if( !trak ) { - oss.str( "" ); - oss << "trackIndex " << index << " not found"; - throw new Exception( oss.str(), __FILE__, __LINE__, __FUNCTION__ ); - } - - return *trak; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::removeUserDataName() -{ - MP4Atom* name = _track.FindAtom( "trak.udta.name" ); - if( name ) - name->GetParentAtom()->DeleteChildAtom( name ); - - MP4Atom* udta = _track.FindAtom( "trak.udta" ); - if( udta && !udta->GetNumberOfChildAtoms() ) - udta->GetParentAtom()->DeleteChildAtom( udta ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::setAlternateGroup( uint16_t value ) -{ - _props.alternateGroup.SetValue( value ); - fetch(); -} - -void -TrackModifier::setAlternateGroup( const string& value ) -{ - uint16_t tmp; - setAlternateGroup( fromString( value, tmp )); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::setEnabled( bool value ) -{ - _enabled = value; - _props.flags.SetValue( (_enabled ? 0x01 : 0) | (_inMovie ? 0x02 : 0) | (_inPreview ? 0x04 : 0) ); - fetch(); -} - -void -TrackModifier::setEnabled( const string& value ) -{ - bool tmp; - setEnabled( fromString( value, tmp )); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::setHandlerName( const string& value ) -{ - _props.handlerName.SetValue( value.c_str() ); - fetch(); -} -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::setHeight( float value ) -{ - _props.height.SetValue( value ); - fetch(); -} - -void -TrackModifier::setHeight( const string& value ) -{ - float tmp; - setHeight( fromString( value, tmp )); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::setInMovie( bool value ) -{ - _inMovie = value; - _props.flags.SetValue( (_enabled ? 0x01 : 0) | (_inMovie ? 0x02 : 0) | (_inPreview ? 0x04 : 0) ); - fetch(); -} - -void -TrackModifier::setInMovie( const string& value ) -{ - bool tmp; - setInMovie( fromString( value, tmp )); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::setInPreview( bool value ) -{ - _inPreview = value; - _props.flags.SetValue( (_enabled ? 0x01 : 0) | (_inMovie ? 0x02 : 0) | (_inPreview ? 0x04 : 0) ); - fetch(); -} - -void -TrackModifier::setInPreview( const string& value ) -{ - bool tmp; - setInPreview( fromString( value, tmp )); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::setLanguage( bmff::LanguageCode value ) -{ - _props.language.SetValue( value ); - fetch(); -} - -void -TrackModifier::setLanguage( const string& value ) -{ - setLanguage( bmff::enumLanguageCode.toType( value )); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::setLayer( uint16_t value ) -{ - _props.layer.SetValue( value ); - fetch(); -} - -void -TrackModifier::setLayer( const string& value ) -{ - uint16_t tmp; - setLayer( fromString( value, tmp )); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::setUserDataName( const string& value ) -{ - if( !_props.userDataName ) { - ostringstream oss; - oss << "moov.trak[" << trackIndex << "]"; - file.AddDescendantAtoms( oss.str().c_str(), "udta.name" ); - _props.update(); - } - - _props.userDataName->SetValue( reinterpret_cast(value.c_str()), (uint32_t)value.size() ); - fetch(); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::setVolume( float value ) -{ - _props.volume.SetValue( value ); - fetch(); -} - -void -TrackModifier::setVolume( const string& value ) -{ - float tmp; - setVolume( fromString( value, tmp )); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::setWidth( float value ) -{ - _props.width.SetValue( value ); - fetch(); -} - -void -TrackModifier::setWidth( const string& value ) -{ - float tmp; - setWidth( fromString( value, tmp )); -} - -/////////////////////////////////////////////////////////////////////////////// - -string -TrackModifier::toString( bool value ) -{ - ostringstream oss; - oss << (value ? "true" : "false"); - return oss.str(); -} - -/////////////////////////////////////////////////////////////////////////////// - -string -TrackModifier::toString( float value, uint8_t i, uint8_t f ) -{ - ostringstream oss; - oss << fixed << setprecision(f <= 8 ? 4 : 8) << value; - return oss.str(); -} - -/////////////////////////////////////////////////////////////////////////////// - -string -TrackModifier::toStringTrackType( const string& code ) -{ - if( !code.compare( "vide" )) // 14496-12 - return "video"; - if( !code.compare( "soun" )) // 14496-12 - return "audio"; - if( !code.compare( "hint" )) // 14496-12 - return "hint"; - - if( !code.compare( "text" )) // QTFF - return "text"; - if( !code.compare( "tmcd" )) // QTFF - return "timecode"; - - if( !code.compare( "subt" )) // QTFF - return "subtitle"; - - return string( "(" ) + code + ")"; -} - -/////////////////////////////////////////////////////////////////////////////// - -TrackModifier::Properties::Properties( TrackModifier& trackModifier_ ) - : _trackModifier ( trackModifier_ ) - , flags ( static_cast ( refProperty( "trak.tkhd.flags" ))) - , layer ( static_cast ( refProperty( "trak.tkhd.layer" ))) - , alternateGroup ( static_cast ( refProperty( "trak.tkhd.alternate_group" ))) - , volume ( static_cast ( refProperty( "trak.tkhd.volume" ))) - , width ( static_cast ( refProperty( "trak.tkhd.width" ))) - , height ( static_cast ( refProperty( "trak.tkhd.height" ))) - , language ( static_cast( refProperty( "trak.mdia.mdhd.language" ))) - , handlerType ( static_cast ( refProperty( "trak.mdia.hdlr.handlerType" ))) - , handlerName ( static_cast ( refProperty( "trak.mdia.hdlr.name" ))) - , userDataName ( static_cast ( findProperty( "trak.udta.name.value" ))) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4Property* -TrackModifier::Properties::findProperty( const char* name ) -{ - MP4Property* property; - if( !_trackModifier._track.FindProperty( name, &property )) - return NULL; - - return property; -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4Property& -TrackModifier::Properties::refProperty( const char* name ) -{ - MP4Property* property; - if( !_trackModifier._track.FindProperty( name, &property )) { - ostringstream oss; - oss << "trackId " << _trackModifier.trackId << " property '" << name << "' not found"; - throw new Exception( oss.str(), __FILE__, __LINE__, __FUNCTION__ ); - } - - return *property; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::Properties::update() -{ - // update optional properties - updateProperty( "trak.udta.name.value", reinterpret_cast( &userDataName )); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -TrackModifier::Properties::updateProperty( const char* name, MP4Property** pp ) -{ - *pp = NULL; - _trackModifier._track.FindProperty( name, pp ); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/TrackModifier.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/TrackModifier.h deleted file mode 100644 index 798a061f..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/TrackModifier.h +++ /dev/null @@ -1,160 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_UTIL_TRACKMODIFIER_H -#define MP4V2_UTIL_TRACKMODIFIER_H - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -class MP4V2_EXPORT TrackModifier -{ -private: - class Properties - { - private: - TrackModifier& _trackModifier; - - public: - Properties( TrackModifier& ); - - void update(); - - MP4Integer24Property& flags; - MP4Integer16Property& layer; - MP4Integer16Property& alternateGroup; - MP4Float32Property& volume; - MP4Float32Property& width; - MP4Float32Property& height; - MP4LanguageCodeProperty& language; - MP4StringProperty& handlerType; - MP4StringProperty& handlerName; - MP4BytesProperty* userDataName; - - private: - MP4Property& refProperty( const char* ); - MP4Property* findProperty( const char* ); - void updateProperty( const char*, MP4Property** ); - }; - - friend class Properties; - -private: - static MP4Atom& refTrackAtom( MP4File&, uint16_t ); - -private: - MP4Atom& _track; - Properties _props; - - // Track Header - bool _enabled; - bool _inMovie; - bool _inPreview; - uint16_t _layer; - uint16_t _alternateGroup; - float _volume; - float _width; - float _height; - - // Media Header - bmff::LanguageCode _language; - - // Handler Reference - string _handlerType; - string _handlerName; - - // User Data name - string _userDataName; - -public: - MP4File& file; - const uint16_t trackIndex; - const MP4TrackId trackId; - - const bool& enabled; - const bool& inMovie; - const bool& inPreview; - const uint16_t& layer; - const uint16_t& alternateGroup; - const float& volume; - const float& width; - const float& height; - - const bmff::LanguageCode& language; - - const string& handlerType; - const string& handlerName; - - const string& userDataName; - -public: - TrackModifier( MP4FileHandle, uint16_t ); - ~TrackModifier(); - - void setEnabled ( bool ); - void setInMovie ( bool ); - void setInPreview ( bool ); - void setLayer ( uint16_t ); - void setAlternateGroup ( uint16_t ); - void setVolume ( float ); - void setWidth ( float ); - void setHeight ( float ); - void setLanguage ( bmff::LanguageCode ); - void setHandlerName ( const string& ); - void setUserDataName ( const string& ); - - // set by string - void setEnabled ( const string& ); - void setInMovie ( const string& ); - void setInPreview ( const string& ); - void setLayer ( const string& ); - void setAlternateGroup ( const string& ); - void setVolume ( const string& ); - void setWidth ( const string& ); - void setHeight ( const string& ); - void setLanguage ( const string& ); - - bool hasUserDataName() const; - void removeUserDataName(); - - void dump( ostream&, const string& ); - -private: - void fetch(); - - static string toString( bool ); - static string toString( float, uint8_t, uint8_t ); - - static bool& fromString( const string&, bool& ); - static float& fromString( const string&, float& ); - static uint16_t& fromString( const string&, uint16_t& ); - - static string toStringTrackType( const string& ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util - -#endif // MP4V2_UTIL_TRACKMODIFIER_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Utility.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Utility.cpp deleted file mode 100644 index 76cdd122..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Utility.cpp +++ /dev/null @@ -1,758 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "libutil/impl.h" - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -Utility::Utility( string name_, int argc_, char** argv_ ) - : _longOptions ( NULL ) - , _name ( name_ ) - , _argc ( argc_ ) - , _argv ( argv_ ) - , _optimize ( false ) - , _dryrun ( false ) - , _keepgoing ( false ) - , _overwrite ( false ) - , _force ( false ) - , _debug ( 0 ) - , _verbosity ( 1 ) - , _jobCount ( 0 ) - , _debugImplicits ( false ) - , _group ( "OPTIONS" ) - -,STD_OPTIMIZE( 'z', false, "optimize", false, LC_NONE, "optimize mp4 file after modification" ) -,STD_DRYRUN( 'y', false, "dryrun", false, LC_NONE, "do not actually create or modify any files" ) -,STD_KEEPGOING( 'k', false, "keepgoing", false, LC_NONE, "continue batch processing even after errors" ) -,STD_OVERWRITE( 'o', false, "overwrite", false, LC_NONE, "overwrite existing files when creating" ) -,STD_FORCE( 'f', false, "force", false, LC_NONE, "force overwrite even if file is read-only" ) -,STD_QUIET( 'q', false, "quiet", false, LC_NONE, "equivalent to --verbose 0" ) -,STD_DEBUG( 'd', false, "debug", true, LC_DEBUG, "increase debug or long-option to set NUM", "NUM", - // 79-cols, inclusive, max desired width - // |----------------------------------------------------------------------------| - "\nDEBUG LEVELS (for raw mp4 file I/O)" - "\n 0 supressed" - "\n 1 add warnings and errors (default)" - "\n 2 add table details" - "\n 3 add implicits" - "\n 4 everything" ) -,STD_VERBOSE( 'v', false, "verbose", true, LC_VERBOSE, "increase verbosity or long-option to set NUM", "NUM", - // 79-cols, inclusive, max desired width - // |----------------------------------------------------------------------------| - "\nVERBOSE LEVELS" - "\n 0 warnings and errors" - "\n 1 normal informative messages (default)" - "\n 2 more informative messages" - "\n 3 everything" ) -,STD_HELP( 'h', false, "help", false, LC_HELP, "print brief help or long-option for extended help" ) -,STD_VERSION( 0, false, "version", false, LC_VERSION, "print version information and exit" ) -,STD_VERSIONX( 0, false, "versionx", false, LC_VERSIONX, "print extended version information", "ARG", "", true ) - -{ - debugUpdate( 1 ); - - _usage = ""; - _description = ""; - _groups.push_back( &_group ); -} - -/////////////////////////////////////////////////////////////////////////////// - -Utility::~Utility() -{ - delete[] _longOptions; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Utility::batch( int argi ) -{ - _jobCount = 0; - _jobTotal = _argc - argi; - - // nothing to be done - if( !_jobTotal ) - return SUCCESS; - - bool batchResult = FAILURE; - for( int i = argi; i < _argc; i++ ) { - bool subResult = FAILURE; - try { - if( !job( _argv[i] )) { - batchResult = SUCCESS; - subResult = SUCCESS; - } - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - - if( !_keepgoing && subResult == FAILURE ) - return FAILURE; - } - - return batchResult; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::debugUpdate( uint32_t debug ) -{ - MP4LogLevel level; - - _debug = debug; - verbose2f( "debug level: %u\n", _debug ); - - switch( _debug ) { - case 0: - level = MP4_LOG_NONE; - _debugImplicits = false; - break; - - case 1: - level = MP4_LOG_ERROR; - _debugImplicits = false; - break; - - case 2: - level = MP4_LOG_VERBOSE2; - _debugImplicits = false; - break; - - case 3: - level = MP4_LOG_VERBOSE2; - _debugImplicits = true; - break; - - case 4: - default: - level = MP4_LOG_VERBOSE4; - _debugImplicits = true; - break; - } - - MP4LogSetLevel(level); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Utility::dryrunAbort() -{ - if( !_dryrun ) - return false; - - verbose2f( "skipping: dry-run mode enabled\n" ); - return true; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::errf( const char* format, ... ) -{ - va_list ap; - va_start( ap, format ); - vfprintf( stderr, format, ap ); - va_end( ap ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::formatGroups() -{ - // determine longest long-option [+space +argname] - int longMax = 0; - list::reverse_iterator ie = _groups.rend(); - for( list::reverse_iterator it = _groups.rbegin(); it != ie; it++ ) { - Group& group = **it; - const Group::List::const_iterator ieo = group.options.end(); - for( Group::List::const_iterator ito = group.options.begin(); ito != ieo; ito++ ) { - const Option& option = **ito; - if( option.hidden ) - continue; - - int len = (int)option.lname.length(); - if( option.lhasarg ) - len += 1 + (int)option.argname.length(); - if( len > longMax ) - longMax = len; - } - } - - // format help output (no line-wrapping yet) - ostringstream oss; - - int groupCount = 0; - int optionCount = 0; - ie = _groups.rend(); - for( list::reverse_iterator it = _groups.rbegin(); it != ie; it++, groupCount++ ) { - if( groupCount ) - oss << '\n'; - Group& group = **it; - oss << '\n' << group.name; - const Group::List::const_iterator ieo = group.options.end(); - for( Group::List::const_iterator ito = group.options.begin(); ito != ieo; ito++, optionCount++ ) { - const Option& option = **ito; - if( option.hidden ) - continue; - - oss << "\n "; - - if( option.scode == 0 ) - oss << " --"; - else - oss << '-' << option.scode << ", --"; - - if( option.lhasarg ) { - oss << option.lname << ' ' << option.argname; - oss << setw( longMax - option.lname.length() - 1 - option.argname.length() ) << ""; - } - else { - oss << setw( longMax ) << left << option.lname; - } - - oss << " "; - - const string::size_type imax = option.descr.length(); - for( string::size_type i = 0; i < imax; i++ ) - oss << option.descr[i]; - } - } - - _help = oss.str(); - - // allocate and populate C-style options - delete[] _longOptions; - _longOptions = new prog::Option[optionCount + 1]; - - // fill EOL marker - _longOptions[optionCount].name = NULL; - _longOptions[optionCount].type = prog::Option::NO_ARG; - _longOptions[optionCount].flag = 0; - _longOptions[optionCount].val = 0; - - _shortOptions.clear(); - - int optionIndex = 0; - ie = _groups.rend(); - for( list::reverse_iterator it = _groups.rbegin(); it != ie; it++ ) { - Group& group = **it; - const Group::List::const_iterator ieo = group.options.end(); - for( Group::List::const_iterator ito = group.options.begin(); ito != ieo; ito++, optionIndex++ ) { - const Option& a = **ito; - prog::Option& b = _longOptions[optionIndex]; - - b.name = const_cast(a.lname.c_str()); - b.type = a.lhasarg ? prog::Option::REQUIRED_ARG : prog::Option::NO_ARG; - b.flag = 0; - b.val = (a.lcode == LC_NONE) ? a.scode : a.lcode; - - if( a.scode != 0 ) { - _shortOptions += a.scode; - if( a.shasarg ) - _shortOptions += ':'; - } - } - } -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Utility::job( string arg ) -{ - verbose2f( "job begin: %s\n", arg.c_str() ); - - // perform job - JobContext job( arg ); - bool result = FAILURE; - try { - result = utility_job( job ); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - - // close file handle flagged with job - if( job.fileHandle != MP4_INVALID_FILE_HANDLE ) { - verbose2f( "closing %s\n", job.file.c_str() ); - MP4Close( job.fileHandle ); - - // invoke optimize if flagged - if( _optimize && job.optimizeApplicable ) { - verbose1f( "optimizing %s\n", job.file.c_str() ); - if( !MP4Optimize( job.file.c_str(), NULL )) - hwarnf( "optimize failed: %s\n", job.file.c_str() ); - } - } - - // free data flagged with job - list::iterator ie = job.tofree.end(); - for( list::iterator it = job.tofree.begin(); it != ie; it++ ) - free( *it ); - - - verbose2f( "job end\n" ); - _jobCount++; - return result; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Utility::herrf( const char* format, ... ) -{ - va_list ap; - va_start( ap, format ); - - if( _keepgoing ) { - fprintf( stdout, "WARNING: " ); - vfprintf( stdout, format, ap ); - } - else { - fprintf( stderr, "ERROR: " ); - vfprintf( stderr, format, ap ); - } - - va_end( ap ); - return FAILURE; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Utility::hwarnf( const char* format, ... ) -{ - fprintf( stdout, "WARNING: " ); - va_list ap; - va_start( ap, format ); - vfprintf( stdout, format, ap ); - va_end( ap ); - return FAILURE; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::outf( const char* format, ... ) -{ - va_list ap; - va_start( ap, format ); - vfprintf( stdout, format, ap ); - va_end( ap ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::printHelp( bool extended, bool toerr ) -{ - ostringstream oss; - oss << "Usage: " << _name << " " << _usage << '\n' << _description << '\n' << _help; - - if( extended ) { - const list::reverse_iterator ie = _groups.rend(); - for( list::reverse_iterator it = _groups.rbegin(); it != ie; it++ ) { - Group& group = **it; - const Group::List::const_iterator ieo = group.options.end(); - for( Group::List::const_iterator ito = group.options.begin(); ito != ieo; ito++ ) { - const Option& option = **ito; - if( option.help.empty() ) - continue; - - oss << '\n' << option.help; - } - } - } - - if( toerr ) - errf( "%s\n\n", oss.str().c_str() ); - else - outf( "%s\n\n", oss.str().c_str() ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::printUsage( bool toerr ) -{ - ostringstream oss; - oss << "Usage: " << _name << " " << _usage - << "\nTry -h for brief help or --help for extended help"; - - if( toerr ) - errf( "%s\n", oss.str().c_str() ); - else - outf( "%s\n", oss.str().c_str() ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::printVersion( bool extended ) -{ - ostringstream oss; - oss << left; - - if( extended ) { - oss << setw(13) << "utility:" << _name - << '\n' << setw(13) << "product:" << MP4V2_PROJECT_name - << '\n' << setw(13) << "version:" << MP4V2_PROJECT_version - << '\n' << setw(13) << "build date:" << MP4V2_PROJECT_build - << '\n' - << '\n' << setw(18) << "repository URL:" << MP4V2_PROJECT_repo_url - << '\n' << setw(18) << "repository root:" << MP4V2_PROJECT_repo_root - << '\n' << setw(18) << "repository UUID:" << MP4V2_PROJECT_repo_uuid - << '\n' << setw(18) << "repository rev:" << MP4V2_PROJECT_repo_rev - << '\n' << setw(18) << "repository date:" << MP4V2_PROJECT_repo_date - << '\n' << setw(18) << "repository type:" << MP4V2_PROJECT_repo_type; - } - else { - oss << _name << " - " << MP4V2_PROJECT_name_formal; - } - - outf( "%s\n", oss.str().c_str() ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Utility::process() -{ - bool rv = true; - - try { - rv = process_impl(); - } - catch( Exception* x ) { - _keepgoing = false; - mp4v2::impl::log.errorf(*x); - delete x; - } - - return rv; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Utility::process_impl() -{ - formatGroups(); - - // populate code lookup set - set codes; - const Group::List::const_iterator ie = _group.options.end(); - for( Group::List::const_iterator it = _group.options.begin(); it != ie; it++ ) { - const Option& option = **it; - if( option.scode != 0 ) - codes.insert( option.scode ); - if( option.lcode != LC_NONE ) - codes.insert( option.lcode ); - } - - for( ;; ) { - const int code = prog::getOption( _argc, _argv, _shortOptions.c_str(), _longOptions, NULL ); - if( code == -1 ) - break; - - bool handled = false; - if( utility_option( code, handled )) - return FAILURE; - if( handled ) - continue; - - if( codes.find( code ) == codes.end() ) - continue; - - switch( code ) { - case 'z': - _optimize = true; - break; - - case 'y': - _dryrun = true; - break; - - case 'k': - _keepgoing = true; - break; - - case 'o': - _overwrite = true; - break; - - case 'f': - _force = true; - break; - - case 'q': - _verbosity = 0; - debugUpdate( 0 ); - break; - - case 'v': - _verbosity++; - break; - - case 'd': - debugUpdate( _debug + 1 ); - break; - - case 'h': - printHelp( false, false ); - return SUCCESS; - - case LC_DEBUG: - debugUpdate( std::strtoul( prog::optarg, NULL, 0 ) ); - break; - - case LC_VERBOSE: - { - const uint32_t level = std::strtoul( prog::optarg, NULL, 0 ); - _verbosity = ( level < 4 ) ? level : 3; - break; - } - - case LC_HELP: - printHelp( true, false ); - return SUCCESS; - - case LC_VERSION: - printVersion( false ); - return SUCCESS; - - case LC_VERSIONX: - printVersion( true ); - return SUCCESS; - - default: - printUsage( true ); - return FAILURE; - } - } - - if( !(prog::optind < _argc) ) { - printUsage( true ); - return FAILURE; - } - - const bool result = batch( prog::optind ); - verbose2f( "exit code %d\n", result ); - return result; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -Utility::openFileForWriting( io::File& file ) -{ - // simple case is file does not exist - if( !io::FileSystem::exists( file.name )) { - if( file.open() ) - return herrf( "unable to open %s for write: %s\n", file.name.c_str(), sys::getLastErrorStr() ); - return SUCCESS; - } - - // fail if overwrite is not enabled - if( !_overwrite ) - return herrf( "file already exists: %s\n", file.name.c_str() ); - - // only overwrite if it is a file - if( !io::FileSystem::isFile( file.name )) - return herrf( "cannot overwrite non-file: %s\n", file.name.c_str() ); - - // first attemp to re-open/truncate so as to keep any file perms - if( !file.open() ) - return SUCCESS; - - // fail if force is not enabled - if( !_force ) - return herrf( "unable to overwrite file: %s\n", file.name.c_str() ); - - // first attempt to open, truncating file - if( !file.open() ) - return SUCCESS; - - // nuke file - if( ::remove( file.name.c_str() )) - return herrf( "unable to remove %s: %s\n", file.name.c_str(), sys::getLastErrorStr() ); - - // final effort - if( !file.open() ) - return SUCCESS; - - return herrf( "unable to open %s for write: %s\n", file.name.c_str(), sys::getLastErrorStr() ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::verbose( uint32_t level, const char* format, va_list ap ) -{ - if( level > _verbosity ) - return; - vfprintf( stdout, format, ap ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::verbose1f( const char* format, ... ) -{ - va_list ap; - va_start( ap, format ); - verbose( 1, format, ap ); - va_end( ap ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::verbose2f( const char* format, ... ) -{ - va_list ap; - va_start( ap, format ); - verbose( 2, format, ap ); - va_end( ap ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::verbose3f( const char* format, ... ) -{ - va_list ap; - va_start( ap, format ); - verbose( 3, format, ap ); - va_end( ap ); -} - -/////////////////////////////////////////////////////////////////////////////// - -const bool Utility::SUCCESS = false; -const bool Utility::FAILURE = true; - -/////////////////////////////////////////////////////////////////////////////// - -Utility::Group::Group( string name_ ) - : name ( name_ ) - , options ( _options ) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -Utility::Group::~Group() -{ - const List::iterator ie = _optionsDelete.end(); - for( List::iterator it = _optionsDelete.begin(); it != ie; it++ ) - delete *it; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::Group::add( const Option& option ) -{ - _options.push_back( &option ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::Group::add( - char scode, - bool shasarg, - string lname, - bool lhasarg, - uint32_t lcode, - string descr, - string argname, - string help, - bool hidden ) -{ - Option* o = new Option( scode, shasarg, lname, lhasarg, lcode, descr, argname, help, hidden ); - _options.push_back( o ); - _optionsDelete.push_back( o ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Utility::Group::add( - string lname, - bool lhasarg, - uint32_t lcode, - string descr, - string argname, - string help, - bool hidden ) -{ - add( 0, false, lname, lhasarg, lcode, descr, argname, help, hidden ); -} - -/////////////////////////////////////////////////////////////////////////////// - -Utility::Option::Option( - char scode_, - bool shasarg_, - string lname_, - bool lhasarg_, - uint32_t lcode_, - string descr_, - string argname_, - string help_, - bool hidden_ ) - : scode ( scode_ ) - , shasarg ( shasarg_ ) - , lname ( lname_ ) - , lhasarg ( lhasarg_ ) - , lcode ( lcode_ ) - , descr ( descr_ ) - , argname ( argname_ ) - , help ( help_ ) - , hidden ( hidden_ ) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -Utility::JobContext::JobContext( string file_ ) - : file ( file_ ) - , fileHandle ( MP4_INVALID_FILE_HANDLE ) - , optimizeApplicable ( false ) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Utility.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Utility.h deleted file mode 100644 index 26d57b8d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/Utility.h +++ /dev/null @@ -1,205 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_UTIL_UTILITY_H -#define MP4V2_UTIL_UTILITY_H - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// -/// -/// Utility general program class. -/// -/// This class provides a base implementation for a general utility which -/// helps meet behavioral criteria for command-line executables. -/// -/// Inherit batch processing ability is also provided and is used optionally -/// by the concrete implementation. -/// -/// Criteria and guidelines for utility behavior in MP4v2 are as follows: -/// @li exit with 0 when the utility succeeds at its main task, 1 for failure. -/// @li print brief-usage when no arguments are supplied and exit with 1. -/// @li print brief-usage when too many arguments are supplied and exit with 1. -/// @li issue brief-usage when invalid argument is supplied and exit with 1. -/// @li support --help option and exit with 0. -/// @li support --version option and exit with 0. -/// @li utilities which create new output files should never -/// over-write an existing file unless given the project's universal -/// '-o' or '--overwrite' option. -/// -/////////////////////////////////////////////////////////////////////////////// -class MP4V2_EXPORT Utility -{ -protected: - enum LongCode { - LC_NONE = 0xf0000000, // safe (cannot conflict with char values) - LC_DEBUG, - LC_VERBOSE, - LC_HELP, - LC_VERSION, - LC_VERSIONX, - _LC_MAX // will be used to seeed derived-class long-codes enum - }; - - class MP4V2_EXPORT Option { - public: - Option( char, bool, string, bool, uint32_t, string, string = "ARG", string = "", bool = false ); - - const char scode; - const bool shasarg; - const string lname; - const bool lhasarg; - const uint32_t lcode; - const string descr; - const string argname; - const string help; - const bool hidden; - }; - - class MP4V2_EXPORT Group { - public: - explicit Group( string ); - ~Group(); - - void add( const Option& ); // options added this way will not be deleted - void add( char, bool, string, bool, uint32_t, string, string = "ARG", string = "", bool = false ); - void add( string, bool, uint32_t, string, string = "ARG", string = "", bool = false ); - - const string name; - - public: - typedef list List; - - private: - List _options; - List _optionsDelete; - - public: - const List& options; - }; - - //! structure passed as argument to each job during batch processing - class MP4V2_EXPORT JobContext - { - public: - JobContext( string file_ ); - - const string file; //!< file job is working on - MP4FileHandle fileHandle; //!< handle of file, if applicable to job - bool optimizeApplicable; //!< indicate file optimization is applicable - list tofree; //!< memory to free at end of job - }; - -public: - virtual ~Utility(); - - bool process(); - -protected: - Utility( string, int, char** ); - - void printUsage ( bool ); //!< print usage - void printHelp ( bool, bool ); //!< print help - void printVersion ( bool ); //!< print utility version - - void errf ( const char*, ... ) MP4V2_WFORMAT_PRINTF(2,3); //!< print to stderr - void outf ( const char*, ... ) MP4V2_WFORMAT_PRINTF(2,3); //!< print to stdout - - bool herrf ( const char*, ... ) MP4V2_WFORMAT_PRINTF(2,3); //!< print to stderr indicating error - bool hwarnf ( const char*, ... ) MP4V2_WFORMAT_PRINTF(2,3); //!< print to stderr indicating warning - - void verbose1f ( const char*, ... ) MP4V2_WFORMAT_PRINTF(2,3); - void verbose2f ( const char*, ... ) MP4V2_WFORMAT_PRINTF(2,3); - void verbose3f ( const char*, ... ) MP4V2_WFORMAT_PRINTF(2,3); - - bool batch ( int ); //!< process all remaining arguments (jobs) - bool job ( string ); //!< process next argument - - //! open file in consideration of overwrite/force options - bool openFileForWriting( io::File& ); - - bool dryrunAbort(); - - // delegates - virtual bool utility_option( int, bool& ) = 0; //!< process command-line option - virtual bool utility_job( JobContext& ) = 0; //!< process positional argument - -private: - void formatGroups(); - void debugUpdate( uint32_t ); - void verbose( uint32_t, const char*, va_list ); - bool process_impl(); - -private: - string _help; - - prog::Option* _longOptions; - string _shortOptions; - -protected: - const string _name; //!< executable basename - const int _argc; //!< arg count - char* const* const _argv; //!< arg vector - - // common options state - bool _optimize; //!< optimize mp4 file after modification - bool _dryrun; //!< dry-run, no writing is actually performed - bool _keepgoing; //!< contine batch processing even after error - bool _overwrite; //!< overwrite file if already exists - bool _force; //!< force overwriting a file even if read-only - uint32_t _debug; //!< mp4 file I/O verbosity - uint32_t _verbosity; //!< verbosity level, default=1 - - uint32_t _jobCount; - uint32_t _jobTotal; - bool _debugImplicits; - - Group _group; // group to which standard options are added - string _usage; - string _description; - list _groups; - -protected: - // standard options for concrete utilities to add to _group in constructor - const Option STD_OPTIMIZE; - const Option STD_DRYRUN; - const Option STD_KEEPGOING; - const Option STD_OVERWRITE; - const Option STD_FORCE; - const Option STD_QUIET; - const Option STD_DEBUG; - const Option STD_VERBOSE; - const Option STD_HELP; - const Option STD_VERSION; - const Option STD_VERSIONX; - -public: - static const bool SUCCESS; - static const bool FAILURE; -}; - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util - -#endif // MP4V2_UTIL_UTILITY_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/crc.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/crc.cpp deleted file mode 100644 index 18d1147d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/crc.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 1988, 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "libutil/impl.h" - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -uint32_t -crc32( const unsigned char* data, uint32_t size ) -{ - static const uint32_t __crctab[256] = { - 0x0, - 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, - 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, - 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, - 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac, - 0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f, - 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a, - 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, - 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, - 0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, - 0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, 0xddb056fe, - 0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, - 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4, - 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0, - 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, - 0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, - 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07, - 0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c, - 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, - 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, - 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, - 0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, - 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d, - 0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, - 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f, - 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, - 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, - 0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, - 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a, - 0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629, - 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c, - 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, - 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, - 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, - 0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8, - 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, - 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2, - 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, - 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, - 0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, - 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21, - 0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a, - 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, 0x18197087, - 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, - 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, - 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, - 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, - 0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, - 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0x89b8fd09, - 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, - 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, - 0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4, - }; - -#define COMPUTE(var,ch) (var) = (var) << 8 ^ __crctab[(var) >> 24 ^ (ch)] - - uint32_t crc = 0; - const unsigned char* const max = data + size; - - for (const unsigned char* p = data; p < max; p++) - COMPUTE( crc, *p ); - - for( ; size != 0; size >>= 8 ) - COMPUTE( crc, size & 0xff ); - - return ~crc; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/crc.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/crc.h deleted file mode 100644 index 470b14d4..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/crc.h +++ /dev/null @@ -1,38 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_UTIL_CRC_H -#define MP4V2_UTIL_CRC_H - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -MP4V2_EXPORT -uint32_t crc32( const unsigned char*, uint32_t ); // ISO/IEC 8802-3:1989 - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util - -#endif // MP4V2_UTIL_CRC_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/impl.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/impl.h deleted file mode 100644 index 3824a14b..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/impl.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef MP4V2_UTIL_IMPL_H -#define MP4V2_UTIL_IMPL_H - -/////////////////////////////////////////////////////////////////////////////// - -#include "util.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_UTIL_IMPL_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/other.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/other.cpp deleted file mode 100644 index 698b5888..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/other.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "libutil/impl.h" - -namespace mp4v2 { namespace util { - using namespace mp4v2::impl; - -/////////////////////////////////////////////////////////////////////////////// - -// search atom recursively for any 64-bit characteristics. -// nlargsize indicates number of atoms which use largesize extension. -// nversion1 indicates number of atoms which use version==1 extension. -// nspecial indicates number of special 64-bit atoms; -// eg: stbl may container one of { stco || co64 } for chunkoffsets. - -void -searchFor64bit( MP4Atom& atom, FileSummaryInfo& info ) -{ - const uint32_t max = atom.GetNumberOfChildAtoms(); - for( uint32_t i = 0; i < max; i++ ) { - MP4Atom& child = *atom.GetChildAtom( i ); - - if( child.GetLargesizeMode() ) - info.nlargesize++; - - MP4Integer8Property* version; - if( child.FindProperty( "version", (MP4Property**)&version ) && version->GetValue() == 1 ) - info.nversion1++; - - if( !strcmp( child.GetType(), "co64" )) - info.nspecial++; - - searchFor64bit( child, info ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -fileFetchSummaryInfo( MP4FileHandle file, FileSummaryInfo& info ) -{ - if( file == MP4_INVALID_FILE_HANDLE ) - return true; - MP4File& mp4 = *((MP4File*)file); - - MP4Atom* root = mp4.FindAtom( "" ); - if( !root ) - return true; - - MP4FtypAtom* ftyp = (MP4FtypAtom*)root->FindAtom( "ftyp" ); - if( !ftyp ) - return true; - - info.major_brand = ftyp->majorBrand.GetValue(); - info.minor_version = ftyp->minorVersion.GetValue(); - - const uint32_t cbmax = ftyp->compatibleBrands.GetCount(); - for( uint32_t i = 0; i < cbmax; i++ ) { - string s = ftyp->compatibleBrands.GetValue( i ); - - // remove spaces so brand set is presentable - string stripped; - const string::size_type max = s.length(); - for( string::size_type pos = 0; pos < max; pos++ ) { - if( s[pos] != ' ' ) - stripped += s[pos]; - } - - if( stripped.empty() ) - continue; - - info.compatible_brands.insert( stripped ); - } - - info.nlargesize = 0; - info.nversion1 = 0; - info.nspecial = 0; - searchFor64bit( *root, info ); - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/other.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/other.h deleted file mode 100644 index 83d54113..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/other.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef MP4V2_UTIL_OTHER_H -#define MP4V2_UTIL_OTHER_H - -/////////////////////////////////////////////////////////////////////////////// - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -struct MP4V2_EXPORT FileSummaryInfo { - typedef set BrandSet; - - // standard ftyp box attributes - string major_brand; - uint32_t minor_version; - BrandSet compatible_brands; - - uint32_t nlargesize; - uint32_t nversion1; - uint32_t nspecial; -}; - -/////////////////////////////////////////////////////////////////////////////// -/// -/// Fetch mp4 file summary information. -/// -/// This function fetches summary information for file and information -/// is stored in info. -/// -/// @return On success true. -/// On failure false, and contents of info are undefined. -/// -MP4V2_EXPORT -bool fileFetchSummaryInfo( MP4FileHandle file, FileSummaryInfo& info ); - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util - -#endif // MP4V2_UTIL_OTHER_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/util.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/util.h deleted file mode 100644 index 2ea72465..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/libutil/util.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef MP4V2_UTIL_UTIL_H -#define MP4V2_UTIL_UTIL_H - -/////////////////////////////////////////////////////////////////////////////// - -#include "src/src.h" - -/////////////////////////////////////////////////////////////////////////////// - -/// @namespace mp4v2::util (private) Command-line utility support. -/// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. -/// -/// This namespace is used for command-line utilities. Some symbols from this -/// namespace are exported from libmp4v2 in order to support new functionality -/// which may or may not make it into some form of public API, at which time -/// it will be moved out of this namespace. -/// -namespace mp4v2 { namespace util { - using namespace std; - using namespace mp4v2::impl; -}} // namespace mp4v2::util - -/////////////////////////////////////////////////////////////////////////////// - -#include "Database.h" -#include "Timecode.h" -#include "TrackModifier.h" -#include "Utility.h" -#include "crc.h" -#include "other.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_UTIL_UTIL_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4 b/debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4 deleted file mode 100644 index 57fed633..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4 +++ /dev/null @@ -1,25 +0,0 @@ -define(<<__PROJECT_name>>, <>)dnl -define(<<__PROJECT_name_lower>>, <>)dnl -define(<<__PROJECT_name_upper>>, <>)dnl -define(<<__PROJECT_name_formal>>, <>)dnl -define(<<__PROJECT_url_website>>, <>)dnl -define(<<__PROJECT_url_downloads>>, <>)dnl -define(<<__PROJECT_url_discussion>>, <>)dnl -define(<<__PROJECT_irc>>, <>)dnl -define(<<__PROJECT_bugreport>>, <<>>)dnl -define(<<__PROJECT_version>>, <<2.0.0>>)dnl -define(<<__PROJECT_version_hex>>, <<0x00020000>>)dnl -define(<<__PROJECT_version_major>>, <<2>>)dnl -define(<<__PROJECT_version_minor>>, <<0>>)dnl -define(<<__PROJECT_version_point>>, <<0>>)dnl -define(<<__PROJECT_repo_url>>, <>)dnl -define(<<__PROJECT_repo_branch>>, <<2.0.0>>)dnl -define(<<__PROJECT_repo_root>>, <>)dnl -define(<<__PROJECT_repo_uuid>>, <<6e6572fa-98a6-11dd-ad9f-f77439c74b79>>)dnl -define(<<__PROJECT_repo_rev>>, <<493>>)dnl -define(<<__PROJECT_repo_date>>, <<2012-05-20 15:16:54 -0700 (Sun, 20 May 2012)>>)dnl -define(<<__PROJECT_repo_type>>, <>)dnl -define(<<__PROJECT_build>>, <>)dnl -dnl -define(<<__MAKE_ABS_TOP_BUILDDIR>>, <>)dnl -define(<<__MAKE_ABS_TOP_SRCDIR>>, <>)dnl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4.in b/debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4.in deleted file mode 100644 index dc96a41d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4.in +++ /dev/null @@ -1,25 +0,0 @@ -define(<<__PROJECT_name>>, <<@PROJECT_name@>>)dnl -define(<<__PROJECT_name_lower>>, <<@PROJECT_name_lower@>>)dnl -define(<<__PROJECT_name_upper>>, <<@PROJECT_name_upper@>>)dnl -define(<<__PROJECT_name_formal>>, <<@PROJECT_name_formal@>>)dnl -define(<<__PROJECT_url_website>>, <<@PROJECT_url_website@>>)dnl -define(<<__PROJECT_url_downloads>>, <<@PROJECT_url_downloads@>>)dnl -define(<<__PROJECT_url_discussion>>, <<@PROJECT_url_discussion@>>)dnl -define(<<__PROJECT_irc>>, <<@PROJECT_irc@>>)dnl -define(<<__PROJECT_bugreport>>, <<@PROJECT_bugreport@>>)dnl -define(<<__PROJECT_version>>, <<@PROJECT_version@>>)dnl -define(<<__PROJECT_version_hex>>, <<@PROJECT_version_hex@>>)dnl -define(<<__PROJECT_version_major>>, <<@PROJECT_version_major@>>)dnl -define(<<__PROJECT_version_minor>>, <<@PROJECT_version_minor@>>)dnl -define(<<__PROJECT_version_point>>, <<@PROJECT_version_point@>>)dnl -define(<<__PROJECT_repo_url>>, <<@PROJECT_repo_url@>>)dnl -define(<<__PROJECT_repo_branch>>, <<@PROJECT_repo_branch@>>)dnl -define(<<__PROJECT_repo_root>>, <<@PROJECT_repo_root@>>)dnl -define(<<__PROJECT_repo_uuid>>, <<@PROJECT_repo_uuid@>>)dnl -define(<<__PROJECT_repo_rev>>, <<@PROJECT_repo_rev@>>)dnl -define(<<__PROJECT_repo_date>>, <<@PROJECT_repo_date@>>)dnl -define(<<__PROJECT_repo_type>>, <<@PROJECT_repo_type@>>)dnl -define(<<__PROJECT_build>>, <<@PROJECT_build@>>)dnl -dnl -define(<<__MAKE_ABS_TOP_BUILDDIR>>, <<@abs_top_builddir@>>)dnl -define(<<__MAKE_ABS_TOP_SRCDIR>>, <<@abs_top_srcdir@>>)dnl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4sugar b/debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4sugar deleted file mode 100644 index 1f99b156..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/project/project.m4sugar +++ /dev/null @@ -1,15 +0,0 @@ -dnl -dnl This file defines highest-level project meta-data in autoconf M4 format. -dnl It is needed downstream by configure.ac. -dnl -define([PRJ_name], [MP4v2]) -define([PRJ_name_lower], [mp4v2]) -define([PRJ_name_upper], [MP4V2]) -define([PRJ_url_website], [http://code.google.com/p/mp4v2]) -define([PRJ_url_downloads], [http://code.google.com/p/mp4v2/downloads/list]) -define([PRJ_url_discussion], [http://groups.google.com/group/mp4v2]) -define([PRJ_irc], [irc://irc.freenode.net/handbrake]) -define([PRJ_bugreport], [kidjan@gmail.com]) -define([PRJ_version_major], [2]) -define([PRJ_version_minor], [0]) -define([PRJ_version_point], [0]) diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/3gp.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/3gp.cpp deleted file mode 100644 index f6ec12e6..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/3gp.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Ximpo Group Ltd. mp4v2@ximpo.com - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -#define _3GP_MAJOR_BRAND "3gp5" -#define _3GP_MINOR_VERSION 0x0001 - -void MP4File::Make3GPCompliant(const char* fileName, char* majorBrand, uint32_t minorVersion, char** supportedBrands, uint32_t supportedBrandsCount, bool deleteIodsAtom) -{ - char brand[5] = "3gp5"; - char* _3gpSupportedBrands[1] = { (char*)&brand }; - - if (majorBrand) { - if (!supportedBrands || !supportedBrandsCount) { - throw new Exception("Invalid parameters", __FILE__, __LINE__, __FUNCTION__); - } - } - - MakeFtypAtom( - majorBrand ? majorBrand : (char*)brand, - majorBrand ? minorVersion : _3GP_MINOR_VERSION, - majorBrand ? supportedBrands : (char**)_3gpSupportedBrands, - majorBrand ? supportedBrandsCount : 1); - - if (deleteIodsAtom) { - // Delete the iods atom, if it exists.... - MP4Atom* iodsAtom = m_pRootAtom->FindAtom("moov.iods"); - if (iodsAtom) { - MP4Atom* moovAtom = m_pRootAtom->FindAtom("moov"); - ASSERT(moovAtom); - - moovAtom->DeleteChildAtom(iodsAtom); - } - } - -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ac3.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ac3.cpp deleted file mode 100644 index 300f4c11..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ac3.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * See ETSI TS 102 366 V1.2.1 Annex F for how to put Ac3 in MP4. - * - * Contributor(s): - * Edward Groenendaal egroenen@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4Ac3Atom::MP4Ac3Atom(MP4File &file) - : MP4Atom(file, "ac-3") -{ - AddReserved(*this, "reserved1", 6); /* 0 */ - - AddProperty( /* 1 */ - new MP4Integer16Property(*this,"dataReferenceIndex")); - - AddReserved(*this,"reserved2", 8); /* 2 */ - - AddProperty( /* 3 */ - new MP4Integer16Property(*this,"channelCount")); - - AddProperty( /* 4 */ - new MP4Integer16Property(*this,"sampleSize")); - - AddReserved(*this,"reserved3", 4); /* 5 */ - - AddProperty( /* 6 */ - new MP4Integer16Property(*this,"samplingRate")); - - AddReserved(*this,"reserved4", 2); /* 7 */ - - ExpectChildAtom("dac3", Required, OnlyOne); -} - -void MP4Ac3Atom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); // data-reference-index - ((MP4Integer16Property*)m_pProperties[3])->SetValue(2); // channelCount - ignored - ((MP4Integer16Property*)m_pProperties[4])->SetValue(0x0010); // sampleSize - ignored - - // The user should set the samplingRate as appropriate - and create the dac3 atom -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_amr.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_amr.cpp deleted file mode 100644 index b2a21b3a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_amr.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Ximpo Group Ltd. mp4v2@ximpo.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4AmrAtom::MP4AmrAtom(MP4File &file, const char *type) - : MP4Atom(file, type) -{ - AddReserved(*this,"reserved1", 6); /* 0 */ - - AddProperty( /* 1 */ - new MP4Integer16Property(*this,"dataReferenceIndex")); - - AddReserved(*this,"reserved2", 16); /* 2 */ - - AddProperty( /* 3 */ - new MP4Integer16Property(*this,"timeScale")); - - AddReserved(*this,"reserved3", 2); /* 4 */ - - ExpectChildAtom("damr", Required, OnlyOne); -} - -void MP4AmrAtom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - - // property reserved2 has non-zero fixed values - static uint8_t reserved2[16] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, - }; - m_pProperties[2]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[2])-> - SetValue(reserved2, sizeof(reserved2)); - m_pProperties[2]->SetReadOnly(true); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_avc1.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_avc1.cpp deleted file mode 100644 index 3599f3ee..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_avc1.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2004. All Rights Reserved. - * - * Contributor(s): - * Bill May wmay@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4Avc1Atom::MP4Avc1Atom(MP4File &file) - : MP4Atom(file, "avc1") -{ - AddReserved(*this, "reserved1", 6); /* 0 */ - - AddProperty( /* 1 */ - new MP4Integer16Property(*this, "dataReferenceIndex")); - - AddReserved(*this, "reserved2", 16); /* 2 */ - - AddProperty( /* 3 */ - new MP4Integer16Property(*this, "width")); - AddProperty( /* 4 */ - new MP4Integer16Property(*this, "height")); - - AddReserved(*this, "reserved3", 14); /* 5 */ - - MP4StringProperty* pProp = - new MP4StringProperty(*this, "compressorName"); - pProp->SetFixedLength(32); - pProp->SetCountedFormat(true); - pProp->SetValue("JVT/AVC Coding"); - AddProperty(pProp); /* 6 */ - - AddReserved(*this, "reserved4", 4); /* 7 */ - - ExpectChildAtom("avcC", Required, OnlyOne); - ExpectChildAtom("btrt", Optional, OnlyOne); - ExpectChildAtom("colr", Optional, OnlyOne); - ExpectChildAtom("pasp", Optional, OnlyOne); - // for now ExpectChildAtom("m4ds", Optional, OnlyOne); -} - -void MP4Avc1Atom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - - // property reserved3 has non-zero fixed values - static uint8_t reserved3[14] = { - 0x00, 0x48, 0x00, 0x00, - 0x00, 0x48, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, - }; - m_pProperties[5]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[5])-> - SetValue(reserved3, sizeof(reserved3)); - m_pProperties[5]->SetReadOnly(true); - - // property reserved4 has non-zero fixed values - static uint8_t reserved4[4] = { - 0x00, 0x18, 0xFF, 0xFF, - }; - m_pProperties[7]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[7])-> - SetValue(reserved4, sizeof(reserved4)); - m_pProperties[7]->SetReadOnly(true); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_avcC.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_avcC.cpp deleted file mode 100644 index ac477a2d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_avcC.cpp +++ /dev/null @@ -1,273 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2004. All Rights Reserved. - * - * Contributor(s): - * Bill May wmay@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -/* - * SizeTableProperty is a special version of the MP4TableProperty - - * the BytesProperty will need to set the value before it can read - * from the file - */ -class SizeTableProperty : public MP4TableProperty -{ -public: - SizeTableProperty(MP4Atom& parentAtom, const char *name, MP4IntegerProperty *pCountProperty) : - MP4TableProperty(parentAtom, name, pCountProperty) {}; -protected: - void ReadEntry(MP4File& file, uint32_t index) { - // Each table has a size, followed by the length field - // first, read the length - m_pProperties[0]->Read(file, index); - MP4IntegerProperty *pIntProp = (MP4IntegerProperty *)m_pProperties[0]; - // set the size in the bytes property - MP4BytesProperty *pBytesProp = (MP4BytesProperty *)m_pProperties[1]; - pBytesProp->SetValueSize(pIntProp->GetValue(index), index); - // And read the bytes - m_pProperties[1]->Read(file, index); - }; -private: - SizeTableProperty(); - SizeTableProperty ( const SizeTableProperty &src ); - SizeTableProperty &operator= ( const SizeTableProperty &src ); -}; - -MP4AvcCAtom::MP4AvcCAtom(MP4File &file) - : MP4Atom(file, "avcC") -{ - MP4BitfieldProperty *pCount; - MP4TableProperty *pTable; - - AddProperty( new MP4Integer8Property(*this,"configurationVersion")); /* 0 */ - - AddProperty( new MP4Integer8Property(*this,"AVCProfileIndication")); /* 1 */ - - AddProperty( new MP4Integer8Property(*this,"profile_compatibility")); /* 2 */ - - AddProperty( new MP4Integer8Property(*this,"AVCLevelIndication")); /* 3 */ - - AddProperty( new MP4BitfieldProperty(*this,"reserved", 6)); /* 4 */ - AddProperty( new MP4BitfieldProperty(*this,"lengthSizeMinusOne", 2)); /* 5 */ - AddProperty( new MP4BitfieldProperty(*this,"reserved1", 3)); /* 6 */ - pCount = new MP4BitfieldProperty(*this,"numOfSequenceParameterSets", 5); - AddProperty(pCount); /* 7 */ - - pTable = new SizeTableProperty(*this,"sequenceEntries", pCount); - AddProperty(pTable); /* 8 */ - pTable->AddProperty(new MP4Integer16Property(pTable->GetParentAtom(),"sequenceParameterSetLength")); - pTable->AddProperty(new MP4BytesProperty(pTable->GetParentAtom(),"sequenceParameterSetNALUnit")); - - MP4Integer8Property *pCount2 = new MP4Integer8Property(*this,"numOfPictureParameterSets"); - AddProperty(pCount2); /* 9 */ - - pTable = new SizeTableProperty(*this,"pictureEntries", pCount2); - AddProperty(pTable); /* 10 */ - pTable->AddProperty(new MP4Integer16Property(pTable->GetParentAtom(),"pictureParameterSetLength")); - pTable->AddProperty(new MP4BytesProperty(pTable->GetParentAtom(),"pictureParameterSetNALUnit")); -} - -void MP4AvcCAtom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer8Property*)m_pProperties[0])->SetValue(1); - - m_pProperties[4]->SetReadOnly(false); - ((MP4BitfieldProperty*)m_pProperties[4])->SetValue(0x3f); - m_pProperties[4]->SetReadOnly(true); - - m_pProperties[6]->SetReadOnly(false); - ((MP4BitfieldProperty*)m_pProperties[6])->SetValue(0x7); - m_pProperties[6]->SetReadOnly(true); -#if 0 - // property reserved4 has non-zero fixed values - static uint8_t reserved4[4] = { - 0x00, 0x18, 0xFF, 0xFF, - }; - m_pProperties[7]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[7])-> - SetValue(reserved4, sizeof(reserved4)); - m_pProperties[7]->SetReadOnly(true); -#endif -} - -// -// Clone - clone my properties to destination atom -// -// this method simplifies duplicating avcC atom properties from -// source to destination file using a single API rather than -// having to copy each property. This API encapsulates the object -// so the application layer need not concern with each property -// thereby isolating any future changes to atom properties. -// -// ---------------------------------------- -// property description -// ---------------------------------------- -// -// 0 configurationVersion -// 1 AVCProfileIndication -// 2 profile_compatibility -// 3 AVCLevelIndication -// 4 reserved -// 5 lengthSizeMinusOne -// 6 reserved -// 7 number of SPS -// 8 SPS entries -// 9 number of PPS -// 10 PPS entries -// -// -void MP4AvcCAtom::Clone(MP4AvcCAtom *dstAtom) -{ - - MP4Property *dstProperty; - MP4TableProperty *pTable; - uint16_t i16; - uint64_t i32; - uint64_t i64; - uint8_t *tmp; - - // source pointer Property I16 - MP4Integer16Property *spPI16; - // source pointer Property Bytes - MP4BytesProperty *spPB; - - // dest pointer Property I16 - MP4Integer16Property *dpPI16; - // dest pointer Property Bytes - MP4BytesProperty *dpPB; - - - // start with defaults and reserved fields - dstAtom->Generate(); - - // 0, 4, 6 are now generated from defaults - // leaving 1, 2, 3, 5, 7, 8, 9, 10 to export - - dstProperty=dstAtom->GetProperty(1); - ((MP4Integer8Property *)dstProperty)->SetValue( - ((MP4Integer8Property *)m_pProperties[1])->GetValue()); - - dstProperty=dstAtom->GetProperty(2); - ((MP4Integer8Property *)dstProperty)->SetValue( - ((MP4Integer8Property *)m_pProperties[2])->GetValue()); - - dstProperty=dstAtom->GetProperty(3); - ((MP4Integer8Property *)dstProperty)->SetValue( - ((MP4Integer8Property *)m_pProperties[3])->GetValue()); - - dstProperty=dstAtom->GetProperty(5); - ((MP4BitfieldProperty *)dstProperty)->SetValue( - ((MP4BitfieldProperty *)m_pProperties[5])->GetValue()); - - // - // 7 and 8 are related SPS (one set of sequence parameters) - // - // first the count bitfield - // - dstProperty=dstAtom->GetProperty(7); - dstProperty->SetReadOnly(false); - ((MP4BitfieldProperty *)dstProperty)->SetValue( - ((MP4BitfieldProperty *)m_pProperties[7])->GetValue()); - dstProperty->SetReadOnly(true); - - // next export SPS Length and NAL bytes */ - - // first source pointers - pTable = (MP4TableProperty *) m_pProperties[8]; - spPI16 = (MP4Integer16Property *)pTable->GetProperty(0); - spPB = (MP4BytesProperty *)pTable->GetProperty(1); - - // now dest pointers - dstProperty=dstAtom->GetProperty(8); - pTable = (MP4TableProperty *) dstProperty; - dpPI16 = (MP4Integer16Property *)pTable->GetProperty(0); - dpPB = (MP4BytesProperty *)pTable->GetProperty(1); - - // sps length - i16 = spPI16->GetValue(); - i64 = i16; - // FIXME - this leaves m_maxNumElements =2 - // but src atom m_maxNumElements is 1 - dpPI16->InsertValue(i64, 0); - - // export byte array - i32 = i16; - // copy bytes to local buffer - tmp = (uint8_t *)MP4Malloc(i32); - ASSERT(tmp != NULL); - spPB->CopyValue(tmp, 0); - // set element count - dpPB->SetCount(1); - // copy bytes - dpPB->SetValue(tmp, i32, 0); - MP4Free((void *)tmp); - - // - // 9 and 10 are related PPS (one set of picture parameters) - // - // first the integer8 count - // - dstProperty=dstAtom->GetProperty(9); - dstProperty->SetReadOnly(false); - ((MP4Integer8Property *)dstProperty)->SetValue( - ((MP4Integer8Property *)m_pProperties[9])->GetValue()); - dstProperty->SetReadOnly(true); - - // next export PPS Length and NAL bytes */ - - // first source pointers - pTable = (MP4TableProperty *) m_pProperties[10]; - spPI16 = (MP4Integer16Property *)pTable->GetProperty(0); - spPB = (MP4BytesProperty *)pTable->GetProperty(1); - - // now dest pointers - dstProperty=dstAtom->GetProperty(10); - pTable = (MP4TableProperty *) dstProperty; - dpPI16 = (MP4Integer16Property *)pTable->GetProperty(0); - dpPB = (MP4BytesProperty *)pTable->GetProperty(1); - - // pps length - i16 = spPI16->GetValue(); - i64 = i16; - dpPI16->InsertValue(i64, 0); - - // export byte array - i32 = i16; - // copy bytes to local buffer - tmp = (uint8_t *)MP4Malloc(i32); - ASSERT(tmp != NULL); - spPB->CopyValue(tmp, 0); - // set element count - dpPB->SetCount(1); - // copy bytes - dpPB->SetValue(tmp, i32, 0); - MP4Free((void *)tmp); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_chpl.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_chpl.cpp deleted file mode 100644 index d4eea2b7..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_chpl.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -// MP4ChplAtom is for Nero chapter list atom which is a child of udta -MP4ChplAtom::MP4ChplAtom (MP4File &file) - : MP4Atom(file, "chpl") -{ - // it is not completely clear if version, flags, reserved and chaptercount - // have the right sizes but - // one thing is clear: chaptercount is not only 8-bit it is at least 16-bit - - // add the version - AddVersionAndFlags(); - - // add reserved bytes - AddReserved(*this,"reserved", 1); - - // define the chaptercount - MP4Integer32Property * counter = new MP4Integer32Property(*this,"chaptercount"); - AddProperty(counter); - - // define the chapterlist - MP4TableProperty * list = new MP4TableProperty(*this,"chapters", counter); - - // the start time as 100 nanoseconds units - list->AddProperty(new MP4Integer64Property(*this,"starttime")); - - // the chapter name as UTF-8 - list->AddProperty(new MP4StringProperty(*this,"title", true)); - - // add the chapterslist - AddProperty(list); -} - -void MP4ChplAtom::Generate () -{ - SetVersion(1); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_colr.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_colr.cpp deleted file mode 100644 index 965173ea..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_colr.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * Contributer has declined to give copyright information, and gives - * it freely to the world. - * - * Contributor(s): - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4ColrAtom::MP4ColrAtom(MP4File &file) - : MP4Atom(file, "colr") -{ - MP4StringProperty* cpt = new MP4StringProperty(*this,"colorParameterType"); - cpt->SetFixedLength(4); - AddProperty(cpt); /* 0 */ - - AddProperty( /* 1 */ new MP4Integer16Property(*this,"primariesIndex")); - - AddProperty( /* 2 */ new MP4Integer16Property(*this,"transferFunctionIndex")); - - AddProperty( /* 3 */ new MP4Integer16Property(*this,"matrixIndex")); -} - -void MP4ColrAtom::Generate() -{ - MP4Atom::Generate(); - - ((MP4StringProperty*)m_pProperties[0])->SetValue("nclc"); - // default to ITU BT.709 values - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - ((MP4Integer16Property*)m_pProperties[2])->SetValue(1); - ((MP4Integer16Property*)m_pProperties[3])->SetValue(1); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_d263.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_d263.cpp deleted file mode 100644 index 66e78edf..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_d263.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Ximpo Group Ltd. mp4v2@ximpo.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -#define H263_VENDOR 0x6d346970 - -MP4D263Atom::MP4D263Atom(MP4File &file) - : MP4Atom(file, "d263") -{ - AddProperty( /* 0 */ - new MP4Integer32Property(*this, "vendor")); - - AddProperty( /* 1 */ - new MP4Integer8Property(*this, "decoderVersion")); - - AddProperty( /* 2 */ - new MP4Integer8Property(*this, "h263Level")); - - AddProperty( /* 3 */ - new MP4Integer8Property(*this, "h263Profile")); - - ExpectChildAtom("bitr", Optional, OnlyOne); - -} - -void MP4D263Atom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer32Property*)m_pProperties[0])->SetValue(H263_VENDOR); - ((MP4Integer8Property*)m_pProperties[1])->SetValue(1); - -} - -void MP4D263Atom::Write() -{ - // Check whether we have valid values in the bitr atom - // (if it exists, of course) - MP4Atom* bitrAtom = FindAtom("d263.bitr"); - if (bitrAtom) { - uint32_t avgBitrate; - uint32_t maxBitrate; - - MP4Integer32Property* pProp; - bitrAtom->FindProperty("bitr.avgBitrate", - (MP4Property**)&pProp, - NULL); - ASSERT(pProp); - avgBitrate = pProp->GetValue(); - - bitrAtom->FindProperty("bitr.maxBitrate", - (MP4Property**)&pProp, - NULL); - ASSERT(pProp); - maxBitrate = pProp->GetValue(); - - if (!maxBitrate && !avgBitrate) { - DeleteChildAtom(bitrAtom); - } - } - - MP4Atom::Write(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_dac3.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_dac3.cpp deleted file mode 100644 index 32f7e62f..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_dac3.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * See ETSI TS 102 366 V1.2.1 Annex F for how to put Ac3 in MP4. - * - * Contributor(s): - * Edward Groenendaal egroenen@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - - -MP4DAc3Atom::MP4DAc3Atom(MP4File &file) - : MP4Atom(file, "dac3") -{ - AddProperty( new MP4BitfieldProperty(*this, "fscod", 2)); /* 0 */ - AddProperty( new MP4BitfieldProperty(*this, "bsid", 5)); /* 1 */ - AddProperty( new MP4BitfieldProperty(*this, "bsmod", 3)); /* 2 */ - AddProperty( new MP4BitfieldProperty(*this, "acmod", 3)); /* 3 */ - AddProperty( new MP4BitfieldProperty(*this, "lfeon", 1)); /* 4 */ - AddProperty( new MP4BitfieldProperty(*this, "bit_rate_code", 5)); /* 5 */ - AddProperty( new MP4BitfieldProperty(*this, "reserved", 5)); /* 6 */ - m_pProperties[6]->SetReadOnly(true); -} - -void MP4DAc3Atom::Generate() -{ - MP4Atom::Generate(); - - -} - -/* - * Normalling the Dump of the atom looks like the following, we want to spruce - * this up a bit to give more information. - * - * type = dac3 - * fscod = 0 (0x0) <2 bits> - * bsid = 8 (0x08) <5 bits> - * bsmod = 0 (0x0) <3 bits> - * acmod = 7 (0x7) <3 bits> - * lfeon = 1 (0x1) <1 bits> - * bit_rate_code = 15 (0x0f) <5 bits> - * reserved = 0 (0x00) <5 bits> - * - * into: - * type = dac3 - * fscod = 0 (0x0) <2 bits> [48 kHz] - * bsid = 8 (0x08) <5 bits> - * bsmod = 0 (0x0) <3 bits> [Main audio service: complete main (CM)] - * acmod = 7 (0x7) <3 bits> [3/2 (L, C, R, SL, SR)] - * lfeon = 1 (0x1) <1 bits> [ENABLED] - * bit_rate_code = 15 (0x0f) <5 bits> [448 kbit/s] - * reserved = 0 (0x00) <5 bits> - * - */ -void MP4DAc3Atom::Dump(uint8_t indent, bool dumpImplicits) -{ - - MP4BitfieldProperty* fscodProp = ((MP4BitfieldProperty*)m_pProperties[0]); - MP4BitfieldProperty* bsidProp = ((MP4BitfieldProperty*)m_pProperties[1]); - MP4BitfieldProperty* bsmodProp = ((MP4BitfieldProperty*)m_pProperties[2]); - MP4BitfieldProperty* acmodProp = ((MP4BitfieldProperty*)m_pProperties[3]); - MP4BitfieldProperty* lfeonProp = ((MP4BitfieldProperty*)m_pProperties[4]); - MP4BitfieldProperty* brcProp = ((MP4BitfieldProperty*)m_pProperties[5]); - MP4BitfieldProperty* resProp = ((MP4BitfieldProperty*)m_pProperties[6]); - - log.dump(indent++, MP4_LOG_VERBOSE2, "\"%s\": type = dac3", - GetFile().GetFilename().c_str() ); - - if (fscodProp) { - uint64_t fscod = 0xFF; - const char* fscodString; - const char* fscods[] = { - "48", "44.1", "32", "Reserved", - }; - - fscod = fscodProp->GetValue(); - - if (fscod < (sizeof(fscods) / sizeof(fscods[0]))) { - fscodString = fscods[fscod]; - } else { - fscodString = "Invalid value"; - } - - uint8_t hexWidth = fscodProp->GetNumBits() / 4; - if (hexWidth == 0 || (fscodProp->GetNumBits() % 4)) { - hexWidth++; - } - - log.dump(indent, MP4_LOG_VERBOSE2, "\"%s\": fscod = %" PRIu64 " (0x%0*" PRIx64 ") <%u bits> [%s kHz]", - GetFile().GetFilename().c_str(), - fscod, (int)hexWidth, fscod, fscodProp->GetNumBits(), fscodString); - } - if (bsidProp) bsidProp->Dump(indent, dumpImplicits); - - if (bsmodProp) { - uint64_t bsmod = 0xFF; - const char* bsmodString; - const char* bsmods[] = { - "Main audio service: complete main (CM)", - "Main audio srrvice: music and effects (ME)", - "Associated service: visually impaired (VI)", - "Associated service: hearing impaired (HI)", - "Associated service: dialogue (D)", - "Associated service: commentary (C)", - "Associated service: emergency (E)", - "Associated service: voice over (VO) or Main audio service: karaoke", - }; - - bsmod = bsmodProp->GetValue(); - - if (bsmod < (sizeof(bsmods) / sizeof(bsmods[0]))) { - bsmodString = bsmods[bsmod]; - } else { - bsmodString = "Invalid value"; - } - - uint8_t hexWidth = bsmodProp->GetNumBits() / 4; - if (hexWidth == 0 || (bsmodProp->GetNumBits() % 4)) { - hexWidth++; - } - - log.dump(indent, MP4_LOG_VERBOSE2, - "\"%s\": bsmod = %" PRIu64 " (0x%0*" PRIx64 ") <%u bits> [%s]", - GetFile().GetFilename().c_str(), - bsmod, (int)hexWidth, bsmod, bsmodProp->GetNumBits(), bsmodString); - } - - if (acmodProp) { - uint64_t acmod = 0xFF; - const char* acmodString; - - const char* acmods[] = { - "1 + 1 (Ch1, Ch2)", - "1/0 (C)", - "2/0 (L, R)", - "3/0 (L, C, R)", - "2/1 (L, R, S)", - "3/1 (L, C, R, S)", - "2/2 (L, R, SL, SR)", - "3/2 (L, C, R, SL, SR)", - }; - - acmod = acmodProp->GetValue(); - - if (acmod < (sizeof(acmods) / sizeof(acmods[0]))) { - acmodString = acmods[acmod]; - } else { - acmodString = "Invalid value"; - } - - uint8_t hexWidth = acmodProp->GetNumBits() / 4; - if (hexWidth == 0 || (acmodProp->GetNumBits() % 4)) { - hexWidth++; - } - - log.dump(indent, MP4_LOG_VERBOSE2, - "\"%s\": acmod = %" PRIu64 " (0x%0*" PRIx64 ") <%u bits> [%s]", - GetFile().GetFilename().c_str(), - acmod, (int)hexWidth, acmod, acmodProp->GetNumBits(), acmodString); - } - - if (lfeonProp) { - uint64_t lfeon = lfeonProp->GetValue(); - uint8_t hexWidth = lfeonProp->GetNumBits() / 4; - - if (hexWidth == 0 || (lfeonProp->GetNumBits() % 4)) { - hexWidth++; - } - - log.dump(indent, MP4_LOG_VERBOSE2, - "\"%s\": lfeon = %" PRIu64 " (0x%0*" PRIx64 ") <%u bits> [%s]", - GetFile().GetFilename().c_str(), lfeon, (int)hexWidth, lfeon, - lfeonProp->GetNumBits(), lfeon ? "ENABLED" : "DISABLED"); - } - - if (brcProp) { - uint32_t bit_rate_codes[] = { - 32, - 40, - 48, - 56, - 64, - 80, - 96, - 112, - 128, - 160, - 192, - 224, - 256, - 320, - 384, - 448, - 512, - 576, - 640, - }; - uint64_t bit_rate_code = brcProp->GetValue(); - uint32_t bit_rate; - - if (bit_rate_code < (sizeof(bit_rate_codes) / sizeof(bit_rate_codes[0]))) { - bit_rate = bit_rate_codes[bit_rate_code]; - } else { - bit_rate = 0; - } - - uint8_t hexWidth = brcProp->GetNumBits() / 4; - if (hexWidth == 0 || (brcProp->GetNumBits() % 4)) { - hexWidth++; - } - - log.dump(indent, MP4_LOG_VERBOSE2, - "\"%s\": bit_rate_code = %" PRIu64 " (0x%0*" PRIx64 ") <%u bits> [%" PRIu32 " kbit/s]", - GetFile().GetFilename().c_str(), - bit_rate_code, (int)hexWidth, bit_rate_code, - brcProp->GetNumBits(), bit_rate); - } - if (resProp) resProp->Dump(indent, dumpImplicits); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_damr.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_damr.cpp deleted file mode 100644 index 16177823..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_damr.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Ximpo Group Ltd. mp4v2@ximpo.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -#define AMR_VENDOR 0x6d346970 - -MP4DamrAtom::MP4DamrAtom(MP4File &file) - : MP4Atom(file, "damr") -{ - AddProperty( /* 0 */ - new MP4Integer32Property(*this, "vendor")); - - AddProperty( /* 1 */ - new MP4Integer8Property(*this, "decoderVersion")); - - AddProperty( /* 2 */ - new MP4Integer16Property(*this, "modeSet")); - - AddProperty( /* 3 */ - new MP4Integer8Property(*this, "modeChangePeriod")); - - AddProperty( /* 4 */ - new MP4Integer8Property(*this, "framesPerSample")); - -} - -void MP4DamrAtom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer32Property*)m_pProperties[0])->SetValue(AMR_VENDOR); - ((MP4Integer8Property*)m_pProperties[1])->SetValue(1); - -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_dref.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_dref.cpp deleted file mode 100644 index b174c7a4..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_dref.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4DrefAtom::MP4DrefAtom(MP4File &file) - : MP4Atom(file, "dref") -{ - AddVersionAndFlags(); - - MP4Integer32Property* pCount = - new MP4Integer32Property(*this, "entryCount"); - pCount->SetReadOnly(); - AddProperty(pCount); - - ExpectChildAtom("url ", Optional, Many); - ExpectChildAtom("urn ", Optional, Many); - ExpectChildAtom("alis", Optional, Many); -} - -void MP4DrefAtom::Read() -{ - /* do the usual read */ - MP4Atom::Read(); - - // check that number of children == entryCount - MP4Integer32Property* pCount = - (MP4Integer32Property*)m_pProperties[2]; - - if (m_pChildAtoms.Size() != pCount->GetValue()) { - log.warningf("%s: \"%s\": dref inconsistency with number of entries", - __FUNCTION__, GetFile().GetFilename().c_str() ); - - /* fix it */ - pCount->SetReadOnly(false); - pCount->SetValue(m_pChildAtoms.Size()); - pCount->SetReadOnly(true); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_elst.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_elst.cpp deleted file mode 100644 index cadc1072..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_elst.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4ElstAtom::MP4ElstAtom(MP4File &file) - : MP4Atom(file, "elst") -{ - AddVersionAndFlags(); - - MP4Integer32Property* pCount = - new MP4Integer32Property(*this, "entryCount"); - AddProperty(pCount); - - MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); - AddProperty(pTable); -} - -void MP4ElstAtom::AddProperties(uint8_t version) -{ - MP4TableProperty* pTable = (MP4TableProperty*)m_pProperties[3]; - - if (version == 1) { - pTable->AddProperty( - new MP4Integer64Property(pTable->GetParentAtom(), "segmentDuration")); - pTable->AddProperty( - new MP4Integer64Property(pTable->GetParentAtom(), "mediaTime")); - } else { - pTable->AddProperty( - new MP4Integer32Property(pTable->GetParentAtom(), "segmentDuration")); - pTable->AddProperty( - new MP4Integer32Property(pTable->GetParentAtom(), "mediaTime")); - } - - pTable->AddProperty( - new MP4Integer16Property(pTable->GetParentAtom(), "mediaRate")); - pTable->AddProperty( - new MP4Integer16Property(pTable->GetParentAtom(), "reserved")); -} - -void MP4ElstAtom::Generate() -{ - SetVersion(0); - AddProperties(GetVersion()); - - MP4Atom::Generate(); -} - -void MP4ElstAtom::Read() -{ - /* read atom version */ - ReadProperties(0, 1); - - /* need to create the properties based on the atom version */ - AddProperties(GetVersion()); - - /* now we can read the remaining properties */ - ReadProperties(1); - - Skip(); // to end of atom -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_enca.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_enca.cpp deleted file mode 100644 index 700fa574..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_enca.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Alix Marchandise-Franquet alix@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4EncaAtom::MP4EncaAtom(MP4File &file) - : MP4Atom(file, "enca") -{ - AddReserved(*this, "reserved1", 6); /* 0 */ - - AddProperty( /* 1 */ - new MP4Integer16Property(*this, "dataReferenceIndex")); - - AddReserved(*this, "reserved2", 16); /* 2 */ - - AddProperty( /* 3 */ - new MP4Integer16Property(*this, "timeScale")); - - AddReserved(*this, "reserved3", 2); /* 4 */ - - ExpectChildAtom("esds", Required, OnlyOne); - ExpectChildAtom("sinf", Required, OnlyOne); -} - -void MP4EncaAtom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - - // property reserved2 has non-zero fixed values - static uint8_t reserved2[16] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, - }; - m_pProperties[2]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[2])-> - SetValue(reserved2, sizeof(reserved2)); - m_pProperties[2]->SetReadOnly(true); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_encv.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_encv.cpp deleted file mode 100644 index ce97ece7..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_encv.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Alix Marchandise-Franquet alix@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4EncvAtom::MP4EncvAtom(MP4File &file) - : MP4Atom(file, "encv") -{ - AddReserved(*this, "reserved1", 6); /* 0 */ - - AddProperty( /* 1 */ - new MP4Integer16Property(*this, "dataReferenceIndex")); - - AddReserved(*this, "reserved2", 16); /* 2 */ - - AddProperty( /* 3 */ - new MP4Integer16Property(*this, "width")); - AddProperty( /* 4 */ - new MP4Integer16Property(*this, "height")); - - AddReserved(*this, "reserved3", 14); /* 5 */ - - MP4StringProperty* pProp = - new MP4StringProperty(*this, "compressorName"); - pProp->SetFixedLength(32); - pProp->SetCountedFormat(true); - pProp->SetValue(""); - AddProperty(pProp); /* 6 */ - AddReserved(*this, "reserved4", 4); /* 7 */ - - ExpectChildAtom("esds", Required, OnlyOne); - ExpectChildAtom("sinf", Required, OnlyOne); - ExpectChildAtom("avcC", Optional, OnlyOne); -} - -void MP4EncvAtom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - - // property reserved3 has non-zero fixed values - static uint8_t reserved3[14] = { - 0x00, 0x48, 0x00, 0x00, - 0x00, 0x48, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, - }; - m_pProperties[5]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[5])-> - SetValue(reserved3, sizeof(reserved3)); - m_pProperties[5]->SetReadOnly(true); - - // property reserved4 has non-zero fixed values - static uint8_t reserved4[4] = { - 0x00, 0x18, 0xFF, 0xFF, - }; - m_pProperties[7]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[7])-> - SetValue(reserved4, sizeof(reserved4)); - m_pProperties[7]->SetReadOnly(true); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_free.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_free.cpp deleted file mode 100644 index 5450e046..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_free.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4FreeAtom::MP4FreeAtom( MP4File &file, const char* type ) - : MP4Atom( file, type ? type : "free" ) -{ -} - -void MP4FreeAtom::Read() -{ - Skip(); -} - -void MP4FreeAtom::Write() -{ - bool use64 = (GetSize() > (0xFFFFFFFF - 8)); - BeginWrite(use64); -#if 1 - for (uint64_t ix = 0; ix < GetSize(); ix++) { - m_File.WriteUInt8(0); - } -#else - m_File.SetPosition(m_File.GetPosition() + GetSize()); -#endif - FinishWrite(use64); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ftab.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ftab.cpp deleted file mode 100644 index 1a1ea057..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ftab.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4FtabAtom::MP4FtabAtom(MP4File &file) - : MP4Atom(file, "ftab") -{ - MP4Integer16Property* pCount = new MP4Integer16Property(*this, "entryCount"); /* 0 */ - AddProperty(pCount); - - MP4TableProperty* pTable = new MP4TableProperty(*this, "fontEntries", pCount); /* 1 */ - AddProperty(pTable); - - pTable->AddProperty(new MP4Integer16Property(pTable->GetParentAtom(), "fontID")); /* 0 */ - pTable->AddProperty(new MP4StringProperty(pTable->GetParentAtom(), "name", true)); /* 1 */ -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ftyp.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ftyp.cpp deleted file mode 100644 index 92b47d60..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ftyp.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4FtypAtom::MP4FtypAtom(MP4File &file) - : MP4Atom( file, "ftyp" ) - , majorBrand ( *new MP4StringProperty( *this, "majorBrand" )) - , minorVersion ( *new MP4Integer32Property( *this, "minorVersion" )) - , compatibleBrands ( *new MP4StringProperty( *this, "compatibleBrands", false, false, true )) -{ - majorBrand.SetFixedLength( 4 ); - compatibleBrands.SetFixedLength( 4 ); - - AddProperty( &majorBrand ); - AddProperty( &minorVersion ); - AddProperty( &compatibleBrands ); -} - -void MP4FtypAtom::Generate() -{ - MP4Atom::Generate(); - - majorBrand.SetValue( "mp42" ); - minorVersion.SetValue( 0 ); - - compatibleBrands.SetCount( 2 ); - compatibleBrands.SetValue( "mp42", 0 ); - compatibleBrands.SetValue( "isom", 1 ); -} - -void MP4FtypAtom::Read() -{ - compatibleBrands.SetCount( (m_size - 8) / 4 ); // brands array fills rest of atom - MP4Atom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_gmin.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_gmin.cpp deleted file mode 100644 index cb94a1e6..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_gmin.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * Contributer has declined to give copyright information, and gives - * it freely to the world. - * - * Contributor(s): - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4GminAtom::MP4GminAtom(MP4File &file) - : MP4Atom(file, "gmin") -{ - - AddVersionAndFlags(); /* 0, 1 */ - - AddProperty(new MP4Integer16Property(*this, "graphicsMode")); /* 2 */ - AddProperty(new MP4Integer16Property(*this, "opColorRed")); /* 3 */ - AddProperty(new MP4Integer16Property(*this, "opColorGreen")); /* 4 */ - AddProperty(new MP4Integer16Property(*this, "opColorBlue")); /* 5 */ - AddProperty(new MP4Integer16Property(*this, "balance")); /* 6 */ - AddReserved(*this, "reserved", 2); /* 7 */ - -} - -void MP4GminAtom::Generate() -{ - - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[2])->SetValue(0x0040); - ((MP4Integer16Property*)m_pProperties[3])->SetValue(0x8000); - ((MP4Integer16Property*)m_pProperties[4])->SetValue(0x8000); - ((MP4Integer16Property*)m_pProperties[5])->SetValue(0x8000); - ((MP4Integer16Property*)m_pProperties[6])->SetValue(0x0000); - -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hdlr.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hdlr.cpp deleted file mode 100644 index db33e7e5..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hdlr.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4HdlrAtom::MP4HdlrAtom(MP4File &file) - : MP4Atom(file, "hdlr") -{ - AddVersionAndFlags(); /* 0, 1 */ - AddReserved(*this, "reserved1", 4); /* 2 */ - MP4StringProperty* pProp = new MP4StringProperty(*this, "handlerType"); - pProp->SetFixedLength(4); - AddProperty(pProp); /* 3 */ - AddReserved(*this, "reserved2", 12); /* 4 */ - AddProperty( /* 5 */ - new MP4StringProperty(*this, "name")); -} - -// There is a spec incompatiblity between QT and MP4 -// QT says name field is a counted string -// MP4 says name field is a null terminated string -// Here we attempt to make all things work -void MP4HdlrAtom::Read() -{ - // read all the properties but the "name" field - ReadProperties(0, 5); - - uint64_t pos = m_File.GetPosition(); - uint64_t end = GetEnd(); - if (pos == end) { - // A hdlr atom with missing "name". - // Apparently that's what some of the iTunes m4p files have. - return; - } - - // take a peek at the next byte - uint8_t strLength; - m_File.PeekBytes(&strLength, 1); - // if the value matches the remaining atom length - if (pos + strLength + 1 == end) { - // read a counted string - MP4StringProperty* pNameProp = - (MP4StringProperty*)m_pProperties[5]; - pNameProp->SetCountedFormat(true); - ReadProperties(5); - pNameProp->SetCountedFormat(false); - } else { - // read a null terminated string - try { - // Unfortunately, there are some invalid mp4 writers that don't - // null the hdlr name string. Generally this will be "automatically" - // terminated for them by the size field of the subsequent atom. So if - // our size is off by one...let it slide. otherwise, rethrow. - // The Skip() call will set our start to the correct location - // for the next Atom. See issue #52 - ReadProperties(5); - } - catch(Exception* x) { - if( m_File.GetPosition() - GetEnd() == 1 ) - delete x; - else - throw x; - } - } - - Skip(); // to end of atom -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hinf.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hinf.cpp deleted file mode 100644 index 5f6f8d70..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hinf.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4HinfAtom::MP4HinfAtom(MP4File &file) - : MP4Atom(file, "hinf") -{ - ExpectChildAtom("trpy", Optional, OnlyOne); - ExpectChildAtom("nump", Optional, OnlyOne); - ExpectChildAtom("tpyl", Optional, OnlyOne); - ExpectChildAtom("maxr", Optional, Many); - ExpectChildAtom("dmed", Optional, OnlyOne); - ExpectChildAtom("dimm", Optional, OnlyOne); - ExpectChildAtom("drep", Optional, OnlyOne); - ExpectChildAtom("tmin", Optional, OnlyOne); - ExpectChildAtom("tmax", Optional, OnlyOne); - ExpectChildAtom("pmax", Optional, OnlyOne); - ExpectChildAtom("dmax", Optional, OnlyOne); - ExpectChildAtom("payt", Optional, OnlyOne); -} - -void MP4HinfAtom::Generate() -{ - // hinf is special in that although all it's child atoms - // are optional (on read), if we generate it for writing - // we really want all the children - - for (uint32_t i = 0; i < m_pChildAtomInfos.Size(); i++) { - MP4Atom* pChildAtom = - CreateAtom(m_File, this, m_pChildAtomInfos[i]->m_name); - - AddChildAtom(pChildAtom); - - // and ask it to self generate - pChildAtom->Generate(); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hnti.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hnti.cpp deleted file mode 100644 index 9f2cac1f..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_hnti.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4HntiAtom::MP4HntiAtom(MP4File &file) - : MP4Atom(file, "hnti") -{ -} - -void MP4HntiAtom::Read() -{ - MP4Atom* grandParent = m_pParentAtom->GetParentAtom(); - ASSERT(grandParent); - if (ATOMID(grandParent->GetType()) == ATOMID("trak")) { - ExpectChildAtom("sdp ", Optional, OnlyOne); - } else { - ExpectChildAtom("rtp ", Optional, OnlyOne); - } - - MP4Atom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_href.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_href.cpp deleted file mode 100644 index a15fe790..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_href.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2005. All Rights Reserved. - * - * Contributor(s): - * Bill May wmay@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4HrefAtom::MP4HrefAtom(MP4File &file) - : MP4Atom(file, "href") -{ - AddReserved(*this, "reserved1", 6); /* 0 */ - - AddProperty( /* 1 */ - new MP4Integer16Property(*this, "dataReferenceIndex")); - ExpectChildAtom("burl", Optional, OnlyOne); -} - -void MP4HrefAtom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mdat.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mdat.cpp deleted file mode 100644 index fe50cb90..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mdat.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4MdatAtom::MP4MdatAtom(MP4File &file) - : MP4Atom(file, "mdat") -{ -} - -void MP4MdatAtom::Read() -{ - Skip(); -} - -void MP4MdatAtom::Write() -{ - // should never get here - ASSERT(false); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mdhd.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mdhd.cpp deleted file mode 100644 index 28f28887..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mdhd.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4MdhdAtom::MP4MdhdAtom(MP4File &file) - : MP4Atom(file, "mdhd") -{ - AddVersionAndFlags(); -} - -void MP4MdhdAtom::AddProperties(uint8_t version) -{ - if (version == 1) { - AddProperty( - new MP4Integer64Property(*this, "creationTime")); - AddProperty( - new MP4Integer64Property(*this, "modificationTime")); - } else { - AddProperty( - new MP4Integer32Property(*this, "creationTime")); - AddProperty( - new MP4Integer32Property(*this, "modificationTime")); - } - - AddProperty( - new MP4Integer32Property(*this, "timeScale")); - - if (version == 1) { - AddProperty( - new MP4Integer64Property(*this, "duration")); - } else { - AddProperty( - new MP4Integer32Property(*this, "duration")); - } - - AddProperty( new MP4LanguageCodeProperty(*this, "language" )); - AddReserved(*this, "reserved", 2); -} - -void MP4MdhdAtom::Generate() -{ - uint8_t version = m_File.Use64Bits(GetType()) ? 1 : 0; - SetVersion(version); - AddProperties(version); - - MP4Atom::Generate(); - - // set creation and modification times - MP4Timestamp now = MP4GetAbsTimestamp(); - if (version == 1) { - ((MP4Integer64Property*)m_pProperties[2])->SetValue(now); - ((MP4Integer64Property*)m_pProperties[3])->SetValue(now); - } else { - ((MP4Integer32Property*)m_pProperties[2])->SetValue(now); - ((MP4Integer32Property*)m_pProperties[3])->SetValue(now); - } -} - -void MP4MdhdAtom::Read() -{ - /* read atom version */ - ReadProperties(0, 1); - - /* need to create the properties based on the atom version */ - AddProperties(GetVersion()); - - /* now we can read the remaining properties */ - ReadProperties(1); - - Skip(); // to end of atom -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_meta.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_meta.cpp deleted file mode 100644 index 9e6f1a68..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_meta.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * M. Bakker mbakker at nero.com - * - * Apple iTunes META data - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4DataAtom::MP4DataAtom(MP4File &file) - : MP4Atom ( file, "data" ) - , typeReserved ( *new MP4Integer16Property( *this, "typeReserved" )) - , typeSetIdentifier ( *new MP4Integer8Property( *this, "typeSetIdentifier" )) - , typeCode ( *new MP4BasicTypeProperty( *this, "typeCode" )) - , locale ( *new MP4Integer32Property( *this, "locale" )) - , metadata ( *new MP4BytesProperty( *this, "metadata" )) -{ - AddProperty( &typeReserved ); - AddProperty( &typeSetIdentifier ); - AddProperty( &typeCode ); - AddProperty( &locale ); - AddProperty( &metadata ); -} - -void -MP4DataAtom::Read() -{ - // calculate size of the metadata from the atom size - metadata.SetValueSize( m_size - 8 ); - MP4Atom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4FullAtom::MP4FullAtom( MP4File &file, const char* type ) - : MP4Atom ( file, type ) - , version ( *new MP4Integer8Property( *this, "version" )) - , flags ( *new MP4Integer24Property( *this, "flags" )) -{ - AddProperty( &version ); - AddProperty( &flags ); -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItemAtom::MP4ItemAtom( MP4File &file, const char* type ) - : MP4Atom( file, type ) -{ - ExpectChildAtom( "mean", Optional, OnlyOne ); - ExpectChildAtom( "name", Optional, OnlyOne ); - ExpectChildAtom( "data", Required, Many ); -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItmfHdlrAtom::MP4ItmfHdlrAtom(MP4File &file) - : MP4FullAtom ( file, "hdlr" ) - , reserved1 ( *new MP4Integer32Property( *this, "reserved1" )) - , handlerType ( *new MP4BytesProperty( *this, "handlerType", 4 )) - , reserved2 ( *new MP4BytesProperty( *this, "reserved2", 12 )) - , name ( *new MP4BytesProperty( *this, "name", 1 )) -{ - AddProperty( &reserved1 ); - AddProperty( &handlerType ); - AddProperty( &reserved2 ); - AddProperty( &name ); - - const uint8_t htData[] = { 'm', 'd', 'i', 'r' }; - handlerType.SetValue( htData, sizeof( htData )); - - const uint8_t nameData[] = { 0 }; - name.SetValue( nameData, sizeof( nameData )); -} - -void -MP4ItmfHdlrAtom::Read() -{ - name.SetValueSize( m_size - 24 ); - MP4FullAtom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4MeanAtom::MP4MeanAtom(MP4File &file) - : MP4FullAtom ( file, "mean" ) - , value ( *new MP4BytesProperty( *this, "value" )) -{ - AddProperty( &value ); -} - -void -MP4MeanAtom::Read() -{ - value.SetValueSize( m_size - 4 ); - MP4Atom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4NameAtom::MP4NameAtom(MP4File &file) - : MP4FullAtom ( file, "name" ) - , value ( *new MP4BytesProperty( *this, "value" )) -{ - AddProperty( &value ); -} - -void -MP4NameAtom::Read() -{ - value.SetValueSize( m_size - 4 ); - MP4FullAtom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4UdtaElementAtom::MP4UdtaElementAtom( MP4File &file, const char* type ) - : MP4Atom ( file, type ) - , value ( *new MP4BytesProperty( *this, "value" )) -{ - AddProperty( &value ); -} - -void -MP4UdtaElementAtom::Read() -{ - // calculate size of the metadata from the atom size - value.SetValueSize( m_size ); - MP4Atom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mp4s.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mp4s.cpp deleted file mode 100644 index 293a5546..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mp4s.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4Mp4sAtom::MP4Mp4sAtom(MP4File &file) - : MP4Atom(file, "mp4s") -{ - AddReserved(*this, "reserved1", 6); - AddProperty( - new MP4Integer16Property(*this, "dataReferenceIndex")); - - ExpectChildAtom("esds", Required, OnlyOne); -} - -void MP4Mp4sAtom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mp4v.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mp4v.cpp deleted file mode 100644 index 9cf64441..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mp4v.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4Mp4vAtom::MP4Mp4vAtom(MP4File &file) - : MP4Atom(file, "mp4v") -{ - AddReserved(*this, "reserved1", 6); /* 0 */ - - AddProperty( /* 1 */ - new MP4Integer16Property(*this, "dataReferenceIndex")); - - AddReserved(*this, "reserved2", 16); /* 2 */ - - AddProperty( /* 3 */ - new MP4Integer16Property(*this, "width")); - AddProperty( /* 4 */ - new MP4Integer16Property(*this, "height")); - - AddReserved(*this, "reserved3", 14); /* 5 */ - - MP4StringProperty* pProp = - new MP4StringProperty(*this, "compressorName"); - pProp->SetFixedLength(32); - pProp->SetCountedFormat(true); - pProp->SetValue(""); - AddProperty(pProp); /* 6 */ - - AddReserved(*this, "reserved4", 4); /* 7 */ - - ExpectChildAtom("colr", Optional, OnlyOne); - ExpectChildAtom("esds", Required, OnlyOne); - ExpectChildAtom("pasp", Optional, OnlyOne); -} - -void MP4Mp4vAtom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - - // property reserved3 has non-zero fixed values - static uint8_t reserved3[14] = { - 0x00, 0x48, 0x00, 0x00, - 0x00, 0x48, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, - }; - m_pProperties[5]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[5])-> - SetValue(reserved3, sizeof(reserved3)); - m_pProperties[5]->SetReadOnly(true); - - // property reserved4 has non-zero fixed values - static uint8_t reserved4[4] = { - 0x00, 0x18, 0xFF, 0xFF, - }; - m_pProperties[7]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[7])-> - SetValue(reserved4, sizeof(reserved4)); - m_pProperties[7]->SetReadOnly(true); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mvhd.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mvhd.cpp deleted file mode 100644 index f3863de2..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_mvhd.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4MvhdAtom::MP4MvhdAtom(MP4File &file) - : MP4Atom(file, "mvhd") -{ - AddVersionAndFlags(); -} - -void MP4MvhdAtom::AddProperties(uint8_t version) -{ - if (version == 1) { - AddProperty( /* 2 */ - new MP4Integer64Property(*this, "creationTime")); - AddProperty( /* 3 */ - new MP4Integer64Property(*this, "modificationTime")); - } else { - AddProperty( /* 2 */ - new MP4Integer32Property(*this, "creationTime")); - AddProperty( /* 3 */ - new MP4Integer32Property(*this, "modificationTime")); - } - - AddProperty( /* 4 */ - new MP4Integer32Property(*this, "timeScale")); - - if (version == 1) { - AddProperty( /* 5 */ - new MP4Integer64Property(*this, "duration")); - } else { - AddProperty( /* 5 */ - new MP4Integer32Property(*this, "duration")); - } - - MP4Float32Property* pProp; - - pProp = new MP4Float32Property(*this, "rate"); - pProp->SetFixed32Format(); - AddProperty(pProp); /* 6 */ - - pProp = new MP4Float32Property(*this, "volume"); - pProp->SetFixed16Format(); - AddProperty(pProp); /* 7 */ - - AddReserved(*this, "reserved1", 70); /* 8 */ - - AddProperty( /* 9 */ - new MP4Integer32Property(*this, "nextTrackId")); -} - -void MP4MvhdAtom::Generate() -{ - uint8_t version = m_File.Use64Bits(GetType()) ? 1 : 0; - SetVersion(version); - AddProperties(version); - - MP4Atom::Generate(); - - // set creation and modification times - MP4Timestamp now = MP4GetAbsTimestamp(); - if (version == 1) { - ((MP4Integer64Property*)m_pProperties[2])->SetValue(now); - ((MP4Integer64Property*)m_pProperties[3])->SetValue(now); - } else { - ((MP4Integer32Property*)m_pProperties[2])->SetValue(now); - ((MP4Integer32Property*)m_pProperties[3])->SetValue(now); - } - - ((MP4Integer32Property*)m_pProperties[4])->SetValue(1000); - - ((MP4Float32Property*)m_pProperties[6])->SetValue(1.0); - ((MP4Float32Property*)m_pProperties[7])->SetValue(1.0); - - // property reserved has non-zero fixed values - static uint8_t reserved[70] = { - 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - }; - m_pProperties[8]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[8])-> - SetValue(reserved, sizeof(reserved)); - m_pProperties[8]->SetReadOnly(true); - - // set next track id - ((MP4Integer32Property*)m_pProperties[9])->SetValue(1); -} - -void MP4MvhdAtom::Read() -{ - /* read atom version */ - ReadProperties(0, 1); - - /* need to create the properties based on the atom version */ - AddProperties(GetVersion()); - - /* now we can read the remaining properties */ - ReadProperties(1); - - Skip(); // to end of atom -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_nmhd.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_nmhd.cpp deleted file mode 100644 index 8e3a52d2..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_nmhd.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4NmhdAtom::MP4NmhdAtom(MP4File &file) - : MP4Atom(file, "nmhd") -{ - AddVersionAndFlags(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ohdr.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ohdr.cpp deleted file mode 100644 index 5652c16d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_ohdr.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/** \file atom_ohdr.cpp - - \author Danijel Kopcinovic (danijel.kopcinovic@adnecto.net) -*/ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -/*! \brief Patch class for read/write operations when string is 0-length. - - We want to use string property, but mpeg4ip doesn't support ohdr way of - encoding of string (in ohdr atom we first have 3 lengths of 3 strings and - then their string values, and it cannot be simulated with any of the - current mpeg4ip string property parameters), so we have to write our own - Read() and Write() routines. -*/ -class OhdrMP4StringProperty: public MP4StringProperty { -public: - /*! \brief Constructor. - - \param name name of the property. - \param useCountedFormat counted format flag. - \param useUnicode unicode flag. - */ - OhdrMP4StringProperty(MP4Atom& parentAtom, const char* name, bool useCountedFormat = false, - bool useUnicode = false): MP4StringProperty(parentAtom, name, useCountedFormat, - useUnicode) { - } - - /*! \brief Read property from file. - - \param pFile input, file handle. - \param index input, index to read. - */ - void Read(MP4File& file, uint32_t index = 0) { - MP4Free(m_values[index]); - m_values[index] = (char*)MP4Calloc(m_fixedLength + 1); - (void)file.ReadBytes((uint8_t*)m_values[index], m_fixedLength); - } - - /*! \brief Write property to file. - - \param pFile input, file handle. - \param index input, index to write. - */ - void Write(MP4File& file, uint32_t index = 0) { - file.WriteBytes((uint8_t*)m_values[index], m_fixedLength); - } -private: - OhdrMP4StringProperty(); - OhdrMP4StringProperty ( const OhdrMP4StringProperty &src ); - OhdrMP4StringProperty &operator= ( const OhdrMP4StringProperty &src ); -}; - -/*! \brief OMA DRM headers atom. - - Contained in OMA DRM key management atom. It must contain content identifier. -*/ -/*! \brief Constructor. -*/ -MP4OhdrAtom::MP4OhdrAtom(MP4File &file): MP4Atom(file, "ohdr") { - AddVersionAndFlags(); - - AddProperty(new MP4Integer8Property(*this, "EncryptionMethod")); - AddProperty(new MP4Integer8Property(*this, "EncryptionPadding")); - AddProperty(new MP4Integer64Property(*this, "PlaintextLength")); - AddProperty(new MP4Integer16Property(*this, "ContentIDLength")); - AddProperty(new MP4Integer16Property(*this, "RightsIssuerURLLength")); - AddProperty(new MP4Integer16Property(*this, "TextualHeadersLength")); - AddProperty(new OhdrMP4StringProperty(*this, "ContentID")); - AddProperty(new OhdrMP4StringProperty(*this, "RightsIssuerURL")); - AddProperty(new MP4BytesProperty(*this, "TextualHeaders")); -} - -MP4OhdrAtom::~MP4OhdrAtom() { -} - -/*! \brief Read atom. -*/ -void MP4OhdrAtom::Read() { - ReadProperties(0, 8); - MP4Property* lProperty; - MP4Property* property; - lProperty = GetProperty(5); - property = GetProperty(8); - ((OhdrMP4StringProperty*)property)->SetFixedLength( - ((MP4Integer16Property*)lProperty)->GetValue()); - lProperty = GetProperty(6); - property = GetProperty(9); - ((OhdrMP4StringProperty*)property)->SetFixedLength( - ((MP4Integer16Property*)lProperty)->GetValue()); - lProperty = GetProperty(7); - property = GetProperty(10); - ((MP4BytesProperty*)property)->SetFixedSize( - ((MP4Integer16Property*)lProperty)->GetValue()); - ReadProperties(8, 3); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_pasp.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_pasp.cpp deleted file mode 100644 index 0ecebf27..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_pasp.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * Contributer has declined to give copyright information, and gives - * it freely to the world. - * - * Contributor(s): - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4PaspAtom::MP4PaspAtom(MP4File &file) - : MP4Atom(file, "pasp") -{ - - AddProperty( /* 0 */ - new MP4Integer32Property(*this, "hSpacing")); - - AddProperty( /* 1 */ - new MP4Integer32Property(*this, "vSpacing")); - -} - -void MP4PaspAtom::Generate() -{ - - MP4Atom::Generate(); - - ((MP4Integer32Property*)m_pProperties[0])->SetValue(1); - ((MP4Integer32Property*)m_pProperties[1])->SetValue(1); - -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_root.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_root.cpp deleted file mode 100644 index 4702bb95..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_root.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4RootAtom::MP4RootAtom(MP4File &file) - : MP4Atom( file, NULL ) - , m_rewrite_ftyp ( NULL ) - , m_rewrite_ftypPosition ( 0 ) - , m_rewrite_free ( NULL ) - , m_rewrite_freePosition ( 0 ) -{ - ExpectChildAtom( "moov", Required, OnlyOne ); - ExpectChildAtom( "ftyp", Optional, OnlyOne ); - ExpectChildAtom( "mdat", Optional, Many ); - ExpectChildAtom( "free", Optional, Many ); - ExpectChildAtom( "skip", Optional, Many ); - ExpectChildAtom( "udta", Optional, Many ); - ExpectChildAtom( "moof", Optional, Many ); -} - -void MP4RootAtom::BeginWrite(bool use64) -{ - m_rewrite_ftyp = (MP4FtypAtom*)FindChildAtom( "ftyp" ); - if( m_rewrite_ftyp ) { - m_rewrite_free = (MP4FreeAtom*)MP4Atom::CreateAtom( m_File, NULL, "free" ); - m_rewrite_free->SetSize( 32*4 ); // room for 32 additional brands - AddChildAtom( m_rewrite_free ); - - m_rewrite_ftypPosition = m_File.GetPosition(); - m_rewrite_ftyp->Write(); - - m_rewrite_freePosition = m_File.GetPosition(); - m_rewrite_free->Write(); - } - - m_pChildAtoms[GetLastMdatIndex()]->BeginWrite( m_File.Use64Bits( "mdat" )); -} - -void MP4RootAtom::Write() -{ - // no-op -} - -void MP4RootAtom::FinishWrite(bool use64) -{ - if( m_rewrite_ftyp ) { - const uint64_t savepos = m_File.GetPosition(); - m_File.SetPosition( m_rewrite_ftypPosition ); - m_rewrite_ftyp->Write(); - - const uint64_t newpos = m_File.GetPosition(); - if( newpos > m_rewrite_freePosition ) - m_rewrite_free->SetSize( m_rewrite_free->GetSize() - (newpos - m_rewrite_freePosition) ); // shrink - else if( newpos < m_rewrite_freePosition ) - m_rewrite_free->SetSize( m_rewrite_free->GetSize() + (m_rewrite_freePosition - newpos) ); // grow - - m_rewrite_free->Write(); - m_File.SetPosition( savepos ); - } - - // finish writing last mdat atom - const uint32_t mdatIndex = GetLastMdatIndex(); - m_pChildAtoms[mdatIndex]->FinishWrite( m_File.Use64Bits( "mdat" )); - - // write all atoms after last mdat - const uint32_t size = m_pChildAtoms.Size(); - for ( uint32_t i = mdatIndex + 1; i < size; i++ ) - m_pChildAtoms[i]->Write(); -} - -void MP4RootAtom::BeginOptimalWrite() -{ - WriteAtomType("ftyp", OnlyOne); - WriteAtomType("moov", OnlyOne); - WriteAtomType("udta", Many); - - m_pChildAtoms[GetLastMdatIndex()]->BeginWrite(m_File.Use64Bits("mdat")); -} - -void MP4RootAtom::FinishOptimalWrite() -{ - // finish writing mdat - m_pChildAtoms[GetLastMdatIndex()]->FinishWrite(m_File.Use64Bits("mdat")); - - // find moov atom - uint32_t size = m_pChildAtoms.Size(); - MP4Atom* pMoovAtom = NULL; - - uint32_t i; - for (i = 0; i < size; i++) { - if (!strcmp("moov", m_pChildAtoms[i]->GetType())) { - pMoovAtom = m_pChildAtoms[i]; - break; - } - } - ASSERT(i < size); - ASSERT(pMoovAtom != NULL); - - // rewrite moov so that updated chunkOffsets are written to disk - m_File.SetPosition(pMoovAtom->GetStart()); - uint64_t oldSize = pMoovAtom->GetSize(); - - pMoovAtom->Write(); - - // sanity check - uint64_t newSize = pMoovAtom->GetSize(); - ASSERT(oldSize == newSize); -} - -uint32_t MP4RootAtom::GetLastMdatIndex() -{ - for (int32_t i = m_pChildAtoms.Size() - 1; i >= 0; i--) { - if (!strcmp("mdat", m_pChildAtoms[i]->GetType())) { - return i; - } - } - ASSERT(false); - return (uint32_t)-1; -} - -void MP4RootAtom::WriteAtomType(const char* type, bool onlyOne) -{ - uint32_t size = m_pChildAtoms.Size(); - - for (uint32_t i = 0; i < size; i++) { - if (!strcmp(type, m_pChildAtoms[i]->GetType())) { - m_pChildAtoms[i]->Write(); - if (onlyOne) { - break; - } - } - } -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_rtp.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_rtp.cpp deleted file mode 100644 index af459edb..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_rtp.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4RtpAtom::MP4RtpAtom(MP4File &file) - : MP4Atom(file, "rtp ") -{ - // The atom type "rtp " is used in two complete unrelated ways - // i.e. it's real two atoms with the same name - // To handle that we need to postpone property creation until - // we know who our parent atom is (stsd or hnti) which gives us - // the context info we need to know who we are -} - -void MP4RtpAtom::AddPropertiesStsdType() -{ - AddReserved(*this, "reserved1", 6); /* 0 */ - - AddProperty( /* 1 */ - new MP4Integer16Property(*this, "dataReferenceIndex")); - - AddProperty( /* 2 */ - new MP4Integer16Property(*this, "hintTrackVersion")); - AddProperty( /* 3 */ - new MP4Integer16Property(*this, "highestCompatibleVersion")); - AddProperty( /* 4 */ - new MP4Integer32Property(*this, "maxPacketSize")); - - ExpectChildAtom("tims", Required, OnlyOne); - ExpectChildAtom("tsro", Optional, OnlyOne); - ExpectChildAtom("snro", Optional, OnlyOne); -} - -void MP4RtpAtom::AddPropertiesHntiType() -{ - MP4StringProperty* pProp = - new MP4StringProperty(*this, "descriptionFormat"); - pProp->SetFixedLength(4); - AddProperty(pProp); /* 0 */ - - AddProperty( /* 1 */ - new MP4StringProperty(*this, "sdpText")); -} - -void MP4RtpAtom::Generate() -{ - ASSERT(m_pParentAtom); - if (!strcmp(m_pParentAtom->GetType(), "stsd")) { - AddPropertiesStsdType(); - GenerateStsdType(); - } else if (!strcmp(m_pParentAtom->GetType(), "hnti")) { - AddPropertiesHntiType(); - GenerateHntiType(); - } else { - log.warningf("%s: \"%s\": rtp atom in unexpected context, can not generate", - __FUNCTION__, GetFile().GetFilename().c_str() ); - } -} - -void MP4RtpAtom::GenerateStsdType() -{ - // generate children - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - ((MP4Integer16Property*)m_pProperties[2])->SetValue(1); - ((MP4Integer16Property*)m_pProperties[3])->SetValue(1); -} - -void MP4RtpAtom::GenerateHntiType() -{ - MP4Atom::Generate(); - - ((MP4StringProperty*)m_pProperties[0])->SetValue("sdp "); -} - -void MP4RtpAtom::Read() -{ - ASSERT(m_pParentAtom); - if (!strcmp(m_pParentAtom->GetType(), "stsd")) { - AddPropertiesStsdType(); - ReadStsdType(); - } else if (!strcmp(m_pParentAtom->GetType(), "hnti")) { - AddPropertiesHntiType(); - ReadHntiType(); - } else { - log.verbose1f("rtp atom in unexpected context, can not read"); - } - - Skip(); // to end of atom -} - -void MP4RtpAtom::ReadStsdType() -{ - MP4Atom::Read(); -} - -void MP4RtpAtom::ReadHntiType() -{ - ReadProperties(0, 1); - - // read sdp string, length is implicit in size of atom - uint64_t size = GetEnd() - m_File.GetPosition(); - char* data = (char*)MP4Malloc(size + 1); - ASSERT(data != NULL); - m_File.ReadBytes((uint8_t*)data, size); - data[size] = '\0'; - ((MP4StringProperty*)m_pProperties[1])->SetValue(data); - MP4Free(data); -} - -void MP4RtpAtom::Write() -{ - if (!strcmp(m_pParentAtom->GetType(), "hnti")) { - WriteHntiType(); - } else { - MP4Atom::Write(); - } -} - -void MP4RtpAtom::WriteHntiType() -{ - // since length of string is implicit in size of atom - // we need to handle this specially, and not write the terminating \0 - MP4StringProperty* pSdp = (MP4StringProperty*)m_pProperties[1]; - pSdp->SetFixedLength((uint32_t)strlen(pSdp->GetValue())); - MP4Atom::Write(); - pSdp->SetFixedLength(0); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_s263.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_s263.cpp deleted file mode 100644 index c53e00a8..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_s263.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Ximpo Group Ltd. mp4v2@ximpo.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4S263Atom::MP4S263Atom(MP4File &file) - : MP4Atom(file, "s263") -{ - AddReserved(*this, "reserved1", 6); /* 0 */ - - AddProperty( /* 1 */ - new MP4Integer16Property(*this, "dataReferenceIndex")); - - AddReserved(*this, "reserved2", 16); /* 2 */ - - AddProperty( /* 3 */ - new MP4Integer16Property(*this, "width")); - - AddProperty( /* 4 */ - new MP4Integer16Property(*this, "height")); - - AddReserved(*this, "reserved3", 50); /* 5 */ - - - ExpectChildAtom("d263", Required, OnlyOne); -} - -void MP4S263Atom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - - // property reserved2 has non-zero fixed values - static uint8_t reserved3[50] = { - 0x00, 0x48, 0x00, 0x00, - 0x00, 0x48, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x24, - 0xFF, 0xFF - }; - m_pProperties[5]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[5])-> - SetValue(reserved3, sizeof(reserved3)); - m_pProperties[5]->SetReadOnly(true); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sdp.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sdp.cpp deleted file mode 100644 index 386a0a13..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sdp.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4SdpAtom::MP4SdpAtom(MP4File &file) : MP4Atom(file, "sdp ") -{ - AddProperty( - new MP4StringProperty(*this, "sdpText")); -} - -void MP4SdpAtom::Read() -{ - // read sdp string, length is implicit in size of atom - uint64_t size = GetEnd() - m_File.GetPosition(); - char* data = (char*)MP4Malloc(size + 1); - ASSERT(data != NULL); - m_File.ReadBytes((uint8_t*)data, size); - data[size] = '\0'; - ((MP4StringProperty*)m_pProperties[0])->SetValue(data); - MP4Free(data); -} - -void MP4SdpAtom::Write() -{ - // since length of string is implicit in size of atom - // we need to handle this specially, and not write the terminating \0 - MP4StringProperty* pSdp = (MP4StringProperty*)m_pProperties[0]; - const char* sdpText = pSdp->GetValue(); - if (sdpText) { - pSdp->SetFixedLength((uint32_t)strlen(sdpText)); - } - MP4Atom::Write(); - pSdp->SetFixedLength(0); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sdtp.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sdtp.cpp deleted file mode 100644 index 4afe6536..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sdtp.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4SdtpAtom::MP4SdtpAtom(MP4File &file) - : MP4FullAtom ( file, "sdtp" ) - , data ( *new MP4BytesProperty( *this, "data" )) -{ - AddProperty( &data ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void MP4SdtpAtom::Read() -{ - data.SetValueSize( m_size - 4 ); - MP4FullAtom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_smi.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_smi.cpp deleted file mode 100644 index 348b9ab1..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_smi.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2004. All Rights Reserved. - * - * Contributor(s): - * Bill May wmay@cisco.com - * - * Apple iTunes META data - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4SmiAtom::MP4SmiAtom(MP4File &file) - : MP4Atom(file, "meta") -{ - - AddProperty( new MP4BytesProperty(*this, "metadata")); - -} - -void MP4SmiAtom::Read() -{ - // calculate size of the metadata from the atom size - ((MP4BytesProperty*)m_pProperties[0])->SetValueSize(m_size); - - MP4Atom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sound.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sound.cpp deleted file mode 100644 index 368f4318..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_sound.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2004. All Rights Reserved. - * - * Contributor(s): - * Bill May wmay@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4SoundAtom::MP4SoundAtom(MP4File &file, const char *atomid) - : MP4Atom(file, atomid) -{ - AddReserved(*this, "reserved1", 6); /* 0 */ - - AddProperty( /* 1 */ - new MP4Integer16Property(*this, "dataReferenceIndex")); - AddProperty( /* 2 */ - new MP4Integer16Property(*this, "soundVersion")); - AddReserved( *this, "reserved2", 6); /* 3 */ - - AddProperty( /* 4 */ - new MP4Integer16Property(*this, "channels")); - AddProperty( /* 5 */ - new MP4Integer16Property(*this, "sampleSize")); - AddProperty( /* 6 */ - new MP4Integer16Property(*this, "compressionId")); - AddProperty( /* 7 */ - new MP4Integer16Property(*this, "packetSize")); - AddProperty( /* 8 */ - new MP4Integer32Property(*this, "timeScale")); - - if (ATOMID(atomid) == ATOMID("mp4a")) { - ExpectChildAtom("esds", Required, OnlyOne); - ExpectChildAtom("wave", Optional, OnlyOne); - } else if (ATOMID(atomid) == ATOMID("alac")) { - ExpectChildAtom("alac", Optional, Optional); - //AddProperty( new MP4BytesProperty(*this, "alacInfo", 36)); - } -} - -void MP4SoundAtom::AddProperties (uint8_t version) -{ - if (version > 0) { - AddProperty( /* 9 */ - new MP4Integer32Property(*this, "samplesPerPacket")); - AddProperty( /* 10 */ - new MP4Integer32Property(*this, "bytesPerPacket")); - AddProperty( /* 11 */ - new MP4Integer32Property(*this, "bytesPerFrame")); - AddProperty( /* 12 */ - new MP4Integer32Property(*this, "bytesPerSample")); - } - if (version == 2) { - AddReserved(*this, "reserved4", 20); - } -} -void MP4SoundAtom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - ((MP4Integer16Property*)m_pProperties[2])->SetValue(0); - - // property reserved2 has non-zero fixed values - static const uint8_t reserved2[6] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, - }; - m_pProperties[3]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[3])-> - SetValue(reserved2, sizeof(reserved2)); - m_pProperties[3]->SetReadOnly(true); - ((MP4Integer16Property*)m_pProperties[4])->SetValue(2); - ((MP4Integer16Property*)m_pProperties[5])->SetValue(0x0010); - ((MP4Integer16Property*)m_pProperties[6])->SetValue(0); - -} - -void MP4SoundAtom::Read() -{ - MP4Atom *parent = GetParentAtom(); - if (ATOMID(parent->GetType()) != ATOMID("stsd")) { - // Quicktime has an interesting thing - they'll put an mp4a atom - // which is blank inside a wave atom, which is inside an mp4a atom - // we have a mp4a inside an wave inside an mp4a - delete all properties - for(int i = 0; i < 9; ++ i) - delete m_pProperties[i]; // make sure we delete the properties themselves, then remove from m_pProperties - - m_pProperties.Delete(8); - m_pProperties.Delete(7); - m_pProperties.Delete(6); - m_pProperties.Delete(5); - m_pProperties.Delete(4); - m_pProperties.Delete(3); - m_pProperties.Delete(2); - m_pProperties.Delete(1); - m_pProperties.Delete(0); - - if (ATOMID(GetType()) == ATOMID("alac")) { - AddProperty(new MP4BytesProperty(*this, "decoderConfig", m_size)); - ReadProperties(); - } - if (m_pChildAtomInfos.Size() > 0) { - ReadChildAtoms(); - } - } else { - ReadProperties(0, 3); // read first 3 properties - AddProperties(((MP4IntegerProperty *)m_pProperties[2])->GetValue()); - ReadProperties(3); // continue - if (m_pChildAtomInfos.Size() > 0) { - ReadChildAtoms(); - } - } - Skip(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_standard.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_standard.cpp deleted file mode 100644 index ba567fde..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_standard.cpp +++ /dev/null @@ -1,420 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2004. All Rights Reserved. - * - * Contributor(s): - * Bill May (from others work). - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4StandardAtom::MP4StandardAtom (MP4File &file, const char *type) : MP4Atom(file, type) -{ - /* - * This is a big if else loop. Make sure that you don't break it - * when adding new atoms, or you will set the unknown type flag - * - * Try to keep it in alphabetical order - it should only be called - * 1 time per atom, so it's not that urgent. - */ - if (ATOMID(type) == ATOMID("bitr")) { - AddProperty( /* 0 */ - new MP4Integer32Property(*this, "avgBitrate")); - - AddProperty( /* 1 */ - new MP4Integer32Property(*this, "maxBitrate")); - - } else if (ATOMID(type) == ATOMID("btrt")) { - AddProperty( new MP4Integer32Property(*this, "bufferSizeDB")); /* 0 */ - AddProperty( new MP4Integer32Property(*this, "avgBitrate")); /* 1 */ - AddProperty( new MP4Integer32Property(*this, "maxBitrate")); /* 2 */ - } else if (ATOMID(type) == ATOMID("burl")) { - AddProperty( new MP4StringProperty(*this, "base_url")); - /* - * c??? - */ - } else if (ATOMID(type) == ATOMID("co64")) { - AddVersionAndFlags(); - - MP4Integer32Property* pCount = - new MP4Integer32Property(*this, "entryCount"); - AddProperty(pCount); - - MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); - AddProperty(pTable); - - pTable->AddProperty( - new MP4Integer64Property(*this, "chunkOffset")); - } else if (ATOMID(type) == ATOMID("ctts")) { - AddVersionAndFlags(); - - MP4Integer32Property* pCount = - new MP4Integer32Property(*this, "entryCount"); - AddProperty(pCount); - - MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); - AddProperty(pTable); - - pTable->AddProperty(new MP4Integer32Property(pTable->GetParentAtom(), "sampleCount")); - pTable->AddProperty(new MP4Integer32Property(pTable->GetParentAtom(), "sampleOffset")); - /* - * d??? - */ - } else if (ATOMID(type) == ATOMID("dinf")) { - ExpectChildAtom("dref", Required, OnlyOne); - - } else if (ATOMID(type) == ATOMID("dimm")) { - AddProperty( // bytes of immediate data - new MP4Integer64Property(*this, "bytes")); - - } else if (ATOMID(type) == ATOMID("dmax")) { - AddProperty( // max packet duration - new MP4Integer32Property(*this, "milliSecs")); - - } else if (ATOMID(type) == ATOMID("dmed")) { - AddProperty( // bytes sent from media data - new MP4Integer64Property(*this, "bytes")); - - } else if (ATOMID(type) == ATOMID("drep")) { - AddProperty( // bytes of repeated data - new MP4Integer64Property(*this, "bytes")); - /* - * e??? - */ - } else if (ATOMID(type) == ATOMID("edts")) { - ExpectChildAtom("elst", Required, OnlyOne); - - } else if (ATOMID(type) == ATOMID("esds")) { - AddVersionAndFlags(); - AddProperty( - new MP4DescriptorProperty(*this, NULL, MP4ESDescrTag, 0, - Required, OnlyOne)); - /* - * f??? - */ - } else if (ATOMID(type) == ATOMID("frma")) { - AddProperty( /* 0 */ - new MP4Integer32Property(*this, "data-format")); - /* - * g??? - */ - } else if (ATOMID(type) == ATOMID("gmhd")) { - ExpectChildAtom("gmin", Required, OnlyOne); - ExpectChildAtom("tmcd", Optional, OnlyOne); - ExpectChildAtom("text", Optional, OnlyOne); - } else if (ATOMID(type) == ATOMID("hmhd")) { - AddVersionAndFlags(); - - AddProperty(new MP4Integer16Property(*this, "maxPduSize")); - AddProperty(new MP4Integer16Property(*this, "avgPduSize")); - AddProperty(new MP4Integer32Property(*this, "maxBitRate")); - AddProperty(new MP4Integer32Property(*this, "avgBitRate")); - AddProperty(new MP4Integer32Property(*this, "slidingAvgBitRate")); - /* - * i??? - */ - } else if (ATOMID(type) == ATOMID("iKMS")) { - AddVersionAndFlags(); /* 0, 1 */ - MP4StringProperty* pProp = new MP4StringProperty(*this, "kms_URI"); - AddProperty(pProp); /* 2 */ - - } else if (ATOMID(type) == ATOMID("iSFM")) { - AddVersionAndFlags(); /* 0, 1 */ - AddProperty( /* 2 */ - new MP4BitfieldProperty(*this, "selective-encryption", 1)); - AddProperty( /* 3 */ - new MP4BitfieldProperty(*this, "reserved", 7)); - AddProperty( /* 4 */ - new MP4Integer8Property(*this, "key-indicator-length")); - AddProperty( /* 5 */ - new MP4Integer8Property(*this, "IV-length")); - - } else if (ATOMID(type) == ATOMID("ilst")) { - ExpectChildAtom("\251nam", Optional, OnlyOne); /* name */ - ExpectChildAtom("\251ART", Optional, OnlyOne); /* artist */ - ExpectChildAtom("\251wrt", Optional, OnlyOne); /* writer */ - ExpectChildAtom("\251alb", Optional, OnlyOne); /* album */ - ExpectChildAtom("\251day", Optional, OnlyOne); /* date */ - ExpectChildAtom("\251too", Optional, OnlyOne); /* tool */ - ExpectChildAtom("\251cmt", Optional, OnlyOne); /* comment */ - ExpectChildAtom("\251gen", Optional, OnlyOne); /* custom genre */ - ExpectChildAtom("trkn", Optional, OnlyOne); /* tracknumber */ - ExpectChildAtom("disk", Optional, OnlyOne); /* disknumber */ - ExpectChildAtom("gnre", Optional, OnlyOne); /* genre (ID3v1 index + 1) */ - ExpectChildAtom("cpil", Optional, OnlyOne); /* compilation */ - ExpectChildAtom("tmpo", Optional, OnlyOne); /* BPM */ - ExpectChildAtom("covr", Optional, OnlyOne); /* cover art */ - ExpectChildAtom("aART", Optional, OnlyOne); /* album artist */ - ExpectChildAtom("----", Optional, Many); /* ---- free form */ - ExpectChildAtom("pgap", Optional, OnlyOne); /* part of gapless album */ - ExpectChildAtom("tvsh", Optional, OnlyOne); /* TV show */ - ExpectChildAtom("tvsn", Optional, OnlyOne); /* TV season */ - ExpectChildAtom("tven", Optional, OnlyOne); /* TV episode number */ - ExpectChildAtom("tvnn", Optional, OnlyOne); /* TV network name */ - ExpectChildAtom("tves", Optional, OnlyOne); /* TV epsidoe */ - ExpectChildAtom("desc", Optional, OnlyOne); /* description */ - ExpectChildAtom("ldes", Optional, OnlyOne); /* long description */ - ExpectChildAtom("soal", Optional, OnlyOne); /* sort album */ - ExpectChildAtom("soar", Optional, OnlyOne); /* sort artist */ - ExpectChildAtom("soaa", Optional, OnlyOne); /* sort album artist */ - ExpectChildAtom("sonm", Optional, OnlyOne); /* sort name */ - ExpectChildAtom("soco", Optional, OnlyOne); /* sort composer */ - ExpectChildAtom("sosn", Optional, OnlyOne); /* sort show */ - ExpectChildAtom("hdvd", Optional, OnlyOne); /* HD video */ - ExpectChildAtom("©enc", Optional, OnlyOne); /* Encoded by */ - ExpectChildAtom("pcst", Optional, OnlyOne); /* Podcast flag */ - ExpectChildAtom("keyw", Optional, OnlyOne); /* Keywords (for podcasts?) */ - ExpectChildAtom("catg", Optional, OnlyOne); /* Category (for podcasts?) */ - ExpectChildAtom("purl", Optional, OnlyOne); /* Podcast URL */ - ExpectChildAtom("egid", Optional, OnlyOne); /* Podcast episode global unique ID */ - ExpectChildAtom("rtng", Optional, OnlyOne); /* Content Rating */ - ExpectChildAtom("stik", Optional, OnlyOne); /* MediaType */ - ExpectChildAtom("\251grp", Optional, OnlyOne); /* Grouping */ - ExpectChildAtom("\251lyr", Optional, OnlyOne); /* Lyrics */ - ExpectChildAtom("cprt", Optional, OnlyOne); /* Copyright */ - ExpectChildAtom("apID", Optional, OnlyOne); /* iTunes Account */ - ExpectChildAtom("akID", Optional, OnlyOne); /* iTunes Account Type */ - ExpectChildAtom("sfID", Optional, OnlyOne); /* iTunes Country */ - ExpectChildAtom("cnID", Optional, OnlyOne); /* Content ID */ - ExpectChildAtom("atID", Optional, OnlyOne); /* Artist ID */ - ExpectChildAtom("plID", Optional, OnlyOne); /* Playlist ID */ - ExpectChildAtom("geID", Optional, OnlyOne); /* Genre ID */ - ExpectChildAtom("cmID", Optional, OnlyOne); /* Composer ID */ - ExpectChildAtom("xid ", Optional, OnlyOne); /* XID */ - - } else if (ATOMID(type) == ATOMID("imif")) { - AddVersionAndFlags(); - AddProperty(new MP4DescriptorProperty(*this, "ipmp_desc", MP4IPMPDescrTag, - MP4IPMPDescrTag, Required, Many)); - } else if (ATOMID(type) == ATOMID("iods")) { - AddVersionAndFlags(); - AddProperty( - new MP4DescriptorProperty(*this, NULL, MP4FileIODescrTag, - MP4FileODescrTag, - Required, OnlyOne)); - /* - * m??? - */ - } else if (ATOMID(type) == ATOMID("maxr")) { - AddProperty(new MP4Integer32Property(*this, "granularity")); - AddProperty(new MP4Integer32Property(*this, "bytes")); - - } else if (ATOMID(type) == ATOMID("mdia")) { - ExpectChildAtom("mdhd", Required, OnlyOne); - ExpectChildAtom("hdlr", Required, OnlyOne); - ExpectChildAtom("minf", Required, OnlyOne); - - } else if (ATOMID(type) == ATOMID("meta")) { // iTunes - AddVersionAndFlags(); /* 0, 1 */ - ExpectChildAtom("hdlr", Required, OnlyOne); - ExpectChildAtom("ilst", Required, OnlyOne); - - } else if (ATOMID(type) == ATOMID("mfhd")) { - AddVersionAndFlags(); /* 0, 1 */ - AddProperty( /* 2 */ - new MP4Integer32Property(*this, "sequenceNumber")); - - } else if (ATOMID(type) == ATOMID("minf")) { - ExpectChildAtom("vmhd", Optional, OnlyOne); - ExpectChildAtom("smhd", Optional, OnlyOne); - ExpectChildAtom("hmhd", Optional, OnlyOne); - ExpectChildAtom("nmhd", Optional, OnlyOne); - ExpectChildAtom("gmhd", Optional, OnlyOne); - ExpectChildAtom("dinf", Required, OnlyOne); - ExpectChildAtom("stbl", Required, OnlyOne); - - } else if (ATOMID(type) == ATOMID("moof")) { - ExpectChildAtom("mfhd", Required, OnlyOne); - ExpectChildAtom("traf", Optional, Many); - - } else if (ATOMID(type) == ATOMID("moov")) { - ExpectChildAtom("mvhd", Required, OnlyOne); - ExpectChildAtom("iods", Optional, OnlyOne); - ExpectChildAtom("trak", Required, Many); - ExpectChildAtom("udta", Optional, Many); - ExpectChildAtom("mvex", Optional, OnlyOne); - - } else if (ATOMID(type) == ATOMID("mvex")) { - ExpectChildAtom("trex", Required, Many); - - /* - * n??? - */ - } else if (ATOMID(type) == ATOMID("nmhd")) { - AddVersionAndFlags(); - - } else if (ATOMID(type) == ATOMID("nump")) { - AddProperty( // packets sent - new MP4Integer64Property(*this, "packets")); - /* - * o??? - */ - } else if (ATOMID(type) == ATOMID("odkm")) { - AddVersionAndFlags(); - ExpectChildAtom("ohdr", Required, OnlyOne); - /* - * p??? - */ - } else if (ATOMID(type) == ATOMID("payt")) { - AddProperty(new MP4Integer32Property(*this, "payloadNumber")); - AddProperty(new MP4StringProperty(*this, "rtpMap", Counted)); - - } else if (ATOMID(type) == ATOMID("pinf")) { - ExpectChildAtom("frma", Required, OnlyOne); - } else if (ATOMID(type) == ATOMID("pmax")) { - AddProperty( // max packet size - new MP4Integer32Property(*this, "bytes")); - } else if (ATOMID(type) == ATOMID("schi")) { - // not sure if this is child atoms or table of boxes - // get clarification on spec 9.1.2.5 - ExpectChildAtom("odkm", Optional, OnlyOne); - ExpectChildAtom("iKMS", Optional, OnlyOne); - ExpectChildAtom("iSFM", Optional, OnlyOne); - - } else if (ATOMID(type) == ATOMID("schm")) { - AddVersionAndFlags(); /* 0, 1 */ - AddProperty( /* 2 */ - new MP4Integer32Property(*this, "scheme_type")); - AddProperty( /* 3 */ - new MP4Integer32Property(*this, "scheme_version")); - // browser URI if flags set, TODO - - } else if (ATOMID(type) == ATOMID("sinf")) { - ExpectChildAtom("frma", Required, OnlyOne); - ExpectChildAtom("imif", Optional, OnlyOne); - ExpectChildAtom("schm", Optional, OnlyOne); - ExpectChildAtom("schi", Optional, OnlyOne); - - } else if (ATOMID(type) == ATOMID("smhd")) { - AddVersionAndFlags(); - AddReserved(*this, "reserved", 4); - - } else if (ATOMID(type) == ATOMID("snro")) { - AddProperty(new MP4Integer32Property(*this, "offset")); - - } else if (ATOMID(type) == ATOMID("stco")) { - AddVersionAndFlags(); - - MP4Integer32Property* pCount = new MP4Integer32Property(*this, "entryCount"); - AddProperty(pCount); - - MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); - AddProperty(pTable); - - pTable->AddProperty(new MP4Integer32Property(pTable->GetParentAtom(), "chunkOffset")); - - } else if (ATOMID(type) == ATOMID("stsh")) { - AddVersionAndFlags(); - - MP4Integer32Property* pCount = new MP4Integer32Property(*this, "entryCount"); - AddProperty(pCount); - - MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); - AddProperty(pTable); - - pTable->AddProperty(new MP4Integer32Property(pTable->GetParentAtom(), "shadowedSampleNumber")); - pTable->AddProperty(new MP4Integer32Property(pTable->GetParentAtom(), "syncSampleNumber")); - - } else if (ATOMID(type) == ATOMID("stss")) { - AddVersionAndFlags(); - - MP4Integer32Property* pCount = new MP4Integer32Property(*this, "entryCount"); - AddProperty(pCount); - - MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); - AddProperty(pTable); - - pTable->AddProperty(new MP4Integer32Property(pTable->GetParentAtom(), "sampleNumber")); - - } else if (ATOMID(type) == ATOMID("stts")) { - AddVersionAndFlags(); - MP4Integer32Property* pCount = new MP4Integer32Property(*this, "entryCount"); - AddProperty(pCount); - - MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); - AddProperty(pTable); - - pTable->AddProperty(new MP4Integer32Property(pTable->GetParentAtom(), "sampleCount")); - pTable->AddProperty(new MP4Integer32Property(pTable->GetParentAtom(), "sampleDelta")); - } else if (ATOMID(type) == ATOMID("tims")) { - AddProperty( - new MP4Integer32Property(*this, "timeScale")); - - } else if (ATOMID(type) == ATOMID("tmin")) { - AddProperty( // min relative xmit time - new MP4Integer32Property(*this, "milliSecs")); - - } else if (ATOMID(type) == ATOMID("tmax")) { - AddProperty( // max relative xmit time - new MP4Integer32Property(*this, "milliSecs")); - - } else if (ATOMID(type) == ATOMID("traf")) { - ExpectChildAtom("tfhd", Required, OnlyOne); - ExpectChildAtom("trun", Optional, Many); - - } else if (ATOMID(type) == ATOMID("trak")) { - ExpectChildAtom("tkhd", Required, OnlyOne); - ExpectChildAtom("tref", Optional, OnlyOne); - ExpectChildAtom("edts", Optional, OnlyOne); - ExpectChildAtom("mdia", Required, OnlyOne); - ExpectChildAtom("udta", Optional, Many); - - } else if (ATOMID(type) == ATOMID("tref")) { - ExpectChildAtom("chap", Optional, OnlyOne); - ExpectChildAtom("dpnd", Optional, OnlyOne); - ExpectChildAtom("hint", Optional, OnlyOne); - ExpectChildAtom("ipir", Optional, OnlyOne); - ExpectChildAtom("mpod", Optional, OnlyOne); - ExpectChildAtom("sync", Optional, OnlyOne); - - } else if (ATOMID(type) == ATOMID("trex")) { - AddVersionAndFlags(); /* 0, 1 */ - AddProperty( /* 2 */ - new MP4Integer32Property(*this, "trackId")); - AddProperty( /* 3 */ - new MP4Integer32Property(*this, "defaultSampleDesriptionIndex")); - AddProperty( /* 4 */ - new MP4Integer32Property(*this, "defaultSampleDuration")); - AddProperty( /* 5 */ - new MP4Integer32Property(*this, "defaultSampleSize")); - AddProperty( /* 6 */ - new MP4Integer32Property(*this, "defaultSampleFlags")); - - } else if (ATOMID(type) == ATOMID("trpy") || - ATOMID(type) == ATOMID("tpyl")) { - AddProperty( // bytes sent including RTP headers - new MP4Integer64Property(*this, "bytes")); - - } else if (ATOMID(type) == ATOMID("tsro")) { - AddProperty( - new MP4Integer32Property(*this, "offset")); - } else if (ATOMID(type) == ATOMID("wave")) { - ExpectChildAtom("esds", Required, OnlyOne); - } else { - /* - * default - unknown type - */ - SetUnknownType(true); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stbl.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stbl.cpp deleted file mode 100644 index ca63dd91..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stbl.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4StblAtom::MP4StblAtom(MP4File &file) - : MP4Atom(file, "stbl") -{ - ExpectChildAtom("stsd", Required, OnlyOne); - ExpectChildAtom("stts", Required, OnlyOne); - ExpectChildAtom("ctts", Optional, OnlyOne); - ExpectChildAtom("stsz", Required, OnlyOne); - ExpectChildAtom("stz2", Optional, OnlyOne); - ExpectChildAtom("stsc", Required, OnlyOne); - ExpectChildAtom("stco", Optional, OnlyOne); - ExpectChildAtom("co64", Optional, OnlyOne); - ExpectChildAtom("stss", Optional, OnlyOne); - ExpectChildAtom("stsh", Optional, OnlyOne); - ExpectChildAtom("stdp", Optional, OnlyOne); - ExpectChildAtom("sdtp", Optional, OnlyOne); -} - -void MP4StblAtom::Generate() -{ - // as usual - MP4Atom::Generate(); - - // but we also need one of the chunk offset atoms - MP4Atom* pChunkOffsetAtom; - if (m_File.Use64Bits(GetType())) { - pChunkOffsetAtom = CreateAtom(m_File, this, "co64"); - } else { - pChunkOffsetAtom = CreateAtom(m_File, this, "stco"); - } - - AddChildAtom(pChunkOffsetAtom); - - // and ask it to self generate - pChunkOffsetAtom->Generate(); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stdp.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stdp.cpp deleted file mode 100644 index daac9fe6..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stdp.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4StdpAtom::MP4StdpAtom(MP4File &file) - : MP4Atom(file, "stdp") -{ - AddVersionAndFlags(); - - MP4Integer32Property* pCount = - new MP4Integer32Property(*this, "entryCount"); - pCount->SetImplicit(); - AddProperty(pCount); - - MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); - AddProperty(pTable); - - pTable->AddProperty( - new MP4Integer16Property(pTable->GetParentAtom(), "priority")); -} - -void MP4StdpAtom::Read() -{ - // table entry count computed from atom size - ((MP4Integer32Property*)m_pProperties[2])->SetReadOnly(false); - ((MP4Integer32Property*)m_pProperties[2])->SetValue((m_size - 4) / 2); - ((MP4Integer32Property*)m_pProperties[2])->SetReadOnly(true); - - MP4Atom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsc.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsc.cpp deleted file mode 100644 index 6dbecfde..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsc.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4StscAtom::MP4StscAtom(MP4File &file) - : MP4Atom(file, "stsc") -{ - AddVersionAndFlags(); - - MP4Integer32Property* pCount = - new MP4Integer32Property(*this, "entryCount"); - AddProperty(pCount); - - MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); - AddProperty(pTable); - - pTable->AddProperty( - new MP4Integer32Property(pTable->GetParentAtom(), "firstChunk")); - pTable->AddProperty( - new MP4Integer32Property(pTable->GetParentAtom(), "samplesPerChunk")); - pTable->AddProperty( - new MP4Integer32Property(pTable->GetParentAtom(), "sampleDescriptionIndex")); - - // As an optimization we add an implicit property to this table, - // "firstSample" that corresponds to the first sample of the firstChunk - MP4Integer32Property* pSample = - new MP4Integer32Property(*this, "firstSample"); - pSample->SetImplicit(); - pTable->AddProperty(pSample); -} - -void MP4StscAtom::Read() -{ - // Read as usual - MP4Atom::Read(); - - // Compute the firstSample values for later use - uint32_t count = - ((MP4Integer32Property*)m_pProperties[2])->GetValue(); - - MP4Integer32Property* pFirstChunk = (MP4Integer32Property*) - ((MP4TableProperty*)m_pProperties[3])->GetProperty(0); - MP4Integer32Property* pSamplesPerChunk = (MP4Integer32Property*) - ((MP4TableProperty*)m_pProperties[3])->GetProperty(1); - MP4Integer32Property* pFirstSample = (MP4Integer32Property*) - ((MP4TableProperty*)m_pProperties[3])->GetProperty(3); - - MP4SampleId sampleId = 1; - - for (uint32_t i = 0; i < count; i++) { - pFirstSample->SetValue(sampleId, i); - - if (i < count - 1) { - sampleId += - (pFirstChunk->GetValue(i+1) - pFirstChunk->GetValue(i)) - * pSamplesPerChunk->GetValue(i); - } - } -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsd.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsd.cpp deleted file mode 100644 index bf995d8a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsd.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001 - 2004. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Alix Marchandise-Franquet alix@cisco.com - * Ximpo Group Ltd. mp4v2@ximpo.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4StsdAtom::MP4StsdAtom(MP4File &file) - : MP4Atom(file, "stsd") -{ - AddVersionAndFlags(); - - MP4Integer32Property* pCount = - new MP4Integer32Property(*this, "entryCount"); - pCount->SetReadOnly(); - AddProperty(pCount); - - ExpectChildAtom("mp4a", Optional, Many); - ExpectChildAtom("enca", Optional, Many); - ExpectChildAtom("mp4s", Optional, Many); - ExpectChildAtom("mp4v", Optional, Many); - ExpectChildAtom("encv", Optional, Many); - ExpectChildAtom("rtp ", Optional, Many); - ExpectChildAtom("samr", Optional, Many); // For AMR-NB - ExpectChildAtom("sawb", Optional, Many); // For AMR-WB - ExpectChildAtom("s263", Optional, Many); // For H.263 - ExpectChildAtom("avc1", Optional, Many); - ExpectChildAtom("alac", Optional, Many); - ExpectChildAtom("text", Optional, Many); - ExpectChildAtom("ac-3", Optional, Many); -} - -void MP4StsdAtom::Read() -{ - /* do the usual read */ - MP4Atom::Read(); - - // check that number of children == entryCount - MP4Integer32Property* pCount = - (MP4Integer32Property*)m_pProperties[2]; - - if (m_pChildAtoms.Size() != pCount->GetValue()) { - log.warningf("%s: \"%s\": stsd inconsistency with number of entries", - __FUNCTION__, GetFile().GetFilename().c_str() ); - - /* fix it */ - pCount->SetReadOnly(false); - pCount->SetValue(m_pChildAtoms.Size()); - pCount->SetReadOnly(true); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsz.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsz.cpp deleted file mode 100644 index 2a054faf..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stsz.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4StszAtom::MP4StszAtom(MP4File &file) - : MP4Atom(file, "stsz") -{ - AddVersionAndFlags(); /* 0, 1 */ - - AddProperty( /* 2 */ - new MP4Integer32Property(*this, "sampleSize")); - - MP4Integer32Property* pCount = - new MP4Integer32Property(*this, "sampleCount"); - AddProperty(pCount); /* 3 */ - - MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); - AddProperty(pTable); /* 4 */ - - pTable->AddProperty( /* 4/0 */ - new MP4Integer32Property(pTable->GetParentAtom(), "entrySize")); -} - -void MP4StszAtom::Read() -{ - ReadProperties(0, 4); - - uint32_t sampleSize = - ((MP4Integer32Property*)m_pProperties[2])->GetValue(); - - // only attempt to read entries table if sampleSize is zero - // i.e sample size is not constant - m_pProperties[4]->SetImplicit(sampleSize != 0); - - ReadProperties(4); - - Skip(); // to end of atom -} - -void MP4StszAtom::Write() -{ - uint32_t sampleSize = - ((MP4Integer32Property*)m_pProperties[2])->GetValue(); - - // only attempt to write entries table if sampleSize is zero - // i.e sample size is not constant - m_pProperties[4]->SetImplicit(sampleSize != 0); - - MP4Atom::Write(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stz2.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stz2.cpp deleted file mode 100644 index 30a1946c..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_stz2.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -/* - * This is used for the 4 bit sample size below. We need the sampleCount - * to be correct for the number of samples, but the table size needs to - * be correct to read and write it. - */ - -class MP4HalfSizeTableProperty : public MP4TableProperty -{ -public: - MP4HalfSizeTableProperty(MP4Atom& parentAtom, const char *name, MP4IntegerProperty *pCountProperty) : - MP4TableProperty(parentAtom, name, pCountProperty) {}; - - // The count is half the actual size - uint32_t GetCount() { - return (m_pCountProperty->GetValue() + 1)/ 2; - }; - void SetCount(uint32_t count) { - m_pCountProperty->SetValue(count * 2); - }; -private: - MP4HalfSizeTableProperty(); - MP4HalfSizeTableProperty ( const MP4HalfSizeTableProperty &src ); - MP4HalfSizeTableProperty &operator= ( const MP4HalfSizeTableProperty &src ); -}; - - -MP4Stz2Atom::MP4Stz2Atom(MP4File &file) - : MP4Atom(file, "stz2") -{ - AddVersionAndFlags(); /* 0, 1 */ - - AddReserved(*this, "reserved", 3); /* 2 */ - - AddProperty( /* 3 */ - new MP4Integer8Property(*this, "fieldSize")); - - MP4Integer32Property* pCount = - new MP4Integer32Property(*this, "sampleCount"); - AddProperty(pCount); /* 4 */ - -} - -void MP4Stz2Atom::Read() -{ - ReadProperties(0, 4); - - uint8_t fieldSize = - ((MP4Integer8Property *)m_pProperties[3])->GetValue(); - // uint32_t sampleCount = 0; - - MP4Integer32Property* pCount = - (MP4Integer32Property *)m_pProperties[4]; - - MP4TableProperty *pTable; - if (fieldSize != 4) { - pTable = new MP4TableProperty(*this, "entries", pCount); - } else { - // 4 bit field size uses a special table. - pTable = new MP4HalfSizeTableProperty(*this, "entries", pCount); - } - - AddProperty(pTable); - - if (fieldSize == 16) { - pTable->AddProperty( /* 5/0 */ - new MP4Integer16Property(*this, "entrySize")); - } else { - pTable->AddProperty( /* 5/0 */ - new MP4Integer8Property(*this, "entrySize")); - } - - ReadProperties(4); - - Skip(); // to end of atom -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_text.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_text.cpp deleted file mode 100644 index 454d4050..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_text.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * Contributer has declined to give copyright information, and gives - * it freely to the world. - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4TextAtom::MP4TextAtom(MP4File &file) - : MP4Atom(file, "text") -{ - // The atom type "text" is used in two complete unrelated ways - // i.e. it's real two atoms with the same name - // To handle that we need to postpone property creation until - // we know who our parent atom is (stsd or gmhd) which gives us - // the context info we need to know who we are -} - -void MP4TextAtom::AddPropertiesStsdType() -{ - - AddReserved(*this, "reserved1", 6); /* 0 */ - - AddProperty(new MP4Integer16Property(*this, "dataReferenceIndex"));/* 1 */ - - AddProperty(new MP4Integer32Property(*this, "displayFlags")); /* 2 */ - AddProperty(new MP4Integer32Property(*this, "textJustification")); /* 3 */ - - AddProperty(new MP4Integer16Property(*this, "bgColorRed")); /* 4 */ - AddProperty(new MP4Integer16Property(*this, "bgColorGreen")); /* 5 */ - AddProperty(new MP4Integer16Property(*this, "bgColorBlue")); /* 6 */ - - AddProperty(new MP4Integer16Property(*this, "defTextBoxTop")); /* 7 */ - AddProperty(new MP4Integer16Property(*this, "defTextBoxLeft")); /* 8 */ - AddProperty(new MP4Integer16Property(*this, "defTextBoxBottom")); /* 9 */ - AddProperty(new MP4Integer16Property(*this, "defTextBoxRight")); /* 10 */ - - AddReserved(*this, "reserved2", 8); /* 11 */ - - AddProperty(new MP4Integer16Property(*this, "fontNumber")); /* 12 */ - AddProperty(new MP4Integer16Property(*this, "fontFace")); /* 13 */ - - AddReserved(*this, "reserved3", 1); /* 14 */ - AddReserved(*this, "reserved4", 2); /* 15 */ - - AddProperty(new MP4Integer16Property(*this, "foreColorRed")); /* 16 */ - AddProperty(new MP4Integer16Property(*this, "foreColorGreen")); /* 17 */ - AddProperty(new MP4Integer16Property(*this, "foreColorBlue")); /* 18 */ - -} - -void MP4TextAtom::AddPropertiesGmhdType() -{ - - AddProperty(new MP4BytesProperty(*this, "textData", 36)); /* 0 */ - -} - - -void MP4TextAtom::Generate() -{ - ASSERT(m_pParentAtom); - if (ATOMID(m_pParentAtom->GetType()) == ATOMID("stsd")) { - AddPropertiesStsdType(); - GenerateStsdType(); - } else if (ATOMID(m_pParentAtom->GetType()) == ATOMID("gmhd")) { - AddPropertiesGmhdType(); - GenerateGmhdType(); - } else { - log.warningf("%s: \"%s\": text atom in unexpected context, can not generate", __FUNCTION__, - GetFile().GetFilename().c_str()); - } - -} - -void MP4TextAtom::GenerateStsdType() -{ - // generate children - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - - ((MP4Integer32Property*)m_pProperties[2])->SetValue(1); - ((MP4Integer32Property*)m_pProperties[3])->SetValue(1); - -} - -void MP4TextAtom::GenerateGmhdType() -{ - MP4Atom::Generate(); - - // property 0 has non-zero fixed values - static uint8_t textData[36] = { - 0x00, 0x01, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x01, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x40, 0x00, - 0x00, 0x00, - }; - ((MP4BytesProperty*)m_pProperties[0])->SetValue(textData, sizeof(textData)); - -} - -void MP4TextAtom::Read () -{ - if (ATOMID(m_pParentAtom->GetType()) == ATOMID("stsd")) { - AddPropertiesStsdType(); - } else if (ATOMID(m_pParentAtom->GetType()) == ATOMID("gmhd")) { - AddPropertiesGmhdType(); - } - - MP4Atom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tfhd.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tfhd.cpp deleted file mode 100644 index ddfc579e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tfhd.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4TfhdAtom::MP4TfhdAtom(MP4File &file) - : MP4Atom(file, "tfhd") -{ - AddVersionAndFlags(); /* 0, 1 */ - AddProperty( /* 2 */ - new MP4Integer32Property(*this, "trackId")); -} - -void MP4TfhdAtom::AddProperties(uint32_t flags) -{ - if (flags & 0x01) { - // note this property is signed 64! - AddProperty( - new MP4Integer64Property(*this, "baseDataOffset")); - } - if (flags & 0x02) { - AddProperty( - new MP4Integer32Property(*this, "sampleDescriptionIndex")); - } - if (flags & 0x08) { - AddProperty( - new MP4Integer32Property(*this, "defaultSampleDuration")); - } - if (flags & 0x10) { - AddProperty( - new MP4Integer32Property(*this, "defaultSampleSize")); - } - if (flags & 0x20) { - AddProperty( - new MP4Integer32Property(*this, "defaultSampleFlags")); - } -} - -void MP4TfhdAtom::Read() -{ - /* read atom version, flags, and trackId */ - ReadProperties(0, 3); - - /* need to create the properties based on the atom flags */ - AddProperties(GetFlags()); - - /* now we can read the remaining properties */ - ReadProperties(3); - - Skip(); // to end of atom -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tkhd.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tkhd.cpp deleted file mode 100644 index 3e9de35d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tkhd.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4TkhdAtom::MP4TkhdAtom(MP4File &file) - : MP4Atom(file, "tkhd") -{ - AddVersionAndFlags(); -} - -void MP4TkhdAtom::AddProperties(uint8_t version) -{ - if (version == 1) { - AddProperty( /* 2 */ - new MP4Integer64Property(*this, "creationTime")); - AddProperty( /* 3 */ - new MP4Integer64Property(*this, "modificationTime")); - } else { // version == 0 - AddProperty( /* 2 */ - new MP4Integer32Property(*this, "creationTime")); - AddProperty( /* 3 */ - new MP4Integer32Property(*this, "modificationTime")); - } - - AddProperty( /* 4 */ - new MP4Integer32Property(*this, "trackId")); - AddReserved(*this, "reserved1", 4); /* 5 */ - - if (version == 1) { - AddProperty( /* 6 */ - new MP4Integer64Property(*this, "duration")); - } else { - AddProperty( /* 6 */ - new MP4Integer32Property(*this, "duration")); - } - - AddReserved(*this, "reserved2", 8); /* 7 */ - - AddProperty( /* 8 */ - new MP4Integer16Property(*this, "layer")); - AddProperty( /* 9 */ - new MP4Integer16Property(*this, "alternate_group")); - - MP4Float32Property* pProp; - - pProp = new MP4Float32Property(*this, "volume"); - pProp->SetFixed16Format(); - AddProperty(pProp); /* 10 */ - - AddReserved(*this, "reserved3", 2); /* 11 */ - - AddProperty(new MP4BytesProperty(*this, "matrix", 36)); /* 12 */ - - pProp = new MP4Float32Property(*this, "width"); - pProp->SetFixed32Format(); - AddProperty(pProp); /* 13 */ - - pProp = new MP4Float32Property(*this, "height"); - pProp->SetFixed32Format(); - AddProperty(pProp); /* 14 */ -} - -void MP4TkhdAtom::Generate() -{ - uint8_t version = m_File.Use64Bits(GetType()) ? 1 : 0; - SetVersion(version); - AddProperties(version); - - MP4Atom::Generate(); - - // set creation and modification times - MP4Timestamp now = MP4GetAbsTimestamp(); - if (version == 1) { - ((MP4Integer64Property*)m_pProperties[2])->SetValue(now); - ((MP4Integer64Property*)m_pProperties[3])->SetValue(now); - } else { - ((MP4Integer32Property*)m_pProperties[2])->SetValue(now); - ((MP4Integer32Property*)m_pProperties[3])->SetValue(now); - } - - // property "matrix" has non-zero fixed values - // this default identity matrix indicates no transformation, i.e. - // 1, 0, 0 - // 0, 1, 0 - // 0, 0, 1 - // see http://developer.apple.com/documentation/QuickTime/QTFF/QTFFChap4/chapter_5_section_4.html - - static uint8_t matrix[36] = { - 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, - }; - - ((MP4BytesProperty*)m_pProperties[12])-> - SetValue(matrix, sizeof(matrix)); -} - -void MP4TkhdAtom::Read() -{ - /* read atom version */ - ReadProperties(0, 1); - - /* need to create the properties based on the atom version */ - AddProperties(GetVersion()); - - /* now we can read the remaining properties */ - ReadProperties(1); - - Skip(); // to end of atom -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_treftype.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_treftype.cpp deleted file mode 100644 index 6a7ff92a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_treftype.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4TrefTypeAtom::MP4TrefTypeAtom(MP4File &file, const char* type) - : MP4Atom(file, type) -{ - MP4Integer32Property* pCount = - new MP4Integer32Property(*this, "entryCount"); - pCount->SetImplicit(); - AddProperty(pCount); /* 0 */ - - MP4TableProperty* pTable = new MP4TableProperty(*this, "entries", pCount); - AddProperty(pTable); /* 1 */ - - pTable->AddProperty( /* 1, 0 */ - new MP4Integer32Property(pTable->GetParentAtom(), "trackId")); -} - -void MP4TrefTypeAtom::Read() -{ - // table entry count computed from atom size - ((MP4Integer32Property*)m_pProperties[0])->SetReadOnly(false); - ((MP4Integer32Property*)m_pProperties[0])->SetValue(m_size / 4); - ((MP4Integer32Property*)m_pProperties[0])->SetReadOnly(true); - - MP4Atom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_trun.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_trun.cpp deleted file mode 100644 index 765e4179..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_trun.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4TrunAtom::MP4TrunAtom(MP4File &file) - : MP4Atom(file, "trun") -{ - AddVersionAndFlags(); /* 0, 1 */ - AddProperty( /* 2 */ - new MP4Integer32Property(*this, "sampleCount")); -} - -void MP4TrunAtom::AddProperties(uint32_t flags) -{ - if (flags & 0x01) { - // Note this is a signed 32 value - AddProperty( - new MP4Integer32Property(*this, "dataOffset")); - } - if (flags & 0x04) { - AddProperty( - new MP4Integer32Property(*this, "firstSampleFlags")); - } - - MP4TableProperty* pTable = - new MP4TableProperty(*this, "samples", - (MP4Integer32Property *)m_pProperties[2]); - AddProperty(pTable); - - if (flags & 0x100) { - pTable->AddProperty( - new MP4Integer32Property(*this, "sampleDuration")); - } - if (flags & 0x200) { - pTable->AddProperty( - new MP4Integer32Property(*this, "sampleSize")); - } - if (flags & 0x400) { - pTable->AddProperty( - new MP4Integer32Property(*this, "sampleFlags")); - } - if (flags & 0x800) { - pTable->AddProperty( - new MP4Integer32Property(*this, "sampleCompositionTimeOffset")); - } -} - -void MP4TrunAtom::Read() -{ - /* read atom version, flags, and sampleCount */ - ReadProperties(0, 3); - - /* need to create the properties based on the atom flags */ - AddProperties(GetFlags()); - - /* now we can read the remaining properties */ - ReadProperties(3); - - Skip(); // to end of atom -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tx3g.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tx3g.cpp deleted file mode 100644 index a54dd6be..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_tx3g.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4Tx3gAtom::MP4Tx3gAtom(MP4File &file) - : MP4Atom(file, "tx3g") -{ - AddReserved(*this, "reserved1", 4); /* 0 */ - AddReserved(*this, "reserved2", 2); /* 1 */ - - AddProperty(new MP4Integer16Property(*this, "dataReferenceIndex"));/* 2 */ - - AddProperty(new MP4Integer32Property(*this, "displayFlags")); /* 3 */ - AddProperty(new MP4Integer8Property(*this, "horizontalJustification")); /* 4 */ - AddProperty(new MP4Integer8Property(*this, "verticalJustification")); /* 5 */ - - AddProperty(new MP4Integer8Property(*this, "bgColorRed")); /* 6 */ - AddProperty(new MP4Integer8Property(*this, "bgColorGreen")); /* 7 */ - AddProperty(new MP4Integer8Property(*this, "bgColorBlue")); /* 8 */ - AddProperty(new MP4Integer8Property(*this, "bgColorAlpha")); /* 9 */ - - AddProperty(new MP4Integer16Property(*this, "defTextBoxTop")); /* 10 */ - AddProperty(new MP4Integer16Property(*this, "defTextBoxLeft")); /* 11 */ - AddProperty(new MP4Integer16Property(*this, "defTextBoxBottom")); /* 12 */ - AddProperty(new MP4Integer16Property(*this, "defTextBoxRight")); /* 13 */ - - AddProperty(new MP4Integer16Property(*this, "startChar")); /* 14 */ - AddProperty(new MP4Integer16Property(*this, "endChar")); /* 15 */ - AddProperty(new MP4Integer16Property(*this, "fontID")); /* 16 */ - AddProperty(new MP4Integer8Property(*this, "fontFace")); /* 17 */ - AddProperty(new MP4Integer8Property(*this, "fontSize")); /* 18 */ - - AddProperty(new MP4Integer8Property(*this, "fontColorRed")); /* 19 */ - AddProperty(new MP4Integer8Property(*this, "fontColorGreen")); /* 20 */ - AddProperty(new MP4Integer8Property(*this, "fontColorBlue")); /* 21 */ - AddProperty(new MP4Integer8Property(*this, "fontColorAlpha")); /* 22 */ - - ExpectChildAtom("ftab", Optional, Many); -} - -void MP4Tx3gAtom::Generate() -{ - // generate children - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[2])->SetValue(1); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_udta.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_udta.cpp deleted file mode 100644 index eff4dfa1..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_udta.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4UdtaAtom::MP4UdtaAtom(MP4File &file) - : MP4Atom(file, "udta") -{ - ExpectChildAtom("chpl", Optional, OnlyOne); - ExpectChildAtom("cprt", Optional, Many); - ExpectChildAtom("hnti", Optional, OnlyOne); - ExpectChildAtom("meta", Optional, OnlyOne); - ExpectChildAtom("\251cpy", Optional, OnlyOne); - ExpectChildAtom("\251des", Optional, OnlyOne); - ExpectChildAtom("\251nam", Optional, OnlyOne); - ExpectChildAtom("\251cmt", Optional, OnlyOne); - ExpectChildAtom("\251prd", Optional, OnlyOne); -} - -void MP4UdtaAtom::Read() -{ - if (ATOMID(m_pParentAtom->GetType()) == ATOMID("trak")) { - ExpectChildAtom("hinf", Optional, OnlyOne); - ExpectChildAtom("name", Optional, OnlyOne); - } - - MP4Atom::Read(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_url.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_url.cpp deleted file mode 100644 index 4d47d34b..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_url.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4UrlAtom::MP4UrlAtom(MP4File &file, const char *type) - : MP4Atom(file, type) -{ - AddVersionAndFlags(); - AddProperty(new MP4StringProperty(*this, "location")); -} - -void MP4UrlAtom::Read() -{ - // read the version and flags properties - ReadProperties(0, 2); - - // check if self-contained flag is set - if (!(GetFlags() & 1)) { - // if not then read url location - ReadProperties(2); - } - - Skip(); // to end of atom -} - -void MP4UrlAtom::Write() -{ - MP4StringProperty* pLocationProp = - (MP4StringProperty*)m_pProperties[2]; - - // if no url location has been set - // then set self-contained flag - // and don't attempt to write anything - if (pLocationProp->GetValue() == NULL) { - SetFlags(GetFlags() | 1); - pLocationProp->SetImplicit(true); - } else { - SetFlags(GetFlags() & 0xFFFFFE); - pLocationProp->SetImplicit(false); - } - - // write atom as usual - MP4Atom::Write(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_urn.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_urn.cpp deleted file mode 100644 index f3da3e87..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_urn.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4UrnAtom::MP4UrnAtom(MP4File &file) - : MP4Atom(file, "urn ") -{ - AddVersionAndFlags(); - AddProperty(new MP4StringProperty(*this, "name")); - AddProperty(new MP4StringProperty(*this, "location")); -} - -void MP4UrnAtom::Read() -{ - // read the version, flags, and name properties - ReadProperties(0, 3); - - // check if location is present - if (m_File.GetPosition() < GetEnd()) { - // read it - ReadProperties(3); - } - - Skip(); // to end of atom -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_uuid.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_uuid.cpp deleted file mode 100644 index c2839602..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_uuid.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -IPodUUIDAtom::IPodUUIDAtom(MP4File &file) - : MP4Atom(file, "uuid") -{ - // - // This is a hack, the contents of this atom need to be well defined. - // - static uint8_t ipod_magic[] = { - 0x6b, 0x68, 0x40, 0xf2, 0x5f, 0x24, 0x4f, 0xc5, - 0xba, 0x39, 0xa5, 0x1b, 0xcf, 0x03, 0x23, 0xf3 - }; - - SetExtendedType(ipod_magic); - - MP4Integer32Property* value = new MP4Integer32Property(*this, "value"); - value->SetValue(1); - AddProperty(value); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_video.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_video.cpp deleted file mode 100644 index aeabd735..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_video.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2004. All Rights Reserved. - * - * Contributor(s): - * Bill May wmay@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4VideoAtom::MP4VideoAtom (MP4File &file, const char *type) - : MP4Atom(file, type) -{ - AddReserved(*this, "reserved1", 6); /* 0 */ - - AddProperty( /* 1 */ - new MP4Integer16Property(*this, "dataReferenceIndex")); - - AddReserved(*this, "reserved2", 16); /* 2 */ - - AddProperty( /* 3 */ - new MP4Integer16Property(*this, "width")); - AddProperty( /* 4 */ - new MP4Integer16Property(*this, "height")); - - AddReserved(*this, "reserved3", 14); /* 5 */ - - MP4StringProperty* pProp = - new MP4StringProperty(*this, "compressorName"); - pProp->SetFixedLength(32); - pProp->SetCountedFormat(true); - pProp->SetValue(""); - AddProperty(pProp); /* 6 */ - - AddProperty(/* 7 */ - new MP4Integer16Property(*this, "depth")); - AddProperty(/* 8 */ - new MP4Integer16Property(*this, "colorTableId")); - ExpectChildAtom("smi ", Optional, OnlyOne); -} - -void MP4VideoAtom::Generate() -{ - MP4Atom::Generate(); - - ((MP4Integer16Property*)m_pProperties[1])->SetValue(1); - - // property reserved3 has non-zero fixed values - static uint8_t reserved3[14] = { - 0x00, 0x48, 0x00, 0x00, - 0x00, 0x48, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, - }; - m_pProperties[5]->SetReadOnly(false); - ((MP4BytesProperty*)m_pProperties[5])-> - SetValue(reserved3, sizeof(reserved3)); - m_pProperties[5]->SetReadOnly(true); - - // depth and color table id values - should be set later - // as far as depth - color table is most likely 0xff - ((MP4IntegerProperty *)m_pProperties[7])->SetValue(0x18); - ((MP4IntegerProperty *)m_pProperties[8])->SetValue(0xffff); - -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_vmhd.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_vmhd.cpp deleted file mode 100644 index eb06a26b..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atom_vmhd.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4VmhdAtom::MP4VmhdAtom(MP4File &file) - : MP4Atom(file, "vmhd") -{ - AddVersionAndFlags(); - AddReserved(*this, "reserved", 8); -} - -void MP4VmhdAtom::Generate() -{ - MP4Atom::Generate(); - - SetFlags(1); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atoms.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atoms.h deleted file mode 100644 index 382706f7..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/atoms.h +++ /dev/null @@ -1,829 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001 - 2005. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Ximpo Group Ltd. mp4v2@ximpo.com - * Bill May wmay@cisco.com - */ - -#ifndef MP4V2_IMPL_ATOMS_H -#define MP4V2_IMPL_ATOMS_H - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -class MP4FtypAtom; -class MP4FreeAtom; - -/// ISO base media full-atom. -class MP4FullAtom : public MP4Atom -{ -public: - MP4FullAtom( MP4File &file, const char* type ); - - MP4Integer8Property& version; - MP4Integer24Property& flags; -private: - MP4FullAtom(); - MP4FullAtom( const MP4FullAtom &src ); - MP4FullAtom &operator= ( const MP4FullAtom &src ); -}; - -// declare all the atom subclasses -// i.e. spare us atom_xxxx.h for all the atoms -// -// The majority of atoms just need their own constructor declared -// Some atoms have a few special needs -// A small minority of atoms need lots of special handling - -class MP4RootAtom : public MP4Atom -{ -public: - MP4RootAtom(MP4File &file); - void BeginWrite(bool use64 = false); - void Write(); - void FinishWrite(bool use64 = false); - - void BeginOptimalWrite(); - void FinishOptimalWrite(); - -protected: - uint32_t GetLastMdatIndex(); - void WriteAtomType(const char* type, bool onlyOne); - -private: - MP4RootAtom(); - MP4RootAtom( const MP4RootAtom &src ); - MP4RootAtom &operator= ( const MP4RootAtom &src ); - - MP4FtypAtom* m_rewrite_ftyp; - uint64_t m_rewrite_ftypPosition; - MP4FreeAtom* m_rewrite_free; - uint64_t m_rewrite_freePosition; -}; - -/*********************************************************************** - * Common atom classes - standard for anything that just contains atoms - * and non-maleable properties, treftype and url - ***********************************************************************/ -class MP4StandardAtom : public MP4Atom { -public: - MP4StandardAtom(MP4File &file, const char *name); -private: - MP4StandardAtom(); - MP4StandardAtom( const MP4StandardAtom &src ); - MP4StandardAtom &operator= ( const MP4StandardAtom &src ); -}; - -class MP4TrefTypeAtom : public MP4Atom { -public: - MP4TrefTypeAtom(MP4File &file, const char* type); - void Read(); -private: - MP4TrefTypeAtom(); - MP4TrefTypeAtom( const MP4TrefTypeAtom &src ); - MP4TrefTypeAtom &operator= ( const MP4TrefTypeAtom &src ); -}; - -class MP4UrlAtom : public MP4Atom { -public: - MP4UrlAtom(MP4File &file, const char *type="url "); - void Read(); - void Write(); -private: - MP4UrlAtom(); - MP4UrlAtom( const MP4UrlAtom &src ); - MP4UrlAtom &operator= ( const MP4UrlAtom &src ); -}; - -/*********************************************************************** - * Sound and Video atoms - use the generic atoms when possible - * (MP4SoundAtom and MP4VideoAtom) - ***********************************************************************/ -class MP4SoundAtom : public MP4Atom { -public: - MP4SoundAtom(MP4File &file, const char *atomid); - void Generate(); - void Read(); -protected: - void AddProperties(uint8_t version); -private: - MP4SoundAtom(); - MP4SoundAtom( const MP4SoundAtom &src ); - MP4SoundAtom &operator= ( const MP4SoundAtom &src ); -}; - -class MP4VideoAtom : public MP4Atom { -public: - MP4VideoAtom(MP4File &file, const char *atomid); - void Generate(); -private: - MP4VideoAtom(); - MP4VideoAtom( const MP4VideoAtom &src ); - MP4VideoAtom &operator= ( const MP4VideoAtom &src ); -}; - -class MP4AmrAtom : public MP4Atom { -public: - MP4AmrAtom(MP4File &file, const char *type); - void Generate(); -private: - MP4AmrAtom(); - MP4AmrAtom( const MP4AmrAtom &src ); - MP4AmrAtom &operator= ( const MP4AmrAtom &src ); -}; - -// H.264 atoms - -class MP4Avc1Atom : public MP4Atom { -public: - MP4Avc1Atom(MP4File &file); - void Generate(); -private: - MP4Avc1Atom(); - MP4Avc1Atom( const MP4Avc1Atom &src ); - MP4Avc1Atom &operator= ( const MP4Avc1Atom &src ); -}; - -class MP4AvcCAtom : public MP4Atom { -public: - MP4AvcCAtom(MP4File &file); - void Generate(); - void Clone(MP4AvcCAtom *dstAtom); -private: - MP4AvcCAtom(); - MP4AvcCAtom( const MP4AvcCAtom &src ); - MP4AvcCAtom &operator= ( const MP4AvcCAtom &src ); -}; - - -class MP4D263Atom : public MP4Atom { -public: - MP4D263Atom(MP4File &file); - void Generate(); - void Write(); -private: - MP4D263Atom(); - MP4D263Atom( const MP4D263Atom &src ); - MP4D263Atom &operator= ( const MP4D263Atom &src ); -}; - -class MP4DamrAtom : public MP4Atom { -public: - MP4DamrAtom(MP4File &file); - void Generate(); -private: - MP4DamrAtom(); - MP4DamrAtom( const MP4DamrAtom &src ); - MP4DamrAtom &operator= ( const MP4DamrAtom &src ); -}; - -class MP4EncaAtom : public MP4Atom { -public: - MP4EncaAtom(MP4File &file); - void Generate(); -private: - MP4EncaAtom(); - MP4EncaAtom( const MP4EncaAtom &src ); - MP4EncaAtom &operator= ( const MP4EncaAtom &src ); -}; - -class MP4EncvAtom : public MP4Atom { -public: - MP4EncvAtom(MP4File &file); - void Generate(); -private: - MP4EncvAtom(); - MP4EncvAtom( const MP4EncvAtom &src ); - MP4EncvAtom &operator= ( const MP4EncvAtom &src ); -}; - -class MP4Mp4aAtom : public MP4Atom { -public: - MP4Mp4aAtom(MP4File &file); - void Generate(); -private: - MP4Mp4aAtom(); - MP4Mp4aAtom( const MP4Mp4aAtom &src ); - MP4Mp4aAtom &operator= ( const MP4Mp4aAtom &src ); -}; - -class MP4Ac3Atom : public MP4Atom { -public: - MP4Ac3Atom(MP4File &file); - void Generate(); -private: - MP4Ac3Atom(); - MP4Ac3Atom( const MP4Ac3Atom &src ); - MP4Ac3Atom &operator= ( const MP4Ac3Atom &src ); -}; - -class MP4DAc3Atom : public MP4Atom { -public: - MP4DAc3Atom(MP4File &file); - void Generate(); - void Dump(uint8_t indent, bool dumpImplicits); -private: - MP4DAc3Atom(); - MP4DAc3Atom( const MP4DAc3Atom &src ); - MP4DAc3Atom &operator= ( const MP4DAc3Atom &src ); -}; - -class MP4Mp4sAtom : public MP4Atom { -public: - MP4Mp4sAtom(MP4File &file); - void Generate(); -private: - MP4Mp4sAtom(); - MP4Mp4sAtom( const MP4Mp4sAtom &src ); - MP4Mp4sAtom &operator= ( const MP4Mp4sAtom &src ); -}; - -class MP4Mp4vAtom : public MP4Atom { -public: - MP4Mp4vAtom(MP4File &file); - void Generate(); -private: - MP4Mp4vAtom(); - MP4Mp4vAtom( const MP4Mp4vAtom &src ); - MP4Mp4vAtom &operator= ( const MP4Mp4vAtom &src ); -}; - - -class MP4S263Atom : public MP4Atom { -public: - MP4S263Atom(MP4File &file); - void Generate(); -private: - MP4S263Atom(); - MP4S263Atom( const MP4S263Atom &src ); - MP4S263Atom &operator= ( const MP4S263Atom &src ); -}; - - - -/************************************************************************ - * Specialized Atoms - ************************************************************************/ - -class MP4DrefAtom : public MP4Atom { -public: - MP4DrefAtom(MP4File &file); - void Read(); -private: - MP4DrefAtom(); - MP4DrefAtom( const MP4DrefAtom &src ); - MP4DrefAtom &operator= ( const MP4DrefAtom &src ); -}; - -class MP4ElstAtom : public MP4Atom { -public: - MP4ElstAtom(MP4File &file); - void Generate(); - void Read(); -protected: - void AddProperties(uint8_t version); -private: - MP4ElstAtom(); - MP4ElstAtom( const MP4ElstAtom &src ); - MP4ElstAtom &operator= ( const MP4ElstAtom &src ); -}; - -class MP4FreeAtom : public MP4Atom { -public: - MP4FreeAtom( MP4File &file, const char* = NULL ); - void Read(); - void Write(); -private: - MP4FreeAtom(); - MP4FreeAtom( const MP4FreeAtom &src ); - MP4FreeAtom &operator= ( const MP4FreeAtom &src ); -}; - -class MP4FtypAtom : public MP4Atom { -public: - MP4FtypAtom(MP4File &file); - void Generate(); - void Read(); - - MP4StringProperty& majorBrand; - MP4Integer32Property& minorVersion; - MP4StringProperty& compatibleBrands; -private: - MP4FtypAtom(); - MP4FtypAtom( const MP4FtypAtom &src ); - MP4FtypAtom &operator= ( const MP4FtypAtom &src ); -}; - -class MP4GminAtom : public MP4Atom { -public: - MP4GminAtom(MP4File &file); - void Generate(); -private: - MP4GminAtom(); - MP4GminAtom( const MP4GminAtom &src ); - MP4GminAtom &operator= ( const MP4GminAtom &src ); -}; - -class MP4HdlrAtom : public MP4Atom { -public: - MP4HdlrAtom(MP4File &file); - void Read(); -private: - MP4HdlrAtom(); - MP4HdlrAtom( const MP4HdlrAtom &src ); - MP4HdlrAtom &operator= ( const MP4HdlrAtom &src ); -}; - -class MP4HinfAtom : public MP4Atom { -public: - MP4HinfAtom(MP4File &file); - void Generate(); -private: - MP4HinfAtom(); - MP4HinfAtom( const MP4HinfAtom &src ); - MP4HinfAtom &operator= ( const MP4HinfAtom &src ); -}; - -class MP4HntiAtom : public MP4Atom { -public: - MP4HntiAtom(MP4File &file); - void Read(); -private: - MP4HntiAtom(); - MP4HntiAtom( const MP4HntiAtom &src ); - MP4HntiAtom &operator= ( const MP4HntiAtom &src ); -}; - - -class MP4MdatAtom : public MP4Atom { -public: - MP4MdatAtom(MP4File &file); - void Read(); - void Write(); -private: - MP4MdatAtom(); - MP4MdatAtom( const MP4MdatAtom &src ); - MP4MdatAtom &operator= ( const MP4MdatAtom &src ); -}; - -class MP4MdhdAtom : public MP4Atom { -public: - MP4MdhdAtom(MP4File &file); - void Generate(); - void Read(); -protected: - void AddProperties(uint8_t version); -private: - MP4MdhdAtom(); - MP4MdhdAtom( const MP4MdhdAtom &src ); - MP4MdhdAtom &operator= ( const MP4MdhdAtom &src ); -}; - -class MP4MvhdAtom : public MP4Atom { -public: - MP4MvhdAtom(MP4File &file); - void Generate(); - void Read(); -protected: - void AddProperties(uint8_t version); -private: - MP4MvhdAtom(); - MP4MvhdAtom( const MP4MvhdAtom &src ); - MP4MvhdAtom &operator= ( const MP4MvhdAtom &src ); -}; - -class MP4OhdrAtom : public MP4Atom { -public: - MP4OhdrAtom(MP4File &file); - ~MP4OhdrAtom(); - void Read(); -private: - MP4OhdrAtom(); - MP4OhdrAtom( const MP4OhdrAtom &src ); - MP4OhdrAtom &operator= ( const MP4OhdrAtom &src ); -}; - -class MP4RtpAtom : public MP4Atom { -public: - MP4RtpAtom(MP4File &file); - void Generate(); - void Read(); - void Write(); - -protected: - void AddPropertiesStsdType(); - void AddPropertiesHntiType(); - - void GenerateStsdType(); - void GenerateHntiType(); - - void ReadStsdType(); - void ReadHntiType(); - - void WriteHntiType(); - -private: - MP4RtpAtom(); - MP4RtpAtom( const MP4RtpAtom &src ); - MP4RtpAtom &operator= ( const MP4RtpAtom &src ); -}; - -class MP4SdpAtom : public MP4Atom { -public: - MP4SdpAtom(MP4File &file); - void Read(); - void Write(); -private: - MP4SdpAtom(); - MP4SdpAtom( const MP4SdpAtom &src ); - MP4SdpAtom &operator= ( const MP4SdpAtom &src ); -}; - -// sdtp - Independent and Disposable Samples Atom. -class MP4SdtpAtom : public MP4FullAtom { -public: - MP4SdtpAtom(MP4File &file); - void Read(); - - // raw bytes; one byte for each sample. - // number of bytes == stsz.sampleCount. - MP4BytesProperty& data; -private: - MP4SdtpAtom(); - MP4SdtpAtom( const MP4SdtpAtom &src ); - MP4SdtpAtom &operator= ( const MP4SdtpAtom &src ); -}; - -class MP4SmiAtom : public MP4Atom { -public: - MP4SmiAtom(MP4File &file); - void Read(); -private: - MP4SmiAtom(); - MP4SmiAtom( const MP4SmiAtom &src ); - MP4SmiAtom &operator= ( const MP4SmiAtom &src ); -}; - -class MP4StblAtom : public MP4Atom { -public: - MP4StblAtom(MP4File &file); - void Generate(); -private: - MP4StblAtom(); - MP4StblAtom( const MP4StblAtom &src ); - MP4StblAtom &operator= ( const MP4StblAtom &src ); -}; - -class MP4StdpAtom : public MP4Atom { -public: - MP4StdpAtom(MP4File &file); - void Read(); -private: - MP4StdpAtom(); - MP4StdpAtom( const MP4StdpAtom &src ); - MP4StdpAtom &operator= ( const MP4StdpAtom &src ); -}; - -class MP4StscAtom : public MP4Atom { -public: - MP4StscAtom(MP4File &file); - void Read(); -private: - MP4StscAtom(); - MP4StscAtom( const MP4StscAtom &src ); - MP4StscAtom &operator= ( const MP4StscAtom &src ); -}; - -class MP4StsdAtom : public MP4Atom { -public: - MP4StsdAtom(MP4File &file); - void Read(); -private: - MP4StsdAtom(); - MP4StsdAtom( const MP4StsdAtom &src ); - MP4StsdAtom &operator= ( const MP4StsdAtom &src ); -}; - -class MP4StszAtom : public MP4Atom { -public: - MP4StszAtom(MP4File &file); - void Read(); - void Write(); -private: - MP4StszAtom(); - MP4StszAtom( const MP4StszAtom &src ); - MP4StszAtom &operator= ( const MP4StszAtom &src ); -}; - -class MP4Stz2Atom : public MP4Atom { -public: - MP4Stz2Atom(MP4File &file); - void Read(); -private: - MP4Stz2Atom(); - MP4Stz2Atom( const MP4Stz2Atom &src ); - MP4Stz2Atom &operator= ( const MP4Stz2Atom &src ); -}; - -class MP4TextAtom : public MP4Atom { -public: - MP4TextAtom(MP4File &file); - void Generate(); - void Read(); -protected: - void AddPropertiesStsdType(); - void AddPropertiesGmhdType(); - - void GenerateStsdType(); - void GenerateGmhdType(); -private: - MP4TextAtom(); - MP4TextAtom( const MP4TextAtom &src ); - MP4TextAtom &operator= ( const MP4TextAtom &src ); -}; - -class MP4Tx3gAtom : public MP4Atom { -public: - MP4Tx3gAtom(MP4File &file); - void Generate(); -private: - MP4Tx3gAtom(); - MP4Tx3gAtom( const MP4Tx3gAtom &src ); - MP4Tx3gAtom &operator= ( const MP4Tx3gAtom &src ); -}; - -class MP4FtabAtom : public MP4Atom { -public: - MP4FtabAtom(MP4File &file); -private: - MP4FtabAtom(); - MP4FtabAtom( const MP4FtabAtom &src ); - MP4FtabAtom &operator= ( const MP4FtabAtom &src ); -}; - -class MP4TfhdAtom : public MP4Atom { -public: - MP4TfhdAtom(MP4File &file); - void Read(); -protected: - void AddProperties(uint32_t flags); -private: - MP4TfhdAtom(); - MP4TfhdAtom( const MP4TfhdAtom &src ); - MP4TfhdAtom &operator= ( const MP4TfhdAtom &src ); -}; - -class MP4TkhdAtom : public MP4Atom { -public: - MP4TkhdAtom(MP4File &file); - void Generate(); - void Read(); -protected: - void AddProperties(uint8_t version); -private: - MP4TkhdAtom(); - MP4TkhdAtom( const MP4TkhdAtom &src ); - MP4TkhdAtom &operator= ( const MP4TkhdAtom &src ); -}; - -class MP4TrunAtom : public MP4Atom { -public: - MP4TrunAtom(MP4File &file); - void Read(); -protected: - void AddProperties(uint32_t flags); -private: - MP4TrunAtom(); - MP4TrunAtom( const MP4TrunAtom &src ); - MP4TrunAtom &operator= ( const MP4TrunAtom &src ); -}; - -class MP4UdtaAtom : public MP4Atom { -public: - MP4UdtaAtom(MP4File &file); - void Read(); -private: - MP4UdtaAtom(); - MP4UdtaAtom( const MP4UdtaAtom &src ); - MP4UdtaAtom &operator= ( const MP4UdtaAtom &src ); -}; - -class MP4UrnAtom : public MP4Atom { -public: - MP4UrnAtom(MP4File &file); - void Read(); -private: - MP4UrnAtom(); - MP4UrnAtom( const MP4UrnAtom &src ); - MP4UrnAtom &operator= ( const MP4UrnAtom &src ); -}; - -class MP4VmhdAtom : public MP4Atom { -public: - MP4VmhdAtom(MP4File &file); - void Generate(); -private: - MP4VmhdAtom(); - MP4VmhdAtom( const MP4VmhdAtom &src ); - MP4VmhdAtom &operator= ( const MP4VmhdAtom &src ); -}; - -class MP4HrefAtom : public MP4Atom { -public: - MP4HrefAtom(MP4File &file); - void Generate(void); -private: - MP4HrefAtom(); - MP4HrefAtom( const MP4HrefAtom &src ); - MP4HrefAtom &operator= ( const MP4HrefAtom &src ); -}; - -class MP4PaspAtom : public MP4Atom { -public: - MP4PaspAtom(MP4File &file); - void Generate(); -private: - MP4PaspAtom(); - MP4PaspAtom( const MP4PaspAtom &src ); - MP4PaspAtom &operator= ( const MP4PaspAtom &src ); -}; - -class MP4ColrAtom : public MP4Atom { -public: - MP4ColrAtom(MP4File &file); - void Generate(); -private: - MP4ColrAtom(); - MP4ColrAtom( const MP4ColrAtom &src ); - MP4ColrAtom &operator= ( const MP4ColrAtom &src ); -}; - -class IPodUUIDAtom : public MP4Atom { -public: - IPodUUIDAtom(MP4File &file); -private: - IPodUUIDAtom(); - IPodUUIDAtom( const IPodUUIDAtom &src ); - IPodUUIDAtom &operator= ( const IPodUUIDAtom &src ); -}; - -class MP4NmhdAtom : public MP4Atom { -public: - MP4NmhdAtom(MP4File &file); -private: - MP4NmhdAtom(); - MP4NmhdAtom( const MP4NmhdAtom &src ); - MP4NmhdAtom &operator= ( const MP4NmhdAtom &src ); -}; - -/*! Nero Chapter List. - * This atom defines the structure of a Nero chapter list. - * Although it is not completely clear if this structure is - * correct it is complete enough to successfully read and write - * the chapter list so that even Nero's software accepts it. - * - * The assumed format is as follows: - * - MP4Integer8Property("version") - * - MP4Integer24Property("flags") - * - MP4BytesProperty("reserved", 1) - * - MP4Integer32Property("chaptercount")\n - * - MP4TableProperty("chapters", "ref to chaptercount"); - * - MP4Integer64Property("starttime")\n - * The start time of the chapter expressed in 100 nanosecond units - * - MP4StringProperty("title", true)\n - * The title of the chapter encoded in UTF-8 - * - * The chapter title only accepts strings of 255 bytes so if a string - * only contains simple (two-byte) UTF-8 chars the maximum length is - * 127 chars. - */ -class MP4ChplAtom : public MP4Atom { -public: - MP4ChplAtom(MP4File &file); - void Generate(); -private: - MP4ChplAtom(); - MP4ChplAtom( const MP4ChplAtom &src ); - MP4ChplAtom &operator= ( const MP4ChplAtom &src ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -/// iTMF hdlr-atom. -class MP4ItmfHdlrAtom : public MP4FullAtom -{ -public: - MP4ItmfHdlrAtom(MP4File &file); - void Read(); - - MP4Integer32Property& reserved1; - MP4BytesProperty& handlerType; - MP4BytesProperty& reserved2; - MP4BytesProperty& name; -private: - MP4ItmfHdlrAtom(); - MP4ItmfHdlrAtom( const MP4ItmfHdlrAtom &src ); - MP4ItmfHdlrAtom &operator= ( const MP4ItmfHdlrAtom &src ); -}; - -/// iTMF item-atom. -class MP4ItemAtom : public MP4Atom -{ -public: - MP4ItemAtom( MP4File &file, const char* type ); -private: - MP4ItemAtom(); - MP4ItemAtom( const MP4ItemAtom &src ); - MP4ItemAtom &operator= ( const MP4ItemAtom &src ); -}; - -/// iTMF meaning-atom. -class MP4MeanAtom : public MP4FullAtom -{ -public: - MP4MeanAtom(MP4File &file); - void Read(); - - MP4BytesProperty& value; -private: - MP4MeanAtom(); - MP4MeanAtom( const MP4MeanAtom &src ); - MP4MeanAtom &operator= ( const MP4MeanAtom &src ); -}; - -/// iTMF name-atom. -class MP4NameAtom : public MP4FullAtom -{ -public: - MP4NameAtom(MP4File &file); - void Read(); - - MP4BytesProperty& value; -private: - MP4NameAtom(); - MP4NameAtom( const MP4NameAtom &src ); - MP4NameAtom &operator= ( const MP4NameAtom &src ); -}; - -/// iTMF data-atom. -class MP4DataAtom : public MP4Atom -{ -public: - MP4DataAtom(MP4File &file); - void Read(); - - MP4Integer16Property& typeReserved; - MP4Integer8Property& typeSetIdentifier; - MP4BasicTypeProperty& typeCode; - MP4Integer32Property& locale; - MP4BytesProperty& metadata; -private: - MP4DataAtom(); - MP4DataAtom( const MP4DataAtom &src ); - MP4DataAtom &operator= ( const MP4DataAtom &src ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -/// QTFF udta data element-atom. -class MP4UdtaElementAtom : public MP4Atom -{ -public: - MP4UdtaElementAtom( MP4File &file, const char* type ); - void Read(); - - MP4BytesProperty& value; -private: - MP4UdtaElementAtom(); - MP4UdtaElementAtom( const MP4UdtaElementAtom &src ); - MP4UdtaElementAtom &operator= ( const MP4UdtaElementAtom &src ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_ATOMS_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/bmff.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/bmff.h deleted file mode 100644 index 8fa3020c..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/bmff.h +++ /dev/null @@ -1,43 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_BMFF_BMFF_H -#define MP4V2_IMPL_BMFF_BMFF_H - -/// @namespace mp4v2::impl::bmff (private) ISO base media file format. -/// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. -/// -/// This namespace implements some features that are specified by -/// ISO base media file format, ISO/IEC 14496-12:2005(E). -/// -namespace mp4v2 { namespace impl { namespace bmff { - ; -}}} - -/////////////////////////////////////////////////////////////////////////////// - -//#include "type.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_IMPL_BMFF_BMFF_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/impl.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/impl.h deleted file mode 100644 index b2478072..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/impl.h +++ /dev/null @@ -1,34 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_BMFF_IMPL_H -#define MP4V2_IMPL_BMFF_IMPL_H - -/////////////////////////////////////////////////////////////////////////////// - -#include "src/impl.h" -#include "bmff.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_IMPL_BMFF_IMPL_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/typebmff.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/typebmff.cpp deleted file mode 100644 index e027a451..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/typebmff.cpp +++ /dev/null @@ -1,531 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -template <> -const bmff::EnumLanguageCode::Entry bmff::EnumLanguageCode::data[] = { - { mp4v2::impl::bmff::ILC_AAR, "aar", "Afar" }, - { mp4v2::impl::bmff::ILC_ABK, "abk", "Abkhazian" }, - { mp4v2::impl::bmff::ILC_ACE, "ace", "Achinese" }, - { mp4v2::impl::bmff::ILC_ACH, "ach", "Acoli" }, - { mp4v2::impl::bmff::ILC_ADA, "ada", "Adangme" }, - { mp4v2::impl::bmff::ILC_ADY, "ady", "Adyghe; Adygei" }, - { mp4v2::impl::bmff::ILC_AFA, "afa", "Afro-Asiatic (Other)" }, - { mp4v2::impl::bmff::ILC_AFH, "afh", "Afrihili" }, - { mp4v2::impl::bmff::ILC_AFR, "afr", "Afrikaans" }, - { mp4v2::impl::bmff::ILC_AIN, "ain", "Ainu" }, - { mp4v2::impl::bmff::ILC_AKA, "aka", "Akan" }, - { mp4v2::impl::bmff::ILC_AKK, "akk", "Akkadian" }, - { mp4v2::impl::bmff::ILC_SQI, "sqi", "Albanian" }, - { mp4v2::impl::bmff::ILC_ALE, "ale", "Aleut" }, - { mp4v2::impl::bmff::ILC_ALG, "alg", "Algonquian languages" }, - { mp4v2::impl::bmff::ILC_ALT, "alt", "Southern Altai" }, - { mp4v2::impl::bmff::ILC_AMH, "amh", "Amharic" }, - { mp4v2::impl::bmff::ILC_ANG, "ang", "English, Old (ca.450-1100)" }, - { mp4v2::impl::bmff::ILC_ANP, "anp", "Angika" }, - { mp4v2::impl::bmff::ILC_APA, "apa", "Apache languages" }, - { mp4v2::impl::bmff::ILC_ARA, "ara", "Arabic" }, - { mp4v2::impl::bmff::ILC_ARC, "arc", "Official Aramaic (700-300 BCE); Imperial Aramaic (700-300 BCE)" }, - { mp4v2::impl::bmff::ILC_ARG, "arg", "Aragonese" }, - { mp4v2::impl::bmff::ILC_HYE, "hye", "Armenian" }, - { mp4v2::impl::bmff::ILC_ARN, "arn", "Mapudungun; Mapuche" }, - { mp4v2::impl::bmff::ILC_ARP, "arp", "Arapaho" }, - { mp4v2::impl::bmff::ILC_ART, "art", "Artificial (Other)" }, - { mp4v2::impl::bmff::ILC_ARW, "arw", "Arawak" }, - { mp4v2::impl::bmff::ILC_ASM, "asm", "Assamese" }, - { mp4v2::impl::bmff::ILC_AST, "ast", "Asturian; Bable; Leonese; Asturleonese" }, - { mp4v2::impl::bmff::ILC_ATH, "ath", "Athapascan languages" }, - { mp4v2::impl::bmff::ILC_AUS, "aus", "Australian languages" }, - { mp4v2::impl::bmff::ILC_AVA, "ava", "Avaric" }, - { mp4v2::impl::bmff::ILC_AVE, "ave", "Avestan" }, - { mp4v2::impl::bmff::ILC_AWA, "awa", "Awadhi" }, - { mp4v2::impl::bmff::ILC_AYM, "aym", "Aymara" }, - { mp4v2::impl::bmff::ILC_AZE, "aze", "Azerbaijani" }, - { mp4v2::impl::bmff::ILC_BAD, "bad", "Banda languages" }, - { mp4v2::impl::bmff::ILC_BAI, "bai", "Bamileke languages" }, - { mp4v2::impl::bmff::ILC_BAK, "bak", "Bashkir" }, - { mp4v2::impl::bmff::ILC_BAL, "bal", "Baluchi" }, - { mp4v2::impl::bmff::ILC_BAM, "bam", "Bambara" }, - { mp4v2::impl::bmff::ILC_BAN, "ban", "Balinese" }, - { mp4v2::impl::bmff::ILC_EUS, "eus", "Basque" }, - { mp4v2::impl::bmff::ILC_BAS, "bas", "Basa" }, - { mp4v2::impl::bmff::ILC_BAT, "bat", "Baltic (Other)" }, - { mp4v2::impl::bmff::ILC_BEJ, "bej", "Beja; Bedawiyet" }, - { mp4v2::impl::bmff::ILC_BEL, "bel", "Belarusian" }, - { mp4v2::impl::bmff::ILC_BEM, "bem", "Bemba" }, - { mp4v2::impl::bmff::ILC_BEN, "ben", "Bengali" }, - { mp4v2::impl::bmff::ILC_BER, "ber", "Berber (Other)" }, - { mp4v2::impl::bmff::ILC_BHO, "bho", "Bhojpuri" }, - { mp4v2::impl::bmff::ILC_BIH, "bih", "Bihari" }, - { mp4v2::impl::bmff::ILC_BIK, "bik", "Bikol" }, - { mp4v2::impl::bmff::ILC_BIN, "bin", "Bini; Edo" }, - { mp4v2::impl::bmff::ILC_BIS, "bis", "Bislama" }, - { mp4v2::impl::bmff::ILC_BLA, "bla", "Siksika" }, - { mp4v2::impl::bmff::ILC_BNT, "bnt", "Bantu (Other)" }, - { mp4v2::impl::bmff::ILC_BOS, "bos", "Bosnian" }, - { mp4v2::impl::bmff::ILC_BRA, "bra", "Braj" }, - { mp4v2::impl::bmff::ILC_BRE, "bre", "Breton" }, - { mp4v2::impl::bmff::ILC_BTK, "btk", "Batak languages" }, - { mp4v2::impl::bmff::ILC_BUA, "bua", "Buriat" }, - { mp4v2::impl::bmff::ILC_BUG, "bug", "Buginese" }, - { mp4v2::impl::bmff::ILC_BUL, "bul", "Bulgarian" }, - { mp4v2::impl::bmff::ILC_MYA, "mya", "Burmese" }, - { mp4v2::impl::bmff::ILC_BYN, "byn", "Blin; Bilin" }, - { mp4v2::impl::bmff::ILC_CAD, "cad", "Caddo" }, - { mp4v2::impl::bmff::ILC_CAI, "cai", "Central American Indian (Other)" }, - { mp4v2::impl::bmff::ILC_CAR, "car", "Galibi Carib" }, - { mp4v2::impl::bmff::ILC_CAT, "cat", "Catalan; Valencian" }, - { mp4v2::impl::bmff::ILC_CAU, "cau", "Caucasian (Other)" }, - { mp4v2::impl::bmff::ILC_CEB, "ceb", "Cebuano" }, - { mp4v2::impl::bmff::ILC_CEL, "cel", "Celtic (Other)" }, - { mp4v2::impl::bmff::ILC_CHA, "cha", "Chamorro" }, - { mp4v2::impl::bmff::ILC_CHB, "chb", "Chibcha" }, - { mp4v2::impl::bmff::ILC_CHE, "che", "Chechen" }, - { mp4v2::impl::bmff::ILC_CHG, "chg", "Chagatai" }, - { mp4v2::impl::bmff::ILC_ZHO, "zho", "Chinese" }, - { mp4v2::impl::bmff::ILC_CHK, "chk", "Chuukese" }, - { mp4v2::impl::bmff::ILC_CHM, "chm", "Mari" }, - { mp4v2::impl::bmff::ILC_CHN, "chn", "Chinook jargon" }, - { mp4v2::impl::bmff::ILC_CHO, "cho", "Choctaw" }, - { mp4v2::impl::bmff::ILC_CHP, "chp", "Chipewyan; Dene Suline" }, - { mp4v2::impl::bmff::ILC_CHR, "chr", "Cherokee" }, - { mp4v2::impl::bmff::ILC_CHU, "chu", "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic" }, - { mp4v2::impl::bmff::ILC_CHV, "chv", "Chuvash" }, - { mp4v2::impl::bmff::ILC_CHY, "chy", "Cheyenne" }, - { mp4v2::impl::bmff::ILC_CMC, "cmc", "Chamic languages" }, - { mp4v2::impl::bmff::ILC_COP, "cop", "Coptic" }, - { mp4v2::impl::bmff::ILC_COR, "cor", "Cornish" }, - { mp4v2::impl::bmff::ILC_COS, "cos", "Corsican" }, - { mp4v2::impl::bmff::ILC_CPE, "cpe", "Creoles and pidgins, English based (Other)" }, - { mp4v2::impl::bmff::ILC_CPF, "cpf", "Creoles and pidgins, French-based (Other)" }, - { mp4v2::impl::bmff::ILC_CPP, "cpp", "Creoles and pidgins, Portuguese-based (Other)" }, - { mp4v2::impl::bmff::ILC_CRE, "cre", "Cree" }, - { mp4v2::impl::bmff::ILC_CRH, "crh", "Crimean Tatar; Crimean Turkish" }, - { mp4v2::impl::bmff::ILC_CRP, "crp", "Creoles and pidgins (Other)" }, - { mp4v2::impl::bmff::ILC_CSB, "csb", "Kashubian" }, - { mp4v2::impl::bmff::ILC_CUS, "cus", "Cushitic (Other)" }, - { mp4v2::impl::bmff::ILC_CES, "ces", "Czech" }, - { mp4v2::impl::bmff::ILC_DAK, "dak", "Dakota" }, - { mp4v2::impl::bmff::ILC_DAN, "dan", "Danish" }, - { mp4v2::impl::bmff::ILC_DAR, "dar", "Dargwa" }, - { mp4v2::impl::bmff::ILC_DAY, "day", "Land Dayak languages" }, - { mp4v2::impl::bmff::ILC_DEL, "del", "Delaware" }, - { mp4v2::impl::bmff::ILC_DEN, "den", "Slave (Athapascan)" }, - { mp4v2::impl::bmff::ILC_DGR, "dgr", "Dogrib" }, - { mp4v2::impl::bmff::ILC_DIN, "din", "Dinka" }, - { mp4v2::impl::bmff::ILC_DIV, "div", "Divehi; Dhivehi; Maldivian" }, - { mp4v2::impl::bmff::ILC_DOI, "doi", "Dogri" }, - { mp4v2::impl::bmff::ILC_DRA, "dra", "Dravidian (Other)" }, - { mp4v2::impl::bmff::ILC_DSB, "dsb", "Lower Sorbian" }, - { mp4v2::impl::bmff::ILC_DUA, "dua", "Duala" }, - { mp4v2::impl::bmff::ILC_DUM, "dum", "Dutch, Middle (ca.1050-1350)" }, - { mp4v2::impl::bmff::ILC_NLD, "nld", "Dutch; Flemish" }, - { mp4v2::impl::bmff::ILC_DYU, "dyu", "Dyula" }, - { mp4v2::impl::bmff::ILC_DZO, "dzo", "Dzongkha" }, - { mp4v2::impl::bmff::ILC_EFI, "efi", "Efik" }, - { mp4v2::impl::bmff::ILC_EGY, "egy", "Egyptian (Ancient)" }, - { mp4v2::impl::bmff::ILC_EKA, "eka", "Ekajuk" }, - { mp4v2::impl::bmff::ILC_ELX, "elx", "Elamite" }, - { mp4v2::impl::bmff::ILC_ENG, "eng", "English" }, - { mp4v2::impl::bmff::ILC_ENM, "enm", "English, Middle (1100-1500)" }, - { mp4v2::impl::bmff::ILC_EPO, "epo", "Esperanto" }, - { mp4v2::impl::bmff::ILC_EST, "est", "Estonian" }, - { mp4v2::impl::bmff::ILC_EWE, "ewe", "Ewe" }, - { mp4v2::impl::bmff::ILC_EWO, "ewo", "Ewondo" }, - { mp4v2::impl::bmff::ILC_FAN, "fan", "Fang" }, - { mp4v2::impl::bmff::ILC_FAO, "fao", "Faroese" }, - { mp4v2::impl::bmff::ILC_FAT, "fat", "Fanti" }, - { mp4v2::impl::bmff::ILC_FIJ, "fij", "Fijian" }, - { mp4v2::impl::bmff::ILC_FIL, "fil", "Filipino; Pilipino" }, - { mp4v2::impl::bmff::ILC_FIN, "fin", "Finnish" }, - { mp4v2::impl::bmff::ILC_FIU, "fiu", "Finno-Ugrian (Other)" }, - { mp4v2::impl::bmff::ILC_FON, "fon", "Fon" }, - { mp4v2::impl::bmff::ILC_FRA, "fra", "French" }, - { mp4v2::impl::bmff::ILC_FRM, "frm", "French, Middle (ca.1400-1600)" }, - { mp4v2::impl::bmff::ILC_FRO, "fro", "French, Old (842-ca.1400)" }, - { mp4v2::impl::bmff::ILC_FRR, "frr", "Northern Frisian" }, - { mp4v2::impl::bmff::ILC_FRS, "frs", "Eastern Frisian" }, - { mp4v2::impl::bmff::ILC_FRY, "fry", "Western Frisian" }, - { mp4v2::impl::bmff::ILC_FUL, "ful", "Fulah" }, - { mp4v2::impl::bmff::ILC_FUR, "fur", "Friulian" }, - { mp4v2::impl::bmff::ILC_GAA, "gaa", "Ga" }, - { mp4v2::impl::bmff::ILC_GAY, "gay", "Gayo" }, - { mp4v2::impl::bmff::ILC_GBA, "gba", "Gbaya" }, - { mp4v2::impl::bmff::ILC_GEM, "gem", "Germanic (Other)" }, - { mp4v2::impl::bmff::ILC_KAT, "kat", "Georgian" }, - { mp4v2::impl::bmff::ILC_DEU, "deu", "German" }, - { mp4v2::impl::bmff::ILC_GEZ, "gez", "Geez" }, - { mp4v2::impl::bmff::ILC_GIL, "gil", "Gilbertese" }, - { mp4v2::impl::bmff::ILC_GLA, "gla", "Gaelic; Scottish Gaelic" }, - { mp4v2::impl::bmff::ILC_GLE, "gle", "Irish" }, - { mp4v2::impl::bmff::ILC_GLG, "glg", "Galician" }, - { mp4v2::impl::bmff::ILC_GLV, "glv", "Manx" }, - { mp4v2::impl::bmff::ILC_GMH, "gmh", "German, Middle High (ca.1050-1500)" }, - { mp4v2::impl::bmff::ILC_GOH, "goh", "German, Old High (ca.750-1050)" }, - { mp4v2::impl::bmff::ILC_GON, "gon", "Gondi" }, - { mp4v2::impl::bmff::ILC_GOR, "gor", "Gorontalo" }, - { mp4v2::impl::bmff::ILC_GOT, "got", "Gothic" }, - { mp4v2::impl::bmff::ILC_GRB, "grb", "Grebo" }, - { mp4v2::impl::bmff::ILC_GRC, "grc", "Greek, Ancient (to 1453)" }, - { mp4v2::impl::bmff::ILC_ELL, "ell", "Greek, Modern (1453-)" }, - { mp4v2::impl::bmff::ILC_GRN, "grn", "Guarani" }, - { mp4v2::impl::bmff::ILC_GSW, "gsw", "Swiss German; Alemannic; Alsatian" }, - { mp4v2::impl::bmff::ILC_GUJ, "guj", "Gujarati" }, - { mp4v2::impl::bmff::ILC_GWI, "gwi", "Gwich'in" }, - { mp4v2::impl::bmff::ILC_HAI, "hai", "Haida" }, - { mp4v2::impl::bmff::ILC_HAT, "hat", "Haitian; Haitian Creole" }, - { mp4v2::impl::bmff::ILC_HAU, "hau", "Hausa" }, - { mp4v2::impl::bmff::ILC_HAW, "haw", "Hawaiian" }, - { mp4v2::impl::bmff::ILC_HEB, "heb", "Hebrew" }, - { mp4v2::impl::bmff::ILC_HER, "her", "Herero" }, - { mp4v2::impl::bmff::ILC_HIL, "hil", "Hiligaynon" }, - { mp4v2::impl::bmff::ILC_HIM, "him", "Himachali" }, - { mp4v2::impl::bmff::ILC_HIN, "hin", "Hindi" }, - { mp4v2::impl::bmff::ILC_HIT, "hit", "Hittite" }, - { mp4v2::impl::bmff::ILC_HMN, "hmn", "Hmong" }, - { mp4v2::impl::bmff::ILC_HMO, "hmo", "Hiri Motu" }, - { mp4v2::impl::bmff::ILC_HRV, "hrv", "Croatian" }, - { mp4v2::impl::bmff::ILC_HSB, "hsb", "Upper Sorbian" }, - { mp4v2::impl::bmff::ILC_HUN, "hun", "Hungarian" }, - { mp4v2::impl::bmff::ILC_HUP, "hup", "Hupa" }, - { mp4v2::impl::bmff::ILC_IBA, "iba", "Iban" }, - { mp4v2::impl::bmff::ILC_IBO, "ibo", "Igbo" }, - { mp4v2::impl::bmff::ILC_ISL, "isl", "Icelandic" }, - { mp4v2::impl::bmff::ILC_IDO, "ido", "Ido" }, - { mp4v2::impl::bmff::ILC_III, "iii", "Sichuan Yi; Nuosu" }, - { mp4v2::impl::bmff::ILC_IJO, "ijo", "Ijo languages" }, - { mp4v2::impl::bmff::ILC_IKU, "iku", "Inuktitut" }, - { mp4v2::impl::bmff::ILC_ILE, "ile", "Interlingue; Occidental" }, - { mp4v2::impl::bmff::ILC_ILO, "ilo", "Iloko" }, - { mp4v2::impl::bmff::ILC_INA, "ina", "Interlingua (International Auxiliary Language Association)" }, - { mp4v2::impl::bmff::ILC_INC, "inc", "Indic (Other)" }, - { mp4v2::impl::bmff::ILC_IND, "ind", "Indonesian" }, - { mp4v2::impl::bmff::ILC_INE, "ine", "Indo-European (Other)" }, - { mp4v2::impl::bmff::ILC_INH, "inh", "Ingush" }, - { mp4v2::impl::bmff::ILC_IPK, "ipk", "Inupiaq" }, - { mp4v2::impl::bmff::ILC_IRA, "ira", "Iranian (Other)" }, - { mp4v2::impl::bmff::ILC_IRO, "iro", "Iroquoian languages" }, - { mp4v2::impl::bmff::ILC_ITA, "ita", "Italian" }, - { mp4v2::impl::bmff::ILC_JAV, "jav", "Javanese" }, - { mp4v2::impl::bmff::ILC_JBO, "jbo", "Lojban" }, - { mp4v2::impl::bmff::ILC_JPN, "jpn", "Japanese" }, - { mp4v2::impl::bmff::ILC_JPR, "jpr", "Judeo-Persian" }, - { mp4v2::impl::bmff::ILC_JRB, "jrb", "Judeo-Arabic" }, - { mp4v2::impl::bmff::ILC_KAA, "kaa", "Kara-Kalpak" }, - { mp4v2::impl::bmff::ILC_KAB, "kab", "Kabyle" }, - { mp4v2::impl::bmff::ILC_KAC, "kac", "Kachin; Jingpho" }, - { mp4v2::impl::bmff::ILC_KAL, "kal", "Kalaallisut; Greenlandic" }, - { mp4v2::impl::bmff::ILC_KAM, "kam", "Kamba" }, - { mp4v2::impl::bmff::ILC_KAN, "kan", "Kannada" }, - { mp4v2::impl::bmff::ILC_KAR, "kar", "Karen languages" }, - { mp4v2::impl::bmff::ILC_KAS, "kas", "Kashmiri" }, - { mp4v2::impl::bmff::ILC_KAU, "kau", "Kanuri" }, - { mp4v2::impl::bmff::ILC_KAW, "kaw", "Kawi" }, - { mp4v2::impl::bmff::ILC_KAZ, "kaz", "Kazakh" }, - { mp4v2::impl::bmff::ILC_KBD, "kbd", "Kabardian" }, - { mp4v2::impl::bmff::ILC_KHA, "kha", "Khasi" }, - { mp4v2::impl::bmff::ILC_KHI, "khi", "Khoisan (Other)" }, - { mp4v2::impl::bmff::ILC_KHM, "khm", "Central Khmer" }, - { mp4v2::impl::bmff::ILC_KHO, "kho", "Khotanese; Sakan" }, - { mp4v2::impl::bmff::ILC_KIK, "kik", "Kikuyu; Gikuyu" }, - { mp4v2::impl::bmff::ILC_KIN, "kin", "Kinyarwanda" }, - { mp4v2::impl::bmff::ILC_KIR, "kir", "Kirghiz; Kyrgyz" }, - { mp4v2::impl::bmff::ILC_KMB, "kmb", "Kimbundu" }, - { mp4v2::impl::bmff::ILC_KOK, "kok", "Konkani" }, - { mp4v2::impl::bmff::ILC_KOM, "kom", "Komi" }, - { mp4v2::impl::bmff::ILC_KON, "kon", "Kongo" }, - { mp4v2::impl::bmff::ILC_KOR, "kor", "Korean" }, - { mp4v2::impl::bmff::ILC_KOS, "kos", "Kosraean" }, - { mp4v2::impl::bmff::ILC_KPE, "kpe", "Kpelle" }, - { mp4v2::impl::bmff::ILC_KRC, "krc", "Karachay-Balkar" }, - { mp4v2::impl::bmff::ILC_KRL, "krl", "Karelian" }, - { mp4v2::impl::bmff::ILC_KRO, "kro", "Kru languages" }, - { mp4v2::impl::bmff::ILC_KRU, "kru", "Kurukh" }, - { mp4v2::impl::bmff::ILC_KUA, "kua", "Kuanyama; Kwanyama" }, - { mp4v2::impl::bmff::ILC_KUM, "kum", "Kumyk" }, - { mp4v2::impl::bmff::ILC_KUR, "kur", "Kurdish" }, - { mp4v2::impl::bmff::ILC_KUT, "kut", "Kutenai" }, - { mp4v2::impl::bmff::ILC_LAD, "lad", "Ladino" }, - { mp4v2::impl::bmff::ILC_LAH, "lah", "Lahnda" }, - { mp4v2::impl::bmff::ILC_LAM, "lam", "Lamba" }, - { mp4v2::impl::bmff::ILC_LAO, "lao", "Lao" }, - { mp4v2::impl::bmff::ILC_LAT, "lat", "Latin" }, - { mp4v2::impl::bmff::ILC_LAV, "lav", "Latvian" }, - { mp4v2::impl::bmff::ILC_LEZ, "lez", "Lezghian" }, - { mp4v2::impl::bmff::ILC_LIM, "lim", "Limburgan; Limburger; Limburgish" }, - { mp4v2::impl::bmff::ILC_LIN, "lin", "Lingala" }, - { mp4v2::impl::bmff::ILC_LIT, "lit", "Lithuanian" }, - { mp4v2::impl::bmff::ILC_LOL, "lol", "Mongo" }, - { mp4v2::impl::bmff::ILC_LOZ, "loz", "Lozi" }, - { mp4v2::impl::bmff::ILC_LTZ, "ltz", "Luxembourgish; Letzeburgesch" }, - { mp4v2::impl::bmff::ILC_LUA, "lua", "Luba-Lulua" }, - { mp4v2::impl::bmff::ILC_LUB, "lub", "Luba-Katanga" }, - { mp4v2::impl::bmff::ILC_LUG, "lug", "Ganda" }, - { mp4v2::impl::bmff::ILC_LUI, "lui", "Luiseno" }, - { mp4v2::impl::bmff::ILC_LUN, "lun", "Lunda" }, - { mp4v2::impl::bmff::ILC_LUO, "luo", "Luo (Kenya and Tanzania)" }, - { mp4v2::impl::bmff::ILC_LUS, "lus", "Lushai" }, - { mp4v2::impl::bmff::ILC_MKD, "mkd", "Macedonian" }, - { mp4v2::impl::bmff::ILC_MAD, "mad", "Madurese" }, - { mp4v2::impl::bmff::ILC_MAG, "mag", "Magahi" }, - { mp4v2::impl::bmff::ILC_MAH, "mah", "Marshallese" }, - { mp4v2::impl::bmff::ILC_MAI, "mai", "Maithili" }, - { mp4v2::impl::bmff::ILC_MAK, "mak", "Makasar" }, - { mp4v2::impl::bmff::ILC_MAL, "mal", "Malayalam" }, - { mp4v2::impl::bmff::ILC_MAN, "man", "Mandingo" }, - { mp4v2::impl::bmff::ILC_MRI, "mri", "Maori" }, - { mp4v2::impl::bmff::ILC_MAP, "map", "Austronesian (Other)" }, - { mp4v2::impl::bmff::ILC_MAR, "mar", "Marathi" }, - { mp4v2::impl::bmff::ILC_MAS, "mas", "Masai" }, - { mp4v2::impl::bmff::ILC_MSA, "msa", "Malay" }, - { mp4v2::impl::bmff::ILC_MDF, "mdf", "Moksha" }, - { mp4v2::impl::bmff::ILC_MDR, "mdr", "Mandar" }, - { mp4v2::impl::bmff::ILC_MEN, "men", "Mende" }, - { mp4v2::impl::bmff::ILC_MGA, "mga", "Irish, Middle (900-1200)" }, - { mp4v2::impl::bmff::ILC_MIC, "mic", "Mi'kmaq; Micmac" }, - { mp4v2::impl::bmff::ILC_MIN, "min", "Minangkabau" }, - { mp4v2::impl::bmff::ILC_MIS, "mis", "Uncoded languages" }, - { mp4v2::impl::bmff::ILC_MKH, "mkh", "Mon-Khmer (Other)" }, - { mp4v2::impl::bmff::ILC_MLG, "mlg", "Malagasy" }, - { mp4v2::impl::bmff::ILC_MLT, "mlt", "Maltese" }, - { mp4v2::impl::bmff::ILC_MNC, "mnc", "Manchu" }, - { mp4v2::impl::bmff::ILC_MNI, "mni", "Manipuri" }, - { mp4v2::impl::bmff::ILC_MNO, "mno", "Manobo languages" }, - { mp4v2::impl::bmff::ILC_MOH, "moh", "Mohawk" }, - { mp4v2::impl::bmff::ILC_MON, "mon", "Mongolian" }, - { mp4v2::impl::bmff::ILC_MOS, "mos", "Mossi" }, - { mp4v2::impl::bmff::ILC_MUL, "mul", "Multiple languages" }, - { mp4v2::impl::bmff::ILC_MUN, "mun", "Munda languages" }, - { mp4v2::impl::bmff::ILC_MUS, "mus", "Creek" }, - { mp4v2::impl::bmff::ILC_MWL, "mwl", "Mirandese" }, - { mp4v2::impl::bmff::ILC_MWR, "mwr", "Marwari" }, - { mp4v2::impl::bmff::ILC_MYN, "myn", "Mayan languages" }, - { mp4v2::impl::bmff::ILC_MYV, "myv", "Erzya" }, - { mp4v2::impl::bmff::ILC_NAH, "nah", "Nahuatl languages" }, - { mp4v2::impl::bmff::ILC_NAI, "nai", "North American Indian" }, - { mp4v2::impl::bmff::ILC_NAP, "nap", "Neapolitan" }, - { mp4v2::impl::bmff::ILC_NAU, "nau", "Nauru" }, - { mp4v2::impl::bmff::ILC_NAV, "nav", "Navajo; Navaho" }, - { mp4v2::impl::bmff::ILC_NBL, "nbl", "Ndebele, South; South Ndebele" }, - { mp4v2::impl::bmff::ILC_NDE, "nde", "Ndebele, North; North Ndebele" }, - { mp4v2::impl::bmff::ILC_NDO, "ndo", "Ndonga" }, - { mp4v2::impl::bmff::ILC_NDS, "nds", "Low German; Low Saxon; German, Low; Saxon, Low" }, - { mp4v2::impl::bmff::ILC_NEP, "nep", "Nepali" }, - { mp4v2::impl::bmff::ILC_NEW, "new", "Nepal Bhasa; Newari" }, - { mp4v2::impl::bmff::ILC_NIA, "nia", "Nias" }, - { mp4v2::impl::bmff::ILC_NIC, "nic", "Niger-Kordofanian (Other)" }, - { mp4v2::impl::bmff::ILC_NIU, "niu", "Niuean" }, - { mp4v2::impl::bmff::ILC_NNO, "nno", "Norwegian Nynorsk; Nynorsk, Norwegian" }, - { mp4v2::impl::bmff::ILC_NOB, "nob", "BokmÃ¥l, Norwegian; Norwegian BokmÃ¥l" }, - { mp4v2::impl::bmff::ILC_NOG, "nog", "Nogai" }, - { mp4v2::impl::bmff::ILC_NON, "non", "Norse, Old" }, - { mp4v2::impl::bmff::ILC_NOR, "nor", "Norwegian" }, - { mp4v2::impl::bmff::ILC_NQO, "nqo", "N'Ko" }, - { mp4v2::impl::bmff::ILC_NSO, "nso", "Pedi; Sepedi; Northern Sotho" }, - { mp4v2::impl::bmff::ILC_NUB, "nub", "Nubian languages" }, - { mp4v2::impl::bmff::ILC_NWC, "nwc", "Classical Newari; Old Newari; Classical Nepal Bhasa" }, - { mp4v2::impl::bmff::ILC_NYA, "nya", "Chichewa; Chewa; Nyanja" }, - { mp4v2::impl::bmff::ILC_NYM, "nym", "Nyamwezi" }, - { mp4v2::impl::bmff::ILC_NYN, "nyn", "Nyankole" }, - { mp4v2::impl::bmff::ILC_NYO, "nyo", "Nyoro" }, - { mp4v2::impl::bmff::ILC_NZI, "nzi", "Nzima" }, - { mp4v2::impl::bmff::ILC_OCI, "oci", "Occitan (post 1500); Provençal" }, - { mp4v2::impl::bmff::ILC_OJI, "oji", "Ojibwa" }, - { mp4v2::impl::bmff::ILC_ORI, "ori", "Oriya" }, - { mp4v2::impl::bmff::ILC_ORM, "orm", "Oromo" }, - { mp4v2::impl::bmff::ILC_OSA, "osa", "Osage" }, - { mp4v2::impl::bmff::ILC_OSS, "oss", "Ossetian; Ossetic" }, - { mp4v2::impl::bmff::ILC_OTA, "ota", "Turkish, Ottoman (1500-1928)" }, - { mp4v2::impl::bmff::ILC_OTO, "oto", "Otomian languages" }, - { mp4v2::impl::bmff::ILC_PAA, "paa", "Papuan (Other)" }, - { mp4v2::impl::bmff::ILC_PAG, "pag", "Pangasinan" }, - { mp4v2::impl::bmff::ILC_PAL, "pal", "Pahlavi" }, - { mp4v2::impl::bmff::ILC_PAM, "pam", "Pampanga; Kapampangan" }, - { mp4v2::impl::bmff::ILC_PAN, "pan", "Panjabi; Punjabi" }, - { mp4v2::impl::bmff::ILC_PAP, "pap", "Papiamento" }, - { mp4v2::impl::bmff::ILC_PAU, "pau", "Palauan" }, - { mp4v2::impl::bmff::ILC_PEO, "peo", "Persian, Old (ca.600-400 B.C.)" }, - { mp4v2::impl::bmff::ILC_FAS, "fas", "Persian" }, - { mp4v2::impl::bmff::ILC_PHI, "phi", "Philippine (Other)" }, - { mp4v2::impl::bmff::ILC_PHN, "phn", "Phoenician" }, - { mp4v2::impl::bmff::ILC_PLI, "pli", "Pali" }, - { mp4v2::impl::bmff::ILC_POL, "pol", "Polish" }, - { mp4v2::impl::bmff::ILC_PON, "pon", "Pohnpeian" }, - { mp4v2::impl::bmff::ILC_POR, "por", "Portuguese" }, - { mp4v2::impl::bmff::ILC_PRA, "pra", "Prakrit languages" }, - { mp4v2::impl::bmff::ILC_PRO, "pro", "Provençal, Old (to 1500)" }, - { mp4v2::impl::bmff::ILC_PUS, "pus", "Pushto; Pashto" }, - { mp4v2::impl::bmff::ILC_QUE, "que", "Quechua" }, - { mp4v2::impl::bmff::ILC_RAJ, "raj", "Rajasthani" }, - { mp4v2::impl::bmff::ILC_RAP, "rap", "Rapanui" }, - { mp4v2::impl::bmff::ILC_RAR, "rar", "Rarotongan; Cook Islands Maori" }, - { mp4v2::impl::bmff::ILC_ROA, "roa", "Romance (Other)" }, - { mp4v2::impl::bmff::ILC_ROH, "roh", "Romansh" }, - { mp4v2::impl::bmff::ILC_ROM, "rom", "Romany" }, - { mp4v2::impl::bmff::ILC_RON, "ron", "Romanian; Moldavian; Moldovan" }, - { mp4v2::impl::bmff::ILC_RUN, "run", "Rundi" }, - { mp4v2::impl::bmff::ILC_RUP, "rup", "Aromanian; Arumanian; Macedo-Romanian" }, - { mp4v2::impl::bmff::ILC_RUS, "rus", "Russian" }, - { mp4v2::impl::bmff::ILC_SAD, "sad", "Sandawe" }, - { mp4v2::impl::bmff::ILC_SAG, "sag", "Sango" }, - { mp4v2::impl::bmff::ILC_SAH, "sah", "Yakut" }, - { mp4v2::impl::bmff::ILC_SAI, "sai", "South American Indian (Other)" }, - { mp4v2::impl::bmff::ILC_SAL, "sal", "Salishan languages" }, - { mp4v2::impl::bmff::ILC_SAM, "sam", "Samaritan Aramaic" }, - { mp4v2::impl::bmff::ILC_SAN, "san", "Sanskrit" }, - { mp4v2::impl::bmff::ILC_SAS, "sas", "Sasak" }, - { mp4v2::impl::bmff::ILC_SAT, "sat", "Santali" }, - { mp4v2::impl::bmff::ILC_SCN, "scn", "Sicilian" }, - { mp4v2::impl::bmff::ILC_SCO, "sco", "Scots" }, - { mp4v2::impl::bmff::ILC_SEL, "sel", "Selkup" }, - { mp4v2::impl::bmff::ILC_SEM, "sem", "Semitic (Other)" }, - { mp4v2::impl::bmff::ILC_SGA, "sga", "Irish, Old (to 900)" }, - { mp4v2::impl::bmff::ILC_SGN, "sgn", "Sign Languages" }, - { mp4v2::impl::bmff::ILC_SHN, "shn", "Shan" }, - { mp4v2::impl::bmff::ILC_SID, "sid", "Sidamo" }, - { mp4v2::impl::bmff::ILC_SIN, "sin", "Sinhala; Sinhalese" }, - { mp4v2::impl::bmff::ILC_SIO, "sio", "Siouan languages" }, - { mp4v2::impl::bmff::ILC_SIT, "sit", "Sino-Tibetan (Other)" }, - { mp4v2::impl::bmff::ILC_SLA, "sla", "Slavic (Other)" }, - { mp4v2::impl::bmff::ILC_SLK, "slk", "Slovak" }, - { mp4v2::impl::bmff::ILC_SLV, "slv", "Slovenian" }, - { mp4v2::impl::bmff::ILC_SMA, "sma", "Southern Sami" }, - { mp4v2::impl::bmff::ILC_SME, "sme", "Northern Sami" }, - { mp4v2::impl::bmff::ILC_SMI, "smi", "Sami languages (Other)" }, - { mp4v2::impl::bmff::ILC_SMJ, "smj", "Lule Sami" }, - { mp4v2::impl::bmff::ILC_SMN, "smn", "Inari Sami" }, - { mp4v2::impl::bmff::ILC_SMO, "smo", "Samoan" }, - { mp4v2::impl::bmff::ILC_SMS, "sms", "Skolt Sami" }, - { mp4v2::impl::bmff::ILC_SNA, "sna", "Shona" }, - { mp4v2::impl::bmff::ILC_SND, "snd", "Sindhi" }, - { mp4v2::impl::bmff::ILC_SNK, "snk", "Soninke" }, - { mp4v2::impl::bmff::ILC_SOG, "sog", "Sogdian" }, - { mp4v2::impl::bmff::ILC_SOM, "som", "Somali" }, - { mp4v2::impl::bmff::ILC_SON, "son", "Songhai languages" }, - { mp4v2::impl::bmff::ILC_SOT, "sot", "Sotho, Southern" }, - { mp4v2::impl::bmff::ILC_SPA, "spa", "Spanish; Castilian" }, - { mp4v2::impl::bmff::ILC_SRD, "srd", "Sardinian" }, - { mp4v2::impl::bmff::ILC_SRN, "srn", "Sranan Tongo" }, - { mp4v2::impl::bmff::ILC_SRP, "srp", "Serbian" }, - { mp4v2::impl::bmff::ILC_SRR, "srr", "Serer" }, - { mp4v2::impl::bmff::ILC_SSA, "ssa", "Nilo-Saharan (Other)" }, - { mp4v2::impl::bmff::ILC_SSW, "ssw", "Swati" }, - { mp4v2::impl::bmff::ILC_SUK, "suk", "Sukuma" }, - { mp4v2::impl::bmff::ILC_SUN, "sun", "Sundanese" }, - { mp4v2::impl::bmff::ILC_SUS, "sus", "Susu" }, - { mp4v2::impl::bmff::ILC_SUX, "sux", "Sumerian" }, - { mp4v2::impl::bmff::ILC_SWA, "swa", "Swahili" }, - { mp4v2::impl::bmff::ILC_SWE, "swe", "Swedish" }, - { mp4v2::impl::bmff::ILC_SYC, "syc", "Classical Syriac" }, - { mp4v2::impl::bmff::ILC_SYR, "syr", "Syriac" }, - { mp4v2::impl::bmff::ILC_TAH, "tah", "Tahitian" }, - { mp4v2::impl::bmff::ILC_TAI, "tai", "Tai (Other)" }, - { mp4v2::impl::bmff::ILC_TAM, "tam", "Tamil" }, - { mp4v2::impl::bmff::ILC_TAT, "tat", "Tatar" }, - { mp4v2::impl::bmff::ILC_TEL, "tel", "Telugu" }, - { mp4v2::impl::bmff::ILC_TEM, "tem", "Timne" }, - { mp4v2::impl::bmff::ILC_TER, "ter", "Tereno" }, - { mp4v2::impl::bmff::ILC_TET, "tet", "Tetum" }, - { mp4v2::impl::bmff::ILC_TGK, "tgk", "Tajik" }, - { mp4v2::impl::bmff::ILC_TGL, "tgl", "Tagalog" }, - { mp4v2::impl::bmff::ILC_THA, "tha", "Thai" }, - { mp4v2::impl::bmff::ILC_BOD, "bod", "Tibetan" }, - { mp4v2::impl::bmff::ILC_TIG, "tig", "Tigre" }, - { mp4v2::impl::bmff::ILC_TIR, "tir", "Tigrinya" }, - { mp4v2::impl::bmff::ILC_TIV, "tiv", "Tiv" }, - { mp4v2::impl::bmff::ILC_TKL, "tkl", "Tokelau" }, - { mp4v2::impl::bmff::ILC_TLH, "tlh", "Klingon; tlhIngan-Hol" }, - { mp4v2::impl::bmff::ILC_TLI, "tli", "Tlingit" }, - { mp4v2::impl::bmff::ILC_TMH, "tmh", "Tamashek" }, - { mp4v2::impl::bmff::ILC_TOG, "tog", "Tonga (Nyasa)" }, - { mp4v2::impl::bmff::ILC_TON, "ton", "Tonga (Tonga Islands)" }, - { mp4v2::impl::bmff::ILC_TPI, "tpi", "Tok Pisin" }, - { mp4v2::impl::bmff::ILC_TSI, "tsi", "Tsimshian" }, - { mp4v2::impl::bmff::ILC_TSN, "tsn", "Tswana" }, - { mp4v2::impl::bmff::ILC_TSO, "tso", "Tsonga" }, - { mp4v2::impl::bmff::ILC_TUK, "tuk", "Turkmen" }, - { mp4v2::impl::bmff::ILC_TUM, "tum", "Tumbuka" }, - { mp4v2::impl::bmff::ILC_TUP, "tup", "Tupi languages" }, - { mp4v2::impl::bmff::ILC_TUR, "tur", "Turkish" }, - { mp4v2::impl::bmff::ILC_TUT, "tut", "Altaic (Other)" }, - { mp4v2::impl::bmff::ILC_TVL, "tvl", "Tuvalu" }, - { mp4v2::impl::bmff::ILC_TWI, "twi", "Twi" }, - { mp4v2::impl::bmff::ILC_TYV, "tyv", "Tuvinian" }, - { mp4v2::impl::bmff::ILC_UDM, "udm", "Udmurt" }, - { mp4v2::impl::bmff::ILC_UGA, "uga", "Ugaritic" }, - { mp4v2::impl::bmff::ILC_UIG, "uig", "Uighur; Uyghur" }, - { mp4v2::impl::bmff::ILC_UKR, "ukr", "Ukrainian" }, - { mp4v2::impl::bmff::ILC_UMB, "umb", "Umbundu" }, - { mp4v2::impl::bmff::ILC_UND, "und", "Undetermined" }, - { mp4v2::impl::bmff::ILC_URD, "urd", "Urdu" }, - { mp4v2::impl::bmff::ILC_UZB, "uzb", "Uzbek" }, - { mp4v2::impl::bmff::ILC_VAI, "vai", "Vai" }, - { mp4v2::impl::bmff::ILC_VEN, "ven", "Venda" }, - { mp4v2::impl::bmff::ILC_VIE, "vie", "Vietnamese" }, - { mp4v2::impl::bmff::ILC_VOL, "vol", "Volapük" }, - { mp4v2::impl::bmff::ILC_VOT, "vot", "Votic" }, - { mp4v2::impl::bmff::ILC_WAK, "wak", "Wakashan languages" }, - { mp4v2::impl::bmff::ILC_WAL, "wal", "Walamo" }, - { mp4v2::impl::bmff::ILC_WAR, "war", "Waray" }, - { mp4v2::impl::bmff::ILC_WAS, "was", "Washo" }, - { mp4v2::impl::bmff::ILC_CYM, "cym", "Welsh" }, - { mp4v2::impl::bmff::ILC_WEN, "wen", "Sorbian languages" }, - { mp4v2::impl::bmff::ILC_WLN, "wln", "Walloon" }, - { mp4v2::impl::bmff::ILC_WOL, "wol", "Wolof" }, - { mp4v2::impl::bmff::ILC_XAL, "xal", "Kalmyk; Oirat" }, - { mp4v2::impl::bmff::ILC_XHO, "xho", "Xhosa" }, - { mp4v2::impl::bmff::ILC_YAO, "yao", "Yao" }, - { mp4v2::impl::bmff::ILC_YAP, "yap", "Yapese" }, - { mp4v2::impl::bmff::ILC_YID, "yid", "Yiddish" }, - { mp4v2::impl::bmff::ILC_YOR, "yor", "Yoruba" }, - { mp4v2::impl::bmff::ILC_YPK, "ypk", "Yupik languages" }, - { mp4v2::impl::bmff::ILC_ZAP, "zap", "Zapotec" }, - { mp4v2::impl::bmff::ILC_ZBL, "zbl", "Blissymbols; Blissymbolics; Bliss" }, - { mp4v2::impl::bmff::ILC_ZEN, "zen", "Zenaga" }, - { mp4v2::impl::bmff::ILC_ZHA, "zha", "Zhuang; Chuang" }, - { mp4v2::impl::bmff::ILC_ZND, "znd", "Zande languages" }, - { mp4v2::impl::bmff::ILC_ZUL, "zul", "Zulu" }, - { mp4v2::impl::bmff::ILC_ZUN, "zun", "Zuni" }, - { mp4v2::impl::bmff::ILC_ZXX, "zxx", "No linguistic content; Not applicable" }, - { mp4v2::impl::bmff::ILC_ZZA, "zza", "Zaza; Dimili; Dimli; Kirdki; Kirmanjki; Zazaki" }, - - { mp4v2::impl::bmff::ILC_UNDEFINED } // must be last -}; - -/////////////////////////////////////////////////////////////////////////////// - -namespace bmff { - -/////////////////////////////////////////////////////////////////////////////// - -// must come after static data init -const EnumLanguageCode enumLanguageCode; - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::bmff diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/typebmff.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/typebmff.h deleted file mode 100644 index 4b69b7e2..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/bmff/typebmff.h +++ /dev/null @@ -1,528 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_BMFF_TYPE_H -#define MP4V2_IMPL_BMFF_TYPE_H - -namespace mp4v2 { namespace impl { namespace bmff { - -/////////////////////////////////////////////////////////////////////////////// - -/// enumerated ISO-639-2/T language codes. -enum LanguageCode { - ILC_UNDEFINED = 0, - - ILC_AAR, - ILC_ABK, - ILC_ACE, - ILC_ACH, - ILC_ADA, - ILC_ADY, - ILC_AFA, - ILC_AFH, - ILC_AFR, - ILC_AIN, - ILC_AKA, - ILC_AKK, - ILC_SQI, - ILC_ALE, - ILC_ALG, - ILC_ALT, - ILC_AMH, - ILC_ANG, - ILC_ANP, - ILC_APA, - ILC_ARA, - ILC_ARC, - ILC_ARG, - ILC_HYE, - ILC_ARN, - ILC_ARP, - ILC_ART, - ILC_ARW, - ILC_ASM, - ILC_AST, - ILC_ATH, - ILC_AUS, - ILC_AVA, - ILC_AVE, - ILC_AWA, - ILC_AYM, - ILC_AZE, - ILC_BAD, - ILC_BAI, - ILC_BAK, - ILC_BAL, - ILC_BAM, - ILC_BAN, - ILC_EUS, - ILC_BAS, - ILC_BAT, - ILC_BEJ, - ILC_BEL, - ILC_BEM, - ILC_BEN, - ILC_BER, - ILC_BHO, - ILC_BIH, - ILC_BIK, - ILC_BIN, - ILC_BIS, - ILC_BLA, - ILC_BNT, - ILC_BOS, - ILC_BRA, - ILC_BRE, - ILC_BTK, - ILC_BUA, - ILC_BUG, - ILC_BUL, - ILC_MYA, - ILC_BYN, - ILC_CAD, - ILC_CAI, - ILC_CAR, - ILC_CAT, - ILC_CAU, - ILC_CEB, - ILC_CEL, - ILC_CHA, - ILC_CHB, - ILC_CHE, - ILC_CHG, - ILC_ZHO, - ILC_CHK, - ILC_CHM, - ILC_CHN, - ILC_CHO, - ILC_CHP, - ILC_CHR, - ILC_CHU, - ILC_CHV, - ILC_CHY, - ILC_CMC, - ILC_COP, - ILC_COR, - ILC_COS, - ILC_CPE, - ILC_CPF, - ILC_CPP, - ILC_CRE, - ILC_CRH, - ILC_CRP, - ILC_CSB, - ILC_CUS, - ILC_CES, - ILC_DAK, - ILC_DAN, - ILC_DAR, - ILC_DAY, - ILC_DEL, - ILC_DEN, - ILC_DGR, - ILC_DIN, - ILC_DIV, - ILC_DOI, - ILC_DRA, - ILC_DSB, - ILC_DUA, - ILC_DUM, - ILC_NLD, - ILC_DYU, - ILC_DZO, - ILC_EFI, - ILC_EGY, - ILC_EKA, - ILC_ELX, - ILC_ENG, - ILC_ENM, - ILC_EPO, - ILC_EST, - ILC_EWE, - ILC_EWO, - ILC_FAN, - ILC_FAO, - ILC_FAT, - ILC_FIJ, - ILC_FIL, - ILC_FIN, - ILC_FIU, - ILC_FON, - ILC_FRA, - ILC_FRM, - ILC_FRO, - ILC_FRR, - ILC_FRS, - ILC_FRY, - ILC_FUL, - ILC_FUR, - ILC_GAA, - ILC_GAY, - ILC_GBA, - ILC_GEM, - ILC_KAT, - ILC_DEU, - ILC_GEZ, - ILC_GIL, - ILC_GLA, - ILC_GLE, - ILC_GLG, - ILC_GLV, - ILC_GMH, - ILC_GOH, - ILC_GON, - ILC_GOR, - ILC_GOT, - ILC_GRB, - ILC_GRC, - ILC_ELL, - ILC_GRN, - ILC_GSW, - ILC_GUJ, - ILC_GWI, - ILC_HAI, - ILC_HAT, - ILC_HAU, - ILC_HAW, - ILC_HEB, - ILC_HER, - ILC_HIL, - ILC_HIM, - ILC_HIN, - ILC_HIT, - ILC_HMN, - ILC_HMO, - ILC_HRV, - ILC_HSB, - ILC_HUN, - ILC_HUP, - ILC_IBA, - ILC_IBO, - ILC_ISL, - ILC_IDO, - ILC_III, - ILC_IJO, - ILC_IKU, - ILC_ILE, - ILC_ILO, - ILC_INA, - ILC_INC, - ILC_IND, - ILC_INE, - ILC_INH, - ILC_IPK, - ILC_IRA, - ILC_IRO, - ILC_ITA, - ILC_JAV, - ILC_JBO, - ILC_JPN, - ILC_JPR, - ILC_JRB, - ILC_KAA, - ILC_KAB, - ILC_KAC, - ILC_KAL, - ILC_KAM, - ILC_KAN, - ILC_KAR, - ILC_KAS, - ILC_KAU, - ILC_KAW, - ILC_KAZ, - ILC_KBD, - ILC_KHA, - ILC_KHI, - ILC_KHM, - ILC_KHO, - ILC_KIK, - ILC_KIN, - ILC_KIR, - ILC_KMB, - ILC_KOK, - ILC_KOM, - ILC_KON, - ILC_KOR, - ILC_KOS, - ILC_KPE, - ILC_KRC, - ILC_KRL, - ILC_KRO, - ILC_KRU, - ILC_KUA, - ILC_KUM, - ILC_KUR, - ILC_KUT, - ILC_LAD, - ILC_LAH, - ILC_LAM, - ILC_LAO, - ILC_LAT, - ILC_LAV, - ILC_LEZ, - ILC_LIM, - ILC_LIN, - ILC_LIT, - ILC_LOL, - ILC_LOZ, - ILC_LTZ, - ILC_LUA, - ILC_LUB, - ILC_LUG, - ILC_LUI, - ILC_LUN, - ILC_LUO, - ILC_LUS, - ILC_MKD, - ILC_MAD, - ILC_MAG, - ILC_MAH, - ILC_MAI, - ILC_MAK, - ILC_MAL, - ILC_MAN, - ILC_MRI, - ILC_MAP, - ILC_MAR, - ILC_MAS, - ILC_MSA, - ILC_MDF, - ILC_MDR, - ILC_MEN, - ILC_MGA, - ILC_MIC, - ILC_MIN, - ILC_MIS, - ILC_MKH, - ILC_MLG, - ILC_MLT, - ILC_MNC, - ILC_MNI, - ILC_MNO, - ILC_MOH, - ILC_MON, - ILC_MOS, - ILC_MUL, - ILC_MUN, - ILC_MUS, - ILC_MWL, - ILC_MWR, - ILC_MYN, - ILC_MYV, - ILC_NAH, - ILC_NAI, - ILC_NAP, - ILC_NAU, - ILC_NAV, - ILC_NBL, - ILC_NDE, - ILC_NDO, - ILC_NDS, - ILC_NEP, - ILC_NEW, - ILC_NIA, - ILC_NIC, - ILC_NIU, - ILC_NNO, - ILC_NOB, - ILC_NOG, - ILC_NON, - ILC_NOR, - ILC_NQO, - ILC_NSO, - ILC_NUB, - ILC_NWC, - ILC_NYA, - ILC_NYM, - ILC_NYN, - ILC_NYO, - ILC_NZI, - ILC_OCI, - ILC_OJI, - ILC_ORI, - ILC_ORM, - ILC_OSA, - ILC_OSS, - ILC_OTA, - ILC_OTO, - ILC_PAA, - ILC_PAG, - ILC_PAL, - ILC_PAM, - ILC_PAN, - ILC_PAP, - ILC_PAU, - ILC_PEO, - ILC_FAS, - ILC_PHI, - ILC_PHN, - ILC_PLI, - ILC_POL, - ILC_PON, - ILC_POR, - ILC_PRA, - ILC_PRO, - ILC_PUS, - ILC_QUE, - ILC_RAJ, - ILC_RAP, - ILC_RAR, - ILC_ROA, - ILC_ROH, - ILC_ROM, - ILC_RON, - ILC_RUN, - ILC_RUP, - ILC_RUS, - ILC_SAD, - ILC_SAG, - ILC_SAH, - ILC_SAI, - ILC_SAL, - ILC_SAM, - ILC_SAN, - ILC_SAS, - ILC_SAT, - ILC_SCN, - ILC_SCO, - ILC_SEL, - ILC_SEM, - ILC_SGA, - ILC_SGN, - ILC_SHN, - ILC_SID, - ILC_SIN, - ILC_SIO, - ILC_SIT, - ILC_SLA, - ILC_SLK, - ILC_SLV, - ILC_SMA, - ILC_SME, - ILC_SMI, - ILC_SMJ, - ILC_SMN, - ILC_SMO, - ILC_SMS, - ILC_SNA, - ILC_SND, - ILC_SNK, - ILC_SOG, - ILC_SOM, - ILC_SON, - ILC_SOT, - ILC_SPA, - ILC_SRD, - ILC_SRN, - ILC_SRP, - ILC_SRR, - ILC_SSA, - ILC_SSW, - ILC_SUK, - ILC_SUN, - ILC_SUS, - ILC_SUX, - ILC_SWA, - ILC_SWE, - ILC_SYC, - ILC_SYR, - ILC_TAH, - ILC_TAI, - ILC_TAM, - ILC_TAT, - ILC_TEL, - ILC_TEM, - ILC_TER, - ILC_TET, - ILC_TGK, - ILC_TGL, - ILC_THA, - ILC_BOD, - ILC_TIG, - ILC_TIR, - ILC_TIV, - ILC_TKL, - ILC_TLH, - ILC_TLI, - ILC_TMH, - ILC_TOG, - ILC_TON, - ILC_TPI, - ILC_TSI, - ILC_TSN, - ILC_TSO, - ILC_TUK, - ILC_TUM, - ILC_TUP, - ILC_TUR, - ILC_TUT, - ILC_TVL, - ILC_TWI, - ILC_TYV, - ILC_UDM, - ILC_UGA, - ILC_UIG, - ILC_UKR, - ILC_UMB, - ILC_UND, - ILC_URD, - ILC_UZB, - ILC_VAI, - ILC_VEN, - ILC_VIE, - ILC_VOL, - ILC_VOT, - ILC_WAK, - ILC_WAL, - ILC_WAR, - ILC_WAS, - ILC_CYM, - ILC_WEN, - ILC_WLN, - ILC_WOL, - ILC_XAL, - ILC_XHO, - ILC_YAO, - ILC_YAP, - ILC_YID, - ILC_YOR, - ILC_YPK, - ILC_ZAP, - ILC_ZBL, - ILC_ZEN, - ILC_ZHA, - ILC_ZND, - ILC_ZUL, - ILC_ZUN, - ILC_ZXX, - ILC_ZZA, -}; - -typedef Enum EnumLanguageCode; -MP4V2_EXPORT extern const EnumLanguageCode enumLanguageCode; - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::bmff - -#endif // MP4V2_IMPL_BMFF_TYPE_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/cmeta.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/cmeta.cpp deleted file mode 100644 index b6a7d574..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/cmeta.cpp +++ /dev/null @@ -1,1558 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// Portions created by David Byron are Copyright (C) 2009, 2010, 2011. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// Rouven Wessling, mp4v2@rouvenwessling.de -// David Byron, dbyron0@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "src/impl.h" - -using namespace mp4v2::impl; - -extern "C" { - -/////////////////////////////////////////////////////////////////////////////// - -bool -MP4TagsAddArtwork( const MP4Tags* tags, MP4TagArtwork* artwork ) -{ - if( !tags || !tags->__handle || !artwork ) - return false; - - itmf::Tags& cpp = *static_cast(tags->__handle); - MP4Tags* c = const_cast(tags); - - try { - cpp.c_addArtwork( c, *artwork ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -const MP4Tags* -MP4TagsAlloc() -{ - MP4Tags* result = NULL; - itmf::Tags* m = NULL; - - try { - m = new itmf::Tags(); - m->c_alloc( result ); - return result; - } - catch( std::bad_alloc ) { - // This could be a failure to allocate itmf::Tags or - // a failure to allocate inside c_alloc. - mp4v2::impl::log.errorf("%s: memory allocation error", __FUNCTION__); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - if( result ) - delete result; - - if( m ) - delete m; - - return NULL; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -MP4TagsFree( const MP4Tags* tags ) -{ - if( !tags || !tags->__handle ) - return; - - itmf::Tags* cpp = static_cast(tags->__handle); - MP4Tags* c = const_cast(tags); - - try { - cpp->c_free( c ); - delete cpp; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -MP4TagsFetch( const MP4Tags* tags, MP4FileHandle hFile ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - if( !tags || !tags->__handle ) - return false; - - itmf::Tags* cpp = static_cast(tags->__handle); - MP4Tags* c = const_cast(tags); - - try { - cpp->c_fetch( c, hFile ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -MP4TagsHasMetadata ( const MP4Tags* tags, bool *hasMetadata ) -{ - if( !tags || !tags->__handle || !hasMetadata ) - return false; - - itmf::Tags& cpp = *static_cast(tags->__handle); - - (*hasMetadata) = cpp.hasMetadata; - - return true; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -MP4TagsRemoveArtwork( const MP4Tags* tags, uint32_t index ) -{ - if( !tags || !tags->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(tags->__handle); - MP4Tags* c = const_cast(tags); - - try { - cpp.c_removeArtwork( c, index ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -MP4TagsSetArtwork( const MP4Tags* tags, uint32_t index, MP4TagArtwork* artwork ) -{ - if( !tags || !tags->__handle || !artwork) - return false; - - itmf::Tags& cpp = *static_cast(tags->__handle); - MP4Tags* c = const_cast(tags); - - try { - cpp.c_setArtwork( c, index, *artwork ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -MP4TagsStore( const MP4Tags* tags, MP4FileHandle hFile ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - if( !tags || !tags->__handle ) - return false; - - itmf::Tags* cpp = static_cast(tags->__handle); - MP4Tags* c = const_cast(tags); - - try { - cpp->c_store( c, hFile ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -MP4TagsSetName( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.name, c.name ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetArtist( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.artist, c.artist ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetAlbumArtist( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.albumArtist, c.albumArtist ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetAlbum( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.album, c.album ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetGrouping( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.grouping, c.grouping ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetComposer( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.composer, c.composer ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetComments( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.comments, c.comments ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetGenre( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.genre, c.genre ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetGenreType( const MP4Tags* m, const uint16_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.genreType, c.genreType ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetReleaseDate( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.releaseDate, c.releaseDate ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetTrack( const MP4Tags* m, const MP4TagTrack* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setTrack( value, cpp.track, c.track ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetDisk( const MP4Tags* m, const MP4TagDisk* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setDisk( value, cpp.disk, c.disk ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetTempo( const MP4Tags* m, const uint16_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.tempo, c.tempo ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetCompilation( const MP4Tags* m, const uint8_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.compilation, c.compilation ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetTVShow( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.tvShow, c.tvShow ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetTVNetwork( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.tvNetwork, c.tvNetwork ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetTVEpisodeID( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.tvEpisodeID, c.tvEpisodeID ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetTVSeason( const MP4Tags* m, const uint32_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.tvSeason, c.tvSeason ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetTVEpisode( const MP4Tags* m, const uint32_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.tvEpisode, c.tvEpisode ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetSortName( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.sortName, c.sortName ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetSortArtist( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.sortArtist, c.sortArtist ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetSortAlbumArtist( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.sortAlbumArtist, c.sortAlbumArtist ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetSortAlbum( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.sortAlbum, c.sortAlbum ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetSortComposer( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.sortComposer, c.sortComposer ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetSortTVShow( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.sortTVShow, c.sortTVShow ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetDescription( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.description, c.description ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetLongDescription( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.longDescription, c.longDescription ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetLyrics( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.lyrics, c.lyrics ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetCopyright( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.copyright, c.copyright ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetEncodingTool( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.encodingTool, c.encodingTool ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetEncodedBy( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.encodedBy, c.encodedBy ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetPurchaseDate( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.purchaseDate, c.purchaseDate ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetPodcast( const MP4Tags* m, const uint8_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.podcast, c.podcast ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetKeywords( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.keywords, c.keywords ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetCategory( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.category, c.category ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetHDVideo( const MP4Tags* m, const uint8_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.hdVideo, c.hdVideo ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetMediaType( const MP4Tags* m, const uint8_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.mediaType, c.mediaType ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetContentRating( const MP4Tags* m, const uint8_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.contentRating, c.contentRating ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetGapless( const MP4Tags* m, const uint8_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.gapless, c.gapless ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetITunesAccount( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.iTunesAccount, c.iTunesAccount ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetITunesAccountType( const MP4Tags* m, const uint8_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.iTunesAccountType, c.iTunesAccountType ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetITunesCountry( const MP4Tags* m, const uint32_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.iTunesCountry, c.iTunesCountry ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetContentID( const MP4Tags* m, const uint32_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.contentID, c.contentID ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetArtistID( const MP4Tags* m, const uint32_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.artistID, c.artistID ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetPlaylistID( const MP4Tags* m, const uint64_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.playlistID, c.playlistID ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetGenreID( const MP4Tags* m, const uint32_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.genreID, c.genreID ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetComposerID( const MP4Tags* m, const uint32_t* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setInteger( value, cpp.composerID, c.composerID ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -bool -MP4TagsSetXID( const MP4Tags* m, const char* value ) -{ - if( !m || !m->__handle ) - return false; - - itmf::Tags& cpp = *static_cast(m->__handle); - MP4Tags& c = *const_cast(m); - - try { - cpp.c_setString( value, cpp.xid, c.xid ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItmfItem* -MP4ItmfItemAlloc( const char* code, uint32_t numData ) -{ - return itmf::genericItemAlloc( code, numData ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -MP4ItmfItemFree( MP4ItmfItem* item ) -{ - itmf::genericItemFree( item ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -MP4ItmfItemListFree( MP4ItmfItemList* list ) -{ - itmf::genericItemListFree( list ); -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItmfItemList* -MP4ItmfGetItems( MP4FileHandle hFile ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return NULL; - - try { - return itmf::genericGetItems( *(MP4File*)hFile ); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return NULL; -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItmfItemList* -MP4ItmfGetItemsByCode( MP4FileHandle hFile, const char* code ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return NULL; - - try { - return itmf::genericGetItemsByCode( *(MP4File*)hFile, code ); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed",__FUNCTION__); - } - - return NULL; -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItmfItemList* -MP4ItmfGetItemsByMeaning( MP4FileHandle hFile, const char* meaning, const char* name ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return NULL; - - if( !meaning ) - return NULL; - - try { - return itmf::genericGetItemsByMeaning( *(MP4File*)hFile, meaning, name ? name : "" ); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - return NULL; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -MP4ItmfAddItem( MP4FileHandle hFile, const MP4ItmfItem* item ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - try { - return itmf::genericAddItem( *(MP4File*)hFile, item ); - } - catch( Exception* x) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -MP4ItmfSetItem( MP4FileHandle hFile, const MP4ItmfItem* item ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - try { - return itmf::genericSetItem( *(MP4File*)hFile, item ); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -MP4ItmfRemoveItem( MP4FileHandle hFile, const MP4ItmfItem* item ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - try { - return itmf::genericRemoveItem( *(MP4File*)hFile, item ); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -} // extern "C" diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/descriptors.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/descriptors.cpp deleted file mode 100644 index e83fc66f..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/descriptors.cpp +++ /dev/null @@ -1,616 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4BaseDescriptor::MP4BaseDescriptor (MP4Atom& parentAtom, uint8_t tag) : MP4Descriptor(parentAtom, tag) -{ - switch (tag) { - case MP4ESIDIncDescrTag: - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "id")); - break; - case MP4ESIDRefDescrTag: - AddProperty( /* 0 */ - new MP4Integer16Property(parentAtom, "refIndex")); - break; - case MP4IPIPtrDescrTag: - AddProperty( /* 0 */ - new MP4Integer16Property(parentAtom, "IPIESId")); - break; - case MP4SupplContentIdDescrTag: - AddProperty( /* 0 */ - new MP4BytesProperty(parentAtom, "languageCode", 3)); - AddProperty( /* 1 */ - new MP4StringProperty(parentAtom, "title", Counted)); - AddProperty( /* 2 */ - new MP4StringProperty(parentAtom, "value", Counted)); - break; - case MP4IPMPPtrDescrTag: - AddProperty( /* 0 */ - new MP4Integer8Property(parentAtom, "IPMPDescriptorId")); - break; - case MP4ExtProfileLevelDescrTag: - AddProperty( /* 0 */ - new MP4Integer8Property(parentAtom, "profileLevelIndicationIndex")); - AddProperty( /* 1 */ - new MP4Integer8Property(parentAtom, "ODProfileLevelIndication")); - AddProperty( /* 2 */ - new MP4Integer8Property(parentAtom, "sceneProfileLevelIndication")); - AddProperty( /* 3 */ - new MP4Integer8Property(parentAtom, "audioProfileLevelIndication")); - AddProperty( /* 4 */ - new MP4Integer8Property(parentAtom, "visualProfileLevelIndication")); - AddProperty( /* 5 */ - new MP4Integer8Property(parentAtom, "graphicsProfileLevelIndication")); - AddProperty( /* 6 */ - new MP4Integer8Property(parentAtom, "MPEGJProfileLevelIndication")); - break; - default: - log.errorf("%s: \"%s\": error in base descriptor - tag %u", __FUNCTION__, - m_parentAtom.GetFile().GetFilename().c_str(), tag); - break; - - } -} - -MP4BytesDescriptor::MP4BytesDescriptor (MP4Atom& parentAtom, uint8_t tag) : MP4Descriptor(parentAtom, tag) -{ - m_size_offset = 0; - m_bytes_index = 0; - if (tag >= MP4ExtDescrTagsStart && tag <= MP4ExtDescrTagsEnd) { - AddProperty( /* 0 */ - new MP4BytesProperty(parentAtom, "data")); - } else { - switch (tag) { - case MP4DecSpecificDescrTag: - AddProperty( /* 0 */ - new MP4BytesProperty(parentAtom, "info")); - // no change to m_size - break; - case MP4IPMPDescrTag: - AddProperty( /* 0 */ - new MP4Integer8Property(parentAtom, "IPMPDescriptorId")); - AddProperty( /* 1 */ - new MP4Integer16Property(parentAtom, "IPMPSType")); - AddProperty( /* 2 */ - new MP4BytesProperty(parentAtom, "IPMPData")); - /* note: if IPMPSType == 0, IPMPData is an URL */ - m_size_offset = 3; - m_bytes_index = 2; - break; - case MP4RegistrationDescrTag: - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "formatIdentifier")); - AddProperty( /* 1 */ - new MP4BytesProperty(parentAtom, "additionalIdentificationInfo")); - m_size_offset = 4; - m_bytes_index = 1; - break; - default: - log.errorf("%s: \"%s\": error in bytes descriptor - tag %u", __FUNCTION__, - m_parentAtom.GetFile().GetFilename().c_str(), tag); - break; - } - } -} - -void MP4BytesDescriptor::Read(MP4File& file) -{ - ReadHeader(file); - - /* byte properties need to know how long they are before reading */ - ((MP4BytesProperty*)m_pProperties[m_bytes_index])->SetValueSize(m_size - m_size_offset); - - ReadProperties(file); -} -MP4IODescriptor::MP4IODescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom, MP4FileIODescrTag) -{ - /* N.B. other member functions depend on the property indicies */ - AddProperty( /* 0 */ - new MP4BitfieldProperty(parentAtom, "objectDescriptorId", 10)); - AddProperty( /* 1 */ - new MP4BitfieldProperty(parentAtom, "URLFlag", 1)); - AddProperty( /* 2 */ - new MP4BitfieldProperty(parentAtom, "includeInlineProfileLevelFlag", 1)); - AddProperty( /* 3 */ - new MP4BitfieldProperty(parentAtom, "reserved", 4)); - AddProperty( /* 4 */ - new MP4StringProperty(parentAtom, "URL", Counted)); - AddProperty( /* 5 */ - new MP4Integer8Property(parentAtom, "ODProfileLevelId")); - AddProperty( /* 6 */ - new MP4Integer8Property(parentAtom, "sceneProfileLevelId")); - AddProperty( /* 7 */ - new MP4Integer8Property(parentAtom, "audioProfileLevelId")); - AddProperty( /* 8 */ - new MP4Integer8Property(parentAtom, "visualProfileLevelId")); - AddProperty( /* 9 */ - new MP4Integer8Property(parentAtom, "graphicsProfileLevelId")); - AddProperty( /* 10 */ - new MP4DescriptorProperty(parentAtom, "esIds", - MP4ESIDIncDescrTag, 0, Required, Many)); - AddProperty( /* 11 */ - new MP4DescriptorProperty(parentAtom, "ociDescr", - MP4OCIDescrTagsStart, MP4OCIDescrTagsEnd, Optional, Many)); - AddProperty( /* 12 */ - new MP4DescriptorProperty(parentAtom, "ipmpDescrPtr", - MP4IPMPPtrDescrTag, 0, Optional, Many)); - AddProperty( /* 13 */ - new MP4DescriptorProperty(parentAtom, "extDescr", - MP4ExtDescrTagsStart, MP4ExtDescrTagsEnd, Optional, Many)); - - SetReadMutate(2); -} - -void MP4IODescriptor::Generate() -{ - ((MP4BitfieldProperty*)m_pProperties[0])->SetValue(1); - ((MP4BitfieldProperty*)m_pProperties[3])->SetValue(0xF); - for (uint32_t i = 5; i <= 9; i++) { - ((MP4Integer8Property*)m_pProperties[i])->SetValue(0xFF); - } -} - -void MP4IODescriptor::Mutate() -{ - bool urlFlag = ((MP4BitfieldProperty*)m_pProperties[1])->GetValue(); - - m_pProperties[4]->SetImplicit(!urlFlag); - for (uint32_t i = 5; i <= 12; i++) { - m_pProperties[i]->SetImplicit(urlFlag); - } -} - -MP4ODescriptor::MP4ODescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom, MP4FileODescrTag) -{ - /* N.B. other member functions depend on the property indicies */ - AddProperty( /* 0 */ - new MP4BitfieldProperty(parentAtom, "objectDescriptorId", 10)); - AddProperty( /* 1 */ - new MP4BitfieldProperty(parentAtom, "URLFlag", 1)); - AddProperty( /* 2 */ - new MP4BitfieldProperty(parentAtom, "reserved", 5)); - AddProperty( /* 3 */ - new MP4StringProperty(parentAtom, "URL", Counted)); - AddProperty( /* 4 */ - new MP4DescriptorProperty(parentAtom, "esIds", - MP4ESIDRefDescrTag, 0, Required, Many)); - AddProperty( /* 5 */ - new MP4DescriptorProperty(parentAtom, "ociDescr", - MP4OCIDescrTagsStart, MP4OCIDescrTagsEnd, Optional, Many)); - AddProperty( /* 6 */ - new MP4DescriptorProperty(parentAtom, "ipmpDescrPtr", - MP4IPMPPtrDescrTag, 0, Optional, Many)); - AddProperty( /* 7 */ - new MP4DescriptorProperty(parentAtom, "extDescr", - MP4ExtDescrTagsStart, MP4ExtDescrTagsEnd, Optional, Many)); - - SetReadMutate(2); -} - -void MP4ODescriptor::Generate() -{ - ((MP4BitfieldProperty*)m_pProperties[2])->SetValue(0x1F); -} - -void MP4ODescriptor::Mutate() -{ - bool urlFlag = ((MP4BitfieldProperty*)m_pProperties[1])->GetValue(); - - m_pProperties[3]->SetImplicit(!urlFlag); - for (uint32_t i = 4; i <= 6; i++) { - m_pProperties[i]->SetImplicit(urlFlag); - } -} - -MP4ESDescriptor::MP4ESDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom, MP4ESDescrTag) -{ - /* N.B. other class functions depend on the property indicies */ - AddProperty( /* 0 */ - new MP4Integer16Property(parentAtom, "ESID")); - AddProperty( /* 1 */ - new MP4BitfieldProperty(parentAtom, "streamDependenceFlag", 1)); - AddProperty( /* 2 */ - new MP4BitfieldProperty(parentAtom, "URLFlag", 1)); - AddProperty( /* 3 */ - new MP4BitfieldProperty(parentAtom, "OCRstreamFlag", 1)); - AddProperty( /* 4 */ - new MP4BitfieldProperty(parentAtom, "streamPriority", 5)); - AddProperty( /* 5 */ - new MP4Integer16Property(parentAtom, "dependsOnESID")); - AddProperty( /* 6 */ - new MP4StringProperty(parentAtom, "URL", Counted)); - AddProperty( /* 7 */ - new MP4Integer16Property(parentAtom, "OCRESID")); - AddProperty( /* 8 */ - new MP4DescriptorProperty(parentAtom, "decConfigDescr", - MP4DecConfigDescrTag, 0, Required, OnlyOne)); - AddProperty( /* 9 */ - new MP4DescriptorProperty(parentAtom, "slConfigDescr", - MP4SLConfigDescrTag, 0, Required, OnlyOne)); - AddProperty( /* 10 */ - new MP4DescriptorProperty(parentAtom, "ipiPtr", - MP4IPIPtrDescrTag, 0, Optional, OnlyOne)); - AddProperty( /* 11 */ - new MP4DescriptorProperty(parentAtom, "ipIds", - MP4ContentIdDescrTag, MP4SupplContentIdDescrTag, Optional, Many)); - AddProperty( /* 12 */ - new MP4DescriptorProperty(parentAtom, "ipmpDescrPtr", - MP4IPMPPtrDescrTag, 0, Optional, Many)); - AddProperty( /* 13 */ - new MP4DescriptorProperty(parentAtom, "langDescr", - MP4LanguageDescrTag, 0, Optional, Many)); - AddProperty( /* 14 */ - new MP4DescriptorProperty(parentAtom, "qosDescr", - MP4QosDescrTag, 0, Optional, OnlyOne)); - AddProperty( /* 15 */ - new MP4DescriptorProperty(parentAtom, "regDescr", - MP4RegistrationDescrTag, 0, Optional, OnlyOne)); - AddProperty( /* 16 */ - new MP4DescriptorProperty(parentAtom, "extDescr", - MP4ExtDescrTagsStart, MP4ExtDescrTagsEnd, Optional, Many)); - - SetReadMutate(5); -} - -void MP4ESDescriptor::Mutate() -{ - bool streamDependFlag = - ((MP4BitfieldProperty*)m_pProperties[1])->GetValue(); - m_pProperties[5]->SetImplicit(!streamDependFlag); - - bool urlFlag = - ((MP4BitfieldProperty*)m_pProperties[2])->GetValue(); - m_pProperties[6]->SetImplicit(!urlFlag); - - bool ocrFlag = - ((MP4BitfieldProperty*)m_pProperties[3])->GetValue(); - m_pProperties[7]->SetImplicit(!ocrFlag); -} - -MP4DecConfigDescriptor::MP4DecConfigDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom, MP4DecConfigDescrTag) -{ - AddProperty( /* 0 */ - new MP4Integer8Property(parentAtom, "objectTypeId")); - AddProperty( /* 1 */ - new MP4BitfieldProperty(parentAtom, "streamType", 6)); - AddProperty( /* 2 */ - new MP4BitfieldProperty(parentAtom, "upStream", 1)); - AddProperty( /* 3 */ - new MP4BitfieldProperty(parentAtom, "reserved", 1)); - AddProperty( /* 4 */ - new MP4BitfieldProperty(parentAtom, "bufferSizeDB", 24)); - AddProperty( /* 5 */ - new MP4Integer32Property(parentAtom, "maxBitrate")); - AddProperty( /* 6 */ - new MP4Integer32Property(parentAtom, "avgBitrate")); - AddProperty( /* 7 */ - new MP4DescriptorProperty(parentAtom, "decSpecificInfo", - MP4DecSpecificDescrTag, 0, Optional, OnlyOne)); - AddProperty( /* 8 */ - new MP4DescriptorProperty(parentAtom, "profileLevelIndicationIndexDescr", - MP4ExtProfileLevelDescrTag, 0, Optional, Many)); -} - -void MP4DecConfigDescriptor::Generate() -{ - ((MP4BitfieldProperty*)m_pProperties[3])->SetValue(1); -} - -MP4SLConfigDescriptor::MP4SLConfigDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom, MP4SLConfigDescrTag) -{ - AddProperty( /* 0 */ - new MP4Integer8Property(parentAtom, "predefined")); - AddProperty( /* 1 */ - new MP4BitfieldProperty(parentAtom, "useAccessUnitStartFlag", 1)); - AddProperty( /* 2 */ - new MP4BitfieldProperty(parentAtom, "useAccessUnitEndFlag", 1)); - AddProperty( /* 3 */ - new MP4BitfieldProperty(parentAtom, "useRandomAccessPointFlag", 1)); - AddProperty( /* 4 */ - new MP4BitfieldProperty(parentAtom, "hasRandomAccessUnitsOnlyFlag", 1)); - AddProperty( /* 5 */ - new MP4BitfieldProperty(parentAtom, "usePaddingFlag", 1)); - AddProperty( /* 6 */ - new MP4BitfieldProperty(parentAtom, "useTimeStampsFlag", 1)); - AddProperty( /* 7 */ - new MP4BitfieldProperty(parentAtom, "useIdleFlag", 1)); - AddProperty( /* 8 */ - new MP4BitfieldProperty(parentAtom, "durationFlag", 1)); - AddProperty( /* 9 */ - new MP4Integer32Property(parentAtom, "timeStampResolution")); - AddProperty( /* 10 */ - new MP4Integer32Property(parentAtom, "OCRResolution")); - AddProperty( /* 11 */ - new MP4Integer8Property(parentAtom, "timeStampLength")); - AddProperty( /* 12 */ - new MP4Integer8Property(parentAtom, "OCRLength")); - AddProperty( /* 13 */ - new MP4Integer8Property(parentAtom, "AULength")); - AddProperty( /* 14 */ - new MP4Integer8Property(parentAtom, "instantBitrateLength")); - AddProperty( /* 15 */ - new MP4BitfieldProperty(parentAtom, "degradationPriortyLength", 4)); - AddProperty( /* 16 */ - new MP4BitfieldProperty(parentAtom, "AUSeqNumLength", 5)); - AddProperty( /* 17 */ - new MP4BitfieldProperty(parentAtom, "packetSeqNumLength", 5)); - AddProperty( /* 18 */ - new MP4BitfieldProperty(parentAtom, "reserved", 2)); - - // if durationFlag - AddProperty( /* 19 */ - new MP4Integer32Property(parentAtom, "timeScale")); - AddProperty( /* 20 */ - new MP4Integer16Property(parentAtom, "accessUnitDuration")); - AddProperty( /* 21 */ - new MP4Integer16Property(parentAtom, "compositionUnitDuration")); - - // if !useTimeStampsFlag - AddProperty( /* 22 */ - new MP4BitfieldProperty(parentAtom, "startDecodingTimeStamp", 64)); - AddProperty( /* 23 */ - new MP4BitfieldProperty(parentAtom, "startCompositionTimeStamp", 64)); -} - -void MP4SLConfigDescriptor::Generate() -{ - // by default all tracks in an mp4 file - // use predefined SLConfig descriptor == 2 - ((MP4Integer8Property*)m_pProperties[0])->SetValue(2); - - // which implies UseTimestampsFlag = 1 - ((MP4BitfieldProperty*)m_pProperties[6])->SetValue(1); - - // reserved = 3 - ((MP4BitfieldProperty*)m_pProperties[18])->SetValue(3); -} - -void MP4SLConfigDescriptor::Read(MP4File& file) -{ - ReadHeader(file); - - // read the first property, 'predefined' - ReadProperties(file, 0, 1); - - // if predefined == 0 - if (((MP4Integer8Property*)m_pProperties[0])->GetValue() == 0) { - - /* read the next 18 properties */ - ReadProperties(file, 1, 18); - } - - // now mutate - Mutate(); - - // and read the remaining properties - ReadProperties(file, 19); -} - -void MP4SLConfigDescriptor::Mutate() -{ - uint32_t i; - uint8_t predefined = - ((MP4Integer8Property*)m_pProperties[0])->GetValue(); - - if (predefined) { - // properties 1-18 are implicit - for (i = 1; i < m_pProperties.Size(); i++) { - m_pProperties[i]->SetImplicit(true); - } - - if (predefined == 1) { - // UseTimestampsFlag = 0 - ((MP4BitfieldProperty*)m_pProperties[6])->SetValue(0); - - // TimestampResolution = 1000 - ((MP4Integer32Property*)m_pProperties[9])->SetValue(1000); - - // TimeStampLength = 32 - ((MP4Integer8Property*)m_pProperties[11])->SetValue(32); - - } else if (predefined == 2) { - // UseTimestampsFlag = 1 - ((MP4BitfieldProperty*)m_pProperties[6])->SetValue(1); - } - } else { -#if 1 - for (i = 1; i <= 18; i++) { - m_pProperties[i]->SetImplicit(false); - } - ((MP4BitfieldProperty*)m_pProperties[18])->SetValue(3); -#endif - } - - bool durationFlag = - ((MP4BitfieldProperty*)m_pProperties[8])->GetValue(); - - for (i = 19; i <= 21; i++) { - m_pProperties[i]->SetImplicit(!durationFlag); - } - - bool useTimeStampsFlag = - ((MP4BitfieldProperty*)m_pProperties[6])->GetValue(); - - for (i = 22; i <= 23; i++) { - m_pProperties[i]->SetImplicit(useTimeStampsFlag); - - uint8_t timeStampLength = min((uint8_t)64, - ((MP4Integer8Property*)m_pProperties[11])->GetValue()); - - ((MP4BitfieldProperty*)m_pProperties[i])->SetNumBits(timeStampLength); - - // handle a nonsensical situation gracefully - if (timeStampLength == 0) { - m_pProperties[i]->SetImplicit(true); - } - } -} - -MP4ContentIdDescriptor::MP4ContentIdDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom, MP4ContentIdDescrTag) -{ - AddProperty( /* 0 */ - new MP4BitfieldProperty(parentAtom, "compatibility", 2)); - AddProperty( /* 1 */ - new MP4BitfieldProperty(parentAtom, "contentTypeFlag", 1)); - AddProperty( /* 2 */ - new MP4BitfieldProperty(parentAtom, "contentIdFlag", 1)); - AddProperty( /* 3 */ - new MP4BitfieldProperty(parentAtom, "protectedContent", 1)); - AddProperty( /* 4 */ - new MP4BitfieldProperty(parentAtom, "reserved", 3)); - AddProperty( /* 5 */ - new MP4Integer8Property(parentAtom, "contentType")); - AddProperty( /* 6 */ - new MP4Integer8Property(parentAtom, "contentIdType")); - AddProperty( /* 7 */ - new MP4BytesProperty(parentAtom, "contentId")); -} - -void MP4ContentIdDescriptor::Read(MP4File& file) -{ - ReadHeader(file); - - /* read the first property, 'compatiblity' */ - ReadProperties(file, 0, 1); - - /* if compatiblity != 0 */ - if (((MP4Integer8Property*)m_pProperties[0])->GetValue() != 0) { - /* we don't understand it */ - log.verbose1f("incompatible content id descriptor"); - return; - } - - /* read the next four properties */ - ReadProperties(file, 1, 4); - - /* which allows us to reconfigure ourselves */ - Mutate(); - - bool contentTypeFlag = ((MP4BitfieldProperty*)m_pProperties[1])->GetValue(); - - bool contentIdFlag = ((MP4BitfieldProperty*)m_pProperties[2])->GetValue(); - - if (contentIdFlag) { - - uint32_t cIdOffset = 2; - - if (contentTypeFlag) { - - cIdOffset++; - - } - - ((MP4BytesProperty*)m_pProperties[7])->SetValueSize(m_size - cIdOffset); - - } - - - - /* read the remaining properties */ - ReadProperties(file, 5); -} - -void MP4ContentIdDescriptor::Mutate() -{ - bool contentTypeFlag = ((MP4BitfieldProperty*)m_pProperties[1])->GetValue(); - m_pProperties[5]->SetImplicit(!contentTypeFlag); - - bool contentIdFlag = ((MP4BitfieldProperty*)m_pProperties[2])->GetValue(); - m_pProperties[6]->SetImplicit(!contentIdFlag); - m_pProperties[7]->SetImplicit(!contentIdFlag); - -} - -MP4Descriptor* MP4DescriptorProperty::CreateDescriptor(MP4Atom& parentAtom, uint8_t tag) -{ - MP4Descriptor* pDescriptor = NULL; - - switch (tag) { - case MP4ESDescrTag: - pDescriptor = new MP4ESDescriptor(parentAtom); - break; - case MP4DecConfigDescrTag: - pDescriptor = new MP4DecConfigDescriptor(parentAtom); - break; - case MP4DecSpecificDescrTag: - case MP4IPMPDescrTag: - case MP4RegistrationDescrTag: - pDescriptor = new MP4BytesDescriptor(parentAtom, tag); - break; - case MP4SLConfigDescrTag: - pDescriptor = new MP4SLConfigDescriptor(parentAtom); - break; - case MP4ContentIdDescrTag: - pDescriptor = new MP4ContentIdDescriptor(parentAtom); - break; - case MP4ESIDIncDescrTag: - case MP4ESIDRefDescrTag: - case MP4IPIPtrDescrTag: - case MP4SupplContentIdDescrTag: - case MP4IPMPPtrDescrTag: - case MP4ExtProfileLevelDescrTag: - pDescriptor = new MP4BaseDescriptor(parentAtom, tag); - break; - case MP4QosDescrTag: - pDescriptor = new MP4QosDescriptorBase(parentAtom, MP4QosDescrTag); - break; - case MP4IODescrTag: - case MP4FileIODescrTag: - pDescriptor = new MP4IODescriptor(parentAtom); - pDescriptor->SetTag(tag); - break; - case MP4ODescrTag: - case MP4FileODescrTag: - pDescriptor = new MP4ODescriptor(parentAtom); - pDescriptor->SetTag(tag); - break; - } - - if (pDescriptor == NULL) { - if (tag >= MP4OCIDescrTagsStart && tag <= MP4OCIDescrTagsEnd) { - pDescriptor = CreateOCIDescriptor(parentAtom, tag); - } - - if (tag >= MP4ExtDescrTagsStart && tag <= MP4ExtDescrTagsEnd) { - pDescriptor = new MP4BytesDescriptor(parentAtom, tag); - } - } - - return pDescriptor; -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/descriptors.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/descriptors.h deleted file mode 100644 index 6f1cf2eb..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/descriptors.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#ifndef MP4V2_IMPL_DESCRIPTORS_H -#define MP4V2_IMPL_DESCRIPTORS_H - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -const uint8_t MP4ODescrTag = 0x01; -const uint8_t MP4IODescrTag = 0x02; -const uint8_t MP4ESDescrTag = 0x03; -const uint8_t MP4DecConfigDescrTag = 0x04; -const uint8_t MP4DecSpecificDescrTag = 0x05; -const uint8_t MP4SLConfigDescrTag = 0x06; -const uint8_t MP4ContentIdDescrTag = 0x07; -const uint8_t MP4SupplContentIdDescrTag = 0x08; -const uint8_t MP4IPIPtrDescrTag = 0x09; -const uint8_t MP4IPMPPtrDescrTag = 0x0A; -const uint8_t MP4IPMPDescrTag = 0x0B; -const uint8_t MP4RegistrationDescrTag = 0x0D; -const uint8_t MP4ESIDIncDescrTag = 0x0E; -const uint8_t MP4ESIDRefDescrTag = 0x0F; -const uint8_t MP4FileIODescrTag = 0x10; -const uint8_t MP4FileODescrTag = 0x11; -const uint8_t MP4ExtProfileLevelDescrTag = 0x13; -const uint8_t MP4ExtDescrTagsStart = 0x80; -const uint8_t MP4ExtDescrTagsEnd = 0xFE; - -class MP4BaseDescriptor : public MP4Descriptor { -public: - MP4BaseDescriptor(MP4Atom& parentAtom, uint8_t tag); -private: - MP4BaseDescriptor(); - MP4BaseDescriptor ( const MP4BaseDescriptor &src ); - MP4BaseDescriptor &operator= ( const MP4BaseDescriptor &src ); -}; - -class MP4BytesDescriptor : public MP4Descriptor { -public: - MP4BytesDescriptor(MP4Atom& parentAtom, uint8_t tag); - void Read(MP4File& file); -protected: - uint32_t m_size_offset; // size to adjust the size for the bytes property - uint32_t m_bytes_index; // index into properties for bytes property -private: - MP4BytesDescriptor(); - MP4BytesDescriptor ( const MP4BytesDescriptor &src ); - MP4BytesDescriptor &operator= ( const MP4BytesDescriptor &src ); -}; - -class MP4IODescriptor : public MP4Descriptor { -public: - MP4IODescriptor(MP4Atom& parentAtom); - void Generate(); -protected: - void Mutate(); -private: - MP4IODescriptor(); - MP4IODescriptor ( const MP4IODescriptor &src ); - MP4IODescriptor &operator= ( const MP4IODescriptor &src ); -}; - -class MP4ODescriptor : public MP4Descriptor { -public: - MP4ODescriptor(MP4Atom& parentAtom); - void Generate(); -protected: - void Mutate(); -private: - MP4ODescriptor(); - MP4ODescriptor ( const MP4ODescriptor &src ); - MP4ODescriptor &operator= ( const MP4ODescriptor &src ); -}; - - -class MP4ESDescriptor : public MP4Descriptor { -public: - MP4ESDescriptor(MP4Atom& parentAtom); -protected: - void Mutate(); -private: - MP4ESDescriptor(); - MP4ESDescriptor ( const MP4ESDescriptor &src ); - MP4ESDescriptor &operator= ( const MP4ESDescriptor &src ); -}; - -class MP4DecConfigDescriptor : public MP4Descriptor { -public: - MP4DecConfigDescriptor(MP4Atom& parentAtom); - void Generate(); -private: - MP4DecConfigDescriptor(); - MP4DecConfigDescriptor ( const MP4DecConfigDescriptor &src ); - MP4DecConfigDescriptor &operator= ( const MP4DecConfigDescriptor &src ); -}; - - -class MP4SLConfigDescriptor : public MP4Descriptor { -public: - MP4SLConfigDescriptor(MP4Atom& parentAtom); - void Generate(); - void Read(MP4File& file); -protected: - void Mutate(); -private: - MP4SLConfigDescriptor(); - MP4SLConfigDescriptor ( const MP4SLConfigDescriptor &src ); - MP4SLConfigDescriptor &operator= ( const MP4SLConfigDescriptor &src ); -}; - -class MP4IPIPtrDescriptor : public MP4Descriptor { -public: - MP4IPIPtrDescriptor(MP4Atom& parentAtom); -private: - MP4IPIPtrDescriptor(); - MP4IPIPtrDescriptor ( const MP4IPIPtrDescriptor &src ); - MP4IPIPtrDescriptor &operator= ( const MP4IPIPtrDescriptor &src ); -}; - -class MP4ContentIdDescriptor : public MP4Descriptor { -public: - MP4ContentIdDescriptor(MP4Atom& parentAtom); - void Read(MP4File& file); -protected: - void Mutate(); -private: - MP4ContentIdDescriptor(); - MP4ContentIdDescriptor ( const MP4ContentIdDescriptor &src ); - MP4ContentIdDescriptor &operator= ( const MP4ContentIdDescriptor &src ); -}; - -// associated values in descriptors - -// ES objectTypeId -const uint8_t MP4SystemsV1ObjectType = 0x01; -const uint8_t MP4SystemsV2ObjectType = 0x02; -const uint8_t MP4SubpicObjectType = 0xe0; - -// ES streamType -const uint8_t MP4ObjectDescriptionStreamType = 0x01; -const uint8_t MP4ClockReferenceStreamType = 0x02; -const uint8_t MP4SceneDescriptionStreamType = 0x03; -const uint8_t MP4VisualStreamType = 0x04; -const uint8_t MP4AudioStreamType = 0x05; -const uint8_t MP4Mpeg7StreamType = 0x06; -const uint8_t MP4IPMPStreamType = 0x07; -const uint8_t MP4OCIStreamType = 0x08; -const uint8_t MP4MPEGJStreamType = 0x09; -const uint8_t MP4UserPrivateStreamType = 0x20; -const uint8_t MP4NeroSubpicStreamType = 0x38; - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_DESCRIPTORS_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/enum.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/enum.h deleted file mode 100644 index af5b6d48..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/enum.h +++ /dev/null @@ -1,110 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_ENUM_H -#define MP4V2_IMPL_ENUM_H - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -/// class Template to support enums with to/from string conversions. -/// -/// This class template is meant only to add support for enums which have -/// useful string equivalents. The model is that each enum value has -/// two string equivalents: compact and formal. compact is a short, -/// compact string which usually excludes spaces and punctuation and makes it -/// suitable for use with command-line arguments or any situation where -/// superfluous characters make parsing needlessly complicated. formal -/// is a string suitable for use in human-readable situations where spaces, -/// punctuation and even case is desirable. -/// -/// For end usability, enums will have the full list of enums available -/// which is suitable for help-usage scenerios. And all values will be -/// convertable from enum to string, or from string to enum. When converting -/// from enum to string, you may optionally specify a boolean value which -/// will return the formal string value; otherwise a compact -/// value is returned. -/// -/// Conversion from string to enum (integral) value will always assume -/// compact string is used as it makes little sense to convert formal -/// strings to enum. Furthermore, the string conversion is optimized to -/// ignore case, and in the case an exact full-string match is not found, -/// a best-match is then checked for. Basically this means that if -/// enough beginning characters are used to match exactly 1 string-enum, -/// it is considered a match. -/// -/// The template has 2 strict requirements. First, the enum must be a true -/// enum type; ie: not just some integer constants. Second, the enum must have -/// a value which indicates an undefined or illegal value; which is used as -/// a return value by string-to-enum conversion to indicate the string did -/// not match. -/// -/// This template implementation itself should never be exposed. That is -/// to say, the .tcc file must not be used by code outside this library. -/// -/// WARNING: since enum types are typically made static file scope, -/// care must be taken to make sure Entry data[] initialization occurs -/// in the same file and before instantiation. -/// -template -class Enum -{ -public: - struct MP4V2_EXPORT Entry - { - T type; - const string compact; - const string formal; - }; - - typedef map MapToType; - typedef map MapToString; - -public: - static const Entry data[]; - -private: - MapToType _mapToType; - MapToString _mapToString; - -public: - const MapToType& mapToType; - const MapToString& mapToString; - -public: - Enum(); - ~Enum(); - - T toType ( const string& ) const; - string toString ( T, bool = false ) const; - string& toString ( T, string&, bool = false ) const; -}; - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#include "enum.tcc" - -#endif // MP4V2_IMPL_ENUM_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/enum.tcc b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/enum.tcc deleted file mode 100644 index 1f3395a9..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/enum.tcc +++ /dev/null @@ -1,121 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_ENUM_TCC -#define MP4V2_IMPL_ENUM_TCC - -#include - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -template -Enum::Enum() - : mapToType ( _mapToType ) - , mapToString ( _mapToString ) -{ - for( const Entry* p = data; p->type != UNDEFINED; p++ ) { - _mapToType.insert( typename MapToType::value_type( p->compact, p )); - _mapToString.insert( typename MapToString::value_type( p->type, p )); - } -} - -////////////////////////////////////////////////////////////////////////////// - -template -Enum::~Enum() -{ -} - -////////////////////////////////////////////////////////////////////////////// - -template -string -Enum::toString( T value, bool formal ) const -{ - string buffer; - return toString( value, buffer, formal ); -} - -////////////////////////////////////////////////////////////////////////////// - -template -string& -Enum::toString( T value, string& buffer, bool formal ) const -{ - const typename MapToString::const_iterator found = _mapToString.find( value ); - if( found != _mapToString.end() ) { - const Entry& entry = *(found->second); - buffer = formal ? entry.formal : entry.compact; - return buffer; - } - - ostringstream oss; - oss << "UNDEFINED(" << value << ")"; - buffer = oss.str(); - return buffer; -} - -////////////////////////////////////////////////////////////////////////////// - -template -T -Enum::toType( const string& value ) const -{ - // if number perform enum lookup - int ivalue; - istringstream iss( value ); - iss >> ivalue; - if( iss.rdstate() == ios::eofbit ) { - const typename MapToString::const_iterator found = _mapToString.find( static_cast(ivalue) ); - if( found != _mapToString.end() ) - return found->second->type; - } - - // exact match - const typename MapToType::const_iterator found = _mapToType.find( value ); - if( found != _mapToType.end() ) - return found->second->type; - - // partial match - int matches = 0; - T matched = static_cast( 0 ); - - const typename MapToType::const_iterator ie = _mapToType.end(); - for( typename MapToType::const_iterator it = _mapToType.begin(); it != ie; it++ ) { - const Entry& entry = *(it->second); - if( entry.compact.find( value ) == 0 ) { - matches++; - matched = entry.type; - } - } - - return (matches == 1) ? matched : UNDEFINED; -} - -////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_ENUM_TCC diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/exception.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/exception.cpp deleted file mode 100644 index ddc60d75..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/exception.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// Portions created by David Byron are Copyright (C) 2009. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// David Byron, dbyron0@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -Exception::Exception( const string& what_, - const char *file_, - int line_, - const char *function_ ) - : what(what_) - , file(file_) - , line(line_) - , function(function_) -{ - ASSERT(file_); - ASSERT(function_); -} - -/////////////////////////////////////////////////////////////////////////////// - -Exception::~Exception() -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -string -Exception::msg() const -{ - ostringstream retval; - - retval << function << ": " << what << " (" << file << "," << line << ")"; - - return retval.str(); -} - -/////////////////////////////////////////////////////////////////////////////// - -PlatformException::PlatformException( const string& what_, - int errno_, - const char *file_, - int line_, - const char *function_ ) - : Exception(what_,file_,line_,function_) - , m_errno(errno_) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -PlatformException::~PlatformException() -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -string -PlatformException::msg() const -{ - ostringstream retval; - - retval << function << ": " << what << ": errno: " << m_errno << " (" << - file << "," << line << ")"; - - return retval.str(); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/exception.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/exception.h deleted file mode 100644 index f0e2e4e7..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/exception.h +++ /dev/null @@ -1,70 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// David Byron, dbyron0@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_MP4EXCEPTION_H -#define MP4V2_IMPL_MP4EXCEPTION_H - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -class MP4V2_EXPORT Exception -{ -public: - explicit Exception( const string& what_, - const char *file_, - int line_, - const char *function_ ); - virtual ~Exception(); - - virtual string msg() const; - -public: - const string what; - const string file; - const int line; - const string function; -}; - -class MP4V2_EXPORT PlatformException : public Exception -{ -public: - explicit PlatformException( const string& what_, - int errno_, - const char *file_, - int line_, - const char *function_ ); - virtual ~PlatformException(); - - virtual string msg() const; - -public: - const int m_errno; -}; - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_MP4EXCEPTION_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/impl.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/impl.h deleted file mode 100644 index f35e3fee..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/impl.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef MP4V2_IMPL_IMPL_H -#define MP4V2_IMPL_IMPL_H - -/////////////////////////////////////////////////////////////////////////////// - -#include "src.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_IMPL_IMPL_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/isma.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/isma.cpp deleted file mode 100644 index 007455d7..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/isma.cpp +++ /dev/null @@ -1,967 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001 - 2004. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Alix Marchandise-Franquet alix@cisco.com - * Ximpo Group Ltd. mp4v2@ximpo.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -static const uint8_t BifsV2Config[3] = { - 0x00, 0x00, 0x60 // IsCommandStream = 1, PixelMetric = 1 -}; - -void MP4File::MakeIsmaCompliant(bool addIsmaComplianceSdp) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - if (m_useIsma) { - // already done - return; - } - - // find first audio and/or video tracks - - MP4TrackId audioTrackId = MP4_INVALID_TRACK_ID; - try { - audioTrackId = FindTrackId(0, MP4_AUDIO_TRACK_TYPE); - } - catch ( Exception *x ) { - log.errorf(*x); - delete x; - } - MP4TrackId videoTrackId = MP4_INVALID_TRACK_ID; - try { - videoTrackId = FindTrackId(0, MP4_VIDEO_TRACK_TYPE); - } - catch (Exception* x) { - log.errorf(*x); - delete x; - } - if (audioTrackId == MP4_INVALID_TRACK_ID && - videoTrackId == MP4_INVALID_TRACK_ID) return; - - const char *audio_media_data_name, *video_media_data_name; - uint8_t videoProfile = 0xff; - if (audioTrackId != MP4_INVALID_TRACK_ID) { - audio_media_data_name = MP4GetTrackMediaDataName(this, audioTrackId); - if (!(ATOMID(audio_media_data_name) == ATOMID("mp4a") || - ATOMID(audio_media_data_name) == ATOMID("enca"))) { - log.errorf("%s: \"%s\": can't make ISMA compliant when file contains an %s track", - __FUNCTION__, GetFilename().c_str(), audio_media_data_name); - return; - } - } - // - // Note - might have to check for avc1 here... - if (videoTrackId != MP4_INVALID_TRACK_ID) { - video_media_data_name = MP4GetTrackMediaDataName(this, videoTrackId); - if (!(ATOMID(video_media_data_name) == ATOMID("mp4v") || - ATOMID(video_media_data_name) == ATOMID("encv"))) { - log.errorf("%s: \"%s\": can't make ISMA compliant when file contains an %s track", __FUNCTION__, - GetFilename().c_str(), video_media_data_name); - return; - } - MP4LogLevel verb = log.verbosity; - log.setVerbosity(MP4_LOG_NONE); - videoProfile = MP4GetVideoProfileLevel(this, videoTrackId); - log.setVerbosity(verb); - } - - m_useIsma = true; - - uint64_t fileMsDuration = 0; - fileMsDuration = - ConvertFromMovieDuration(GetDuration(), MP4_MSECS_TIME_SCALE); - - // delete any existing OD track - if (m_odTrackId != MP4_INVALID_TRACK_ID) { - DeleteTrack(m_odTrackId); - } - - if (m_pRootAtom->FindAtom("moov.iods") == NULL) { - (void)AddChildAtom("moov", "iods"); - } - (void)AddODTrack(); - SetODProfileLevel(0xFF); - - if (audioTrackId != MP4_INVALID_TRACK_ID) { - AddTrackToOd(audioTrackId); - MP4SetAudioProfileLevel(this, 0xf); - } - if (videoTrackId != MP4_INVALID_TRACK_ID) { - AddTrackToOd(videoTrackId); - MP4SetVideoProfileLevel(this, videoProfile); - } - - // delete any existing scene track - MP4TrackId sceneTrackId = MP4_INVALID_TRACK_ID; - try { - sceneTrackId = FindTrackId(0, MP4_SCENE_TRACK_TYPE); - } - catch (Exception *x) { - log.errorf(*x); - delete x; - } - if (sceneTrackId != MP4_INVALID_TRACK_ID) { - DeleteTrack(sceneTrackId); - } - - // add scene track - sceneTrackId = AddSceneTrack(); - SetSceneProfileLevel(0xFF); - SetGraphicsProfileLevel(0xFF); - SetTrackIntegerProperty(sceneTrackId, - "mdia.minf.stbl.stsd.mp4s.esds.decConfigDescr.objectTypeId", - MP4SystemsV2ObjectType); - - SetTrackESConfiguration(sceneTrackId, - BifsV2Config, sizeof(BifsV2Config)); - - uint8_t* pBytes = NULL; - uint64_t numBytes = 0; - - // write OD Update Command - CreateIsmaODUpdateCommandFromFileForFile( - m_odTrackId, - audioTrackId, - videoTrackId, - &pBytes, - &numBytes); - - WriteSample(m_odTrackId, pBytes, numBytes, fileMsDuration); - - MP4Free(pBytes); - pBytes = NULL; - - // write BIFS Scene Replace Command - CreateIsmaSceneCommand( - MP4_IS_VALID_TRACK_ID(audioTrackId), - MP4_IS_VALID_TRACK_ID(videoTrackId), - &pBytes, - &numBytes); - - WriteSample(sceneTrackId, pBytes, numBytes, fileMsDuration); - - MP4Free(pBytes); - pBytes = NULL; - - // add session level sdp - CreateIsmaIodFromFile( - m_odTrackId, - sceneTrackId, - audioTrackId, - videoTrackId, - &pBytes, - &numBytes); - - char* iodBase64 = MP4ToBase64(pBytes, numBytes); - - uint32_t sdpBufLen = (uint32_t)strlen(iodBase64) + 256; - uint32_t used; - char* sdpBuf = (char*)MP4Calloc(sdpBufLen); - - if (addIsmaComplianceSdp) { - strncpy(sdpBuf, "a=isma-compliance:1,1.0,1\015\012", sdpBufLen); - } - - used = (uint32_t)strlen(sdpBuf); - sdpBufLen -= used; - snprintf(&sdpBuf[used], sdpBufLen, - "a=mpeg4-iod: \042data:application/mpeg4-iod;base64,%s\042\015\012", - iodBase64); - - SetSessionSdp(sdpBuf); - - log.verbose1f("\"%s\": IOD SDP = %s", GetFilename().c_str(), sdpBuf); - - MP4Free(iodBase64); - iodBase64 = NULL; - MP4Free(pBytes); - pBytes = NULL; - MP4Free(sdpBuf); - sdpBuf = NULL; -} - -static void CloneIntegerProperty( - MP4Descriptor* pDest, - MP4DescriptorProperty* pSrc, - const char* name) -{ - MP4IntegerProperty* pGetProperty; - MP4IntegerProperty* pSetProperty; - - if (!pSrc->FindProperty(name, (MP4Property**)&pGetProperty)) return; - if (!pDest->FindProperty(name, (MP4Property**)&pSetProperty)) return; - pSetProperty->SetValue(pGetProperty->GetValue()); -} - -void MP4File::CreateIsmaIodFromFile( - MP4TrackId odTrackId, - MP4TrackId sceneTrackId, - MP4TrackId audioTrackId, - MP4TrackId videoTrackId, - uint8_t** ppBytes, - uint64_t* pNumBytes) -{ - MP4Atom* pIodsAtom = FindAtom("moov.iods"); - ASSERT(pIodsAtom); - MP4DescriptorProperty* pSrcIod = - (MP4DescriptorProperty*)pIodsAtom->GetProperty(2); - - MP4Descriptor* pIod = new MP4IODescriptor(*pIodsAtom); - pIod->SetTag(MP4IODescrTag); - pIod->Generate(); - - CloneIntegerProperty(pIod, pSrcIod, "objectDescriptorId"); - CloneIntegerProperty(pIod, pSrcIod, "ODProfileLevelId"); - CloneIntegerProperty(pIod, pSrcIod, "sceneProfileLevelId"); - CloneIntegerProperty(pIod, pSrcIod, "audioProfileLevelId"); - CloneIntegerProperty(pIod, pSrcIod, "visualProfileLevelId"); - CloneIntegerProperty(pIod, pSrcIod, "graphicsProfileLevelId"); - - // mutate esIds from MP4ESIDIncDescrTag to MP4ESDescrTag - MP4DescriptorProperty* pEsProperty; - if (!pIod->FindProperty("esIds", (MP4Property**)&pEsProperty)) return; - pEsProperty->SetTags(MP4ESDescrTag); - - MP4IntegerProperty* pSetProperty; - MP4IntegerProperty* pSceneESID; - MP4IntegerProperty* pOdESID; - - // OD - MP4Descriptor* pOdEsd = - pEsProperty->AddDescriptor(MP4ESDescrTag); - pOdEsd->Generate(); - - if (!pOdEsd->FindProperty("ESID", (MP4Property**)&pOdESID)) return; - - // we set the OD ESID to a non-zero unique value - pOdESID->SetValue(m_odTrackId); - - if (pOdEsd->FindProperty("URLFlag", - (MP4Property**)&pSetProperty)) - pSetProperty->SetValue(1); - - uint8_t* pBytes; - uint64_t numBytes; - - CreateIsmaODUpdateCommandFromFileForStream( - audioTrackId, - videoTrackId, - &pBytes, - &numBytes); - - log.hexDump(0, MP4_LOG_VERBOSE1, pBytes, numBytes, "\"%s\": OD data", - GetFilename().c_str() ); - - char* odCmdBase64 = MP4ToBase64(pBytes, numBytes); - - uint32_t urlBufLen = (uint32_t)strlen(odCmdBase64) + 64; - char* urlBuf = (char*)MP4Malloc(urlBufLen); - - snprintf(urlBuf, urlBufLen, - "data:application/mpeg4-od-au;base64,%s", - odCmdBase64); - - MP4StringProperty* pUrlProperty; - if (pOdEsd->FindProperty("URL", - (MP4Property**)&pUrlProperty)) - pUrlProperty->SetValue(urlBuf); - - log.verbose1f("\"%s\": OD data URL = \042%s\042", GetFilename().c_str(), - urlBuf); - - MP4Free(odCmdBase64); - odCmdBase64 = NULL; - MP4Free(pBytes); - pBytes = NULL; - MP4Free(urlBuf); - urlBuf = NULL; - - MP4DescriptorProperty* pSrcDcd = NULL; - - // HACK temporarily point to scene decoder config - (void)FindProperty(MakeTrackName(odTrackId, - "mdia.minf.stbl.stsd.mp4s.esds.decConfigDescr"), - (MP4Property**)&pSrcDcd); - ASSERT(pSrcDcd); - MP4Property* pOrgOdEsdProperty = - pOdEsd->GetProperty(8); - pOdEsd->SetProperty(8, pSrcDcd); - - // bufferSizeDB needs to be set appropriately - MP4BitfieldProperty* pBufferSizeProperty = NULL; - if (pOdEsd->FindProperty("decConfigDescr.bufferSizeDB", - (MP4Property**)&pBufferSizeProperty)) { - ASSERT(pBufferSizeProperty); - pBufferSizeProperty->SetValue(numBytes); - } - - // SL config needs to change from 2 (file) to 1 (null) - if (pOdEsd->FindProperty("slConfigDescr.predefined", - (MP4Property**)&pSetProperty)) - pSetProperty->SetValue(1); - - - // Scene - MP4Descriptor* pSceneEsd = - pEsProperty->AddDescriptor(MP4ESDescrTag); - pSceneEsd->Generate(); - - if (pSceneEsd->FindProperty("ESID", - (MP4Property**)&pSceneESID)) { - // we set the Scene ESID to a non-zero unique value - pSceneESID->SetValue(sceneTrackId); - } - - if (pSceneEsd->FindProperty("URLFlag", - (MP4Property**)&pSetProperty)) - pSetProperty->SetValue(1); - - CreateIsmaSceneCommand( - MP4_IS_VALID_TRACK_ID(audioTrackId), - MP4_IS_VALID_TRACK_ID(videoTrackId), - &pBytes, - &numBytes); - - log.hexDump(0, MP4_LOG_VERBOSE1, pBytes, numBytes, "\"%s\": Scene data", - GetFilename().c_str() ); - - char *sceneCmdBase64 = MP4ToBase64(pBytes, numBytes); - - urlBuf = (char*)MP4Malloc(strlen(sceneCmdBase64) + 64); - snprintf(urlBuf, strlen(sceneCmdBase64) + 64, - "data:application/mpeg4-bifs-au;base64,%s", - sceneCmdBase64); - - if (pSceneEsd->FindProperty("URL", - (MP4Property**)&pUrlProperty)) - pUrlProperty->SetValue(urlBuf); - - log.verbose1f("\"%s\": Scene data URL = \042%s\042", - GetFilename().c_str(), urlBuf); - - MP4Free(sceneCmdBase64); - sceneCmdBase64 = NULL; - MP4Free(urlBuf); - urlBuf = NULL; - MP4Free(pBytes); - pBytes = NULL; - - // HACK temporarily point to scene decoder config - ASSERT(FindProperty(MakeTrackName(sceneTrackId, - "mdia.minf.stbl.stsd.mp4s.esds.decConfigDescr"), - (MP4Property**)&pSrcDcd)); - ASSERT(pSrcDcd); - MP4Property* pOrgSceneEsdProperty = - pSceneEsd->GetProperty(8); - pSceneEsd->SetProperty(8, pSrcDcd); - - // bufferSizeDB needs to be set - pBufferSizeProperty = NULL; - if (pSceneEsd->FindProperty("decConfigDescr.bufferSizeDB", - (MP4Property**)&pBufferSizeProperty)) { - ASSERT(pBufferSizeProperty); - pBufferSizeProperty->SetValue(numBytes); - } - - // SL config needs to change from 2 (file) to 1 (null) - if (pSceneEsd->FindProperty("slConfigDescr.predefined", - (MP4Property**)&pSetProperty)) - pSetProperty->SetValue(1); - - - // finally get the whole thing written to a memory - pIod->WriteToMemory(*this, ppBytes, pNumBytes); - - - // now carefully replace esd properties before destroying - pOdEsd->SetProperty(8, pOrgOdEsdProperty); - pSceneEsd->SetProperty(8, pOrgSceneEsdProperty); - pSceneESID->SetValue(0); // restore 0 value - pOdESID->SetValue(0); - - delete pIod; - - log.hexDump(0, MP4_LOG_VERBOSE1, *ppBytes, *pNumBytes, "\"%s\": IOD data", - GetFilename().c_str() ); -} - -void MP4File::CreateIsmaIodFromParams( - uint8_t videoProfile, - uint32_t videoBitrate, - uint8_t* videoConfig, - uint32_t videoConfigLength, - uint8_t audioProfile, - uint32_t audioBitrate, - uint8_t* audioConfig, - uint32_t audioConfigLength, - uint8_t** ppIodBytes, - uint64_t* pIodNumBytes) -{ - MP4IntegerProperty* pInt; - uint8_t* pBytes = NULL; - uint64_t numBytes; - - // Descriptor constructors need a parent atom. In this - // case we don't have one so create a dummy one. This - // is OK as we only build the descriptor and then dump - // its contents to a buffer - MP4Atom dummyParent(*this); - - // Create the IOD - MP4Descriptor* pIod = new MP4IODescriptor(dummyParent); - pIod->SetTag(MP4IODescrTag); - pIod->Generate(); - - // Set audio and video profileLevels - if (pIod->FindProperty("audioProfileLevelId", - (MP4Property**)&pInt)) - pInt->SetValue(audioProfile); - - if (pIod->FindProperty("visualProfileLevelId", - (MP4Property**)&pInt)) - pInt->SetValue(videoProfile); - - // Mutate esIds from MP4ESIDIncDescrTag to MP4ESDescrTag - MP4DescriptorProperty* pEsProperty; - if (!pIod->FindProperty("esIds", (MP4Property**)&pEsProperty)) return; - pEsProperty->SetTags(MP4ESDescrTag); - - // Add ES Descriptors - - // Scene - CreateIsmaSceneCommand( - (audioProfile != 0xFF), - (videoProfile != 0xFF), - &pBytes, - &numBytes); - - log.hexDump(0, MP4_LOG_VERBOSE1, pBytes, numBytes, "\"%s\": Scene data", - GetFilename().c_str() ); - - char* sceneCmdBase64 = MP4ToBase64(pBytes, numBytes); - - char* urlBuf = - (char*)MP4Malloc(strlen(sceneCmdBase64) + 64); - snprintf(urlBuf, strlen(sceneCmdBase64) + 64, - "data:application/mpeg4-bifs-au;base64,%s", - sceneCmdBase64); - - log.verbose1f("\"%s\": Scene data URL = \042%s\042", GetFilename().c_str(), - urlBuf); - - /* MP4Descriptor* pSceneEsd = */ - CreateESD( - pEsProperty, - 201, // esid - MP4SystemsV2ObjectType, - MP4SceneDescriptionStreamType, - numBytes, // bufferSize - numBytes * 8, // bitrate - BifsV2Config, - sizeof(BifsV2Config), - urlBuf); - MP4Free(urlBuf); - urlBuf = NULL; - - MP4Free(sceneCmdBase64); - sceneCmdBase64 = NULL; - MP4Free(pBytes); - pBytes = NULL; - - // OD - - // Video - MP4DescriptorProperty* pVideoEsdProperty = - new MP4DescriptorProperty(dummyParent); - pVideoEsdProperty->SetTags(MP4ESDescrTag); - - /* MP4Descriptor* pVideoEsd = */ - CreateESD( - pVideoEsdProperty, - 20, // esid - MP4_MPEG4_VIDEO_TYPE, - MP4VisualStreamType, - videoBitrate / 8, // bufferSize - videoBitrate, - videoConfig, - videoConfigLength, - NULL); - - // Audio - MP4DescriptorProperty* pAudioEsdProperty = - new MP4DescriptorProperty(dummyParent); - pAudioEsdProperty->SetTags(MP4ESDescrTag); - - /* MP4Descriptor* pAudioEsd = */ - CreateESD( - pAudioEsdProperty, - 10, // esid - MP4_MPEG4_AUDIO_TYPE, - MP4AudioStreamType, - audioBitrate / 8, // bufferSize - audioBitrate, - audioConfig, - audioConfigLength, - NULL); - - CreateIsmaODUpdateCommandForStream( - pAudioEsdProperty, - pVideoEsdProperty, - &pBytes, - &numBytes); - - // cleanup temporary descriptor properties - delete pAudioEsdProperty; - delete pVideoEsdProperty; - - log.hexDump(0, MP4_LOG_VERBOSE1,pBytes, numBytes,"\"%s\": OD data = %" PRIu64 " bytes", - GetFilename().c_str(), numBytes); - - char* odCmdBase64 = MP4ToBase64(pBytes, numBytes); - - urlBuf = (char*)MP4Malloc(strlen(odCmdBase64) + 64); - if (urlBuf != NULL) { - snprintf(urlBuf, strlen(odCmdBase64) + 64, - "data:application/mpeg4-od-au;base64,%s", - odCmdBase64); - - log.verbose1f("\"%s\": OD data URL = \042%s\042", GetFilename().c_str(), urlBuf); - - /* MP4Descriptor* pOdEsd = */ - CreateESD( - pEsProperty, - 101, - MP4SystemsV1ObjectType, - MP4ObjectDescriptionStreamType, - numBytes, // bufferSize - numBytes * 8, // bitrate - NULL, // config - 0, // configLength - urlBuf); - - MP4Free(urlBuf); - urlBuf = NULL; - } - MP4Free(odCmdBase64); - odCmdBase64 = NULL; - MP4Free(pBytes); - pBytes = NULL; - - // finally get the whole thing written to a memory - pIod->WriteToMemory(*this, ppIodBytes, pIodNumBytes); - - delete pIod; - - log.hexDump(0, MP4_LOG_VERBOSE1, *ppIodBytes, *pIodNumBytes,"\"%s\": IOD data", - GetFilename().c_str() ); -} - -void MP4File::CreateESD( - MP4DescriptorProperty* pEsProperty, - uint32_t esid, - uint8_t objectType, - uint8_t streamType, - uint32_t bufferSize, - uint32_t bitrate, - const uint8_t* pConfig, - uint32_t configLength, - char* url) -{ - MP4IntegerProperty* pInt; - MP4StringProperty* pString; - MP4BytesProperty* pBytes; - MP4BitfieldProperty* pBits; - - MP4Descriptor* pEsd = - pEsProperty->AddDescriptor(MP4ESDescrTag); - pEsd->Generate(); - - if (pEsd->FindProperty("ESID", - (MP4Property**)&pInt)) - pInt->SetValue(esid); - - if (pEsd->FindProperty("decConfigDescr.objectTypeId", - (MP4Property**)&pInt)) - pInt->SetValue(objectType); - - if (pEsd->FindProperty("decConfigDescr.streamType", - (MP4Property**)&pInt)) - pInt->SetValue(streamType); - - if (pEsd->FindProperty("decConfigDescr.bufferSizeDB", - (MP4Property**)&pInt)) - pInt->SetValue(bufferSize); - - if (pEsd->FindProperty("decConfigDescr.maxBitrate", - (MP4Property**)&pInt)) - pInt->SetValue(bitrate); - - if (pEsd->FindProperty("decConfigDescr.avgBitrate", - (MP4Property**)&pInt)) - pInt->SetValue(bitrate); - - MP4DescriptorProperty* pConfigDescrProperty; - if (pEsd->FindProperty("decConfigDescr.decSpecificInfo", - (MP4Property**)&pConfigDescrProperty)) { - - MP4Descriptor* pConfigDescr = - pConfigDescrProperty->AddDescriptor(MP4DecSpecificDescrTag); - pConfigDescr->Generate(); - - if (pConfigDescrProperty->FindProperty("decSpecificInfo[0].info", - (MP4Property**)&pBytes)) - pBytes->SetValue(pConfig, configLength); - } - - if (pEsd->FindProperty("slConfigDescr.predefined", - (MP4Property**)&pInt)) - // changed 12/5/02 from plugfest to value 0 - pInt->SetValue(0); - - if (pEsd->FindProperty("slConfig.useAccessUnitEndFlag", - (MP4Property **)&pBits)) - pBits->SetValue(1); - - if (url) { - if (pEsd->FindProperty("URLFlag", - (MP4Property**)&pInt)) - pInt->SetValue(1); - - if (pEsd->FindProperty("URL", - (MP4Property**)&pString)) - pString->SetValue(url); - } - - //return pEsd; -} - -void MP4File::CreateIsmaODUpdateCommandFromFileForFile( - MP4TrackId odTrackId, - MP4TrackId audioTrackId, - MP4TrackId videoTrackId, - uint8_t** ppBytes, - uint64_t* pNumBytes) -{ - // Descriptor constructors need a parent atom. In this - // case we don't have one so create a dummy one. This - // is OK as we only build the descriptor and then dump - // its contents to a buffer - MP4Atom dummyParent(*this); - MP4Descriptor* pCommand = CreateODCommand(dummyParent, MP4ODUpdateODCommandTag); - pCommand->Generate(); - - for (uint8_t i = 0; i < 2; i++) { - MP4TrackId trackId; - uint16_t odId; - - if (i == 0) { - trackId = audioTrackId; - odId = 10; - } else { - trackId = videoTrackId; - odId = 20; - } - - if (trackId == MP4_INVALID_TRACK_ID) { - continue; - } - - MP4DescriptorProperty* pOdDescrProperty = - (MP4DescriptorProperty*)(pCommand->GetProperty(0)); - - pOdDescrProperty->SetTags(MP4FileODescrTag); - - MP4Descriptor* pOd = - pOdDescrProperty->AddDescriptor(MP4FileODescrTag); - - pOd->Generate(); - - MP4BitfieldProperty* pOdIdProperty = NULL; - if (pOd->FindProperty("objectDescriptorId", - (MP4Property**)&pOdIdProperty)) - pOdIdProperty->SetValue(odId); - - MP4DescriptorProperty* pEsIdsDescriptorProperty = NULL; - ASSERT(pOd->FindProperty("esIds", - (MP4Property**)&pEsIdsDescriptorProperty)); - ASSERT(pEsIdsDescriptorProperty); - - pEsIdsDescriptorProperty->SetTags(MP4ESIDRefDescrTag); - - MP4Descriptor *pRefDescriptor = - pEsIdsDescriptorProperty->AddDescriptor(MP4ESIDRefDescrTag); - pRefDescriptor->Generate(); - - MP4Integer16Property* pRefIndexProperty = NULL; - ASSERT(pRefDescriptor->FindProperty("refIndex", - (MP4Property**)&pRefIndexProperty)); - ASSERT(pRefIndexProperty); - - uint32_t mpodIndex = FindTrackReference( - MakeTrackName(odTrackId, "tref.mpod"), trackId); - ASSERT(mpodIndex != 0); - - pRefIndexProperty->SetValue(mpodIndex); - } - - pCommand->WriteToMemory(*this, ppBytes, pNumBytes); - - delete pCommand; -} - -void MP4File::CreateIsmaODUpdateCommandFromFileForStream( - MP4TrackId audioTrackId, - MP4TrackId videoTrackId, - uint8_t** ppBytes, - uint64_t* pNumBytes) -{ - MP4DescriptorProperty* pAudioEsd = NULL; - MP4Integer8Property* pAudioSLConfigPredef = NULL; - MP4BitfieldProperty* pAudioAccessUnitEndFlag = NULL; - int oldAudioUnitEndFlagValue = 0; - MP4DescriptorProperty* pVideoEsd = NULL; - MP4Integer8Property* pVideoSLConfigPredef = NULL; - MP4BitfieldProperty* pVideoAccessUnitEndFlag = NULL; - int oldVideoUnitEndFlagValue = 0; - MP4IntegerProperty* pAudioEsdId = NULL; - MP4IntegerProperty* pVideoEsdId = NULL; - - if (audioTrackId != MP4_INVALID_TRACK_ID) { - // changed mp4a to * to handle enca case - MP4Atom* pEsdsAtom = - FindAtom(MakeTrackName(audioTrackId, - "mdia.minf.stbl.stsd.*.esds")); - ASSERT(pEsdsAtom); - - pAudioEsd = (MP4DescriptorProperty*)(pEsdsAtom->GetProperty(2)); - // ESID is 0 for file, stream needs to be non-ze - ASSERT(pAudioEsd->FindProperty("ESID", - (MP4Property**)&pAudioEsdId)); - - ASSERT(pAudioEsdId); - pAudioEsdId->SetValue(audioTrackId); - - // SL config needs to change from 2 (file) to 1 (null) - if (pAudioEsd->FindProperty("slConfigDescr.predefined", - (MP4Property**)&pAudioSLConfigPredef)) { - ASSERT(pAudioSLConfigPredef); - pAudioSLConfigPredef->SetValue(0); - } - - if (pAudioEsd->FindProperty("slConfigDescr.useAccessUnitEndFlag", - (MP4Property **)&pAudioAccessUnitEndFlag)) { - oldAudioUnitEndFlagValue = - pAudioAccessUnitEndFlag->GetValue(); - pAudioAccessUnitEndFlag->SetValue(1); - } - } - - if (videoTrackId != MP4_INVALID_TRACK_ID) { - // changed mp4v to * to handle encv case - MP4Atom* pEsdsAtom = - FindAtom(MakeTrackName(videoTrackId, - "mdia.minf.stbl.stsd.*.esds")); - ASSERT(pEsdsAtom); - - pVideoEsd = (MP4DescriptorProperty*)(pEsdsAtom->GetProperty(2)); - ASSERT(pVideoEsd->FindProperty("ESID", - (MP4Property**)&pVideoEsdId)); - - ASSERT(pVideoEsdId); - pVideoEsdId->SetValue(videoTrackId); - - // SL config needs to change from 2 (file) to 1 (null) - ASSERT(pVideoEsd->FindProperty("slConfigDescr.predefined", - (MP4Property **)&pVideoSLConfigPredef)); - ASSERT(pVideoSLConfigPredef); - pVideoSLConfigPredef->SetValue(0); - - if (pVideoEsd->FindProperty("slConfigDescr.useAccessUnitEndFlag", - (MP4Property **)&pVideoAccessUnitEndFlag)) { - oldVideoUnitEndFlagValue = - pVideoAccessUnitEndFlag->GetValue(); - pVideoAccessUnitEndFlag->SetValue(1); - } - } - - CreateIsmaODUpdateCommandForStream( - pAudioEsd, pVideoEsd, ppBytes, pNumBytes); - log.hexDump(0, MP4_LOG_VERBOSE1, *ppBytes, *pNumBytes, - "\"%s\": After CreateImsaODUpdateCommandForStream len %" PRIu64, - GetFilename().c_str(), *pNumBytes); - - // return SL config values to 2 (file) - // return ESID values to 0 - if (pAudioSLConfigPredef) { - pAudioSLConfigPredef->SetValue(2); - } - if (pAudioEsdId) { - pAudioEsdId->SetValue(0); - } - if (pAudioAccessUnitEndFlag) { - pAudioAccessUnitEndFlag->SetValue(oldAudioUnitEndFlagValue ); - } - if (pVideoEsdId) { - pVideoEsdId->SetValue(0); - } - if (pVideoSLConfigPredef) { - pVideoSLConfigPredef->SetValue(2); - } - if (pVideoAccessUnitEndFlag) { - pVideoAccessUnitEndFlag->SetValue(oldVideoUnitEndFlagValue ); - } -} - -void MP4File::CreateIsmaODUpdateCommandForStream( - MP4DescriptorProperty* pAudioEsdProperty, - MP4DescriptorProperty* pVideoEsdProperty, - uint8_t** ppBytes, - uint64_t* pNumBytes) -{ - MP4Descriptor* pAudioOd = NULL; - MP4Descriptor* pVideoOd = NULL; - - // Descriptor constructors need a parent atom. In this - // case we don't have one so create a dummy one. This - // is OK as we only build the descriptor and then dump - // its contents to a buffer - MP4Atom dummyParent(*this); - MP4Descriptor* pCommand = - CreateODCommand(dummyParent, MP4ODUpdateODCommandTag); - pCommand->Generate(); - - for (uint8_t i = 0; i < 2; i++) { - uint16_t odId; - MP4DescriptorProperty* pEsdProperty = NULL; - - if (i == 0) { - odId = 10; - pEsdProperty = pAudioEsdProperty; - } else { - odId = 20; - pEsdProperty = pVideoEsdProperty; - } - - if (pEsdProperty == NULL) { - continue; - } - - MP4DescriptorProperty* pOdDescrProperty = - (MP4DescriptorProperty*)(pCommand->GetProperty(0)); - - pOdDescrProperty->SetTags(MP4ODescrTag); - - MP4Descriptor* pOd = - pOdDescrProperty->AddDescriptor(MP4ODescrTag); - pOd->Generate(); - - if (i == 0) { - pAudioOd = pOd; - } else { - pVideoOd = pOd; - } - - MP4BitfieldProperty* pOdIdProperty = NULL; - if (pOd->FindProperty("objectDescriptorId", - (MP4Property**)&pOdIdProperty)) { - pOdIdProperty->SetValue(odId); - } - - delete (MP4DescriptorProperty*)pOd->GetProperty(4); - pOd->SetProperty(4, pEsdProperty); - } - - // serialize OD command - pCommand->WriteToMemory(*this, ppBytes, pNumBytes); - - // detach from esd descriptor params - if (pAudioOd) { - pAudioOd->SetProperty(4, NULL); - } - if (pVideoOd) { - pVideoOd->SetProperty(4, NULL); - } - - // then destroy - delete pCommand; -} - -void MP4File::CreateIsmaSceneCommand( - bool hasAudio, - bool hasVideo, - uint8_t** ppBytes, - uint64_t* pNumBytes) -{ - // from ISMA 1.0 Tech Spec Appendix E - static const uint8_t bifsAudioOnly[] = { - 0xC0, 0x10, 0x12, - 0x81, 0x30, 0x2A, 0x05, 0x6D, 0xC0 - }; - static const uint8_t bifsVideoOnly[] = { - 0xC0, 0x10, 0x12, - 0x61, 0x04, - 0x1F, 0xC0, 0x00, 0x00, - 0x1F, 0xC0, 0x00, 0x00, - 0x44, 0x28, 0x22, 0x82, 0x9F, 0x80 - }; - static const uint8_t bifsAudioVideo[] = { - 0xC0, 0x10, 0x12, - 0x81, 0x30, 0x2A, 0x05, 0x6D, 0x26, - 0x10, 0x41, 0xFC, 0x00, 0x00, 0x01, 0xFC, 0x00, 0x00, - 0x04, 0x42, 0x82, 0x28, 0x29, 0xF8 - }; - - if (hasAudio && hasVideo) { - *pNumBytes = sizeof(bifsAudioVideo); - *ppBytes = (uint8_t*)MP4Malloc(*pNumBytes); - memcpy(*ppBytes, bifsAudioVideo, sizeof(bifsAudioVideo)); - - } else if (hasAudio) { - *pNumBytes = sizeof(bifsAudioOnly); - *ppBytes = (uint8_t*)MP4Malloc(*pNumBytes); - memcpy(*ppBytes, bifsAudioOnly, sizeof(bifsAudioOnly)); - - } else if (hasVideo) { - *pNumBytes = sizeof(bifsVideoOnly); - *ppBytes = (uint8_t*)MP4Malloc(*pNumBytes); - memcpy(*ppBytes, bifsVideoOnly, sizeof(bifsVideoOnly)); - } else { - *pNumBytes = 0; - *ppBytes = NULL; - } -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/CoverArtBox.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/CoverArtBox.cpp deleted file mode 100644 index 01253624..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/CoverArtBox.cpp +++ /dev/null @@ -1,261 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "impl.h" - -namespace mp4v2 { namespace impl { namespace itmf { - -/////////////////////////////////////////////////////////////////////////////// - -CoverArtBox::Item::Item() - : type ( BT_UNDEFINED ) - , buffer ( NULL ) - , size ( 0 ) - , autofree ( false ) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -CoverArtBox::Item::Item( const Item& rhs ) - : type ( BT_UNDEFINED ) - , buffer ( NULL ) - , size ( 0 ) - , autofree ( false ) -{ - operator=( rhs ); -} - -/////////////////////////////////////////////////////////////////////////////// - -CoverArtBox::Item::~Item() -{ - reset(); -} - -/////////////////////////////////////////////////////////////////////////////// - -CoverArtBox::Item& -CoverArtBox::Item::operator=( const Item& rhs ) -{ - type = rhs.type; - size = rhs.size; - autofree = rhs.autofree; - - if( rhs.autofree ) { - buffer = (uint8_t*)MP4Malloc(rhs.size); - memcpy( buffer, rhs.buffer, rhs.size ); - } - else { - buffer = rhs.buffer; - } - - return *this; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -CoverArtBox::Item::reset() -{ - if( autofree && buffer ) - MP4Free( buffer ); - - type = BT_UNDEFINED; - buffer = NULL; - size = 0; - autofree = false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -CoverArtBox::add( MP4FileHandle hFile, const Item& item ) -{ - MP4File& file = *((MP4File*)hFile); - - const char* const covr_name = "moov.udta.meta.ilst.covr"; - MP4Atom* covr = file.FindAtom( covr_name ); - if( !covr ) { - file.AddDescendantAtoms( "moov", "udta.meta.ilst.covr" ); - - covr = file.FindAtom( covr_name ); - if( !covr ) - return true; - } - - // use empty data atom if one exists - MP4Atom* data = NULL; - uint32_t index = 0; - const uint32_t atomc = covr->GetNumberOfChildAtoms(); - for( uint32_t i = 0; i < atomc; i++ ) { - MP4Atom* atom = covr->GetChildAtom( i ); - - MP4BytesProperty* metadata = NULL; - if( !atom->FindProperty( "data.metadata", (MP4Property**)&metadata )) - continue; - - if( metadata->GetCount() ) - continue; - - data = atom; - index = i; - break; - } - - // no empty atom found, create one. - if( !data ) { - data = MP4Atom::CreateAtom( file, covr, "data" ); - covr->AddChildAtom( data ); - data->Generate(); - index = covr->GetNumberOfChildAtoms() - 1; - } - - return set( hFile, item, index ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -CoverArtBox::get( MP4FileHandle hFile, Item& item, uint32_t index ) -{ - item.reset(); - MP4File& file = *((MP4File*)hFile); - - MP4Atom* covr = file.FindAtom( "moov.udta.meta.ilst.covr" ); - if( !covr ) - return true; - - if( !(index < covr->GetNumberOfChildAtoms()) ) - return true; - - MP4DataAtom* data = static_cast( covr->GetChildAtom( index )); - if( !data ) - return true; - - MP4BytesProperty* metadata = NULL; - if ( !data->FindProperty( "data.metadata", (MP4Property**)&metadata )) - return true; - - metadata->GetValue( &item.buffer, &item.size ); - item.autofree = true; - item.type = data->typeCode.GetValue(); - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -CoverArtBox::list( MP4FileHandle hFile, ItemList& out ) -{ - out.clear(); - MP4File& file = *((MP4File*)hFile); - MP4ItmfItemList* itemList = genericGetItemsByCode( file, "covr" ); // alloc - - if( itemList->size ) { - MP4ItmfDataList& dataList = itemList->elements[0].dataList; - out.resize( dataList.size ); - for( uint32_t i = 0; i < dataList.size; i++ ) - get( hFile, out[i], i ); - } - - genericItemListFree( itemList ); // free - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -CoverArtBox::remove( MP4FileHandle hFile, uint32_t index ) -{ - MP4File& file = *((MP4File*)hFile); - - MP4Atom* covr = file.FindAtom( "moov.udta.meta.ilst.covr" ); - if( !covr ) - return true; - - // wildcard mode: delete covr and all images - if( index == numeric_limits::max() ) { - covr->GetParentAtom()->DeleteChildAtom( covr ); - delete covr; - return false; - } - - if( !(index < covr->GetNumberOfChildAtoms()) ) - return true; - - MP4Atom* data = covr->GetChildAtom( index ); - if( !data ) - return true; - - // delete single image - covr->DeleteChildAtom( data ); - delete data; - - // delete empty covr - if( covr->GetNumberOfChildAtoms() == 0 ) { - covr->GetParentAtom()->DeleteChildAtom( covr ); - delete covr; - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -CoverArtBox::set( MP4FileHandle hFile, const Item& item, uint32_t index ) -{ - MP4File& file = *((MP4File*)hFile); - - MP4Atom* covr = file.FindAtom( "moov.udta.meta.ilst.covr" ); - if( !covr ) - return true; - - if( !(index < covr->GetNumberOfChildAtoms()) ) - return true; - - MP4DataAtom* data = static_cast( covr->GetChildAtom( index )); - if( !data ) - return true; - - MP4BytesProperty* metadata = NULL; - if ( !data->FindProperty( "data.metadata", (MP4Property**)&metadata )) - return true; - - // autodetect type if BT_UNDEFINED - const BasicType final_type = (item.type == BT_UNDEFINED) - ? computeBasicType( item.buffer, item.size ) - : item.type; - - // set type; note: not really flags due to b0rked atom structure - data->typeCode.SetValue( final_type ); - metadata->SetValue( item.buffer, item.size ); - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::itmf diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/CoverArtBox.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/CoverArtBox.h deleted file mode 100644 index 023e3c90..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/CoverArtBox.h +++ /dev/null @@ -1,121 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_ITMF_COVERARTBOX_H -#define MP4V2_IMPL_ITMF_COVERARTBOX_H - -namespace mp4v2 { namespace impl { namespace itmf { - -/////////////////////////////////////////////////////////////////////////////// - -/// Functional class for covr-box (Cover-art Box) support. -/// -class MP4V2_EXPORT CoverArtBox -{ -public: - /// Data object for covr-box item. - /// This object correlates to one covr->data atom and offers automatic - /// memory freeing when autofree is true. - /// - class MP4V2_EXPORT Item - { - public: - Item(); - Item( const Item& ); - ~Item(); - - Item& operator=( const Item& ); - - /// Reset to state of newly constructed object. - /// If buffer is not NULL and autofree is true the - /// buffer will be free'd. - void reset(); - - BasicType type; ///< covr-box type. - uint8_t* buffer; ///< buffer point to raw covr-box data. - uint32_t size; ///< size of covr-box buffer size in bytes. - bool autofree; ///< when true invoke free(buffer) upon destruction. - }; - - /// Object representing a list of covr-box items. - typedef vector ItemList; - - /// Fetch list of covr-box items from file. - /// - /// @param hFile on which to operate. - /// @param out vector of ArtItem objects. - /// - /// @return true on failure, false on success. - /// - static bool list( MP4FileHandle hFile, ItemList& out ); - - /// Add covr-box item to file. - /// Any necessary metadata atoms are first created. - /// Additionally, if an empty data-atom exists it will be used, - /// otherwise a new data-atom is added to covr-atom. - /// - /// @param hFile on which to operate. - /// @param item covr-box object to place in file. - /// - /// @return true on failure, false on success. - /// - static bool add( MP4FileHandle hFile, const Item& item ); - - /// Replace covr-box item in file. - /// - /// @param hFile on which to operate. - /// @param item covr-box object to place in file. - /// @param index 0-based index of image to replace. - /// - /// @return true on failure, false on success. - /// - static bool set( MP4FileHandle hFile, const Item& item, uint32_t index ); - - /// Fetch covr-box item from file. - /// - /// @param hFile on which to operate. - /// @param item covr-box object populated with data. - /// The resulting object owns the malloc'd buffer and item.autofree - /// is set to true for convenient memory management. - /// @param index 0-based index of image to fetch. - /// - /// @return true on failure, false on success. - /// - static bool get( MP4FileHandle hFile, Item& item, uint32_t index ); - - /// Remove covr-box item from file. - /// - /// @param hFile on which to operate. - /// @param index 0-based index of image to remove. - /// Default value indicates wildcard behavior to remove all items. - /// - /// @return true on failure, false on success. - /// - static bool remove( MP4FileHandle hFile, uint32_t index = numeric_limits::max() ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::itmf - -#endif // MP4V2_IMPL_ITMF_COVERARTBOX_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/Tags.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/Tags.cpp deleted file mode 100644 index e8ca4816..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/Tags.cpp +++ /dev/null @@ -1,897 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// Portions created by David Byron are Copyright (C) 2011. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// Rouven Wessling, mp4v2@rouvenwessling.de -// David Byron, dbyron@dbyron.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "impl.h" - -namespace mp4v2 { namespace impl { namespace itmf { - -/////////////////////////////////////////////////////////////////////////////// - -Tags::Tags() - : hasMetadata(false) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -Tags::~Tags() -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_addArtwork( MP4Tags*& tags, MP4TagArtwork& c_artwork ) -{ - artwork.resize( artwork.size() + 1 ); - c_setArtwork( tags, (uint32_t)artwork.size() - 1, c_artwork ); - updateArtworkShadow( tags ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_alloc( MP4Tags*& tags ) -{ - tags = new MP4Tags(); - memset( tags, 0, sizeof(MP4Tags) ); // safe: pure C-struct - tags->__handle = this; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_fetch( MP4Tags*& tags, MP4FileHandle hFile ) -{ - MP4Tags& c = *tags; - MP4File& file = *static_cast(hFile); - - MP4ItmfItemList* itemList = genericGetItems( file ); // alloc - - hasMetadata = (itemList->size > 0); - - /* create code -> item map. - * map will only be used for items which do not repeat; we do not care if - * cover-art is inserted multiple times. - */ - CodeItemMap cim; - for( uint32_t i = 0; i < itemList->size; i++ ) { - MP4ItmfItem& item = itemList->elements[i]; - cim.insert( CodeItemMap::value_type( item.code, &item )); - } - - fetchString( cim, CODE_NAME, name, c.name ); - fetchString( cim, CODE_ARTIST, artist, c.artist ); - fetchString( cim, CODE_ALBUMARTIST, albumArtist, c.albumArtist ); - fetchString( cim, CODE_ALBUM, album, c.album ); - fetchString( cim, CODE_GROUPING, grouping, c.grouping ); - fetchString( cim, CODE_COMPOSER, composer, c.composer ); - fetchString( cim, CODE_COMMENTS, comments, c.comments ); - - fetchString( cim, CODE_GENRE, genre, c.genre ); - fetchGenre( cim, genreType, c.genreType ); - - fetchString( cim, CODE_RELEASEDATE, releaseDate, c.releaseDate ); - fetchTrack( cim, track, c.track ); - fetchDisk( cim, disk, c.disk ); - fetchInteger( cim, CODE_TEMPO, tempo, c.tempo ); - fetchInteger( cim, CODE_COMPILATION, compilation, c.compilation ); - - fetchString( cim, CODE_TVSHOW, tvShow, c.tvShow ); - fetchString( cim, CODE_TVNETWORK, tvNetwork, c.tvNetwork ); - fetchString( cim, CODE_TVEPISODEID, tvEpisodeID, c.tvEpisodeID ); - fetchInteger( cim, CODE_TVSEASON, tvSeason, c.tvSeason ); - fetchInteger( cim, CODE_TVEPISODE, tvEpisode, c.tvEpisode ); - - fetchString( cim, CODE_SORTNAME, sortName, c.sortName ); - fetchString( cim, CODE_SORTARTIST, sortArtist, c.sortArtist ); - fetchString( cim, CODE_SORTALBUMARTIST, sortAlbumArtist, c.sortAlbumArtist ); - fetchString( cim, CODE_SORTALBUM, sortAlbum, c.sortAlbum ); - fetchString( cim, CODE_SORTCOMPOSER, sortComposer, c.sortComposer ); - fetchString( cim, CODE_SORTTVSHOW, sortTVShow, c.sortTVShow ); - - fetchString( cim, CODE_DESCRIPTION, description, c.description ); - fetchString( cim, CODE_LONGDESCRIPTION, longDescription, c.longDescription ); - fetchString( cim, CODE_LYRICS, lyrics, c.lyrics ); - - fetchString( cim, CODE_COPYRIGHT, copyright, c.copyright ); - fetchString( cim, CODE_ENCODINGTOOL, encodingTool, c.encodingTool ); - fetchString( cim, CODE_ENCODEDBY, encodedBy, c.encodedBy ); - fetchString( cim, CODE_PURCHASEDATE, purchaseDate, c.purchaseDate ); - - fetchInteger( cim, CODE_PODCAST, podcast, c.podcast ); - fetchString( cim, CODE_KEYWORDS, keywords, c.keywords ); - fetchString( cim, CODE_CATEGORY, category, c.category ); - - fetchInteger( cim, CODE_HDVIDEO, hdVideo, c.hdVideo ); - fetchInteger( cim, CODE_MEDIATYPE, mediaType, c.mediaType ); - fetchInteger( cim, CODE_CONTENTRATING, contentRating, c.contentRating ); - fetchInteger( cim, CODE_GAPLESS, gapless, c.gapless ); - - fetchString( cim, CODE_ITUNESACCOUNT, iTunesAccount, c.iTunesAccount ); - fetchInteger( cim, CODE_ITUNESACCOUNTTYPE, iTunesAccountType, c.iTunesAccountType ); - fetchInteger( cim, CODE_ITUNESCOUNTRY, iTunesCountry, c.iTunesCountry ); - - fetchInteger( cim, CODE_CONTENTID, contentID, c.contentID ); - fetchInteger( cim, CODE_ARTISTID, artistID, c.artistID ); - fetchInteger( cim, CODE_PLAYLISTID, playlistID, c.playlistID ); - fetchInteger( cim, CODE_GENREID, genreID, c.genreID ); - fetchInteger( cim, CODE_COMPOSERID, composerID, c.composerID ); - fetchString( cim, CODE_XID, xid, c.xid ); - - genericItemListFree( itemList ); // free - - // fetch full list and overwrite our copy, otherwise clear - { - CoverArtBox::ItemList items; - if( CoverArtBox::list( hFile, items )) - artwork.clear(); - else - artwork = items; - - updateArtworkShadow( tags ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_free( MP4Tags*& tags ) -{ - MP4Tags* c = const_cast(tags); - - delete[] c->artwork; - delete c; - - tags = NULL; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_removeArtwork( MP4Tags*& tags, uint32_t index ) -{ - if( !(index < artwork.size()) ) - return; - - artwork.erase( artwork.begin() + index ); - updateArtworkShadow( tags ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_setArtwork( MP4Tags*& tags, uint32_t index, MP4TagArtwork& c_artwork ) -{ - if( !(index < artwork.size()) ) - return; - - CoverArtBox::Item& item = artwork[index]; - - switch( c_artwork.type ) { - case MP4_ART_BMP: - item.type = BT_BMP; - break; - - case MP4_ART_GIF: - item.type = BT_GIF; - break; - - case MP4_ART_JPEG: - item.type = BT_JPEG; - break; - - case MP4_ART_PNG: - item.type = BT_PNG; - break; - - case MP4_ART_UNDEFINED: - default: - item.type = computeBasicType( c_artwork.data, c_artwork.size ); - break; - } - - item.buffer = (uint8_t*)malloc( c_artwork.size ); - item.size = c_artwork.size; - item.autofree = true; - - memcpy( item.buffer, c_artwork.data, c_artwork.size ); - updateArtworkShadow( tags ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_setInteger( const uint8_t* value, uint8_t& cpp, const uint8_t*& c ) -{ - if( !value ) { - cpp = 0; - c = NULL; - } - else { - cpp = *value; - c = &cpp; - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_setInteger( const uint16_t* value, uint16_t& cpp, const uint16_t*& c ) -{ - if( !value ) { - cpp = 0; - c = NULL; - } - else { - cpp = *value; - c = &cpp; - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_setInteger( const uint32_t* value, uint32_t& cpp, const uint32_t*& c ) -{ - if( !value ) { - cpp = 0; - c = NULL; - } - else { - cpp = *value; - c = &cpp; - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_setInteger( const uint64_t* value, uint64_t& cpp, const uint64_t*& c ) -{ - if( !value ) { - cpp = 0; - c = NULL; - } - else { - cpp = *value; - c = &cpp; - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_setString( const char* value, string& cpp, const char*& c ) -{ - if( !value ) { - cpp.clear(); - c = NULL; - } - else { - cpp = value; - c = cpp.c_str(); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_setTrack( const MP4TagTrack* value, MP4TagTrack& cpp, const MP4TagTrack*& c ) -{ - if( !value ) { - cpp.index = 0; - cpp.total = 0; - c = NULL; - } - else { - cpp.index = value->index; - cpp.total = value->total; - c = &cpp; - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_setDisk( const MP4TagDisk* value, MP4TagDisk& cpp, const MP4TagDisk*& c ) -{ - if( !value ) { - cpp.index = 0; - cpp.total = 0; - c = NULL; - } - else { - cpp.index = value->index; - cpp.total = value->total; - c = &cpp; - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::c_store( MP4Tags*& tags, MP4FileHandle hFile ) -{ - MP4Tags& c = *tags; - MP4File& file = *static_cast(hFile); - - storeString( file, CODE_NAME, name, c.name ); - storeString( file, CODE_ARTIST, artist, c.artist ); - storeString( file, CODE_ALBUMARTIST, albumArtist, c.albumArtist ); - storeString( file, CODE_ALBUM, album, c.album ); - storeString( file, CODE_GROUPING, grouping, c.grouping ); - storeString( file, CODE_COMPOSER, composer, c.composer ); - storeString( file, CODE_COMMENTS, comments, c.comments ); - - storeString( file, CODE_GENRE, genre, c.genre ); - storeGenre( file, genreType, c.genreType ); - - storeString( file, CODE_RELEASEDATE, releaseDate, c.releaseDate ); - storeTrack( file, track, c.track ); - storeDisk( file, disk, c.disk ); - storeInteger( file, CODE_TEMPO, tempo, c.tempo ); - storeInteger( file, CODE_COMPILATION, compilation, c.compilation ); - - storeString( file, CODE_TVSHOW, tvShow, c.tvShow ); - storeString( file, CODE_TVNETWORK, tvNetwork, c.tvNetwork ); - storeString( file, CODE_TVEPISODEID, tvEpisodeID, c.tvEpisodeID ); - storeInteger( file, CODE_TVSEASON, tvSeason, c.tvSeason ); - storeInteger( file, CODE_TVEPISODE, tvEpisode, c.tvEpisode ); - - storeString( file, CODE_SORTNAME, sortName, c.sortName ); - storeString( file, CODE_SORTARTIST, sortArtist, c.sortArtist ); - storeString( file, CODE_SORTALBUMARTIST, sortAlbumArtist, c.sortAlbumArtist ); - storeString( file, CODE_SORTALBUM, sortAlbum, c.sortAlbum ); - storeString( file, CODE_SORTCOMPOSER, sortComposer, c.sortComposer ); - storeString( file, CODE_SORTTVSHOW, sortTVShow, c.sortTVShow ); - - storeString( file, CODE_DESCRIPTION, description, c.description ); - storeString( file, CODE_LONGDESCRIPTION, longDescription, c.longDescription ); - storeString( file, CODE_LYRICS, lyrics, c.lyrics ); - - storeString( file, CODE_COPYRIGHT, copyright, c.copyright ); - storeString( file, CODE_ENCODINGTOOL, encodingTool, c.encodingTool ); - storeString( file, CODE_ENCODEDBY, encodedBy, c.encodedBy ); - storeString( file, CODE_PURCHASEDATE, purchaseDate, c.purchaseDate ); - - storeInteger( file, CODE_PODCAST, podcast, c.podcast ); - storeString( file, CODE_KEYWORDS, keywords, c.keywords ); - storeString( file, CODE_CATEGORY, category, c.category ); - - storeInteger( file, CODE_HDVIDEO, hdVideo, c.hdVideo ); - storeInteger( file, CODE_MEDIATYPE, mediaType, c.mediaType ); - storeInteger( file, CODE_CONTENTRATING, contentRating, c.contentRating ); - storeInteger( file, CODE_GAPLESS, gapless, c.gapless ); - - storeString( file, CODE_ITUNESACCOUNT, iTunesAccount, c.iTunesAccount ); - storeInteger( file, CODE_ITUNESACCOUNTTYPE, iTunesAccountType, c.iTunesAccountType ); - storeInteger( file, CODE_ITUNESCOUNTRY, iTunesCountry, c.iTunesCountry ); - - storeInteger( file, CODE_CONTENTID, contentID, c.contentID ); - storeInteger( file, CODE_ARTISTID, artistID, c.artistID ); - storeInteger( file, CODE_PLAYLISTID, playlistID, c.playlistID ); - storeInteger( file, CODE_GENREID, genreID, c.genreID ); - storeInteger( file, CODE_COMPOSERID, composerID, c.composerID ); - storeString( file, CODE_XID, xid, c.xid ); - - // destroy all cover-art then add each - { - CoverArtBox::remove( hFile ); - const CoverArtBox::ItemList::size_type max = artwork.size(); - for( CoverArtBox::ItemList::size_type i = 0; i < max; i++ ) - CoverArtBox::add( hFile, artwork[i] ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::fetchGenre( const CodeItemMap& cim, uint16_t& cpp, const uint16_t*& c ) -{ - cpp = 0; - c = NULL; - - CodeItemMap::const_iterator f = cim.find( CODE_GENRETYPE ); - if( f == cim.end() || 0 == f->second->dataList.size ) - return; - - MP4ItmfData& data = f->second->dataList.elements[0]; - if( NULL == data.value ) - return; - - cpp = (uint16_t(data.value[0]) << 8) - | (uint16_t(data.value[1]) ); - - c = &cpp; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::fetchDisk( const CodeItemMap& cim, MP4TagDisk& cpp, const MP4TagDisk*& c ) -{ - cpp.index = 0; - cpp.total = 0; - c = NULL; - - CodeItemMap::const_iterator f = cim.find( CODE_DISK ); - if( f == cim.end() || 0 == f->second->dataList.size ) - return; - - MP4ItmfData& data = f->second->dataList.elements[0]; - - if( NULL == data.value ) - return; - - cpp.index = (uint16_t(data.value[2]) << 8) - | (uint16_t(data.value[3]) ); - - cpp.total = (uint16_t(data.value[4]) << 8) - | (uint16_t(data.value[5]) ); - - c = &cpp; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::fetchTrack( const CodeItemMap& cim, MP4TagTrack& cpp, const MP4TagTrack*& c ) -{ - cpp.index = 0; - cpp.total = 0; - c = NULL; - - CodeItemMap::const_iterator f = cim.find( CODE_TRACK ); - if( f == cim.end() || 0 == f->second->dataList.size ) - return; - - MP4ItmfData& data = f->second->dataList.elements[0]; - - if( NULL == data.value ) - return; - - cpp.index = (uint16_t(data.value[2]) << 8) - | (uint16_t(data.value[3]) ); - - cpp.total = (uint16_t(data.value[4]) << 8) - | (uint16_t(data.value[5]) ); - - c = &cpp; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::fetchInteger( const CodeItemMap& cim, const string& code, uint8_t& cpp, const uint8_t*& c ) -{ - cpp = 0; - c = NULL; - - CodeItemMap::const_iterator f = cim.find( code ); - if( f == cim.end() || 0 == f->second->dataList.size ) - return; - - MP4ItmfData& data = f->second->dataList.elements[0]; - if( NULL == data.value ) - return; - - cpp = data.value[0]; - c = &cpp; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::fetchInteger( const CodeItemMap& cim, const string& code, uint16_t& cpp, const uint16_t*& c ) -{ - cpp = 0; - c = NULL; - - CodeItemMap::const_iterator f = cim.find( code ); - if( f == cim.end() || 0 == f->second->dataList.size ) - return; - - MP4ItmfData& data = f->second->dataList.elements[0]; - - if( NULL == data.value ) - return; - - cpp = (uint16_t(data.value[0]) << 8) - | (uint16_t(data.value[1]) ); - - c = &cpp; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::fetchInteger( const CodeItemMap& cim, const string& code, uint32_t& cpp, const uint32_t*& c ) -{ - cpp = 0; - c = NULL; - - CodeItemMap::const_iterator f = cim.find( code ); - if( f == cim.end() || 0 == f->second->dataList.size ) - return; - - MP4ItmfData& data = f->second->dataList.elements[0]; - - if( NULL == data.value ) - return; - - cpp = (uint32_t(data.value[0]) << 24) - | (uint32_t(data.value[1]) << 16) - | (uint32_t(data.value[2]) << 8) - | (uint32_t(data.value[3]) ); - - c = &cpp; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::fetchInteger( const CodeItemMap& cim, const string& code, uint64_t& cpp, const uint64_t*& c ) -{ - cpp = 0; - c = NULL; - - CodeItemMap::const_iterator f = cim.find( code ); - if( f == cim.end() || 0 == f->second->dataList.size ) - return; - - MP4ItmfData& data = f->second->dataList.elements[0]; - - if( NULL == data.value ) - return; - - cpp = (uint64_t(data.value[0]) << 56) - | (uint64_t(data.value[1]) << 48) - | (uint64_t(data.value[2]) << 40) - | (uint64_t(data.value[3]) << 32) - | (uint64_t(data.value[4]) << 24) - | (uint64_t(data.value[5]) << 16) - | (uint64_t(data.value[6]) << 8) - | (uint64_t(data.value[7]) ); - - c = &cpp; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::fetchString( const CodeItemMap& cim, const string& code, string& cpp, const char*& c ) -{ - cpp.clear(); - c = NULL; - - CodeItemMap::const_iterator f = cim.find( code ); - if( f == cim.end() || 0 == f->second->dataList.size ) - return; - - MP4ItmfData& data = f->second->dataList.elements[0]; - - if( NULL == data.value ) - return; - - cpp.append( reinterpret_cast( data.value ), data.valueSize ); - c = cpp.c_str(); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::remove( MP4File& file, const string& code ) -{ - MP4ItmfItemList* itemList = genericGetItemsByCode( file, code ); // alloc - - if( itemList->size ) - genericRemoveItem( file, &itemList->elements[0] ); - - genericItemListFree( itemList ); // free -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::store( MP4File& file, const string& code, MP4ItmfBasicType basicType, const void* buffer, uint32_t size ) -{ - // remove existing item - remove( file, code ); - - // add item - MP4ItmfItem& item = *genericItemAlloc( code, 1 ); // alloc - MP4ItmfData& data = item.dataList.elements[0]; - - data.typeCode = basicType; - data.valueSize = size; - data.value = (uint8_t*)malloc( data.valueSize ); - memcpy( data.value, buffer, data.valueSize ); - - genericAddItem( file, &item ); - genericItemFree( &item ); // free -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::storeGenre( MP4File& file, uint16_t cpp, const uint16_t* c ) -{ - if( c ) { - uint8_t buf[2]; - - buf[0] = uint8_t((cpp & 0xff00) >> 8); - buf[1] = uint8_t((cpp & 0x00ff) ); - - // it's not clear if you must use implicit in these situations and iirc iTunes and other software are not consistent in this regard. - // many other tags must be integer type yet no issues there. Silly that iTunes insists it must be implict, which is then hardcoded - // to interpret as genres anyways. - store( file, CODE_GENRETYPE, MP4_ITMF_BT_IMPLICIT, buf, sizeof(buf) ); - } - else { - remove( file, CODE_GENRETYPE ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::storeDisk( MP4File& file, const MP4TagDisk& cpp, const MP4TagDisk* c ) -{ - if( c ) { - uint8_t buf[6]; - memset( buf, 0, sizeof(buf) ); - - buf[2] = uint8_t((cpp.index & 0xff00) >> 8); - buf[3] = uint8_t((cpp.index & 0x00ff) ); - buf[4] = uint8_t((cpp.total & 0xff00) >> 8); - buf[5] = uint8_t((cpp.total & 0x00ff) ); - - store( file, CODE_DISK, MP4_ITMF_BT_IMPLICIT, buf, sizeof(buf) ); - } - else { - remove( file, CODE_DISK ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::storeTrack( MP4File& file, const MP4TagTrack& cpp, const MP4TagTrack* c ) -{ - if( c ) { - uint8_t buf[8]; // iTMF spec says 7 but iTunes media is 8 - memset( buf, 0, sizeof(buf) ); - - buf[2] = uint8_t((cpp.index & 0xff00) >> 8); - buf[3] = uint8_t((cpp.index & 0x00ff) ); - buf[4] = uint8_t((cpp.total & 0xff00) >> 8); - buf[5] = uint8_t((cpp.total & 0x00ff) ); - - store( file, CODE_TRACK, MP4_ITMF_BT_IMPLICIT, buf, sizeof(buf) ); - } - else { - remove( file, CODE_TRACK ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::storeInteger( MP4File& file, const string& code, uint8_t cpp, const uint8_t* c ) -{ - if( c ) - store( file, code, MP4_ITMF_BT_INTEGER, &cpp, sizeof(cpp) ); - else - remove( file, code ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::storeInteger( MP4File& file, const string& code, uint16_t cpp, const uint16_t* c ) -{ - if( c ) { - uint8_t buf[2]; - - buf[0] = uint8_t((cpp & 0xff00) >> 8); - buf[1] = uint8_t((cpp & 0x00ff) ); - - store( file, code, MP4_ITMF_BT_INTEGER, buf, sizeof(buf) ); - } - else { - remove( file, code ); - } -} - - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::storeInteger( MP4File& file, const string& code, uint32_t cpp, const uint32_t* c ) -{ - if( c ) { - uint8_t buf[4]; - - buf[0] = uint8_t((cpp & 0xff000000) >> 24 ); - buf[1] = uint8_t((cpp & 0x00ff0000) >> 16 ); - buf[2] = uint8_t((cpp & 0x0000ff00) >> 8 ); - buf[3] = uint8_t((cpp & 0x000000ff) ); - - store( file, code, MP4_ITMF_BT_INTEGER, buf, sizeof(buf) ); - } - else { - remove( file, code ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::storeInteger( MP4File& file, const string& code, uint64_t cpp, const uint64_t* c ) -{ - if( c ) { - uint8_t buf[8]; - - buf[0] = uint8_t((cpp & 0xff00000000000000LL) >> 56 ); - buf[1] = uint8_t((cpp & 0x00ff000000000000LL) >> 48 ); - buf[2] = uint8_t((cpp & 0x0000ff0000000000LL) >> 40 ); - buf[3] = uint8_t((cpp & 0x000000ff00000000LL) >> 32 ); - buf[4] = uint8_t((cpp & 0x00000000ff000000LL) >> 24 ); - buf[5] = uint8_t((cpp & 0x0000000000ff0000LL) >> 16 ); - buf[6] = uint8_t((cpp & 0x000000000000ff00LL) >> 8 ); - buf[7] = uint8_t((cpp & 0x00000000000000ffLL) ); - - store( file, code, MP4_ITMF_BT_INTEGER, buf, sizeof(buf) ); - } - else { - remove( file, code ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::storeString( MP4File& file, const string& code, const string& cpp, const char* c ) -{ - if( c ) - store( file, code, MP4_ITMF_BT_UTF8, cpp.c_str(), (uint32_t)cpp.size() ); - else - remove( file, code ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -Tags::updateArtworkShadow( MP4Tags*& tags ) -{ - if( tags->artwork ) { - delete[] tags->artwork; - tags->artwork = NULL; - tags->artworkCount = 0; - } - - if( artwork.empty() ) - return; - - MP4TagArtwork* const cartwork = new MP4TagArtwork[ artwork.size() ]; - uint32_t max = (uint32_t)artwork.size(); - - for( uint32_t i = 0; i < max; i++ ) { - MP4TagArtwork& a = cartwork[i]; - CoverArtBox::Item& item = artwork[i]; - - a.data = item.buffer; - a.size = item.size; - - switch( item.type ) { - case BT_BMP: - a.type = MP4_ART_BMP; - break; - - case BT_GIF: - a.type = MP4_ART_GIF; - break; - - case BT_JPEG: - a.type = MP4_ART_JPEG; - break; - - case BT_PNG: - a.type = MP4_ART_PNG; - break; - - default: - a.type = MP4_ART_UNDEFINED; - break; - } - } - - tags->artwork = cartwork; - tags->artworkCount = max; -} - -/////////////////////////////////////////////////////////////////////////////// - -const string Tags::CODE_NAME = "\xa9" "nam"; -const string Tags::CODE_ARTIST = "\xa9" "ART"; -const string Tags::CODE_ALBUMARTIST = "aART"; -const string Tags::CODE_ALBUM = "\xa9" "alb"; -const string Tags::CODE_GROUPING = "\xa9" "grp"; -const string Tags::CODE_COMPOSER = "\xa9" "wrt"; -const string Tags::CODE_COMMENTS = "\xa9" "cmt"; -const string Tags::CODE_GENRE = "\xa9" "gen"; -const string Tags::CODE_GENRETYPE = "gnre"; -const string Tags::CODE_RELEASEDATE = "\xa9" "day"; -const string Tags::CODE_TRACK = "trkn"; -const string Tags::CODE_DISK = "disk"; -const string Tags::CODE_TEMPO = "tmpo"; -const string Tags::CODE_COMPILATION = "cpil"; - -const string Tags::CODE_TVSHOW = "tvsh"; -const string Tags::CODE_TVNETWORK = "tvnn"; -const string Tags::CODE_TVEPISODEID = "tven"; -const string Tags::CODE_TVSEASON = "tvsn"; -const string Tags::CODE_TVEPISODE = "tves"; - -const string Tags::CODE_DESCRIPTION = "desc"; -const string Tags::CODE_LONGDESCRIPTION = "ldes"; -const string Tags::CODE_LYRICS = "\xa9" "lyr"; - -const string Tags::CODE_SORTNAME = "sonm"; -const string Tags::CODE_SORTARTIST = "soar"; -const string Tags::CODE_SORTALBUMARTIST = "soaa"; -const string Tags::CODE_SORTALBUM = "soal"; -const string Tags::CODE_SORTCOMPOSER = "soco"; -const string Tags::CODE_SORTTVSHOW = "sosn"; - -const string Tags::CODE_COPYRIGHT = "cprt"; -const string Tags::CODE_ENCODINGTOOL = "\xa9" "too"; -const string Tags::CODE_ENCODEDBY = "\xa9" "enc"; -const string Tags::CODE_PURCHASEDATE = "purd"; - -const string Tags::CODE_PODCAST = "pcst"; -const string Tags::CODE_KEYWORDS = "keyw"; -const string Tags::CODE_CATEGORY = "catg"; - -const string Tags::CODE_HDVIDEO = "hdvd"; -const string Tags::CODE_MEDIATYPE = "stik"; -const string Tags::CODE_CONTENTRATING = "rtng"; -const string Tags::CODE_GAPLESS = "pgap"; - -const string Tags::CODE_ITUNESACCOUNT = "apID"; -const string Tags::CODE_ITUNESACCOUNTTYPE = "akID"; -const string Tags::CODE_ITUNESCOUNTRY = "sfID"; -const string Tags::CODE_CONTENTID = "cnID"; -const string Tags::CODE_ARTISTID = "atID"; -const string Tags::CODE_PLAYLISTID = "plID"; -const string Tags::CODE_GENREID = "geID"; -const string Tags::CODE_COMPOSERID = "cmID"; -const string Tags::CODE_XID = "xid "; - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::itmf diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/Tags.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/Tags.h deleted file mode 100644 index 57ef82cb..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/Tags.h +++ /dev/null @@ -1,210 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// Portions created by David Byron are Copyright (C) 2011. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@gmail.com -// Rouven Wessling, mp4v2@rouvenwessling.de -// David Byron, dbyron@dbyron.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_ITMF_TAGS_H -#define MP4V2_IMPL_ITMF_TAGS_H - -namespace mp4v2 { namespace impl { namespace itmf { - -/////////////////////////////////////////////////////////////////////////////// - -class Tags -{ -public: - static const string CODE_NAME; - static const string CODE_ARTIST; - static const string CODE_ALBUMARTIST; - static const string CODE_ALBUM; - static const string CODE_GROUPING; - static const string CODE_COMPOSER; - static const string CODE_COMMENTS; - static const string CODE_GENRE; - static const string CODE_GENRETYPE; - static const string CODE_RELEASEDATE; - static const string CODE_TRACK; - static const string CODE_DISK; - static const string CODE_TEMPO; - static const string CODE_COMPILATION; - - static const string CODE_TVSHOW; - static const string CODE_TVNETWORK; - static const string CODE_TVEPISODEID; - static const string CODE_TVSEASON; - static const string CODE_TVEPISODE; - - static const string CODE_DESCRIPTION; - static const string CODE_LONGDESCRIPTION; - static const string CODE_LYRICS; - - static const string CODE_SORTNAME; - static const string CODE_SORTARTIST; - static const string CODE_SORTALBUMARTIST; - static const string CODE_SORTALBUM; - static const string CODE_SORTCOMPOSER; - static const string CODE_SORTTVSHOW; - - static const string CODE_COPYRIGHT; - static const string CODE_ENCODINGTOOL; - static const string CODE_ENCODEDBY; - static const string CODE_PURCHASEDATE; - - static const string CODE_PODCAST; - static const string CODE_KEYWORDS; - static const string CODE_CATEGORY; - - static const string CODE_HDVIDEO; - static const string CODE_MEDIATYPE; - static const string CODE_CONTENTRATING; - static const string CODE_GAPLESS; - - static const string CODE_ITUNESACCOUNT; - static const string CODE_ITUNESACCOUNTTYPE; - static const string CODE_ITUNESCOUNTRY; - static const string CODE_CONTENTID; - static const string CODE_ARTISTID; - static const string CODE_PLAYLISTID; - static const string CODE_GENREID; - static const string CODE_COMPOSERID; - static const string CODE_XID; - -public: - string name; - string artist; - string albumArtist; - string album; - string grouping; - string composer; - string comments; - string genre; - uint16_t genreType; - string releaseDate; - MP4TagTrack track; - MP4TagDisk disk; - uint16_t tempo; - uint8_t compilation; - - string tvShow; - string tvEpisodeID; - uint32_t tvSeason; - uint32_t tvEpisode; - string tvNetwork; - - string description; - string longDescription; - string lyrics; - - string sortName; - string sortArtist; - string sortAlbumArtist; - string sortAlbum; - string sortComposer; - string sortTVShow; - - CoverArtBox::ItemList artwork; - - string copyright; - string encodingTool; - string encodedBy; - string purchaseDate; - - uint8_t podcast; - string keywords; - string category; - - uint8_t hdVideo; - uint8_t mediaType; - uint8_t contentRating; - uint8_t gapless; - - string iTunesAccount; - uint8_t iTunesAccountType; - uint32_t iTunesCountry; - uint32_t contentID; - uint32_t artistID; - uint64_t playlistID; - uint32_t genreID; - uint32_t composerID; - string xid; - - bool hasMetadata; - -public: - Tags(); - ~Tags(); - - void c_alloc ( MP4Tags*& ); - void c_fetch ( MP4Tags*&, MP4FileHandle ); - void c_store ( MP4Tags*&, MP4FileHandle ); - void c_free ( MP4Tags*& ); - - void c_addArtwork ( MP4Tags*&, MP4TagArtwork& ); - void c_setArtwork ( MP4Tags*&, uint32_t, MP4TagArtwork& ); - void c_removeArtwork ( MP4Tags*&, uint32_t ); - - void c_setString ( const char*, string&, const char*& ); - void c_setInteger ( const uint8_t*, uint8_t&, const uint8_t*& ); - void c_setInteger ( const uint16_t*, uint16_t&, const uint16_t*& ); - void c_setInteger ( const uint32_t*, uint32_t&, const uint32_t*& ); - void c_setInteger ( const uint64_t*, uint64_t&, const uint64_t*& ); - - void c_setTrack ( const MP4TagTrack*, MP4TagTrack&, const MP4TagTrack*& ); - void c_setDisk ( const MP4TagDisk*, MP4TagDisk&, const MP4TagDisk*& ); - -private: - typedef map CodeItemMap; - -private: - void fetchString ( const CodeItemMap&, const string&, string&, const char*& ); - void fetchInteger ( const CodeItemMap&, const string&, uint8_t&, const uint8_t*& ); - void fetchInteger ( const CodeItemMap&, const string&, uint16_t&, const uint16_t*& ); - void fetchInteger ( const CodeItemMap&, const string&, uint32_t&, const uint32_t*& ); - void fetchInteger ( const CodeItemMap&, const string&, uint64_t&, const uint64_t*& ); - - void fetchGenre ( const CodeItemMap&, uint16_t&, const uint16_t*& ); - void fetchTrack ( const CodeItemMap&, MP4TagTrack&, const MP4TagTrack*& ); - void fetchDisk ( const CodeItemMap&, MP4TagDisk&, const MP4TagDisk*& ); - - void storeString ( MP4File&, const string&, const string&, const char* ); - void storeInteger ( MP4File&, const string&, uint8_t, const uint8_t* ); - void storeInteger ( MP4File&, const string&, uint16_t, const uint16_t* ); - void storeInteger ( MP4File&, const string&, uint32_t, const uint32_t* ); - void storeInteger ( MP4File&, const string&, uint64_t, const uint64_t* ); - - void storeGenre ( MP4File&, uint16_t, const uint16_t* ); - void storeTrack ( MP4File&, const MP4TagTrack&, const MP4TagTrack* ); - void storeDisk ( MP4File&, const MP4TagDisk&, const MP4TagDisk* ); - - void remove ( MP4File&, const string& ); - void store ( MP4File&, const string&, MP4ItmfBasicType, const void*, uint32_t ); - - void updateArtworkShadow( MP4Tags*& ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::itmf - -#endif // MP4V2_IMPL_ITMF_TAGS_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/generic.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/generic.cpp deleted file mode 100644 index 184cd74b..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/generic.cpp +++ /dev/null @@ -1,476 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "impl.h" - -namespace mp4v2 { namespace impl { namespace itmf { namespace { - -/////////////////////////////////////////////////////////////////////////////// - -void -__dataInit( MP4ItmfData& data ) -{ - data.typeSetIdentifier = 0; - data.typeCode = MP4_ITMF_BT_IMPLICIT; - data.locale = 0; - data.value = NULL; - data.valueSize = 0; -} - -void -__dataClear( MP4ItmfData& data ) -{ - if( data.value ) - free( data.value ); - __dataInit( data ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -__dataListInit( MP4ItmfDataList& list ) -{ - list.elements = NULL; - list.size = 0; -} - -void -__dataListClear( MP4ItmfDataList& list ) -{ - if( list.elements ) { - for( uint32_t i = 0; i < list.size; i++ ) - __dataClear( list.elements[i] ); - free( list.elements ); - } - - __dataListInit( list ); -} - -void -__dataListResize( MP4ItmfDataList& list, uint32_t size ) -{ - __dataListClear( list ); - - list.elements = (MP4ItmfData*)malloc( sizeof( MP4ItmfData ) * size ); - list.size = size; - - for( uint32_t i = 0; i < size; i++ ) - __dataInit( list.elements[i] ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -__itemInit( MP4ItmfItem& item ) -{ - item.__handle = NULL; - item.code = NULL; - item.mean = NULL; - item.name = NULL; - - __dataListInit( item.dataList ); -} - -void -__itemClear( MP4ItmfItem& item ) -{ - if( item.code ) - free( item.code ); - if( item.mean ) - free( item.mean ); - if( item.name ) - free( item.name ); - - __dataListClear( item.dataList ); - __itemInit( item ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -__itemListInit( MP4ItmfItemList& list ) -{ - list.elements = NULL; - list.size = 0; -} - -void -__itemListClear( MP4ItmfItemList& list ) -{ - if( list.elements ) { - for( uint32_t i = 0; i < list.size; i++ ) - __itemClear( list.elements[i] ); - free( list.elements ); - } - - __itemListInit( list ); -} - -void -__itemListResize( MP4ItmfItemList& list, uint32_t size ) -{ - __itemListClear( list ); - if( !size ) - return; - - list.elements = (MP4ItmfItem*)malloc( sizeof( MP4ItmfItem ) * size ); - list.size = size; - - for( uint32_t i = 0; i < size; i++ ) - __itemInit( list.elements[i] ); -} - -MP4ItmfItemList* -__itemListAlloc() -{ - MP4ItmfItemList& list = *(MP4ItmfItemList*)malloc( sizeof( MP4ItmfItemList )); - __itemListInit( list ); - return &list; -} - -/////////////////////////////////////////////////////////////////////////////// - -static bool -__itemAtomToModel( MP4ItemAtom& item_atom, MP4ItmfItem& model ) -{ - __itemClear( model ); - model.__handle = &item_atom; - model.code = strdup( item_atom.GetType() ); - - // handle special meaning atom - if( ATOMID( item_atom.GetType() ) == ATOMID( "----" )) { - // meaning is mandatory - MP4MeanAtom* mean = (MP4MeanAtom*)item_atom.FindAtom( "----.mean" ); - if( !mean ) - return true; - - // copy atom UTF-8 value (not NULL-terminated) to model (NULL-terminated) - model.mean = mean->value.GetValueStringAlloc(); - - // name is optional - MP4NameAtom* name = (MP4NameAtom*)item_atom.FindAtom( "----.name" ); - if( name ) { - // copy atom UTF-8 value (not NULL-terminated) to model (NULL-terminated) - model.name = name->value.GetValueStringAlloc(); - } - } - - // pass 1: count data atoms - const uint32_t childCount = item_atom.GetNumberOfChildAtoms(); - uint32_t dataCount = 0; - for( uint32_t i = 0; i < childCount; i++ ) { - if( ATOMID( item_atom.GetChildAtom( i )->GetType() ) != ATOMID( "data" )) - continue; - dataCount++; - } - - // one or more data atoms is mandatory - if( dataCount < 1 ) - return true; - - __dataListResize( model.dataList, dataCount ); - - // pass 2: populate data model - for( uint32_t i = 0, idata = 0; i < childCount; i++ ) { - MP4Atom* atom = item_atom.GetChildAtom( i ); - if( ATOMID( atom->GetType() ) != ATOMID( "data" )) - continue; - - MP4DataAtom& data_atom = *(MP4DataAtom*)atom; - MP4ItmfData& data_model = model.dataList.elements[idata]; - - data_model.typeSetIdentifier = data_atom.typeSetIdentifier.GetValue(); - data_model.typeCode = (MP4ItmfBasicType)data_atom.typeCode.GetValue(); - data_model.locale = data_atom.locale.GetValue(); - - data_atom.metadata.GetValue( &data_model.value, &data_model.valueSize ); - idata++; - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -static bool -__itemModelToAtom( const MP4ItmfItem& model, MP4ItemAtom& atom ) -{ - if( ATOMID( atom.GetType() ) == ATOMID( "----" )) { - ASSERT( model.mean ); // mandatory - MP4MeanAtom& meanAtom = *(MP4MeanAtom*)MP4Atom::CreateAtom( atom.GetFile(), &atom, "mean" ); - atom.AddChildAtom( &meanAtom ); - meanAtom.value.SetValue( (const uint8_t*)model.mean, (uint32_t)strlen( model.mean )); - - if( model.name ) { - MP4NameAtom& nameAtom = *(MP4NameAtom*)MP4Atom::CreateAtom( atom.GetFile(), &atom, "name" ); - atom.AddChildAtom( &nameAtom ); - nameAtom.value.SetValue( (const uint8_t*)model.name, (uint32_t)strlen( model.name )); - } - } - - for( uint32_t i = 0; i < model.dataList.size; i++ ) { - MP4ItmfData& dataModel = model.dataList.elements[i]; - MP4DataAtom& dataAtom = *(MP4DataAtom*)MP4Atom::CreateAtom( atom.GetFile(), &atom, "data" ); - atom.AddChildAtom( &dataAtom ); - - dataAtom.typeSetIdentifier.SetValue( dataModel.typeSetIdentifier ); - dataAtom.typeCode.SetValue( (itmf::BasicType)dataModel.typeCode ); - dataAtom.locale.SetValue( dataModel.locale ); - dataAtom.metadata.SetValue( dataModel.value, dataModel.valueSize ); - } - - return true; -} - -/////////////////////////////////////////////////////////////////////////////// - -} // namespace anonymous - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItmfItem* -genericItemAlloc( const string& code, uint32_t numData ) -{ - MP4ItmfItem* item = (MP4ItmfItem*)malloc( sizeof( MP4ItmfItem )); - if( !item ) - return NULL; - - __itemInit( *item ); - item->code = strdup( code.c_str() ); - - // always create array size of 1 - __dataListResize( item->dataList, numData ); - - return item; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -genericItemFree( MP4ItmfItem* item ) -{ - if( !item ) - return; - - __itemClear( *item ); - free( item ); -} - -/////////////////////////////////////////////////////////////////////////////// - -void -genericItemListFree( MP4ItmfItemList* list ) -{ - if( !list ) - return; - - __itemListClear( *list ); - free( list ); -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItmfItemList* -genericGetItems( MP4File& file ) -{ - MP4Atom* ilst = file.FindAtom( "moov.udta.meta.ilst" ); - if( !ilst ) - return __itemListAlloc(); - - const uint32_t itemCount = ilst->GetNumberOfChildAtoms(); - if( itemCount < 1 ) - return __itemListAlloc(); - - MP4ItmfItemList& list = *__itemListAlloc(); - __itemListResize( list, itemCount ); - - for( uint32_t i = 0; i < list.size; i++ ) - __itemAtomToModel( *(MP4ItemAtom*)ilst->GetChildAtom( i ), list.elements[i] ); - - return &list; -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItmfItemList* -genericGetItemsByCode( MP4File& file, const string& code ) -{ - MP4Atom* ilst = file.FindAtom( "moov.udta.meta.ilst" ); - if( !ilst ) - return __itemListAlloc(); - - // pass 1: filter by code and populate indexList - const uint32_t childCount = ilst->GetNumberOfChildAtoms(); - vector indexList; - for( uint32_t i = 0; i < childCount; i++ ) { - if( ATOMID( ilst->GetChildAtom( i )->GetType() ) != ATOMID( code.c_str() )) - continue; - indexList.push_back( i ); - } - - if( indexList.size() < 1 ) - return __itemListAlloc(); - - MP4ItmfItemList& list = *__itemListAlloc(); - __itemListResize( list, (uint32_t)indexList.size() ); - - // pass 2: process each atom - const vector::size_type max = indexList.size(); - for( vector::size_type i = 0; i < max; i++ ) { - uint32_t& aidx = indexList[i]; - __itemAtomToModel( *(MP4ItemAtom*)ilst->GetChildAtom( aidx ), list.elements[i] ); - } - - return &list; -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItmfItemList* -genericGetItemsByMeaning( MP4File& file, const string& meaning, const string& name ) -{ - MP4Atom* ilst = file.FindAtom( "moov.udta.meta.ilst" ); - if( !ilst ) - return __itemListAlloc(); - - // pass 1: filter by code and populate indexList - const uint32_t childCount = ilst->GetNumberOfChildAtoms(); - vector indexList; - for( uint32_t i = 0; i < childCount; i++ ) { - MP4Atom& atom = *ilst->GetChildAtom( i ); - if( ATOMID( atom.GetType() ) != ATOMID( "----" )) - continue; - - // filter-out meaning mismatch - MP4MeanAtom* meanAtom = (MP4MeanAtom*)atom.FindAtom( "----.mean" ); - if( !meanAtom ) - continue; - if( meanAtom->value.CompareToString( meaning )) - continue; - - if( !name.empty() ) { - // filter-out name mismatch - MP4MeanAtom* nameAtom = (MP4MeanAtom*)atom.FindAtom( "----.name" ); - if( !nameAtom ) - continue; - if( nameAtom->value.CompareToString( name )) - continue; - } - - indexList.push_back( i ); - } - - if( indexList.size() < 1 ) - return __itemListAlloc(); - - MP4ItmfItemList& list = *__itemListAlloc(); - __itemListResize( list, (uint32_t)indexList.size() ); - - // pass 2: process each atom - const vector::size_type max = indexList.size(); - for( vector::size_type i = 0; i < max; i++ ) { - uint32_t& aidx = indexList[i]; - __itemAtomToModel( *(MP4ItemAtom*)ilst->GetChildAtom( aidx ), list.elements[i] ); - } - - return &list; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -genericAddItem( MP4File& file, const MP4ItmfItem* item ) -{ - if( !item ) - return false; - - MP4Atom* ilst = file.FindAtom( "moov.udta.meta.ilst" ); - if( !ilst ) { - file.AddDescendantAtoms( "moov", "udta.meta.ilst" ); - ilst = file.FindAtom( "moov.udta.meta.ilst" ); - ASSERT( ilst ); - } - - MP4ItemAtom& itemAtom = *(MP4ItemAtom*)MP4Atom::CreateAtom( file, ilst, item->code ); - ilst->AddChildAtom( &itemAtom ); - - return __itemModelToAtom( *item, itemAtom ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -genericSetItem( MP4File& file, const MP4ItmfItem* item ) -{ - if( !item || !item->__handle ) - return false; - - MP4Atom* ilst = file.FindAtom( "moov.udta.meta.ilst" ); - if( !ilst ) - return false; - - MP4ItemAtom* const old = static_cast(item->__handle); - const uint32_t childCount = ilst->GetNumberOfChildAtoms(); - uint32_t fidx = numeric_limits::max(); - for( uint32_t i = 0; i < childCount; i++ ) { - MP4Atom* atom = ilst->GetChildAtom( i ); - if( atom == old ) { - fidx = i; - break; - } - } - - if( fidx == numeric_limits::max() ) - return false; - - ilst->DeleteChildAtom( old ); - delete old; - - MP4ItemAtom& itemAtom = *(MP4ItemAtom*)MP4Atom::CreateAtom( file, ilst, item->code ); - ilst->InsertChildAtom( &itemAtom, fidx ); - - return __itemModelToAtom( *item, itemAtom ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -genericRemoveItem( MP4File& file, const MP4ItmfItem* item ) -{ - if( !item || !item->__handle ) - return false; - - MP4Atom* ilst = file.FindAtom( "moov.udta.meta.ilst" ); - if( !ilst ) - return false; - - MP4ItemAtom* const old = static_cast(item->__handle); - ilst->DeleteChildAtom( old ); - delete old; - - return true; -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::itmf diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/generic.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/generic.h deleted file mode 100644 index 9edc7eb6..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/generic.h +++ /dev/null @@ -1,66 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// KonaBlend, kona8lend@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_ITMF_GENERIC_H -#define MP4V2_IMPL_ITMF_GENERIC_H - -namespace mp4v2 { namespace impl { namespace itmf { - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItmfItem* -genericItemAlloc( const string& code, uint32_t numData ); - -void -genericItemFree( MP4ItmfItem* item ); - -void -genericItemListFree( MP4ItmfItemList* list ); - -/////////////////////////////////////////////////////////////////////////////// - -MP4ItmfItemList* -genericGetItems( MP4File& file ); - -MP4ItmfItemList* -genericGetItemsByCode( MP4File& file, const string& code ); - -MP4ItmfItemList* -genericGetItemsByMeaning( MP4File& file, const string& meaning, const string& name ); - -/////////////////////////////////////////////////////////////////////////////// - -bool -genericAddItem( MP4File& file, const MP4ItmfItem* item ); - -bool -genericSetItem( MP4File& file, const MP4ItmfItem* item ); - -bool -genericRemoveItem( MP4File& file, const MP4ItmfItem* item ); - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::itmf - -#endif // MP4V2_IMPL_ITMF_GENERIC_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/impl.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/impl.h deleted file mode 100644 index 9c7eb44f..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/impl.h +++ /dev/null @@ -1,34 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_ITMF_IMPL_H -#define MP4V2_IMPL_ITMF_IMPL_H - -/////////////////////////////////////////////////////////////////////////////// - -#include "src/impl.h" -#include "itmf.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_IMPL_ITMF_IMPL_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/itmf.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/itmf.h deleted file mode 100644 index cad38ed0..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/itmf.h +++ /dev/null @@ -1,45 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_ITMF_ITMF_H -#define MP4V2_IMPL_ITMF_ITMF_H - -/// @namespace mp4v2::impl::itmf (private) iTunes Metadata Format. -/// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. -/// -/// This namespace implements some features that are specified by the -/// iTunes Metadata Format Specification, revision 2008-04-16. -/// -namespace mp4v2 { namespace impl { namespace itmf { - ; -}}} - -/////////////////////////////////////////////////////////////////////////////// - -#include "CoverArtBox.h" -#include "Tags.h" -#include "generic.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_IMPL_ITMF_ITMF_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/type.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/type.cpp deleted file mode 100644 index 44254f8d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/type.cpp +++ /dev/null @@ -1,314 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// Rouven Wessling, mp4v2@rouvenwessling.de -// -/////////////////////////////////////////////////////////////////////////////// - -#include "impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -template <> -const itmf::EnumBasicType::Entry itmf::EnumBasicType::data[] = { - { mp4v2::impl::itmf::BT_IMPLICIT, "implicit", "implicit" }, - { mp4v2::impl::itmf::BT_UTF8, "utf8", "UTF-8" }, - { mp4v2::impl::itmf::BT_UTF16, "utf16", "UTF-16" }, - { mp4v2::impl::itmf::BT_SJIS, "sjis", "S/JIS" }, - { mp4v2::impl::itmf::BT_HTML, "html", "HTML" }, - { mp4v2::impl::itmf::BT_XML, "xml", "XML" }, - { mp4v2::impl::itmf::BT_UUID, "uuid", "UUID" }, - { mp4v2::impl::itmf::BT_ISRC, "isrc", "ISRC" }, - { mp4v2::impl::itmf::BT_MI3P, "mi3p", "MI3P" }, - { mp4v2::impl::itmf::BT_GIF, "gif", "GIF" }, - { mp4v2::impl::itmf::BT_JPEG, "jpeg", "JPEG" }, - { mp4v2::impl::itmf::BT_PNG, "png", "PNG" }, - { mp4v2::impl::itmf::BT_URL, "url", "URL" }, - { mp4v2::impl::itmf::BT_DURATION, "duration", "duration" }, - { mp4v2::impl::itmf::BT_DATETIME, "datetime", "date/time" }, - { mp4v2::impl::itmf::BT_GENRES, "genres", "genres" }, - { mp4v2::impl::itmf::BT_INTEGER, "integer", "integer" }, - { mp4v2::impl::itmf::BT_RIAA_PA, "riaapa", "RIAA-PA" }, - { mp4v2::impl::itmf::BT_UPC, "upc", "UPC" }, - { mp4v2::impl::itmf::BT_BMP, "bmp", "BMP" }, - - { mp4v2::impl::itmf::BT_UNDEFINED } // must be last -}; - -/////////////////////////////////////////////////////////////////////////////// - -template <> -const itmf::EnumGenreType::Entry itmf::EnumGenreType::data[] = { - { mp4v2::impl::itmf::GENRE_BLUES, "blues", "Blues" }, - { mp4v2::impl::itmf::GENRE_CLASSIC_ROCK, "classicrock", "Classic Rock" }, - { mp4v2::impl::itmf::GENRE_COUNTRY, "country", "Country" }, - { mp4v2::impl::itmf::GENRE_DANCE, "dance", "Dance" }, - { mp4v2::impl::itmf::GENRE_DISCO, "disco", "Disco" }, - { mp4v2::impl::itmf::GENRE_FUNK, "funk", "Funk" }, - { mp4v2::impl::itmf::GENRE_GRUNGE, "grunge", "Grunge" }, - { mp4v2::impl::itmf::GENRE_HIP_HOP, "hiphop", "Hop-Hop" }, - { mp4v2::impl::itmf::GENRE_JAZZ, "jazz", "Jazz" }, - { mp4v2::impl::itmf::GENRE_METAL, "metal", "Metal" }, - { mp4v2::impl::itmf::GENRE_NEW_AGE, "newage", "New Age" }, - { mp4v2::impl::itmf::GENRE_OLDIES, "oldies", "Oldies" }, - { mp4v2::impl::itmf::GENRE_OTHER, "other", "Other" }, - { mp4v2::impl::itmf::GENRE_POP, "pop", "Pop" }, - { mp4v2::impl::itmf::GENRE_R_AND_B, "rand_b", "R&B" }, - { mp4v2::impl::itmf::GENRE_RAP, "rap", "Rap" }, - { mp4v2::impl::itmf::GENRE_REGGAE, "reggae", "Reggae" }, - { mp4v2::impl::itmf::GENRE_ROCK, "rock", "Rock" }, - { mp4v2::impl::itmf::GENRE_TECHNO, "techno", "Techno" }, - { mp4v2::impl::itmf::GENRE_INDUSTRIAL, "industrial", "Industrial" }, - { mp4v2::impl::itmf::GENRE_ALTERNATIVE, "alternative", "Alternative" }, - { mp4v2::impl::itmf::GENRE_SKA, "ska", "Ska" }, - { mp4v2::impl::itmf::GENRE_DEATH_METAL, "deathmetal", "Death Metal" }, - { mp4v2::impl::itmf::GENRE_PRANKS, "pranks", "Pranks" }, - { mp4v2::impl::itmf::GENRE_SOUNDTRACK, "soundtrack", "Soundtrack" }, - { mp4v2::impl::itmf::GENRE_EURO_TECHNO, "eurotechno", "Euro-Techno" }, - { mp4v2::impl::itmf::GENRE_AMBIENT, "ambient", "Ambient" }, - { mp4v2::impl::itmf::GENRE_TRIP_HOP, "triphop", "Trip-Hop" }, - { mp4v2::impl::itmf::GENRE_VOCAL, "vocal", "Vocal" }, - { mp4v2::impl::itmf::GENRE_JAZZ_FUNK, "jazzfunk", "Jazz+Funk" }, - { mp4v2::impl::itmf::GENRE_FUSION, "fusion", "Fusion" }, - { mp4v2::impl::itmf::GENRE_TRANCE, "trance", "Trance" }, - { mp4v2::impl::itmf::GENRE_CLASSICAL, "classical", "Classical" }, - { mp4v2::impl::itmf::GENRE_INSTRUMENTAL, "instrumental", "Instrumental" }, - { mp4v2::impl::itmf::GENRE_ACID, "acid", "Acid" }, - { mp4v2::impl::itmf::GENRE_HOUSE, "house", "House" }, - { mp4v2::impl::itmf::GENRE_GAME, "game", "Game" }, - { mp4v2::impl::itmf::GENRE_SOUND_CLIP, "soundclip", "Sound Clip" }, - { mp4v2::impl::itmf::GENRE_GOSPEL, "gospel", "Gospel" }, - { mp4v2::impl::itmf::GENRE_NOISE, "noise", "Noise" }, - { mp4v2::impl::itmf::GENRE_ALTERNROCK, "alternrock", "AlternRock" }, - { mp4v2::impl::itmf::GENRE_BASS, "bass", "Bass" }, - { mp4v2::impl::itmf::GENRE_SOUL, "soul", "Soul" }, - { mp4v2::impl::itmf::GENRE_PUNK, "punk", "Punk" }, - { mp4v2::impl::itmf::GENRE_SPACE, "space", "Space" }, - { mp4v2::impl::itmf::GENRE_MEDITATIVE, "meditative", "Meditative" }, - { mp4v2::impl::itmf::GENRE_INSTRUMENTAL_POP, "instrumentalpop", "Instrumental Pop" }, - { mp4v2::impl::itmf::GENRE_INSTRUMENTAL_ROCK, "instrumentalrock", "Instrumental Rock" }, - { mp4v2::impl::itmf::GENRE_ETHNIC, "ethnic", "Ethnic" }, - { mp4v2::impl::itmf::GENRE_GOTHIC, "gothic", "Gothic" }, - { mp4v2::impl::itmf::GENRE_DARKWAVE, "darkwave", "Darkwave" }, - { mp4v2::impl::itmf::GENRE_TECHNO_INDUSTRIAL, "technoindustrial", "Techno-Industrial" }, - { mp4v2::impl::itmf::GENRE_ELECTRONIC, "electronic", "Electronic" }, - { mp4v2::impl::itmf::GENRE_POP_FOLK, "popfolk", "Pop-Folk" }, - { mp4v2::impl::itmf::GENRE_EURODANCE, "eurodance", "Eurodance" }, - { mp4v2::impl::itmf::GENRE_DREAM, "dream", "Dream" }, - { mp4v2::impl::itmf::GENRE_SOUTHERN_ROCK, "southernrock", "Southern Rock" }, - { mp4v2::impl::itmf::GENRE_COMEDY, "comedy", "Comedy" }, - { mp4v2::impl::itmf::GENRE_CULT, "cult", "Cult" }, - { mp4v2::impl::itmf::GENRE_GANGSTA, "gangsta", "Gangsta" }, - { mp4v2::impl::itmf::GENRE_TOP_40, "top40", "Top 40" }, - { mp4v2::impl::itmf::GENRE_CHRISTIAN_RAP, "christianrap", "Christian Rap" }, - { mp4v2::impl::itmf::GENRE_POP_FUNK, "popfunk", "Pop/Funk" }, - { mp4v2::impl::itmf::GENRE_JUNGLE, "jungle", "Jungle" }, - { mp4v2::impl::itmf::GENRE_NATIVE_AMERICAN, "nativeamerican", "Native American" }, - { mp4v2::impl::itmf::GENRE_CABARET, "cabaret", "Cabaret" }, - { mp4v2::impl::itmf::GENRE_NEW_WAVE, "newwave", "New Wave" }, - { mp4v2::impl::itmf::GENRE_PSYCHEDELIC, "psychedelic", "Psychedelic" }, - { mp4v2::impl::itmf::GENRE_RAVE, "rave", "Rave" }, - { mp4v2::impl::itmf::GENRE_SHOWTUNES, "showtunes", "Showtunes" }, - { mp4v2::impl::itmf::GENRE_TRAILER, "trailer", "Trailer" }, - { mp4v2::impl::itmf::GENRE_LO_FI, "lofi", "Lo-Fi" }, - { mp4v2::impl::itmf::GENRE_TRIBAL, "tribal", "Tribal" }, - { mp4v2::impl::itmf::GENRE_ACID_PUNK, "acidpunk", "Acid Punk" }, - { mp4v2::impl::itmf::GENRE_ACID_JAZZ, "acidjazz", "Acid Jazz" }, - { mp4v2::impl::itmf::GENRE_POLKA, "polka", "Polka" }, - { mp4v2::impl::itmf::GENRE_RETRO, "retro", "Retro" }, - { mp4v2::impl::itmf::GENRE_MUSICAL, "musical", "Musical" }, - { mp4v2::impl::itmf::GENRE_ROCK_AND_ROLL, "rockand_roll", "Rock & Roll" }, - - { mp4v2::impl::itmf::GENRE_HARD_ROCK, "hardrock", "Hard Rock" }, - { mp4v2::impl::itmf::GENRE_FOLK, "folk", "Folk" }, - { mp4v2::impl::itmf::GENRE_FOLK_ROCK, "folkrock", "Folk-Rock" }, - { mp4v2::impl::itmf::GENRE_NATIONAL_FOLK, "nationalfolk", "National Folk" }, - { mp4v2::impl::itmf::GENRE_SWING, "swing", "Swing" }, - { mp4v2::impl::itmf::GENRE_FAST_FUSION, "fastfusion", "Fast Fusion" }, - { mp4v2::impl::itmf::GENRE_BEBOB, "bebob", "Bebob" }, - { mp4v2::impl::itmf::GENRE_LATIN, "latin", "Latin" }, - { mp4v2::impl::itmf::GENRE_REVIVAL, "revival", "Revival" }, - { mp4v2::impl::itmf::GENRE_CELTIC, "celtic", "Celtic" }, - { mp4v2::impl::itmf::GENRE_BLUEGRASS, "bluegrass", "Bluegrass" }, - { mp4v2::impl::itmf::GENRE_AVANTGARDE, "avantgarde", "Avantgarde" }, - { mp4v2::impl::itmf::GENRE_GOTHIC_ROCK, "gothicrock", "Gothic Rock" }, - { mp4v2::impl::itmf::GENRE_PROGRESSIVE_ROCK, "progressiverock", "Progresive Rock" }, - { mp4v2::impl::itmf::GENRE_PSYCHEDELIC_ROCK, "psychedelicrock", "Psychedelic Rock" }, - { mp4v2::impl::itmf::GENRE_SYMPHONIC_ROCK, "symphonicrock", "SYMPHONIC_ROCK" }, - { mp4v2::impl::itmf::GENRE_SLOW_ROCK, "slowrock", "Slow Rock" }, - { mp4v2::impl::itmf::GENRE_BIG_BAND, "bigband", "Big Band" }, - { mp4v2::impl::itmf::GENRE_CHORUS, "chorus", "Chorus" }, - { mp4v2::impl::itmf::GENRE_EASY_LISTENING, "easylistening", "Easy Listening" }, - { mp4v2::impl::itmf::GENRE_ACOUSTIC, "acoustic", "Acoustic" }, - { mp4v2::impl::itmf::GENRE_HUMOUR, "humour", "Humor" }, - { mp4v2::impl::itmf::GENRE_SPEECH, "speech", "Speech" }, - { mp4v2::impl::itmf::GENRE_CHANSON, "chanson", "Chason" }, - { mp4v2::impl::itmf::GENRE_OPERA, "opera", "Opera" }, - { mp4v2::impl::itmf::GENRE_CHAMBER_MUSIC, "chambermusic", "Chamber Music" }, - { mp4v2::impl::itmf::GENRE_SONATA, "sonata", "Sonata" }, - { mp4v2::impl::itmf::GENRE_SYMPHONY, "symphony", "Symphony" }, - { mp4v2::impl::itmf::GENRE_BOOTY_BASS, "bootybass", "Booty Bass" }, - { mp4v2::impl::itmf::GENRE_PRIMUS, "primus", "Primus" }, - { mp4v2::impl::itmf::GENRE_PORN_GROOVE, "porngroove", "Porn Groove" }, - { mp4v2::impl::itmf::GENRE_SATIRE, "satire", "Satire" }, - { mp4v2::impl::itmf::GENRE_SLOW_JAM, "slowjam", "Slow Jam" }, - { mp4v2::impl::itmf::GENRE_CLUB, "club", "Club" }, - { mp4v2::impl::itmf::GENRE_TANGO, "tango", "Tango" }, - { mp4v2::impl::itmf::GENRE_SAMBA, "samba", "Samba" }, - { mp4v2::impl::itmf::GENRE_FOLKLORE, "folklore", "Folklore" }, - { mp4v2::impl::itmf::GENRE_BALLAD, "ballad", "Ballad" }, - { mp4v2::impl::itmf::GENRE_POWER_BALLAD, "powerballad", "Power Ballad" }, - { mp4v2::impl::itmf::GENRE_RHYTHMIC_SOUL, "rhythmicsoul", "Rhythmic Soul" }, - { mp4v2::impl::itmf::GENRE_FREESTYLE, "freestyle", "Freestyle" }, - { mp4v2::impl::itmf::GENRE_DUET, "duet", "Duet" }, - { mp4v2::impl::itmf::GENRE_PUNK_ROCK, "punkrock", "Punk Rock" }, - { mp4v2::impl::itmf::GENRE_DRUM_SOLO, "drumsolo", "Drum Solo" }, - { mp4v2::impl::itmf::GENRE_A_CAPELLA, "acapella", "A capella" }, - { mp4v2::impl::itmf::GENRE_EURO_HOUSE, "eurohouse", "Euro-House" }, - { mp4v2::impl::itmf::GENRE_DANCE_HALL, "dancehall", "Dance Hall" }, - { mp4v2::impl::itmf::GENRE_NONE, "none", "none" }, - - { mp4v2::impl::itmf::GENRE_UNDEFINED } // must be last -}; - -/////////////////////////////////////////////////////////////////////////////// - -template <> -const itmf::EnumStikType::Entry itmf::EnumStikType::data[] = { - { mp4v2::impl::itmf::STIK_OLD_MOVIE, "oldmovie", "Movie" }, - { mp4v2::impl::itmf::STIK_NORMAL, "normal", "Normal" }, - { mp4v2::impl::itmf::STIK_AUDIOBOOK, "audiobook", "Audio Book" }, - { mp4v2::impl::itmf::STIK_MUSIC_VIDEO, "musicvideo", "Music Video" }, - { mp4v2::impl::itmf::STIK_MOVIE, "movie", "Movie" }, - { mp4v2::impl::itmf::STIK_TV_SHOW, "tvshow", "TV Show" }, - { mp4v2::impl::itmf::STIK_BOOKLET, "booklet", "Booklet" }, - { mp4v2::impl::itmf::STIK_RINGTONE, "ringtone", "Ringtone" }, - - { mp4v2::impl::itmf::STIK_UNDEFINED } // must be last -}; - -/////////////////////////////////////////////////////////////////////////////// - -template <> -const itmf::EnumAccountType::Entry itmf::EnumAccountType::data[] = { - { mp4v2::impl::itmf::AT_ITUNES, "itunes", "iTunes" }, - { mp4v2::impl::itmf::AT_AOL, "aol", "AOL" }, - - { mp4v2::impl::itmf::AT_UNDEFINED } // must be last -}; - -/////////////////////////////////////////////////////////////////////////////// - -template <> -const itmf::EnumCountryCode::Entry itmf::EnumCountryCode::data[] = { - { mp4v2::impl::itmf::CC_USA, "usa", "United States" }, - { mp4v2::impl::itmf::CC_USA, "fra", "France" }, - { mp4v2::impl::itmf::CC_DEU, "ger", "Germany" }, - { mp4v2::impl::itmf::CC_GBR, "gbr", "United Kingdom" }, - { mp4v2::impl::itmf::CC_AUT, "aut", "Austria" }, - { mp4v2::impl::itmf::CC_BEL, "bel", "Belgium" }, - { mp4v2::impl::itmf::CC_FIN, "fin", "Finland" }, - { mp4v2::impl::itmf::CC_GRC, "grc", "Greece" }, - { mp4v2::impl::itmf::CC_IRL, "irl", "Ireland" }, - { mp4v2::impl::itmf::CC_ITA, "ita", "Italy" }, - { mp4v2::impl::itmf::CC_LUX, "lux", "Luxembourg" }, - { mp4v2::impl::itmf::CC_NLD, "nld", "Netherlands" }, - { mp4v2::impl::itmf::CC_PRT, "prt", "Portugal" }, - { mp4v2::impl::itmf::CC_ESP, "esp", "Spain" }, - { mp4v2::impl::itmf::CC_CAN, "can", "Canada" }, - { mp4v2::impl::itmf::CC_SWE, "swe", "Sweden" }, - { mp4v2::impl::itmf::CC_NOR, "nor", "Norway" }, - { mp4v2::impl::itmf::CC_DNK, "dnk", "Denmark" }, - { mp4v2::impl::itmf::CC_CHE, "che", "Switzerland" }, - { mp4v2::impl::itmf::CC_AUS, "aus", "Australia" }, - { mp4v2::impl::itmf::CC_NZL, "nzl", "New Zealand" }, - { mp4v2::impl::itmf::CC_JPN, "jpn", "Japan" }, - - { mp4v2::impl::itmf::CC_UNDEFINED } // must be last -}; - -/////////////////////////////////////////////////////////////////////////////// - -template <> -const itmf::EnumContentRating::Entry itmf::EnumContentRating::data[] = { - { mp4v2::impl::itmf::CR_NONE, "none", "None" }, - { mp4v2::impl::itmf::CR_CLEAN, "clean", "Clean" }, - { mp4v2::impl::itmf::CR_EXPLICIT, "explicit", "Explicit" }, - - { mp4v2::impl::itmf::CR_UNDEFINED } // must be last -}; - -/////////////////////////////////////////////////////////////////////////////// - -namespace itmf { - -/////////////////////////////////////////////////////////////////////////////// - -// must come after static data init -const EnumBasicType enumBasicType; -const EnumGenreType enumGenreType; -const EnumStikType enumStikType; -const EnumAccountType enumAccountType; -const EnumCountryCode enumCountryCode; -const EnumContentRating enumContentRating; - -/////////////////////////////////////////////////////////////////////////////// - -namespace { - struct ImageHeader { - BasicType type; - string data; - }; - - // POD static init does not need singletons - static ImageHeader IMAGE_HEADERS[] = { - { BT_BMP, "\x42\x4d" }, - { BT_GIF, "GIF87a" }, - { BT_GIF, "GIF89a" }, - { BT_JPEG, "\xff\xd8\xff\xe0" }, - { BT_PNG, "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a" }, - { BT_UNDEFINED } // must be last - }; -} - -BasicType -computeBasicType( const void* buffer, uint32_t size ) -{ - ImageHeader* found = NULL; - for( ImageHeader* p = IMAGE_HEADERS; p->type != BT_UNDEFINED; p++ ) { - ImageHeader& h = *p; - - if( size < h.data.size() ) - continue; - - if( memcmp(h.data.data(), buffer, h.data.size()) == 0 ) { - found = &h; - break; - } - } - - return found ? found->type : BT_IMPLICIT; -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::itmf diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/type.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/type.h deleted file mode 100644 index 484c241c..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/itmf/type.h +++ /dev/null @@ -1,296 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// Rouven Wessling, mp4v2@rouvenwessling.de -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_ITMF_TYPE_H -#define MP4V2_IMPL_ITMF_TYPE_H - -namespace mp4v2 { namespace impl { namespace itmf { - -/////////////////////////////////////////////////////////////////////////////// - -/// Basic set of types as detailed in spec. -enum BasicType { - BT_IMPLICIT = 0, ///< for use with tags for which no type needs to be indicated - BT_UTF8 = 1, ///< without any count or null terminator - BT_UTF16 = 2, ///< also known as UTF-16BE - BT_SJIS = 3, ///< deprecated unless it is needed for special Japanese characters - BT_HTML = 6, ///< the HTML file header specifies which HTML version - BT_XML = 7, ///< the XML header must identify the DTD or schemas - BT_UUID = 8, ///< also known as GUID; stored as 16 bytes in binary (valid as an ID) - BT_ISRC = 9, ///< stored as UTF-8 text (valid as an ID) - BT_MI3P = 10, ///< stored as UTF-8 text (valid as an ID) - BT_GIF = 12, ///< (deprecated) a GIF image - BT_JPEG = 13, ///< a JPEG image - BT_PNG = 14, ///< a PNG image - BT_URL = 15, ///< absolute, in UTF-8 characters - BT_DURATION = 16, ///< in milliseconds, 32-bit integer - BT_DATETIME = 17, ///< in UTC, counting seconds since midnight, January 1, 1904; 32 or 64-bits - BT_GENRES = 18, ///< a list of enumerated values, see #Genre - BT_INTEGER = 21, ///< a signed big-endian integer with length one of { 1,2,3,4,8 } bytes - BT_RIAA_PA = 24, ///< RIAA parental advisory; { -1=no, 1=yes, 0=unspecified }, 8-bit ingteger - BT_UPC = 25, ///< Universal Product Code, in text UTF-8 format (valid as an ID) - BT_BMP = 27, ///< Windows bitmap image - - BT_UNDEFINED = 255 -}; - -typedef Enum EnumBasicType; -MP4V2_EXPORT extern const EnumBasicType enumBasicType; - -/////////////////////////////////////////////////////////////////////////////// - -/// enumerated genre as defined in ID3v1 specification but +1 as per iTMF spec. -/// Note values 80 and higher are Winamp extensions. -enum GenreType { - GENRE_UNDEFINED = 0, - - /* ID3v1 standard */ - GENRE_BLUES = 1, - GENRE_CLASSIC_ROCK = 2, - GENRE_COUNTRY = 3, - GENRE_DANCE = 4, - GENRE_DISCO = 5, - GENRE_FUNK = 6, - GENRE_GRUNGE = 7, - GENRE_HIP_HOP = 8, - GENRE_JAZZ = 9, - GENRE_METAL = 10, - GENRE_NEW_AGE = 11, - GENRE_OLDIES = 12, - GENRE_OTHER = 13, - GENRE_POP = 14, - GENRE_R_AND_B = 15, - GENRE_RAP = 16, - GENRE_REGGAE = 17, - GENRE_ROCK = 18, - GENRE_TECHNO = 19, - GENRE_INDUSTRIAL = 20, - GENRE_ALTERNATIVE = 21, - GENRE_SKA = 22, - GENRE_DEATH_METAL = 23, - GENRE_PRANKS = 24, - GENRE_SOUNDTRACK = 25, - GENRE_EURO_TECHNO = 26, - GENRE_AMBIENT = 27, - GENRE_TRIP_HOP = 28, - GENRE_VOCAL = 29, - GENRE_JAZZ_FUNK = 30, - GENRE_FUSION = 31, - GENRE_TRANCE = 32, - GENRE_CLASSICAL = 33, - GENRE_INSTRUMENTAL = 34, - GENRE_ACID = 35, - GENRE_HOUSE = 36, - GENRE_GAME = 37, - GENRE_SOUND_CLIP = 38, - GENRE_GOSPEL = 39, - GENRE_NOISE = 40, - GENRE_ALTERNROCK = 41, - GENRE_BASS = 42, - GENRE_SOUL = 43, - GENRE_PUNK = 44, - GENRE_SPACE = 45, - GENRE_MEDITATIVE = 46, - GENRE_INSTRUMENTAL_POP = 47, - GENRE_INSTRUMENTAL_ROCK = 48, - GENRE_ETHNIC = 49, - GENRE_GOTHIC = 50, - GENRE_DARKWAVE = 51, - GENRE_TECHNO_INDUSTRIAL = 52, - GENRE_ELECTRONIC = 53, - GENRE_POP_FOLK = 54, - GENRE_EURODANCE = 55, - GENRE_DREAM = 56, - GENRE_SOUTHERN_ROCK = 57, - GENRE_COMEDY = 58, - GENRE_CULT = 59, - GENRE_GANGSTA = 60, - GENRE_TOP_40 = 61, - GENRE_CHRISTIAN_RAP = 62, - GENRE_POP_FUNK = 63, - GENRE_JUNGLE = 64, - GENRE_NATIVE_AMERICAN = 65, - GENRE_CABARET = 66, - GENRE_NEW_WAVE = 67, - GENRE_PSYCHEDELIC = 68, - GENRE_RAVE = 69, - GENRE_SHOWTUNES = 70, - GENRE_TRAILER = 71, - GENRE_LO_FI = 72, - GENRE_TRIBAL = 73, - GENRE_ACID_PUNK = 74, - GENRE_ACID_JAZZ = 75, - GENRE_POLKA = 76, - GENRE_RETRO = 77, - GENRE_MUSICAL = 78, - GENRE_ROCK_AND_ROLL = 79, - - /* Winamp extension */ - GENRE_HARD_ROCK = 80, - GENRE_FOLK = 81, - GENRE_FOLK_ROCK = 82, - GENRE_NATIONAL_FOLK = 83, - GENRE_SWING = 84, - GENRE_FAST_FUSION = 85, - GENRE_BEBOB = 86, - GENRE_LATIN = 87, - GENRE_REVIVAL = 88, - GENRE_CELTIC = 89, - GENRE_BLUEGRASS = 90, - GENRE_AVANTGARDE = 91, - GENRE_GOTHIC_ROCK = 92, - GENRE_PROGRESSIVE_ROCK = 93, - GENRE_PSYCHEDELIC_ROCK = 94, - GENRE_SYMPHONIC_ROCK = 95, - GENRE_SLOW_ROCK = 96, - GENRE_BIG_BAND = 97, - GENRE_CHORUS = 98, - GENRE_EASY_LISTENING = 99, - GENRE_ACOUSTIC = 100, - GENRE_HUMOUR = 101, - GENRE_SPEECH = 102, - GENRE_CHANSON = 103, - GENRE_OPERA = 104, - GENRE_CHAMBER_MUSIC = 105, - GENRE_SONATA = 106, - GENRE_SYMPHONY = 107, - GENRE_BOOTY_BASS = 108, - GENRE_PRIMUS = 109, - GENRE_PORN_GROOVE = 110, - GENRE_SATIRE = 111, - GENRE_SLOW_JAM = 112, - GENRE_CLUB = 113, - GENRE_TANGO = 114, - GENRE_SAMBA = 115, - GENRE_FOLKLORE = 116, - GENRE_BALLAD = 117, - GENRE_POWER_BALLAD = 118, - GENRE_RHYTHMIC_SOUL = 119, - GENRE_FREESTYLE = 120, - GENRE_DUET = 121, - GENRE_PUNK_ROCK = 122, - GENRE_DRUM_SOLO = 123, - GENRE_A_CAPELLA = 124, - GENRE_EURO_HOUSE = 125, - GENRE_DANCE_HALL = 126, - - GENRE_NONE = 255 -}; - -typedef Enum EnumGenreType; -MP4V2_EXPORT extern const EnumGenreType enumGenreType; - -/////////////////////////////////////////////////////////////////////////////// - -/// enumerated 8-bit Video Type used by iTunes. -/// Note values are not formally defined in any specification. -enum StikType { - STIK_OLD_MOVIE = 0, - STIK_NORMAL = 1, - STIK_AUDIOBOOK = 2, - STIK_MUSIC_VIDEO = 6, - STIK_MOVIE = 9, - STIK_TV_SHOW = 10, - STIK_BOOKLET = 11, - STIK_RINGTONE = 14, - - STIK_UNDEFINED = 255 -}; - -typedef Enum EnumStikType; -MP4V2_EXPORT extern const EnumStikType enumStikType; - -/////////////////////////////////////////////////////////////////////////////// - -/// enumerated 8-bit Account Type used by the iTunes Store. -/// Note values are not formally defined in any specification. -enum AccountType { - AT_ITUNES = 0, - AT_AOL = 1, - - AT_UNDEFINED = 255 -}; - -typedef Enum EnumAccountType; -MP4V2_EXPORT extern const EnumAccountType enumAccountType; - -/////////////////////////////////////////////////////////////////////////////// - -/// enumerated 32-bit Country Code used by the iTunes Store. -/// Note values are not formally defined in any specification. -enum CountryCode { - CC_USA = 143441, - CC_FRA = 143442, - CC_DEU = 143443, - CC_GBR = 143444, - CC_AUT = 143445, - CC_BEL = 143446, - CC_FIN = 143447, - CC_GRC = 143448, - CC_IRL = 143449, - CC_ITA = 143450, - CC_LUX = 143451, - CC_NLD = 143452, - CC_PRT = 143453, - CC_ESP = 143454, - CC_CAN = 143455, - CC_SWE = 143456, - CC_NOR = 143457, - CC_DNK = 143458, - CC_CHE = 143459, - CC_AUS = 143460, - CC_NZL = 143461, - CC_JPN = 143462, - - CC_UNDEFINED = 0 -}; - -typedef Enum EnumCountryCode; -MP4V2_EXPORT extern const EnumCountryCode enumCountryCode; - -/////////////////////////////////////////////////////////////////////////////// - -/// enumerated 8-bit Content Rating used by iTunes. -/// Note values are not formally defined in any specification. -enum ContentRating { - CR_NONE = 0, - CR_CLEAN = 2, - CR_EXPLICIT = 4, - - CR_UNDEFINED = 255 -}; - -typedef Enum EnumContentRating; -MP4V2_EXPORT extern const EnumContentRating enumContentRating; - -/////////////////////////////////////////////////////////////////////////////// -/// compute BasicType by examining raw bytes header. -MP4V2_EXPORT BasicType -computeBasicType( const void* buffer, uint32_t size ); - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::itmf - -#endif // MP4V2_IMPL_ITMF_TYPE_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/log.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/log.cpp deleted file mode 100644 index 26eea6b5..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/log.cpp +++ /dev/null @@ -1,534 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is David Byron. -// Portions created by David Byron are Copyright (C) 2009, 2010, 2011. -// All Rights Reserved. -// -// Contributors: -// David Byron, dbyron@dbyron.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include -#include -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -MP4LogCallback Log::_cb_func = NULL; - -// There's no mechanism to set the log level at runtime at -// the moment so construct this so it only logs important -// stuff. -Log log(MP4_LOG_WARNING); - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log class constructor - */ -Log::Log( MP4LogLevel verbosity_ /* = MP4_LOG_NONE */ ) - : _verbosity ( verbosity_ ) - , verbosity ( _verbosity ) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log class destructor - */ -Log::~Log() -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Mutator for the callback function - * - * @param value the function to call - */ -void -Log::setLogCallback( MP4LogCallback value ) -{ - Log::_cb_func = value; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Mutator for the verbosity - * - * @param value the verbosity to use - */ -void -Log::setVerbosity( MP4LogLevel value ) -{ - _verbosity = value; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log an error message - * - * @param format the format string to use to process the - * remaining arguments. @p format should not contain a - * newline. - */ -void -Log::errorf( const char* format, - ... ) -{ - va_list ap; - - va_start(ap,format); - this->vprintf(MP4_LOG_ERROR,format,ap); - va_end(ap); -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log a warning message - * - * @param format the format string to use to process the - * remaining arguments. @p format should not contain a - * newline. - */ -void -Log::warningf( const char* format, - ... ) -{ - va_list ap; - - va_start(ap,format); - this->vprintf(MP4_LOG_WARNING,format,ap); - va_end(ap); -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log an info message - * - * @param format the format string to use to process the - * remaining arguments. @p format should not contain a - * newline. - */ -void -Log::infof( const char* format, - ... ) -{ - va_list ap; - - va_start(ap,format); - this->vprintf(MP4_LOG_INFO,format,ap); - va_end(ap); -} - -/** - * Log a verbose1 message - * - * @param format the format string to use to process the - * remaining arguments. @p format should not contain a - * newline. - */ -void -Log::verbose1f( const char* format, - ... ) -{ - va_list ap; - - va_start(ap,format); - this->vprintf(MP4_LOG_VERBOSE1,format,ap); - va_end(ap); -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log a verbose2 message - * - * @param format the format string to use to process the - * remaining arguments. @p format should not contain a - * newline. - */ -void -Log::verbose2f( const char* format, - ... ) -{ - va_list ap; - - va_start(ap,format); - this->vprintf(MP4_LOG_VERBOSE2,format,ap); - va_end(ap); -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log a verbose3 message - * - * @param format the format string to use to process the - * remaining arguments. @p format should not contain a - * newline. - */ -void -Log::verbose3f( const char* format, - ... ) -{ - va_list ap; - - va_start(ap,format); - this->vprintf(MP4_LOG_VERBOSE3,format,ap); - va_end(ap); -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log a verbose4 message - * - * @param format the format string to use to process the - * remaining arguments. @p format should not contain a - * newline. - */ -void -Log::verbose4f( const char* format, - ... ) -{ - va_list ap; - - va_start(ap,format); - this->vprintf(MP4_LOG_VERBOSE4,format,ap); - va_end(ap); -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Dump info to the console or a callback - * - * @param indent the number of spaces to indent the info - * - * @param verbosity the level of detail the message contains - * - * @param format the format string to use to process the - * remaining arguments. @p format should not contain a - * newline. - */ -void -Log::dump ( uint8_t indent, - MP4LogLevel verbosity_, - const char* format, ... ) -{ - va_list ap; - - va_start(ap,format); - this->vdump(indent,verbosity,format,ap); - va_end(ap); -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Dump info if it has appropriate verbosity, either to - * standard out (with a newline appended to @p format) or to - * the callback function (with no newline appended). - * - * @param indent the number of spaces to indent the info - * - * @param verbosity the level of detail the message contains - * - * @param format the format string to use to process @p ap. - * @p format should not contain a newline. - * - * @param ap varargs to build the message - */ -void -Log::vdump( uint8_t indent, - MP4LogLevel verbosity_, - const char* format, - va_list ap ) -{ - // Make sure nothing gets logged with MP4_LOG_NONE. - // That way people who ask for nothing to get logged - // won't get anything logged. - ASSERT(verbosity_ != MP4_LOG_NONE); - ASSERT(format); - ASSERT(format[0] != '\0'); - - if (verbosity_ > this->_verbosity) - { - // We're not set verbose enough to log this - return; - } - - if (Log::_cb_func) - { - ostringstream new_format; - - if (indent > 0) - { - string indent_str(indent,' '); - // new_format << setw(indent) << setfill(' ') << "" << setw(0); - // new_format << format; - new_format << indent_str << format; - Log::_cb_func(verbosity_,new_format.str().c_str(),ap); - return; - } - - Log::_cb_func(verbosity_,format,ap); - return; - } - - // No callback set so log to standard out. - if (indent > 0) - { - ::fprintf(stdout,"%*c",indent,' '); - } - ::vfprintf(stdout,format,ap); - ::fprintf(stdout,"\n"); -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log a message - * - * @param verbosity the level of detail the message contains - * - * @param format the format string to use to process the - * remaining arguments. @p format should not contain a - * newline. - */ -void -Log::printf( MP4LogLevel verbosity, - const char* format, - ... ) -{ - va_list ap; - - va_start(ap,format); - this->vprintf(verbosity,format,ap); - va_end(ap); -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log a message if it has appropriate verbosity, either to - * standard out (with a newline appended to @p format) or to - * the callback function (with no newline appended). - * - * @param verbosity the level of detail the message contains - * - * @param format the format string to use to process @p ap. - * @p format should not contain a newline. - * - * @param ap varargs to build the message - */ -void -Log::vprintf( MP4LogLevel verbosity_, - const char* format, - va_list ap ) -{ - // Make sure nothing gets logged with MP4_LOG_NONE. - // That way people who ask for nothing to get logged - // won't get anything logged. - ASSERT(verbosity_ != MP4_LOG_NONE); - ASSERT(format); - - if (verbosity_ > this->_verbosity) - { - // We're not set verbose enough to log this - return; - } - - if (Log::_cb_func) - { - Log::_cb_func(verbosity_,format,ap); - return; - } - - // No callback set so log to standard out. - ::vfprintf(stdout,format,ap); - ::fprintf(stdout,"\n"); -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log a buffer as ascii-hex - * - * @param indent the number of spaces to indent the buffer - * - * @param verbosity the level of detail the message contains - * - * @param pBytes the buffer to log - * - * @param numBytes the number of bytes to log - * - * @param format the format string to use to process the - * remaining arguments, where the format + remaining args - * describe @p pBytes. The resulting string should not - * contain a newline. Only the first 255 characters of the - * resulting string (not including the NUL terminator) make - * it to the log callback or stdout. - */ -void -Log::hexDump( uint8_t indent, - MP4LogLevel verbosity_, - const uint8_t* pBytes, - uint32_t numBytes, - const char* format, - ... ) -{ - va_list ap; - - ASSERT(pBytes || (numBytes == 0)); - ASSERT(format); - - if (verbosity_ > this->_verbosity) - { - // We're not set verbose enough to log this - return; - } - - // Build the description by processing format and the - // remaining args. Since we don't have asprintf, pick - // an arbitrary length for the string and use snprintf. - // To save a memory allocation, only do this if there's - // a non-empty format string or non-zero indent - char *desc = NULL; - if (format[0] || indent) - { - desc = (char *)MP4Calloc(256 + indent); - sprintf(desc,"%*c",indent,' '); - va_start(ap,format); - vsnprintf(desc + indent,255,format,ap); - va_end(ap); - } - - // From here we can use the C++ standard lib classes and - // build a string for each line - for (uint32_t i = 0;(i < numBytes);i += 16) - { - // ios_base::ate means at end. With out this desc - // gets overwritten with each << operation - ostringstream oneLine(desc ? desc : "",ios_base::ate); - - // Append the byte offset this line starts with as - // an 8 character, leading 0, hex number. Leave the - // fill character set to 0 for the remaining - // operations - oneLine << ':' << hex << setw(8) << setfill('0') << - std::right << i << setw(0) << setfill(' ') << ": "; - - uint32_t curlen = min((uint32_t)16,numBytes - i); - const uint8_t *b = pBytes + i; - uint32_t j; - - for (j = 0;(j < curlen);j++) - { - oneLine << hex << setw(2) << setfill('0') << right << static_cast(b[j]); - oneLine << setw(0) << setfill(' ') << ' '; - } - - for (; j < 16; j++) - { - oneLine << " "; - } - - b = pBytes + i; - for (j = 0;(j < curlen);j++) - { - if (isprint(static_cast(b[j]))) - { - oneLine << static_cast(b[j]); - } - else - { - oneLine << '.'; - } - } - - // We can either call the callback directly or use - // the Log::printf function. To call the callback - // directly, we need a va_list. (I think) we need - // and extra function call to build that, so we may - // as well call Log::printf. It's going to - // double-check the verbosity and the callback - // function pointer, but that seems OK (13-feb-09, - // dbyron) - this->printf(verbosity_,"%s",oneLine.str().c_str()); - } - - if (desc) - { - MP4Free(desc); - desc = NULL; - } -} - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Log an Exception as an error - * - * @param x the exception to log - */ -void -Log::errorf ( const Exception& x ) -{ - this->printf(MP4_LOG_ERROR,"%s",x.msg().c_str()); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -using namespace mp4v2::impl; - -extern "C" -void MP4SetLogCallback( MP4LogCallback cb_func ) -{ - Log::setLogCallback(cb_func); -} - -extern "C" -MP4LogLevel MP4LogGetLevel(void) -{ - return mp4v2::impl::log.verbosity; -} - -extern "C" -void MP4LogSetLevel( MP4LogLevel verbosity ) -{ - try - { - mp4v2::impl::log.setVerbosity(verbosity); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } -} - diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/log.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/log.h deleted file mode 100644 index e7a6e001..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/log.h +++ /dev/null @@ -1,93 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is David Byron. -// Portions created by David Byron are Copyright (C) 2009, 2010, 2011. -// All Rights Reserved. -// -// Contributors: -// David Byron, dbyron@dbyron.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_LOG_H -#define MP4V2_IMPL_LOG_H - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -/** - * Handle logging either to standard out or to a callback - * function - */ -class MP4V2_EXPORT Log { -private: - MP4LogLevel _verbosity; - static MP4LogCallback _cb_func; - -public: - const MP4LogLevel& verbosity; - -public: - Log( MP4LogLevel = MP4_LOG_NONE ); - virtual ~Log(); - - static void setLogCallback ( MP4LogCallback ); - - void setVerbosity ( MP4LogLevel ); - - void errorf ( const char* format, ... ) MP4V2_WFORMAT_PRINTF(2,3); - void warningf ( const char* format, ... ) MP4V2_WFORMAT_PRINTF(2,3); - void infof ( const char* format, ... ) MP4V2_WFORMAT_PRINTF(2,3); - void verbose1f ( const char* format, ... ) MP4V2_WFORMAT_PRINTF(2,3); - void verbose2f ( const char* format, ... ) MP4V2_WFORMAT_PRINTF(2,3); - void verbose3f ( const char* format, ... ) MP4V2_WFORMAT_PRINTF(2,3); - void verbose4f ( const char* format, ... ) MP4V2_WFORMAT_PRINTF(2,3); - - void dump ( uint8_t indent, - MP4LogLevel verbosity_, - const char* format, ... ) MP4V2_WFORMAT_PRINTF(4,5); - void vdump ( uint8_t indent, - MP4LogLevel verbosity_, - const char* format, va_list ap ); - void printf ( MP4LogLevel verbosity_, - const char* format, ... ) MP4V2_WFORMAT_PRINTF(3,4); - void vprintf ( MP4LogLevel verbosity_, - const char* format, va_list ap ); - - void hexDump ( uint8_t indent, - MP4LogLevel verbosity_, - const uint8_t* pBytes, - uint32_t numBytes, - const char* format, ... ) MP4V2_WFORMAT_PRINTF(6,7); - - void errorf ( const Exception& x ); - -private: - Log ( const Log &src ); - Log &operator= ( const Log &src ); -}; - -/** - * A global (at least to mp4v2) log object for code that - * needs to log something but doesn't otherwise have access - * to one - */ -extern Log log; -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_LOG_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4.cpp deleted file mode 100644 index 36052986..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4.cpp +++ /dev/null @@ -1,4563 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001 - 2005. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Alix Marchandise-Franquet alix@cisco.com - * Ximpo Group Ltd. mp4v2@ximpo.com - * Bill May wmay@cisco.com - */ - -/* - * MP4 library API functions - * - * These are wrapper functions that provide C linkage conventions - * to the library, and catch any internal errors, ensuring that - * a proper return value is given. - */ - -#include "src/impl.h" - -using namespace mp4v2::impl; - -static MP4File *ConstructMP4File ( void ) -{ - MP4File* pFile = NULL; - try { - pFile = new MP4File(); - } - catch( std::bad_alloc ) { - mp4v2::impl::log.errorf("%s: unable to allocate MP4File", __FUNCTION__); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: unknown exception constructing MP4File", __FUNCTION__ ); - } - - return pFile; -} - -extern "C" { - -const char* MP4GetFilename( MP4FileHandle hFile ) -{ - if (!MP4_IS_VALID_FILE_HANDLE(hFile)) - return NULL; - try - { - ASSERT(hFile); - MP4File& file = *static_cast(hFile); - ASSERT(file.GetFilename().c_str()); - return file.GetFilename().c_str(); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: unknown exception accessing MP4File " - "filename", __FUNCTION__ ); - } - - return NULL; -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4FileHandle MP4Read( const char* fileName ) -{ - if (!fileName) - return MP4_INVALID_FILE_HANDLE; - - MP4File *pFile = ConstructMP4File(); - if (!pFile) - return MP4_INVALID_FILE_HANDLE; - - try - { - ASSERT(pFile); - pFile->Read( fileName, NULL ); - return (MP4FileHandle)pFile; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: \"%s\": failed", __FUNCTION__, - fileName ); - } - - if (pFile) - delete pFile; - return MP4_INVALID_FILE_HANDLE; -} - -MP4FileHandle MP4ReadProvider( const char* fileName, const MP4FileProvider* fileProvider ) -{ - if (!fileName) - return MP4_INVALID_FILE_HANDLE; - - MP4File *pFile = ConstructMP4File(); - if (!pFile) - return MP4_INVALID_FILE_HANDLE; - - try { - pFile->Read( fileName, fileProvider ); - return (MP4FileHandle)pFile; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: \"%s\": failed", __FUNCTION__, - fileName ); - } - - if (pFile) - delete pFile; - return MP4_INVALID_FILE_HANDLE; -} - -/////////////////////////////////////////////////////////////////////////////// - - MP4FileHandle MP4Create (const char* fileName, - uint32_t flags) - { - return MP4CreateEx(fileName, flags); - } - - MP4FileHandle MP4CreateEx (const char* fileName, - uint32_t flags, - int add_ftyp, - int add_iods, - char* majorBrand, - uint32_t minorVersion, - char** supportedBrands, - uint32_t supportedBrandsCount) - { - if (!fileName) - return MP4_INVALID_FILE_HANDLE; - - MP4File* pFile = ConstructMP4File(); - if (!pFile) - return MP4_INVALID_FILE_HANDLE; - - try { - ASSERT(pFile); - // LATER useExtensibleFormat, moov first, then mvex's - pFile->Create(fileName, flags, add_ftyp, add_iods, - majorBrand, minorVersion, - supportedBrands, supportedBrandsCount); - return (MP4FileHandle)pFile; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: \"%s\": failed", __FUNCTION__, - fileName ); - } - - if (pFile) - delete pFile; - return MP4_INVALID_FILE_HANDLE; - } - - MP4FileHandle MP4Modify(const char* fileName, - uint32_t flags) - { - if (!fileName) - return MP4_INVALID_FILE_HANDLE; - - MP4File* pFile = ConstructMP4File(); - if (!pFile) - return MP4_INVALID_FILE_HANDLE; - - try { - ASSERT(pFile); - // LATER useExtensibleFormat, moov first, then mvex's - if (pFile->Modify(fileName)) - return (MP4FileHandle)pFile; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: \"%s\": failed", __FUNCTION__, - fileName ); - } - - if (pFile) - delete pFile; - return MP4_INVALID_FILE_HANDLE; - } - - bool MP4Optimize(const char* fileName, - const char* newFileName) - { - // Must at least have fileName for in-place optimize; newFileName - // can be null, however. - if (fileName == NULL) - return false; - - MP4File* pFile = ConstructMP4File(); - if (!pFile) - return MP4_INVALID_FILE_HANDLE; - - try { - ASSERT(pFile); - pFile->Optimize(fileName, newFileName); - delete pFile; - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s(%s,%s) failed", __FUNCTION__, - fileName, newFileName ); - } - - if (pFile) - delete pFile; - return false; - } - - void MP4Close(MP4FileHandle hFile, uint32_t flags) - { - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return; - - MP4File& f = *(MP4File*)hFile; - try { - f.Close(flags); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - - delete &f; - } - - bool MP4Dump( - MP4FileHandle hFile, - bool dumpImplicits) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->Dump(dumpImplicits); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - MP4Duration MP4GetDuration(MP4FileHandle hFile) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetDuration(); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_DURATION; - } - - uint32_t MP4GetTimeScale(MP4FileHandle hFile) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTimeScale(); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - bool MP4SetTimeScale(MP4FileHandle hFile, uint32_t value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetTimeScale(value); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - uint8_t MP4GetODProfileLevel(MP4FileHandle hFile) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetODProfileLevel(); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - bool MP4SetODProfileLevel(MP4FileHandle hFile, uint8_t value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetODProfileLevel(value); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - uint8_t MP4GetSceneProfileLevel(MP4FileHandle hFile) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetSceneProfileLevel(); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - bool MP4SetSceneProfileLevel(MP4FileHandle hFile, uint8_t value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetSceneProfileLevel(value); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - uint8_t MP4GetVideoProfileLevel(MP4FileHandle hFile, - MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetVideoProfileLevel(); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - if (MP4_IS_VALID_TRACK_ID(trackId)) { - uint8_t *foo; - uint32_t bufsize; - uint8_t type; - // for mpeg4 video tracks, try to look for the VOSH header, - // which has this info. - type = MP4GetTrackEsdsObjectTypeId(hFile, trackId); - if (type == MP4_MPEG4_VIDEO_TYPE) { - if (MP4GetTrackESConfiguration(hFile, - trackId, - &foo, - &bufsize)) { - uint8_t *ptr = foo; - while (bufsize > 0) { - if (MP4V2_HTONL(*(uint32_t *)ptr) == 0x1b0) { - uint8_t ret = ptr[4]; - free(foo); - return ret; - } - ptr++; - bufsize--; - } - free(foo); - } - } - } - - } - return 0; - } - - void MP4SetVideoProfileLevel(MP4FileHandle hFile, uint8_t value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetVideoProfileLevel(value); - return ; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return ; - } - - uint8_t MP4GetAudioProfileLevel(MP4FileHandle hFile) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetAudioProfileLevel(); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - void MP4SetAudioProfileLevel(MP4FileHandle hFile, uint8_t value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetAudioProfileLevel(value); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - } - - uint8_t MP4GetGraphicsProfileLevel(MP4FileHandle hFile) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetGraphicsProfileLevel(); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - bool MP4SetGraphicsProfileLevel(MP4FileHandle hFile, uint8_t value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetGraphicsProfileLevel(value); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - /* generic file properties */ - - bool MP4HaveAtom (MP4FileHandle hFile, const char *atomName) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File *)hFile)->FindAtom(atomName) != NULL; - } catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4GetIntegerProperty( - MP4FileHandle hFile, const char* propName, uint64_t *retvalue) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - *retvalue = ((MP4File*)hFile)->GetIntegerProperty(propName); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4GetFloatProperty( - MP4FileHandle hFile, const char* propName, float *retvalue) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - *retvalue = ((MP4File*)hFile)->GetFloatProperty(propName); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4GetStringProperty( - MP4FileHandle hFile, const char* propName, - const char **retvalue) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - *retvalue = ((MP4File*)hFile)->GetStringProperty(propName); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4GetBytesProperty( - MP4FileHandle hFile, const char* propName, - uint8_t** ppValue, uint32_t* pValueSize) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->GetBytesProperty(propName, ppValue, pValueSize); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - *ppValue = NULL; - *pValueSize = 0; - return false; - } - - bool MP4SetIntegerProperty( - MP4FileHandle hFile, const char* propName, int64_t value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetIntegerProperty(propName, value); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4SetFloatProperty( - MP4FileHandle hFile, const char* propName, float value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetFloatProperty(propName, value); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4SetStringProperty( - MP4FileHandle hFile, const char* propName, const char* value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetStringProperty(propName, value); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4SetBytesProperty( - MP4FileHandle hFile, const char* propName, - const uint8_t* pValue, uint32_t valueSize) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetBytesProperty(propName, pValue, valueSize); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - /* track operations */ - - MP4TrackId MP4AddTrack( - MP4FileHandle hFile, const char* type,uint32_t timeScale) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->AddSystemsTrack(type, timeScale); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddSystemsTrack( - MP4FileHandle hFile, const char* type) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->AddSystemsTrack(type); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddODTrack(MP4FileHandle hFile) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->AddODTrack(); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddSceneTrack(MP4FileHandle hFile) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->AddSceneTrack(); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddULawAudioTrack( - MP4FileHandle hFile, - uint32_t timeScale) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)-> - AddULawAudioTrack(timeScale); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddALawAudioTrack( - MP4FileHandle hFile, - uint32_t timeScale) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)-> - AddALawAudioTrack(timeScale); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddAudioTrack( - MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint8_t audioType) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)-> - AddAudioTrack(timeScale, sampleDuration, audioType); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - -// -// API to initialize ismacryp properties to sensible defaults. -// if the input pointer is null then an ismacryp params is malloc'd. -// caller must see to it that it is properly disposed of. -// - mp4v2_ismacrypParams *MP4DefaultISMACrypParams(mp4v2_ismacrypParams *ptr) - { - try - { - if (ptr == NULL) { - ptr = (mp4v2_ismacrypParams *)MP4Malloc(sizeof(mp4v2_ismacrypParams)); - } - memset(ptr, 0, sizeof(*ptr)); - return ptr; - } - - catch (...) { - return MP4_INVALID_TRACK_ID; - } - } - - - MP4TrackId MP4AddAC3AudioTrack( - MP4FileHandle hFile, - uint32_t samplingRate, - uint8_t fscod, - uint8_t bsid, - uint8_t bsmod, - uint8_t acmod, - uint8_t lfeon, - uint8_t bit_rate_code) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)-> - AddAC3AudioTrack(samplingRate, fscod, bsid, bsmod, acmod, lfeon, bit_rate_code); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddEncAudioTrack(MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - mp4v2_ismacrypParams *icPp, - uint8_t audioType) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - if (icPp == NULL) { - return ((MP4File*)hFile)-> - AddEncAudioTrack(timeScale, sampleDuration, audioType, - 0, 0, - 0, 0, - false, NULL, false); - } else { - return ((MP4File*)hFile)-> - AddEncAudioTrack(timeScale, sampleDuration, audioType, - icPp->scheme_type, icPp->scheme_version, - icPp->key_ind_len, icPp->iv_len, - icPp->selective_enc, icPp->kms_uri, true); - } - } catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - MP4TrackId MP4AddAmrAudioTrack( - MP4FileHandle hFile, - uint32_t timeScale, - uint16_t modeSet, - uint8_t modeChangePeriod, - uint8_t framesPerSample, - bool isAmrWB) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)-> - AddAmrAudioTrack(timeScale, modeSet, modeChangePeriod, framesPerSample, isAmrWB); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - void MP4SetAmrVendor( - MP4FileHandle hFile, - MP4TrackId trackId, - uint32_t vendor) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)-> - SetAmrVendor(trackId, vendor); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - } - - void MP4SetAmrDecoderVersion( - MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t decoderVersion) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)-> - SetAmrDecoderVersion(trackId, decoderVersion); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - } - - void MP4SetAmrModeSet( - MP4FileHandle hFile, - MP4TrackId trackId, - uint16_t modeSet) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)-> - SetAmrModeSet(trackId, modeSet); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - } - - uint16_t MP4GetAmrModeSet( - MP4FileHandle hFile, - MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)-> - GetAmrModeSet(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - MP4TrackId MP4AddHrefTrack (MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - const char *base_url) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - MP4File *pFile = (MP4File *)hFile; - - return pFile->AddHrefTrack(timeScale, - sampleDuration, - base_url); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - const char *MP4GetHrefTrackBaseUrl (MP4FileHandle hFile, - MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackStringProperty(trackId, - "mdia.minf.stbl.stsd.href.burl.base_url"); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return NULL; - } - - MP4TrackId MP4AddVideoTrack( - MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t videoType) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - MP4File *pFile = (MP4File *)hFile; - - return pFile->AddMP4VideoTrack(timeScale, - sampleDuration, - width, - height, - videoType); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddEncVideoTrack(MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - mp4v2_ismacrypParams *icPp, - uint8_t videoType, - const char *oFormat) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - - // test for valid ismacrypt session descriptor - if (icPp == NULL) { - return MP4_INVALID_TRACK_ID; - } - MP4File *pFile = (MP4File *)hFile; - - return pFile->AddEncVideoTrack(timeScale, - sampleDuration, - width, - height, - videoType, - icPp, - oFormat); - - } catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddColr( - MP4FileHandle hFile, MP4TrackId refTrackId, uint16_t pri, uint16_t tran, uint16_t mat) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->AddColr(refTrackId, pri, tran, mat); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - - MP4TrackId MP4AddH264VideoTrack(MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t AVCProfileIndication, - uint8_t profile_compat, - uint8_t AVCLevelIndication, - uint8_t sampleLenFieldSizeMinusOne) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - MP4File *pFile = (MP4File *)hFile; - - return pFile->AddH264VideoTrack(timeScale, - sampleDuration, - width, - height, - AVCProfileIndication, - profile_compat, - AVCLevelIndication, - sampleLenFieldSizeMinusOne); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddEncH264VideoTrack( - MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - mp4v2_ismacrypParams *icPp - ) - - { - MP4Atom *srcAtom; - MP4File *pFile; - - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - - pFile = (MP4File *)srcFile; - srcAtom = pFile->FindTrackAtom(srcTrackId, "mdia.minf.stbl.stsd.avc1.avcC"); - if (srcAtom == NULL) - return MP4_INVALID_TRACK_ID; - - pFile = (MP4File *)hFile; - - return pFile->AddEncH264VideoTrack(timeScale, - sampleDuration, - width, - height, - srcAtom, - icPp); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - void MP4AddH264SequenceParameterSet (MP4FileHandle hFile, - MP4TrackId trackId, - const uint8_t *pSequence, - uint16_t sequenceLen) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - MP4File *pFile = (MP4File *)hFile; - - pFile->AddH264SequenceParameterSet(trackId, - pSequence, - sequenceLen); - return; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return; - } - void MP4AddH264PictureParameterSet (MP4FileHandle hFile, - MP4TrackId trackId, - const uint8_t *pPict, - uint16_t pictLen) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - MP4File *pFile = (MP4File *)hFile; - - pFile->AddH264PictureParameterSet(trackId, - pPict, - pictLen); - return; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return; - } - - MP4TrackId MP4AddH263VideoTrack( - MP4FileHandle hFile, - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t h263Level, - uint8_t h263Profile, - uint32_t avgBitrate, - uint32_t maxBitrate) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)-> - AddH263VideoTrack(timeScale, sampleDuration, width, height, h263Level, h263Profile, avgBitrate, maxBitrate); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - - return MP4_INVALID_TRACK_ID; - } - - void MP4SetH263Vendor( - MP4FileHandle hFile, - MP4TrackId trackId, - uint32_t vendor) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)-> - SetH263Vendor(trackId, vendor); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - } - - void MP4SetH263DecoderVersion( - MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t decoderVersion) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - - try { - ((MP4File*)hFile)-> - SetH263DecoderVersion(trackId, decoderVersion); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - } - - void MP4SetH263Bitrates( - MP4FileHandle hFile, - MP4TrackId trackId, - uint32_t avgBitrate, - uint32_t maxBitrate) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - - try { - ((MP4File*)hFile)-> - SetH263Bitrates(trackId, avgBitrate, maxBitrate); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - } - - MP4TrackId MP4AddHintTrack( - MP4FileHandle hFile, MP4TrackId refTrackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->AddHintTrack(refTrackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddTextTrack( - MP4FileHandle hFile, MP4TrackId refTrackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->AddTextTrack(refTrackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddSubtitleTrack(MP4FileHandle hFile, - uint32_t timescale, - uint16_t width, - uint16_t height) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->AddSubtitleTrack(timescale, width, height); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddSubpicTrack(MP4FileHandle hFile, - uint32_t timescale, - uint16_t width, - uint16_t height) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->AddSubpicTrack(timescale, width, height); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddChapterTextTrack( - MP4FileHandle hFile, MP4TrackId refTrackId, uint32_t timescale) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->AddChapterTextTrack(refTrackId, timescale); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId MP4AddPixelAspectRatio( - MP4FileHandle hFile, MP4TrackId refTrackId, uint32_t hSpacing, uint32_t vSpacing) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->AddPixelAspectRatio(refTrackId, hSpacing, vSpacing); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - void MP4AddChapter( - MP4FileHandle hFile, MP4TrackId chapterTrackId, MP4Duration chapterDuration, const char *chapterTitle) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->AddChapter(chapterTrackId, chapterDuration, chapterTitle); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - } - - void MP4AddNeroChapter( - MP4FileHandle hFile, MP4Timestamp chapterStart, const char *chapterTitle) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->AddNeroChapter(chapterStart, chapterTitle); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - } - - MP4ChapterType MP4ConvertChapters( - MP4FileHandle hFile, MP4ChapterType toChapterType) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) - { - try { - return ((MP4File*)hFile)->ConvertChapters(toChapterType); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4ChapterTypeNone; - } - - MP4ChapterType MP4DeleteChapters( - MP4FileHandle hFile, MP4ChapterType fromChapterType, MP4TrackId chapterTrackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->DeleteChapters(fromChapterType, chapterTrackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4ChapterTypeNone; - } - - MP4ChapterType MP4GetChapters( - MP4FileHandle hFile, MP4Chapter_t ** chapterList, uint32_t * chapterCount, MP4ChapterType fromChapterType) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetChapters(chapterList, chapterCount, fromChapterType); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4ChapterTypeNone; - } - - MP4ChapterType MP4SetChapters( - MP4FileHandle hFile, MP4Chapter_t * chapterList, uint32_t chapterCount, MP4ChapterType toChapterType) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->SetChapters(chapterList, chapterCount, toChapterType); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4ChapterTypeNone; - } - - void MP4ChangeMovieTimeScale( - MP4FileHandle hFile, uint32_t value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->ChangeMovieTimeScale(value); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - } - - MP4TrackId MP4CloneTrack (MP4FileHandle srcFile, - MP4TrackId srcTrackId, - MP4FileHandle dstFile, - MP4TrackId dstHintTrackReferenceTrack) - { - MP4TrackId dstTrackId = MP4_INVALID_TRACK_ID; - - if (dstFile == NULL) { - dstFile = srcFile; - } - - const char* trackType = - MP4GetTrackType(srcFile, srcTrackId); - - if (!trackType) { - return dstTrackId; - } - - const char *media_data_name = - MP4GetTrackMediaDataName(srcFile, srcTrackId); - if (media_data_name == NULL) return dstTrackId; - - if (MP4_IS_VIDEO_TRACK_TYPE(trackType)) { - if (ATOMID(media_data_name) == ATOMID("mp4v")) { - MP4SetVideoProfileLevel(dstFile, - MP4GetVideoProfileLevel(srcFile)); - dstTrackId = MP4AddVideoTrack( - dstFile, - MP4GetTrackTimeScale(srcFile, - srcTrackId), - MP4GetTrackFixedSampleDuration(srcFile, - srcTrackId), - MP4GetTrackVideoWidth(srcFile, - srcTrackId), - MP4GetTrackVideoHeight(srcFile, - srcTrackId), - MP4GetTrackEsdsObjectTypeId(srcFile, - srcTrackId)); - } else if (ATOMID(media_data_name) == ATOMID("avc1")) { - uint8_t AVCProfileIndication; - uint8_t profile_compat; - uint8_t AVCLevelIndication; - uint32_t sampleLenFieldSizeMinusOne; - uint64_t temp; - - if (MP4GetTrackH264ProfileLevel(srcFile, srcTrackId, - &AVCProfileIndication, - &AVCLevelIndication) == false) { - return dstTrackId; - } - if (MP4GetTrackH264LengthSize(srcFile, srcTrackId, - &sampleLenFieldSizeMinusOne) == false) { - return dstTrackId; - } - sampleLenFieldSizeMinusOne--; - if (MP4GetTrackIntegerProperty(srcFile, srcTrackId, - "mdia.minf.stbl.stsd.*[0].avcC.profile_compatibility", - &temp) == false) return dstTrackId; - profile_compat = temp & 0xff; - - dstTrackId = MP4AddH264VideoTrack(dstFile, - MP4GetTrackTimeScale(srcFile, - srcTrackId), - MP4GetTrackFixedSampleDuration(srcFile, - srcTrackId), - MP4GetTrackVideoWidth(srcFile, - srcTrackId), - MP4GetTrackVideoHeight(srcFile, - srcTrackId), - AVCProfileIndication, - profile_compat, - AVCLevelIndication, - sampleLenFieldSizeMinusOne); - uint8_t **seqheader, **pictheader; - uint32_t *pictheadersize, *seqheadersize; - uint32_t ix; - MP4GetTrackH264SeqPictHeaders(srcFile, srcTrackId, - &seqheader, &seqheadersize, - &pictheader, &pictheadersize); - for (ix = 0; seqheadersize[ix] != 0; ix++) { - MP4AddH264SequenceParameterSet(dstFile, dstTrackId, - seqheader[ix], seqheadersize[ix]); - free(seqheader[ix]); - } - free(seqheader); - free(seqheadersize); - for (ix = 0; pictheadersize[ix] != 0; ix++) { - MP4AddH264PictureParameterSet(dstFile, dstTrackId, - pictheader[ix], pictheadersize[ix]); - free(pictheader[ix]); - } - free(pictheader); - free(pictheadersize); - } else - return dstTrackId; - } else if (MP4_IS_AUDIO_TRACK_TYPE(trackType)) { - if (ATOMID(media_data_name) != ATOMID("mp4a")) return dstTrackId; - MP4SetAudioProfileLevel(dstFile, - MP4GetAudioProfileLevel(srcFile)); - dstTrackId = MP4AddAudioTrack( - dstFile, - MP4GetTrackTimeScale(srcFile, srcTrackId), - MP4GetTrackFixedSampleDuration(srcFile, srcTrackId), - MP4GetTrackEsdsObjectTypeId(srcFile, srcTrackId)); - - } else if (MP4_IS_OD_TRACK_TYPE(trackType)) { - dstTrackId = MP4AddODTrack(dstFile); - - } else if (MP4_IS_SCENE_TRACK_TYPE(trackType)) { - dstTrackId = MP4AddSceneTrack(dstFile); - - } else if (MP4_IS_HINT_TRACK_TYPE(trackType)) { - if (dstHintTrackReferenceTrack == MP4_INVALID_TRACK_ID) { - dstTrackId = MP4_INVALID_TRACK_ID; - } else { - dstTrackId = MP4AddHintTrack( - dstFile, - dstHintTrackReferenceTrack); - } - - } else if (MP4_IS_SYSTEMS_TRACK_TYPE(trackType)) { - dstTrackId = MP4AddSystemsTrack(dstFile, trackType); - - } else { - dstTrackId = MP4AddTrack(dstFile, trackType); - } - - if (dstTrackId == MP4_INVALID_TRACK_ID) { - return dstTrackId; - } - - MP4SetTrackTimeScale( - dstFile, - dstTrackId, - MP4GetTrackTimeScale(srcFile, srcTrackId)); - - if (MP4_IS_AUDIO_TRACK_TYPE(trackType) - || MP4_IS_VIDEO_TRACK_TYPE(trackType)) { - // copy track ES configuration - uint8_t* pConfig = NULL; - uint32_t configSize = 0; - MP4LogLevel verb = mp4v2::impl::log.verbosity; - mp4v2::impl::log.setVerbosity(MP4_LOG_NONE); - bool haveEs = MP4GetTrackESConfiguration(srcFile, - srcTrackId, - &pConfig, - &configSize); - mp4v2::impl::log.setVerbosity(verb); - if (haveEs && - pConfig != NULL && configSize != 0) { - if (!MP4SetTrackESConfiguration( - dstFile, - dstTrackId, - pConfig, - configSize)) { - free(pConfig); - MP4DeleteTrack(dstFile, dstTrackId); - return MP4_INVALID_TRACK_ID; - } - - free(pConfig); - } - } - - if (MP4_IS_HINT_TRACK_TYPE(trackType)) { - // probably not exactly what is wanted - // but caller can adjust later to fit their desires - - char* payloadName = NULL; - char *encodingParms = NULL; - uint8_t payloadNumber; - uint16_t maxPayloadSize; - - if (MP4GetHintTrackRtpPayload( - srcFile, - srcTrackId, - &payloadName, - &payloadNumber, - &maxPayloadSize, - &encodingParms)) { - - if (MP4SetHintTrackRtpPayload( - dstFile, - dstTrackId, - payloadName, - &payloadNumber, - maxPayloadSize, - encodingParms) == false) { - MP4DeleteTrack(dstFile, dstTrackId); - return MP4_INVALID_TRACK_ID; - } - } -#if 0 - MP4SetHintTrackSdp( - dstFile, - dstTrackId, - MP4GetHintTrackSdp(srcFile, srcTrackId)); -#endif - } - - return dstTrackId; - } - -// Given a track, make an encrypted clone of it in the dest. file - MP4TrackId MP4EncAndCloneTrack(MP4FileHandle srcFile, - MP4TrackId srcTrackId, - mp4v2_ismacrypParams *icPp, - MP4FileHandle dstFile, - MP4TrackId dstHintTrackReferenceTrack - ) - { - const char *oFormat; - - MP4TrackId dstTrackId = MP4_INVALID_TRACK_ID; - - if (dstFile == NULL) { - dstFile = srcFile; - } - - const char* trackType = MP4GetTrackType(srcFile, srcTrackId); - - if (!trackType) { - return dstTrackId; - } - - if (MP4_IS_VIDEO_TRACK_TYPE(trackType)) { - - // test source file format for avc1 - oFormat = MP4GetTrackMediaDataName(srcFile, srcTrackId); - if (!strcasecmp(oFormat, "avc1")) - { - dstTrackId = MP4AddEncH264VideoTrack(dstFile, - MP4GetTrackTimeScale(srcFile, srcTrackId), - MP4GetTrackFixedSampleDuration(srcFile, srcTrackId), - MP4GetTrackVideoWidth(srcFile, srcTrackId), - MP4GetTrackVideoHeight(srcFile, srcTrackId), - srcFile, - srcTrackId, - icPp - ); - } - else - { - MP4SetVideoProfileLevel(dstFile, MP4GetVideoProfileLevel(srcFile)); - dstTrackId = MP4AddEncVideoTrack(dstFile, - MP4GetTrackTimeScale(srcFile, srcTrackId), - MP4GetTrackFixedSampleDuration(srcFile, srcTrackId), - MP4GetTrackVideoWidth(srcFile, srcTrackId), - MP4GetTrackVideoHeight(srcFile, srcTrackId), - icPp, - MP4GetTrackEsdsObjectTypeId(srcFile, srcTrackId), - oFormat - ); - } - - } else if (MP4_IS_AUDIO_TRACK_TYPE(trackType)) { - MP4SetAudioProfileLevel(dstFile, MP4GetAudioProfileLevel(srcFile)); - dstTrackId = MP4AddEncAudioTrack(dstFile, - MP4GetTrackTimeScale(srcFile, srcTrackId), - MP4GetTrackFixedSampleDuration(srcFile, - srcTrackId), - icPp, - MP4GetTrackEsdsObjectTypeId(srcFile, - srcTrackId) - ); - - } else if (MP4_IS_OD_TRACK_TYPE(trackType)) { - dstTrackId = MP4AddODTrack(dstFile); - - } else if (MP4_IS_SCENE_TRACK_TYPE(trackType)) { - dstTrackId = MP4AddSceneTrack(dstFile); - - } else if (MP4_IS_HINT_TRACK_TYPE(trackType)) { - if (dstHintTrackReferenceTrack == MP4_INVALID_TRACK_ID) { - dstTrackId = MP4_INVALID_TRACK_ID; - } else { - dstTrackId = MP4AddHintTrack(dstFile, - MP4GetHintTrackReferenceTrackId(srcFile, - srcTrackId)); - } - } else if (MP4_IS_SYSTEMS_TRACK_TYPE(trackType)) { - dstTrackId = MP4AddSystemsTrack(dstFile, trackType); - - } else { - dstTrackId = MP4AddTrack(dstFile, trackType); - } - - if (dstTrackId == MP4_INVALID_TRACK_ID) { - return dstTrackId; - } - - MP4SetTrackTimeScale(dstFile, - dstTrackId, - MP4GetTrackTimeScale(srcFile, srcTrackId)); - - if (MP4_IS_AUDIO_TRACK_TYPE(trackType) - || MP4_IS_VIDEO_TRACK_TYPE(trackType)) { - // copy track ES configuration - uint8_t* pConfig = NULL; - uint32_t configSize = 0; - if (MP4GetTrackESConfiguration(srcFile, srcTrackId, - &pConfig, &configSize)) { - - if (pConfig != NULL) { - MP4SetTrackESConfiguration(dstFile, dstTrackId, - pConfig, configSize); - } - } - if (pConfig != NULL) - free(pConfig); - } - - // Bill's change to MP4CloneTrack - if (MP4_IS_HINT_TRACK_TYPE(trackType)) { - // probably not exactly what is wanted - // but caller can adjust later to fit their desires - - char* payloadName = NULL; - char *encodingParms = NULL; - uint8_t payloadNumber; - uint16_t maxPayloadSize; - - if (MP4GetHintTrackRtpPayload( - srcFile, - srcTrackId, - &payloadName, - &payloadNumber, - &maxPayloadSize, - &encodingParms)) { - - (void)MP4SetHintTrackRtpPayload( - dstFile, - dstTrackId, - payloadName, - &payloadNumber, - maxPayloadSize, - encodingParms); - } -#if 0 - MP4SetHintTrackSdp( - dstFile, - dstTrackId, - MP4GetHintTrackSdp(srcFile, srcTrackId)); -#endif - } - - return dstTrackId; - } - - MP4TrackId MP4CopyTrack(MP4FileHandle srcFile, - MP4TrackId srcTrackId, - MP4FileHandle dstFile, - bool applyEdits, - MP4TrackId dstHintTrackReferenceTrack) - { - bool copySamples = true; // LATER allow false => reference samples - - MP4TrackId dstTrackId = - MP4CloneTrack(srcFile, srcTrackId, dstFile, dstHintTrackReferenceTrack); - - if (dstTrackId == MP4_INVALID_TRACK_ID) { - return dstTrackId; - } - - bool viaEdits = - applyEdits && MP4GetTrackNumberOfEdits(srcFile, srcTrackId); - - MP4SampleId sampleId = 0; - MP4SampleId numSamples = - MP4GetTrackNumberOfSamples(srcFile, srcTrackId); - - MP4Timestamp when = 0; - MP4Duration editsDuration = - MP4GetTrackEditTotalDuration(srcFile, srcTrackId); - - while (true) { - MP4Duration sampleDuration = MP4_INVALID_DURATION; - - if (viaEdits) { - sampleId = MP4GetSampleIdFromEditTime( - srcFile, - srcTrackId, - when, - NULL, - &sampleDuration); - - // in theory, this shouldn't happen - if (sampleId == MP4_INVALID_SAMPLE_ID) { - MP4DeleteTrack(dstFile, dstTrackId); - return MP4_INVALID_TRACK_ID; - } - - when += sampleDuration; - - if (when >= editsDuration) { - break; - } - } else { - sampleId++; - if (sampleId > numSamples) { - break; - } - } - - bool rc = false; - - if (copySamples) { - rc = MP4CopySample( - srcFile, - srcTrackId, - sampleId, - dstFile, - dstTrackId, - sampleDuration); - - } else { - rc = MP4ReferenceSample( - srcFile, - srcTrackId, - sampleId, - dstFile, - dstTrackId, - sampleDuration); - } - - if (!rc) { - MP4DeleteTrack(dstFile, dstTrackId); - return MP4_INVALID_TRACK_ID; - } - } - - return dstTrackId; - } - -// Given a source track in a source file, make an encrypted copy of -// the track in the destination file, including sample encryption - MP4TrackId MP4EncAndCopyTrack(MP4FileHandle srcFile, - MP4TrackId srcTrackId, - mp4v2_ismacrypParams *icPp, - encryptFunc_t encfcnp, - uint32_t encfcnparam1, - MP4FileHandle dstFile, - bool applyEdits, - MP4TrackId dstHintTrackReferenceTrack - ) - { - bool copySamples = true; // LATER allow false => reference samples - - MP4TrackId dstTrackId = - MP4EncAndCloneTrack(srcFile, srcTrackId, - icPp, - dstFile, dstHintTrackReferenceTrack); - - if (dstTrackId == MP4_INVALID_TRACK_ID) { - return dstTrackId; - } - - bool viaEdits = - applyEdits && MP4GetTrackNumberOfEdits(srcFile, srcTrackId); - - MP4SampleId sampleId = 0; - MP4SampleId numSamples = - MP4GetTrackNumberOfSamples(srcFile, srcTrackId); - - MP4Timestamp when = 0; - MP4Duration editsDuration = - MP4GetTrackEditTotalDuration(srcFile, srcTrackId); - - while (true) { - MP4Duration sampleDuration = MP4_INVALID_DURATION; - - if (viaEdits) { - sampleId = MP4GetSampleIdFromEditTime(srcFile, - srcTrackId, - when, - NULL, - &sampleDuration); - - // in theory, this shouldn't happen - if (sampleId == MP4_INVALID_SAMPLE_ID) { - MP4DeleteTrack(dstFile, dstTrackId); - return MP4_INVALID_TRACK_ID; - } - - when += sampleDuration; - - if (when >= editsDuration) { - break; - } - } else { - sampleId++; - if (sampleId > numSamples) { - break; - } - } - - bool rc = false; - - if (copySamples) { - // encrypt and copy - rc = MP4EncAndCopySample(srcFile, - srcTrackId, - sampleId, - encfcnp, - encfcnparam1, - dstFile, - dstTrackId, - sampleDuration); - - } else { - // not sure what these are - encrypt? - rc = MP4ReferenceSample(srcFile, - srcTrackId, - sampleId, - dstFile, - dstTrackId, - sampleDuration); - } - - if (!rc) { - MP4DeleteTrack(dstFile, dstTrackId); - return MP4_INVALID_TRACK_ID; - } - } - - return dstTrackId; - } - - bool MP4DeleteTrack( - MP4FileHandle hFile, - MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->DeleteTrack(trackId); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - uint32_t MP4GetNumberOfTracks( - MP4FileHandle hFile, - const char* type, - uint8_t subType) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetNumberOfTracks(type, subType); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - MP4TrackId MP4FindTrackId( - MP4FileHandle hFile, - uint16_t index, - const char* type, - uint8_t subType) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->FindTrackId(index, type, subType); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - uint16_t MP4FindTrackIndex( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->FindTrackIndex(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return (uint16_t)-1; - } - - /* specific track properties */ - - const char* MP4GetTrackType( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackType(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return NULL; - } - const char* MP4GetTrackMediaDataName( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackMediaDataName(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return NULL; - } - - bool MP4GetTrackMediaDataOriginalFormat( - MP4FileHandle hFile, MP4TrackId trackId, char *originalFormat, - uint32_t buflen) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - - return ((MP4File*)hFile)->GetTrackMediaDataOriginalFormat(trackId, - originalFormat, buflen); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - MP4Duration MP4GetTrackDuration( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackDuration(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_DURATION; - } - - uint32_t MP4GetTrackTimeScale( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackTimeScale(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - bool MP4SetTrackTimeScale( - MP4FileHandle hFile, MP4TrackId trackId, uint32_t value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetTrackTimeScale(trackId, value); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - uint8_t MP4GetTrackAudioMpeg4Type( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackAudioMpeg4Type(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_MPEG4_INVALID_AUDIO_TYPE; - } - - - -// Replacement to MP4GetTrackVideoType and MP4GetTrackAudioType -// Basically does the same thing but with a more self-explanatory name - uint8_t MP4GetTrackEsdsObjectTypeId( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - - return ((MP4File*)hFile)->GetTrackEsdsObjectTypeId(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_AUDIO_TYPE; - } - - MP4Duration MP4GetTrackFixedSampleDuration( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackFixedSampleDuration(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_DURATION; - } - - uint32_t MP4GetTrackBitRate( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - MP4File *pFile = (MP4File *)hFile; - try { - return pFile->GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.esds.decConfigDescr.avgBitrate"); - } - catch( Exception* x ) { - //mp4v2::impl::log.errorf(*x); we don't really need to print this. - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - // if we're here, we can't get the bitrate from above - - // lets calculate it - try { - MP4Duration trackDur; - trackDur = MP4GetTrackDuration(hFile, trackId); - uint64_t msDuration = - pFile->ConvertFromTrackDuration(trackId, trackDur, - MP4_MSECS_TIME_SCALE); - if (msDuration == 0) return 0; - - MP4Track *pTrack = pFile->GetTrack(trackId); - uint64_t bytes = pTrack->GetTotalOfSampleSizes(); - bytes *= UINT64_C(8000); // 8 * 1000 - bytes /= msDuration; - return (uint32_t)bytes; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - bool MP4GetTrackESConfiguration( - MP4FileHandle hFile, MP4TrackId trackId, - uint8_t** ppConfig, uint32_t* pConfigSize) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->GetTrackESConfiguration( - trackId, ppConfig, pConfigSize); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - *ppConfig = NULL; - *pConfigSize = 0; - return false; - } - bool MP4GetTrackVideoMetadata( - MP4FileHandle hFile, MP4TrackId trackId, - uint8_t** ppConfig, uint32_t* pConfigSize) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->GetTrackVideoMetadata( - trackId, ppConfig, pConfigSize); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - *ppConfig = NULL; - *pConfigSize = 0; - return false; - } - - bool MP4SetTrackESConfiguration( - MP4FileHandle hFile, MP4TrackId trackId, - const uint8_t* pConfig, uint32_t configSize) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetTrackESConfiguration( - trackId, pConfig, configSize); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4GetTrackH264ProfileLevel (MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t *pProfile, - uint8_t *pLevel) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - *pProfile = - ((MP4File *)hFile)->GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*[0].avcC.AVCProfileIndication"); - *pLevel = - ((MP4File *)hFile)->GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*[0].avcC.AVCLevelIndication"); - - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4GetTrackH264SeqPictHeaders (MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t ***pSeqHeader, - uint32_t **pSeqHeaderSize, - uint8_t ***pPictHeader, - uint32_t **pPictHeaderSize) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->GetTrackH264SeqPictHeaders(trackId, - pSeqHeader, - pSeqHeaderSize, - pPictHeader, - pPictHeaderSize); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - bool MP4GetTrackH264LengthSize (MP4FileHandle hFile, - MP4TrackId trackId, - uint32_t *pLength) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - *pLength = 1 + - ((MP4File*) hFile)->GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*[0].avcC.lengthSizeMinusOne"); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - MP4SampleId MP4GetTrackNumberOfSamples( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackNumberOfSamples(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - uint16_t MP4GetTrackVideoWidth( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.width"); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - uint16_t MP4GetTrackVideoHeight( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.height"); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - double MP4GetTrackVideoFrameRate( - MP4FileHandle hFile, MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackVideoFrameRate(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0.0; - } - - int MP4GetTrackAudioChannels (MP4FileHandle hFile, - MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackAudioChannels(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return -1; - } - -// returns true if the track is a media track encrypted according to ismacryp - bool MP4IsIsmaCrypMediaTrack( - MP4FileHandle hFile, MP4TrackId trackId) - { - bool retval = false; - MP4LogLevel verb = mp4v2::impl::log.verbosity; - mp4v2::impl::log.setVerbosity(MP4_LOG_NONE); - - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - retval = ((MP4File*)hFile)->IsIsmaCrypMediaTrack(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - mp4v2::impl::log.setVerbosity(verb); - return retval; - } - - - /* generic track properties */ - - bool MP4HaveTrackAtom (MP4FileHandle hFile, - MP4TrackId trackId, - const char *atomName) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->FindTrackAtom(trackId, atomName) != NULL; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4GetTrackIntegerProperty ( - MP4FileHandle hFile, MP4TrackId trackId, - const char* propName, - uint64_t *retvalue) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - *retvalue = ((MP4File*)hFile)->GetTrackIntegerProperty(trackId, - propName); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4GetTrackFloatProperty( - MP4FileHandle hFile, MP4TrackId trackId, - const char* propName, - float *retvalue) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - *retvalue = ((MP4File*)hFile)->GetTrackFloatProperty(trackId, propName); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4GetTrackStringProperty( - MP4FileHandle hFile, MP4TrackId trackId, - const char* propName, - const char **retvalue) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - *retvalue = ((MP4File*)hFile)->GetTrackStringProperty(trackId, propName); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4GetTrackBytesProperty( - MP4FileHandle hFile, MP4TrackId trackId, const char* propName, - uint8_t** ppValue, uint32_t* pValueSize) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->GetTrackBytesProperty( - trackId, propName, ppValue, pValueSize); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - *ppValue = NULL; - *pValueSize = 0; - return false; - } - - bool MP4SetTrackIntegerProperty( - MP4FileHandle hFile, MP4TrackId trackId, - const char* propName, int64_t value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetTrackIntegerProperty(trackId, - propName, value); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4SetTrackFloatProperty( - MP4FileHandle hFile, MP4TrackId trackId, - const char* propName, float value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetTrackFloatProperty(trackId, propName, value); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4SetTrackStringProperty( - MP4FileHandle hFile, MP4TrackId trackId, - const char* propName, const char* value) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetTrackStringProperty(trackId, propName, value); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4SetTrackBytesProperty( - MP4FileHandle hFile, MP4TrackId trackId, - const char* propName, const uint8_t* pValue, uint32_t valueSize) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetTrackBytesProperty( - trackId, propName, pValue, valueSize); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - /* sample operations */ - - bool MP4ReadSample( - /* input parameters */ - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId, - /* output parameters */ - uint8_t** ppBytes, - uint32_t* pNumBytes, - MP4Timestamp* pStartTime, - MP4Duration* pDuration, - MP4Duration* pRenderingOffset, - bool* pIsSyncSample) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->ReadSample( - trackId, - sampleId, - ppBytes, - pNumBytes, - pStartTime, - pDuration, - pRenderingOffset, - pIsSyncSample); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - *pNumBytes = 0; - return false; - } - - bool MP4ReadSampleFromTime( - /* input parameters */ - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Timestamp when, - /* output parameters */ - uint8_t** ppBytes, - uint32_t* pNumBytes, - MP4Timestamp* pStartTime, - MP4Duration* pDuration, - MP4Duration* pRenderingOffset, - bool* pIsSyncSample) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - MP4SampleId sampleId = - ((MP4File*)hFile)->GetSampleIdFromTime( - trackId, when, false); - - ((MP4File*)hFile)->ReadSample( - trackId, - sampleId, - ppBytes, - pNumBytes, - pStartTime, - pDuration, - pRenderingOffset, - pIsSyncSample); - - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - *pNumBytes = 0; - return false; - } - - bool MP4WriteSample( - MP4FileHandle hFile, - MP4TrackId trackId, - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration, - MP4Duration renderingOffset, - bool isSyncSample ) - { - if( MP4_IS_VALID_FILE_HANDLE( hFile )) { - try { - ((MP4File*)hFile)->WriteSample( - trackId, - pBytes, - numBytes, - duration, - renderingOffset, - isSyncSample ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4WriteSampleDependency( - MP4FileHandle hFile, - MP4TrackId trackId, - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration, - MP4Duration renderingOffset, - bool isSyncSample, - uint32_t dependencyFlags ) - { - if( MP4_IS_VALID_FILE_HANDLE( hFile )) { - try { - ((MP4File*)hFile)->WriteSampleDependency( - trackId, - pBytes, - numBytes, - duration, - renderingOffset, - isSyncSample, - dependencyFlags ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4CopySample( - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - MP4SampleId srcSampleId, - MP4FileHandle dstFile, - MP4TrackId dstTrackId, - MP4Duration dstSampleDuration ) - { - if( !MP4_IS_VALID_FILE_HANDLE( srcFile )) - return false; - - try { - MP4File::CopySample( - (MP4File*)srcFile, - srcTrackId, - srcSampleId, - (MP4File*)dstFile, - dstTrackId, - dstSampleDuration ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - - return false; - } - - bool MP4EncAndCopySample( - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - MP4SampleId srcSampleId, - encryptFunc_t encfcnp, - uint32_t encfcnparam1, - MP4FileHandle dstFile, - MP4TrackId dstTrackId, - MP4Duration dstSampleDuration) - { - if( !MP4_IS_VALID_FILE_HANDLE( srcFile )) - return false; - - try { - MP4File::EncAndCopySample( - (MP4File*)srcFile, - srcTrackId, - srcSampleId, - encfcnp, - encfcnparam1, - (MP4File*)dstFile, - dstTrackId, - dstSampleDuration ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - - return false; - } - - bool MP4ReferenceSample( - MP4FileHandle srcFile, - MP4TrackId srcTrackId, - MP4SampleId srcSampleId, - MP4FileHandle dstFile, - MP4TrackId dstTrackId, - MP4Duration dstSampleDuration) - { - // LATER Not yet implemented - return false; - } - - uint32_t MP4GetSampleSize( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetSampleSize( - trackId, sampleId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - uint32_t MP4GetTrackMaxSampleSize( - MP4FileHandle hFile, - MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackMaxSampleSize(trackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - MP4SampleId MP4GetSampleIdFromTime( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Timestamp when, - bool wantSyncSample) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetSampleIdFromTime( - trackId, when, wantSyncSample); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_SAMPLE_ID; - } - - MP4Timestamp MP4GetSampleTime( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetSampleTime( - trackId, sampleId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TIMESTAMP; - } - - MP4Duration MP4GetSampleDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetSampleDuration( - trackId, sampleId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_DURATION; - } - - MP4Duration MP4GetSampleRenderingOffset( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetSampleRenderingOffset( - trackId, sampleId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_DURATION; - } - - bool MP4SetSampleRenderingOffset( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId, - MP4Duration renderingOffset) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetSampleRenderingOffset( - trackId, sampleId, renderingOffset); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - int8_t MP4GetSampleSync( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4SampleId sampleId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetSampleSync( - trackId, sampleId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return -1; - } - - - uint64_t MP4ConvertFromMovieDuration( - MP4FileHandle hFile, - MP4Duration duration, - uint32_t timeScale) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->ConvertFromMovieDuration( - duration, timeScale); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return (uint64_t)MP4_INVALID_DURATION; - } - - uint64_t MP4ConvertFromTrackTimestamp( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Timestamp timeStamp, - uint32_t timeScale) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->ConvertFromTrackTimestamp( - trackId, timeStamp, timeScale); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return (uint64_t)MP4_INVALID_TIMESTAMP; - } - - MP4Timestamp MP4ConvertToTrackTimestamp( - MP4FileHandle hFile, - MP4TrackId trackId, - uint64_t timeStamp, - uint32_t timeScale) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->ConvertToTrackTimestamp( - trackId, timeStamp, timeScale); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TIMESTAMP; - } - - uint64_t MP4ConvertFromTrackDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Duration duration, - uint32_t timeScale) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->ConvertFromTrackDuration( - trackId, duration, timeScale); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return (uint64_t)MP4_INVALID_DURATION; - } - - MP4Duration MP4ConvertToTrackDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - uint64_t duration, - uint32_t timeScale) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->ConvertToTrackDuration( - trackId, duration, timeScale); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_DURATION; - } - - bool MP4GetHintTrackRtpPayload( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - char** ppPayloadName, - uint8_t* pPayloadNumber, - uint16_t* pMaxPayloadSize, - char **ppEncodingParams) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->GetHintTrackRtpPayload( - hintTrackId, ppPayloadName, pPayloadNumber, pMaxPayloadSize, - ppEncodingParams); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4SetHintTrackRtpPayload( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - const char* pPayloadName, - uint8_t* pPayloadNumber, - uint16_t maxPayloadSize, - const char *encode_params, - bool include_rtp_map, - bool include_mpeg4_esid) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetHintTrackRtpPayload( - hintTrackId, pPayloadName, pPayloadNumber, maxPayloadSize, encode_params, - include_rtp_map, include_mpeg4_esid); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - const char* MP4GetSessionSdp( - MP4FileHandle hFile) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetSessionSdp(); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return NULL; - } - - bool MP4SetSessionSdp( - MP4FileHandle hFile, - const char* sdpString) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetSessionSdp(sdpString); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4AppendSessionSdp( - MP4FileHandle hFile, - const char* sdpString) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->AppendSessionSdp(sdpString); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - const char* MP4GetHintTrackSdp( - MP4FileHandle hFile, - MP4TrackId hintTrackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetHintTrackSdp(hintTrackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return NULL; - } - - bool MP4SetHintTrackSdp( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - const char* sdpString) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetHintTrackSdp(hintTrackId, sdpString); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4AppendHintTrackSdp( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - const char* sdpString) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->AppendHintTrackSdp(hintTrackId, sdpString); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - MP4TrackId MP4GetHintTrackReferenceTrackId( - MP4FileHandle hFile, - MP4TrackId hintTrackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)-> - GetHintTrackReferenceTrackId(hintTrackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TRACK_ID; - } - - bool MP4ReadRtpHint( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - MP4SampleId hintSampleId, - uint16_t* pNumPackets) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->ReadRtpHint( - hintTrackId, hintSampleId, pNumPackets); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - uint16_t MP4GetRtpHintNumberOfPackets( - MP4FileHandle hFile, - MP4TrackId hintTrackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetRtpHintNumberOfPackets(hintTrackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - int8_t MP4GetRtpPacketBFrame( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - uint16_t packetIndex) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)-> - GetRtpPacketBFrame(hintTrackId, packetIndex); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return -1; - } - - int32_t MP4GetRtpPacketTransmitOffset( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - uint16_t packetIndex) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)-> - GetRtpPacketTransmitOffset(hintTrackId, packetIndex); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - bool MP4ReadRtpPacket( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - uint16_t packetIndex, - uint8_t** ppBytes, - uint32_t* pNumBytes, - uint32_t ssrc, - bool includeHeader, - bool includePayload) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->ReadRtpPacket( - hintTrackId, packetIndex, - ppBytes, pNumBytes, - ssrc, includeHeader, includePayload); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - MP4Timestamp MP4GetRtpTimestampStart( - MP4FileHandle hFile, - MP4TrackId hintTrackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetRtpTimestampStart(hintTrackId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TIMESTAMP; - } - - bool MP4SetRtpTimestampStart( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - MP4Timestamp rtpStart) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetRtpTimestampStart( - hintTrackId, rtpStart); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4AddRtpHint( - MP4FileHandle hFile, - MP4TrackId hintTrackId) - { - return MP4AddRtpVideoHint(hFile, hintTrackId, false, 0); - } - - bool MP4AddRtpVideoHint( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - bool isBframe, - uint32_t timestampOffset) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->AddRtpHint(hintTrackId, - isBframe, timestampOffset); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4AddRtpPacket( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - bool setMbit, - int32_t transmitOffset) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->AddRtpPacket( - hintTrackId, setMbit, transmitOffset); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4AddRtpImmediateData( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - const uint8_t* pBytes, - uint32_t numBytes) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->AddRtpImmediateData(hintTrackId, - pBytes, numBytes); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4AddRtpSampleData( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - MP4SampleId sampleId, - uint32_t dataOffset, - uint32_t dataLength) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->AddRtpSampleData( - hintTrackId, sampleId, dataOffset, dataLength); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4AddRtpESConfigurationPacket( - MP4FileHandle hFile, - MP4TrackId hintTrackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->AddRtpESConfigurationPacket(hintTrackId); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4WriteRtpHint( - MP4FileHandle hFile, - MP4TrackId hintTrackId, - MP4Duration duration, - bool isSyncSample) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->WriteRtpHint( - hintTrackId, duration, isSyncSample); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf( "%s: failed", __FUNCTION__ ); - } - } - return false; - } - /* 3GPP specific operations */ - - bool MP4Make3GPCompliant( - const char* fileName, - char* majorBrand, - uint32_t minorVersion, - char** supportedBrands, - uint32_t supportedBrandsCount, - bool deleteIodsAtom) - { - if (!fileName) - return false; - - MP4File* pFile = ConstructMP4File(); - if (!pFile) - return MP4_INVALID_FILE_HANDLE; - - try { - ASSERT(pFile); - pFile->Modify(fileName); - pFile->Make3GPCompliant(fileName, majorBrand, minorVersion, supportedBrands, supportedBrandsCount, deleteIodsAtom); - pFile->Close(); - delete pFile; - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - if (pFile) - delete pFile; - return false; - } - - /* ISMA specific operations */ - - bool MP4MakeIsmaCompliant( - const char* fileName, - bool addIsmaComplianceSdp) - { - if (!fileName) - return false; - - MP4File* pFile = ConstructMP4File(); - if (!pFile) - return MP4_INVALID_FILE_HANDLE; - - try { - ASSERT(pFile); - pFile->Modify(fileName); - pFile->MakeIsmaCompliant(addIsmaComplianceSdp); - pFile->Close(); - delete pFile; - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: \"%s\": failed", __FUNCTION__, - fileName ); - } - - if (pFile) - delete pFile; - return false; - } - - char* MP4MakeIsmaSdpIod( - uint8_t videoProfile, - uint32_t videoBitrate, - uint8_t* videoConfig, - uint32_t videoConfigLength, - uint8_t audioProfile, - uint32_t audioBitrate, - uint8_t* audioConfig, - uint32_t audioConfigLength) - - { - MP4File* pFile = ConstructMP4File(); - if (!pFile) - return NULL; - - try { - uint8_t* pBytes = NULL; - uint64_t numBytes = 0; - - ASSERT(pFile); - pFile->CreateIsmaIodFromParams( - videoProfile, - videoBitrate, - videoConfig, - videoConfigLength, - audioProfile, - audioBitrate, - audioConfig, - audioConfigLength, - &pBytes, - &numBytes); - - char* iodBase64 = - MP4ToBase64(pBytes, numBytes); - MP4Free(pBytes); - - char* sdpIod = - (char*)MP4Malloc(strlen(iodBase64) + 64); - snprintf(sdpIod, strlen(iodBase64) + 64, - "a=mpeg4-iod: \042data:application/mpeg4-iod;base64,%s\042", - iodBase64); - MP4Free(iodBase64); - - delete pFile; - - return sdpIod; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - if (pFile) - delete pFile; - return NULL; - } - - /* Edit list */ - - MP4EditId MP4AddTrackEdit( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId, - MP4Timestamp startTime, - MP4Duration duration, - bool dwell) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - MP4EditId newEditId = - ((MP4File*)hFile)->AddTrackEdit(trackId, editId); - - if (newEditId != MP4_INVALID_EDIT_ID) { - ((MP4File*)hFile)->SetTrackEditMediaStart( - trackId, newEditId, startTime); - ((MP4File*)hFile)->SetTrackEditDuration( - trackId, newEditId, duration); - ((MP4File*)hFile)->SetTrackEditDwell( - trackId, newEditId, dwell); - } - - return newEditId; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_EDIT_ID; - } - - bool MP4DeleteTrackEdit( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->DeleteTrackEdit(trackId, editId); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return false; - } - - uint32_t MP4GetTrackNumberOfEdits( - MP4FileHandle hFile, - MP4TrackId trackId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackNumberOfEdits(trackId); - } - catch( Exception* x ) { - //mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return 0; - } - - MP4Timestamp MP4GetTrackEditMediaStart( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackEditMediaStart( - trackId, editId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_TIMESTAMP; - } - - MP4Duration MP4GetTrackEditTotalDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackEditTotalDuration( - trackId, editId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_DURATION; - } - - bool MP4SetTrackEditMediaStart( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId, - MP4Timestamp startTime) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetTrackEditMediaStart( - trackId, editId, startTime); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return false; - } - - MP4Duration MP4GetTrackEditDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackEditDuration(trackId, editId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_DURATION; - } - - bool MP4SetTrackEditDuration( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId, - MP4Duration duration) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetTrackEditDuration(trackId, editId, duration); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return false; - } - - int8_t MP4GetTrackEditDwell( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetTrackEditDwell(trackId, editId); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return -1; - } - - bool MP4SetTrackEditDwell( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4EditId editId, - bool dwell) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - ((MP4File*)hFile)->SetTrackEditDwell(trackId, editId, dwell); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return false; - } - - bool MP4ReadSampleFromEditTime( - /* input parameters */ - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Timestamp when, - /* output parameters */ - uint8_t** ppBytes, - uint32_t* pNumBytes, - MP4Timestamp* pStartTime, - MP4Duration* pDuration, - MP4Duration* pRenderingOffset, - bool* pIsSyncSample) - { - MP4SampleId sampleId = - MP4GetSampleIdFromEditTime( - hFile, - trackId, - when, - pStartTime, - pDuration); - - return MP4ReadSample( - hFile, - trackId, - sampleId, - ppBytes, - pNumBytes, - NULL, - NULL, - pRenderingOffset, - pIsSyncSample); - } - - MP4SampleId MP4GetSampleIdFromEditTime( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Timestamp when, - MP4Timestamp* pStartTime, - MP4Duration* pDuration) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { - return ((MP4File*)hFile)->GetSampleIdFromEditTime( - trackId, when, pStartTime, pDuration); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return MP4_INVALID_SAMPLE_ID; - } - - /* Utlities */ - - char* MP4BinaryToBase16( - const uint8_t* pData, - uint32_t dataSize) - { - if (pData || dataSize == 0) { - try { - return MP4ToBase16(pData, dataSize); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return NULL; - } - - char* MP4BinaryToBase64( - const uint8_t* pData, - uint32_t dataSize) - { - if (pData || dataSize == 0) { - try { - return MP4ToBase64(pData, dataSize); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - } - return NULL; - } - - void MP4Free (void *p) - { - if (p != NULL) - free(p); - } - - bool MP4AddIPodUUID (MP4FileHandle hFile, MP4TrackId trackId) - { - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - MP4Track* track = NULL; - MP4Atom* avc1 = NULL; - - try - { - track = ((MP4File*)hFile)->GetTrack(trackId); - ASSERT(track); - avc1 = track->GetTrakAtom().FindChildAtom("mdia.minf.stbl.stsd.avc1"); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - return false; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - return false; - } - - IPodUUIDAtom *ipod_uuid = NULL; - try - { - ipod_uuid = new IPodUUIDAtom(*(MP4File*)hFile); - } - catch( std::bad_alloc ) { - mp4v2::impl::log.errorf("%s: unable to allocate IPodUUIDAtom", __FUNCTION__); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - return false; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: unknown exception constructing IPodUUIDAtom", __FUNCTION__ ); - return false; - } - - try - { - ASSERT(avc1); - ASSERT(ipod_uuid); - avc1->AddChildAtom(ipod_uuid); - return true; - } - catch( Exception* x ) { - delete ipod_uuid; - ipod_uuid = NULL; - mp4v2::impl::log.errorf(*x); - delete x; - return false; - } - catch( ... ) { - delete ipod_uuid; - ipod_uuid = NULL; - mp4v2::impl::log.errorf("%s: unknown exception adding IPodUUIDAtom", __FUNCTION__ ); - return false; - } - - return false; - } - -/////////////////////////////////////////////////////////////////////////////// - -bool MP4GetTrackLanguage( - MP4FileHandle hFile, - MP4TrackId trackId, - char* code ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - try { - return ((MP4File*)hFile)->GetTrackLanguage( trackId, code ); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool MP4SetTrackLanguage( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* code ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - try { - return ((MP4File*)hFile)->SetTrackLanguage( trackId, code ); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool MP4GetTrackName( - MP4FileHandle hFile, - MP4TrackId trackId, - char** name ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - try { - return ((MP4File*)hFile)->GetTrackName( trackId, name ); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool MP4SetTrackName( - MP4FileHandle hFile, - MP4TrackId trackId, - const char* code ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - try { - return ((MP4File*)hFile)->SetTrackName( trackId, code ); - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool MP4GetTrackDurationPerChunk( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Duration* duration ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - if (!duration) - return false; - - try { - *duration = ((MP4File*)hFile)->GetTrackDurationPerChunk( trackId ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool MP4SetTrackDurationPerChunk( - MP4FileHandle hFile, - MP4TrackId trackId, - MP4Duration duration ) -{ - if( !MP4_IS_VALID_FILE_HANDLE( hFile )) - return false; - - try { - ((MP4File*)hFile)->SetTrackDurationPerChunk( trackId, duration ); - return true; - } - catch( Exception* x ) { - mp4v2::impl::log.errorf(*x); - delete x; - } - catch( ... ) { - mp4v2::impl::log.errorf("%s: failed", __FUNCTION__ ); - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -} // extern "C" diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4array.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4array.h deleted file mode 100644 index c49d59ba..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4array.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#ifndef MP4V2_IMPL_MP4ARRAY_H -#define MP4V2_IMPL_MP4ARRAY_H - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -typedef uint32_t MP4ArrayIndex; - -class MP4Array { -public: - MP4Array() { - m_numElements = 0; - m_maxNumElements = 0; - } - - inline bool ValidIndex(MP4ArrayIndex index) { - return (index < m_numElements); - } - - inline MP4ArrayIndex Size(void) { - return m_numElements; - } - - inline MP4ArrayIndex MaxSize(void) { - return m_maxNumElements; - } - -protected: - MP4ArrayIndex m_numElements; - MP4ArrayIndex m_maxNumElements; -}; - -// macro to generate subclasses -// we use this as an alternative to templates -// due to the excessive compile time price of extensive template usage - -#define MP4ARRAY_DECL(name, type) \ - class name##Array : public MP4Array { \ - public: \ - name##Array() { \ - m_elements = NULL; \ - } \ - \ - ~name##Array() { \ - MP4Free(m_elements); \ - } \ - \ - inline void Add(type newElement) { \ - Insert(newElement, m_numElements); \ - } \ - \ - void Insert(type newElement, MP4ArrayIndex newIndex) { \ - if (newIndex > m_numElements) { \ - throw new PlatformException("illegal array index", ERANGE, __FILE__, __LINE__, __FUNCTION__); \ - } \ - if (m_numElements == m_maxNumElements) { \ - m_maxNumElements = max(m_maxNumElements, (MP4ArrayIndex)1) * 2; \ - m_elements = (type*)MP4Realloc(m_elements, \ - m_maxNumElements * sizeof(type)); \ - } \ - memmove(&m_elements[newIndex + 1], &m_elements[newIndex], \ - (m_numElements - newIndex) * sizeof(type)); \ - m_elements[newIndex] = newElement; \ - m_numElements++; \ - } \ - \ - void Delete(MP4ArrayIndex index) { \ - if (!ValidIndex(index)) { \ - ostringstream msg; \ - msg << "illegal array index: " << index << " of " << m_numElements; \ - throw new PlatformException(msg.str().c_str(), ERANGE, __FILE__, __LINE__, __FUNCTION__); \ - } \ - m_numElements--; \ - if (index < m_numElements) { \ - memmove(&m_elements[index], &m_elements[index + 1], \ - (m_numElements - index) * sizeof(type)); \ - } \ - } \ - void Resize(MP4ArrayIndex newSize) { \ - m_numElements = newSize; \ - m_maxNumElements = newSize; \ - m_elements = (type*)MP4Realloc(m_elements, \ - m_maxNumElements * sizeof(type)); \ - } \ - \ - type& operator[](MP4ArrayIndex index) { \ - if (ValidIndex(index)) { \ - return m_elements[index]; \ - } \ - else { \ - ostringstream msg; \ - msg << "illegal array index: " << index << " of " << m_numElements; \ - throw new PlatformException(msg.str().c_str(), ERANGE, __FILE__, __LINE__, __FUNCTION__ ); \ - } \ - } \ - \ - protected: \ - type* m_elements; \ - }; - -MP4ARRAY_DECL(MP4Integer8, uint8_t) - -MP4ARRAY_DECL(MP4Integer16, uint16_t) - -MP4ARRAY_DECL(MP4Integer32, uint32_t) - -MP4ARRAY_DECL(MP4Integer64, uint64_t) - -MP4ARRAY_DECL(MP4Float32, float) - -MP4ARRAY_DECL(MP4Float64, double) - -MP4ARRAY_DECL(MP4String, char*) - -MP4ARRAY_DECL(MP4Bytes, uint8_t*) - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_MP4ARRAY_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4atom.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4atom.cpp deleted file mode 100644 index 520cbc87..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4atom.cpp +++ /dev/null @@ -1,1017 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001 - 2004. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Portions created by Adnecto d.o.o. are - * Copyright (C) Adnecto d.o.o. 2005. All Rights Reserved - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Alix Marchandise-Franquet alix@cisco.com - * Ximpo Group Ltd. mp4v2@ximpo.com - * Danijel Kopcinovic danijel.kopcinovic@adnecto.net - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4AtomInfo::MP4AtomInfo(const char* name, bool mandatory, bool onlyOne) -{ - m_name = name; - m_mandatory = mandatory; - m_onlyOne = onlyOne; - m_count = 0; -} - -MP4Atom::MP4Atom(MP4File& file, const char* type) - : m_File(file) -{ - SetType(type); - m_unknownType = false; - m_start = 0; - m_end = 0; - m_largesizeMode = false; - m_size = 0; - m_pParentAtom = NULL; - m_depth = 0xFF; -} - -MP4Atom::~MP4Atom() -{ - uint32_t i; - - for (i = 0; i < m_pProperties.Size(); i++) { - delete m_pProperties[i]; - } - for (i = 0; i < m_pChildAtomInfos.Size(); i++) { - delete m_pChildAtomInfos[i]; - } - for (i = 0; i < m_pChildAtoms.Size(); i++) { - delete m_pChildAtoms[i]; - } -} - -MP4Atom* MP4Atom::CreateAtom( MP4File &file, MP4Atom* parent, const char* type ) -{ - MP4Atom* atom = factory( file, parent, type ); - ASSERT( atom ); - return atom; -} - -// generate a skeletal self - -void MP4Atom::Generate() -{ - uint32_t i; - - // for all properties - for (i = 0; i < m_pProperties.Size(); i++) { - // ask it to self generate - m_pProperties[i]->Generate(); - } - - // for all mandatory, single child atom types - for (i = 0; i < m_pChildAtomInfos.Size(); i++) { - if (m_pChildAtomInfos[i]->m_mandatory - && m_pChildAtomInfos[i]->m_onlyOne) { - - // create the mandatory, single child atom - MP4Atom* pChildAtom = - CreateAtom(m_File, this, m_pChildAtomInfos[i]->m_name); - - AddChildAtom(pChildAtom); - - // and ask it to self generate - pChildAtom->Generate(); - } - } -} - -MP4Atom* MP4Atom::ReadAtom(MP4File& file, MP4Atom* pParentAtom) -{ - uint8_t hdrSize = 8; - uint8_t extendedType[16]; - - uint64_t pos = file.GetPosition(); - - log.verbose1f("\"%s\": pos = 0x%" PRIx64, file.GetFilename().c_str(), pos); - - uint64_t dataSize = file.ReadUInt32(); - - char type[5]; - file.ReadBytes((uint8_t*)&type[0], 4); - type[4] = '\0'; - - // extended size - const bool largesizeMode = (dataSize == 1); - if (dataSize == 1) { - dataSize = file.ReadUInt64(); - hdrSize += 8; - file.Check64BitStatus(type); - } - - // extended type - if (ATOMID(type) == ATOMID("uuid")) { - file.ReadBytes(extendedType, sizeof(extendedType)); - hdrSize += sizeof(extendedType); - } - - if (dataSize == 0) { - // extends to EOF - dataSize = file.GetSize() - pos; - } - - dataSize -= hdrSize; - - log.verbose1f("\"%s\": type = \"%s\" data-size = %" PRIu64 " (0x%" PRIx64 ") hdr %u", - file.GetFilename().c_str(), type, dataSize, dataSize, hdrSize); - - if (pos + hdrSize + dataSize > pParentAtom->GetEnd()) { - log.errorf("%s: \"%s\": invalid atom size, extends outside parent atom - skipping to end of \"%s\" \"%s\" %" PRIu64 " vs %" PRIu64, - __FUNCTION__, file.GetFilename().c_str(), pParentAtom->GetType(), type, - pos + hdrSize + dataSize, - pParentAtom->GetEnd()); - log.verbose1f("\"%s\": parent %s (%" PRIu64 ") pos %" PRIu64 " hdr %d data %" PRIu64 " sum %" PRIu64, - file.GetFilename().c_str(), pParentAtom->GetType(), - pParentAtom->GetEnd(), - pos, - hdrSize, - dataSize, - pos + hdrSize + dataSize); - - // skip to end of atom - dataSize = pParentAtom->GetEnd() - pos - hdrSize; - } - - MP4Atom* pAtom = CreateAtom(file, pParentAtom, type); - // pAtom->SetFile(pFile); - pAtom->SetStart(pos); - pAtom->SetEnd(pos + hdrSize + dataSize); - pAtom->SetLargesizeMode(largesizeMode); - pAtom->SetSize(dataSize); - if (ATOMID(type) == ATOMID("uuid")) { - pAtom->SetExtendedType(extendedType); - } - if (pAtom->IsUnknownType()) { - if (!IsReasonableType(pAtom->GetType())) { - log.warningf("%s: \"%s\": atom type %s is suspect", __FUNCTION__, file.GetFilename().c_str(), - pAtom->GetType()); - } else { - log.verbose1f("\"%s\": Info: atom type %s is unknown", file.GetFilename().c_str(), - pAtom->GetType()); - } - - if (dataSize > 0) { - pAtom->AddProperty( - new MP4BytesProperty(*pAtom, "data", dataSize)); - } - } - - pAtom->SetParentAtom(pParentAtom); - - try { - pAtom->Read(); - } - catch (Exception* x) { - // delete atom and rethrow so we don't leak memory. - delete pAtom; - throw x; - } - - - return pAtom; -} - -bool MP4Atom::IsReasonableType(const char* type) -{ - // Unwound this. Pricy when called a lot. - if( isalnum((unsigned char) type[0])) { - if( isalnum((unsigned char) type[1])) { - if( isalnum((unsigned char) type[2])) { - if( isalnum((unsigned char) type[3]) || type[3] == ' ' ) { - return true; - } - } - } - } - - return false; -} - -// generic read -void MP4Atom::Read() -{ - if (ATOMID(m_type) != 0 && m_size > 1000000) { - log.verbose1f("%s: \"%s\": %s atom size %" PRIu64 " is suspect", __FUNCTION__, - m_File.GetFilename().c_str(), m_type, m_size); - } - - ReadProperties(); - - // read child atoms, if we expect there to be some - if (m_pChildAtomInfos.Size() > 0) { - ReadChildAtoms(); - } - - Skip(); // to end of atom -} - -void MP4Atom::Skip() -{ - if (m_File.GetPosition() != m_end) { - log.verbose1f("\"%s\": Skip: %" PRIu64 " bytes", - m_File.GetFilename().c_str(), m_end - m_File.GetPosition()); - } - m_File.SetPosition(m_end); -} - -MP4Atom* MP4Atom::FindAtom(const char* name) -{ - if (!IsMe(name)) { - return NULL; - } - - if (!IsRootAtom()) { - log.verbose1f("\"%s\": FindAtom: matched %s", - GetFile().GetFilename().c_str(), name); - - name = MP4NameAfterFirst(name); - - // I'm the sought after atom - if (name == NULL) { - return this; - } - } - - // else it's one of my children - return FindChildAtom(name); -} - -bool MP4Atom::FindProperty(const char *name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if (!IsMe(name)) { - return false; - } - - if (!IsRootAtom()) { - log.verbose1f("\"%s\": FindProperty: matched %s", - GetFile().GetFilename().c_str(), name); - - name = MP4NameAfterFirst(name); - - // no property name given - if (name == NULL) { - return false; - } - } - - return FindContainedProperty(name, ppProperty, pIndex); -} - -bool MP4Atom::IsMe(const char* name) -{ - if (name == NULL) { - return false; - } - - // root atom always matches - if (!strcmp(m_type, "")) { - return true; - } - - // check if our atom name is specified as the first component - if (!MP4NameFirstMatches(m_type, name)) { - return false; - } - - return true; -} - -MP4Atom* MP4Atom::FindChildAtom(const char* name) -{ - uint32_t atomIndex = 0; - - // get the index if we have one, e.g. moov.trak[2].mdia... - (void)MP4NameFirstIndex(name, &atomIndex); - - // need to get to the index'th child atom of the right type - for (uint32_t i = 0; i < m_pChildAtoms.Size(); i++) { - if (MP4NameFirstMatches(m_pChildAtoms[i]->GetType(), name)) { - if (atomIndex == 0) { - // this is the one, ask it to match - return m_pChildAtoms[i]->FindAtom(name); - } - atomIndex--; - } - } - - return NULL; -} - -bool MP4Atom::FindContainedProperty(const char *name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - uint32_t numProperties = m_pProperties.Size(); - uint32_t i; - // check all of our properties - for (i = 0; i < numProperties; i++) { - if (m_pProperties[i]->FindProperty(name, ppProperty, pIndex)) { - return true; - } - } - - // not one of our properties, - // presumably one of our children's properties - // check child atoms... - - // check if we have an index, e.g. trak[2].mdia... - uint32_t atomIndex = 0; - (void)MP4NameFirstIndex(name, &atomIndex); - - // need to get to the index'th child atom of the right type - for (i = 0; i < m_pChildAtoms.Size(); i++) { - if (MP4NameFirstMatches(m_pChildAtoms[i]->GetType(), name)) { - if (atomIndex == 0) { - // this is the one, ask it to match - return m_pChildAtoms[i]->FindProperty(name, ppProperty, pIndex); - } - atomIndex--; - } - } - - log.verbose1f("\"%s\": FindProperty: no match for %s", - GetFile().GetFilename().c_str(), name); - return false; -} - -void MP4Atom::ReadProperties(uint32_t startIndex, uint32_t count) -{ - uint32_t numProperties = min(count, m_pProperties.Size() - startIndex); - - // read any properties of the atom - for (uint32_t i = startIndex; i < startIndex + numProperties; i++) { - - m_pProperties[i]->Read(m_File); - - if (m_File.GetPosition() > m_end) { - log.verbose1f("ReadProperties: insufficient data for property: %s pos 0x%" PRIx64 " atom end 0x%" PRIx64, - m_pProperties[i]->GetName(), - m_File.GetPosition(), m_end); - - ostringstream oss; - oss << "atom '" << GetType() << "' is too small; overrun at property: " << m_pProperties[i]->GetName(); - throw new Exception( oss.str().c_str(), __FILE__, __LINE__, __FUNCTION__ ); - } - - MP4LogLevel thisVerbosity = - (m_pProperties[i]->GetType() == TableProperty) ? - MP4_LOG_VERBOSE2 : MP4_LOG_VERBOSE1; - - if (log.verbosity >= thisVerbosity) { - // log.printf(thisVerbosity,"Read: "); - m_pProperties[i]->Dump(0, true); - } - } -} - -void MP4Atom::ReadChildAtoms() -{ - bool this_is_udta = ATOMID(m_type) == ATOMID("udta"); - - log.verbose1f("\"%s\": of %s", m_File.GetFilename().c_str(), m_type[0] ? m_type : "root"); - for (uint64_t position = m_File.GetPosition(); - position < m_end; - position = m_File.GetPosition()) { - // make sure that we have enough to read at least 8 bytes - // size and type. - if (m_end - position < 2 * sizeof(uint32_t)) { - // if we're reading udta, it's okay to have 4 bytes of 0 - if (this_is_udta && - m_end - position == sizeof(uint32_t)) { - uint32_t mbz = m_File.ReadUInt32(); - if (mbz != 0) { - log.warningf("%s: \"%s\": In udta atom, end value is not zero %x", __FUNCTION__, - m_File.GetFilename().c_str(), mbz); - } - continue; - } - // otherwise, output a warning, but don't care - log.warningf("%s: \"%s\": In %s atom, extra %" PRId64 " bytes at end of atom", __FUNCTION__, - m_File.GetFilename().c_str(), m_type, (m_end - position)); - for (uint64_t ix = 0; ix < m_end - position; ix++) { - (void)m_File.ReadUInt8(); - } - continue; - } - MP4Atom* pChildAtom = MP4Atom::ReadAtom(m_File, this); - - AddChildAtom(pChildAtom); - - MP4AtomInfo* pChildAtomInfo = FindAtomInfo(pChildAtom->GetType()); - - // if child atom is of known type - // but not expected here print warning - if (pChildAtomInfo == NULL && !pChildAtom->IsUnknownType()) { - log.verbose1f("%s: \"%s\": In atom %s unexpected child atom %s", __FUNCTION__, - m_File.GetFilename().c_str(), GetType(), pChildAtom->GetType()); - } - - // if child atoms should have just one instance - // and this is more than one, print warning - if (pChildAtomInfo) { - pChildAtomInfo->m_count++; - - if (pChildAtomInfo->m_onlyOne && pChildAtomInfo->m_count > 1) { - log.warningf("%s: \"%s\": In atom %s multiple child atoms %s", __FUNCTION__, - m_File.GetFilename().c_str(), GetType(), pChildAtom->GetType()); - } - } - - } - - // if mandatory child atom doesn't exist, print warning - uint32_t numAtomInfo = m_pChildAtomInfos.Size(); - for (uint32_t i = 0; i < numAtomInfo; i++) { - if (m_pChildAtomInfos[i]->m_mandatory - && m_pChildAtomInfos[i]->m_count == 0) { - log.warningf("%s: \"%s\": In atom %s missing child atom %s", __FUNCTION__, - m_File.GetFilename().c_str(), GetType(), m_pChildAtomInfos[i]->m_name); - } - } - - log.verbose1f("\"%s\": finished %s", m_File.GetFilename().c_str(), m_type); -} - -MP4AtomInfo* MP4Atom::FindAtomInfo(const char* name) -{ - uint32_t numAtomInfo = m_pChildAtomInfos.Size(); - for (uint32_t i = 0; i < numAtomInfo; i++) { - if (ATOMID(m_pChildAtomInfos[i]->m_name) == ATOMID(name)) { - return m_pChildAtomInfos[i]; - } - } - return NULL; -} - -// generic write -void MP4Atom::Write() -{ - BeginWrite(); - - WriteProperties(); - - WriteChildAtoms(); - - FinishWrite(); -} - -void MP4Atom::Rewrite() -{ - if (!m_end) { - // This atom hasn't been written yet... - return; - } - - uint64_t fPos = m_File.GetPosition(); - m_File.SetPosition(GetStart()); - Write(); - m_File.SetPosition(fPos); -} - -void MP4Atom::BeginWrite(bool use64) -{ - m_start = m_File.GetPosition(); - //use64 = m_File.Use64Bits(); - if (use64) { - m_File.WriteUInt32(1); - } else { - m_File.WriteUInt32(0); - } - m_File.WriteBytes((uint8_t*)&m_type[0], 4); - if (use64) { - m_File.WriteUInt64(0); - } - if (ATOMID(m_type) == ATOMID("uuid")) { - m_File.WriteBytes(m_extendedType, sizeof(m_extendedType)); - } -} - -void MP4Atom::FinishWrite(bool use64) -{ - m_end = m_File.GetPosition(); - m_size = (m_end - m_start); - - log.verbose1f("end: type %s %" PRIu64 " %" PRIu64 " size %" PRIu64, - m_type,m_start, m_end, m_size); - //use64 = m_File.Use64Bits(); - if (use64) { - m_File.SetPosition(m_start + 8); - m_File.WriteUInt64(m_size); - } else { - ASSERT(m_size <= (uint64_t)0xFFFFFFFF); - m_File.SetPosition(m_start); - m_File.WriteUInt32(m_size); - } - m_File.SetPosition(m_end); - - // adjust size to just reflect data portion of atom - m_size -= (use64 ? 16 : 8); - if (ATOMID(m_type) == ATOMID("uuid")) { - m_size -= sizeof(m_extendedType); - } -} - -void MP4Atom::WriteProperties(uint32_t startIndex, uint32_t count) -{ - uint32_t numProperties = min(count, m_pProperties.Size() - startIndex); - - log.verbose1f("Write: \"%s\": type %s", m_File.GetFilename().c_str(), m_type); - - for (uint32_t i = startIndex; i < startIndex + numProperties; i++) { - m_pProperties[i]->Write(m_File); - - MP4LogLevel thisVerbosity = - (m_pProperties[i]->GetType() == TableProperty) ? - MP4_LOG_VERBOSE2 : MP4_LOG_VERBOSE1; - - if (log.verbosity >= thisVerbosity) { - log.printf(thisVerbosity,"Write: "); - m_pProperties[i]->Dump(0, false); - } - } -} - -void MP4Atom::WriteChildAtoms() -{ - uint32_t size = m_pChildAtoms.Size(); - for (uint32_t i = 0; i < size; i++) { - m_pChildAtoms[i]->Write(); - } - - log.verbose1f("Write: \"%s\": finished %s", m_File.GetFilename().c_str(), m_type); -} - -void MP4Atom::AddProperty(MP4Property* pProperty) -{ - ASSERT(pProperty); - m_pProperties.Add(pProperty); -} - -void MP4Atom::AddVersionAndFlags() -{ - AddProperty(new MP4Integer8Property(*this, "version")); - AddProperty(new MP4Integer24Property(*this, "flags")); -} - -void MP4Atom::AddReserved(MP4Atom& parentAtom, const char* name, uint32_t size) -{ - MP4BytesProperty* pReserved = new MP4BytesProperty(parentAtom, name, size); - pReserved->SetReadOnly(); - AddProperty(pReserved); -} - -void MP4Atom::ExpectChildAtom(const char* name, bool mandatory, bool onlyOne) -{ - m_pChildAtomInfos.Add(new MP4AtomInfo(name, mandatory, onlyOne)); -} - -uint8_t MP4Atom::GetVersion() -{ - if (strcmp("version", m_pProperties[0]->GetName())) { - return 0; - } - return ((MP4Integer8Property*)m_pProperties[0])->GetValue(); -} - -void MP4Atom::SetVersion(uint8_t version) -{ - if (strcmp("version", m_pProperties[0]->GetName())) { - return; - } - ((MP4Integer8Property*)m_pProperties[0])->SetValue(version); -} - -uint32_t MP4Atom::GetFlags() -{ - if (strcmp("flags", m_pProperties[1]->GetName())) { - return 0; - } - return ((MP4Integer24Property*)m_pProperties[1])->GetValue(); -} - -void MP4Atom::SetFlags(uint32_t flags) -{ - if (strcmp("flags", m_pProperties[1]->GetName())) { - return; - } - ((MP4Integer24Property*)m_pProperties[1])->SetValue(flags); -} - -void MP4Atom::Dump(uint8_t indent, bool dumpImplicits) -{ - if ( m_type[0] != '\0' ) { - // create list of ancestors - list tlist; - for( MP4Atom* atom = this; atom; atom = atom->GetParentAtom() ) { - const char* const type = atom->GetType(); - if( type && type[0] != '\0' ) - tlist.push_front( type ); - } - - // create contextual atom-name - string can; - const list::iterator ie = tlist.end(); - for( list::iterator it = tlist.begin(); it != ie; it++ ) - can += *it + '.'; - if( can.length() ) - can.resize( can.length() - 1 ); - - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": type %s (%s)", - GetFile().GetFilename().c_str(), - m_type, can.c_str() ); - } - - uint32_t i; - uint32_t size; - - // dump our properties - size = m_pProperties.Size(); - for (i = 0; i < size; i++) { - - /* skip details of tables unless we're told to be verbose */ - if (m_pProperties[i]->GetType() == TableProperty - && (log.verbosity < MP4_LOG_VERBOSE2)) { - log.dump(indent + 1, MP4_LOG_VERBOSE1, "\"%s\": ", - GetFile().GetFilename().c_str() ); - continue; - } - - m_pProperties[i]->Dump(indent + 1, dumpImplicits); - } - - // dump our children - size = m_pChildAtoms.Size(); - for (i = 0; i < size; i++) { - m_pChildAtoms[i]->Dump(indent + 1, dumpImplicits); - } -} - -uint8_t MP4Atom::GetDepth() -{ - if (m_depth < 0xFF) { - return m_depth; - } - - MP4Atom *pAtom = this; - m_depth = 0; - - while ((pAtom = pAtom->GetParentAtom()) != NULL) { - m_depth++; - ASSERT(m_depth < 255); - } - return m_depth; -} - -bool MP4Atom::GetLargesizeMode() -{ - return m_largesizeMode; -} - -void MP4Atom::SetLargesizeMode( bool mode ) -{ - m_largesizeMode = mode; -} - -bool -MP4Atom::descendsFrom( MP4Atom* parent, const char* type ) -{ - const uint32_t id = ATOMID( type ); - for( MP4Atom* atom = parent; atom; atom = atom->GetParentAtom() ) { - if( id == ATOMID(atom->GetType()) ) - return true; - } - return false; -} - -// UDTA child atom types to be constructed as MP4UdtaElementAtom. -// List gleaned from QTFF 2007-09-04. -static const char* const UDTA_ELEMENTS[] = { - "\xA9" "arg", - "\xA9" "ark", - "\xA9" "cok", - "\xA9" "com", - "\xA9" "cpy", - "\xA9" "day", - "\xA9" "dir", - "\xA9" "ed1", - "\xA9" "ed2", - "\xA9" "ed3", - "\xA9" "ed4", - "\xA9" "ed5", - "\xA9" "ed6", - "\xA9" "ed7", - "\xA9" "ed8", - "\xA9" "ed9", - "\xA9" "fmt", - "\xA9" "inf", - "\xA9" "isr", - "\xA9" "lab", - "\xA9" "lal", - "\xA9" "mak", - "\xA9" "nak", - "\xA9" "nam", - "\xA9" "pdk", - "\xA9" "phg", - "\xA9" "prd", - "\xA9" "prf", - "\xA9" "prk", - "\xA9" "prl", - "\xA9" "req", - "\xA9" "snk", - "\xA9" "snm", - "\xA9" "src", - "\xA9" "swf", - "\xA9" "swk", - "\xA9" "swr", - "\xA9" "wrt", - "Allf", - "name", - "LOOP", - "ptv ", - "SelO", - "WLOC", - NULL // must be last -}; - -MP4Atom* -MP4Atom::factory( MP4File &file, MP4Atom* parent, const char* type ) -{ - // type may be NULL only in case of root-atom - if( !type ) - return new MP4RootAtom(file); - - // construct atoms which are context-savvy - if( parent ) { - const char* const ptype = parent->GetType(); - - if( descendsFrom( parent, "ilst" )) { - if( ATOMID( ptype ) == ATOMID( "ilst" )) - return new MP4ItemAtom( file, type ); - - if( ATOMID( type ) == ATOMID( "data" )) - return new MP4DataAtom(file); - - if( ATOMID( ptype ) == ATOMID( "----" )) { - if( ATOMID( type ) == ATOMID( "mean" )) - return new MP4MeanAtom(file); - if( ATOMID( type ) == ATOMID( "name" )) - return new MP4NameAtom(file); - } - } - else if( ATOMID( ptype ) == ATOMID( "meta" )) { - if( ATOMID( type ) == ATOMID( "hdlr" )) - return new MP4ItmfHdlrAtom(file); - } - else if( ATOMID( ptype ) == ATOMID( "udta" )) { - if( ATOMID( type ) == ATOMID( "hnti" )) - return new MP4HntiAtom(file); - if( ATOMID( type ) == ATOMID( "hinf" )) - return new MP4HinfAtom(file); - for( const char* const* p = UDTA_ELEMENTS; *p; p++ ) - if( !strcmp( type, *p )) - return new MP4UdtaElementAtom( file, type ); - } - } - - // no-context construction (old-style) - switch( (uint8_t)type[0] ) { - case 'S': - if( ATOMID(type) == ATOMID("SVQ3") ) - return new MP4VideoAtom( file, type ); - if( ATOMID(type) == ATOMID("SMI ") ) - return new MP4SmiAtom(file); - break; - - case 'a': - if( ATOMID(type) == ATOMID("avc1") ) - return new MP4Avc1Atom(file); - if( ATOMID(type) == ATOMID("ac-3") ) - return new MP4Ac3Atom(file); - if( ATOMID(type) == ATOMID("avcC") ) - return new MP4AvcCAtom(file); - if( ATOMID(type) == ATOMID("alis") ) - return new MP4UrlAtom( file, type ); - if( ATOMID(type) == ATOMID("alaw") ) - return new MP4SoundAtom( file, type ); - if( ATOMID(type) == ATOMID("alac") ) - return new MP4SoundAtom( file, type ); - break; - - case 'c': - if( ATOMID(type) == ATOMID("chap") ) - return new MP4TrefTypeAtom( file, type ); - if( ATOMID(type) == ATOMID("chpl") ) - return new MP4ChplAtom(file); - if( ATOMID(type) == ATOMID("colr") ) - return new MP4ColrAtom(file); - break; - - case 'd': - if( ATOMID(type) == ATOMID("d263") ) - return new MP4D263Atom(file); - if( ATOMID(type) == ATOMID("damr") ) - return new MP4DamrAtom(file); - if( ATOMID(type) == ATOMID("dref") ) - return new MP4DrefAtom(file); - if( ATOMID(type) == ATOMID("dpnd") ) - return new MP4TrefTypeAtom( file, type ); - if( ATOMID(type) == ATOMID("dac3") ) - return new MP4DAc3Atom(file); - break; - - case 'e': - if( ATOMID(type) == ATOMID("elst") ) - return new MP4ElstAtom(file); - if( ATOMID(type) == ATOMID("enca") ) - return new MP4EncaAtom(file); - if( ATOMID(type) == ATOMID("encv") ) - return new MP4EncvAtom(file); - break; - - case 'f': - if( ATOMID(type) == ATOMID("free") ) - return new MP4FreeAtom(file); - if( ATOMID(type) == ATOMID("ftyp") ) - return new MP4FtypAtom(file); - if( ATOMID(type) == ATOMID("ftab") ) - return new MP4FtabAtom(file); - break; - - case 'g': - if( ATOMID(type) == ATOMID("gmin") ) - return new MP4GminAtom(file); - break; - - case 'h': - if( ATOMID(type) == ATOMID("hdlr") ) - return new MP4HdlrAtom(file); - if( ATOMID(type) == ATOMID("hint") ) - return new MP4TrefTypeAtom( file, type ); - if( ATOMID(type) == ATOMID("h263") ) - return new MP4VideoAtom( file, type ); - if( ATOMID(type) == ATOMID("href") ) - return new MP4HrefAtom(file); - break; - - case 'i': - if( ATOMID(type) == ATOMID("ipir") ) - return new MP4TrefTypeAtom( file, type ); - if( ATOMID(type) == ATOMID("ima4") ) - return new MP4SoundAtom( file, type ); - break; - - case 'j': - if( ATOMID(type) == ATOMID("jpeg") ) - return new MP4VideoAtom(file, "jpeg"); - break; - - case 'm': - if( ATOMID(type) == ATOMID("mdhd") ) - return new MP4MdhdAtom(file); - if( ATOMID(type) == ATOMID("mvhd") ) - return new MP4MvhdAtom(file); - if( ATOMID(type) == ATOMID("mdat") ) - return new MP4MdatAtom(file); - if( ATOMID(type) == ATOMID("mpod") ) - return new MP4TrefTypeAtom( file, type ); - if( ATOMID(type) == ATOMID("mp4a") ) - return new MP4SoundAtom( file, type ); - if( ATOMID(type) == ATOMID("mp4s") ) - return new MP4Mp4sAtom(file); - if( ATOMID(type) == ATOMID("mp4v") ) - return new MP4Mp4vAtom(file); - break; - - case 'n': - if( ATOMID(type) == ATOMID("nmhd") ) - return new MP4NmhdAtom(file); - break; - - case 'o': - if( ATOMID(type) == ATOMID("ohdr") ) - return new MP4OhdrAtom(file); - break; - - case 'p': - if( ATOMID(type) == ATOMID("pasp") ) - return new MP4PaspAtom(file); - break; - - case 'r': - if( ATOMID(type) == ATOMID("rtp ") ) - return new MP4RtpAtom(file); - if( ATOMID(type) == ATOMID("raw ") ) - return new MP4VideoAtom( file, type ); - break; - - case 's': - if( ATOMID(type) == ATOMID("s263") ) - return new MP4S263Atom(file); - if( ATOMID(type) == ATOMID("samr") ) - return new MP4AmrAtom( file, type ); - if( ATOMID(type) == ATOMID("sawb") ) - return new MP4AmrAtom( file, type ); - if( ATOMID(type) == ATOMID("sdtp") ) - return new MP4SdtpAtom(file); - if( ATOMID(type) == ATOMID("stbl") ) - return new MP4StblAtom(file); - if( ATOMID(type) == ATOMID("stsd") ) - return new MP4StsdAtom(file); - if( ATOMID(type) == ATOMID("stsz") ) - return new MP4StszAtom(file); - if( ATOMID(type) == ATOMID("stsc") ) - return new MP4StscAtom(file); - if( ATOMID(type) == ATOMID("stz2") ) - return new MP4Stz2Atom(file); - if( ATOMID(type) == ATOMID("stdp") ) - return new MP4StdpAtom(file); - if( ATOMID(type) == ATOMID("sdp ") ) - return new MP4SdpAtom(file); - if( ATOMID(type) == ATOMID("sync") ) - return new MP4TrefTypeAtom( file, type ); - if( ATOMID(type) == ATOMID("skip") ) - return new MP4FreeAtom( file, type ); - if (ATOMID(type) == ATOMID("sowt") ) - return new MP4SoundAtom( file, type ); - break; - - case 't': - if( ATOMID(type) == ATOMID("text") ) - return new MP4TextAtom(file); - if( ATOMID(type) == ATOMID("tx3g") ) - return new MP4Tx3gAtom(file); - if( ATOMID(type) == ATOMID("tkhd") ) - return new MP4TkhdAtom(file); - if( ATOMID(type) == ATOMID("tfhd") ) - return new MP4TfhdAtom(file); - if( ATOMID(type) == ATOMID("trun") ) - return new MP4TrunAtom(file); - if( ATOMID(type) == ATOMID("twos") ) - return new MP4SoundAtom( file, type ); - break; - - case 'u': - if( ATOMID(type) == ATOMID("udta") ) - return new MP4UdtaAtom(file); - if( ATOMID(type) == ATOMID("url ") ) - return new MP4UrlAtom(file); - if( ATOMID(type) == ATOMID("urn ") ) - return new MP4UrnAtom(file); - if( ATOMID(type) == ATOMID("ulaw") ) - return new MP4SoundAtom( file, type ); - break; - - case 'v': - if( ATOMID(type) == ATOMID("vmhd") ) - return new MP4VmhdAtom(file); - break; - - case 'y': - if( ATOMID(type) == ATOMID("yuv2") ) - return new MP4VideoAtom( file, type ); - break; - - default: - break; - } - - // default to MP4StandardAtom implementation - return new MP4StandardAtom( file, type ); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4atom.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4atom.h deleted file mode 100644 index b504c75b..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4atom.h +++ /dev/null @@ -1,263 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001 - 2004. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Ximpo Group Ltd. mp4v2@ximpo.com - */ - -#ifndef MP4V2_IMPL_MP4ATOM_H -#define MP4V2_IMPL_MP4ATOM_H - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -class MP4Atom; -MP4ARRAY_DECL(MP4Atom, MP4Atom*); - -#define Required true -#define Optional false -#define OnlyOne true -#define Many false -#define Counted true - -/* helper class */ -class MP4AtomInfo { -public: - MP4AtomInfo() { - m_name = NULL; - } - MP4AtomInfo(const char* name, bool mandatory, bool onlyOne); - - const char* m_name; - bool m_mandatory; - bool m_onlyOne; - uint32_t m_count; -}; - -MP4ARRAY_DECL(MP4AtomInfo, MP4AtomInfo*); - -class MP4Atom -{ -public: - static MP4Atom* ReadAtom( MP4File& file, MP4Atom* pParentAtom ); - static MP4Atom* CreateAtom( MP4File& file, MP4Atom* parent, const char* type ); - static bool IsReasonableType( const char* type ); - -private: - static MP4Atom* factory( MP4File &file, MP4Atom* parent, const char* type ); - static bool descendsFrom( MP4Atom* parent, const char* type ); - -public: - MP4Atom(MP4File& file, const char* type = NULL); - virtual ~MP4Atom(); - - MP4File& GetFile() { - return m_File; - }; - - uint64_t GetStart() { - return m_start; - }; - void SetStart(uint64_t pos) { - m_start = pos; - }; - - uint64_t GetEnd() { - return m_end; - }; - void SetEnd(uint64_t pos) { - m_end = pos; - }; - - uint64_t GetSize() { - return m_size; - } - void SetSize(uint64_t size) { - m_size = size; - } - - const char* GetType() { - return m_type; - }; - void SetType(const char* type) { - if (type && *type != '\0') { - // not needed ASSERT(strlen(type) == 4); - memcpy(m_type, type, 4); - m_type[4] = '\0'; - } else { - memset(m_type, 0, 5); - } - } - - void GetExtendedType(uint8_t* pExtendedType) { - memcpy(pExtendedType, m_extendedType, sizeof(m_extendedType)); - }; - void SetExtendedType(uint8_t* pExtendedType) { - memcpy(m_extendedType, pExtendedType, sizeof(m_extendedType)); - }; - - bool IsUnknownType() { - return m_unknownType; - } - void SetUnknownType(bool unknownType = true) { - m_unknownType = unknownType; - } - - bool IsRootAtom() { - return m_type[0] == '\0'; - } - - MP4Atom* GetParentAtom() { - return m_pParentAtom; - } - void SetParentAtom(MP4Atom* pParentAtom) { - m_pParentAtom = pParentAtom; - } - - void AddChildAtom(MP4Atom* pChildAtom) { - pChildAtom->SetParentAtom(this); - m_pChildAtoms.Add(pChildAtom); - } - - void InsertChildAtom(MP4Atom* pChildAtom, uint32_t index) { - pChildAtom->SetParentAtom(this); - m_pChildAtoms.Insert(pChildAtom, index); - } - - void DeleteChildAtom(MP4Atom* pChildAtom) { - for (MP4ArrayIndex i = 0; i < m_pChildAtoms.Size(); i++) { - if (m_pChildAtoms[i] == pChildAtom) { - m_pChildAtoms.Delete(i); - return; - } - } - } - - uint32_t GetNumberOfChildAtoms() { - return m_pChildAtoms.Size(); - } - - MP4Atom* GetChildAtom(uint32_t index) { - return m_pChildAtoms[index]; - } - - MP4Property* GetProperty(uint32_t index) { - return m_pProperties[index]; - } - - uint32_t GetCount() { - return m_pProperties.Size(); - } - - MP4Atom* FindAtom(const char* name); - - MP4Atom* FindChildAtom(const char* name); - - bool FindProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - - uint32_t GetFlags(); - void SetFlags(uint32_t flags); - - uint8_t GetDepth(); - - void Skip(); - - virtual void Generate(); - virtual void Read(); - virtual void BeginWrite(bool use64 = false); - virtual void Write(); - virtual void Rewrite(); - virtual void FinishWrite(bool use64 = false); - virtual void Dump(uint8_t indent, bool dumpImplicits); - - bool GetLargesizeMode(); - -protected: - void AddProperty(MP4Property* pProperty); - - void AddVersionAndFlags(); - - void AddReserved(MP4Atom& parentAtom, const char* name, uint32_t size); - - void ExpectChildAtom(const char* name, - bool mandatory, bool onlyOne = true); - - MP4AtomInfo* FindAtomInfo(const char* name); - - bool IsMe(const char* name); - - bool FindContainedProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex); - - void ReadProperties( - uint32_t startIndex = 0, uint32_t count = 0xFFFFFFFF); - void ReadChildAtoms(); - - void WriteProperties( - uint32_t startIndex = 0, uint32_t count = 0xFFFFFFFF); - void WriteChildAtoms(); - - uint8_t GetVersion(); - void SetVersion(uint8_t version); - - void SetLargesizeMode( bool ); - -protected: - MP4File& m_File; - uint64_t m_start; - uint64_t m_end; - bool m_largesizeMode; // true if largesize mode - uint64_t m_size; - char m_type[5]; - bool m_unknownType; - uint8_t m_extendedType[16]; - - MP4Atom* m_pParentAtom; - uint8_t m_depth; - - MP4PropertyArray m_pProperties; - MP4AtomInfoArray m_pChildAtomInfos; - MP4AtomArray m_pChildAtoms; -private: - MP4Atom(); - MP4Atom( const MP4Atom &src ); - MP4Atom &operator= ( const MP4Atom &src ); -}; - -inline uint32_t ATOMID(const char* type) { - return STRTOINT32(type); -} - -// inverse ATOMID - 32 bit id to string -inline void IDATOM(uint32_t type, char *s) { - INT32TOSTR(type, s); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_MP4ATOM_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4container.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4container.cpp deleted file mode 100644 index acfbd29f..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4container.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4Container::~MP4Container() -{ - for (uint32_t i = 0; i < m_pProperties.Size(); i++) { - delete m_pProperties[i]; - } -} - -void MP4Container::AddProperty(MP4Property* pProperty) -{ - ASSERT(pProperty); - m_pProperties.Add(pProperty); -} - -bool MP4Container::FindProperty(const char *name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if (pIndex) { - *pIndex = 0; // set the default answer for index - } - - uint32_t numProperties = m_pProperties.Size(); - - for (uint32_t i = 0; i < numProperties; i++) { - if (m_pProperties[i]->FindProperty(name, ppProperty, pIndex)) { - return true; - } - } - return false; -} - -void MP4Container::FindIntegerProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if (!FindProperty(name, ppProperty, pIndex)) { - throw new Exception("no such property", __FILE__, __LINE__, __FUNCTION__); - } - - switch ((*ppProperty)->GetType()) { - case Integer8Property: - case Integer16Property: - case Integer24Property: - case Integer32Property: - case Integer64Property: - break; - default: - throw new Exception("type mismatch", __FILE__, __LINE__, __FUNCTION__); - } -} - -uint64_t MP4Container::GetIntegerProperty(const char* name) -{ - MP4Property* pProperty; - uint32_t index; - - FindIntegerProperty(name, &pProperty, &index); - - return ((MP4IntegerProperty*)pProperty)->GetValue(index); -} - -void MP4Container::SetIntegerProperty(const char* name, uint64_t value) -{ - MP4Property* pProperty = NULL; - uint32_t index = 0; - - FindIntegerProperty(name, &pProperty, &index); - - ((MP4IntegerProperty*)pProperty)->SetValue(value, index); -} - -void MP4Container::FindFloatProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if (!FindProperty(name, ppProperty, pIndex)) { - throw new Exception("no such property", __FILE__, __LINE__, __FUNCTION__); - } - if ((*ppProperty)->GetType() != Float32Property) { - throw new Exception("type mismatch", __FILE__, __LINE__, __FUNCTION__); - } -} - -float MP4Container::GetFloatProperty(const char* name) -{ - MP4Property* pProperty; - uint32_t index; - - FindFloatProperty(name, &pProperty, &index); - - return ((MP4Float32Property*)pProperty)->GetValue(index); -} - -void MP4Container::SetFloatProperty(const char* name, float value) -{ - MP4Property* pProperty; - uint32_t index; - - FindFloatProperty(name, &pProperty, &index); - - ((MP4Float32Property*)pProperty)->SetValue(value, index); -} - -void MP4Container::FindStringProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if (!FindProperty(name, ppProperty, pIndex)) { - throw new Exception("no such property", __FILE__, __LINE__, __FUNCTION__); - } - if ((*ppProperty)->GetType() != StringProperty) { - throw new Exception("type mismatch", __FILE__, __LINE__, __FUNCTION__); - } -} - -const char* MP4Container::GetStringProperty(const char* name) -{ - MP4Property* pProperty; - uint32_t index; - - FindStringProperty(name, &pProperty, &index); - - return ((MP4StringProperty*)pProperty)->GetValue(index); -} - -void MP4Container::SetStringProperty(const char* name, const char* value) -{ - MP4Property* pProperty; - uint32_t index; - - FindStringProperty(name, &pProperty, &index); - - ((MP4StringProperty*)pProperty)->SetValue(value, index); -} - -void MP4Container::FindBytesProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if (!FindProperty(name, ppProperty, pIndex)) { - throw new Exception("no such property", __FILE__, __LINE__, __FUNCTION__); - } - if ((*ppProperty)->GetType() != BytesProperty) { - throw new Exception("type mismatch", __FILE__, __LINE__, __FUNCTION__); - } -} - -void MP4Container::GetBytesProperty(const char* name, - uint8_t** ppValue, uint32_t* pValueSize) -{ - MP4Property* pProperty; - uint32_t index; - - FindBytesProperty(name, &pProperty, &index); - - ((MP4BytesProperty*)pProperty)->GetValue(ppValue, pValueSize, index); -} - -void MP4Container::SetBytesProperty(const char* name, - const uint8_t* pValue, uint32_t valueSize) -{ - MP4Property* pProperty; - uint32_t index; - - FindBytesProperty(name, &pProperty, &index); - - ((MP4BytesProperty*)pProperty)->SetValue(pValue, valueSize, index); -} - -void MP4Container::Read(MP4File& file) -{ - uint32_t numProperties = m_pProperties.Size(); - - for (uint32_t i = 0; i < numProperties; i++) { - m_pProperties[i]->Read(file); - } -} - -void MP4Container::Write(MP4File& file) -{ - uint32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { - WARNING(numProperties == 0); - return; - } - - for (uint32_t i = 0; i < numProperties; i++) { - m_pProperties[i]->Write(file); - } -} - -void MP4Container::Dump(uint8_t indent, bool dumpImplicits) -{ - uint32_t numProperties = m_pProperties.Size(); - - for (uint32_t i = 0; i < numProperties; i++) { - m_pProperties[i]->Dump(indent, dumpImplicits); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4container.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4container.h deleted file mode 100644 index 100d94ff..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4container.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#ifndef MP4V2_IMPL_MP4CONTAINER_H -#define MP4V2_IMPL_MP4CONTAINER_H - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -// base class - container of mp4 properties -class MP4Container { -public: - MP4Container() { } - - virtual ~MP4Container(); - - void AddProperty(MP4Property* pProperty); - - virtual void Read(MP4File& file); - - virtual void Write(MP4File& file); - - virtual void Dump(uint8_t indent, bool dumpImplicits); - - MP4Property* GetProperty(uint32_t index) { - return m_pProperties[index]; - } - - // LATER MP4Property* GetProperty(const char* name); throw on error - // LATER MP4Property* FindProperty(const char* name, uint32_t* pIndex = NULL); returns NULL on error - - bool FindProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - - void FindIntegerProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - - uint64_t GetIntegerProperty(const char* name); - - void SetIntegerProperty(const char* name, uint64_t value); - - void FindFloatProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - - float GetFloatProperty(const char* name); - - void SetFloatProperty(const char* name, float value); - - void FindStringProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - - const char* GetStringProperty(const char* name); - - void SetStringProperty(const char* name, const char* value); - - void FindBytesProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - - void GetBytesProperty(const char* name, - uint8_t** ppValue, uint32_t* pValueSize); - - void SetBytesProperty(const char* name, - const uint8_t* pValue, uint32_t valueSize); - -protected: - MP4PropertyArray m_pProperties; -}; - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_MP4CONTAINER_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4descriptor.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4descriptor.cpp deleted file mode 100644 index 202deb15..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4descriptor.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4Descriptor::MP4Descriptor(MP4Atom& parentAtom, uint8_t tag) - : m_parentAtom(parentAtom) -{ - m_tag = tag; - m_start = 0; - m_size = 0; - m_readMutatePoint = 0; -} - -MP4Descriptor::~MP4Descriptor() -{ - for (uint32_t i = 0; i < m_pProperties.Size(); i++) { - delete m_pProperties[i]; - } -} - -void MP4Descriptor::AddProperty(MP4Property* pProperty) -{ - ASSERT(pProperty); - m_pProperties.Add(pProperty); -} - -bool MP4Descriptor::FindContainedProperty(const char *name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - uint32_t numProperties = m_pProperties.Size(); - - for (uint32_t i = 0; i < numProperties; i++) { - if (m_pProperties[i]->FindProperty(name, ppProperty, pIndex)) { - return true; - } - } - return false; -} - -void MP4Descriptor::Generate() -{ - // generate properties - for (uint32_t i = 0; i < m_pProperties.Size(); i++) { - m_pProperties[i]->Generate(); - } -} - -void MP4Descriptor::Read(MP4File& file) -{ - ReadHeader(file); - - ReadProperties(file, 0, m_readMutatePoint); - - Mutate(); - - ReadProperties(file, m_readMutatePoint); - - // flush any leftover read bits - file.FlushReadBits(); -} - -void MP4Descriptor::ReadHeader(MP4File& file) -{ - log.verbose1f("\"%s\": ReadDescriptor: pos = 0x%" PRIx64, file.GetFilename().c_str(), - file.GetPosition()); - - // read tag and length - uint8_t tag = file.ReadUInt8(); - if (m_tag) { - ASSERT(tag == m_tag); - } else { - m_tag = tag; - } - m_size = file.ReadMpegLength(); - m_start = file.GetPosition(); - - log.verbose1f("\"%s\": ReadDescriptor: tag 0x%02x data size %u (0x%x)", - file.GetFilename().c_str(), m_tag, m_size, m_size); -} - -void MP4Descriptor::ReadProperties(MP4File& file, - uint32_t propStartIndex, uint32_t propCount) -{ - uint32_t numProperties = min(propCount, - m_pProperties.Size() - propStartIndex); - - for (uint32_t i = propStartIndex; - i < propStartIndex + numProperties; i++) { - - MP4Property* pProperty = m_pProperties[i]; - - int32_t remaining = m_size - (file.GetPosition() - m_start); - - if (pProperty->GetType() == DescriptorProperty) { - if (remaining > 0) { - // place a limit on how far this sub-descriptor looks - ((MP4DescriptorProperty*)pProperty)->SetSizeLimit(remaining); - pProperty->Read(file); - } // else do nothing, empty descriptor - } else { - // non-descriptor property - if (remaining >= 0) { - pProperty->Read(file); - - MP4LogLevel thisVerbosity = - (pProperty->GetType() == TableProperty) ? - MP4_LOG_VERBOSE2 : MP4_LOG_VERBOSE1; - - if (log.verbosity >= thisVerbosity) { - // log.printf(thisVerbosity,"Read: "); - pProperty->Dump(0, true); - } - } else { - log.errorf("%s: \"%s\": Overran descriptor, tag %u data size %u property %u", - __FUNCTION__, file.GetFilename().c_str(), m_tag, m_size, i); - throw new Exception("overran descriptor",__FILE__, __LINE__, __FUNCTION__); - } - } - } -} - -void MP4Descriptor::Write(MP4File& file) -{ - // call virtual function to adapt properties before writing - Mutate(); - - uint32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { - WARNING(numProperties == 0); - return; - } - - // write tag and length placeholder - file.WriteUInt8(m_tag); - uint64_t lengthPos = file.GetPosition(); - file.WriteMpegLength(0); - uint64_t startPos = file.GetPosition(); - - for (uint32_t i = 0; i < numProperties; i++) { - m_pProperties[i]->Write(file); - } - - // align with byte boundary (rarely necessary) - file.PadWriteBits(); - - // go back and write correct length - uint64_t endPos = file.GetPosition(); - file.SetPosition(lengthPos); - file.WriteMpegLength(endPos - startPos); - file.SetPosition(endPos); -} - -void MP4Descriptor::WriteToMemory(MP4File& file, - uint8_t** ppBytes, uint64_t* pNumBytes) -{ - // use memory buffer to save descriptor in memory - // instead of going directly to disk - - file.EnableMemoryBuffer(); - - Write(file); - - file.DisableMemoryBuffer(ppBytes, pNumBytes); -} - -void MP4Descriptor::Dump(uint8_t indent, bool dumpImplicits) -{ - // call virtual function to adapt properties before dumping - Mutate(); - - uint32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { - WARNING(numProperties == 0); - return; - } - for (uint32_t i = 0; i < numProperties; i++) { - m_pProperties[i]->Dump(indent, dumpImplicits); - } -} - -uint8_t MP4Descriptor::GetDepth() -{ - return m_parentAtom.GetDepth(); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4descriptor.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4descriptor.h deleted file mode 100644 index 160c5cf8..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4descriptor.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#ifndef MP4V2_IMPL_MP4DESCRIPTOR_H -#define MP4V2_IMPL_MP4DESCRIPTOR_H - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -class MP4Descriptor { -public: - MP4Descriptor(MP4Atom& parentAtom, uint8_t tag = 0); - - virtual ~MP4Descriptor(); - - uint8_t GetTag() { - return m_tag; - } - void SetTag(uint8_t tag) { - m_tag = tag; - } - - void AddProperty(MP4Property* pProperty); - - virtual void Generate(); - virtual void Read(MP4File& file); - virtual void Write(MP4File& file); - virtual void Dump(uint8_t indent, bool dumpImplicits); - - MP4Property* GetProperty(uint32_t index) { - return m_pProperties[index]; - } - - // use with extreme caution - void SetProperty(uint32_t index, MP4Property* pProperty) { - m_pProperties[index] = pProperty; - } - - bool FindProperty( const char* name, MP4Property** ppProperty, - uint32_t* pIndex = NULL) - { - return FindContainedProperty(name, ppProperty, pIndex); - } - - void WriteToMemory(MP4File& file, - uint8_t** ppBytes, uint64_t* pNumBytes); - -protected: - void SetReadMutate(uint32_t propIndex) { - m_readMutatePoint = propIndex; - } - - void ReadHeader(MP4File& file); - void ReadProperties(MP4File& file, - uint32_t startIndex = 0, uint32_t count = 0xFFFFFFFF); - - virtual void Mutate() { - // default is a no-op - }; - - bool FindContainedProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex); - - uint8_t GetDepth(); - -protected: - MP4Atom& m_parentAtom; - uint8_t m_tag; - uint64_t m_start; - uint32_t m_size; - MP4PropertyArray m_pProperties; - uint32_t m_readMutatePoint; -private: - MP4Descriptor(); - MP4Descriptor ( const MP4Descriptor &src ); - MP4Descriptor &operator= ( const MP4Descriptor &src ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_MP4DESCRIPTOR_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file.cpp deleted file mode 100644 index 25e241f7..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file.cpp +++ /dev/null @@ -1,4364 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001 - 2005. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Alix Marchandise-Franquet alix@cisco.com - * Ximpo Group Ltd. mp4v2@ximpo.com - * Bill May wmay@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4File::MP4File( ) : - m_file ( NULL ) - , m_fileOriginalSize ( 0 ) - , m_createFlags ( 0 ) -{ - this->Init(); -} - -/** - * Initialize member variables (shared among constructors) - */ -void MP4File::Init() -{ - m_pRootAtom = NULL; - m_odTrackId = MP4_INVALID_TRACK_ID; - - m_useIsma = false; - - m_pModificationProperty = NULL; - m_pTimeScaleProperty = NULL; - m_pDurationProperty = NULL; - - m_memoryBuffer = NULL; - m_memoryBufferSize = 0; - m_memoryBufferPosition = 0; - - m_numReadBits = 0; - m_bufReadBits = 0; - m_numWriteBits = 0; - m_bufWriteBits = 0; - m_editName = NULL; - m_trakName[0] = '\0'; -} - -MP4File::~MP4File() -{ - delete m_pRootAtom; - for( uint32_t i = 0; i < m_pTracks.Size(); i++ ) - delete m_pTracks[i]; - MP4Free( m_memoryBuffer ); // just in case - CHECK_AND_FREE( m_editName ); - delete m_file; -} - -const std::string & -MP4File::GetFilename() const -{ - // No one should call this unless Read, etc. has - // succeeded and m_file exists since this method really - // only exists for the public API. This helps us - // guarantee that MP4GetFilename always returns a valid - // string given a valid MP4FileHandle - ASSERT(m_file); - return m_file->name; -} - -void MP4File::Read( const char* name, const MP4FileProvider* provider ) -{ - Open( name, File::MODE_READ, provider ); - ReadFromFile(); - CacheProperties(); -} - -void MP4File::Create( const char* fileName, - uint32_t flags, - int add_ftyp, - int add_iods, - char* majorBrand, - uint32_t minorVersion, - char** supportedBrands, - uint32_t supportedBrandsCount ) -{ - m_createFlags = flags; - Open( fileName, File::MODE_CREATE, NULL ); - - // generate a skeletal atom tree - m_pRootAtom = MP4Atom::CreateAtom(*this, NULL, NULL); - m_pRootAtom->Generate(); - - if (add_ftyp != 0) { - MakeFtypAtom(majorBrand, minorVersion, - supportedBrands, supportedBrandsCount); - } - - CacheProperties(); - - // create mdat, and insert it after ftyp, and before moov - (void)InsertChildAtom(m_pRootAtom, "mdat", - add_ftyp != 0 ? 1 : 0); - - // start writing - m_pRootAtom->BeginWrite(); - if (add_iods != 0) { - (void)AddChildAtom("moov", "iods"); - } -} - -bool MP4File::Use64Bits (const char *atomName) -{ - uint32_t atomid = ATOMID(atomName); - if (atomid == ATOMID("mdat") || atomid == ATOMID("stbl")) { - return (m_createFlags & MP4_CREATE_64BIT_DATA) == MP4_CREATE_64BIT_DATA; - } - if (atomid == ATOMID("mvhd") || - atomid == ATOMID("tkhd") || - atomid == ATOMID("mdhd")) { - return (m_createFlags & MP4_CREATE_64BIT_TIME) == MP4_CREATE_64BIT_TIME; - } - return false; -} - -void MP4File::Check64BitStatus (const char *atomName) -{ - uint32_t atomid = ATOMID(atomName); - - if (atomid == ATOMID("mdat") || atomid == ATOMID("stbl")) { - m_createFlags |= MP4_CREATE_64BIT_DATA; - } else if (atomid == ATOMID("mvhd") || - atomid == ATOMID("tkhd") || - atomid == ATOMID("mdhd")) { - m_createFlags |= MP4_CREATE_64BIT_TIME; - } -} - - -bool MP4File::Modify( const char* fileName ) -{ - Open( fileName, File::MODE_MODIFY, NULL ); - ReadFromFile(); - - // find the moov atom - MP4Atom* pMoovAtom = m_pRootAtom->FindAtom("moov"); - uint32_t numAtoms; - - if (pMoovAtom == NULL) { - // there isn't one, odd but we can still proceed - log.warningf("%s: \"%s\": no moov atom, can't modify", - __FUNCTION__, GetFilename().c_str()); - return false; - //pMoovAtom = AddChildAtom(m_pRootAtom, "moov"); - } else { - numAtoms = m_pRootAtom->GetNumberOfChildAtoms(); - - // work backwards thru the top level atoms - int32_t i; - bool lastAtomIsMoov = true; - MP4Atom* pLastAtom = NULL; - - for (i = numAtoms - 1; i >= 0; i--) { - MP4Atom* pAtom = m_pRootAtom->GetChildAtom(i); - const char* type = pAtom->GetType(); - - // get rid of any trailing free or skips - if (!strcmp(type, "free") || !strcmp(type, "skip")) { - m_pRootAtom->DeleteChildAtom(pAtom); - continue; - } - - if (strcmp(type, "moov")) { - if (pLastAtom == NULL) { - pLastAtom = pAtom; - lastAtomIsMoov = false; - } - continue; - } - - // now at moov atom - - // multiple moov atoms?!? - if (pAtom != pMoovAtom) { - throw new Exception( - "Badly formed mp4 file, multiple moov atoms", - __FILE__,__LINE__,__FUNCTION__); - } - - if (lastAtomIsMoov) { - // position to start of moov atom, - // effectively truncating file - // prior to adding new mdat - SetPosition(pMoovAtom->GetStart()); - - } else { // last atom isn't moov - // need to place a free atom - MP4Atom* pFreeAtom = MP4Atom::CreateAtom(*this, NULL, "free"); - - // in existing position of the moov atom - m_pRootAtom->InsertChildAtom(pFreeAtom, i); - m_pRootAtom->DeleteChildAtom(pMoovAtom); - m_pRootAtom->AddChildAtom(pMoovAtom); - - // write free atom to disk - SetPosition(pMoovAtom->GetStart()); - pFreeAtom->SetSize(pMoovAtom->GetSize()); - pFreeAtom->Write(); - - // finally set our file position to the end of the last atom - SetPosition(pLastAtom->GetEnd()); - } - - break; - } - ASSERT(i != -1); - } - - CacheProperties(); // of moov atom - - numAtoms = m_pRootAtom->GetNumberOfChildAtoms(); - - // insert another mdat prior to moov atom (the last atom) - MP4Atom* pMdatAtom = InsertChildAtom(m_pRootAtom, "mdat", numAtoms - 1); - - // start writing new mdat - pMdatAtom->BeginWrite(Use64Bits("mdat")); - return true; -} - -void MP4File::Optimize( const char* srcFileName, const char* dstFileName ) -{ - File* src = NULL; - File* dst = NULL; - - // compute destination filename - string dname; - if( dstFileName ) { - dname = dstFileName; - } else { - // No destination given, so let's kludge together a temporary file. - // We'll try to create it in the same directory as the srcFileName, since - // it's more likely that directory is writable. In the absence of that, - // we'll create it in "./", which is the default pathnameTemp() provides. - string s(srcFileName); - size_t pos = s.find_last_of("\\/"); - const char *d; - if (pos == string::npos) { - d = "."; - } else { - s = s.substr(0, pos); - d = s.c_str(); - } - FileSystem::pathnameTemp( dname, d, "tmp", ".mp4" ); - } - - try { - // file source to optimize - Open( srcFileName, File::MODE_READ, NULL ); - ReadFromFile(); - CacheProperties(); // of moov atom - - src = m_file; - m_file = NULL; - - // optimized file destination - Open( dname.c_str(), File::MODE_CREATE, NULL ); - dst = m_file; - - SetIntegerProperty( "moov.mvhd.modificationTime", MP4GetAbsTimestamp() ); - - // writing meta info in the optimal order - ((MP4RootAtom*)m_pRootAtom)->BeginOptimalWrite(); - - // write data in optimal order - RewriteMdat( *src, *dst ); - - // finish writing - ((MP4RootAtom*)m_pRootAtom)->FinishOptimalWrite(); - - } - catch (...) { - // cleanup and rethrow. Without this, we'd leak memory and an open file handle(s). - if(src == NULL && dst == NULL) - delete m_file;// We didn't make it far enough to have m_file go to src or dst. - - m_file = NULL; - delete dst; - delete src; - throw; - } - - // cleanup - delete dst; - delete src; - m_file = NULL; - - // move temporary file into place - if( !dstFileName ) - Rename( dname.c_str(), srcFileName ); -} - -void MP4File::RewriteMdat( File& src, File& dst ) -{ - uint32_t numTracks = m_pTracks.Size(); - - MP4ChunkId* chunkIds = new MP4ChunkId[numTracks]; - MP4ChunkId* maxChunkIds = new MP4ChunkId[numTracks]; - MP4Timestamp* nextChunkTimes = new MP4Timestamp[numTracks]; - - for( uint32_t i = 0; i < numTracks; i++ ) { - chunkIds[i] = 1; - maxChunkIds[i] = m_pTracks[i]->GetNumberOfChunks(); - nextChunkTimes[i] = MP4_INVALID_TIMESTAMP; - } - - for( ;; ) { - uint32_t nextTrackIndex = (uint32_t)-1; - MP4Timestamp nextTime = MP4_INVALID_TIMESTAMP; - - for( uint32_t i = 0; i < numTracks; i++ ) { - if( chunkIds[i] > maxChunkIds[i] ) - continue; - - if( nextChunkTimes[i] == MP4_INVALID_TIMESTAMP ) { - MP4Timestamp chunkTime = m_pTracks[i]->GetChunkTime( chunkIds[i] ); - nextChunkTimes[i] = MP4ConvertTime( chunkTime, m_pTracks[i]->GetTimeScale(), GetTimeScale() ); - } - - // time is not earliest so far - if( nextChunkTimes[i] > nextTime ) - continue; - - // prefer hint tracks to media tracks if times are equal - if( nextChunkTimes[i] == nextTime && strcmp( m_pTracks[i]->GetType(), MP4_HINT_TRACK_TYPE )) - continue; - - // this is our current choice of tracks - nextTime = nextChunkTimes[i]; - nextTrackIndex = i; - } - - if( nextTrackIndex == (uint32_t)-1 ) - break; - - uint8_t* pChunk; - uint32_t chunkSize; - - // point into original mp4 file for read chunk call - m_file = &src; - m_pTracks[nextTrackIndex]->ReadChunk( chunkIds[nextTrackIndex], &pChunk, &chunkSize ); - - // point back at the new mp4 file for write chunk - m_file = &dst; - m_pTracks[nextTrackIndex]->RewriteChunk( chunkIds[nextTrackIndex], pChunk, chunkSize ); - - MP4Free( pChunk ); - - chunkIds[nextTrackIndex]++; - nextChunkTimes[nextTrackIndex] = MP4_INVALID_TIMESTAMP; - } - - delete [] chunkIds; - delete [] maxChunkIds; - delete [] nextChunkTimes; -} - -void MP4File::Open( const char* name, File::Mode mode, const MP4FileProvider* provider ) -{ - ASSERT( !m_file ); - - m_file = new File( name, mode, provider ? new io::CustomFileProvider( *provider ) : NULL ); - if( m_file->open() ) { - ostringstream msg; - msg << "open(" << name << ") failed"; - throw new Exception( msg.str(), __FILE__, __LINE__, __FUNCTION__); - } - - switch( mode ) { - case File::MODE_READ: - case File::MODE_MODIFY: - m_fileOriginalSize = m_file->size; - break; - - case File::MODE_CREATE: - default: - m_fileOriginalSize = 0; - break; - } -} - -void MP4File::ReadFromFile() -{ - // ensure we start at beginning of file - SetPosition(0); - - // create a new root atom - ASSERT(m_pRootAtom == NULL); - m_pRootAtom = MP4Atom::CreateAtom(*this, NULL, NULL); - - uint64_t fileSize = GetSize(); - - m_pRootAtom->SetStart(0); - m_pRootAtom->SetSize(fileSize); - m_pRootAtom->SetEnd(fileSize); - - m_pRootAtom->Read(); - - // create MP4Track's for any tracks in the file - GenerateTracks(); -} - -void MP4File::GenerateTracks() -{ - uint32_t trackIndex = 0; - - while (true) { - char trackName[32]; - snprintf(trackName, sizeof(trackName), "moov.trak[%u]", trackIndex); - - // find next trak atom - MP4Atom* pTrakAtom = m_pRootAtom->FindAtom(trackName); - - // done, no more trak atoms - if (pTrakAtom == NULL) { - break; - } - - // find track id property - MP4Integer32Property* pTrackIdProperty = NULL; - (void)pTrakAtom->FindProperty( - "trak.tkhd.trackId", - (MP4Property**)&pTrackIdProperty); - - // find track type property - MP4StringProperty* pTypeProperty = NULL; - (void)pTrakAtom->FindProperty( - "trak.mdia.hdlr.handlerType", - (MP4Property**)&pTypeProperty); - - // ensure we have the basics properties - if (pTrackIdProperty && pTypeProperty) { - - m_trakIds.Add(pTrackIdProperty->GetValue()); - - MP4Track* pTrack = NULL; - try { - if (!strcmp(pTypeProperty->GetValue(), MP4_HINT_TRACK_TYPE)) { - pTrack = new MP4RtpHintTrack(*this, *pTrakAtom); - } else { - pTrack = new MP4Track(*this, *pTrakAtom); - } - m_pTracks.Add(pTrack); - } - catch( Exception* x ) { - log.errorf(*x); - delete x; - } - - // remember when we encounter the OD track - if (pTrack && !strcmp(pTrack->GetType(), MP4_OD_TRACK_TYPE)) { - if (m_odTrackId == MP4_INVALID_TRACK_ID) { - m_odTrackId = pTrackIdProperty->GetValue(); - } else { - log.warningf("%s: \"%s\": multiple OD tracks present", - __FUNCTION__, GetFilename().c_str() ); - } - } - } else { - m_trakIds.Add(0); - } - - trackIndex++; - } -} - -void MP4File::CacheProperties() -{ - FindIntegerProperty("moov.mvhd.modificationTime", - (MP4Property**)&m_pModificationProperty); - - FindIntegerProperty("moov.mvhd.timeScale", - (MP4Property**)&m_pTimeScaleProperty); - - FindIntegerProperty("moov.mvhd.duration", - (MP4Property**)&m_pDurationProperty); -} - -void MP4File::BeginWrite() -{ - m_pRootAtom->BeginWrite(); -} - -void MP4File::FinishWrite(uint32_t options) -{ - // remove empty moov.udta.meta.ilst - { - MP4Atom* ilst = FindAtom( "moov.udta.meta.ilst" ); - if( ilst ) { - if( ilst->GetNumberOfChildAtoms() == 0 ) { - ilst->GetParentAtom()->DeleteChildAtom( ilst ); - delete ilst; - } - } - } - - // remove empty moov.udta.meta - { - MP4Atom* meta = FindAtom( "moov.udta.meta" ); - if( meta ) { - if( meta->GetNumberOfChildAtoms() == 0 ) { - meta->GetParentAtom()->DeleteChildAtom( meta ); - delete meta; - } - else if( meta->GetNumberOfChildAtoms() == 1 ) { - if( ATOMID( meta->GetChildAtom( 0 )->GetType() ) == ATOMID( "hdlr" )) { - meta->GetParentAtom()->DeleteChildAtom( meta ); - delete meta; - } - } - } - } - - // remove empty moov.udta.name - { - MP4Atom* name = FindAtom( "moov.udta.name" ); - if( name ) { - unsigned char *val = NULL; - uint32_t valSize = 0; - GetBytesProperty("moov.udta.name.value", (uint8_t**)&val, &valSize); - if( valSize == 0 ) { - name->GetParentAtom()->DeleteChildAtom( name ); - delete name; - } - } - } - - // remove empty moov.udta - { - MP4Atom* udta = FindAtom( "moov.udta" ); - if( udta ) { - if( udta->GetNumberOfChildAtoms() == 0 ) { - udta->GetParentAtom()->DeleteChildAtom( udta ); - delete udta; - } - } - } - - // for all tracks, flush chunking buffers - for( uint32_t i = 0; i < m_pTracks.Size(); i++ ) { - ASSERT( m_pTracks[i] ); - m_pTracks[i]->FinishWrite(options); - } - - // ask root atom to write - m_pRootAtom->FinishWrite(); - - // finished all writes, if position < size then file has shrunk and - // we mark remaining bytes as free atom; otherwise trailing garbage remains. - if( GetPosition() < GetSize() ) { - MP4RootAtom* root = (MP4RootAtom*)FindAtom( "" ); - ASSERT( root ); - - // compute size of free atom; always has 8 bytes of overhead - uint64_t size = GetSize() - GetPosition(); - if( size < 8 ) - size = 0; - else - size -= 8; - - MP4FreeAtom* freeAtom = (MP4FreeAtom*)MP4Atom::CreateAtom( *this, NULL, "free" ); - ASSERT( freeAtom ); - freeAtom->SetSize( size ); - root->AddChildAtom( freeAtom ); - freeAtom->Write(); - } -} - -void MP4File::UpdateDuration(MP4Duration duration) -{ - MP4Duration currentDuration = GetDuration(); - if (duration > currentDuration) { - SetDuration(duration); - } -} - -void MP4File::Dump( bool dumpImplicits ) -{ - log.dump(0, MP4_LOG_VERBOSE1, "\"%s\": Dumping meta-information...", m_file->name.c_str() ); - m_pRootAtom->Dump( 0, dumpImplicits); -} - -void MP4File::Close(uint32_t options) -{ - if( IsWriteMode() ) { - SetIntegerProperty( "moov.mvhd.modificationTime", MP4GetAbsTimestamp() ); - FinishWrite(options); - } - - delete m_file; - m_file = NULL; -} - -void MP4File::Rename(const char* oldFileName, const char* newFileName) -{ - if( FileSystem::rename( oldFileName, newFileName )) - throw new PlatformException( sys::getLastErrorStr(), sys::getLastError(), __FILE__, __LINE__, __FUNCTION__ ); -} - -void MP4File::ProtectWriteOperation(const char* file, - int line, - const char* func ) -{ - if( !IsWriteMode() ) - throw new Exception( "operation not permitted in read mode", file, line, func ); -} - -MP4Track* MP4File::GetTrack(MP4TrackId trackId) -{ - return m_pTracks[FindTrackIndex(trackId)]; -} - -MP4Atom* MP4File::FindAtom(const char* name) -{ - MP4Atom* pAtom = NULL; - if (!name || !strcmp(name, "")) { - pAtom = m_pRootAtom; - } else { - pAtom = m_pRootAtom->FindAtom(name); - } - return pAtom; -} - -MP4Atom* MP4File::AddChildAtom( - const char* parentName, - const char* childName) -{ - return AddChildAtom(FindAtom(parentName), childName); -} - -MP4Atom* MP4File::AddChildAtom( - MP4Atom* pParentAtom, - const char* childName) -{ - return InsertChildAtom(pParentAtom, childName, - pParentAtom->GetNumberOfChildAtoms()); -} - -MP4Atom* MP4File::InsertChildAtom( - const char* parentName, - const char* childName, - uint32_t index) -{ - return InsertChildAtom(FindAtom(parentName), childName, index); -} - -MP4Atom* MP4File::InsertChildAtom( - MP4Atom* pParentAtom, - const char* childName, - uint32_t index) -{ - MP4Atom* pChildAtom = MP4Atom::CreateAtom(*this, pParentAtom, childName); - - ASSERT(pParentAtom); - pParentAtom->InsertChildAtom(pChildAtom, index); - - pChildAtom->Generate(); - - return pChildAtom; -} - -MP4Atom* MP4File::AddDescendantAtoms( - const char* ancestorName, - const char* descendantNames) -{ - return AddDescendantAtoms(FindAtom(ancestorName), descendantNames); -} - -MP4Atom* MP4File::AddDescendantAtoms( - MP4Atom* pAncestorAtom, const char* descendantNames) -{ - ASSERT(pAncestorAtom); - - MP4Atom* pParentAtom = pAncestorAtom; - MP4Atom* pChildAtom = NULL; - - while (true) { - char* childName = MP4NameFirst(descendantNames); - - if (childName == NULL) { - break; - } - - descendantNames = MP4NameAfterFirst(descendantNames); - - pChildAtom = pParentAtom->FindChildAtom(childName); - - if (pChildAtom == NULL) { - pChildAtom = AddChildAtom(pParentAtom, childName); - } - - pParentAtom = pChildAtom; - - MP4Free(childName); - } - - return pChildAtom; -} - -bool MP4File::FindProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if( pIndex ) - *pIndex = 0; // set the default answer for index - return m_pRootAtom->FindProperty(name, ppProperty, pIndex); -} - -void MP4File::FindIntegerProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if (!FindProperty(name, ppProperty, pIndex)) { - ostringstream msg; - msg << "no such property - " << name; - throw new Exception(msg.str(), __FILE__, __LINE__, __FUNCTION__); - } - - switch ((*ppProperty)->GetType()) { - case Integer8Property: - case Integer16Property: - case Integer24Property: - case Integer32Property: - case Integer64Property: - break; - default: - ostringstream msg; - msg << "type mismatch - property " << name << " type " << (*ppProperty)->GetType(); - throw new Exception(msg.str(), __FILE__, __LINE__, __FUNCTION__); - } -} - -uint64_t MP4File::GetIntegerProperty(const char* name) -{ - MP4Property* pProperty; - uint32_t index; - - FindIntegerProperty(name, &pProperty, &index); - - return ((MP4IntegerProperty*)pProperty)->GetValue(index); -} - -void MP4File::SetIntegerProperty(const char* name, uint64_t value) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - MP4Property* pProperty = NULL; - uint32_t index = 0; - - FindIntegerProperty(name, &pProperty, &index); - - ((MP4IntegerProperty*)pProperty)->SetValue(value, index); -} - -void MP4File::FindFloatProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if (!FindProperty(name, ppProperty, pIndex)) { - ostringstream msg; - msg << "no such property - " << name; - throw new Exception(msg.str(), __FILE__, __LINE__, __FUNCTION__); - } - if ((*ppProperty)->GetType() != Float32Property) { - ostringstream msg; - msg << "type mismatch - property " << name << " type " << (*ppProperty)->GetType(); - throw new Exception(msg.str(), __FILE__, __LINE__, __FUNCTION__); - } -} - -float MP4File::GetFloatProperty(const char* name) -{ - MP4Property* pProperty; - uint32_t index; - - FindFloatProperty(name, &pProperty, &index); - - return ((MP4Float32Property*)pProperty)->GetValue(index); -} - -void MP4File::SetFloatProperty(const char* name, float value) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - MP4Property* pProperty; - uint32_t index; - - FindFloatProperty(name, &pProperty, &index); - - ((MP4Float32Property*)pProperty)->SetValue(value, index); -} - -void MP4File::FindStringProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if (!FindProperty(name, ppProperty, pIndex)) { - ostringstream msg; - msg << "no such property - " << name; - throw new Exception(msg.str(), __FILE__, __LINE__, __FUNCTION__); - } - if ((*ppProperty)->GetType() != StringProperty) { - ostringstream msg; - msg << "type mismatch - property " << name << " type " << (*ppProperty)->GetType(); - throw new Exception(msg.str(), __FILE__, __LINE__, __FUNCTION__); - } -} - -const char* MP4File::GetStringProperty(const char* name) -{ - MP4Property* pProperty; - uint32_t index; - - FindStringProperty(name, &pProperty, &index); - - return ((MP4StringProperty*)pProperty)->GetValue(index); -} - -void MP4File::SetStringProperty(const char* name, const char* value) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - MP4Property* pProperty; - uint32_t index; - - FindStringProperty(name, &pProperty, &index); - - ((MP4StringProperty*)pProperty)->SetValue(value, index); -} - -void MP4File::FindBytesProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if (!FindProperty(name, ppProperty, pIndex)) { - ostringstream msg; - msg << "no such property " << name; - throw new Exception(msg.str(), __FILE__, __LINE__, __FUNCTION__); - } - if ((*ppProperty)->GetType() != BytesProperty) { - ostringstream msg; - msg << "type mismatch - property " << name << " - type " << (*ppProperty)->GetType(); - throw new Exception(msg.str(), __FILE__, __LINE__, __FUNCTION__); - } -} - -void MP4File::GetBytesProperty(const char* name, - uint8_t** ppValue, uint32_t* pValueSize) -{ - MP4Property* pProperty; - uint32_t index; - - FindBytesProperty(name, &pProperty, &index); - - ((MP4BytesProperty*)pProperty)->GetValue(ppValue, pValueSize, index); -} - -void MP4File::SetBytesProperty(const char* name, - const uint8_t* pValue, uint32_t valueSize) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - MP4Property* pProperty; - uint32_t index; - - FindBytesProperty(name, &pProperty, &index); - - ((MP4BytesProperty*)pProperty)->SetValue(pValue, valueSize, index); -} - - -// track functions - -MP4TrackId MP4File::AddTrack(const char* type, uint32_t timeScale) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - // create and add new trak atom - MP4Atom* pTrakAtom = AddChildAtom("moov", "trak"); - ASSERT(pTrakAtom); - - // allocate a new track id - MP4TrackId trackId = AllocTrackId(); - - m_trakIds.Add(trackId); - - // set track id - MP4Integer32Property* pInteger32Property = NULL; - (void)pTrakAtom->FindProperty("trak.tkhd.trackId", - (MP4Property**)&pInteger32Property); - ASSERT(pInteger32Property); - pInteger32Property->SetValue(trackId); - - // set track type - const char* normType = MP4NormalizeTrackType(type); - - // sanity check for user defined types - if (strlen(normType) > 4) { - log.warningf("%s: \"%s\": type truncated to four characters", - __FUNCTION__, GetFilename().c_str()); - // StringProperty::SetValue() will do the actual truncation - } - - MP4StringProperty* pStringProperty = NULL; - (void)pTrakAtom->FindProperty("trak.mdia.hdlr.handlerType", - (MP4Property**)&pStringProperty); - ASSERT(pStringProperty); - pStringProperty->SetValue(normType); - - // set track time scale - pInteger32Property = NULL; - (void)pTrakAtom->FindProperty("trak.mdia.mdhd.timeScale", - (MP4Property**)&pInteger32Property); - ASSERT(pInteger32Property); - pInteger32Property->SetValue(timeScale ? timeScale : 1000); - - // now have enough to create MP4Track object - MP4Track* pTrack = NULL; - if (!strcmp(normType, MP4_HINT_TRACK_TYPE)) { - pTrack = new MP4RtpHintTrack(*this, *pTrakAtom); - } else { - pTrack = new MP4Track(*this, *pTrakAtom); - } - m_pTracks.Add(pTrack); - - // mark non-hint tracks as enabled - if (strcmp(normType, MP4_HINT_TRACK_TYPE)) { - SetTrackIntegerProperty(trackId, "tkhd.flags", 1); - } - - // mark track as contained in this file - // LATER will provide option for external data references - AddDataReference(trackId, NULL); - - return trackId; -} - -void MP4File::AddTrackToIod(MP4TrackId trackId) -{ - MP4DescriptorProperty* pDescriptorProperty = NULL; - (void)m_pRootAtom->FindProperty("moov.iods.esIds", - (MP4Property**)&pDescriptorProperty); - ASSERT(pDescriptorProperty); - - MP4Descriptor* pDescriptor = - pDescriptorProperty->AddDescriptor(MP4ESIDIncDescrTag); - ASSERT(pDescriptor); - - MP4Integer32Property* pIdProperty = NULL; - (void)pDescriptor->FindProperty("id", - (MP4Property**)&pIdProperty); - ASSERT(pIdProperty); - - pIdProperty->SetValue(trackId); -} - -void MP4File::RemoveTrackFromIod(MP4TrackId trackId, bool shallHaveIods) -{ - MP4DescriptorProperty* pDescriptorProperty = NULL; - if (!m_pRootAtom->FindProperty("moov.iods.esIds",(MP4Property**)&pDescriptorProperty) - || pDescriptorProperty == NULL) - return; - - for (uint32_t i = 0; i < pDescriptorProperty->GetCount(); i++) { - /* static */ - char name[32]; - snprintf(name, sizeof(name), "esIds[%u].id", i); - - MP4Integer32Property* pIdProperty = NULL; - (void)pDescriptorProperty->FindProperty(name, - (MP4Property**)&pIdProperty); - // wmay ASSERT(pIdProperty); - - if (pIdProperty != NULL && - pIdProperty->GetValue() == trackId) { - pDescriptorProperty->DeleteDescriptor(i); - break; - } - } -} - -void MP4File::AddTrackToOd(MP4TrackId trackId) -{ - if (!m_odTrackId) { - return; - } - - AddTrackReference(MakeTrackName(m_odTrackId, "tref.mpod"), trackId); -} - -void MP4File::RemoveTrackFromOd(MP4TrackId trackId) -{ - if (!m_odTrackId) { - return; - } - - RemoveTrackReference(MakeTrackName(m_odTrackId, "tref.mpod"), trackId); -} - -/* - * Try to obtain the properties of this reference track, if not found then return - * NULL in *ppCountProperty and *ppTrackIdProperty. - */ -void MP4File::GetTrackReferenceProperties(const char* trefName, - MP4Property** ppCountProperty, MP4Property** ppTrackIdProperty) -{ - char propName[1024]; - - snprintf(propName, sizeof(propName), "%s.%s", trefName, "entryCount"); - (void)m_pRootAtom->FindProperty(propName, ppCountProperty); - - snprintf(propName, sizeof(propName), "%s.%s", trefName, "entries.trackId"); - (void)m_pRootAtom->FindProperty(propName, ppTrackIdProperty); -} - -void MP4File::AddTrackReference(const char* trefName, MP4TrackId refTrackId) -{ - MP4Integer32Property* pCountProperty = NULL; - MP4Integer32Property* pTrackIdProperty = NULL; - - GetTrackReferenceProperties(trefName, - (MP4Property**)&pCountProperty, - (MP4Property**)&pTrackIdProperty); - - if (pCountProperty && pTrackIdProperty) { - pTrackIdProperty->AddValue(refTrackId); - pCountProperty->IncrementValue(); - } -} - -uint32_t MP4File::FindTrackReference(const char* trefName, - MP4TrackId refTrackId) -{ - MP4Integer32Property* pCountProperty = NULL; - MP4Integer32Property* pTrackIdProperty = NULL; - - GetTrackReferenceProperties(trefName, - (MP4Property**)&pCountProperty, - (MP4Property**)&pTrackIdProperty); - - if (pCountProperty && pTrackIdProperty) { - for (uint32_t i = 0; i < pCountProperty->GetValue(); i++) { - if (refTrackId == pTrackIdProperty->GetValue(i)) { - return i + 1; // N.B. 1 not 0 based index - } - } - } - return 0; -} - -void MP4File::RemoveTrackReference(const char* trefName, MP4TrackId refTrackId) -{ - MP4Integer32Property* pCountProperty = NULL; - MP4Integer32Property* pTrackIdProperty = NULL; - - GetTrackReferenceProperties(trefName, - (MP4Property**)&pCountProperty, - (MP4Property**)&pTrackIdProperty); - - if (pCountProperty && pTrackIdProperty) { - for (uint32_t i = 0; i < pCountProperty->GetValue(); i++) { - if (refTrackId == pTrackIdProperty->GetValue(i)) { - pTrackIdProperty->DeleteValue(i); - pCountProperty->IncrementValue(-1); - } - } - } -} - -void MP4File::AddDataReference(MP4TrackId trackId, const char* url) -{ - MP4Atom* pDrefAtom = - FindAtom(MakeTrackName(trackId, "mdia.minf.dinf.dref")); - ASSERT(pDrefAtom); - - MP4Integer32Property* pCountProperty = NULL; - (void)pDrefAtom->FindProperty("dref.entryCount", - (MP4Property**)&pCountProperty); - ASSERT(pCountProperty); - pCountProperty->IncrementValue(); - - MP4Atom* pUrlAtom = AddChildAtom(pDrefAtom, "url "); - - if (url && url[0] != '\0') { - pUrlAtom->SetFlags(pUrlAtom->GetFlags() & 0xFFFFFE); - - MP4StringProperty* pUrlProperty = NULL; - (void)pUrlAtom->FindProperty("url .location", - (MP4Property**)&pUrlProperty); - ASSERT(pUrlProperty); - pUrlProperty->SetValue(url); - } else { - pUrlAtom->SetFlags(pUrlAtom->GetFlags() | 1); - } -} - -MP4TrackId MP4File::AddSystemsTrack(const char* type, uint32_t timeScale) -{ - const char* normType = MP4NormalizeTrackType(type); - - // TBD if user type, fix name to four chars, and warn - - MP4TrackId trackId = AddTrack(type, timeScale); - - (void)InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "nmhd", 0); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "mp4s"); - - AddDescendantAtoms(MakeTrackName(trackId, NULL), "udta.name"); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the mp4s atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4s.esds.ESID", - 0 - ); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4s.esds.decConfigDescr.objectTypeId", - MP4SystemsV1ObjectType); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4s.esds.decConfigDescr.streamType", - ConvertTrackTypeToStreamType(normType)); - - return trackId; -} - -MP4TrackId MP4File::AddODTrack() -{ - // until a demonstrated need emerges - // we limit ourselves to one object description track - if (m_odTrackId != MP4_INVALID_TRACK_ID) { - throw new Exception("object description track already exists",__FILE__, __LINE__, __FUNCTION__); - } - - m_odTrackId = AddSystemsTrack(MP4_OD_TRACK_TYPE); - - AddTrackToIod(m_odTrackId); - - (void)AddDescendantAtoms(MakeTrackName(m_odTrackId, NULL), "tref.mpod"); - - return m_odTrackId; -} - -MP4TrackId MP4File::AddSceneTrack() -{ - MP4TrackId trackId = AddSystemsTrack(MP4_SCENE_TRACK_TYPE); - - AddTrackToIod(trackId); - AddTrackToOd(trackId); - - return trackId; -} - -bool MP4File::ShallHaveIods() -{ - // NULL terminated list of brands which require the IODS atom - const char* brandsWithIods[] = { - "mp42", - "isom", - NULL - }; - - MP4FtypAtom* ftyp = (MP4FtypAtom*)m_pRootAtom->FindAtom( "ftyp" ); - if( !ftyp ) - return false; - - // check major brand - const char* brand = ftyp->majorBrand.GetValue(); - for( uint32_t i = 0; brandsWithIods[i] != NULL; i++ ) { - if( !strcasecmp( brandsWithIods[i], brand )) - return true; - } - - // check compatible brands - uint32_t max = ftyp->compatibleBrands.GetCount(); - for( uint32_t i = 0; i < max; i++ ) { - brand = ftyp->compatibleBrands.GetValue( i ); - for( uint32_t j = 0; brandsWithIods[j] != NULL ; j++) { - if( !strcasecmp( brandsWithIods[j], brand )) - return true; - } - } - - return false; -} - -void MP4File::SetAmrVendor( - MP4TrackId trackId, - uint32_t vendor) -{ - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.damr.vendor", - vendor); -} - -void MP4File::SetAmrDecoderVersion( - MP4TrackId trackId, - uint8_t decoderVersion) -{ - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.damr.decoderVersion", - decoderVersion); -} - -void MP4File::SetAmrModeSet( - MP4TrackId trackId, - uint16_t modeSet) -{ - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.damr.modeSet", - modeSet); -} -uint16_t MP4File::GetAmrModeSet(MP4TrackId trackId) -{ - return GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.damr.modeSet"); -} - -MP4TrackId MP4File::AddAmrAudioTrack( - uint32_t timeScale, - uint16_t modeSet, - uint8_t modeChangePeriod, - uint8_t framesPerSample, - bool isAmrWB) -{ - - uint32_t fixedSampleDuration = (timeScale * 20)/1000; // 20mSec/Sample - - MP4TrackId trackId = AddTrack(MP4_AUDIO_TRACK_TYPE, timeScale); - - AddTrackToOd(trackId); - - SetTrackFloatProperty(trackId, "tkhd.volume", 1.0); - - (void)InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "smhd", 0); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), isAmrWB ? "sawb" : "samr"); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the mp4a atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.timeScale", - timeScale); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.damr.modeSet", - modeSet); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.damr.modeChangePeriod", - modeChangePeriod); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.damr.framesPerSample", - framesPerSample); - - - m_pTracks[FindTrackIndex(trackId)]-> - SetFixedSampleDuration(fixedSampleDuration); - - return trackId; -} - -MP4TrackId MP4File::AddULawAudioTrack( uint32_t timeScale) -{ - uint32_t fixedSampleDuration = (timeScale * 20)/1000; // 20mSec/Sample - - MP4TrackId trackId = AddTrack(MP4_AUDIO_TRACK_TYPE, timeScale); - - AddTrackToOd(trackId); - - SetTrackFloatProperty(trackId, "tkhd.volume", 1.0); - - (void)InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "smhd", 0); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "ulaw"); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the mp4a atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.ulaw.timeScale", - timeScale<<16); - - m_pTracks[FindTrackIndex(trackId)]->SetFixedSampleDuration(fixedSampleDuration); - - return trackId; -} - -MP4TrackId MP4File::AddALawAudioTrack( uint32_t timeScale) -{ - uint32_t fixedSampleDuration = (timeScale * 20)/1000; // 20mSec/Sample - - MP4TrackId trackId = AddTrack(MP4_AUDIO_TRACK_TYPE, timeScale); - - AddTrackToOd(trackId); - - SetTrackFloatProperty(trackId, "tkhd.volume", 1.0); - - (void)InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "smhd", 0); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "alaw"); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the mp4a atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.alaw.timeScale", - timeScale<<16); - - m_pTracks[FindTrackIndex(trackId)]->SetFixedSampleDuration(fixedSampleDuration); - - return trackId; -} - -MP4TrackId MP4File::AddAudioTrack( - uint32_t timeScale, - MP4Duration sampleDuration, - uint8_t audioType) -{ - MP4TrackId trackId = AddTrack(MP4_AUDIO_TRACK_TYPE, timeScale); - - AddTrackToOd(trackId); - - SetTrackFloatProperty(trackId, "tkhd.volume", 1.0); - - (void)InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "smhd", 0); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "mp4a"); - - AddDescendantAtoms(MakeTrackName(trackId, NULL), "udta.name"); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the mp4a atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4a.timeScale", timeScale << 16); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4a.esds.ESID", - 0 - ); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4a.esds.decConfigDescr.objectTypeId", - audioType); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4a.esds.decConfigDescr.streamType", - MP4AudioStreamType); - - m_pTracks[FindTrackIndex(trackId)]-> - SetFixedSampleDuration(sampleDuration); - - return trackId; -} - -MP4TrackId MP4File::AddAC3AudioTrack( - uint32_t samplingRate, - uint8_t fscod, - uint8_t bsid, - uint8_t bsmod, - uint8_t acmod, - uint8_t lfeon, - uint8_t bit_rate_code) -{ - MP4TrackId trackId = AddTrack(MP4_AUDIO_TRACK_TYPE, samplingRate); - - AddTrackToOd(trackId); - - SetTrackFloatProperty(trackId, "tkhd.volume", 1.0); - - InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "smhd", 0); - - AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "ac-3"); - - // Set Ac3 settings - MP4Integer16Property* pSampleRateProperty = NULL; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.ac-3.samplingRate"), - (MP4Property**)&pSampleRateProperty); - if (pSampleRateProperty) { - pSampleRateProperty->SetValue(samplingRate); - } else { - throw new Exception("no ac-3.samplingRate property", __FILE__, __LINE__, __FUNCTION__); - } - - MP4BitfieldProperty* pBitfieldProperty = NULL; - - FindProperty(MakeTrackName(trackId, "mdia.minf.stbl.stsd.ac-3.dac3.fscod"), - (MP4Property**)&pBitfieldProperty); - if (pBitfieldProperty) { - pBitfieldProperty->SetValue(fscod); - pBitfieldProperty = NULL; - } else { - throw new Exception("no dac3.fscod property", __FILE__, __LINE__, __FUNCTION__); - } - - FindProperty(MakeTrackName(trackId, "mdia.minf.stbl.stsd.ac-3.dac3.bsid"), - (MP4Property**)&pBitfieldProperty); - if (pBitfieldProperty) { - pBitfieldProperty->SetValue(bsid); - pBitfieldProperty = NULL; - } else { - throw new Exception("no dac3.bsid property", __FILE__, __LINE__, __FUNCTION__); - } - - FindProperty(MakeTrackName(trackId, "mdia.minf.stbl.stsd.ac-3.dac3.bsmod"), - (MP4Property**)&pBitfieldProperty); - if (pBitfieldProperty) { - pBitfieldProperty->SetValue(bsmod); - pBitfieldProperty = NULL; - } else { - throw new Exception("no dac3.bsmod property", __FILE__, __LINE__, __FUNCTION__); - } - - FindProperty(MakeTrackName(trackId, "mdia.minf.stbl.stsd.ac-3.dac3.acmod"), - (MP4Property**)&pBitfieldProperty); - if (pBitfieldProperty) { - pBitfieldProperty->SetValue(acmod); - pBitfieldProperty = NULL; - } else { - throw new Exception("no dac3.acmod property", __FILE__, __LINE__, __FUNCTION__); - } - - FindProperty(MakeTrackName(trackId, "mdia.minf.stbl.stsd.ac-3.dac3.lfeon"), - (MP4Property**)&pBitfieldProperty); - if (pBitfieldProperty) { - pBitfieldProperty->SetValue(lfeon); - pBitfieldProperty = NULL; - } else { - throw new Exception("no dac3.lfeon property", __FILE__, __LINE__, __FUNCTION__); - } - - FindProperty(MakeTrackName(trackId, "mdia.minf.stbl.stsd.ac-3.dac3.bit_rate_code"), - (MP4Property**)&pBitfieldProperty); - if (pBitfieldProperty) { - pBitfieldProperty->SetValue(bit_rate_code); - pBitfieldProperty = NULL; - } else { - throw new Exception("no dac3.bit_rate_code property", __FILE__, __LINE__, __FUNCTION__); - } - - AddDescendantAtoms(MakeTrackName(trackId, NULL), "udta.name"); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the mp4a atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - m_pTracks[FindTrackIndex(trackId)]-> - SetFixedSampleDuration(1536); - - return trackId; -} - -MP4TrackId MP4File::AddEncAudioTrack(uint32_t timeScale, - MP4Duration sampleDuration, - uint8_t audioType, - uint32_t scheme_type, - uint16_t scheme_version, - uint8_t key_ind_len, - uint8_t iv_len, - bool selective_enc, - const char *kms_uri, - bool use_ismacryp - ) -{ - uint32_t original_fmt = 0; - - MP4TrackId trackId = AddTrack(MP4_AUDIO_TRACK_TYPE, timeScale); - - AddTrackToOd(trackId); - - SetTrackFloatProperty(trackId, "tkhd.volume", 1.0); - - (void)InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "smhd", 0); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "enca"); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the enca atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty(MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - - /* set all the ismacryp-specific values */ - // original format is mp4a - if (use_ismacryp) { - original_fmt = ATOMID("mp4a"); - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.enca.sinf.frma.data-format", - original_fmt); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.enca.sinf"), - "schm"); - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.enca.sinf"), - "schi"); - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.enca.sinf.schi"), - "iKMS"); - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.enca.sinf.schi"), - "iSFM"); - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.enca.sinf.schm.scheme_type", - scheme_type); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.enca.sinf.schm.scheme_version", - scheme_version); - - SetTrackStringProperty(trackId, - "mdia.minf.stbl.stsd.enca.sinf.schi.iKMS.kms_URI", - kms_uri); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.enca.sinf.schi.iSFM.selective-encryption", - selective_enc); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.enca.sinf.schi.iSFM.key-indicator-length", - key_ind_len); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.enca.sinf.schi.iSFM.IV-length", - iv_len); - /* end ismacryp */ - } - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.enca.timeScale", timeScale); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.enca.esds.ESID", - 0 - ); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.enca.esds.decConfigDescr.objectTypeId", - audioType); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.enca.esds.decConfigDescr.streamType", - MP4AudioStreamType); - - m_pTracks[FindTrackIndex(trackId)]-> - SetFixedSampleDuration(sampleDuration); - - return trackId; -} - -MP4TrackId MP4File::AddCntlTrackDefault (uint32_t timeScale, - MP4Duration sampleDuration, - const char *type) -{ - MP4TrackId trackId = AddTrack(MP4_CNTL_TRACK_TYPE, timeScale); - - (void)InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "nmhd", 0); - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), type); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the mp4v atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsz.sampleSize", sampleDuration); - - m_pTracks[FindTrackIndex(trackId)]-> - SetFixedSampleDuration(sampleDuration); - - return trackId; -} - -MP4TrackId MP4File::AddHrefTrack (uint32_t timeScale, - MP4Duration sampleDuration, - const char *base_url) -{ - MP4TrackId trackId = AddCntlTrackDefault(timeScale, sampleDuration, "href"); - - if (base_url != NULL) { - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.href"), - "burl"); - SetTrackStringProperty(trackId, "mdia.minf.stbl.stsd.href.burl.base_url", - base_url); - } - - return trackId; -} - -MP4TrackId MP4File::AddVideoTrackDefault( - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - const char *videoType) -{ - MP4TrackId trackId = AddTrack(MP4_VIDEO_TRACK_TYPE, timeScale); - - AddTrackToOd(trackId); - - SetTrackFloatProperty(trackId, "tkhd.width", width); - SetTrackFloatProperty(trackId, "tkhd.height", height); - - (void)InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "vmhd", 0); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), videoType); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the mp4v atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsz.sampleSize", sampleDuration); - - m_pTracks[FindTrackIndex(trackId)]-> - SetFixedSampleDuration(sampleDuration); - - return trackId; -} -MP4TrackId MP4File::AddMP4VideoTrack( - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t videoType) -{ - MP4TrackId trackId = AddVideoTrackDefault(timeScale, - sampleDuration, - width, - height, - "mp4v"); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4v.width", width); - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4v.height", height); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4v.esds.ESID", - 0 - ); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4v.esds.decConfigDescr.objectTypeId", - videoType); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4v.esds.decConfigDescr.streamType", - MP4VisualStreamType); - - return trackId; -} - -// ismacrypted -MP4TrackId MP4File::AddEncVideoTrack(uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t videoType, - mp4v2_ismacrypParams *icPp, - const char *oFormat - ) -{ - uint32_t original_fmt = 0; - - MP4TrackId trackId = AddVideoTrackDefault(timeScale, - sampleDuration, - width, - height, - "encv"); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.encv.width", width); - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.encv.height", height); - - /* set all the ismacryp-specific values */ - - original_fmt = ATOMID(oFormat); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.encv.sinf.frma.data-format", - original_fmt); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv.sinf"), - "schm"); - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv.sinf"), - "schi"); - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv.sinf.schi"), - "iKMS"); - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv.sinf.schi"), - "iSFM"); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.encv.sinf.schm.scheme_type", - icPp->scheme_type); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.encv.sinf.schm.scheme_version", - icPp->scheme_version); - - SetTrackStringProperty(trackId, - "mdia.minf.stbl.stsd.encv.sinf.schi.iKMS.kms_URI", - icPp->kms_uri); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.encv.sinf.schi.iSFM.selective-encryption", - icPp->selective_enc); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.encv.sinf.schi.iSFM.key-indicator-length", - icPp->key_ind_len); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.encv.sinf.schi.iSFM.IV-length", - icPp->iv_len); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.encv.esds.ESID", - 0 - ); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.encv.esds.decConfigDescr.objectTypeId", - videoType); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.encv.esds.decConfigDescr.streamType", - MP4VisualStreamType); - - return trackId; -} - -MP4TrackId MP4File::AddH264VideoTrack( - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t AVCProfileIndication, - uint8_t profile_compat, - uint8_t AVCLevelIndication, - uint8_t sampleLenFieldSizeMinusOne) -{ - MP4TrackId trackId = AddVideoTrackDefault(timeScale, - sampleDuration, - width, - height, - "avc1"); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.avc1.width", width); - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.avc1.height", height); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.avc1.avcC.AVCProfileIndication", - AVCProfileIndication); - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.avc1.avcC.profile_compatibility", - profile_compat); - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.avc1.avcC.AVCLevelIndication", - AVCLevelIndication); - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.avc1.avcC.lengthSizeMinusOne", - sampleLenFieldSizeMinusOne); - - return trackId; -} - -MP4TrackId MP4File::AddEncH264VideoTrack( - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - MP4Atom *srcAtom, - mp4v2_ismacrypParams *icPp) - -{ - - uint32_t original_fmt = 0; - MP4Atom *avcCAtom; - - MP4TrackId trackId = AddVideoTrackDefault(timeScale, - sampleDuration, - width, - height, - "encv"); - - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.encv.width", width); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.encv.height", height); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv"), "avcC"); - - // create default values - avcCAtom = FindAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv.avcC")); - - // export source atom - ((MP4AvcCAtom *) srcAtom)->Clone((MP4AvcCAtom *)avcCAtom); - - /* set all the ismacryp-specific values */ - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv.sinf"), "schm"); - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv.sinf"), "schi"); - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv.sinf.schi"), "iKMS"); - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv.sinf.schi"), "iSFM"); - - // per ismacrypt E&A V1.1 section 9.1.2.1 'avc1' is renamed '264b' - // avc1 must not appear as a sample entry name or original format name - original_fmt = ATOMID("264b"); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.encv.sinf.frma.data-format", - original_fmt); - - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.encv.sinf.schm.scheme_type", - icPp->scheme_type); - - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.encv.sinf.schm.scheme_version", - icPp->scheme_version); - - SetTrackStringProperty(trackId, "mdia.minf.stbl.stsd.encv.sinf.schi.iKMS.kms_URI", - icPp->kms_uri); - - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.encv.sinf.schi.iSFM.selective-encryption", - icPp->selective_enc); - - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.encv.sinf.schi.iSFM.key-indicator-length", - icPp->key_ind_len); - - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.encv.sinf.schi.iSFM.IV-length", - icPp->iv_len); - - - return trackId; -} - - -void MP4File::AddH264SequenceParameterSet (MP4TrackId trackId, - const uint8_t *pSequence, - uint16_t sequenceLen) -{ - const char *format; - MP4Atom *avcCAtom; - - // get 4cc media format - can be avc1 or encv for ismacrypted track - format = GetTrackMediaDataName(trackId); - - if (!strcasecmp(format, "avc1")) - avcCAtom = FindAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.avc1.avcC")); - else if (!strcasecmp(format, "encv")) - avcCAtom = FindAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv.avcC")); - else - // huh? unknown track format - return; - - - MP4BitfieldProperty *pCount; - MP4Integer16Property *pLength; - MP4BytesProperty *pUnit; - if ((avcCAtom->FindProperty("avcC.numOfSequenceParameterSets", - (MP4Property **)&pCount) == false) || - (avcCAtom->FindProperty("avcC.sequenceEntries.sequenceParameterSetLength", - (MP4Property **)&pLength) == false) || - (avcCAtom->FindProperty("avcC.sequenceEntries.sequenceParameterSetNALUnit", - (MP4Property **)&pUnit) == false)) { - log.errorf("%s: \"%s\": Could not find avcC properties", - __FUNCTION__, GetFilename().c_str() ); - return; - } - uint32_t count = pCount->GetValue(); - - if (count > 0) { - // see if we already exist - for (uint32_t index = 0; index < count; index++) { - if (pLength->GetValue(index) == sequenceLen) { - uint8_t *seq; - uint32_t seqlen; - pUnit->GetValue(&seq, &seqlen, index); - if (memcmp(seq, pSequence, sequenceLen) == 0) { - free(seq); - return; - } - free(seq); - } - } - } - pLength->AddValue(sequenceLen); - pUnit->AddValue(pSequence, sequenceLen); - pCount->IncrementValue(); - - return; -} -void MP4File::AddH264PictureParameterSet (MP4TrackId trackId, - const uint8_t *pPict, - uint16_t pictLen) -{ - MP4Atom *avcCAtom = - FindAtom(MakeTrackName(trackId, - "mdia.minf.stbl.stsd.avc1.avcC")); - MP4Integer8Property *pCount; - MP4Integer16Property *pLength; - MP4BytesProperty *pUnit; - if ((avcCAtom->FindProperty("avcC.numOfPictureParameterSets", - (MP4Property **)&pCount) == false) || - (avcCAtom->FindProperty("avcC.pictureEntries.pictureParameterSetLength", - (MP4Property **)&pLength) == false) || - (avcCAtom->FindProperty("avcC.pictureEntries.pictureParameterSetNALUnit", - (MP4Property **)&pUnit) == false)) { - log.errorf("%s: \"%s\": Could not find avcC picture table properties", - __FUNCTION__, GetFilename().c_str()); - return; - } - - ASSERT(pCount); - uint32_t count = pCount->GetValue(); - - if (count > 0) { - // see if we already exist - for (uint32_t index = 0; index < count; index++) { - if (pLength->GetValue(index) == pictLen) { - uint8_t *seq; - uint32_t seqlen; - pUnit->GetValue(&seq, &seqlen, index); - if (memcmp(seq, pPict, pictLen) == 0) { - log.verbose1f("\"%s\": picture matches %d", - GetFilename().c_str(), index); - free(seq); - return; - } - free(seq); - } - } - } - pLength->AddValue(pictLen); - pUnit->AddValue(pPict, pictLen); - pCount->IncrementValue(); - log.verbose1f("\"%s\": new picture added %d", GetFilename().c_str(), - pCount->GetValue()); - - return; -} -void MP4File::SetH263Vendor( - MP4TrackId trackId, - uint32_t vendor) -{ - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.s263.d263.vendor", - vendor); -} - -void MP4File::SetH263DecoderVersion( - MP4TrackId trackId, - uint8_t decoderVersion) -{ - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.s263.d263.decoderVersion", - decoderVersion); -} - -void MP4File::SetH263Bitrates( - MP4TrackId trackId, - uint32_t avgBitrate, - uint32_t maxBitrate) -{ - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.s263.d263.bitr.avgBitrate", - avgBitrate); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.s263.d263.bitr.maxBitrate", - maxBitrate); - -} - -MP4TrackId MP4File::AddH263VideoTrack( - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t h263Level, - uint8_t h263Profile, - uint32_t avgBitrate, - uint32_t maxBitrate) - -{ - MP4TrackId trackId = AddVideoTrackDefault(timeScale, - sampleDuration, - width, - height, - "s263"); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.s263.width", width); - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.s263.height", height); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.s263.d263.h263Level", h263Level); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.s263.d263.h263Profile", h263Profile); - - // Add the bitr atom - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.s263.d263"), - "bitr"); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.s263.d263.bitr.avgBitrate", avgBitrate); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.s263.d263.bitr.maxBitrate", maxBitrate); - - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsz.sampleSize", sampleDuration); - - return trackId; - -} - -MP4TrackId MP4File::AddHintTrack(MP4TrackId refTrackId) -{ - // validate reference track id - (void)FindTrackIndex(refTrackId); - - MP4TrackId trackId = - AddTrack(MP4_HINT_TRACK_TYPE, GetTrackTimeScale(refTrackId)); - - (void)InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "hmhd", 0); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "rtp "); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the rtp atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.rtp .tims.timeScale", - GetTrackTimeScale(trackId)); - - (void)AddDescendantAtoms(MakeTrackName(trackId, NULL), "tref.hint"); - - AddTrackReference(MakeTrackName(trackId, "tref.hint"), refTrackId); - - (void)AddDescendantAtoms(MakeTrackName(trackId, NULL), "udta.hnti.sdp "); - - (void)AddDescendantAtoms(MakeTrackName(trackId, NULL), "udta.hinf"); - - return trackId; -} - -MP4TrackId MP4File::AddTextTrack(MP4TrackId refTrackId) -{ - // validate reference track id - (void)FindTrackIndex(refTrackId); - - MP4TrackId trackId = - AddTrack(MP4_TEXT_TRACK_TYPE, GetTrackTimeScale(refTrackId)); - - (void)InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "gmhd", 0); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "text"); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the text atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - return trackId; -} - -MP4TrackId MP4File::AddSubtitleTrack(uint32_t timescale, - uint16_t width, - uint16_t height) -{ - MP4TrackId trackId = - AddTrack(MP4_SUBTITLE_TRACK_TYPE, timescale); - - InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "nmhd", 0); - - AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "tx3g"); - - SetTrackFloatProperty(trackId, "tkhd.width", width); - SetTrackFloatProperty(trackId, "tkhd.height", height); - - // Hardcoded crap... add the ftab atom and add one font entry - MP4Atom* pFtabAtom = AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.tx3g"), "ftab"); - - ((MP4Integer16Property*)pFtabAtom->GetProperty(0))->IncrementValue(); - - MP4Integer16Property* pfontID = (MP4Integer16Property*)((MP4TableProperty*)pFtabAtom->GetProperty(1))->GetProperty(0); - pfontID->AddValue(1); - - MP4StringProperty* pName = (MP4StringProperty*)((MP4TableProperty*)pFtabAtom->GetProperty(1))->GetProperty(1); - pName->AddValue("Arial"); - - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.tx3g.fontID", 1); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the tx3g atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - return trackId; -} - -MP4TrackId MP4File::AddSubpicTrack(uint32_t timescale, - uint16_t width, - uint16_t height) -{ - MP4TrackId trackId = - AddTrack(MP4_SUBPIC_TRACK_TYPE, timescale); - - InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "nmhd", 0); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "mp4s"); - - SetTrackFloatProperty(trackId, "tkhd.width", width); - SetTrackFloatProperty(trackId, "tkhd.height", height); - SetTrackIntegerProperty(trackId, "tkhd.layer", 0); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the mp4s atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4s.esds.ESID", - 0 - ); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4s.esds.decConfigDescr.objectTypeId", - MP4SubpicObjectType); - - SetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.mp4s.esds.decConfigDescr.streamType", - MP4NeroSubpicStreamType); - return trackId; -} - -MP4TrackId MP4File::AddChapterTextTrack(MP4TrackId refTrackId, uint32_t timescale) -{ - // validate reference track id - (void)FindTrackIndex(refTrackId); - - if (0 == timescale) - { - timescale = GetTrackTimeScale(refTrackId); - } - - MP4TrackId trackId = AddTrack(MP4_TEXT_TRACK_TYPE, timescale); - - (void)InsertChildAtom(MakeTrackName(trackId, "mdia.minf"), "gmhd", 0); - - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd"), "text"); - - // stsd is a unique beast in that it has a count of the number - // of child atoms that needs to be incremented after we add the text atom - MP4Integer32Property* pStsdCountProperty; - FindIntegerProperty( - MakeTrackName(trackId, "mdia.minf.stbl.stsd.entryCount"), - (MP4Property**)&pStsdCountProperty); - pStsdCountProperty->IncrementValue(); - - // add a "text" atom to the generic media header - // this is different to the stsd "text" atom added above - // truth be told, it's not clear what this second "text" atom does, - // but all iTunes Store movies (with chapter markers) have it, - // as do all movies with chapter tracks made by hand in QuickTime Pro - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.gmhd"), "text"); - - // disable the chapter text track - // it won't display anyway, as it has zero display size, - // but nonetheless it's good to disable it - // the track still operates as a chapter track when disabled - MP4Atom *pTkhdAtom = FindAtom(MakeTrackName(trackId, "tkhd")); - if (pTkhdAtom) { - pTkhdAtom->SetFlags(0xE); - } - - // add a "chapter" track reference to our reference track, - // pointing to this new chapter track - (void)AddDescendantAtoms(MakeTrackName(refTrackId, NULL), "tref.chap"); - AddTrackReference(MakeTrackName(refTrackId, "tref.chap"), trackId); - - return trackId; -} - -MP4TrackId MP4File::AddPixelAspectRatio(MP4TrackId trackId, uint32_t hSpacing, uint32_t vSpacing) -{ - // validate reference track id - (void)FindTrackIndex(trackId); - const char *format = GetTrackMediaDataName (trackId); - - if (!strcasecmp(format, "avc1")) - { - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.avc1"), "pasp"); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.avc1.pasp.hSpacing", hSpacing); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.avc1.pasp.vSpacing", vSpacing); - } - else if (!strcasecmp(format, "mp4v")) - { - (void)AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.mp4v"), "pasp"); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.mp4v.pasp.hSpacing", hSpacing); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.mp4v.pasp.vSpacing", vSpacing); - } - - return trackId; -} - -MP4TrackId MP4File::AddColr(MP4TrackId trackId, - uint16_t primariesIndex, - uint16_t transferFunctionIndex, - uint16_t matrixIndex) -{ - // validate reference track id - (void)FindTrackIndex(trackId); - const char *format = GetTrackMediaDataName (trackId); - - if (!strcasecmp(format, "avc1")) - { - AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.avc1"), "colr"); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.avc1.colr.primariesIndex", primariesIndex); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.avc1.colr.transferFunctionIndex", transferFunctionIndex); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.avc1.colr.matrixIndex", matrixIndex); - } - else if (!strcasecmp(format, "mp4v")) - { - AddChildAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.mp4v"), "colr"); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.mp4v.colr.primariesIndex", primariesIndex); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.mp4v.colr.transferFunctionIndex", transferFunctionIndex); - SetTrackIntegerProperty(trackId, "mdia.minf.stbl.stsd.mp4v.colr.matrixIndex", matrixIndex); - } - - return trackId; -} - - -void MP4File::AddChapter(MP4TrackId chapterTrackId, MP4Duration chapterDuration, const char *chapterTitle) -{ - if (MP4_INVALID_TRACK_ID == chapterTrackId) - { - throw new Exception("No chapter track given",__FILE__, __LINE__, __FUNCTION__); - } - - uint32_t sampleLength = 0; - uint8_t sample[1040] = {0}; - int textLen = 0; - char *text = (char *)&(sample[2]); - - if(chapterTitle != NULL) - { - textLen = min((uint32_t)strlen(chapterTitle), (uint32_t)MP4V2_CHAPTER_TITLE_MAX); - if (0 < textLen) - { - strncpy(text, chapterTitle, textLen); - } - } - else - { - MP4Track * pChapterTrack = GetTrack(chapterTrackId); - snprintf( text, 1023, "Chapter %03d", pChapterTrack->GetNumberOfSamples() + 1 ); - textLen = (uint32_t)strlen(text); - } - - sampleLength = textLen + 2 + 12; // Account for text length code and other marker - - // 2-byte length marker - sample[0] = (textLen >> 8) & 0xff; - sample[1] = textLen & 0xff; - - int x = 2 + textLen; - - // Modifier Length Marker - sample[x] = 0x00; - sample[x+1] = 0x00; - sample[x+2] = 0x00; - sample[x+3] = 0x0C; - - // Modifier Type Code - sample[x+4] = 'e'; - sample[x+5] = 'n'; - sample[x+6] = 'c'; - sample[x+7] = 'd'; - - // Modifier Value - sample[x+8] = 0x00; - sample[x+9] = 0x00; - sample[x+10] = (256 >> 8) & 0xff; - sample[x+11] = 256 & 0xff; - - WriteSample(chapterTrackId, sample, sampleLength, chapterDuration); -} - -void MP4File::AddNeroChapter(MP4Timestamp chapterStart, const char * chapterTitle) -{ - MP4Atom * pChpl = FindAtom("moov.udta.chpl"); - if (!pChpl) - { - pChpl = AddDescendantAtoms("", "moov.udta.chpl"); - } - - MP4Integer32Property * pCount = (MP4Integer32Property*)pChpl->GetProperty(3); - pCount->IncrementValue(); - - char buffer[256]; - - if (0 == chapterTitle) - { - snprintf( buffer, 255, "Chapter %03d", pCount->GetValue() ); - } - else - { - int len = min((uint32_t)strlen(chapterTitle), (uint32_t)255); - strncpy( buffer, chapterTitle, len ); - buffer[len] = 0; - } - - MP4TableProperty * pTable; - if (pChpl->FindProperty("chpl.chapters", (MP4Property **)&pTable)) - { - MP4Integer64Property * pStartTime = (MP4Integer64Property *) pTable->GetProperty(0); - MP4StringProperty * pName = (MP4StringProperty *) pTable->GetProperty(1); - if (pStartTime && pTable) - { - pStartTime->AddValue(chapterStart); - pName->AddValue(buffer); - } - } -} - -MP4TrackId MP4File::FindChapterReferenceTrack(MP4TrackId chapterTrackId, char * trackName, int trackNameSize) -{ - for (uint32_t i = 0; i < m_pTracks.Size(); i++) - { - if( MP4_IS_VIDEO_TRACK_TYPE( m_pTracks[i]->GetType() ) || - MP4_IS_AUDIO_TRACK_TYPE( m_pTracks[i]->GetType() ) ) - { - MP4TrackId refTrackId = m_pTracks[i]->GetId(); - char *name = MakeTrackName(refTrackId, "tref.chap"); - if( FindTrackReference( name, chapterTrackId ) ) - { - if( 0 != trackName ) - { - int nameLen = min((uint32_t)strlen(name), (uint32_t)trackNameSize); - strncpy(trackName, name, nameLen); - trackName[nameLen] = 0; - } - - return m_pTracks[i]->GetId(); - } - } - } - - return MP4_INVALID_TRACK_ID; -} - -MP4TrackId MP4File::FindChapterTrack(char * trackName, int trackNameSize) -{ - for (uint32_t i = 0; i < m_pTracks.Size(); i++) - { - if( !strcasecmp(MP4_TEXT_TRACK_TYPE, m_pTracks[i]->GetType()) ) - { - MP4TrackId refTrackId = FindChapterReferenceTrack(m_pTracks[i]->GetId(), trackName, trackNameSize); - if (MP4_INVALID_TRACK_ID != refTrackId) - { - return m_pTracks[i]->GetId(); - } - } - } - - return MP4_INVALID_TRACK_ID; -} - -MP4ChapterType MP4File::DeleteChapters(MP4ChapterType chapterType, MP4TrackId chapterTrackId) -{ - MP4ChapterType deletedType = MP4ChapterTypeNone; - - if (MP4ChapterTypeAny == chapterType || MP4ChapterTypeNero == chapterType) - { - MP4Atom * pChpl = FindAtom("moov.udta.chpl"); - if (pChpl) - { - MP4Atom * pParent = pChpl->GetParentAtom(); - pParent->DeleteChildAtom(pChpl); - deletedType = MP4ChapterTypeNero; - } - } - - if (MP4ChapterTypeAny == chapterType || MP4ChapterTypeQt == chapterType) - { - char trackName[128] = {0}; - - // no text track given, find a suitable - if (MP4_INVALID_TRACK_ID == chapterTrackId) - { - chapterTrackId = FindChapterTrack(trackName, 127); - } - - if (MP4_INVALID_TRACK_ID != chapterTrackId) - { - FindChapterReferenceTrack(chapterTrackId, trackName, 127); - } - - if (MP4_INVALID_TRACK_ID != chapterTrackId && 0 != trackName[0]) - { - // remove the reference - MP4Atom * pChap = FindAtom( trackName ); - if( pChap ) - { - MP4Atom * pTref = pChap->GetParentAtom(); - if( pTref ) - { - pTref->DeleteChildAtom( pChap ); - - MP4Atom* pParent = pTref->GetParentAtom(); - pParent->DeleteChildAtom( pTref ); - } - } - - // remove the chapter track - DeleteTrack(chapterTrackId); - deletedType = MP4ChapterTypeNone == deletedType ? MP4ChapterTypeQt : MP4ChapterTypeAny; - } - } - return deletedType; -} - -MP4ChapterType MP4File::GetChapters(MP4Chapter_t ** chapterList, uint32_t * chapterCount, MP4ChapterType fromChapterType) -{ - *chapterList = 0; - *chapterCount = 0; - - if (MP4ChapterTypeAny == fromChapterType || MP4ChapterTypeQt == fromChapterType) - { - uint8_t * sample = 0; - uint32_t sampleSize = 0; - MP4Timestamp startTime = 0; - MP4Duration duration = 0; - - // get the chapter track - MP4TrackId chapterTrackId = FindChapterTrack(); - if (MP4_INVALID_TRACK_ID == chapterTrackId) - { - if (MP4ChapterTypeQt == fromChapterType) - { - return MP4ChapterTypeNone; - } - } - else - { - // get infos about the chapters - MP4Track * pChapterTrack = GetTrack(chapterTrackId); - uint32_t counter = pChapterTrack->GetNumberOfSamples(); - - if (0 < counter) - { - uint32_t timescale = pChapterTrack->GetTimeScale(); - MP4Chapter_t * chapters = (MP4Chapter_t*)MP4Malloc(sizeof(MP4Chapter_t) * counter); - - // process all chapter sample - for (uint32_t i = 0; i < counter; ++i) - { - // get the sample corresponding to the starttime - MP4SampleId sampleId = pChapterTrack->GetSampleIdFromTime(startTime + duration, true); - pChapterTrack->ReadSample(sampleId, &sample, &sampleSize); - - // get the starttime and duration - pChapterTrack->GetSampleTimes(sampleId, &startTime, &duration); - - // we know that sample+2 contains the title (sample[0] and sample[1] is the length) - const char * title = (const char *)&(sample[2]); - int titleLen = min((uint32_t)((sample[0] << 8) | sample[1]), (uint32_t)MP4V2_CHAPTER_TITLE_MAX); - strncpy(chapters[i].title, title, titleLen); - chapters[i].title[titleLen] = 0; - - // write the duration (in milliseconds) - chapters[i].duration = MP4ConvertTime(duration, timescale, MP4_MILLISECONDS_TIME_SCALE); - - // we're done with this sample - MP4Free(sample); - sample = 0; - } - - *chapterList = chapters; - *chapterCount = counter; - - // we got chapters so we are done - return MP4ChapterTypeQt; - } - } - } - - if (MP4ChapterTypeAny == fromChapterType || MP4ChapterTypeNero == fromChapterType) - { - MP4Atom * pChpl = FindAtom("moov.udta.chpl"); - if (!pChpl) - { - return MP4ChapterTypeNone; - } - - MP4Integer32Property * pCounter = 0; - if (!pChpl->FindProperty("chpl.chaptercount", (MP4Property **)&pCounter)) - { - log.warningf("%s: \"%s\": Nero chapter count does not exist", - __FUNCTION__, GetFilename().c_str()); - return MP4ChapterTypeNone; - } - - uint32_t counter = pCounter->GetValue(); - if (0 == counter) - { - log.warningf("%s: \"%s\": No Nero chapters available", - __FUNCTION__, GetFilename().c_str()); - return MP4ChapterTypeNone; - } - - MP4TableProperty * pTable = 0; - MP4Integer64Property * pStartTime = 0; - MP4StringProperty * pName = 0; - MP4Duration chapterDurationSum = 0; - const char * name = 0; - - if (!pChpl->FindProperty("chpl.chapters", (MP4Property **)&pTable)) - { - log.warningf("%s: \"%s\": Nero chapter list does not exist", - __FUNCTION__, GetFilename().c_str()); - return MP4ChapterTypeNone; - } - - if (0 == (pStartTime = (MP4Integer64Property *) pTable->GetProperty(0))) - { - log.warningf("%s: \"%s\": List of Chapter starttimes does not exist", - __FUNCTION__, GetFilename().c_str()); - return MP4ChapterTypeNone; - } - if (0 == (pName = (MP4StringProperty *) pTable->GetProperty(1))) - { - log.warningf("%s: \"%s\": List of Chapter titles does not exist", - __FUNCTION__, GetFilename().c_str()); - return MP4ChapterTypeNone; - } - - MP4Chapter_t * chapters = (MP4Chapter_t*)MP4Malloc(sizeof(MP4Chapter_t) * counter); - - // get the name of the first chapter - name = pName->GetValue(); - - // process remaining chapters - uint32_t i, j; - for (i = 0, j = 1; i < counter; ++i, ++j) - { - // insert the chapter title - uint32_t len = min((uint32_t)strlen(name), (uint32_t)MP4V2_CHAPTER_TITLE_MAX); - strncpy(chapters[i].title, name, len); - chapters[i].title[len] = 0; - - // calculate the duration - MP4Duration duration = 0; - if (j < counter) - { - duration = MP4ConvertTime(pStartTime->GetValue(j), - (MP4_NANOSECONDS_TIME_SCALE / 100), - MP4_MILLISECONDS_TIME_SCALE) - chapterDurationSum; - - // now get the name of the chapter (to be written next) - name = pName->GetValue(j); - } - else - { - // last chapter - duration = MP4ConvertTime(GetDuration(), GetTimeScale(), MP4_MILLISECONDS_TIME_SCALE) - chapterDurationSum; - } - - // sum up the chapter duration - chapterDurationSum += duration; - - // insert the chapter duration - chapters[i].duration = duration; - } - - *chapterList = chapters; - *chapterCount = counter; - - return MP4ChapterTypeNero; - } - - return MP4ChapterTypeNone; -} - -MP4ChapterType MP4File::SetChapters(MP4Chapter_t * chapterList, uint32_t chapterCount, MP4ChapterType toChapterType) -{ - MP4ChapterType setType = MP4ChapterTypeNone; - - // first remove any existing chapters - DeleteChapters(toChapterType, MP4_INVALID_TRACK_ID); - - if( MP4ChapterTypeAny == toChapterType || MP4ChapterTypeNero == toChapterType ) - { - MP4Duration duration = 0; - for( uint32_t i = 0; i < chapterCount; ++i ) - { - AddNeroChapter(duration, chapterList[i].title); - duration += 10 * MP4_MILLISECONDS_TIME_SCALE * chapterList[i].duration; - } - - setType = MP4ChapterTypeNero; - } - - if (MP4ChapterTypeAny == toChapterType || MP4ChapterTypeQt == toChapterType) - { - // find the first video or audio track - MP4TrackId refTrack = MP4_INVALID_TRACK_ID; - for( uint32_t i = 0; i < m_pTracks.Size(); i++ ) - { - if( MP4_IS_VIDEO_TRACK_TYPE( m_pTracks[i]->GetType() ) || - MP4_IS_AUDIO_TRACK_TYPE( m_pTracks[i]->GetType() ) ) - { - refTrack = m_pTracks[i]->GetId(); - break; - } - } - - if( refTrack == MP4_INVALID_TRACK_ID ) - { - return setType; - } - - // create the chapter track - MP4TrackId chapterTrack = AddChapterTextTrack(refTrack, MP4_MILLISECONDS_TIME_SCALE); - - for( uint32_t i = 0 ; i < chapterCount; ++i ) - { - // create and write the chapter track sample - AddChapter( chapterTrack, chapterList[i].duration, chapterList[i].title ); - } - - setType = MP4ChapterTypeNone == setType ? MP4ChapterTypeQt : MP4ChapterTypeAny; - } - - return setType; -} - -MP4ChapterType MP4File::ConvertChapters(MP4ChapterType toChapterType) -{ - MP4ChapterType sourceType = MP4ChapterTypeNone; - const char* errMsg = 0; - - if( MP4ChapterTypeQt == toChapterType ) - { - sourceType = MP4ChapterTypeNero; - errMsg = "Could not find Nero chapter markers"; - } - else if( MP4ChapterTypeNero == toChapterType ) - { - sourceType = MP4ChapterTypeQt; - errMsg = "Could not find QuickTime chapter markers"; - } - else - { - return MP4ChapterTypeNone; - } - - MP4Chapter_t * chapters = 0; - uint32_t chapterCount = 0; - - GetChapters(&chapters, &chapterCount, sourceType); - if (0 == chapterCount) - { - log.warningf("%s: \"%s\": %s", __FUNCTION__, GetFilename().c_str(), - errMsg); - return MP4ChapterTypeNone; - } - - SetChapters(chapters, chapterCount, toChapterType); - - MP4Free(chapters); - - return toChapterType; -} - -void MP4File::ChangeMovieTimeScale(uint32_t timescale) -{ - uint32_t origTimeScale = GetTimeScale(); - if (timescale == origTimeScale) { - // already done - return; - } - - MP4Duration movieDuration = GetDuration(); - - // set movie header timescale and duration - SetTimeScale(timescale); - SetDuration(MP4ConvertTime(movieDuration, origTimeScale, timescale)); - - // set track header duration (calculated with movie header timescale) - uint32_t trackCount = GetNumberOfTracks(); - for (uint32_t i = 0; i < trackCount; ++i) - { - MP4Track * track = GetTrack(FindTrackId(i)); - MP4Atom & trackAtom = track->GetTrakAtom(); - MP4IntegerProperty * duration; - - if (trackAtom.FindProperty("trak.tkhd.duration", (MP4Property**)&duration)) - { - duration->SetValue(MP4ConvertTime(duration->GetValue(), origTimeScale, timescale)); - } - } -} - -void MP4File::DeleteTrack(MP4TrackId trackId) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - uint32_t trakIndex = FindTrakAtomIndex(trackId); - uint16_t trackIndex = FindTrackIndex(trackId); - MP4Track* pTrack = m_pTracks[trackIndex]; - - MP4Atom& trakAtom = pTrack->GetTrakAtom(); - - MP4Atom* pMoovAtom = FindAtom("moov"); - ASSERT(pMoovAtom); - - RemoveTrackFromIod(trackId, ShallHaveIods()); - RemoveTrackFromOd(trackId); - - if (trackId == m_odTrackId) { - m_odTrackId = 0; - } - - pMoovAtom->DeleteChildAtom(&trakAtom); - - m_trakIds.Delete(trakIndex); - - m_pTracks.Delete(trackIndex); - - delete pTrack; - delete &trakAtom; -} - -uint32_t MP4File::GetNumberOfTracks(const char* type, uint8_t subType) -{ - if (type == NULL) { - return m_pTracks.Size(); - } - - uint32_t typeSeen = 0; - const char* normType = MP4NormalizeTrackType(type); - - for (uint32_t i = 0; i < m_pTracks.Size(); i++) { - if (!strcmp(normType, m_pTracks[i]->GetType())) { - if (subType) { - if (strcmp(normType, MP4_AUDIO_TRACK_TYPE) == 0) { - if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) { - continue; - } - } else if (strcmp(normType, MP4_VIDEO_TRACK_TYPE)) { - if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) { - continue; - } - } - // else unknown subtype, ignore it - } - typeSeen++; - } - } - return typeSeen; -} - -MP4TrackId MP4File::AllocTrackId() -{ - MP4TrackId trackId = - GetIntegerProperty("moov.mvhd.nextTrackId"); - - if (trackId <= 0xFFFF) { - // check that nextTrackid is correct - try { - (void)FindTrackIndex(trackId); - // ERROR, this trackId is in use - } - catch (Exception* x) { - // OK, this trackId is not in use, proceed - delete x; - SetIntegerProperty("moov.mvhd.nextTrackId", trackId + 1); - return trackId; - } - } - - // we need to search for a track id - for (trackId = 1; trackId <= 0xFFFF; trackId++) { - try { - (void)FindTrackIndex(trackId); - // KEEP LOOKING, this trackId is in use - } - catch (Exception* x) { - // OK, this trackId is not in use, proceed - delete x; - return trackId; - } - } - - // extreme case where mp4 file has 2^16 tracks in it - throw new Exception("too many existing tracks", __FILE__, __LINE__, __FUNCTION__); - return MP4_INVALID_TRACK_ID; // to keep MSVC happy -} - -MP4TrackId MP4File::FindTrackId(uint16_t trackIndex, - const char* type, uint8_t subType) -{ - if (type == NULL) { - return m_pTracks[trackIndex]->GetId(); - } - - uint32_t typeSeen = 0; - const char* normType = MP4NormalizeTrackType(type); - - for (uint32_t i = 0; i < m_pTracks.Size(); i++) { - if (!strcmp(normType, m_pTracks[i]->GetType())) { - if (subType) { - if (strcmp(normType, MP4_AUDIO_TRACK_TYPE) == 0) { - if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) { - continue; - } - } else if (strcmp(normType, MP4_VIDEO_TRACK_TYPE) == 0) { - if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) { - continue; - } - } - // else unknown subtype, ignore it - } - - if (trackIndex == typeSeen) { - return m_pTracks[i]->GetId(); - } - - typeSeen++; - } - } - - ostringstream msg; - msg << "Track index doesn't exist - track " << trackIndex << " type " << type; - throw new Exception(msg.str(),__FILE__, __LINE__, __FUNCTION__); - return MP4_INVALID_TRACK_ID; // satisfy MS compiler -} - -uint16_t MP4File::FindTrackIndex(MP4TrackId trackId) -{ - for (uint32_t i = 0; i < m_pTracks.Size() && i <= 0xFFFF; i++) { - if (m_pTracks[i]->GetId() == trackId) { - return (uint16_t)i; - } - } - - ostringstream msg; - msg << "Track id " << trackId << " doesn't exist"; - throw new Exception(msg.str(),__FILE__, __LINE__, __FUNCTION__); - return (uint16_t)-1; // satisfy MS compiler -} - -uint16_t MP4File::FindTrakAtomIndex(MP4TrackId trackId) -{ - if (trackId) { - for (uint32_t i = 0; i < m_trakIds.Size(); i++) { - if (m_trakIds[i] == trackId) { - return i; - } - } - } - - ostringstream msg; - msg << "Track id " << trackId << " doesn't exist"; - throw new Exception(msg.str(),__FILE__, __LINE__, __FUNCTION__); - return (uint16_t)-1; // satisfy MS compiler -} - -uint32_t MP4File::GetSampleSize(MP4TrackId trackId, MP4SampleId sampleId) -{ - return m_pTracks[FindTrackIndex(trackId)]->GetSampleSize(sampleId); -} - -uint32_t MP4File::GetTrackMaxSampleSize(MP4TrackId trackId) -{ - return m_pTracks[FindTrackIndex(trackId)]->GetMaxSampleSize(); -} - -MP4SampleId MP4File::GetSampleIdFromTime(MP4TrackId trackId, - MP4Timestamp when, bool wantSyncSample) -{ - return m_pTracks[FindTrackIndex(trackId)]-> - GetSampleIdFromTime(when, wantSyncSample); -} - -MP4Timestamp MP4File::GetSampleTime( - MP4TrackId trackId, MP4SampleId sampleId) -{ - MP4Timestamp timestamp; - m_pTracks[FindTrackIndex(trackId)]-> - GetSampleTimes(sampleId, ×tamp, NULL); - return timestamp; -} - -MP4Duration MP4File::GetSampleDuration( - MP4TrackId trackId, MP4SampleId sampleId) -{ - MP4Duration duration; - m_pTracks[FindTrackIndex(trackId)]-> - GetSampleTimes(sampleId, NULL, &duration); - return duration; -} - -MP4Duration MP4File::GetSampleRenderingOffset( - MP4TrackId trackId, MP4SampleId sampleId) -{ - return m_pTracks[FindTrackIndex(trackId)]-> - GetSampleRenderingOffset(sampleId); -} - -bool MP4File::GetSampleSync(MP4TrackId trackId, MP4SampleId sampleId) -{ - return m_pTracks[FindTrackIndex(trackId)]->IsSyncSample(sampleId); -} - -void MP4File::ReadSample( - MP4TrackId trackId, - MP4SampleId sampleId, - uint8_t** ppBytes, - uint32_t* pNumBytes, - MP4Timestamp* pStartTime, - MP4Duration* pDuration, - MP4Duration* pRenderingOffset, - bool* pIsSyncSample, - bool* hasDependencyFlags, - uint32_t* dependencyFlags ) -{ - m_pTracks[FindTrackIndex(trackId)]->ReadSample( - sampleId, - ppBytes, - pNumBytes, - pStartTime, - pDuration, - pRenderingOffset, - pIsSyncSample, - hasDependencyFlags, - dependencyFlags ); -} - -void MP4File::WriteSample( - MP4TrackId trackId, - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration, - MP4Duration renderingOffset, - bool isSyncSample ) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - m_pTracks[FindTrackIndex(trackId)]->WriteSample( - pBytes, numBytes, duration, renderingOffset, isSyncSample ); - m_pModificationProperty->SetValue( MP4GetAbsTimestamp() ); -} - -void MP4File::WriteSampleDependency( - MP4TrackId trackId, - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration, - MP4Duration renderingOffset, - bool isSyncSample, - uint32_t dependencyFlags ) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - m_pTracks[FindTrackIndex(trackId)]->WriteSampleDependency( - pBytes, numBytes, duration, renderingOffset, isSyncSample, dependencyFlags ); - m_pModificationProperty->SetValue( MP4GetAbsTimestamp() ); -} - -void MP4File::SetSampleRenderingOffset(MP4TrackId trackId, - MP4SampleId sampleId, MP4Duration renderingOffset) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - m_pTracks[FindTrackIndex(trackId)]-> - SetSampleRenderingOffset(sampleId, renderingOffset); - - m_pModificationProperty->SetValue(MP4GetAbsTimestamp()); -} - -void MP4File::MakeFtypAtom( - char* majorBrand, - uint32_t minorVersion, - char** compatibleBrands, - uint32_t compatibleBrandsCount) -{ - MP4FtypAtom* ftyp = (MP4FtypAtom*)m_pRootAtom->FindAtom( "ftyp" ); - if (ftyp == NULL) - ftyp = (MP4FtypAtom*)InsertChildAtom( m_pRootAtom, "ftyp", 0 ); - - // bail if majorbrand is not specified; defaults suffice. - if (majorBrand == NULL) - return; - - ftyp->majorBrand.SetValue( majorBrand ); - ftyp->minorVersion.SetValue( minorVersion ); - - ftyp->compatibleBrands.SetCount( compatibleBrandsCount ); - for( uint32_t i = 0; i < compatibleBrandsCount; i++ ) - ftyp->compatibleBrands.SetValue( compatibleBrands[i], i ); -} - -char* MP4File::MakeTrackName(MP4TrackId trackId, const char* name) -{ - uint16_t trakIndex = FindTrakAtomIndex(trackId); - - if (name == NULL || name[0] == '\0') { - snprintf(m_trakName, sizeof(m_trakName), - "moov.trak[%u]", trakIndex); - } else { - snprintf(m_trakName, sizeof(m_trakName), - "moov.trak[%u].%s", trakIndex, name); - } - return m_trakName; -} - -MP4Atom *MP4File::FindTrackAtom (MP4TrackId trackId, const char *name) -{ - return FindAtom(MakeTrackName(trackId, name)); -} - -uint64_t MP4File::GetTrackIntegerProperty(MP4TrackId trackId, const char* name) -{ - return GetIntegerProperty(MakeTrackName(trackId, name)); -} - -void MP4File::SetTrackIntegerProperty(MP4TrackId trackId, const char* name, - int64_t value) -{ - SetIntegerProperty(MakeTrackName(trackId, name), value); -} - -float MP4File::GetTrackFloatProperty(MP4TrackId trackId, const char* name) -{ - return GetFloatProperty(MakeTrackName(trackId, name)); -} - -void MP4File::SetTrackFloatProperty(MP4TrackId trackId, const char* name, - float value) -{ - SetFloatProperty(MakeTrackName(trackId, name), value); -} - -const char* MP4File::GetTrackStringProperty(MP4TrackId trackId, const char* name) -{ - return GetStringProperty(MakeTrackName(trackId, name)); -} - -void MP4File::SetTrackStringProperty(MP4TrackId trackId, const char* name, - const char* value) -{ - SetStringProperty(MakeTrackName(trackId, name), value); -} - -void MP4File::GetTrackBytesProperty(MP4TrackId trackId, const char* name, - uint8_t** ppValue, uint32_t* pValueSize) -{ - GetBytesProperty(MakeTrackName(trackId, name), ppValue, pValueSize); -} - -void MP4File::SetTrackBytesProperty(MP4TrackId trackId, const char* name, - const uint8_t* pValue, uint32_t valueSize) -{ - SetBytesProperty(MakeTrackName(trackId, name), pValue, valueSize); -} - -bool MP4File::GetTrackLanguage( MP4TrackId trackId, char* code ) -{ - ostringstream oss; - oss << "moov.trak[" << FindTrakAtomIndex(trackId) << "].mdia.mdhd.language"; - - MP4Property* prop; - if( !m_pRootAtom->FindProperty( oss.str().c_str(), &prop )) - return false; - - if( prop->GetType() != LanguageCodeProperty ) - return false; - - MP4LanguageCodeProperty& lang = *static_cast(prop); - string slang; - bmff::enumLanguageCode.toString( lang.GetValue(), slang ); - if( slang.length() != 3 ) { - memset( code, '\0', 4 ); - } - else { - memcpy( code, slang.c_str(), 3 ); - code[3] = '\0'; - } - - return true; -} - -bool MP4File::SetTrackLanguage( MP4TrackId trackId, const char* code ) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - ostringstream oss; - oss << "moov.trak[" << FindTrakAtomIndex(trackId) << "].mdia.mdhd.language"; - - MP4Property* prop; - if( !m_pRootAtom->FindProperty( oss.str().c_str(), &prop )) - return false; - - if( prop->GetType() != LanguageCodeProperty ) - return false; - - MP4LanguageCodeProperty& lang = *static_cast(prop); - lang.SetValue( bmff::enumLanguageCode.toType( code )); - - return true; -} - - -bool MP4File::GetTrackName( MP4TrackId trackId, char** name ) -{ - unsigned char *val = NULL; - uint32_t valSize = 0; - MP4Atom *pMetaAtom; - - pMetaAtom = m_pRootAtom->FindAtom(MakeTrackName(trackId,"udta.name")); - - if (pMetaAtom) - { - GetBytesProperty(MakeTrackName(trackId,"udta.name.value"), (uint8_t**)&val, &valSize); - } - if (valSize > 0) - { - *name = (char*)malloc((valSize+1)*sizeof(char)); - if (*name == NULL) { - free(val); - return false; - } - memcpy(*name, val, valSize*sizeof(unsigned char)); - free(val); - (*name)[valSize] = '\0'; - return true; - } - - return false; -} - -bool MP4File::SetTrackName( MP4TrackId trackId, const char* name ) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - char atomstring[40]; - MP4Atom *pMetaAtom; - MP4BytesProperty *pMetadataProperty = NULL; - snprintf(atomstring, 40, "%s", MakeTrackName(trackId,"udta.name")); - - pMetaAtom = m_pRootAtom->FindAtom(atomstring); - - if (!pMetaAtom) - { - if (!AddDescendantAtoms(MakeTrackName(trackId, NULL), "udta.name")) - return false; - - pMetaAtom = m_pRootAtom->FindAtom(atomstring); - if (pMetaAtom == NULL) return false; - } - - ASSERT(pMetaAtom->FindProperty("name.value", - (MP4Property**)&pMetadataProperty)); - ASSERT(pMetadataProperty); - - pMetadataProperty->SetValue((uint8_t*)name, (uint32_t)strlen(name)); - - return true; -} - -// file level convenience functions - -MP4Duration MP4File::GetDuration() -{ - return m_pDurationProperty->GetValue(); -} - -void MP4File::SetDuration(MP4Duration value) -{ - m_pDurationProperty->SetValue(value); -} - -uint32_t MP4File::GetTimeScale() -{ - return m_pTimeScaleProperty->GetValue(); -} - -void MP4File::SetTimeScale(uint32_t value) -{ - if (value == 0) { - throw new Exception("invalid value", __FILE__, __LINE__, __FUNCTION__); - } - m_pTimeScaleProperty->SetValue(value); -} - -uint8_t MP4File::GetODProfileLevel() -{ - return GetIntegerProperty("moov.iods.ODProfileLevelId"); -} - -void MP4File::SetODProfileLevel(uint8_t value) -{ - SetIntegerProperty("moov.iods.ODProfileLevelId", value); -} - -uint8_t MP4File::GetSceneProfileLevel() -{ - return GetIntegerProperty("moov.iods.sceneProfileLevelId"); -} - -void MP4File::SetSceneProfileLevel(uint8_t value) -{ - SetIntegerProperty("moov.iods.sceneProfileLevelId", value); -} - -uint8_t MP4File::GetVideoProfileLevel() -{ - return GetIntegerProperty("moov.iods.visualProfileLevelId"); -} - -void MP4File::SetVideoProfileLevel(uint8_t value) -{ - SetIntegerProperty("moov.iods.visualProfileLevelId", value); -} - -uint8_t MP4File::GetAudioProfileLevel() -{ - return GetIntegerProperty("moov.iods.audioProfileLevelId"); -} - -void MP4File::SetAudioProfileLevel(uint8_t value) -{ - SetIntegerProperty("moov.iods.audioProfileLevelId", value); -} - -uint8_t MP4File::GetGraphicsProfileLevel() -{ - return GetIntegerProperty("moov.iods.graphicsProfileLevelId"); -} - -void MP4File::SetGraphicsProfileLevel(uint8_t value) -{ - SetIntegerProperty("moov.iods.graphicsProfileLevelId", value); -} - -const char* MP4File::GetSessionSdp() -{ - return GetStringProperty("moov.udta.hnti.rtp .sdpText"); -} - -void MP4File::SetSessionSdp(const char* sdpString) -{ - (void)AddDescendantAtoms("moov", "udta.hnti.rtp "); - - SetStringProperty("moov.udta.hnti.rtp .sdpText", sdpString); -} - -void MP4File::AppendSessionSdp(const char* sdpFragment) -{ - const char* oldSdpString = NULL; - try { - oldSdpString = GetSessionSdp(); - } - catch (Exception* x) { - delete x; - SetSessionSdp(sdpFragment); - return; - } - - char* newSdpString = - (char*)MP4Malloc(strlen(oldSdpString) + strlen(sdpFragment) + 1); - strcpy(newSdpString, oldSdpString); - strcat(newSdpString, sdpFragment); - SetSessionSdp(newSdpString); - MP4Free(newSdpString); -} - -// -// ismacrypt API - retrieve OriginalFormatBox -// -// parameters are assumed to have been sanity tested in mp4.cpp -// don't call this unless media data name is 'encv', -// results may otherwise be unpredictable. -// -// input: -// trackID - valid encv track ID for this file -// buflen - length of oFormat, minimum is 5 (4cc plus null terminator) -// -// output: -// oFormat - buffer to return null terminated string containing -// track original format -// return: -// 0 - original format returned OK -// 1 - buffer length error or problem retrieving track property -// -// -bool MP4File::GetTrackMediaDataOriginalFormat(MP4TrackId trackId, - char *originalFormat, uint32_t buflen) -{ - uint32_t format; - - if (buflen < 5) - return false; - - format = GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.sinf.frma.data-format"); - - IDATOM(format, originalFormat); - return true; - -} - - -// track level convenience functions - -MP4SampleId MP4File::GetTrackNumberOfSamples(MP4TrackId trackId) -{ - return m_pTracks[FindTrackIndex(trackId)]->GetNumberOfSamples(); -} - -const char* MP4File::GetTrackType(MP4TrackId trackId) -{ - return m_pTracks[FindTrackIndex(trackId)]->GetType(); -} - -const char *MP4File::GetTrackMediaDataName (MP4TrackId trackId) -{ - MP4Atom *pChild; - MP4Atom *pAtom = - FindAtom(MakeTrackName(trackId, - "mdia.minf.stbl.stsd")); - if (pAtom->GetNumberOfChildAtoms() != 1) { - log.errorf("%s: \"%s\": track %d has more than 1 child atoms in stsd", - __FUNCTION__, GetFilename().c_str(), trackId); - return NULL; - } - pChild = pAtom->GetChildAtom(0); - return pChild->GetType(); -} - - -uint32_t MP4File::GetTrackTimeScale(MP4TrackId trackId) -{ - return m_pTracks[FindTrackIndex(trackId)]->GetTimeScale(); -} - -void MP4File::SetTrackTimeScale(MP4TrackId trackId, uint32_t value) -{ - if (value == 0) { - throw new Exception("invalid value", __FILE__, __LINE__, __FUNCTION__); - } - SetTrackIntegerProperty(trackId, "mdia.mdhd.timeScale", value); -} - -MP4Duration MP4File::GetTrackDuration(MP4TrackId trackId) -{ - return GetTrackIntegerProperty(trackId, "mdia.mdhd.duration"); -} - -uint8_t MP4File::GetTrackEsdsObjectTypeId(MP4TrackId trackId) -{ - // changed mp4a to * to handle enca case - try { - return GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.esds.decConfigDescr.objectTypeId"); - } catch (Exception *x) { - delete x; - return GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.*.esds.decConfigDescr.objectTypeId"); - } -} - -uint8_t MP4File::GetTrackAudioMpeg4Type(MP4TrackId trackId) -{ - // verify that track is an MPEG-4 audio track - if (GetTrackEsdsObjectTypeId(trackId) != MP4_MPEG4_AUDIO_TYPE) { - return MP4_MPEG4_INVALID_AUDIO_TYPE; - } - - uint8_t* pEsConfig = NULL; - uint32_t esConfigSize; - - // The Mpeg4 audio type (AAC, CELP, HXVC, ...) - // is the first 5 bits of the ES configuration - - GetTrackESConfiguration(trackId, &pEsConfig, &esConfigSize); - - if (esConfigSize < 1) { - free(pEsConfig); - return MP4_MPEG4_INVALID_AUDIO_TYPE; - } - - uint8_t mpeg4Type = ((pEsConfig[0] >> 3) & 0x1f); - // TTTT TXXX XXX potentially 6 bits of extension. - if (mpeg4Type == 0x1f) { - if (esConfigSize < 2) { - free(pEsConfig); - return MP4_MPEG4_INVALID_AUDIO_TYPE; - } - mpeg4Type = 32 + - (((pEsConfig[0] & 0x7) << 3) | ((pEsConfig[1] >> 5) & 0x7)); - } - - free(pEsConfig); - - return mpeg4Type; -} - - -MP4Duration MP4File::GetTrackFixedSampleDuration(MP4TrackId trackId) -{ - return m_pTracks[FindTrackIndex(trackId)]->GetFixedSampleDuration(); -} - -double MP4File::GetTrackVideoFrameRate(MP4TrackId trackId) -{ - MP4SampleId numSamples = - GetTrackNumberOfSamples(trackId); - uint64_t - msDuration = - ConvertFromTrackDuration(trackId, - GetTrackDuration(trackId), MP4_MSECS_TIME_SCALE); - - if (msDuration == 0) { - return 0.0; - } - - return ((double)numSamples / double(msDuration)) * MP4_MSECS_TIME_SCALE; -} - -int MP4File::GetTrackAudioChannels (MP4TrackId trackId) -{ - return GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*[0].channels"); -} - -// true if media track encrypted according to ismacryp -bool MP4File::IsIsmaCrypMediaTrack(MP4TrackId trackId) -{ - if (GetTrackIntegerProperty(trackId, - "mdia.minf.stbl.stsd.*.sinf.frma.data-format") - != (uint64_t)-1) { - return true; - } - return false; -} - -bool MP4File::IsWriteMode() -{ - if( !m_file ) - return false; - - switch( m_file->mode ) { - case File::MODE_READ: - return false; - - case File::MODE_MODIFY: - case File::MODE_CREATE: - default: - break; - } - - return true; -} - -void MP4File::GetTrackESConfiguration(MP4TrackId trackId, - uint8_t** ppConfig, uint32_t* pConfigSize) -{ - try { - GetTrackBytesProperty(trackId, - "mdia.minf.stbl.stsd.*[0].esds.decConfigDescr.decSpecificInfo[0].info", - ppConfig, pConfigSize); - } catch (Exception *x) { - delete x; - GetTrackBytesProperty(trackId, - "mdia.minf.stbl.stsd.*[0].*.esds.decConfigDescr.decSpecificInfo[0].info", - ppConfig, pConfigSize); - } -} - -void MP4File::GetTrackVideoMetadata(MP4TrackId trackId, - uint8_t** ppConfig, uint32_t* pConfigSize) -{ - GetTrackBytesProperty(trackId, - "mdia.minf.stbl.stsd.*[0].*.metadata", - ppConfig, pConfigSize); -} - -void MP4File::SetTrackESConfiguration(MP4TrackId trackId, - const uint8_t* pConfig, uint32_t configSize) -{ - // get a handle on the track decoder config descriptor - MP4DescriptorProperty* pConfigDescrProperty = NULL; - if (FindProperty(MakeTrackName(trackId, - "mdia.minf.stbl.stsd.*[0].esds.decConfigDescr.decSpecificInfo"), - (MP4Property**)&pConfigDescrProperty) == false || - pConfigDescrProperty == NULL) { - // probably trackId refers to a hint track - throw new Exception("no such property", __FILE__, __LINE__, __FUNCTION__); - } - - // lookup the property to store the configuration - MP4BytesProperty* pInfoProperty = NULL; - (void)pConfigDescrProperty->FindProperty("decSpecificInfo[0].info", - (MP4Property**)&pInfoProperty); - - // configuration being set for the first time - if (pInfoProperty == NULL) { - // need to create a new descriptor to hold it - MP4Descriptor* pConfigDescr = - pConfigDescrProperty->AddDescriptor(MP4DecSpecificDescrTag); - pConfigDescr->Generate(); - - (void)pConfigDescrProperty->FindProperty( - "decSpecificInfo[0].info", - (MP4Property**)&pInfoProperty); - ASSERT(pInfoProperty); - } - - // set the value - pInfoProperty->SetValue(pConfig, configSize); -} - - -void MP4File::GetTrackH264SeqPictHeaders (MP4TrackId trackId, - uint8_t ***pppSeqHeader, - uint32_t **ppSeqHeaderSize, - uint8_t ***pppPictHeader, - uint32_t **ppPictHeaderSize) -{ - uint32_t count; - const char *format; - MP4Atom *avcCAtom; - - *pppSeqHeader = NULL; - *pppPictHeader = NULL; - *ppSeqHeaderSize = NULL; - *ppPictHeaderSize = NULL; - - // get 4cc media format - can be avc1 or encv for ismacrypted track - format = GetTrackMediaDataName (trackId); - - if (!strcasecmp(format, "avc1")) - avcCAtom = FindAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.avc1.avcC")); - else if (!strcasecmp(format, "encv")) - avcCAtom = FindAtom(MakeTrackName(trackId, "mdia.minf.stbl.stsd.encv.avcC")); - else - // huh? unknown track format - return; - - MP4BitfieldProperty *pSeqCount; - MP4IntegerProperty *pSeqLen, *pPictCount, *pPictLen; - MP4BytesProperty *pSeqVal, *pPictVal; - - if ((avcCAtom->FindProperty("avcC.numOfSequenceParameterSets", - (MP4Property **)&pSeqCount) == false) || - (avcCAtom->FindProperty("avcC.sequenceEntries.sequenceParameterSetLength", - (MP4Property **)&pSeqLen) == false) || - (avcCAtom->FindProperty("avcC.sequenceEntries.sequenceParameterSetNALUnit", - (MP4Property **)&pSeqVal) == false)) { - log.errorf("%s: \"%s\": Could not find avcC properties", __FUNCTION__, GetFilename().c_str()); - return ; - } - uint8_t **ppSeqHeader = - (uint8_t **)malloc((pSeqCount->GetValue() + 1) * sizeof(uint8_t *)); - if (ppSeqHeader == NULL) return; - *pppSeqHeader = ppSeqHeader; - - uint32_t *pSeqHeaderSize = - (uint32_t *)malloc((pSeqCount->GetValue() + 1) * sizeof(uint32_t *)); - - if (pSeqHeaderSize == NULL) return; - - *ppSeqHeaderSize = pSeqHeaderSize; - for (count = 0; count < pSeqCount->GetValue(); count++) { - pSeqVal->GetValue(&(ppSeqHeader[count]), &(pSeqHeaderSize[count]), - count); - } - ppSeqHeader[count] = NULL; - pSeqHeaderSize[count] = 0; - - if ((avcCAtom->FindProperty("avcC.numOfPictureParameterSets", - (MP4Property **)&pPictCount) == false) || - (avcCAtom->FindProperty("avcC.pictureEntries.pictureParameterSetLength", - (MP4Property **)&pPictLen) == false) || - (avcCAtom->FindProperty("avcC.pictureEntries.pictureParameterSetNALUnit", - (MP4Property **)&pPictVal) == false)) { - log.errorf("%s: \"%s\": Could not find avcC picture table properties", - __FUNCTION__, GetFilename().c_str()); - return ; - } - uint8_t - **ppPictHeader = - (uint8_t **)malloc((pPictCount->GetValue() + 1) * sizeof(uint8_t *)); - if (ppPictHeader == NULL) return; - uint32_t *pPictHeaderSize = - (uint32_t *)malloc((pPictCount->GetValue() + 1)* sizeof(uint32_t *)); - if (pPictHeaderSize == NULL) { - free(ppPictHeader); - return; - } - *pppPictHeader = ppPictHeader; - *ppPictHeaderSize = pPictHeaderSize; - - for (count = 0; count < pPictCount->GetValue(); count++) { - pPictVal->GetValue(&(ppPictHeader[count]), &(pPictHeaderSize[count]), - count); - } - ppPictHeader[count] = NULL; - pPictHeaderSize[count] = 0; - return ; -} - - - -const char* MP4File::GetHintTrackSdp(MP4TrackId hintTrackId) -{ - return GetTrackStringProperty(hintTrackId, "udta.hnti.sdp .sdpText"); -} - -void MP4File::SetHintTrackSdp(MP4TrackId hintTrackId, const char* sdpString) -{ - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", __FILE__, __LINE__, __FUNCTION__); - } - - (void)AddDescendantAtoms( - MakeTrackName(hintTrackId, NULL), "udta.hnti.sdp "); - - SetTrackStringProperty(hintTrackId, "udta.hnti.sdp .sdpText", sdpString); -} - -void MP4File::AppendHintTrackSdp(MP4TrackId hintTrackId, - const char* sdpFragment) -{ - const char* oldSdpString = NULL; - try { - oldSdpString = GetHintTrackSdp(hintTrackId); - } - catch (Exception* x) { - delete x; - SetHintTrackSdp(hintTrackId, sdpFragment); - return; - } - - char* newSdpString = - (char*)MP4Malloc(strlen(oldSdpString) + strlen(sdpFragment) + 1); - strcpy(newSdpString, oldSdpString); - strcat(newSdpString, sdpFragment); - SetHintTrackSdp(hintTrackId, newSdpString); - MP4Free(newSdpString); -} - -void MP4File::GetHintTrackRtpPayload( - MP4TrackId hintTrackId, - char** ppPayloadName, - uint8_t* pPayloadNumber, - uint16_t* pMaxPayloadSize, - char **ppEncodingParams) -{ - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", __FILE__, __LINE__, __FUNCTION__); - } - - ((MP4RtpHintTrack*)pTrack)->GetPayload( - ppPayloadName, pPayloadNumber, pMaxPayloadSize, ppEncodingParams); -} - -void MP4File::SetHintTrackRtpPayload(MP4TrackId hintTrackId, - const char* payloadName, uint8_t* pPayloadNumber, uint16_t maxPayloadSize, - const char *encoding_params, - bool include_rtp_map, - bool include_mpeg4_esid) -{ - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", __FILE__, __LINE__, __FUNCTION__); - } - - uint8_t payloadNumber; - if (pPayloadNumber && *pPayloadNumber != MP4_SET_DYNAMIC_PAYLOAD) { - payloadNumber = *pPayloadNumber; - } else { - payloadNumber = AllocRtpPayloadNumber(); - if (pPayloadNumber) { - *pPayloadNumber = payloadNumber; - } - } - - ((MP4RtpHintTrack*)pTrack)->SetPayload( - payloadName, payloadNumber, maxPayloadSize, encoding_params, - include_rtp_map, include_mpeg4_esid); -} - -uint8_t MP4File::AllocRtpPayloadNumber() -{ - MP4Integer32Array usedPayloads; - uint32_t i; - - // collect rtp payload numbers in use by existing tracks - for (i = 0; i < m_pTracks.Size(); i++) { - MP4Atom& trakAtom = m_pTracks[i]->GetTrakAtom(); - - MP4Integer32Property* pPayloadProperty = NULL; - if (trakAtom.FindProperty("trak.udta.hinf.payt.payloadNumber", - (MP4Property**)&pPayloadProperty) && - pPayloadProperty) { - usedPayloads.Add(pPayloadProperty->GetValue()); - } - } - - // search dynamic payload range for an available slot - uint8_t payload; - for (payload = 96; payload < 128; payload++) { - for (i = 0; i < usedPayloads.Size(); i++) { - if (payload == usedPayloads[i]) { - break; - } - } - if (i == usedPayloads.Size()) { - break; - } - } - - if (payload >= 128) { - throw new Exception("no more available rtp payload numbers", - __FILE__, __LINE__, __FUNCTION__); - } - - return payload; -} - -MP4TrackId MP4File::GetHintTrackReferenceTrackId( - MP4TrackId hintTrackId) -{ - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", - __FILE__, __LINE__, __FUNCTION__); - } - - MP4Track* pRefTrack = ((MP4RtpHintTrack*)pTrack)->GetRefTrack(); - - if (pRefTrack == NULL) { - return MP4_INVALID_TRACK_ID; - } - return pRefTrack->GetId(); -} - -void MP4File::ReadRtpHint( - MP4TrackId hintTrackId, - MP4SampleId hintSampleId, - uint16_t* pNumPackets) -{ - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", __FILE__, __LINE__, __FUNCTION__); - } - ((MP4RtpHintTrack*)pTrack)-> - ReadHint(hintSampleId, pNumPackets); -} - -uint16_t MP4File::GetRtpHintNumberOfPackets( - MP4TrackId hintTrackId) -{ - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", - __FILE__, __LINE__, __FUNCTION__); - } - return ((MP4RtpHintTrack*)pTrack)->GetHintNumberOfPackets(); -} - -int8_t MP4File::GetRtpPacketBFrame( - MP4TrackId hintTrackId, - uint16_t packetIndex) -{ - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", - __FILE__, __LINE__, __FUNCTION__); - } - return ((MP4RtpHintTrack*)pTrack)->GetPacketBFrame(packetIndex); -} - -int32_t MP4File::GetRtpPacketTransmitOffset( - MP4TrackId hintTrackId, - uint16_t packetIndex) -{ - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", - __FILE__, __LINE__, __FUNCTION__); - } - return ((MP4RtpHintTrack*)pTrack)->GetPacketTransmitOffset(packetIndex); -} - -void MP4File::ReadRtpPacket( - MP4TrackId hintTrackId, - uint16_t packetIndex, - uint8_t** ppBytes, - uint32_t* pNumBytes, - uint32_t ssrc, - bool includeHeader, - bool includePayload) -{ - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", __FILE__, __LINE__, __FUNCTION__); - } - ((MP4RtpHintTrack*)pTrack)->ReadPacket( - packetIndex, ppBytes, pNumBytes, - ssrc, includeHeader, includePayload); -} - -MP4Timestamp MP4File::GetRtpTimestampStart( - MP4TrackId hintTrackId) -{ - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", __FILE__, __LINE__, __FUNCTION__); - } - return ((MP4RtpHintTrack*)pTrack)->GetRtpTimestampStart(); -} - -void MP4File::SetRtpTimestampStart( - MP4TrackId hintTrackId, - MP4Timestamp rtpStart) -{ - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", - __FILE__, __LINE__, __FUNCTION__); - } - ((MP4RtpHintTrack*)pTrack)->SetRtpTimestampStart(rtpStart); -} - -void MP4File::AddRtpHint(MP4TrackId hintTrackId, - bool isBframe, uint32_t timestampOffset) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", __FILE__, __LINE__, __FUNCTION__); - } - ((MP4RtpHintTrack*)pTrack)->AddHint(isBframe, timestampOffset); -} - -void MP4File::AddRtpPacket( - MP4TrackId hintTrackId, bool setMbit, int32_t transmitOffset) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", __FILE__, __LINE__, __FUNCTION__); - } - ((MP4RtpHintTrack*)pTrack)->AddPacket(setMbit, transmitOffset); -} - -void MP4File::AddRtpImmediateData(MP4TrackId hintTrackId, - const uint8_t* pBytes, uint32_t numBytes) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", - __FILE__, __LINE__, __FUNCTION__); - } - ((MP4RtpHintTrack*)pTrack)->AddImmediateData(pBytes, numBytes); -} - -void MP4File::AddRtpSampleData(MP4TrackId hintTrackId, - MP4SampleId sampleId, uint32_t dataOffset, uint32_t dataLength) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", - __FILE__, __LINE__, __FUNCTION__); - } - ((MP4RtpHintTrack*)pTrack)->AddSampleData( - sampleId, dataOffset, dataLength); -} - -void MP4File::AddRtpESConfigurationPacket(MP4TrackId hintTrackId) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", - __FILE__, __LINE__, __FUNCTION__); - } - ((MP4RtpHintTrack*)pTrack)->AddESConfigurationPacket(); -} - -void MP4File::WriteRtpHint(MP4TrackId hintTrackId, - MP4Duration duration, bool isSyncSample) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - - MP4Track* pTrack = m_pTracks[FindTrackIndex(hintTrackId)]; - - if (strcmp(pTrack->GetType(), MP4_HINT_TRACK_TYPE)) { - throw new Exception("track is not a hint track", - __FILE__, __LINE__, __FUNCTION__); - } - ((MP4RtpHintTrack*)pTrack)->WriteHint(duration, isSyncSample); -} - -uint64_t MP4File::ConvertFromMovieDuration( - MP4Duration duration, - uint32_t timeScale) -{ - return MP4ConvertTime((uint64_t)duration, - GetTimeScale(), timeScale); -} - -uint64_t MP4File::ConvertFromTrackTimestamp( - MP4TrackId trackId, - MP4Timestamp timeStamp, - uint32_t timeScale) -{ - return MP4ConvertTime(timeStamp, - GetTrackTimeScale(trackId), timeScale); -} - -MP4Timestamp MP4File::ConvertToTrackTimestamp( - MP4TrackId trackId, - uint64_t timeStamp, - uint32_t timeScale) -{ - return (MP4Timestamp)MP4ConvertTime(timeStamp, - timeScale, GetTrackTimeScale(trackId)); -} - -uint64_t MP4File::ConvertFromTrackDuration( - MP4TrackId trackId, - MP4Duration duration, - uint32_t timeScale) -{ - return MP4ConvertTime((uint64_t)duration, - GetTrackTimeScale(trackId), timeScale); -} - -MP4Duration MP4File::ConvertToTrackDuration( - MP4TrackId trackId, - uint64_t duration, - uint32_t timeScale) -{ - return (MP4Duration)MP4ConvertTime(duration, - timeScale, GetTrackTimeScale(trackId)); -} - -uint8_t MP4File::ConvertTrackTypeToStreamType(const char* trackType) -{ - uint8_t streamType; - - if (!strcmp(trackType, MP4_OD_TRACK_TYPE)) { - streamType = MP4ObjectDescriptionStreamType; - } else if (!strcmp(trackType, MP4_SCENE_TRACK_TYPE)) { - streamType = MP4SceneDescriptionStreamType; - } else if (!strcmp(trackType, MP4_CLOCK_TRACK_TYPE)) { - streamType = MP4ClockReferenceStreamType; - } else if (!strcmp(trackType, MP4_MPEG7_TRACK_TYPE)) { - streamType = MP4Mpeg7StreamType; - } else if (!strcmp(trackType, MP4_OCI_TRACK_TYPE)) { - streamType = MP4OCIStreamType; - } else if (!strcmp(trackType, MP4_IPMP_TRACK_TYPE)) { - streamType = MP4IPMPStreamType; - } else if (!strcmp(trackType, MP4_MPEGJ_TRACK_TYPE)) { - streamType = MP4MPEGJStreamType; - } else { - streamType = MP4UserPrivateStreamType; - } - - return streamType; -} - -// edit list - -char* MP4File::MakeTrackEditName( - MP4TrackId trackId, - MP4EditId editId, - const char* name) -{ - char* trakName = MakeTrackName(trackId, NULL); - - if (m_editName == NULL) { - m_editName = (char *)malloc(1024); - if (m_editName == NULL) return NULL; - } - snprintf(m_editName, 1024, - "%s.edts.elst.entries[%u].%s", - trakName, editId - 1, name); - return m_editName; -} - -MP4EditId MP4File::AddTrackEdit( - MP4TrackId trackId, - MP4EditId editId) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - return m_pTracks[FindTrackIndex(trackId)]->AddEdit(editId); -} - -void MP4File::DeleteTrackEdit( - MP4TrackId trackId, - MP4EditId editId) -{ - ProtectWriteOperation(__FILE__, __LINE__, __FUNCTION__); - m_pTracks[FindTrackIndex(trackId)]->DeleteEdit(editId); -} - -uint32_t MP4File::GetTrackNumberOfEdits( - MP4TrackId trackId) -{ - return GetTrackIntegerProperty(trackId, "edts.elst.entryCount"); -} - -MP4Duration MP4File::GetTrackEditTotalDuration( - MP4TrackId trackId, - MP4EditId editId) -{ - return m_pTracks[FindTrackIndex(trackId)]->GetEditTotalDuration(editId); -} - -MP4Timestamp MP4File::GetTrackEditStart( - MP4TrackId trackId, - MP4EditId editId) -{ - return m_pTracks[FindTrackIndex(trackId)]->GetEditStart(editId); -} - -MP4Timestamp MP4File::GetTrackEditMediaStart( - MP4TrackId trackId, - MP4EditId editId) -{ - return GetIntegerProperty( - MakeTrackEditName(trackId, editId, "mediaTime")); -} - -void MP4File::SetTrackEditMediaStart( - MP4TrackId trackId, - MP4EditId editId, - MP4Timestamp startTime) -{ - SetIntegerProperty( - MakeTrackEditName(trackId, editId, "mediaTime"), - startTime); -} - -MP4Duration MP4File::GetTrackEditDuration( - MP4TrackId trackId, - MP4EditId editId) -{ - return GetIntegerProperty( - MakeTrackEditName(trackId, editId, "segmentDuration")); -} - -void MP4File::SetTrackEditDuration( - MP4TrackId trackId, - MP4EditId editId, - MP4Duration duration) -{ - SetIntegerProperty( - MakeTrackEditName(trackId, editId, "segmentDuration"), - duration); -} - -bool MP4File::GetTrackEditDwell( - MP4TrackId trackId, - MP4EditId editId) -{ - return (GetIntegerProperty( - MakeTrackEditName(trackId, editId, "mediaRate")) == 0); -} - -void MP4File::SetTrackEditDwell( - MP4TrackId trackId, - MP4EditId editId, - bool dwell) -{ - SetIntegerProperty( - MakeTrackEditName(trackId, editId, "mediaRate"), - (dwell ? 0 : 1)); -} - -MP4SampleId MP4File::GetSampleIdFromEditTime( - MP4TrackId trackId, - MP4Timestamp when, - MP4Timestamp* pStartTime, - MP4Duration* pDuration) -{ - return m_pTracks[FindTrackIndex(trackId)]->GetSampleIdFromEditTime( - when, pStartTime, pDuration); -} - -MP4Duration MP4File::GetTrackDurationPerChunk( MP4TrackId trackId ) -{ - return m_pTracks[FindTrackIndex(trackId)]->GetDurationPerChunk(); -} - -void MP4File::SetTrackDurationPerChunk( MP4TrackId trackId, MP4Duration duration ) -{ - m_pTracks[FindTrackIndex(trackId)]->SetDurationPerChunk( duration ); -} - -void MP4File::CopySample( - MP4File* srcFile, - MP4TrackId srcTrackId, - MP4SampleId srcSampleId, - MP4File* dstFile, - MP4TrackId dstTrackId, - MP4Duration dstSampleDuration ) -{ - // Note: we leave it up to the caller to ensure that the - // source and destination tracks are compatible. - // i.e. copying audio samples into a video track - // is unlikely to do anything useful - - uint8_t* pBytes = NULL; - uint32_t numBytes = 0; - MP4Duration sampleDuration; - MP4Duration renderingOffset; - bool isSyncSample; - bool hasDependencyFlags; - uint32_t dependencyFlags; - - srcFile->ReadSample( - srcTrackId, - srcSampleId, - &pBytes, - &numBytes, - NULL, - &sampleDuration, - &renderingOffset, - &isSyncSample, - &hasDependencyFlags, - &dependencyFlags ); - - if( !dstFile ) - dstFile = srcFile; - - if( dstTrackId == MP4_INVALID_TRACK_ID ) - dstTrackId = srcTrackId; - - if( dstSampleDuration != MP4_INVALID_DURATION ) - sampleDuration = dstSampleDuration; - - if( hasDependencyFlags ) { - dstFile->WriteSampleDependency( - dstTrackId, - pBytes, - numBytes, - sampleDuration, - renderingOffset, - isSyncSample, - dependencyFlags ); - } - else { - dstFile->WriteSample( - dstTrackId, - pBytes, - numBytes, - sampleDuration, - renderingOffset, - isSyncSample ); - } - - free( pBytes ); -} - -void MP4File::EncAndCopySample( - MP4File* srcFile, - MP4TrackId srcTrackId, - MP4SampleId srcSampleId, - encryptFunc_t encfcnp, - uint32_t encfcnparam1, - MP4File* dstFile, - MP4TrackId dstTrackId, - MP4Duration dstSampleDuration ) -{ - // Note: we leave it up to the caller to ensure that the - // source and destination tracks are compatible. - // i.e. copying audio samples into a video track - // is unlikely to do anything useful - - uint8_t* pBytes = NULL; - uint32_t numBytes = 0; - uint8_t* encSampleData = NULL; - uint32_t encSampleLength = 0; - MP4Duration sampleDuration; - MP4Duration renderingOffset; - bool isSyncSample; - bool hasDependencyFlags; - uint32_t dependencyFlags; - - ASSERT(srcFile); - srcFile->ReadSample( - srcTrackId, - srcSampleId, - &pBytes, - &numBytes, - NULL, - &sampleDuration, - &renderingOffset, - &isSyncSample, - &hasDependencyFlags, - &dependencyFlags ); - - if( !dstFile ) - dstFile = srcFile; - - ASSERT(dstFile); - - if( dstTrackId == MP4_INVALID_TRACK_ID ) - dstTrackId = srcTrackId; - - if( dstSampleDuration != MP4_INVALID_DURATION ) - sampleDuration = dstSampleDuration; - - //if( ismacrypEncryptSampleAddHeader( ismaCryptSId, numBytes, pBytes, &encSampleLength, &encSampleData ) != 0) - if( encfcnp( encfcnparam1, numBytes, pBytes, &encSampleLength, &encSampleData ) != 0 ) - log.errorf("%s(%s,%s) Can't encrypt the sample and add its header %u", - __FUNCTION__, srcFile->GetFilename().c_str(), dstFile->GetFilename().c_str(), srcSampleId ); - - if( hasDependencyFlags ) { - dstFile->WriteSampleDependency( - dstTrackId, - pBytes, - numBytes, - sampleDuration, - renderingOffset, - isSyncSample, - dependencyFlags ); - } - else { - dstFile->WriteSample( - dstTrackId, - encSampleData, - encSampleLength, - sampleDuration, - renderingOffset, - isSyncSample ); - } - - free( pBytes ); - - if( encSampleData != NULL ) - free( encSampleData ); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file.h deleted file mode 100644 index 813f90f7..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file.h +++ /dev/null @@ -1,991 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MPEG4IP. -// -// The Initial Developer of the Original Code is Cisco Systems Inc. -// Portions created by Cisco Systems Inc. are -// Copyright (C) Cisco Systems Inc. 2001 - 2005. All Rights Reserved. -// -// 3GPP features implementation is based on 3GPP's TS26.234-v5.60, -// and was contributed by Ximpo Group Ltd. -// -// Portions created by Ximpo Group Ltd. are -// Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. -// -// Contributors: -// Dave Mackie, dmackie@cisco.com -// Alix Marchandise-Franquet, alix@cisco.com -// Ximpo Group Ltd., mp4v2@ximpo.com -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_MP4FILE_H -#define MP4V2_IMPL_MP4FILE_H - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -class MP4Atom; -class MP4Property; -class MP4Float32Property; -class MP4StringProperty; -class MP4BytesProperty; -class MP4Descriptor; -class MP4DescriptorProperty; - -class MP4File -{ -public: - static void CopySample( - MP4File* srcFile, - MP4TrackId srcTrackId, - MP4SampleId srcSampleId, - MP4File* dstFile, - MP4TrackId dstTrackId, - MP4Duration dstSampleDuration ); - - static void EncAndCopySample( - MP4File* srcFile, - MP4TrackId srcTrackId, - MP4SampleId srcSampleId, - encryptFunc_t encfcnp, - uint32_t encfcnparam1, - MP4File* dstFile, - MP4TrackId dstTrackId, - MP4Duration dstSampleDuration ); - -public: - MP4File(); - ~MP4File(); - - /////////////////////////////////////////////////////////////////////////// - // file ops - /////////////////////////////////////////////////////////////////////////// - - void Create( const char* fileName, - uint32_t flags, - int add_ftyp = 1, - int add_iods = 1, - char* majorBrand = NULL, - uint32_t minorVersion = 0, - char** supportedBrands = NULL, - uint32_t supportedBrandsCount = 0 ); - - const std::string &GetFilename() const; - void Read( const char* name, const MP4FileProvider* provider ); - bool Modify( const char* fileName ); - void Optimize( const char* srcFileName, const char* dstFileName = NULL ); - bool CopyClose( const string& copyFileName ); - void Dump( bool dumpImplicits = false ); - void Close(uint32_t flags = 0); - - bool Use64Bits(const char *atomName); - void Check64BitStatus(const char *atomName); - /* file properties */ - - uint64_t GetIntegerProperty(const char* name); - float GetFloatProperty(const char* name); - const char* GetStringProperty(const char* name); - void GetBytesProperty(const char* name, - uint8_t** ppValue, uint32_t* pValueSize); - - void SetIntegerProperty(const char* name, uint64_t value); - void SetFloatProperty(const char* name, float value); - void SetStringProperty(const char* name, const char* value); - void SetBytesProperty(const char* name, - const uint8_t* pValue, uint32_t valueSize); - - // file level convenience functions - - MP4Duration GetDuration(); - void SetDuration(MP4Duration value); - - uint32_t GetTimeScale(); - void SetTimeScale(uint32_t value); - - uint8_t GetODProfileLevel(); - void SetODProfileLevel(uint8_t value); - - uint8_t GetSceneProfileLevel(); - void SetSceneProfileLevel(uint8_t value); - - uint8_t GetVideoProfileLevel(); - void SetVideoProfileLevel(uint8_t value); - - uint8_t GetAudioProfileLevel(); - void SetAudioProfileLevel(uint8_t value); - - uint8_t GetGraphicsProfileLevel(); - void SetGraphicsProfileLevel(uint8_t value); - - const char* GetSessionSdp(); - void SetSessionSdp(const char* sdpString); - void AppendSessionSdp(const char* sdpString); - - /* track operations */ - - MP4TrackId AddTrack(const char* type, uint32_t timeScale = 1000); - void DeleteTrack(MP4TrackId trackId); - - uint32_t GetNumberOfTracks(const char* type = NULL, uint8_t subType = 0); - - MP4TrackId AllocTrackId(); - MP4TrackId FindTrackId(uint16_t trackIndex, - const char* type = NULL, uint8_t subType = 0); - uint16_t FindTrackIndex(MP4TrackId trackId); - uint16_t FindTrakAtomIndex(MP4TrackId trackId); - - /* track properties */ - MP4Atom *FindTrackAtom(MP4TrackId trackId, const char *name); - uint64_t GetTrackIntegerProperty( - MP4TrackId trackId, const char* name); - float GetTrackFloatProperty( - MP4TrackId trackId, const char* name); - const char* GetTrackStringProperty( - MP4TrackId trackId, const char* name); - void GetTrackBytesProperty( - MP4TrackId trackId, const char* name, - uint8_t** ppValue, uint32_t* pValueSize); - - void SetTrackIntegerProperty( - MP4TrackId trackId, const char* name, int64_t value); - void SetTrackFloatProperty( - MP4TrackId trackId, const char* name, float value); - void SetTrackStringProperty( - MP4TrackId trackId, const char* name, const char* value); - void SetTrackBytesProperty( - MP4TrackId trackId, const char* name, - const uint8_t* pValue, uint32_t valueSize); - - bool GetTrackLanguage( MP4TrackId, char* ); - bool SetTrackLanguage( MP4TrackId, const char* ); - bool GetTrackName( MP4TrackId trackId, char** name ); - bool SetTrackName( MP4TrackId trackId, const char* name); - - /* sample operations */ - - uint32_t GetSampleSize(MP4TrackId trackId, MP4SampleId sampleId); - - uint32_t GetTrackMaxSampleSize(MP4TrackId trackId); - - MP4SampleId GetSampleIdFromTime(MP4TrackId trackId, - MP4Timestamp when, bool wantSyncSample = false); - - MP4Timestamp GetSampleTime( - MP4TrackId trackId, MP4SampleId sampleId); - - MP4Duration GetSampleDuration( - MP4TrackId trackId, MP4SampleId sampleId); - - MP4Duration GetSampleRenderingOffset( - MP4TrackId trackId, MP4SampleId sampleId); - - bool GetSampleSync( - MP4TrackId trackId, MP4SampleId sampleId); - - void ReadSample( - // input parameters - MP4TrackId trackId, - MP4SampleId sampleId, - // output parameters - uint8_t** ppBytes, - uint32_t* pNumBytes, - MP4Timestamp* pStartTime = NULL, - MP4Duration* pDuration = NULL, - MP4Duration* pRenderingOffset = NULL, - bool* pIsSyncSample = NULL, - bool* hasDependencyFlags = NULL, - uint32_t* dependencyFlags = NULL ); - - void WriteSample( - MP4TrackId trackId, - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration = 0, - MP4Duration renderingOffset = 0, - bool isSyncSample = true ); - - void WriteSampleDependency( - MP4TrackId trackId, - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration, - MP4Duration renderingOffset, - bool isSyncSample, - uint32_t dependencyFlags ); - - void SetSampleRenderingOffset( - MP4TrackId trackId, - MP4SampleId sampleId, - MP4Duration renderingOffset ); - - MP4Duration GetTrackDurationPerChunk( MP4TrackId ); - void SetTrackDurationPerChunk( MP4TrackId, MP4Duration ); - - /* track level convenience functions */ - - MP4TrackId AddSystemsTrack(const char* type, uint32_t timeScale = 1000 ); - - MP4TrackId AddODTrack(); - - MP4TrackId AddSceneTrack(); - - MP4TrackId AddAudioTrack( - uint32_t timeScale, - MP4Duration sampleDuration, - uint8_t audioType); - - MP4TrackId AddULawAudioTrack( - uint32_t timeScale); - - MP4TrackId AddALawAudioTrack( - uint32_t timeScale); - - MP4TrackId AddAC3AudioTrack( - uint32_t samplingRate, - uint8_t fscod, - uint8_t bsid, - uint8_t bsmod, - uint8_t acmod, - uint8_t lfeon, - uint8_t bit_rate_code); - - MP4TrackId AddEncAudioTrack( // ismacryp - uint32_t timeScale, - MP4Duration sampleDuration, - uint8_t audioType, - uint32_t scheme_type, - uint16_t scheme_version, - uint8_t key_ind_len, - uint8_t iv_len, - bool selective_enc, - const char *kms_uri, - bool use_ismacryp); - - void SetAmrVendor( - MP4TrackId trackId, - uint32_t vendor); - - void SetAmrDecoderVersion( - MP4TrackId trackId, - uint8_t decoderVersion); - - void SetAmrModeSet( - MP4TrackId trackId, - uint16_t modeSet); - uint16_t GetAmrModeSet(MP4TrackId trackId); - - MP4TrackId AddAmrAudioTrack( - uint32_t timeScale, - uint16_t modeSet, - uint8_t modeChangePeriod, - uint8_t framesPerSample, - bool isAmrWB); - - MP4TrackId AddHrefTrack(uint32_t timeScale, - MP4Duration sampleDuration, - const char *base_url); - - MP4TrackId AddMP4VideoTrack( - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t videoType); - - MP4TrackId AddEncVideoTrack( // ismacryp - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t videoType, - mp4v2_ismacrypParams *icPp, - const char *oFormat); - - void SetH263Vendor( - MP4TrackId trackId, - uint32_t vendor); - - void SetH263DecoderVersion( - MP4TrackId trackId, - uint8_t decoderVersion); - - void SetH263Bitrates( - MP4TrackId, - uint32_t avgBitrate, - uint32_t maxBitrate); - - MP4TrackId AddH263VideoTrack( - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t h263Level, - uint8_t h263Profile, - uint32_t avgBitrate, - uint32_t maxBitrate); - - MP4TrackId AddH264VideoTrack( - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - uint8_t AVCProfileIndication, - uint8_t profile_compat, - uint8_t AVCLevelIndication, - uint8_t sampleLenFieldSizeMinusOne); - - MP4TrackId AddEncH264VideoTrack( - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - MP4Atom *srcAtom, - mp4v2_ismacrypParams *icPp); - - void AddH264SequenceParameterSet(MP4TrackId trackId, - const uint8_t *pSequence, - uint16_t sequenceLen); - void AddH264PictureParameterSet(MP4TrackId trackId, - const uint8_t *pPicture, - uint16_t pictureLen); - MP4TrackId AddHintTrack(MP4TrackId refTrackId); - - MP4TrackId AddTextTrack(MP4TrackId refTrackId); - - /** Add a QuickTime chapter track. - * - * This function adds a chapter (text) track. - * The optional parameter timescale may be supplied to give the new - * chapter a specific timescale. Otherwise the chapter track will have - * the same timescale as the reference track defined in parameter refTrackId. - * - * @param refTrackId ID of the track that will reference the chapter track. - * @param timescale the timescale of the chapter track or 0 to use the - * timescale of track specified by refTrackId. - * - * @return ID of the created chapter track. - */ - MP4TrackId AddChapterTextTrack( - MP4TrackId refTrackId, - uint32_t timescale = 0 ); - - MP4TrackId AddSubtitleTrack(uint32_t timescale, - uint16_t width, - uint16_t height); - - MP4TrackId AddSubpicTrack(uint32_t timescale, - uint16_t width, - uint16_t height); - - MP4TrackId AddPixelAspectRatio(MP4TrackId trackId, uint32_t hSpacing, uint32_t vSpacing); - MP4TrackId AddColr(MP4TrackId trackId, uint16_t pri, uint16_t tran, uint16_t mat); - - /** Add a QuickTime chapter. - * - * @param chapterTrackId ID of chapter track or #MP4_INVALID_TRACK_ID - * if unknown. - * @param chapterDuration duration (in the timescale of the chapter track). - * @param chapterTitle title text for the chapter or NULL to use default - * title format ("Chapter %03d", n) where n is the chapter number. - */ - void AddChapter( - MP4TrackId chapterTrackId, - MP4Duration chapterDuration, - const char* chapterTitle = 0 ); - - /** Add a Nero chapter. - * - * @param chapterStart the start time of the chapter in 100 nanosecond units - * @param chapterTitle title text for the chapter or NULL to use default - * title format ("Chapter %03d", n) where n is the chapter number. - */ - void AddNeroChapter( - MP4Timestamp chapterStart, - const char* chapterTitle = 0 ); - - /*! Returns the ID of the track referencing the chapter track chapterTrackId. - * This function searches for a track of type MP4_AUDIO_TRACK_TYPE that references - * the track chapterTrackId through the atom "tref.chap". - * - * @param chapterTrackId the ID of the chapter track - * @param trackName receives the name of the referencing track if not null - * @param trackNameSize the size of the memory pointed to by trackName - * @return the ID if the track referencing the chapter track or MP4_INVALID_TRACK_ID - */ - MP4TrackId FindChapterReferenceTrack(MP4TrackId chapterTrackId, - char *trackName = 0, - int trackNameSize = 0); - - /*! Find the QuickTime chapter track in the current file. - * This function searches for a track of type text. - * - * @param trackName receives the name of the chapter track if not null - * @param trackNameSize the size of the memory pointed to by trackName - * @return the ID of the chapter track or MP4_INVALID_TRACK_ID - */ - MP4TrackId FindChapterTrack(char *trackName = 0, int trackNameSize = 0); - - /** Delete chapters. - * - * @param chapterType the type of chapters to delete: - * @li #MP4ChapterTypeAny (delete all known chapter types) - * @li #MP4ChapterTypeQt - * @li #MP4ChapterTypeNero - * @param chapterTrackId ID of the chapter track if known, - * or #MP4_INVALID_TRACK_ID. - * Only applies when chapterType=#MP4ChapterTypeQt. - * - * @return the type of deleted chapters - */ - MP4ChapterType DeleteChapters( - MP4ChapterType chapterType = MP4ChapterTypeQt, - MP4TrackId chapterTrackId = 0 ); - - /** Get list of chapters. - * - * @param chapterList address receiving array of chapter items. - * If a non-NULL is received the caller is responsible for freeing the - * memory with MP4Free(). - * @param chapterCount address receiving count of items in array. - * @param chapterType the type of chapters to read: - * @li #MP4ChapterTypeAny (any chapters, searched in order of Qt, Nero) - * @li #MP4ChapterTypeQt - * @li #MP4ChapterTypeNero - * - * @result the first type of chapters found. - */ - - MP4ChapterType GetChapters( - MP4Chapter_t** chapterList, - uint32_t* chapterCount, - MP4ChapterType fromChapterType = MP4ChapterTypeQt ); - - /** Set list of chapters. - * - * This functions sets the complete chapter list. - * If any chapters of the same type already exist they will first - * be deleted. - * - * @param chapterList array of chapters items. - * @param chapterCount count of items in array. - * @param chapterType type of chapters to write: - * @li #MP4ChapterTypeAny (chapters of all types are written) - * @li #MP4ChapterTypeQt - * @li #MP4ChapterTypeNero - * - * @return the type of chapters written. - */ - MP4ChapterType SetChapters( - MP4Chapter_t* chapterList, - uint32_t chapterCount, - MP4ChapterType toChapterType = MP4ChapterTypeQt ); - - /** Convert chapters to another type. - * - * This function converts existing chapters - * from one type to another type. - * Conversion from Nero to QuickTime or QuickTime to Nero is supported. - * - * @param toChapterType the chapter type to convert to: - * @li #MP4ChapterTypeQt (convert from Nero to Qt) - * @li #MP4ChapterTypeNero (convert from Qt to Nero) - * - * @return the chapter type before conversion or #MP4ChapterTypeNone - * if the source chapters do not exist - * or invalid toChapterType was specified. - */ - MP4ChapterType ConvertChapters(MP4ChapterType toChapterType = MP4ChapterTypeQt); - - /** Change the general timescale. - * - * This function changes the general timescale to the new timescale - * value by recalculating all values that depend on the timescale - * in "moov.mvhd". - * - * If the timescale is already equal to value nothing is done. - * - * @param value the new timescale. - */ - void ChangeMovieTimeScale(uint32_t timescale); - - MP4SampleId GetTrackNumberOfSamples(MP4TrackId trackId); - - const char* GetTrackType(MP4TrackId trackId); - - const char *GetTrackMediaDataName(MP4TrackId trackId); - bool GetTrackMediaDataOriginalFormat(MP4TrackId trackId, - char *originalFormat, uint32_t buflen); - MP4Duration GetTrackDuration(MP4TrackId trackId); - - uint32_t GetTrackTimeScale(MP4TrackId trackId); - void SetTrackTimeScale(MP4TrackId trackId, uint32_t value); - - // replacement to GetTrackAudioType and GetTrackVideoType - uint8_t GetTrackEsdsObjectTypeId(MP4TrackId trackId); - - uint8_t GetTrackAudioMpeg4Type(MP4TrackId trackId); - - MP4Duration GetTrackFixedSampleDuration(MP4TrackId trackId); - - double GetTrackVideoFrameRate(MP4TrackId trackId); - - int GetTrackAudioChannels(MP4TrackId trackId); - void GetTrackESConfiguration(MP4TrackId trackId, - uint8_t** ppConfig, uint32_t* pConfigSize); - void SetTrackESConfiguration(MP4TrackId trackId, - const uint8_t* pConfig, uint32_t configSize); - - void GetTrackVideoMetadata(MP4TrackId trackId, - uint8_t** ppConfig, uint32_t* pConfigSize); - void GetTrackH264SeqPictHeaders(MP4TrackId trackId, - uint8_t ***pSeqHeader, - uint32_t **pSeqHeaderSize, - uint8_t ***pPictHeader, - uint32_t **pPictHeaderSize); - const char* GetHintTrackSdp(MP4TrackId hintTrackId); - void SetHintTrackSdp(MP4TrackId hintTrackId, const char* sdpString); - void AppendHintTrackSdp(MP4TrackId hintTrackId, const char* sdpString); - - void MakeFtypAtom( - char* majorBrand, - uint32_t minorVersion, - char** compatibleBrands, - uint32_t compatibleBrandsCount ); - - // 3GPP specific functions - void Make3GPCompliant(const char* fileName, - char* majorBrand, - uint32_t minorVersion, - char** supportedBrands, - uint32_t supportedBrandsCount, - bool deleteIodsAtom); - - // ISMA specific functions - - // true if media track encrypted according to ismacryp - bool IsIsmaCrypMediaTrack(MP4TrackId trackId); - - void MakeIsmaCompliant(bool addIsmaComplianceSdp = true); - - void CreateIsmaIodFromParams( - uint8_t videoProfile, - uint32_t videoBitrate, - uint8_t* videoConfig, - uint32_t videoConfigLength, - uint8_t audioProfile, - uint32_t audioBitrate, - uint8_t* audioConfig, - uint32_t audioConfigLength, - uint8_t** ppBytes, - uint64_t* pNumBytes); - - // time convenience functions - - uint64_t ConvertFromMovieDuration( - MP4Duration duration, - uint32_t timeScale); - - uint64_t ConvertFromTrackTimestamp( - MP4TrackId trackId, - MP4Timestamp timeStamp, - uint32_t timeScale); - - MP4Timestamp ConvertToTrackTimestamp( - MP4TrackId trackId, - uint64_t timeStamp, - uint32_t timeScale); - - uint64_t ConvertFromTrackDuration( - MP4TrackId trackId, - MP4Duration duration, - uint32_t timeScale); - - MP4Duration ConvertToTrackDuration( - MP4TrackId trackId, - uint64_t duration, - uint32_t timeScale); - - // specialized operations - - void GetHintTrackRtpPayload( - MP4TrackId hintTrackId, - char** ppPayloadName = NULL, - uint8_t* pPayloadNumber = NULL, - uint16_t* pMaxPayloadSize = NULL, - char **ppEncodingParams = NULL); - - void SetHintTrackRtpPayload( - MP4TrackId hintTrackId, - const char* payloadName, - uint8_t* pPayloadNumber, - uint16_t maxPayloadSize, - const char *encoding_params, - bool include_rtp_map, - bool include_mpeg4_esid); - - MP4TrackId GetHintTrackReferenceTrackId( - MP4TrackId hintTrackId); - - void ReadRtpHint( - MP4TrackId hintTrackId, - MP4SampleId hintSampleId, - uint16_t* pNumPackets = NULL); - - uint16_t GetRtpHintNumberOfPackets( - MP4TrackId hintTrackId); - - int8_t GetRtpPacketBFrame( - MP4TrackId hintTrackId, - uint16_t packetIndex); - - int32_t GetRtpPacketTransmitOffset( - MP4TrackId hintTrackId, - uint16_t packetIndex); - - void ReadRtpPacket( - MP4TrackId hintTrackId, - uint16_t packetIndex, - uint8_t** ppBytes, - uint32_t* pNumBytes, - uint32_t ssrc = 0, - bool includeHeader = true, - bool includePayload = true); - - MP4Timestamp GetRtpTimestampStart( - MP4TrackId hintTrackId); - - void SetRtpTimestampStart( - MP4TrackId hintTrackId, - MP4Timestamp rtpStart); - - void AddRtpHint( - MP4TrackId hintTrackId, - bool isBframe, - uint32_t timestampOffset); - - void AddRtpPacket( - MP4TrackId hintTrackId, - bool setMbit, - int32_t transmitOffset); - - void AddRtpImmediateData( - MP4TrackId hintTrackId, - const uint8_t* pBytes, - uint32_t numBytes); - - void AddRtpSampleData( - MP4TrackId hintTrackId, - MP4SampleId sampleId, - uint32_t dataOffset, - uint32_t dataLength); - - void AddRtpESConfigurationPacket( - MP4TrackId hintTrackId); - - void WriteRtpHint( - MP4TrackId hintTrackId, - MP4Duration duration, - bool isSyncSample); - - uint8_t AllocRtpPayloadNumber(); - - // edit list related - - char* MakeTrackEditName( - MP4TrackId trackId, - MP4EditId editId, - const char* name); - - MP4EditId AddTrackEdit( - MP4TrackId trackId, - MP4EditId editId = MP4_INVALID_EDIT_ID); - - void DeleteTrackEdit( - MP4TrackId trackId, - MP4EditId editId); - - uint32_t GetTrackNumberOfEdits( - MP4TrackId trackId); - - MP4Timestamp GetTrackEditStart( - MP4TrackId trackId, - MP4EditId editId); - - MP4Duration GetTrackEditTotalDuration( - MP4TrackId trackId, - MP4EditId editId); - - MP4Timestamp GetTrackEditMediaStart( - MP4TrackId trackId, - MP4EditId editId); - - void SetTrackEditMediaStart( - MP4TrackId trackId, - MP4EditId editId, - MP4Timestamp startTime); - - MP4Duration GetTrackEditDuration( - MP4TrackId trackId, - MP4EditId editId); - - void SetTrackEditDuration( - MP4TrackId trackId, - MP4EditId editId, - MP4Duration duration); - - bool GetTrackEditDwell( - MP4TrackId trackId, - MP4EditId editId); - - void SetTrackEditDwell( - MP4TrackId trackId, - MP4EditId editId, - bool dwell); - - MP4SampleId GetSampleIdFromEditTime( - MP4TrackId trackId, - MP4Timestamp when, - MP4Timestamp* pStartTime = NULL, - MP4Duration* pDuration = NULL); - - /* "protected" interface to be used only by friends in library */ - - uint64_t GetPosition( File* file = NULL ); - void SetPosition( uint64_t pos, File* file = NULL ); - uint64_t GetSize( File* file = NULL ); - - void ReadBytes( uint8_t* buf, uint32_t bufsiz, File* file = NULL ); - void PeekBytes( uint8_t* buf, uint32_t bufsiz, File* file = NULL ); - - uint64_t ReadUInt(uint8_t size); - uint8_t ReadUInt8(); - uint16_t ReadUInt16(); - uint32_t ReadUInt24(); - uint32_t ReadUInt32(); - uint64_t ReadUInt64(); - float ReadFixed16(); - float ReadFixed32(); - float ReadFloat(); - char* ReadString(); - char* ReadCountedString( - uint8_t charSize = 1, bool allowExpandedCount = false, uint8_t fixedLength = 0); - uint64_t ReadBits(uint8_t numBits); - void FlushReadBits(); - uint32_t ReadMpegLength(); - - - void WriteBytes( uint8_t* buf, uint32_t bufsiz, File* file = NULL ); - void WriteUInt8(uint8_t value); - void WriteUInt16(uint16_t value); - void WriteUInt24(uint32_t value); - void WriteUInt32(uint32_t value); - void WriteUInt64(uint64_t value); - void WriteFixed16(float value); - void WriteFixed32(float value); - void WriteFloat(float value); - void WriteString(char* string); - void WriteCountedString(char* string, - uint8_t charSize = 1, - bool allowExpandedCount = false, - uint32_t fixedLength = 0); - void WriteBits(uint64_t bits, uint8_t numBits); - void PadWriteBits(uint8_t pad = 0); - void FlushWriteBits(); - void WriteMpegLength(uint32_t value, bool compact = false); - - void EnableMemoryBuffer( - uint8_t* pBytes = NULL, uint64_t numBytes = 0); - void DisableMemoryBuffer( - uint8_t** ppBytes = NULL, uint64_t* pNumBytes = NULL); - - bool IsWriteMode(); - - MP4Track* GetTrack(MP4TrackId trackId); - - void UpdateDuration(MP4Duration duration); - - MP4Atom* FindAtom(const char* name); - - MP4Atom* AddChildAtom( - const char* parentName, - const char* childName); - - MP4Atom* AddChildAtom( - MP4Atom* pParentAtom, - const char* childName); - - MP4Atom* InsertChildAtom( - const char* parentName, - const char* childName, - uint32_t index); - - MP4Atom* InsertChildAtom( - MP4Atom* pParentAtom, - const char* childName, - uint32_t index); - - MP4Atom* AddDescendantAtoms( - const char* ancestorName, - const char* childName); - - MP4Atom* AddDescendantAtoms( - MP4Atom* pAncestorAtom, - const char* childName); - -protected: - void Init(); - void Open( const char* name, File::Mode mode, const MP4FileProvider* provider ); - void ReadFromFile(); - void GenerateTracks(); - void BeginWrite(); - void FinishWrite(uint32_t options); - void CacheProperties(); - void RewriteMdat( File& src, File& dst ); - bool ShallHaveIods(); - - void Rename(const char* existingFileName, const char* newFileName); - - void ProtectWriteOperation(const char* file, int line, const char *func); - - void FindIntegerProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - void FindFloatProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - void FindStringProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - void FindBytesProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - - bool FindProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - - MP4TrackId AddVideoTrackDefault( - uint32_t timeScale, - MP4Duration sampleDuration, - uint16_t width, - uint16_t height, - const char *videoType); - MP4TrackId AddCntlTrackDefault( - uint32_t timeScale, - MP4Duration sampleDuration, - const char *videoType); - void AddTrackToIod(MP4TrackId trackId); - - void RemoveTrackFromIod(MP4TrackId trackId, bool shallHaveIods = true); - - void AddTrackToOd(MP4TrackId trackId); - - void RemoveTrackFromOd(MP4TrackId trackId); - - void GetTrackReferenceProperties(const char* trefName, - MP4Property** ppCountProperty, MP4Property** ppTrackIdProperty); - - void AddTrackReference(const char* trefName, MP4TrackId refTrackId); - - uint32_t FindTrackReference(const char* trefName, MP4TrackId refTrackId); - - void RemoveTrackReference(const char* trefName, MP4TrackId refTrackId); - - void AddDataReference(MP4TrackId trackId, const char* url); - - char* MakeTrackName(MP4TrackId trackId, const char* name); - - uint8_t ConvertTrackTypeToStreamType(const char* trackType); - - void CreateIsmaIodFromFile( - MP4TrackId odTrackId, - MP4TrackId sceneTrackId, - MP4TrackId audioTrackId, - MP4TrackId videoTrackId, - uint8_t** ppBytes, - uint64_t* pNumBytes); - - void CreateESD( - MP4DescriptorProperty* pEsProperty, - uint32_t esid, - uint8_t objectType, - uint8_t streamType, - uint32_t bufferSize, - uint32_t bitrate, - const uint8_t* pConfig, - uint32_t configLength, - char* url); - - void CreateIsmaODUpdateCommandFromFileForFile( - MP4TrackId odTrackId, - MP4TrackId audioTrackId, - MP4TrackId videoTrackId, - uint8_t** ppBytes, - uint64_t* pNumBytes); - - void CreateIsmaODUpdateCommandFromFileForStream( - MP4TrackId audioTrackId, - MP4TrackId videoTrackId, - uint8_t** ppBytes, - uint64_t* pNumBytes); - - void CreateIsmaODUpdateCommandForStream( - MP4DescriptorProperty* pAudioEsdProperty, - MP4DescriptorProperty* pVideoEsdProperty, - uint8_t** ppBytes, - uint64_t* pNumBytes); - - void CreateIsmaSceneCommand( - bool hasAudio, - bool hasVideo, - uint8_t** ppBytes, - uint64_t* pNumBytes); - -protected: - File* m_file; - uint64_t m_fileOriginalSize; - uint32_t m_createFlags; - - MP4Atom* m_pRootAtom; - MP4Integer32Array m_trakIds; - MP4TrackArray m_pTracks; - MP4TrackId m_odTrackId; - bool m_useIsma; - - // cached properties - MP4IntegerProperty* m_pModificationProperty; - MP4Integer32Property* m_pTimeScaleProperty; - MP4IntegerProperty* m_pDurationProperty; - - // read/write in memory - uint8_t* m_memoryBuffer; - uint64_t m_memoryBufferPosition; - uint64_t m_memoryBufferSize; - - // bit read/write buffering - uint8_t m_numReadBits; - uint8_t m_bufReadBits; - uint8_t m_numWriteBits; - uint8_t m_bufWriteBits; - - char m_trakName[1024]; - char *m_editName; - - private: - MP4File ( const MP4File &src ); - MP4File &operator= ( const MP4File &src ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_MP4FILE_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file_io.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file_io.cpp deleted file mode 100644 index 5de29104..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4file_io.cpp +++ /dev/null @@ -1,581 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -// MP4File low level IO support - -uint64_t MP4File::GetPosition( File* file ) -{ - if( m_memoryBuffer ) - return m_memoryBufferPosition; - - if( !file ) - file = m_file; - - ASSERT( file ); - return file->position; -} - -void MP4File::SetPosition( uint64_t pos, File* file ) -{ - if( m_memoryBuffer ) { - if( pos >= m_memoryBufferSize ) - throw new Exception( "position out of range", __FILE__, __LINE__, __FUNCTION__ ); - m_memoryBufferPosition = pos; - return; - } - - if( !file ) - file = m_file; - - ASSERT( file ); - if( file->seek( pos )) - throw new PlatformException( "seek failed", sys::getLastError(), __FILE__, __LINE__, __FUNCTION__ ); -} - -uint64_t MP4File::GetSize( File* file ) -{ - if( m_memoryBuffer ) - return m_memoryBufferSize; - - if( !file ) - file = m_file; - - ASSERT( file ); - return file->size; -} - -void MP4File::ReadBytes( uint8_t* buf, uint32_t bufsiz, File* file ) -{ - if( bufsiz == 0 ) - return; - - ASSERT( buf ); - WARNING( m_numReadBits > 0 ); - - if( m_memoryBuffer ) { - if( m_memoryBufferPosition + bufsiz > m_memoryBufferSize ) - throw new Exception( "not enough bytes, reached end-of-memory", __FILE__, __LINE__, __FUNCTION__ ); - memcpy( buf, &m_memoryBuffer[m_memoryBufferPosition], bufsiz ); - m_memoryBufferPosition += bufsiz; - return; - } - - if( !file ) - file = m_file; - - ASSERT( file ); - File::Size nin; - if( file->read( buf, bufsiz, nin )) - throw new PlatformException( "read failed", sys::getLastError(), __FILE__, __LINE__, __FUNCTION__ ); - if( nin != bufsiz ) - throw new Exception( "not enough bytes, reached end-of-file", __FILE__, __LINE__, __FUNCTION__ ); -} - -void MP4File::PeekBytes( uint8_t* buf, uint32_t bufsiz, File* file ) -{ - const uint64_t pos = GetPosition( file ); - ReadBytes( buf, bufsiz, file ); - SetPosition( pos, file ); -} - -void MP4File::EnableMemoryBuffer( uint8_t* pBytes, uint64_t numBytes ) -{ - ASSERT( !m_memoryBuffer ); - - if (pBytes) { - m_memoryBuffer = pBytes; - m_memoryBufferSize = numBytes; - } else { - if (numBytes) { - m_memoryBufferSize = numBytes; - } else { - m_memoryBufferSize = 4096; - } - m_memoryBuffer = (uint8_t*)MP4Malloc(m_memoryBufferSize); - } - m_memoryBufferPosition = 0; -} - -void MP4File::DisableMemoryBuffer( uint8_t** ppBytes, uint64_t* pNumBytes ) -{ - ASSERT(m_memoryBuffer != NULL); - - if (ppBytes) { - *ppBytes = m_memoryBuffer; - } - if (pNumBytes) { - *pNumBytes = m_memoryBufferPosition; - } - - m_memoryBuffer = NULL; - m_memoryBufferSize = 0; - m_memoryBufferPosition = 0; -} - -void MP4File::WriteBytes( uint8_t* buf, uint32_t bufsiz, File* file ) -{ - ASSERT( m_numWriteBits == 0 || m_numWriteBits >= 8 ); - - if( !buf || bufsiz == 0 ) - return; - - if( m_memoryBuffer ) { - if( m_memoryBufferPosition + bufsiz > m_memoryBufferSize ) { - m_memoryBufferSize = 2 * (m_memoryBufferSize + bufsiz); - m_memoryBuffer = (uint8_t*)MP4Realloc( m_memoryBuffer, m_memoryBufferSize ); - } - memcpy( &m_memoryBuffer[m_memoryBufferPosition], buf, bufsiz ); - m_memoryBufferPosition += bufsiz; - return; - } - - if( !file ) - file = m_file; - - ASSERT( file ); - File::Size nout; - if( file->write( buf, bufsiz, nout )) - throw new PlatformException( "write failed", sys::getLastError(), __FILE__, __LINE__, __FUNCTION__ ); - if( nout != bufsiz ) - throw new Exception( "not all bytes written", __FILE__, __LINE__, __FUNCTION__ ); -} - -uint64_t MP4File::ReadUInt(uint8_t size) -{ - switch (size) { - case 1: - return ReadUInt8(); - case 2: - return ReadUInt16(); - case 3: - return ReadUInt24(); - case 4: - return ReadUInt32(); - case 8: - return ReadUInt64(); - default: - ASSERT(false); - return 0; - } -} - -uint8_t MP4File::ReadUInt8() -{ - uint8_t data; - ReadBytes(&data, 1); - return data; -} - -void MP4File::WriteUInt8(uint8_t value) -{ - WriteBytes(&value, 1); -} - -uint16_t MP4File::ReadUInt16() -{ - uint8_t data[2]; - ReadBytes(&data[0], 2); - return ((data[0] << 8) | data[1]); -} - -void MP4File::WriteUInt16(uint16_t value) -{ - uint8_t data[2]; - data[0] = (value >> 8) & 0xFF; - data[1] = value & 0xFF; - WriteBytes(data, 2); -} - -uint32_t MP4File::ReadUInt24() -{ - uint8_t data[3]; - ReadBytes(&data[0], 3); - return ((data[0] << 16) | (data[1] << 8) | data[2]); -} - -void MP4File::WriteUInt24(uint32_t value) -{ - uint8_t data[3]; - data[0] = (value >> 16) & 0xFF; - data[1] = (value >> 8) & 0xFF; - data[2] = value & 0xFF; - WriteBytes(data, 3); -} - -uint32_t MP4File::ReadUInt32() -{ - uint8_t data[4]; - ReadBytes(&data[0], 4); - return ((data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3]); -} - -void MP4File::WriteUInt32(uint32_t value) -{ - uint8_t data[4]; - data[0] = (value >> 24) & 0xFF; - data[1] = (value >> 16) & 0xFF; - data[2] = (value >> 8) & 0xFF; - data[3] = value & 0xFF; - WriteBytes(data, 4); -} - -uint64_t MP4File::ReadUInt64() -{ - uint8_t data[8]; - uint64_t result = 0; - uint64_t temp; - - ReadBytes(&data[0], 8); - - for (int i = 0; i < 8; i++) { - temp = data[i]; - result |= temp << ((7 - i) * 8); - } - return result; -} - -void MP4File::WriteUInt64(uint64_t value) -{ - uint8_t data[8]; - - for (int i = 7; i >= 0; i--) { - data[i] = value & 0xFF; - value >>= 8; - } - WriteBytes(data, 8); -} - -float MP4File::ReadFixed16() -{ - uint8_t iPart = ReadUInt8(); - uint8_t fPart = ReadUInt8(); - - return iPart + (((float)fPart) / 0x100); -} - -void MP4File::WriteFixed16(float value) -{ - if (value >= 0x100) { - ostringstream msg; - msg << value << " out of range"; - throw new PlatformException(msg.str().c_str(), ERANGE, __FILE__, __LINE__, __FUNCTION__); - } - - uint8_t iPart = (uint8_t)value; - uint8_t fPart = (uint8_t)((value - iPart) * 0x100); - - WriteUInt8(iPart); - WriteUInt8(fPart); -} - -float MP4File::ReadFixed32() -{ - uint16_t iPart = ReadUInt16(); - uint16_t fPart = ReadUInt16(); - - return iPart + (((float)fPart) / 0x10000); -} - -void MP4File::WriteFixed32(float value) -{ - if (value >= 0x10000) { - ostringstream msg; - msg << value << " out of range"; - throw new PlatformException(msg.str().c_str(), ERANGE, __FILE__, __LINE__, __FUNCTION__); - } - - uint16_t iPart = (uint16_t)value; - uint16_t fPart = (uint16_t)((value - iPart) * 0x10000); - - WriteUInt16(iPart); - WriteUInt16(fPart); -} - -float MP4File::ReadFloat() -{ - union { - float f; - uint32_t i; - } u; - - u.i = ReadUInt32(); - return u.f; -} - -void MP4File::WriteFloat(float value) -{ - union { - float f; - uint32_t i; - } u; - - u.f = value; - WriteUInt32(u.i); -} - -char* MP4File::ReadString() -{ - uint32_t length = 0; - uint32_t alloced = 64; - char* data = (char*)MP4Malloc(alloced); - - do { - if (length == alloced) { - data = (char*)MP4Realloc(data, alloced * 2); - if (data == NULL) return NULL; - alloced *= 2; - } - ReadBytes((uint8_t*)&data[length], 1); - length++; - } while (data[length - 1] != 0); - - data = (char*)MP4Realloc(data, length); - return data; -} - -void MP4File::WriteString(char* string) -{ - if (string == NULL) { - uint8_t zero = 0; - WriteBytes(&zero, 1); - } else { - WriteBytes((uint8_t*)string, (uint32_t)strlen(string) + 1); - } -} - -char* MP4File::ReadCountedString(uint8_t charSize, bool allowExpandedCount, uint8_t fixedLength) -{ - uint32_t charLength; - if (allowExpandedCount) { - uint8_t b; - uint32_t ix = 0; - charLength = 0; - do { - b = ReadUInt8(); - charLength += b; - ix++; - if (ix > 25) - throw new PlatformException("Counted string too long 25 * 255",ERANGE, - __FILE__, __LINE__, __FUNCTION__); - } while (b == 255); - } else { - charLength = ReadUInt8(); - } - - if (fixedLength && (charLength > fixedLength)) { - /* - * The counted length of this string is greater than the - * maxiumum fixed length, so truncate the string to the - * maximum fixed length amount (take 1 byte away from the - * fixedlength since we've already sacrificed one byte for - * reading the counted length, and there has been a bug where - * a non counted string has been used in the place of a - * counted string). - */ - WARNING(charLength > fixedLength); - charLength = fixedLength - 1U; - } - - uint32_t byteLength = charLength * charSize; - char* data = (char*)MP4Malloc(byteLength + 1); - if (byteLength > 0) { - ReadBytes((uint8_t*)data, byteLength); - } - data[byteLength] = '\0'; - - // read padding - if (fixedLength) { - const uint8_t padsize = fixedLength - byteLength -1U; - if( padsize ) { - uint8_t* padbuf = (uint8_t*)malloc( padsize ); - ReadBytes( padbuf, padsize ); - free( padbuf ); - } - } - - return data; -} - -void MP4File::WriteCountedString(char* string, - uint8_t charSize, bool allowExpandedCount, - uint32_t fixedLength) -{ - uint32_t byteLength; - uint8_t zero[1]; - - if (string) { - byteLength = (uint32_t)strlen(string); - if (fixedLength && (byteLength >= fixedLength)) { - byteLength = fixedLength-1; - } - } - else { - byteLength = 0; - } - uint32_t charLength = byteLength / charSize; - - if (allowExpandedCount) { - while (charLength >= 0xFF) { - WriteUInt8(0xFF); - charLength -= 0xFF; - } - // Write the count - WriteUInt8(charLength); - } else { - if (charLength > 255) { - ostringstream msg; - msg << "Length is " << charLength; - throw new PlatformException(msg.str().c_str(), ERANGE, __FILE__, __LINE__, __FUNCTION__); - } - // Write the count - WriteUInt8(charLength); - } - - if (byteLength > 0) { - // Write the string (or the portion that we want to write) - WriteBytes((uint8_t*)string, byteLength); - } - - // Write any padding if this is a fixed length counted string - if (fixedLength) { - zero[0] = 0; - while (byteLength < fixedLength-1U) { - WriteBytes(zero, 1); - byteLength++; - } - } -} - -uint64_t MP4File::ReadBits(uint8_t numBits) -{ - ASSERT(numBits > 0); - ASSERT(numBits <= 64); - - uint64_t bits = 0; - - for (uint8_t i = numBits; i > 0; i--) { - if (m_numReadBits == 0) { - ReadBytes(&m_bufReadBits, 1); - m_numReadBits = 8; - } - bits = (bits << 1) | ((m_bufReadBits >> (--m_numReadBits)) & 1); - } - - return bits; -} - -void MP4File::FlushReadBits() -{ - // eat any remaining bits in the read buffer - m_numReadBits = 0; -} - -void MP4File::WriteBits(uint64_t bits, uint8_t numBits) -{ - ASSERT(numBits <= 64); - - for (uint8_t i = numBits; i > 0; i--) { - m_bufWriteBits |= - (((bits >> (i - 1)) & 1) << (8 - ++m_numWriteBits)); - - if (m_numWriteBits == 8) { - FlushWriteBits(); - } - } -} - -void MP4File::PadWriteBits(uint8_t pad) -{ - if (m_numWriteBits) { - WriteBits(pad ? 0xFF : 0x00, 8 - m_numWriteBits); - } -} - -void MP4File::FlushWriteBits() -{ - if (m_numWriteBits > 0) { - WriteBytes(&m_bufWriteBits, 1); - m_numWriteBits = 0; - m_bufWriteBits = 0; - } -} - -uint32_t MP4File::ReadMpegLength() -{ - uint32_t length = 0; - uint8_t numBytes = 0; - uint8_t b; - - do { - b = ReadUInt8(); - length = (length << 7) | (b & 0x7F); - numBytes++; - } while ((b & 0x80) && numBytes < 4); - - return length; -} - -void MP4File::WriteMpegLength(uint32_t value, bool compact) -{ - if (value > 0x0FFFFFFF) { - ostringstream msg; - msg << "out of range: " << value; - throw new PlatformException(msg.str().c_str(), ERANGE, __FILE__, __LINE__, __FUNCTION__ ); - } - - int8_t numBytes; - - if (compact) { - if (value <= 0x7F) { - numBytes = 1; - } else if (value <= 0x3FFF) { - numBytes = 2; - } else if (value <= 0x1FFFFF) { - numBytes = 3; - } else { - numBytes = 4; - } - } else { - numBytes = 4; - } - - int8_t i = numBytes; - do { - i--; - uint8_t b = (value >> (i * 7)) & 0x7F; - if (i > 0) { - b |= 0x80; - } - WriteUInt8(b); - } while (i > 0); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4info.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4info.cpp deleted file mode 100644 index 44bf45e5..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4info.cpp +++ /dev/null @@ -1,625 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001-2002. All Rights Reserved. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Bill May wmay@cisco.com - * Alix Marchandise-Franquet alix@cisco.com - * Ximpo Group Ltd. mp4v2@ximpo.com - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -static char* PrintAudioInfo( - MP4FileHandle mp4File, - MP4TrackId trackId) -{ - static const char* mpeg4AudioNames[] = { - "MPEG-4 AAC main", - "MPEG-4 AAC LC", - "MPEG-4 AAC SSR", - "MPEG-4 AAC LTP", - "MPEG-4 AAC HE", - "MPEG-4 AAC Scalable", - "MPEG-4 TwinVQ", - "MPEG-4 CELP", - "MPEG-4 HVXC", - NULL, NULL, - "MPEG-4 TTSI", - "MPEG-4 Main Synthetic", - "MPEG-4 Wavetable Syn", - "MPEG-4 General MIDI", - "MPEG-4 Algo Syn and Audio FX", - "MPEG-4 ER AAC LC", - NULL, - "MPEG-4 ER AAC LTP", - "MPEG-4 ER AAC Scalable", - "MPEG-4 ER TwinVQ", - "MPEG-4 ER BSAC", - "MPEG-4 ER ACC LD", - "MPEG-4 ER CELP", - "MPEG-4 ER HVXC", - "MPEG-4 ER HILN", - "MPEG-4 ER Parametric", - "MPEG-4 SSC", - "MPEG-4 PS", - "MPEG-4 MPEG Surround", - NULL, - "MPEG-4 Layer-1", - "MPEG-4 Layer-2", - "MPEG-4 Layer-3", - "MPEG-4 DST", - "MPEG-4 Audio Lossless", - "MPEG-4 SLS", - "MPEG-4 SLS non-core", - }; - - static const uint8_t mpegAudioTypes[] = { - MP4_MPEG2_AAC_MAIN_AUDIO_TYPE, // 0x66 - MP4_MPEG2_AAC_LC_AUDIO_TYPE, // 0x67 - MP4_MPEG2_AAC_SSR_AUDIO_TYPE, // 0x68 - MP4_MPEG2_AUDIO_TYPE, // 0x69 - MP4_MPEG1_AUDIO_TYPE, // 0x6B - // private types - MP4_PCM16_LITTLE_ENDIAN_AUDIO_TYPE, - MP4_VORBIS_AUDIO_TYPE, - MP4_ALAW_AUDIO_TYPE, - MP4_ULAW_AUDIO_TYPE, - MP4_G723_AUDIO_TYPE, - MP4_PCM16_BIG_ENDIAN_AUDIO_TYPE, - }; - static const char* mpegAudioNames[] = { - "MPEG-2 AAC Main", - "MPEG-2 AAC LC", - "MPEG-2 AAC SSR", - "MPEG-2 Audio (13818-3)", - "MPEG-1 Audio (11172-3)", - // private types - "PCM16 (little endian)", - "Vorbis", - "G.711 aLaw", - "G.711 uLaw", - "G.723.1", - "PCM16 (big endian)", - }; - uint8_t numMpegAudioTypes = - sizeof(mpegAudioTypes) / sizeof(uint8_t); - - const char* typeName = "Unknown"; - bool foundType = false; - uint8_t type = 0; - const char *media_data_name; - - media_data_name = MP4GetTrackMediaDataName(mp4File, trackId); - - if (media_data_name == NULL) { - typeName = "Unknown - no media data name"; - } else if (strcasecmp(media_data_name, "samr") == 0) { - typeName = "AMR"; - foundType = true; - } else if (strcasecmp(media_data_name, "sawb") == 0) { - typeName = "AMR-WB"; - foundType = true; - } else if (strcasecmp(media_data_name, "mp4a") == 0) { - - type = MP4GetTrackEsdsObjectTypeId(mp4File, trackId); - switch (type) { - case MP4_INVALID_AUDIO_TYPE: - typeName = "AAC from .mov"; - foundType = true; - break; - case MP4_MPEG4_AUDIO_TYPE: { - - type = MP4GetTrackAudioMpeg4Type(mp4File, trackId); - if (type == MP4_MPEG4_INVALID_AUDIO_TYPE || - type > NUM_ELEMENTS_IN_ARRAY(mpeg4AudioNames) || - mpeg4AudioNames[type - 1] == NULL) { - typeName = "MPEG-4 Unknown Profile"; - } else { - typeName = mpeg4AudioNames[type - 1]; - foundType = true; - } - break; - } - // fall through - default: - for (uint8_t i = 0; i < numMpegAudioTypes; i++) { - if (type == mpegAudioTypes[i]) { - typeName = mpegAudioNames[i]; - foundType = true; - break; - } - } - } - } else { - typeName = media_data_name; - foundType = true; - } - - uint32_t timeScale = - MP4GetTrackTimeScale(mp4File, trackId); - - MP4Duration trackDuration = - MP4GetTrackDuration(mp4File, trackId); - - double msDuration = - double(MP4ConvertFromTrackDuration(mp4File, trackId, - trackDuration, MP4_MSECS_TIME_SCALE)); - - uint32_t avgBitRate = - MP4GetTrackBitRate(mp4File, trackId); - - char *sInfo = (char*)MP4Malloc(256); - - // type duration avgBitrate samplingFrequency - if (foundType) - snprintf(sInfo, 256, - "%u\taudio\t%s%s, %.3f secs, %u kbps, %u Hz\n", - trackId, - MP4IsIsmaCrypMediaTrack(mp4File, trackId) ? "enca - " : "", - typeName, - msDuration / 1000.0, - (avgBitRate + 500) / 1000, - timeScale); - else - snprintf(sInfo, 256, - "%u\taudio\t%s%s(%u), %.3f secs, %u kbps, %u Hz\n", - trackId, - MP4IsIsmaCrypMediaTrack(mp4File, trackId) ? "enca - " : "", - typeName, - type, - msDuration / 1000.0, - (avgBitRate + 500) / 1000, - timeScale); - - return sInfo; -} -static const struct { - uint8_t profile; - const char *name; -} VisualProfileToName[] = { - { MPEG4_SP_L1, "MPEG-4 Simple @ L1"}, - { MPEG4_SP_L2, "MPEG-4 Simple @ L2" }, - { MPEG4_SP_L3, "MPEG-4 Simple @ L3" }, - { MPEG4_SP_L0, "MPEG-4 Simple @ L0" }, - { MPEG4_SSP_L1, "MPEG-4 Simple Scalable @ L1"}, - { MPEG4_SSP_L2, "MPEG-4 Simple Scalable @ L2" }, - { MPEG4_CP_L1, "MPEG-4 Core @ L1"}, - { MPEG4_CP_L2, "MPEG-4 Core @ L2"}, - { MPEG4_MP_L2, "MPEG-4 Main @ L2"}, - { MPEG4_MP_L3, "MPEG-4 Main @ L3"}, - { MPEG4_MP_L4, "MPEG-4 Main @ L4"}, - { MPEG4_NBP_L2, "MPEG-4 N-bit @ L2"}, - { MPEG4_STP_L1, "MPEG-4 Scalable Texture @ L1"}, - { MPEG4_SFAP_L1, "MPEG-4 Simple Face Anim @ L1"}, - { MPEG4_SFAP_L2, "MPEG-4 Simple Face Anim @ L2"}, - { MPEG4_SFBAP_L1, "MPEG-4 Simple FBA @ L1"}, - { MPEG4_SFBAP_L2, "MPEG-4 Simple FBA @ L2"}, - { MPEG4_BATP_L1, "MPEG-4 Basic Anim Text @ L1"}, - { MPEG4_BATP_L2, "MPEG-4 Basic Anim Text @ L2"}, - { MPEG4_HP_L1, "MPEG-4 Hybrid @ L1"}, - { MPEG4_HP_L2, "MPEG-4 Hybrid @ L2"}, - { MPEG4_ARTSP_L1, "MPEG-4 Adv RT Simple @ L1"}, - { MPEG4_ARTSP_L2, "MPEG-4 Adv RT Simple @ L2"}, - { MPEG4_ARTSP_L3, "MPEG-4 Adv RT Simple @ L3"}, - { MPEG4_ARTSP_L4, "MPEG-4 Adv RT Simple @ L4"}, - { MPEG4_CSP_L1, "MPEG-4 Core Scalable @ L1"}, - { MPEG4_CSP_L2, "MPEG-4 Core Scalable @ L2"}, - { MPEG4_CSP_L3, "MPEG-4 Core Scalable @ L3"}, - { MPEG4_ACEP_L1, "MPEG-4 Adv Coding Efficieny @ L1"}, - { MPEG4_ACEP_L2, "MPEG-4 Adv Coding Efficieny @ L2"}, - { MPEG4_ACEP_L3, "MPEG-4 Adv Coding Efficieny @ L3"}, - { MPEG4_ACEP_L4, "MPEG-4 Adv Coding Efficieny @ L4"}, - { MPEG4_ACP_L1, "MPEG-4 Adv Core Profile @ L1"}, - { MPEG4_ACP_L2, "MPEG-4 Adv Core Profile @ L2"}, - { MPEG4_AST_L1, "MPEG-4 Adv Scalable Texture @ L1"}, - { MPEG4_AST_L2, "MPEG-4 Adv Scalable Texture @ L2"}, - { MPEG4_AST_L3, "MPEG-4 Adv Scalable Texture @ L3"}, - { MPEG4_S_STUDIO_P_L1, "MPEG-4 Simple Studio @ L1"}, - { MPEG4_S_STUDIO_P_L2, "MPEG-4 Simple Studio @ L2"}, - { MPEG4_S_STUDIO_P_L3, "MPEG-4 Simple Studio @ L3"}, - { MPEG4_S_STUDIO_P_L4, "MPEG-4 Simple Studio @ L4"}, - { MPEG4_C_STUDIO_P_L1, "MPEG-4 Core Studio @ L1"}, - { MPEG4_C_STUDIO_P_L2, "MPEG-4 Core Studio @ L2"}, - { MPEG4_C_STUDIO_P_L3, "MPEG-4 Core Studio @ L3"}, - { MPEG4_C_STUDIO_P_L4, "MPEG-4 Core Studio @ L4"}, - { MPEG4_ASP_L0, "MPEG-4 Adv Simple@L0"}, - { MPEG4_ASP_L1, "MPEG-4 Adv Simple@L1"}, - { MPEG4_ASP_L2, "MPEG-4 Adv Simple@L2"}, - { MPEG4_ASP_L3, "MPEG-4 Adv Simple@L3"}, - { MPEG4_ASP_L4, "MPEG-4 Adv Simple@L4"}, - { MPEG4_ASP_L5, "MPEG-4 Adv Simple@L5"}, - { MPEG4_ASP_L3B, "MPEG-4 Adv Simple@L3b"}, - { MPEG4_FGSP_L0, "MPEG-4 FGS @ L0" }, - { MPEG4_FGSP_L1, "MPEG-4 FGS @ L1" }, - { MPEG4_FGSP_L2, "MPEG-4 FGS @ L2" }, - { MPEG4_FGSP_L3, "MPEG-4 FGS @ L3" }, - { MPEG4_FGSP_L4, "MPEG-4 FGS @ L4" }, - { MPEG4_FGSP_L5, "MPEG-4 FGS @ L5" } -}; - -static const char *Mpeg4VisualProfileName (uint8_t visual_profile) -{ - size_t size = sizeof(VisualProfileToName) / sizeof(*VisualProfileToName); - - for (size_t ix = 0; ix < size; ix++) { - if (visual_profile == VisualProfileToName[ix].profile) { - return (VisualProfileToName[ix].name); - } - } - return (NULL); -} -static char* PrintVideoInfo( - MP4FileHandle mp4File, - MP4TrackId trackId) -{ - - static const uint8_t mpegVideoTypes[] = { - MP4_MPEG2_SIMPLE_VIDEO_TYPE, // 0x60 - MP4_MPEG2_MAIN_VIDEO_TYPE, // 0x61 - MP4_MPEG2_SNR_VIDEO_TYPE, // 0x62 - MP4_MPEG2_SPATIAL_VIDEO_TYPE, // 0x63 - MP4_MPEG2_HIGH_VIDEO_TYPE, // 0x64 - MP4_MPEG2_442_VIDEO_TYPE, // 0x65 - MP4_MPEG1_VIDEO_TYPE, // 0x6A - MP4_JPEG_VIDEO_TYPE, // 0x6C - MP4_YUV12_VIDEO_TYPE, - MP4_H263_VIDEO_TYPE, - MP4_H261_VIDEO_TYPE, - }; - static const char* mpegVideoNames[] = { - "MPEG-2 Simple", - "MPEG-2 Main", - "MPEG-2 SNR", - "MPEG-2 Spatial", - "MPEG-2 High", - "MPEG-2 4:2:2", - "MPEG-1", - "JPEG", - "YUV12", - "H.263", - "H.261", - }; - uint8_t numMpegVideoTypes = - sizeof(mpegVideoTypes) / sizeof(uint8_t); - bool foundTypeName = false; - const char* typeName = "Unknown"; - - const char *media_data_name; - char originalFormat[8]; - char oformatbuffer[32]; - originalFormat[0] = 0; - *oformatbuffer = 0; - uint8_t type = 0; - - media_data_name = MP4GetTrackMediaDataName(mp4File, trackId); - // encv 264b - if (strcasecmp(media_data_name, "encv") == 0) { - if (MP4GetTrackMediaDataOriginalFormat(mp4File, - trackId, - originalFormat, - sizeof(originalFormat)) == false) - media_data_name = NULL; - - } - - char typebuffer[80]; - if (media_data_name == NULL) { - typeName = "Unknown - no media data name"; - foundTypeName = true; - } else if ((strcasecmp(media_data_name, "avc1") == 0) || - (strcasecmp(originalFormat, "264b") == 0)) { - // avc - uint8_t profile, level; - char profileb[20], levelb[20]; - if (MP4GetTrackH264ProfileLevel(mp4File, trackId, - &profile, &level)) { - if (profile == 66) { - strcpy(profileb, "Baseline"); - } else if (profile == 77) { - strcpy(profileb, "Main"); - } else if (profile == 88) { - strcpy(profileb, "Extended"); - } else if (profile == 100) { - strcpy(profileb, "High"); - } else if (profile == 110) { - strcpy(profileb, "High 10"); - } else if (profile == 122) { - strcpy(profileb, "High 4:2:2"); - } else if (profile == 144) { - strcpy(profileb, "High 4:4:4"); - } else { - snprintf(profileb, 20, "Unknown Profile %x", profile); - } - switch (level) { - case 10: - case 20: - case 30: - case 40: - case 50: - snprintf(levelb, 20, "%u", level / 10); - break; - case 11: - case 12: - case 13: - case 21: - case 22: - case 31: - case 32: - case 41: - case 42: - case 51: - snprintf(levelb, 20, "%u.%u", level / 10, level % 10); - break; - default: - snprintf(levelb, 20, "unknown level %x", level); - break; - } - if (originalFormat != NULL && originalFormat[0] != '\0') - snprintf(oformatbuffer, 32, "(%s) ", originalFormat); - snprintf(typebuffer, sizeof(typebuffer), "H264 %s%s@%s", - oformatbuffer, profileb, levelb); - typeName = typebuffer; - } else { - typeName = "H.264 - profile/level error"; - } - foundTypeName = true; - } else if (strcasecmp(media_data_name, "s263") == 0) { - // 3gp h.263 - typeName = "H.263"; - foundTypeName = true; - } else if ((strcasecmp(media_data_name, "mp4v") == 0) || - (strcasecmp(media_data_name, "encv") == 0)) { - // note encv might needs it's own field eventually. - type = MP4GetTrackEsdsObjectTypeId(mp4File, trackId); - if (type == MP4_MPEG4_VIDEO_TYPE) { - type = MP4GetVideoProfileLevel(mp4File, trackId); - typeName = Mpeg4VisualProfileName(type); - if (typeName == NULL) { - typeName = "MPEG-4 Unknown Profile"; - } else { - foundTypeName = true; - } - } else { - for (uint8_t i = 0; i < numMpegVideoTypes; i++) { - if (type == mpegVideoTypes[i]) { - typeName = mpegVideoNames[i]; - foundTypeName = true; - break; - } - } - } - } else { - typeName = media_data_name; - foundTypeName = true; // we don't have a type value to display - } - - MP4Duration trackDuration = - MP4GetTrackDuration(mp4File, trackId); - - double msDuration = - double(MP4ConvertFromTrackDuration(mp4File, trackId, - trackDuration, MP4_MSECS_TIME_SCALE)); - - uint32_t avgBitRate = - MP4GetTrackBitRate(mp4File, trackId); - - // Note not all mp4 implementations set width and height correctly - // The real answer can be buried inside the ES configuration info - uint16_t width = MP4GetTrackVideoWidth(mp4File, trackId); - - uint16_t height = MP4GetTrackVideoHeight(mp4File, trackId); - - double fps = MP4GetTrackVideoFrameRate(mp4File, trackId); - - char *sInfo = (char*)MP4Malloc(256); - - // type duration avgBitrate frameSize frameRate - if (foundTypeName) { - sprintf(sInfo, - "%u\tvideo\t%s%s, %.3f secs, %u kbps, %ux%u @ %f fps\n", - trackId, - MP4IsIsmaCrypMediaTrack(mp4File, trackId) ? "encv - " : "", - typeName, - msDuration / 1000.0, - (avgBitRate + 500) / 1000, - width, - height, - fps - ); - } else { - sprintf(sInfo, - "%u\tvideo\t%s(%u), %.3f secs, %u kbps, %ux%u @ %f fps\n", - trackId, - typeName, - type, - msDuration / 1000.0, - (avgBitRate + 500) / 1000, - width, - height, - fps - ); - } - - return sInfo; -} -static char* PrintCntlInfo( - MP4FileHandle mp4File, - MP4TrackId trackId) -{ - const char *media_data_name = MP4GetTrackMediaDataName(mp4File, trackId); - const char *typeName = "Unknown"; - - if (media_data_name == NULL) { - typeName = "Unknown - no media data name"; - } else if (strcasecmp(media_data_name, "href") == 0) { - typeName = "ISMA Href"; - } else { - typeName = media_data_name; - } - - MP4Duration trackDuration = - MP4GetTrackDuration(mp4File, trackId); - - double msDuration = - double(MP4ConvertFromTrackDuration(mp4File, trackId, - trackDuration, MP4_MSECS_TIME_SCALE)); - char *sInfo = (char *)MP4Malloc(256); - - snprintf(sInfo, 256, - "%u\tcontrol\t%s, %.3f secs\n", - trackId, - typeName, - msDuration / 1000.0); - return sInfo; -} - - -static char* PrintHintInfo( - MP4FileHandle mp4File, - MP4TrackId trackId) -{ - MP4TrackId referenceTrackId = - MP4GetHintTrackReferenceTrackId(mp4File, trackId); - - char* payloadName = NULL; - if (!MP4GetHintTrackRtpPayload(mp4File, trackId, &payloadName)) - return NULL; - - char *sInfo = (char*)MP4Malloc(256); - - snprintf(sInfo, 256, - "%u\thint\tPayload %s for track %u\n", - trackId, - payloadName, - referenceTrackId); - - free(payloadName); - - return sInfo; -} - -static char* PrintTrackInfo( - MP4FileHandle mp4File, - MP4TrackId trackId) -{ - char* trackInfo = NULL; - - const char* trackType = - MP4GetTrackType(mp4File, trackId); - if (trackType == NULL) return NULL; - - if (!strcmp(trackType, MP4_AUDIO_TRACK_TYPE)) { - trackInfo = PrintAudioInfo(mp4File, trackId); - } else if (!strcmp(trackType, MP4_VIDEO_TRACK_TYPE)) { - trackInfo = PrintVideoInfo(mp4File, trackId); - } else if (!strcmp(trackType, MP4_HINT_TRACK_TYPE)) { - trackInfo = PrintHintInfo(mp4File, trackId); - } else if (strcmp(trackType, MP4_CNTL_TRACK_TYPE) == 0) { - trackInfo = PrintCntlInfo(mp4File, trackId); - } else { - trackInfo = (char*)MP4Malloc(256); - if (!strcmp(trackType, MP4_OD_TRACK_TYPE)) { - snprintf(trackInfo, 256, - "%u\tod\tObject Descriptors\n", - trackId); - } else if (!strcmp(trackType, MP4_SCENE_TRACK_TYPE)) { - snprintf(trackInfo, 256, - "%u\tscene\tBIFS\n", - trackId); - } else { - snprintf(trackInfo, 256, - "%u\t%s\n", - trackId, trackType); - } - } - - return trackInfo; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -/////////////////////////////////////////////////////////////////////////////// - -using namespace mp4v2::impl; - -extern "C" -char* MP4Info( - MP4FileHandle mp4File, - MP4TrackId trackId ) -{ - char* info = NULL; - - if (MP4_IS_VALID_FILE_HANDLE(mp4File)) { - try { - if (trackId == MP4_INVALID_TRACK_ID) { - uint32_t buflen = 4 * 1024; - info = (char*)MP4Calloc(buflen); - - buflen -= snprintf(info, buflen, - "Track\tType\tInfo\n"); - - uint32_t numTracks = MP4GetNumberOfTracks(mp4File); - - for (uint32_t i = 0; i < numTracks; i++) { - trackId = MP4FindTrackId(mp4File, i); - char* trackInfo = PrintTrackInfo(mp4File, trackId); - strncat(info, trackInfo, buflen); - uint32_t newlen = (uint32_t)strlen(trackInfo); - if (newlen > buflen) buflen = 0; - else buflen -= newlen; - MP4Free(trackInfo); - } - } else { - info = PrintTrackInfo(mp4File, trackId); - } - } - catch (Exception* x) { - mp4v2::impl::log.errorf(*x); - delete x; - } - } - - return info; -} - -extern "C" -char* MP4FileInfo( - const char* fileName, - MP4TrackId trackId ) -{ - MP4FileHandle mp4File = MP4Read(fileName); - - if (!mp4File) { - return NULL; - } - - char* info = MP4Info(mp4File, trackId); - - MP4Close(mp4File); - - return info; // caller should free this -} diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4property.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4property.cpp deleted file mode 100644 index 9a5b1e32..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4property.cpp +++ /dev/null @@ -1,1190 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Kona Blend kona8lend@@gmail.com - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4Property::MP4Property(MP4Atom& parentAtom, const char* name) - : m_parentAtom(parentAtom) -{ - m_name = name; - m_readOnly = false; - m_implicit = false; -} - -bool MP4Property::FindProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - if (name == NULL) { - return false; - } - - if (!strcasecmp(m_name, name)) { - log.verbose1f("\"%s\": FindProperty: matched %s", - m_parentAtom.GetFile().GetFilename().c_str(), name); - *ppProperty = this; - return true; - } - return false; -} - -// Integer Property - -uint64_t MP4IntegerProperty::GetValue(uint32_t index) -{ - switch (this->GetType()) { - case Integer8Property: - return ((MP4Integer8Property*)this)->GetValue(index); - case Integer16Property: - return ((MP4Integer16Property*)this)->GetValue(index); - case Integer24Property: - return ((MP4Integer24Property*)this)->GetValue(index); - case Integer32Property: - return ((MP4Integer32Property*)this)->GetValue(index); - case Integer64Property: - return ((MP4Integer64Property*)this)->GetValue(index); - default: - ASSERT(false); - } - return (0); -} - -void MP4IntegerProperty::SetValue(uint64_t value, uint32_t index) -{ - switch (this->GetType()) { - case Integer8Property: - ((MP4Integer8Property*)this)->SetValue(value, index); - break; - case Integer16Property: - ((MP4Integer16Property*)this)->SetValue(value, index); - break; - case Integer24Property: - ((MP4Integer24Property*)this)->SetValue(value, index); - break; - case Integer32Property: - ((MP4Integer32Property*)this)->SetValue(value, index); - break; - case Integer64Property: - ((MP4Integer64Property*)this)->SetValue(value, index); - break; - default: - ASSERT(false); - } -} - -void MP4IntegerProperty::InsertValue(uint64_t value, uint32_t index) -{ - switch (this->GetType()) { - case Integer8Property: - ((MP4Integer8Property*)this)->InsertValue(value, index); - break; - case Integer16Property: - ((MP4Integer16Property*)this)->InsertValue(value, index); - break; - case Integer24Property: - ((MP4Integer24Property*)this)->InsertValue(value, index); - break; - case Integer32Property: - ((MP4Integer32Property*)this)->InsertValue(value, index); - break; - case Integer64Property: - ((MP4Integer64Property*)this)->InsertValue(value, index); - break; - default: - ASSERT(false); - } -} - -void MP4IntegerProperty::DeleteValue(uint32_t index) -{ - switch (this->GetType()) { - case Integer8Property: - ((MP4Integer8Property*)this)->DeleteValue(index); - break; - case Integer16Property: - ((MP4Integer16Property*)this)->DeleteValue(index); - break; - case Integer24Property: - ((MP4Integer24Property*)this)->DeleteValue(index); - break; - case Integer32Property: - ((MP4Integer32Property*)this)->DeleteValue(index); - break; - case Integer64Property: - ((MP4Integer64Property*)this)->DeleteValue(index); - break; - default: - ASSERT(false); - } -} - -void MP4IntegerProperty::IncrementValue(int32_t increment, uint32_t index) -{ - SetValue(GetValue() + increment); -} - -void MP4Integer8Property::Dump(uint8_t indent, - bool dumpImplicits, uint32_t index) -{ - if (m_implicit && !dumpImplicits) { - return; - } - if (index != 0) - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s[%u] = %u (0x%02x)", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, index, m_values[index], m_values[index]); - else - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s = %u (0x%02x)", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, m_values[index], m_values[index]); -} - -void MP4Integer16Property::Dump(uint8_t indent, - bool dumpImplicits, uint32_t index) -{ - if (m_implicit && !dumpImplicits) { - return; - } - if (index != 0) - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s[%u] = %u (0x%04x)", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, index, m_values[index], m_values[index]); - else - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s = %u (0x%04x)", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, m_values[index], m_values[index]); -} - -void MP4Integer24Property::Dump(uint8_t indent, - bool dumpImplicits, uint32_t index) -{ - if (m_implicit && !dumpImplicits) { - return; - } - if (index != 0) - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s[%u] = %u (0x%06x)", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, index, m_values[index], m_values[index]); - else - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s = %u (0x%06x)", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, m_values[index], m_values[index]); -} - -void MP4Integer32Property::Dump(uint8_t indent, - bool dumpImplicits, uint32_t index) -{ - if (m_implicit && !dumpImplicits) { - return; - } - if (index != 0) - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s[%u] = %u (0x%08x)", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, index, m_values[index], m_values[index]); - else - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s = %u (0x%08x)", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, m_values[index], m_values[index]); -} - -void MP4Integer64Property::Dump(uint8_t indent, - bool dumpImplicits, uint32_t index) -{ - if (m_implicit && !dumpImplicits) { - return; - } - if (index != 0) - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s[%u] = %" PRIu64 " (0x%016" PRIx64 ")", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, index, m_values[index], m_values[index]); - else - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s = %" PRIu64 " (0x%016" PRIx64 ")", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, m_values[index], m_values[index]); -} - -// MP4BitfieldProperty - -void MP4BitfieldProperty::Read(MP4File& file, uint32_t index) -{ - if (m_implicit) { - return; - } - m_values[index] = file.ReadBits(m_numBits); -} - -void MP4BitfieldProperty::Write(MP4File& file, uint32_t index) -{ - if (m_implicit) { - return; - } - file.WriteBits(m_values[index], m_numBits); -} - -void MP4BitfieldProperty::Dump(uint8_t indent, - bool dumpImplicits, uint32_t index) -{ - if (m_implicit && !dumpImplicits) { - return; - } - uint8_t hexWidth = m_numBits / 4; - if (hexWidth == 0 || (m_numBits % 4)) { - hexWidth++; - } - if (index != 0) - log.dump(indent, MP4_LOG_VERBOSE1, - "\"%s\": %s[%u] = %" PRIu64 " (0x%0*" PRIx64 ") <%u bits>", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, index, m_values[index], (int)hexWidth, m_values[index], m_numBits); - else - log.dump(indent, MP4_LOG_VERBOSE1, - "\"%s\": %s = %" PRIu64 " (0x%0*" PRIx64 ") <%u bits>", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, m_values[index], (int)hexWidth, m_values[index], m_numBits); -} - -// MP4Float32Property - -void MP4Float32Property::Read(MP4File& file, uint32_t index) -{ - if (m_implicit) { - return; - } - if (m_useFixed16Format) { - m_values[index] = file.ReadFixed16(); - } else if (m_useFixed32Format) { - m_values[index] = file.ReadFixed32(); - } else { - m_values[index] = file.ReadFloat(); - } -} - -void MP4Float32Property::Write(MP4File& file, uint32_t index) -{ - if (m_implicit) { - return; - } - if (m_useFixed16Format) { - file.WriteFixed16(m_values[index]); - } else if (m_useFixed32Format) { - file.WriteFixed32(m_values[index]); - } else { - file.WriteFloat(m_values[index]); - } -} - -void MP4Float32Property::Dump(uint8_t indent, - bool dumpImplicits, uint32_t index) -{ - if (m_implicit && !dumpImplicits) { - return; - } - if (index != 0) - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s[%u] = %f", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, index, m_values[index]); - else - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s = %f", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, m_values[index]); -} - -// MP4StringProperty - -MP4StringProperty::MP4StringProperty( - MP4Atom& parentAtom, - const char* name, - bool useCountedFormat, - bool useUnicode, - bool arrayMode ) - - : MP4Property( parentAtom, name ) - , m_arrayMode ( arrayMode ) - , m_useCountedFormat ( useCountedFormat ) - , m_useExpandedCount ( false ) - , m_useUnicode ( useUnicode ) - , m_fixedLength ( 0 ) -{ - SetCount( 1 ); - m_values[0] = NULL; -} - -MP4StringProperty::~MP4StringProperty() -{ - uint32_t count = GetCount(); - for (uint32_t i = 0; i < count; i++) { - MP4Free(m_values[i]); - } -} - -void MP4StringProperty::SetCount(uint32_t count) -{ - uint32_t oldCount = m_values.Size(); - - m_values.Resize(count); - - for (uint32_t i = oldCount; i < count; i++) { - m_values[i] = NULL; - } -} - -void MP4StringProperty::SetValue(const char* value, uint32_t index) -{ - if (m_readOnly) { - ostringstream msg; - msg << "property " << m_name << "is read-only"; - throw new PlatformException(msg.str().c_str(), EACCES, __FILE__, __LINE__, __FUNCTION__ ); - } - - MP4Free(m_values[index]); - - if (m_fixedLength) { - m_values[index] = (char*)MP4Calloc(m_fixedLength + 1); - if (value) { - strncpy(m_values[index], value, m_fixedLength); - } - } else { - if (value) { - m_values[index] = MP4Stralloc(value); - } else { - m_values[index] = NULL; - } - } -} - -void MP4StringProperty::Read( MP4File& file, uint32_t index ) -{ - if( m_implicit ) - return; - - uint32_t begin = index; - uint32_t max = index + 1; - - if( m_arrayMode ) { - begin = 0; - max = GetCount(); - } - - for( uint32_t i = begin; i < max; i++ ) { - char*& value = m_values[i]; - - // Generally a default atom setting, e.g. see atom_avc1.cpp, "JVT/AVC Coding"; we'll leak this string if - // we don't free. Note that MP4Free checks for null. - MP4Free(value); - - if( m_useCountedFormat ) { - value = file.ReadCountedString( (m_useUnicode ? 2 : 1), m_useExpandedCount, m_fixedLength ); - } - else if( m_fixedLength ) { - value = (char*)MP4Calloc( m_fixedLength + 1 ); - file.ReadBytes( (uint8_t*)value, m_fixedLength ); - } - else { - value = file.ReadString(); - } - } -} - -void MP4StringProperty::Write( MP4File& file, uint32_t index ) -{ - if( m_implicit ) - return; - - uint32_t begin = index; - uint32_t max = index + 1; - - if( m_arrayMode ) { - begin = 0; - max = GetCount(); - } - - for( uint32_t i = begin; i < max; i++ ) { - char*& value = m_values[i]; - - if( m_useCountedFormat ) { - file.WriteCountedString( value, (m_useUnicode ? 2 : 1), m_useExpandedCount, m_fixedLength ); - } - else if( m_fixedLength ) { - file.WriteBytes( (uint8_t*)value, m_fixedLength ); - } - else { - file.WriteString( value ); - } - } -} - -void MP4StringProperty::Dump( uint8_t indent, bool dumpImplicits, uint32_t index ) -{ - if( m_implicit && !dumpImplicits ) - return; - - if( !m_arrayMode ) { - char indexd[32]; - if( index != 0 ) - snprintf( indexd, 32, "[%u]", index ); - else - indexd[0] = '\0'; - - if( m_useUnicode ) - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s%s = %ls", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, indexd, (wchar_t*)m_values[index] ); - else - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s%s = %s", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, indexd, m_values[index] ); - } - else if( log.verbosity >= MP4_LOG_VERBOSE2 ) - { - const uint32_t max = GetCount(); - - log.dump(indent, MP4_LOG_VERBOSE2, "\"%s\": %s (size=%u)", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, max ); - - for( uint32_t i = 0; i < max; i++ ) { - char*& value = m_values[i]; - - if( m_useUnicode ) - log.dump(indent, MP4_LOG_VERBOSE2, "\"%s\": %s[%u] = %ls", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, i, (wchar_t*)value ); - else - log.dump(indent, MP4_LOG_VERBOSE2, "\"%s\": %s[%u] = %s", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, i, value ); - } - } - else { - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\":
", - m_parentAtom.GetFile().GetFilename().c_str() ); - } -} - -// MP4BytesProperty - -MP4BytesProperty::MP4BytesProperty(MP4Atom& parentAtom, const char* name, uint32_t valueSize, - uint32_t defaultValueSize) - : MP4Property(parentAtom, name) - , m_fixedValueSize(0) - , m_defaultValueSize(defaultValueSize) -{ - SetCount(1); - m_values[0] = (uint8_t*)MP4Calloc(valueSize); - m_valueSizes[0] = valueSize; -} - -MP4BytesProperty::~MP4BytesProperty() -{ - uint32_t count = GetCount(); - for (uint32_t i = 0; i < count; i++) { - MP4Free(m_values[i]); - } -} - -void MP4BytesProperty::SetCount(uint32_t count) -{ - uint32_t oldCount = m_values.Size(); - - m_values.Resize(count); - m_valueSizes.Resize(count); - - for (uint32_t i = oldCount; i < count; i++) { - m_values[i] = NULL; - m_valueSizes[i] = m_defaultValueSize; - } -} - -void MP4BytesProperty::SetValue(const uint8_t* pValue, uint32_t valueSize, - uint32_t index) -{ - if (m_readOnly) { - ostringstream msg; - msg << "property " << m_name << "is read-only"; - throw new PlatformException(msg.str().c_str(), EACCES, __FILE__, __LINE__, __FUNCTION__ ); - } - if (m_fixedValueSize) { - if (valueSize > m_fixedValueSize) { - ostringstream msg; - msg << GetParentAtom().GetType() << "." << GetName() << " value size " << valueSize << " exceeds fixed value size " << m_fixedValueSize; - throw new Exception(msg.str().c_str(), __FILE__, __LINE__, __FUNCTION__ ); - } - if (m_values[index] == NULL) { - m_values[index] = (uint8_t*)MP4Calloc(m_fixedValueSize); - m_valueSizes[index] = m_fixedValueSize; - } - if (pValue) { - memcpy(m_values[index], pValue, valueSize); - } - } else { - MP4Free(m_values[index]); - if (pValue) { - m_values[index] = (uint8_t*)MP4Malloc(valueSize); - memcpy(m_values[index], pValue, valueSize); - m_valueSizes[index] = valueSize; - } else { - m_values[index] = NULL; - m_valueSizes[index] = 0; - } - } -} - -void MP4BytesProperty::SetValueSize(uint32_t valueSize, uint32_t index) -{ - if (m_fixedValueSize) { - throw new Exception("can't change size of fixed sized property", - __FILE__, __LINE__, __FUNCTION__ ); - } - if (m_values[index] != NULL) { - m_values[index] = (uint8_t*)MP4Realloc(m_values[index], valueSize); - } - m_valueSizes[index] = valueSize; -} - -void MP4BytesProperty::SetFixedSize(uint32_t fixedSize) -{ - m_fixedValueSize = 0; - for (uint32_t i = 0; i < GetCount(); i++) { - SetValueSize(fixedSize, i); - } - m_fixedValueSize = fixedSize; -} - -void MP4BytesProperty::Read(MP4File& file, uint32_t index) -{ - if (m_implicit) { - return; - } - MP4Free(m_values[index]); - m_values[index] = (uint8_t*)MP4Malloc(m_valueSizes[index]); - file.ReadBytes(m_values[index], m_valueSizes[index]); -} - -void MP4BytesProperty::Write(MP4File& file, uint32_t index) -{ - if (m_implicit) { - return; - } - file.WriteBytes(m_values[index], m_valueSizes[index]); -} - -void MP4BytesProperty::Dump(uint8_t indent, - bool dumpImplicits, uint32_t index) -{ - if( m_implicit && !dumpImplicits ) - return; - - const uint32_t size = m_valueSizes[index]; - const uint8_t* const value = m_values[index]; - - if( size == 0 ) { - log.dump(indent, MP4_LOG_VERBOSE2, "\"%s\": %s = <%u bytes>", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, size ); - return; - } - - if( size <= 16 ) { - ostringstream oss; - ostringstream text; - - oss << " "; - for( uint32_t i = 0; i < size; i++ ) { - if( i ) - oss << ' '; - oss << hex << setw(2) << setfill('0') << right << static_cast(value[i]); - text << (isprint( static_cast(value[i]) ) ? static_cast(value[i]) : '.'); - } - - oss << " |" << text.str() << "|"; - - log.dump(indent, MP4_LOG_VERBOSE2, "\"%s\": %s = <%u bytes>%s", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, size, oss.str().c_str() ); - return; - } - - // specialization for ilst item data always show all bytes except for covr - bool showall = false; - MP4Atom* const datac = m_parentAtom.GetParentAtom(); // data container - MP4Atom* const datacc = datac->GetParentAtom(); - if( datacc && - ATOMID( datacc->GetType() ) == ATOMID( "ilst" ) && - ATOMID( datac->GetType() ) != ATOMID( "covr" ) ) - { - showall = true; - } - - uint32_t adjsize; - bool supressed; - - if( showall || - size < 128 || log.verbosity >= MP4_LOG_VERBOSE2 ) - { - adjsize = size; - supressed = false; - } - else { - adjsize = 128; - supressed = true; - } - - ostringstream oss; - ostringstream text; - - log.dump(indent, MP4_LOG_VERBOSE2, "\"%s\": %s = <%u bytes>", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, size ); - log.hexDump(indent, MP4_LOG_VERBOSE2, value, adjsize, "\"%s\": %s", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name); - - if( supressed ) { - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": ", - m_parentAtom.GetFile().GetFilename().c_str() ); - } -} - -// MP4TableProperty - -MP4TableProperty::MP4TableProperty(MP4Atom& parentAtom, const char* name, MP4IntegerProperty* pCountProperty) - : MP4Property(parentAtom, name) -{ - m_pCountProperty = pCountProperty; - m_pCountProperty->SetReadOnly(); -} - -MP4TableProperty::~MP4TableProperty() -{ - for (uint32_t i = 0; i < m_pProperties.Size(); i++) { - delete m_pProperties[i]; - } -} - -void MP4TableProperty::AddProperty(MP4Property* pProperty) -{ - ASSERT(pProperty); - ASSERT(pProperty->GetType() != TableProperty); - ASSERT(pProperty->GetType() != DescriptorProperty); - m_pProperties.Add(pProperty); - pProperty->SetCount(0); -} - -bool MP4TableProperty::FindProperty(const char *name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - ASSERT(m_name); - - // check if first component of name matches ourselves - if (!MP4NameFirstMatches(m_name, name)) { - return false; - } - - // check if the specified table entry exists - uint32_t index; - bool haveIndex = MP4NameFirstIndex(name, &index); - if (haveIndex) { - if (index >= GetCount()) { - return false; - } - if (pIndex) { - *pIndex = index; - } - } - - log.verbose1f("\"%s\": FindProperty: matched %s", - m_parentAtom.GetFile().GetFilename().c_str(), name); - - // get name of table property - const char *tablePropName = MP4NameAfterFirst(name); - if (tablePropName == NULL) { - if (!haveIndex) { - *ppProperty = this; - return true; - } - return false; - } - - // check if this table property exists - return FindContainedProperty(tablePropName, ppProperty, pIndex); -} - -bool MP4TableProperty::FindContainedProperty(const char *name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - uint32_t numProperties = m_pProperties.Size(); - - for (uint32_t i = 0; i < numProperties; i++) { - if (m_pProperties[i]->FindProperty(name, ppProperty, pIndex)) { - return true; - } - } - return false; -} - -void MP4TableProperty::Read(MP4File& file, uint32_t index) -{ - ASSERT(index == 0); - - if (m_implicit) { - return; - } - - uint32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { - WARNING(numProperties == 0); - return; - } - - uint32_t numEntries = GetCount(); - - /* for each property set size */ - for (uint32_t j = 0; j < numProperties; j++) { - m_pProperties[j]->SetCount(numEntries); - } - - for (uint32_t i = 0; i < numEntries; i++) { - ReadEntry(file, i); - } -} - -void MP4TableProperty::ReadEntry(MP4File& file, uint32_t index) -{ - for (uint32_t j = 0; j < m_pProperties.Size(); j++) { - m_pProperties[j]->Read(file, index); - } -} - -void MP4TableProperty::Write(MP4File& file, uint32_t index) -{ - ASSERT(index == 0); - - if (m_implicit) { - return; - } - - uint32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { - WARNING(numProperties == 0); - return; - } - - uint32_t numEntries = GetCount(); - - if (m_pProperties[0]->GetCount() != numEntries) { - log.errorf("%s: \"%s\": %s %s \"%s\"table entries %u doesn't match count %u", - __FUNCTION__, m_parentAtom.GetFile().GetFilename().c_str(), - GetParentAtom().GetType(), - GetName(), m_pProperties[0]->GetName(), - m_pProperties[0]->GetCount(), numEntries); - - ASSERT(m_pProperties[0]->GetCount() == numEntries); - } - - for (uint32_t i = 0; i < numEntries; i++) { - WriteEntry(file, i); - } -} - -void MP4TableProperty::WriteEntry(MP4File& file, uint32_t index) -{ - for (uint32_t j = 0; j < m_pProperties.Size(); j++) { - m_pProperties[j]->Write(file, index); - } -} - -void MP4TableProperty::Dump(uint8_t indent, - bool dumpImplicits, uint32_t index) -{ - ASSERT(index == 0); - - // implicit tables just can't be dumped - if (m_implicit) { - return; - } - - uint32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { - WARNING(numProperties == 0); - return; - } - - uint32_t numEntries = GetCount(); - - for (uint32_t i = 0; i < numEntries; i++) { - for (uint32_t j = 0; j < numProperties; j++) { - m_pProperties[j]->Dump(indent + 1, dumpImplicits, i); - } - } -} - -// MP4DescriptorProperty - -MP4DescriptorProperty::MP4DescriptorProperty(MP4Atom& parentAtom, const char* name, - uint8_t tagsStart, uint8_t tagsEnd, bool mandatory, bool onlyOne) - : MP4Property(parentAtom, name) -{ - SetTags(tagsStart, tagsEnd); - m_sizeLimit = 0; - m_mandatory = mandatory; - m_onlyOne = onlyOne; -} - -MP4DescriptorProperty::~MP4DescriptorProperty() -{ - for (uint32_t i = 0; i < m_pDescriptors.Size(); i++) { - delete m_pDescriptors[i]; - } -} - -MP4Descriptor* MP4DescriptorProperty::AddDescriptor(uint8_t tag) -{ - // check that tag is in expected range - ASSERT(tag >= m_tagsStart && tag <= m_tagsEnd); - - MP4Descriptor* pDescriptor = CreateDescriptor(m_parentAtom, tag); - ASSERT(pDescriptor); - - m_pDescriptors.Add(pDescriptor); - - return pDescriptor; -} - -void MP4DescriptorProperty::DeleteDescriptor(uint32_t index) -{ - delete m_pDescriptors[index]; - m_pDescriptors.Delete(index); -} - -void MP4DescriptorProperty::Generate() -{ - // generate a default descriptor - // if it is mandatory, and single - if (m_mandatory && m_onlyOne) { - MP4Descriptor* pDescriptor = - AddDescriptor(m_tagsStart); - pDescriptor->Generate(); - } -} - -bool MP4DescriptorProperty::FindProperty(const char *name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - // we're unnamed, so just check contained properties - if (m_name == NULL || !strcmp(m_name, "")) { - return FindContainedProperty(name, ppProperty, pIndex); - } - - // check if first component of name matches ourselves - if (!MP4NameFirstMatches(m_name, name)) { - return false; - } - - // check if the specific descriptor entry exists - uint32_t descrIndex; - bool haveDescrIndex = MP4NameFirstIndex(name, &descrIndex); - - if (haveDescrIndex && descrIndex >= GetCount()) { - return false; - } - - log.verbose1f("\"%s\": matched %s", - m_parentAtom.GetFile().GetFilename().c_str(), - name); - - // get name of descriptor property - name = MP4NameAfterFirst(name); - if (name == NULL) { - if (!haveDescrIndex) { - *ppProperty = this; - return true; - } - return false; - } - - /* check rest of name */ - if (haveDescrIndex) { - return m_pDescriptors[descrIndex]->FindProperty(name, - ppProperty, pIndex); - } else { - return FindContainedProperty(name, ppProperty, pIndex); - } -} - -bool MP4DescriptorProperty::FindContainedProperty(const char *name, - MP4Property** ppProperty, uint32_t* pIndex) -{ - for (uint32_t i = 0; i < m_pDescriptors.Size(); i++) { - if (m_pDescriptors[i]->FindProperty(name, ppProperty, pIndex)) { - return true; - } - } - return false; -} - -void MP4DescriptorProperty::Read(MP4File& file, uint32_t index) -{ - ASSERT(index == 0); - - if (m_implicit) { - return; - } - - uint64_t start = file.GetPosition(); - - while (true) { - // enforce size limitation - if (m_sizeLimit && file.GetPosition() >= start + m_sizeLimit) { - break; - } - - uint8_t tag; - try { - file.PeekBytes(&tag, 1); - } - catch (Exception* x) { - if (file.GetPosition() >= file.GetSize()) { - // EOF - delete x; - break; - } - throw x; - } - - // check if tag is in desired range - if (tag < m_tagsStart || tag > m_tagsEnd) { - break; - } - - MP4Descriptor* pDescriptor = - AddDescriptor(tag); - - pDescriptor->Read(file); - } - - // warnings - if (m_mandatory && m_pDescriptors.Size() == 0) { - log.warningf("%s: \"%s\": Mandatory descriptor 0x%02x missing", - __FUNCTION__, GetParentAtom().GetFile().GetFilename().c_str(), m_tagsStart); - } else if (m_onlyOne && m_pDescriptors.Size() > 1) { - log.warningf("%s: \"%s\": Descriptor 0x%02x has more than one instance", - __FUNCTION__, GetParentAtom().GetFile().GetFilename().c_str(), m_tagsStart); - } -} - -void MP4DescriptorProperty::Write(MP4File& file, uint32_t index) -{ - ASSERT(index == 0); - - if (m_implicit) { - return; - } - - for (uint32_t i = 0; i < m_pDescriptors.Size(); i++) { - m_pDescriptors[i]->Write(file); - } -} - -void MP4DescriptorProperty::Dump(uint8_t indent, - bool dumpImplicits, uint32_t index) -{ - ASSERT(index == 0); - - if (m_implicit && !dumpImplicits) { - return; - } - - if (m_name) { - if (index != 0) - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s[%u]", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, index); - else - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name); - indent++; - } - - for (uint32_t i = 0; i < m_pDescriptors.Size(); i++) { - m_pDescriptors[i]->Dump(indent, dumpImplicits); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4LanguageCodeProperty::MP4LanguageCodeProperty( MP4Atom& parentAtom, const char* name, bmff::LanguageCode value ) - : MP4Property( parentAtom, name ) -{ - SetValue( value ); -} - -MP4LanguageCodeProperty::MP4LanguageCodeProperty( MP4Atom& parentAtom, const char* name, const string& code ) - : MP4Property( parentAtom, name ) -{ - SetValue( bmff::enumLanguageCode.toType( code )); -} - -void -MP4LanguageCodeProperty::Dump( uint8_t indent, bool dumpImplicits, uint32_t index ) -{ - uint16_t data = 0; - - string svalue; - bmff::enumLanguageCode.toString( _value, svalue ); - if( svalue.length() == 3 ) { - data = (((svalue[0] - 0x60) & 0x001f) << 10) - | (((svalue[1] - 0x60) & 0x001f) << 5) - | (((svalue[2] - 0x60) & 0x001f) ); - } - - log.dump(indent, MP4_LOG_VERBOSE2, "\"%s\": %s = %s (0x%04x)", - m_parentAtom.GetFile().GetFilename().c_str(), - m_name, bmff::enumLanguageCode.toString( _value, true ).c_str(), data ); -} - -uint32_t -MP4LanguageCodeProperty::GetCount() -{ - return 1; -} - -MP4PropertyType -MP4LanguageCodeProperty::GetType() -{ - return LanguageCodeProperty; -} - -bmff::LanguageCode -MP4LanguageCodeProperty::GetValue() -{ - return _value; -} - -void -MP4LanguageCodeProperty::Read( MP4File& file, uint32_t index ) -{ - uint16_t data = file.ReadBits( 16 ); - - char code[3]; - code[0] = ((data & 0x7c00) >> 10) + 0x60; - code[1] = ((data & 0x03e0) >> 5) + 0x60; - code[2] = ((data & 0x001f) ) + 0x60; - - SetValue( bmff::enumLanguageCode.toType( string( code, sizeof(code) ))); -} - -void -MP4LanguageCodeProperty::SetCount( uint32_t count ) -{ - // do nothing; count is always 1 -} - -void -MP4LanguageCodeProperty::SetValue( bmff::LanguageCode value ) -{ - _value = value; -} - -void -MP4LanguageCodeProperty::Write( MP4File& file, uint32_t index ) -{ - uint16_t data = 0; - - string svalue; - bmff::enumLanguageCode.toString( _value, svalue ); - if( svalue.length() == 3 ) { - data = (((svalue[0] - 0x60) & 0x001f) << 10) - | (((svalue[1] - 0x60) & 0x001f) << 5) - | (((svalue[2] - 0x60) & 0x001f) ); - } - - file.WriteBits( data, 16 ); -} - -/////////////////////////////////////////////////////////////////////////////// - -MP4BasicTypeProperty::MP4BasicTypeProperty( MP4Atom& parentAtom, const char* name, itmf::BasicType type ) - : MP4Property( parentAtom, name ) -{ - SetValue( type ); -} - -void -MP4BasicTypeProperty::Dump( uint8_t indent, bool dumpImplicits, uint32_t index ) -{ - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": %s = %s (0x%02x)", - m_parentAtom.GetFile().GetFilename().c_str(), m_name, - itmf::enumBasicType.toString( _value, true ).c_str(), _value ); -} - -uint32_t -MP4BasicTypeProperty::GetCount() -{ - return 1; -} - -MP4PropertyType -MP4BasicTypeProperty::GetType() -{ - return BasicTypeProperty; -} - -itmf::BasicType -MP4BasicTypeProperty::GetValue() -{ - return _value; -} - -void -MP4BasicTypeProperty::Read( MP4File& file, uint32_t index ) -{ - SetValue( static_cast( file.ReadBits( 8 ))); -} - -void -MP4BasicTypeProperty::SetCount( uint32_t count ) -{ - // do nothing; count is always 1 -} - -void -MP4BasicTypeProperty::SetValue( itmf::BasicType value ) -{ - _value = value; -} - -void -MP4BasicTypeProperty::Write( MP4File& file, uint32_t index ) -{ - file.WriteBits( _value, 8 ); -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4property.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4property.h deleted file mode 100644 index 4c7ccad9..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4property.h +++ /dev/null @@ -1,663 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#ifndef MP4V2_IMPL_MP4PROPERTY_H -#define MP4V2_IMPL_MP4PROPERTY_H - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -// forward declarations -class MP4Atom; - -class MP4Descriptor; -MP4ARRAY_DECL(MP4Descriptor, MP4Descriptor*); - -enum MP4PropertyType { - Integer8Property, - Integer16Property, - Integer24Property, - Integer32Property, - Integer64Property, - Float32Property, - StringProperty, - BytesProperty, - TableProperty, - DescriptorProperty, - LanguageCodeProperty, - BasicTypeProperty, -}; - -class MP4Property { -public: - MP4Property(MP4Atom& parentAtom, const char *name = NULL); - - virtual ~MP4Property() { } - - MP4Atom& GetParentAtom() { - return m_parentAtom; - } - - const char *GetName() { - return m_name; - } - - virtual MP4PropertyType GetType() = 0; - - bool IsReadOnly() { - return m_readOnly; - } - void SetReadOnly(bool value = true) { - m_readOnly = value; - } - - bool IsImplicit() { - return m_implicit; - } - void SetImplicit(bool value = true) { - m_implicit = value; - } - - virtual uint32_t GetCount() = 0; - virtual void SetCount(uint32_t count) = 0; - - virtual void Generate() { /* default is a no-op */ }; - - virtual void Read(MP4File& file, uint32_t index = 0) = 0; - - virtual void Write(MP4File& file, uint32_t index = 0) = 0; - - virtual void Dump(uint8_t indent, - bool dumpImplicits, uint32_t index = 0) = 0; - - virtual bool FindProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - -protected: - MP4Atom& m_parentAtom; - const char* m_name; - bool m_readOnly; - bool m_implicit; - -private: - MP4Property(); - MP4Property ( const MP4Property &src ); - MP4Property &operator= ( const MP4Property &src ); -}; - -MP4ARRAY_DECL(MP4Property, MP4Property*); - -class MP4IntegerProperty : public MP4Property { -protected: - MP4IntegerProperty(MP4Atom& parentAtom, const char* name) - : MP4Property(parentAtom, name) { }; - -public: - uint64_t GetValue(uint32_t index = 0); - - void SetValue(uint64_t value, uint32_t index = 0); - - void InsertValue(uint64_t value, uint32_t index = 0); - - void DeleteValue(uint32_t index = 0); - - void IncrementValue(int32_t increment = 1, uint32_t index = 0); - -private: - MP4IntegerProperty(); - MP4IntegerProperty ( const MP4IntegerProperty &src ); - MP4IntegerProperty &operator= ( const MP4IntegerProperty &src ); -}; - -#define MP4INTEGER_PROPERTY_DECL2(isize, xsize) \ - class MP4Integer##xsize##Property : public MP4IntegerProperty { \ - public: \ - MP4Integer##xsize##Property(MP4Atom& parentAtom, const char* name) \ - : MP4IntegerProperty(parentAtom, name) { \ - SetCount(1); \ - m_values[0] = 0; \ - } \ - \ - MP4PropertyType GetType() { \ - return Integer##xsize##Property; \ - } \ - \ - uint32_t GetCount() { \ - return m_values.Size(); \ - } \ - void SetCount(uint32_t count) { \ - m_values.Resize(count); \ - } \ - \ - uint##isize##_t GetValue(uint32_t index = 0) { \ - return m_values[index]; \ - } \ - \ - void SetValue(uint##isize##_t value, uint32_t index = 0) { \ - if (m_readOnly) { \ - ostringstream msg; \ - msg << "property is read-only: " << m_name; \ - throw new PlatformException(msg.str().c_str(), EACCES, __FILE__, __LINE__, __FUNCTION__); \ - } \ - m_values[index] = value; \ - } \ - void AddValue(uint##isize##_t value) { \ - m_values.Add(value); \ - } \ - void InsertValue(uint##isize##_t value, uint32_t index) { \ - m_values.Insert(value, index); \ - } \ - void DeleteValue(uint32_t index) { \ - m_values.Delete(index); \ - } \ - void IncrementValue(int32_t increment = 1, uint32_t index = 0) { \ - m_values[index] += increment; \ - } \ - void Read(MP4File& file, uint32_t index = 0) { \ - if (m_implicit) { \ - return; \ - } \ - m_values[index] = file.ReadUInt##xsize(); \ - } \ - \ - void Write(MP4File& file, uint32_t index = 0) { \ - if (m_implicit) { \ - return; \ - } \ - file.WriteUInt##xsize(m_values[index]); \ - } \ - void Dump(uint8_t indent, \ - bool dumpImplicits, uint32_t index = 0); \ - \ - protected: \ - MP4Integer##isize##Array m_values; \ - private: \ - MP4Integer##xsize##Property(); \ - MP4Integer##xsize##Property ( const MP4Integer##xsize##Property &src ); \ - MP4Integer##xsize##Property &operator= ( const MP4Integer##xsize##Property &src ); \ - }; - -#define MP4INTEGER_PROPERTY_DECL(size) \ - MP4INTEGER_PROPERTY_DECL2(size, size) - -MP4INTEGER_PROPERTY_DECL(8); -MP4INTEGER_PROPERTY_DECL(16); -MP4INTEGER_PROPERTY_DECL2(32, 24); -MP4INTEGER_PROPERTY_DECL(32); -MP4INTEGER_PROPERTY_DECL(64); - -class MP4BitfieldProperty : public MP4Integer64Property { -public: - MP4BitfieldProperty(MP4Atom& parentAtom, const char* name, uint8_t numBits) - : MP4Integer64Property(parentAtom, name) { - ASSERT(numBits != 0); - ASSERT(numBits <= 64); - m_numBits = numBits; - } - - uint8_t GetNumBits() { - return m_numBits; - } - void SetNumBits(uint8_t numBits) { - m_numBits = numBits; - } - - void Read(MP4File& file, uint32_t index = 0); - void Write(MP4File& file, uint32_t index = 0); - void Dump(uint8_t indent, - bool dumpImplicits, uint32_t index = 0); - -protected: - uint8_t m_numBits; - -private: - MP4BitfieldProperty(); - MP4BitfieldProperty ( const MP4BitfieldProperty &src ); - MP4BitfieldProperty &operator= ( const MP4BitfieldProperty &src ); -}; - -class MP4Float32Property : public MP4Property { -public: - MP4Float32Property(MP4Atom& parentAtom, const char* name) - : MP4Property(parentAtom, name) { - m_useFixed16Format = false; - m_useFixed32Format = false; - SetCount(1); - m_values[0] = 0.0; - } - - MP4PropertyType GetType() { - return Float32Property; - } - - uint32_t GetCount() { - return m_values.Size(); - } - void SetCount(uint32_t count) { - m_values.Resize(count); - } - - float GetValue(uint32_t index = 0) { - return m_values[index]; - } - - void SetValue(float value, uint32_t index = 0) { - if (m_readOnly) { - ostringstream msg; - msg << "property is read-only: " << m_name; - throw new PlatformException(msg.str().c_str(), EACCES, __FILE__, __LINE__, __FUNCTION__); - } - m_values[index] = value; - } - - void AddValue(float value) { - m_values.Add(value); - } - - void InsertValue(float value, uint32_t index) { - m_values.Insert(value, index); - } - - bool IsFixed16Format() { - return m_useFixed16Format; - } - - void SetFixed16Format(bool useFixed16Format = true) { - m_useFixed16Format = useFixed16Format; - } - - bool IsFixed32Format() { - return m_useFixed32Format; - } - - void SetFixed32Format(bool useFixed32Format = true) { - m_useFixed32Format = useFixed32Format; - } - - void Read(MP4File& file, uint32_t index = 0); - void Write(MP4File& file, uint32_t index = 0); - void Dump(uint8_t indent, - bool dumpImplicits, uint32_t index = 0); - -protected: - bool m_useFixed16Format; - bool m_useFixed32Format; - MP4Float32Array m_values; - -private: - MP4Float32Property(); - MP4Float32Property ( const MP4Float32Property &src ); - MP4Float32Property &operator= ( const MP4Float32Property &src ); -}; - -class MP4StringProperty : public MP4Property { -public: - MP4StringProperty(MP4Atom& parentAtom, const char* name, - bool useCountedFormat = false, bool useUnicode = false, bool arrayMode = false); - - ~MP4StringProperty(); - - MP4PropertyType GetType() { - return StringProperty; - } - - uint32_t GetCount() { - return m_values.Size(); - } - - void SetCount(uint32_t count); - - const char* GetValue(uint32_t index = 0) { - return m_values[index]; - } - - void SetValue(const char* value, uint32_t index = 0); - - void AddValue(const char* value) { - uint32_t count = GetCount(); - SetCount(count + 1); - SetValue(value, count); - } - - bool IsCountedFormat() { - return m_useCountedFormat; - } - - void SetCountedFormat(bool useCountedFormat) { - m_useCountedFormat = useCountedFormat; - } - - bool IsExpandedCountedFormat() { - return m_useExpandedCount; - } - - void SetExpandedCountedFormat(bool useExpandedCount) { - m_useExpandedCount = useExpandedCount; - } - - bool IsUnicode() { - return m_useUnicode; - } - - void SetUnicode(bool useUnicode) { - m_useUnicode = useUnicode; - } - - uint32_t GetFixedLength() { - return m_fixedLength; - } - - void SetFixedLength(uint32_t fixedLength) { - m_fixedLength = fixedLength; - } - - void Read(MP4File& file, uint32_t index = 0); - void Write(MP4File& file, uint32_t index = 0); - void Dump(uint8_t indent, - bool dumpImplicits, uint32_t index = 0); - -protected: - bool m_arrayMode; // during read/write ignore index and read/write full array - bool m_useCountedFormat; - bool m_useExpandedCount; - bool m_useUnicode; - uint32_t m_fixedLength; - - MP4StringArray m_values; - -private: - MP4StringProperty(); - MP4StringProperty ( const MP4StringProperty &src ); - MP4StringProperty &operator= ( const MP4StringProperty &src ); -}; - -class MP4BytesProperty : public MP4Property { -public: - MP4BytesProperty(MP4Atom& parentAtom, const char* name, uint32_t valueSize = 0, - uint32_t defaultValueSize = 0); - - ~MP4BytesProperty(); - - MP4PropertyType GetType() { - return BytesProperty; - } - - uint32_t GetCount() { - return m_values.Size(); - } - - void SetCount(uint32_t count); - - void GetValue(uint8_t** ppValue, uint32_t* pValueSize, - uint32_t index = 0) { - // N.B. caller must free memory - *ppValue = (uint8_t*)MP4Malloc(m_valueSizes[index]); - memcpy(*ppValue, m_values[index], m_valueSizes[index]); - *pValueSize = m_valueSizes[index]; - } - - char* GetValueStringAlloc( uint32_t index = 0 ) { - char* buf = (char*)MP4Malloc( m_valueSizes[index] + 1 ); - memcpy( buf, m_values[index], m_valueSizes[index] ); - buf[m_valueSizes[index]] = '\0'; - return buf; - } - - bool CompareToString( const string& s, uint32_t index = 0 ) { - return string( (const char*)m_values[index], m_valueSizes[index] ) != s; - } - - void CopyValue(uint8_t* pValue, uint32_t index = 0) { - // N.B. caller takes responsbility for valid pointer - // and sufficient memory at the destination - memcpy(pValue, m_values[index], m_valueSizes[index]); - } - - void SetValue(const uint8_t* pValue, uint32_t valueSize, - uint32_t index = 0); - - void AddValue(const uint8_t* pValue, uint32_t valueSize) { - uint32_t count = GetCount(); - SetCount(count + 1); - SetValue(pValue, valueSize, count); - } - - uint32_t GetValueSize( uint32_t index = 0 ) { - return m_valueSizes[index]; - } - - void SetValueSize(uint32_t valueSize, uint32_t index = 0); - - uint32_t GetFixedSize() { - return m_fixedValueSize; - } - - void SetFixedSize(uint32_t fixedSize); - - void Read(MP4File& file, uint32_t index = 0); - void Write(MP4File& file, uint32_t index = 0); - void Dump(uint8_t indent, - bool dumpImplicits, uint32_t index = 0); - -protected: - uint32_t m_fixedValueSize; - uint32_t m_defaultValueSize; - MP4Integer32Array m_valueSizes; - MP4BytesArray m_values; - -private: - MP4BytesProperty(); - MP4BytesProperty ( const MP4BytesProperty &src ); - MP4BytesProperty &operator= ( const MP4BytesProperty &src ); -}; - -class MP4TableProperty : public MP4Property { -public: - MP4TableProperty(MP4Atom& parentAtom, const char* name, MP4IntegerProperty* pCountProperty); - - ~MP4TableProperty(); - - MP4PropertyType GetType() { - return TableProperty; - } - - void AddProperty(MP4Property* pProperty); - - MP4Property* GetProperty(uint32_t index) { - return m_pProperties[index]; - } - - virtual uint32_t GetCount() { - return m_pCountProperty->GetValue(); - } - virtual void SetCount(uint32_t count) { - m_pCountProperty->SetValue(count); - } - - void Read(MP4File& file, uint32_t index = 0); - void Write(MP4File& file, uint32_t index = 0); - void Dump(uint8_t indent, - bool dumpImplicits, uint32_t index = 0); - - bool FindProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - -protected: - virtual void ReadEntry(MP4File& file, uint32_t index); - virtual void WriteEntry(MP4File& file, uint32_t index); - - bool FindContainedProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex); - -protected: - MP4IntegerProperty* m_pCountProperty; - MP4PropertyArray m_pProperties; - -private: - MP4TableProperty(); - MP4TableProperty ( const MP4TableProperty &src ); - MP4TableProperty &operator= ( const MP4TableProperty &src ); -}; - -class MP4DescriptorProperty : public MP4Property { -public: - MP4DescriptorProperty(MP4Atom& parentAtom, const char* name = NULL, - uint8_t tagsStart = 0, uint8_t tagsEnd = 0, - bool mandatory = false, bool onlyOne = false); - - ~MP4DescriptorProperty(); - - MP4PropertyType GetType() { - return DescriptorProperty; - } - - void SetParentAtom(MP4Atom* pParentAtom); - - void SetSizeLimit(uint64_t sizeLimit) { - m_sizeLimit = sizeLimit; - } - - uint32_t GetCount() { - return m_pDescriptors.Size(); - } - void SetCount(uint32_t count) { - m_pDescriptors.Resize(count); - } - - void SetTags(uint8_t tagsStart, uint8_t tagsEnd = 0) { - m_tagsStart = tagsStart; - m_tagsEnd = tagsEnd ? tagsEnd : tagsStart; - } - - MP4Descriptor* AddDescriptor(uint8_t tag); - - void AppendDescriptor(MP4Descriptor* pDescriptor) { - m_pDescriptors.Add(pDescriptor); - } - - void DeleteDescriptor(uint32_t index); - - void Generate(); - void Read(MP4File& file, uint32_t index = 0); - void Write(MP4File& file, uint32_t index = 0); - void Dump(uint8_t indent, - bool dumpImplicits, uint32_t index = 0); - - bool FindProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex = NULL); - -protected: - virtual MP4Descriptor* CreateDescriptor(MP4Atom& parentAtom, uint8_t tag); - - bool FindContainedProperty(const char* name, - MP4Property** ppProperty, uint32_t* pIndex); - -protected: - uint8_t m_tagsStart; - uint8_t m_tagsEnd; - uint64_t m_sizeLimit; - bool m_mandatory; - bool m_onlyOne; - MP4DescriptorArray m_pDescriptors; - -private: - MP4DescriptorProperty(); - MP4DescriptorProperty ( const MP4DescriptorProperty &src ); - MP4DescriptorProperty &operator= ( const MP4DescriptorProperty &src ); -}; - -class MP4QosQualifierProperty : public MP4DescriptorProperty { -public: - MP4QosQualifierProperty(MP4Atom& parentAtom, const char* name = NULL, - uint8_t tagsStart = 0, uint8_t tagsEnd = 0, - bool mandatory = false, bool onlyOne = false) : - MP4DescriptorProperty(parentAtom, name, tagsStart, tagsEnd, mandatory, onlyOne) { } - -protected: - MP4Descriptor* CreateDescriptor(MP4Atom& parentAtom, uint8_t tag); - -private: - MP4QosQualifierProperty(); - MP4QosQualifierProperty ( const MP4QosQualifierProperty &src ); - MP4QosQualifierProperty &operator= ( const MP4QosQualifierProperty &src ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -/// ISO-639-2/T language code. -/// Language codes are 3-alpha (always lowercase) codes which are then -/// offset using 0x60 and packed as 5-bit values into 16-bits, most -/// significant bit is zero-padding. - -class MP4LanguageCodeProperty : public MP4Property { -private: - bmff::LanguageCode _value; - -public: - explicit MP4LanguageCodeProperty( MP4Atom& parentAtom, const char* , bmff::LanguageCode = bmff::ILC_UND ); - MP4LanguageCodeProperty( MP4Atom& parentAtom, const char* , const string& ); - - MP4PropertyType GetType(); - uint32_t GetCount(); - void SetCount( uint32_t ); - void Read( MP4File&, uint32_t = 0 ); - void Write( MP4File&, uint32_t = 0 ); - void Dump( uint8_t, bool, uint32_t = 0 ); - - bmff::LanguageCode GetValue(); - void SetValue( bmff::LanguageCode ); - -private: - MP4LanguageCodeProperty(); - MP4LanguageCodeProperty ( const MP4LanguageCodeProperty &src ); - MP4LanguageCodeProperty &operator= ( const MP4LanguageCodeProperty &src ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -class MP4BasicTypeProperty : public MP4Property { -private: - itmf::BasicType _value; - -public: - explicit MP4BasicTypeProperty( MP4Atom& parentAtom, const char* , itmf::BasicType = itmf::BT_UNDEFINED ); - - MP4PropertyType GetType(); - uint32_t GetCount(); - void SetCount( uint32_t ); - void Read( MP4File&, uint32_t = 0 ); - void Write( MP4File&, uint32_t = 0 ); - void Dump( uint8_t, bool, uint32_t = 0 ); - itmf::BasicType GetValue(); - void SetValue( itmf::BasicType ); - -private: - MP4BasicTypeProperty(); - MP4BasicTypeProperty ( const MP4BasicTypeProperty &src ); - MP4BasicTypeProperty &operator= ( const MP4BasicTypeProperty &src ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_MP4PROPERTY_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4track.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4track.cpp deleted file mode 100644 index cfa1a1f4..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4track.cpp +++ /dev/null @@ -1,1910 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001 - 2004. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Alix Marchandise-Franquet alix@cisco.com - * Ximpo Group Ltd. mp4v2@ximpo.com - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -#define AMR_UNINITIALIZED -1 -#define AMR_TRUE 0 -#define AMR_FALSE 1 - -MP4Track::MP4Track(MP4File& file, MP4Atom& trakAtom) - : m_File(file) - , m_trakAtom(trakAtom) -{ - m_lastStsdIndex = 0; - m_lastSampleFile = NULL; - - m_cachedReadSampleId = MP4_INVALID_SAMPLE_ID; - m_pCachedReadSample = NULL; - m_cachedReadSampleSize = 0; - - m_writeSampleId = 1; - m_fixedSampleDuration = 0; - m_pChunkBuffer = NULL; - m_chunkBufferSize = 0; - m_sizeOfDataInChunkBuffer = 0; - m_chunkSamples = 0; - m_chunkDuration = 0; - - // m_bytesPerSample should be set to 1, except for the - // quicktime audio constant bit rate samples, which have non-1 values - m_bytesPerSample = 1; - m_samplesPerChunk = 0; - m_durationPerChunk = 0; - m_isAmr = AMR_UNINITIALIZED; - m_curMode = 0; - - m_cachedSttsSid = MP4_INVALID_SAMPLE_ID; - m_cachedCttsSid = MP4_INVALID_SAMPLE_ID; - - bool success = true; - - MP4Integer32Property* pTrackIdProperty; - success &= m_trakAtom.FindProperty( - "trak.tkhd.trackId", - (MP4Property**)&pTrackIdProperty); - if (success) { - m_trackId = pTrackIdProperty->GetValue(); - } - - success &= m_trakAtom.FindProperty( - "trak.mdia.mdhd.timeScale", - (MP4Property**)&m_pTimeScaleProperty); - if (success) { - // default chunking is 1 second of samples - m_durationPerChunk = m_pTimeScaleProperty->GetValue(); - } - - success &= m_trakAtom.FindProperty( - "trak.tkhd.duration", - (MP4Property**)&m_pTrackDurationProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.mdhd.duration", - (MP4Property**)&m_pMediaDurationProperty); - - success &= m_trakAtom.FindProperty( - "trak.tkhd.modificationTime", - (MP4Property**)&m_pTrackModificationProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.mdhd.modificationTime", - (MP4Property**)&m_pMediaModificationProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.hdlr.handlerType", - (MP4Property**)&m_pTypeProperty); - - // get handles on sample size information - - - m_pStszFixedSampleSizeProperty = NULL; - bool have_stsz = - m_trakAtom.FindProperty("trak.mdia.minf.stbl.stsz.sampleSize", - (MP4Property**)&m_pStszFixedSampleSizeProperty); - - if (have_stsz) { - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stsz.sampleCount", - (MP4Property**)&m_pStszSampleCountProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stsz.entries.entrySize", - (MP4Property**)&m_pStszSampleSizeProperty); - m_stsz_sample_bits = 32; - } else { - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stz2.sampleCount", - (MP4Property**)&m_pStszSampleCountProperty); - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stz2.entries.entrySize", - (MP4Property**)&m_pStszSampleSizeProperty); - MP4Integer8Property *stz2_field_size; - if (m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stz2.fieldSize", - (MP4Property **)&stz2_field_size)) { - m_stsz_sample_bits = stz2_field_size->GetValue(); - m_have_stz2_4bit_sample = false; - } else success = false; - } - - // get handles on information needed to map sample id's to file offsets - - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stsc.entryCount", - (MP4Property**)&m_pStscCountProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stsc.entries.firstChunk", - (MP4Property**)&m_pStscFirstChunkProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stsc.entries.samplesPerChunk", - (MP4Property**)&m_pStscSamplesPerChunkProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stsc.entries.sampleDescriptionIndex", - (MP4Property**)&m_pStscSampleDescrIndexProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stsc.entries.firstSample", - (MP4Property**)&m_pStscFirstSampleProperty); - - bool haveStco = m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stco.entryCount", - (MP4Property**)&m_pChunkCountProperty); - - if (haveStco) { - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stco.entries.chunkOffset", - (MP4Property**)&m_pChunkOffsetProperty); - } else { - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.co64.entryCount", - (MP4Property**)&m_pChunkCountProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.co64.entries.chunkOffset", - (MP4Property**)&m_pChunkOffsetProperty); - } - - // get handles on sample timing info - - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stts.entryCount", - (MP4Property**)&m_pSttsCountProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stts.entries.sampleCount", - (MP4Property**)&m_pSttsSampleCountProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stts.entries.sampleDelta", - (MP4Property**)&m_pSttsSampleDeltaProperty); - - // get handles on rendering offset info if it exists - - m_pCttsCountProperty = NULL; - m_pCttsSampleCountProperty = NULL; - m_pCttsSampleOffsetProperty = NULL; - - bool haveCtts = m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.ctts.entryCount", - (MP4Property**)&m_pCttsCountProperty); - - if (haveCtts) { - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.ctts.entries.sampleCount", - (MP4Property**)&m_pCttsSampleCountProperty); - - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.ctts.entries.sampleOffset", - (MP4Property**)&m_pCttsSampleOffsetProperty); - } - - // get handles on sync sample info if it exists - - m_pStssCountProperty = NULL; - m_pStssSampleProperty = NULL; - - bool haveStss = m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stss.entryCount", - (MP4Property**)&m_pStssCountProperty); - - if (haveStss) { - success &= m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stss.entries.sampleNumber", - (MP4Property**)&m_pStssSampleProperty); - } - - // edit list - (void)InitEditListProperties(); - - // was everything found? - if (!success) { - throw new Exception("invalid track", __FILE__, __LINE__, __FUNCTION__ ); - } - CalculateBytesPerSample(); - - // update sdtp log from sdtp atom - MP4SdtpAtom* sdtp = (MP4SdtpAtom*)m_trakAtom.FindAtom( "trak.mdia.minf.stbl.sdtp" ); - if( sdtp ) { - uint8_t* buffer; - uint32_t bufsize; - sdtp->data.GetValue( &buffer, &bufsize ); - m_sdtpLog.assign( (char*)buffer, bufsize ); - free( buffer ); - } -} - -MP4Track::~MP4Track() -{ - MP4Free(m_pCachedReadSample); - m_pCachedReadSample = NULL; - MP4Free(m_pChunkBuffer); - m_pChunkBuffer = NULL; -} - -const char* MP4Track::GetType() -{ - return m_pTypeProperty->GetValue(); -} - -void MP4Track::SetType(const char* type) -{ - m_pTypeProperty->SetValue(MP4NormalizeTrackType(type)); -} - -void MP4Track::ReadSample( - MP4SampleId sampleId, - uint8_t** ppBytes, - uint32_t* pNumBytes, - MP4Timestamp* pStartTime, - MP4Duration* pDuration, - MP4Duration* pRenderingOffset, - bool* pIsSyncSample, - bool* hasDependencyFlags, - uint32_t* dependencyFlags ) -{ - if( sampleId == MP4_INVALID_SAMPLE_ID ) - throw new Exception( "sample id can't be zero", __FILE__, __LINE__, __FUNCTION__ ); - - if( hasDependencyFlags ) - *hasDependencyFlags = !m_sdtpLog.empty(); - - if( dependencyFlags ) { - if( m_sdtpLog.empty() ) { - *dependencyFlags = 0; - } - else { - if( sampleId > m_sdtpLog.size() ) - throw new Exception( "sample id > sdtp logsize", __FILE__, __LINE__, __FUNCTION__ ); - *dependencyFlags = m_sdtpLog[sampleId-1]; // sampleId is 1-based - } - } - - // handle unusual case of wanting to read a sample - // that is still sitting in the write chunk buffer - if (m_pChunkBuffer && sampleId >= m_writeSampleId - m_chunkSamples) { - WriteChunkBuffer(); - } - - File* fin = GetSampleFile( sampleId ); - if( fin == (File*)-1 ) - throw new Exception( "sample is located in an inaccessible file", __FILE__, __LINE__, __FUNCTION__ ); - - uint64_t fileOffset = GetSampleFileOffset(sampleId); - - uint32_t sampleSize = GetSampleSize(sampleId); - if (*ppBytes != NULL && *pNumBytes < sampleSize) { - throw new Exception("sample buffer is too small", - __FILE__, __LINE__, __FUNCTION__ ); - } - *pNumBytes = sampleSize; - - log.verbose3f("\"%s\": ReadSample: track %u id %u offset 0x%" PRIx64 " size %u (0x%x)", - GetFile().GetFilename().c_str(), m_trackId, sampleId, fileOffset, *pNumBytes, *pNumBytes); - - bool bufferMalloc = false; - if (*ppBytes == NULL) { - *ppBytes = (uint8_t*)MP4Malloc(*pNumBytes); - bufferMalloc = true; - } - - uint64_t oldPos = m_File.GetPosition( fin ); // only used in mode == 'w' - try { - m_File.SetPosition( fileOffset, fin ); - m_File.ReadBytes( *ppBytes, *pNumBytes, fin ); - - if (pStartTime || pDuration) { - GetSampleTimes(sampleId, pStartTime, pDuration); - - log.verbose3f("\"%s\": ReadSample: start %" PRIu64 " duration %" PRId64, - GetFile().GetFilename().c_str(), (pStartTime ? *pStartTime : 0), - (pDuration ? *pDuration : 0)); - } - if (pRenderingOffset) { - *pRenderingOffset = GetSampleRenderingOffset(sampleId); - - log.verbose3f("\"%s\": ReadSample: renderingOffset %" PRId64, - GetFile().GetFilename().c_str(), *pRenderingOffset); - } - if (pIsSyncSample) { - *pIsSyncSample = IsSyncSample(sampleId); - - log.verbose3f("\"%s\": ReadSample: isSyncSample %u", - GetFile().GetFilename().c_str(), *pIsSyncSample); - } - } - - catch (Exception* x) { - if( bufferMalloc ) { - MP4Free( *ppBytes ); - *ppBytes = NULL; - } - - if( m_File.IsWriteMode() ) - m_File.SetPosition( oldPos, fin ); - - throw x; - } - - if( m_File.IsWriteMode() ) - m_File.SetPosition( oldPos, fin ); -} - -void MP4Track::ReadSampleFragment( - MP4SampleId sampleId, - uint32_t sampleOffset, - uint16_t sampleLength, - uint8_t* pDest) -{ - if (sampleId == MP4_INVALID_SAMPLE_ID) { - throw new Exception("invalid sample id", - __FILE__, __LINE__, __FUNCTION__ ); - } - - if (sampleId != m_cachedReadSampleId) { - MP4Free(m_pCachedReadSample); - m_pCachedReadSample = NULL; - m_cachedReadSampleSize = 0; - m_cachedReadSampleId = MP4_INVALID_SAMPLE_ID; - - ReadSample( - sampleId, - &m_pCachedReadSample, - &m_cachedReadSampleSize); - - m_cachedReadSampleId = sampleId; - } - - if (sampleOffset + sampleLength > m_cachedReadSampleSize) { - throw new Exception("offset and/or length are too large", - __FILE__, __LINE__, __FUNCTION__ ); - } - - memcpy(pDest, &m_pCachedReadSample[sampleOffset], sampleLength); -} - -void MP4Track::WriteSample( - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration, - MP4Duration renderingOffset, - bool isSyncSample ) -{ - uint8_t curMode = 0; - - log.verbose3f("\"%s\": WriteSample: track %u id %u size %u (0x%x) ", - GetFile().GetFilename().c_str(), - m_trackId, m_writeSampleId, numBytes, numBytes); - - if (pBytes == NULL && numBytes > 0) { - throw new Exception("no sample data", __FILE__, __LINE__, __FUNCTION__ ); - } - - if (m_isAmr == AMR_UNINITIALIZED ) { - // figure out if this is an AMR audio track - if (m_trakAtom.FindAtom("trak.mdia.minf.stbl.stsd.samr") || - m_trakAtom.FindAtom("trak.mdia.minf.stbl.stsd.sawb")) { - m_isAmr = AMR_TRUE; - m_curMode = (pBytes[0] >> 3) & 0x000F; - } else { - m_isAmr = AMR_FALSE; - } - } - - if (m_isAmr == AMR_TRUE) { - curMode = (pBytes[0] >> 3) &0x000F; // The mode is in the first byte - } - - if (duration == MP4_INVALID_DURATION) { - duration = GetFixedSampleDuration(); - } - - log.verbose3f("\"%s\": duration %" PRIu64, GetFile().GetFilename().c_str(), - duration); - - if ((m_isAmr == AMR_TRUE) && - (m_curMode != curMode)) { - WriteChunkBuffer(); - m_curMode = curMode; - } - - // append sample bytes to chunk buffer - if( m_sizeOfDataInChunkBuffer + numBytes > m_chunkBufferSize ) { - m_pChunkBuffer = (uint8_t*)MP4Realloc(m_pChunkBuffer, m_chunkBufferSize + numBytes); - if (m_pChunkBuffer == NULL) - return; - - m_chunkBufferSize += numBytes; - } - - memcpy(&m_pChunkBuffer[m_sizeOfDataInChunkBuffer], pBytes, numBytes); - m_sizeOfDataInChunkBuffer += numBytes; - m_chunkSamples++; - m_chunkDuration += duration; - - UpdateSampleSizes(m_writeSampleId, numBytes); - - UpdateSampleTimes(duration); - - UpdateRenderingOffsets(m_writeSampleId, renderingOffset); - - UpdateSyncSamples(m_writeSampleId, isSyncSample); - - if (IsChunkFull(m_writeSampleId)) { - WriteChunkBuffer(); - m_curMode = curMode; - } - - UpdateDurations(duration); - - UpdateModificationTimes(); - - m_writeSampleId++; -} - -void MP4Track::WriteSampleDependency( - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration, - MP4Duration renderingOffset, - bool isSyncSample, - uint32_t dependencyFlags ) -{ - m_sdtpLog.push_back( dependencyFlags ); // record dependency flags for processing at finish - WriteSample( pBytes, numBytes, duration, renderingOffset, isSyncSample ); -} - -void MP4Track::WriteChunkBuffer() -{ - if (m_sizeOfDataInChunkBuffer == 0) { - return; - } - - uint64_t chunkOffset = m_File.GetPosition(); - - // write chunk buffer - m_File.WriteBytes(m_pChunkBuffer, m_sizeOfDataInChunkBuffer); - - log.verbose3f("\"%s\": WriteChunk: track %u offset 0x%" PRIx64 " size %u (0x%x) numSamples %u", - GetFile().GetFilename().c_str(), - m_trackId, chunkOffset, m_sizeOfDataInChunkBuffer, - m_sizeOfDataInChunkBuffer, m_chunkSamples); - - UpdateSampleToChunk(m_writeSampleId, - m_pChunkCountProperty->GetValue() + 1, - m_chunkSamples); - - UpdateChunkOffsets(chunkOffset); - - // note: we do not free our chunk buffer; we reuse it, expanding as needed. - // It gets zapped when this class goes out of scope - m_sizeOfDataInChunkBuffer = 0; - m_chunkSamples = 0; - m_chunkDuration = 0; -} - -void MP4Track::FinishWrite(uint32_t options) -{ - FinishSdtp(); - - // write out any remaining samples in chunk buffer - WriteChunkBuffer(); - - if (m_pStszFixedSampleSizeProperty == NULL && - m_stsz_sample_bits == 4) { - if (m_have_stz2_4bit_sample) { - ((MP4Integer8Property *)m_pStszSampleSizeProperty)->AddValue(m_stz2_4bit_sample_value); - m_pStszSampleSizeProperty->IncrementValue(); - } - } - - // record buffer size and bitrates - MP4BitfieldProperty* pBufferSizeProperty; - - if (m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stsd.*.esds.decConfigDescr.bufferSizeDB", - (MP4Property**)&pBufferSizeProperty)) { - pBufferSizeProperty->SetValue(GetMaxSampleSize()); - } - - // don't overwrite bitrate if it was requested in the Close call - if( !(options & MP4_CLOSE_DO_NOT_COMPUTE_BITRATE)) { - MP4Integer32Property* pBitrateProperty; - - if (m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stsd.*.esds.decConfigDescr.maxBitrate", - (MP4Property**)&pBitrateProperty)) { - pBitrateProperty->SetValue(GetMaxBitrate()); - } - - if (m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stsd.*.esds.decConfigDescr.avgBitrate", - (MP4Property**)&pBitrateProperty)) { - pBitrateProperty->SetValue(GetAvgBitrate()); - } - } - - // cleaup trak.udta - MP4BytesProperty* nameProperty = NULL; - m_trakAtom.FindProperty("trak.udta.name.value", (MP4Property**) &nameProperty); - if( nameProperty != NULL && nameProperty->GetValueSize() == 0 ){ - // Zero length name value--delete name, and then udta if no child atoms - MP4Atom* name = m_trakAtom.FindChildAtom("udta.name"); - if( name ) { - MP4Atom* udta = name->GetParentAtom(); - udta->DeleteChildAtom( name ); - delete name; - - if( udta->GetNumberOfChildAtoms() == 0 ) { - udta->GetParentAtom()->DeleteChildAtom( udta ); - delete udta; - } - } - } -} - -// Process sdtp log and add sdtp atom. -// -// Testing (subjective) showed a marked improvement with QuickTime -// player on Mac OS X when scrubbing. Best results were obtained -// from encodings using low number of bframes. It's expected sdtp may help -// other QT-based players. -// -void MP4Track::FinishSdtp() -{ - // bail if log is empty -- indicates dependency information was not written - if( m_sdtpLog.empty() ) - return; - - MP4SdtpAtom* sdtp = (MP4SdtpAtom*)m_trakAtom.FindAtom( "trak.mdia.minf.stbl.sdtp" ); - if( !sdtp ) - sdtp = (MP4SdtpAtom*)AddAtom( "trak.mdia.minf.stbl", "sdtp" ); - sdtp->data.SetValue( (const uint8_t*)m_sdtpLog.data(), (uint32_t)m_sdtpLog.size() ); - - // add avc1 compatibility indicator if not present - MP4FtypAtom* ftyp = (MP4FtypAtom*)m_File.FindAtom( "ftyp" ); - if( ftyp ) { - bool found = false; - const uint32_t max = ftyp->compatibleBrands.GetCount(); - for( uint32_t i = 0; i < max; i++ ) { - if( !strcmp( ftyp->compatibleBrands.GetValue( i ), "avc1" )) { - found = true; - break; - } - } - - if( !found ) - ftyp->compatibleBrands.AddValue( "avc1" ); - } -} - -bool MP4Track::IsChunkFull(MP4SampleId sampleId) -{ - if (m_samplesPerChunk) { - return m_chunkSamples >= m_samplesPerChunk; - } - - ASSERT(m_durationPerChunk); - return m_chunkDuration >= m_durationPerChunk; -} - -uint32_t MP4Track::GetNumberOfSamples() -{ - return m_pStszSampleCountProperty->GetValue(); -} - -uint32_t MP4Track::GetSampleSize(MP4SampleId sampleId) -{ - if (m_pStszFixedSampleSizeProperty != NULL) { - uint32_t fixedSampleSize = - m_pStszFixedSampleSizeProperty->GetValue(); - - if (fixedSampleSize != 0) { - return fixedSampleSize * m_bytesPerSample; - } - } - // will have to check for 4 bit sample size here - if (m_stsz_sample_bits == 4) { - uint8_t value = m_pStszSampleSizeProperty->GetValue((sampleId - 1) / 2); - if ((sampleId - 1) / 2 == 0) { - value >>= 4; - } else value &= 0xf; - return m_bytesPerSample * value; - } - return m_bytesPerSample * - m_pStszSampleSizeProperty->GetValue(sampleId - 1); -} - -uint32_t MP4Track::GetMaxSampleSize() -{ - if (m_pStszFixedSampleSizeProperty != NULL) { - uint32_t fixedSampleSize = - m_pStszFixedSampleSizeProperty->GetValue(); - - if (fixedSampleSize != 0) { - return fixedSampleSize * m_bytesPerSample; - } - } - - uint32_t maxSampleSize = 0; - uint32_t numSamples = m_pStszSampleSizeProperty->GetCount(); - for (MP4SampleId sid = 1; sid <= numSamples; sid++) { - uint32_t sampleSize = - m_pStszSampleSizeProperty->GetValue(sid - 1); - if (sampleSize > maxSampleSize) { - maxSampleSize = sampleSize; - } - } - return maxSampleSize * m_bytesPerSample; -} - -uint64_t MP4Track::GetTotalOfSampleSizes() -{ - uint64_t retval; - if (m_pStszFixedSampleSizeProperty != NULL) { - uint32_t fixedSampleSize = - m_pStszFixedSampleSizeProperty->GetValue(); - - // if fixed sample size, just need to multiply by number of samples - if (fixedSampleSize != 0) { - retval = m_bytesPerSample; - retval *= fixedSampleSize; - retval *= GetNumberOfSamples(); - return retval; - } - } - - // else non-fixed sample size, sum them - uint64_t totalSampleSizes = 0; - uint32_t numSamples = m_pStszSampleSizeProperty->GetCount(); - for (MP4SampleId sid = 1; sid <= numSamples; sid++) { - uint32_t sampleSize = - m_pStszSampleSizeProperty->GetValue(sid - 1); - totalSampleSizes += sampleSize; - } - return totalSampleSizes * m_bytesPerSample; -} - -void MP4Track::SampleSizePropertyAddValue (uint32_t size) -{ - // this has to deal with different sample size values - switch (m_pStszSampleSizeProperty->GetType()) { - case Integer32Property: - ((MP4Integer32Property *)m_pStszSampleSizeProperty)->AddValue(size); - break; - case Integer16Property: - ((MP4Integer16Property *)m_pStszSampleSizeProperty)->AddValue(size); - break; - case Integer8Property: - if (m_stsz_sample_bits == 4) { - if (m_have_stz2_4bit_sample == false) { - m_have_stz2_4bit_sample = true; - m_stz2_4bit_sample_value = size << 4; - return; - } else { - m_have_stz2_4bit_sample = false; - size &= 0xf; - size |= m_stz2_4bit_sample_value; - } - } - ((MP4Integer8Property *)m_pStszSampleSizeProperty)->AddValue(size); - break; - default: - break; - } - - - // m_pStszSampleSizeProperty->IncrementValue(); -} - -void MP4Track::UpdateSampleSizes(MP4SampleId sampleId, uint32_t numBytes) -{ - if (m_bytesPerSample > 1) { - if ((numBytes % m_bytesPerSample) != 0) { - // error - log.errorf("%s: \"%s\": numBytes %u not divisible by bytesPerSample %u sampleId %u", - __FUNCTION__, GetFile().GetFilename().c_str(), - numBytes, m_bytesPerSample, sampleId); - } - numBytes /= m_bytesPerSample; - } - // for first sample - // wmay - if we are adding, we want to make sure that - // we don't inadvertently set up the fixed size again. - // so, we check the number of samples - if (sampleId == 1 && GetNumberOfSamples() == 0) { - if (m_pStszFixedSampleSizeProperty == NULL || - numBytes == 0) { - // special case of first sample is zero bytes in length - // leave m_pStszFixedSampleSizeProperty at 0 - // start recording variable sample sizes - if (m_pStszFixedSampleSizeProperty != NULL) - m_pStszFixedSampleSizeProperty->SetValue(0); - SampleSizePropertyAddValue(0); - } else { - // presume sample size is fixed - m_pStszFixedSampleSizeProperty->SetValue(numBytes); - } - } else { // sampleId > 1 - - uint32_t fixedSampleSize = 0; - if (m_pStszFixedSampleSizeProperty != NULL) { - fixedSampleSize = m_pStszFixedSampleSizeProperty->GetValue(); - } - - // if we don't have a fixed size, or the current sample size - // doesn't match our sample size, we need to write the current - // sample size into the table - if (fixedSampleSize == 0 || numBytes != fixedSampleSize) { - if (fixedSampleSize != 0) { - // fixed size was set; we need to clear fixed sample size - m_pStszFixedSampleSizeProperty->SetValue(0); - - // and create sizes for all previous samples - // use GetNumberOfSamples due to needing the total number - // not just the appended part of the file - uint32_t samples = GetNumberOfSamples(); - for (MP4SampleId sid = 1; sid <= samples; sid++) { - SampleSizePropertyAddValue(fixedSampleSize); - } - } - // add size value for this sample - SampleSizePropertyAddValue(numBytes); - } - } - // either way, we increment the number of samples. - m_pStszSampleCountProperty->IncrementValue(); -} - -uint32_t MP4Track::GetAvgBitrate() -{ - if (GetDuration() == 0) { - return 0; - } - - double calc = double(GetTotalOfSampleSizes()); - // this is a bit better - we use the whole duration - calc *= 8.0; - calc *= GetTimeScale(); - calc /= double(GetDuration()); - // we might want to think about rounding to the next 100 or 1000 - return (uint32_t) ceil(calc); -} - -uint32_t MP4Track::GetMaxBitrate() -{ - uint32_t timeScale = GetTimeScale(); - MP4SampleId numSamples = GetNumberOfSamples(); - uint32_t maxBytesPerSec = 0; - uint32_t bytesThisSec = 0; - MP4Timestamp thisSecStart = 0; - MP4Timestamp lastSampleTime = 0; - uint32_t lastSampleSize = 0; - - MP4SampleId thisSecStartSid = 1; - for (MP4SampleId sid = 1; sid <= numSamples; sid++) { - uint32_t sampleSize; - MP4Timestamp sampleTime; - - sampleSize = GetSampleSize(sid); - GetSampleTimes(sid, &sampleTime, NULL); - - if (sampleTime < thisSecStart + timeScale) { - bytesThisSec += sampleSize; - lastSampleSize = sampleSize; - lastSampleTime = sampleTime; - } else { - // we've already written the last sample and sampleSize. - // this means that we've probably overflowed the last second - // calculate the time we've overflowed - MP4Duration overflow_dur = - (thisSecStart + timeScale) - lastSampleTime; - // calculate the duration of the last sample - MP4Duration lastSampleDur = sampleTime - lastSampleTime; - // now, calculate the number of bytes we overflowed. Round up. - if( lastSampleDur > 0 ) { - uint32_t overflow_bytes = 0; - overflow_bytes = ((lastSampleSize * overflow_dur) + (lastSampleDur - 1)) / lastSampleDur; - - if (bytesThisSec - overflow_bytes > maxBytesPerSec) { - maxBytesPerSec = bytesThisSec - overflow_bytes; - } - } - - // now adjust the values for this sample. Remove the bytes - // from the first sample in this time frame - lastSampleTime = sampleTime; - lastSampleSize = sampleSize; - bytesThisSec += sampleSize; - bytesThisSec -= GetSampleSize(thisSecStartSid); - thisSecStartSid++; - GetSampleTimes(thisSecStartSid, &thisSecStart, NULL); - } - } - - return maxBytesPerSec * 8; -} - -uint32_t MP4Track::GetSampleStscIndex(MP4SampleId sampleId) -{ - uint32_t stscIndex; - uint32_t numStscs = m_pStscCountProperty->GetValue(); - - if (numStscs == 0) { - throw new Exception("No data chunks exist", __FILE__, __LINE__, __FUNCTION__ ); - } - - for (stscIndex = 0; stscIndex < numStscs; stscIndex++) { - if (sampleId < m_pStscFirstSampleProperty->GetValue(stscIndex)) { - ASSERT(stscIndex != 0); - stscIndex -= 1; - break; - } - } - if (stscIndex == numStscs) { - ASSERT(stscIndex != 0); - stscIndex -= 1; - } - - return stscIndex; -} - -File* MP4Track::GetSampleFile( MP4SampleId sampleId ) -{ - uint32_t stscIndex = GetSampleStscIndex( sampleId ); - uint32_t stsdIndex = m_pStscSampleDescrIndexProperty->GetValue( stscIndex ); - - // check if the answer will be the same as last time - if( m_lastStsdIndex && stsdIndex == m_lastStsdIndex ) - return m_lastSampleFile; - - MP4Atom* pStsdAtom = m_trakAtom.FindAtom( "trak.mdia.minf.stbl.stsd" ); - ASSERT( pStsdAtom ); - - MP4Atom* pStsdEntryAtom = pStsdAtom->GetChildAtom( stsdIndex - 1 ); - ASSERT( pStsdEntryAtom ); - - MP4Integer16Property* pDrefIndexProperty = NULL; - if( !pStsdEntryAtom->FindProperty( "*.dataReferenceIndex", (MP4Property**)&pDrefIndexProperty ) || - pDrefIndexProperty == NULL ) - { - throw new Exception( "invalid stsd entry", __FILE__, __LINE__, __FUNCTION__ ); - } - - uint32_t drefIndex = pDrefIndexProperty->GetValue(); - - MP4Atom* pDrefAtom = m_trakAtom.FindAtom( "trak.mdia.minf.dinf.dref" ); - ASSERT(pDrefAtom); - - MP4Atom* pUrlAtom = pDrefAtom->GetChildAtom( drefIndex - 1 ); - ASSERT( pUrlAtom ); - - File* file; - - // make sure this is actually a url atom (somtimes it's "cios", like in iTunes videos) - if( strcmp(pUrlAtom->GetType(), "url ") || - pUrlAtom->GetFlags() & 1 ) { - file = NULL; // self-contained - } - else { - MP4StringProperty* pLocationProperty = NULL; - ASSERT( pUrlAtom->FindProperty( "*.location", (MP4Property**)&pLocationProperty) ); - ASSERT( pLocationProperty ); - - const char* url = pLocationProperty->GetValue(); - - log.verbose3f("\"%s\": dref url = %s", GetFile().GetFilename().c_str(), - url); - - file = (File*)-1; - - // attempt to open url if it's a file url - // currently this is the only thing we understand - if( !strncmp( url, "file:", 5 )) { - const char* fileName = url + 5; - - if( !strncmp(fileName, "//", 2 )) - fileName = strchr( fileName + 2, '/' ); - - if( fileName ) { - file = new File( fileName, File::MODE_READ ); - if( !file->open() ) { - delete file; - file = (File*)-1; - } - } - } - } - - if( m_lastSampleFile ) - m_lastSampleFile->close(); - - // cache the answer - m_lastStsdIndex = stsdIndex; - m_lastSampleFile = file; - - return file; -} - -uint64_t MP4Track::GetSampleFileOffset(MP4SampleId sampleId) -{ - uint32_t stscIndex = - GetSampleStscIndex(sampleId); - - // firstChunk is the chunk index of the first chunk with - // samplesPerChunk samples in the chunk. There may be multiples - - // ie: several chunks with the same number of samples per chunk. - uint32_t firstChunk = - m_pStscFirstChunkProperty->GetValue(stscIndex); - - MP4SampleId firstSample = - m_pStscFirstSampleProperty->GetValue(stscIndex); - - uint32_t samplesPerChunk = - m_pStscSamplesPerChunkProperty->GetValue(stscIndex); - - // chunkId tells which is the absolute chunk number that this sample - // is stored in. - MP4ChunkId chunkId = firstChunk + - ((sampleId - firstSample) / samplesPerChunk); - - // chunkOffset is the file offset (absolute) for the start of the chunk - uint64_t chunkOffset = m_pChunkOffsetProperty->GetValue(chunkId - 1); - - MP4SampleId firstSampleInChunk = - sampleId - ((sampleId - firstSample) % samplesPerChunk); - - // need cumulative samples sizes from firstSample to sampleId - 1 - uint32_t sampleOffset = 0; - for (MP4SampleId i = firstSampleInChunk; i < sampleId; i++) { - sampleOffset += GetSampleSize(i); - } - - return chunkOffset + sampleOffset; -} - -void MP4Track::UpdateSampleToChunk(MP4SampleId sampleId, - MP4ChunkId chunkId, uint32_t samplesPerChunk) -{ - uint32_t numStsc = m_pStscCountProperty->GetValue(); - - // if samplesPerChunk == samplesPerChunk of last entry - if (numStsc && samplesPerChunk == - m_pStscSamplesPerChunkProperty->GetValue(numStsc-1)) { - - // nothing to do - - } else { - // add stsc entry - m_pStscFirstChunkProperty->AddValue(chunkId); - m_pStscSamplesPerChunkProperty->AddValue(samplesPerChunk); - m_pStscSampleDescrIndexProperty->AddValue(1); - m_pStscFirstSampleProperty->AddValue(sampleId - samplesPerChunk + 1); - - m_pStscCountProperty->IncrementValue(); - } -} - -void MP4Track::UpdateChunkOffsets(uint64_t chunkOffset) -{ - if (m_pChunkOffsetProperty->GetType() == Integer32Property) { - ((MP4Integer32Property*)m_pChunkOffsetProperty)->AddValue(chunkOffset); - } else { - ((MP4Integer64Property*)m_pChunkOffsetProperty)->AddValue(chunkOffset); - } - m_pChunkCountProperty->IncrementValue(); -} - -MP4Duration MP4Track::GetFixedSampleDuration() -{ - uint32_t numStts = m_pSttsCountProperty->GetValue(); - - if (numStts == 0) { - return m_fixedSampleDuration; - } - if (numStts != 1) { - return MP4_INVALID_DURATION; // sample duration is not fixed - } - return m_pSttsSampleDeltaProperty->GetValue(0); -} - -void MP4Track::SetFixedSampleDuration(MP4Duration duration) -{ - uint32_t numStts = m_pSttsCountProperty->GetValue(); - - // setting this is only allowed before samples have been written - if (numStts != 0) { - return; - } - m_fixedSampleDuration = duration; - return; -} - -void MP4Track::GetSampleTimes(MP4SampleId sampleId, - MP4Timestamp* pStartTime, MP4Duration* pDuration) -{ - uint32_t numStts = m_pSttsCountProperty->GetValue(); - MP4SampleId sid; - MP4Duration elapsed; - - - if (m_cachedSttsSid != MP4_INVALID_SAMPLE_ID && sampleId >= m_cachedSttsSid) { - sid = m_cachedSttsSid; - elapsed = m_cachedSttsElapsed; - } else { - m_cachedSttsIndex = 0; - sid = 1; - elapsed = 0; - } - - for (uint32_t sttsIndex = m_cachedSttsIndex; sttsIndex < numStts; sttsIndex++) { - uint32_t sampleCount = - m_pSttsSampleCountProperty->GetValue(sttsIndex); - uint32_t sampleDelta = - m_pSttsSampleDeltaProperty->GetValue(sttsIndex); - - if (sampleId <= sid + sampleCount - 1) { - if (pStartTime) { - *pStartTime = (sampleId - sid); - *pStartTime *= sampleDelta; - *pStartTime += elapsed; - } - if (pDuration) { - *pDuration = sampleDelta; - } - - m_cachedSttsIndex = sttsIndex; - m_cachedSttsSid = sid; - m_cachedSttsElapsed = elapsed; - - return; - } - sid += sampleCount; - elapsed += sampleCount * sampleDelta; - } - - throw new Exception("sample id out of range", - __FILE__, __LINE__, __FUNCTION__ ); -} - -MP4SampleId MP4Track::GetSampleIdFromTime( - MP4Timestamp when, - bool wantSyncSample) -{ - uint32_t numStts = m_pSttsCountProperty->GetValue(); - MP4SampleId sid = 1; - MP4Duration elapsed = 0; - - for (uint32_t sttsIndex = 0; sttsIndex < numStts; sttsIndex++) { - uint32_t sampleCount = - m_pSttsSampleCountProperty->GetValue(sttsIndex); - uint32_t sampleDelta = - m_pSttsSampleDeltaProperty->GetValue(sttsIndex); - - if (sampleDelta == 0 && sttsIndex < numStts - 1) { - log.warningf("%s: \"%s\": Zero sample duration, stts entry %u", - __FUNCTION__, GetFile().GetFilename().c_str(), sttsIndex); - } - - MP4Duration d = when - elapsed; - - if (d <= sampleCount * sampleDelta) { - MP4SampleId sampleId = sid; - if (sampleDelta) { - sampleId += (d / sampleDelta); - } - - if (wantSyncSample) { - return GetNextSyncSample(sampleId); - } - return sampleId; - } - - sid += sampleCount; - elapsed += sampleCount * sampleDelta; - } - - throw new Exception("time out of range", - __FILE__, __LINE__, __FUNCTION__); - - return 0; // satisfy MS compiler -} - -void MP4Track::UpdateSampleTimes(MP4Duration duration) -{ - uint32_t numStts = m_pSttsCountProperty->GetValue(); - - // if duration == duration of last entry - if (numStts - && duration == m_pSttsSampleDeltaProperty->GetValue(numStts-1)) { - // increment last entry sampleCount - m_pSttsSampleCountProperty->IncrementValue(1, numStts-1); - - } else { - // add stts entry, sampleCount = 1, sampleDuration = duration - m_pSttsSampleCountProperty->AddValue(1); - m_pSttsSampleDeltaProperty->AddValue(duration); - m_pSttsCountProperty->IncrementValue();; - } -} - -uint32_t MP4Track::GetSampleCttsIndex(MP4SampleId sampleId, - MP4SampleId* pFirstSampleId) -{ - uint32_t numCtts = m_pCttsCountProperty->GetValue(); - MP4SampleId sid; - - if (m_cachedCttsSid != MP4_INVALID_SAMPLE_ID && sampleId >= m_cachedCttsSid) { - sid = m_cachedCttsSid; - } else { - m_cachedCttsIndex = 0; - sid = 1; - } - - for (uint32_t cttsIndex = m_cachedCttsIndex; cttsIndex < numCtts; cttsIndex++) { - uint32_t sampleCount = - m_pCttsSampleCountProperty->GetValue(cttsIndex); - - if (sampleId <= sid + sampleCount - 1) { - if (pFirstSampleId) { - *pFirstSampleId = sid; - } - - m_cachedCttsIndex = cttsIndex; - m_cachedCttsSid = sid; - - return cttsIndex; - } - sid += sampleCount; - } - - throw new Exception("sample id out of range", - __FILE__, __LINE__, __FUNCTION__ ); - return 0; // satisfy MS compiler -} - -MP4Duration MP4Track::GetSampleRenderingOffset(MP4SampleId sampleId) -{ - if (m_pCttsCountProperty == NULL) { - return 0; - } - if (m_pCttsCountProperty->GetValue() == 0) { - return 0; - } - - uint32_t cttsIndex = GetSampleCttsIndex(sampleId); - - return m_pCttsSampleOffsetProperty->GetValue(cttsIndex); -} - -void MP4Track::UpdateRenderingOffsets(MP4SampleId sampleId, - MP4Duration renderingOffset) -{ - // if ctts atom doesn't exist - if (m_pCttsCountProperty == NULL) { - - // no rendering offset, so nothing to do - if (renderingOffset == 0) { - return; - } - - // else create a ctts atom - MP4Atom* pCttsAtom = AddAtom("trak.mdia.minf.stbl", "ctts"); - - // and get handles on the properties - ASSERT(pCttsAtom->FindProperty( - "ctts.entryCount", - (MP4Property**)&m_pCttsCountProperty)); - - ASSERT(pCttsAtom->FindProperty( - "ctts.entries.sampleCount", - (MP4Property**)&m_pCttsSampleCountProperty)); - - ASSERT(pCttsAtom->FindProperty( - "ctts.entries.sampleOffset", - (MP4Property**)&m_pCttsSampleOffsetProperty)); - - // if this is not the first sample - if (sampleId > 1) { - // add a ctts entry for all previous samples - // with rendering offset equal to zero - m_pCttsSampleCountProperty->AddValue(sampleId - 1); - m_pCttsSampleOffsetProperty->AddValue(0); - m_pCttsCountProperty->IncrementValue();; - } - } - - // ctts atom exists (now) - - uint32_t numCtts = m_pCttsCountProperty->GetValue(); - - // if renderingOffset == renderingOffset of last entry - if (numCtts && renderingOffset - == m_pCttsSampleOffsetProperty->GetValue(numCtts-1)) { - - // increment last entry sampleCount - m_pCttsSampleCountProperty->IncrementValue(1, numCtts-1); - - } else { - // add ctts entry, sampleCount = 1, sampleOffset = renderingOffset - m_pCttsSampleCountProperty->AddValue(1); - m_pCttsSampleOffsetProperty->AddValue(renderingOffset); - m_pCttsCountProperty->IncrementValue(); - } -} - -void MP4Track::SetSampleRenderingOffset(MP4SampleId sampleId, - MP4Duration renderingOffset) -{ - // check if any ctts entries exist - if (m_pCttsCountProperty == NULL - || m_pCttsCountProperty->GetValue() == 0) { - // if not then Update routine can be used - // to create a ctts entry for samples before this one - // and a ctts entry for this sample - UpdateRenderingOffsets(sampleId, renderingOffset); - - // but we also need a ctts entry - // for all samples after this one - uint32_t afterSamples = GetNumberOfSamples() - sampleId; - - if (afterSamples) { - m_pCttsSampleCountProperty->AddValue(afterSamples); - m_pCttsSampleOffsetProperty->AddValue(0); - m_pCttsCountProperty->IncrementValue();; - } - - return; - } - - MP4SampleId firstSampleId; - uint32_t cttsIndex = GetSampleCttsIndex(sampleId, &firstSampleId); - - // do nothing in the degenerate case - if (renderingOffset == - m_pCttsSampleOffsetProperty->GetValue(cttsIndex)) { - return; - } - - uint32_t sampleCount = - m_pCttsSampleCountProperty->GetValue(cttsIndex); - - // if this sample has it's own ctts entry - if (sampleCount == 1) { - // then just set the value, - // note we don't attempt to collapse entries - m_pCttsSampleOffsetProperty->SetValue(renderingOffset, cttsIndex); - return; - } - - MP4SampleId lastSampleId = firstSampleId + sampleCount - 1; - - // else we share this entry with other samples - // we need to insert our own entry - if (sampleId == firstSampleId) { - // our sample is the first one - m_pCttsSampleCountProperty-> - InsertValue(1, cttsIndex); - m_pCttsSampleOffsetProperty-> - InsertValue(renderingOffset, cttsIndex); - - m_pCttsSampleCountProperty-> - SetValue(sampleCount - 1, cttsIndex + 1); - - m_pCttsCountProperty->IncrementValue(); - - } else if (sampleId == lastSampleId) { - // our sample is the last one - m_pCttsSampleCountProperty-> - InsertValue(1, cttsIndex + 1); - m_pCttsSampleOffsetProperty-> - InsertValue(renderingOffset, cttsIndex + 1); - - m_pCttsSampleCountProperty-> - SetValue(sampleCount - 1, cttsIndex); - - m_pCttsCountProperty->IncrementValue(); - - } else { - // our sample is in the middle, UGH! - - // insert our new entry - m_pCttsSampleCountProperty-> - InsertValue(1, cttsIndex + 1); - m_pCttsSampleOffsetProperty-> - InsertValue(renderingOffset, cttsIndex + 1); - - // adjust count of previous entry - m_pCttsSampleCountProperty-> - SetValue(sampleId - firstSampleId, cttsIndex); - - // insert new entry for those samples beyond our sample - m_pCttsSampleCountProperty-> - InsertValue(lastSampleId - sampleId, cttsIndex + 2); - uint32_t oldRenderingOffset = - m_pCttsSampleOffsetProperty->GetValue(cttsIndex); - m_pCttsSampleOffsetProperty-> - InsertValue(oldRenderingOffset, cttsIndex + 2); - - m_pCttsCountProperty->IncrementValue(2); - } -} - -bool MP4Track::IsSyncSample(MP4SampleId sampleId) -{ - if (m_pStssCountProperty == NULL) { - return true; - } - - uint32_t numStss = m_pStssCountProperty->GetValue(); - uint32_t stssLIndex = 0; - uint32_t stssRIndex = numStss - 1; - - while (stssRIndex >= stssLIndex) { - uint32_t stssIndex = (stssRIndex + stssLIndex) >> 1; - MP4SampleId syncSampleId = - m_pStssSampleProperty->GetValue(stssIndex); - - if (sampleId == syncSampleId) { - return true; - } - - if (sampleId > syncSampleId) { - stssLIndex = stssIndex + 1; - } else { - stssRIndex = stssIndex - 1; - } - } - - return false; -} - -// N.B. "next" is inclusive of this sample id -MP4SampleId MP4Track::GetNextSyncSample(MP4SampleId sampleId) -{ - if (m_pStssCountProperty == NULL) { - return sampleId; - } - - uint32_t numStss = m_pStssCountProperty->GetValue(); - - for (uint32_t stssIndex = 0; stssIndex < numStss; stssIndex++) { - MP4SampleId syncSampleId = - m_pStssSampleProperty->GetValue(stssIndex); - - if (sampleId > syncSampleId) { - continue; - } - return syncSampleId; - } - - // LATER check stsh for alternate sample - - return MP4_INVALID_SAMPLE_ID; -} - -void MP4Track::UpdateSyncSamples(MP4SampleId sampleId, bool isSyncSample) -{ - if (isSyncSample) { - // if stss atom exists, add entry - if (m_pStssCountProperty) { - m_pStssSampleProperty->AddValue(sampleId); - m_pStssCountProperty->IncrementValue(); - } // else nothing to do (yet) - - } else { // !isSyncSample - // if stss atom doesn't exist, create one - if (m_pStssCountProperty == NULL) { - - MP4Atom* pStssAtom = AddAtom("trak.mdia.minf.stbl", "stss"); - - ASSERT(pStssAtom->FindProperty( - "stss.entryCount", - (MP4Property**)&m_pStssCountProperty)); - - ASSERT(pStssAtom->FindProperty( - "stss.entries.sampleNumber", - (MP4Property**)&m_pStssSampleProperty)); - - // set values for all samples that came before this one - uint32_t samples = GetNumberOfSamples(); - for (MP4SampleId sid = 1; sid < samples; sid++) { - m_pStssSampleProperty->AddValue(sid); - m_pStssCountProperty->IncrementValue(); - } - } // else nothing to do - } -} - -MP4Atom* MP4Track::AddAtom(const char* parentName, const char* childName) -{ - MP4Atom* pParentAtom = m_trakAtom.FindAtom(parentName); - ASSERT(pParentAtom); - - MP4Atom* pChildAtom = MP4Atom::CreateAtom(m_File, pParentAtom, childName); - - pParentAtom->AddChildAtom(pChildAtom); - - pChildAtom->Generate(); - - return pChildAtom; -} - -uint64_t MP4Track::GetDuration() -{ - return m_pMediaDurationProperty->GetValue(); -} - -uint32_t MP4Track::GetTimeScale() -{ - return m_pTimeScaleProperty->GetValue(); -} - -void MP4Track::UpdateDurations(MP4Duration duration) -{ - // update media, track, and movie durations - m_pMediaDurationProperty->SetValue( - m_pMediaDurationProperty->GetValue() + duration); - - MP4Duration movieDuration = ToMovieDuration( - m_pMediaDurationProperty->GetValue()); - m_pTrackDurationProperty->SetValue(movieDuration); - - m_File.UpdateDuration(m_pTrackDurationProperty->GetValue()); -} - -MP4Duration MP4Track::ToMovieDuration(MP4Duration trackDuration) -{ - return (trackDuration * m_File.GetTimeScale()) - / m_pTimeScaleProperty->GetValue(); -} - -void MP4Track::UpdateModificationTimes() -{ - // update media and track modification times - MP4Timestamp now = MP4GetAbsTimestamp(); - m_pMediaModificationProperty->SetValue(now); - m_pTrackModificationProperty->SetValue(now); -} - -uint32_t MP4Track::GetNumberOfChunks() -{ - return m_pChunkOffsetProperty->GetCount(); -} - -uint32_t MP4Track::GetChunkStscIndex(MP4ChunkId chunkId) -{ - uint32_t stscIndex; - uint32_t numStscs = m_pStscCountProperty->GetValue(); - - ASSERT(chunkId); - ASSERT(numStscs > 0); - - for (stscIndex = 0; stscIndex < numStscs; stscIndex++) { - if (chunkId < m_pStscFirstChunkProperty->GetValue(stscIndex)) { - ASSERT(stscIndex != 0); - break; - } - } - return stscIndex - 1; -} - -MP4Timestamp MP4Track::GetChunkTime(MP4ChunkId chunkId) -{ - uint32_t stscIndex = GetChunkStscIndex(chunkId); - - MP4ChunkId firstChunkId = - m_pStscFirstChunkProperty->GetValue(stscIndex); - - MP4SampleId firstSample = - m_pStscFirstSampleProperty->GetValue(stscIndex); - - uint32_t samplesPerChunk = - m_pStscSamplesPerChunkProperty->GetValue(stscIndex); - - MP4SampleId firstSampleInChunk = - firstSample + ((chunkId - firstChunkId) * samplesPerChunk); - - MP4Timestamp chunkTime; - - GetSampleTimes(firstSampleInChunk, &chunkTime, NULL); - - return chunkTime; -} - -uint32_t MP4Track::GetChunkSize(MP4ChunkId chunkId) -{ - uint32_t stscIndex = GetChunkStscIndex(chunkId); - - MP4ChunkId firstChunkId = - m_pStscFirstChunkProperty->GetValue(stscIndex); - - MP4SampleId firstSample = - m_pStscFirstSampleProperty->GetValue(stscIndex); - - uint32_t samplesPerChunk = - m_pStscSamplesPerChunkProperty->GetValue(stscIndex); - - MP4SampleId firstSampleInChunk = - firstSample + ((chunkId - firstChunkId) * samplesPerChunk); - - // need cumulative sizes of samples in chunk - uint32_t chunkSize = 0; - for (uint32_t i = 0; i < samplesPerChunk; i++) { - chunkSize += GetSampleSize(firstSampleInChunk + i); - } - - return chunkSize; -} - -void MP4Track::ReadChunk(MP4ChunkId chunkId, - uint8_t** ppChunk, uint32_t* pChunkSize) -{ - ASSERT(chunkId); - ASSERT(ppChunk); - ASSERT(pChunkSize); - - uint64_t chunkOffset = - m_pChunkOffsetProperty->GetValue(chunkId - 1); - - *pChunkSize = GetChunkSize(chunkId); - *ppChunk = (uint8_t*)MP4Malloc(*pChunkSize); - - log.verbose3f("\"%s\": ReadChunk: track %u id %u offset 0x%" PRIx64 " size %u (0x%x)", - GetFile().GetFilename().c_str(), - m_trackId, chunkId, chunkOffset, *pChunkSize, *pChunkSize); - - uint64_t oldPos = m_File.GetPosition(); // only used in mode == 'w' - try { - m_File.SetPosition( chunkOffset ); - m_File.ReadBytes( *ppChunk, *pChunkSize ); - } - catch( Exception* x ) { - MP4Free( *ppChunk ); - *ppChunk = NULL; - - if( m_File.IsWriteMode() ) - m_File.SetPosition( oldPos ); - - throw x; - } - - if( m_File.IsWriteMode() ) - m_File.SetPosition( oldPos ); -} - -void MP4Track::RewriteChunk(MP4ChunkId chunkId, - uint8_t* pChunk, uint32_t chunkSize) -{ - uint64_t chunkOffset = m_File.GetPosition(); - - m_File.WriteBytes(pChunk, chunkSize); - - m_pChunkOffsetProperty->SetValue(chunkOffset, chunkId - 1); - - log.verbose3f("\"%s\": RewriteChunk: track %u id %u offset 0x%" PRIx64 " size %u (0x%x)", - GetFile().GetFilename().c_str(), - m_trackId, chunkId, chunkOffset, chunkSize, chunkSize); -} - -// map track type name aliases to official names - - -bool MP4Track::InitEditListProperties() -{ - m_pElstCountProperty = NULL; - m_pElstMediaTimeProperty = NULL; - m_pElstDurationProperty = NULL; - m_pElstRateProperty = NULL; - m_pElstReservedProperty = NULL; - - MP4Atom* pElstAtom = - m_trakAtom.FindAtom("trak.edts.elst"); - - if (!pElstAtom) { - return false; - } - - (void)pElstAtom->FindProperty( - "elst.entryCount", - (MP4Property**)&m_pElstCountProperty); - (void)pElstAtom->FindProperty( - "elst.entries.mediaTime", - (MP4Property**)&m_pElstMediaTimeProperty); - (void)pElstAtom->FindProperty( - "elst.entries.segmentDuration", - (MP4Property**)&m_pElstDurationProperty); - (void)pElstAtom->FindProperty( - "elst.entries.mediaRate", - (MP4Property**)&m_pElstRateProperty); - - (void)pElstAtom->FindProperty( - "elst.entries.reserved", - (MP4Property**)&m_pElstReservedProperty); - - return m_pElstCountProperty - && m_pElstMediaTimeProperty - && m_pElstDurationProperty - && m_pElstRateProperty - && m_pElstReservedProperty; -} - -MP4EditId MP4Track::AddEdit(MP4EditId editId) -{ - if (!m_pElstCountProperty) { - (void)m_File.AddDescendantAtoms(&m_trakAtom, "edts.elst"); - if (InitEditListProperties() == false) return MP4_INVALID_EDIT_ID; - } - - if (editId == MP4_INVALID_EDIT_ID) { - editId = m_pElstCountProperty->GetValue() + 1; - } - - m_pElstMediaTimeProperty->InsertValue(0, editId - 1); - m_pElstDurationProperty->InsertValue(0, editId - 1); - m_pElstRateProperty->InsertValue(1, editId - 1); - m_pElstReservedProperty->InsertValue(0, editId - 1); - - m_pElstCountProperty->IncrementValue(); - - return editId; -} - -void MP4Track::DeleteEdit(MP4EditId editId) -{ - if (editId == MP4_INVALID_EDIT_ID) { - throw new Exception("edit id can't be zero", - __FILE__, __LINE__, __FUNCTION__ ); - } - - if (!m_pElstCountProperty - || m_pElstCountProperty->GetValue() == 0) { - throw new Exception("no edits exist", - __FILE__, __LINE__, __FUNCTION__ ); - } - - m_pElstMediaTimeProperty->DeleteValue(editId - 1); - m_pElstDurationProperty->DeleteValue(editId - 1); - m_pElstRateProperty->DeleteValue(editId - 1); - m_pElstReservedProperty->DeleteValue(editId - 1); - - m_pElstCountProperty->IncrementValue(-1); - - // clean up if last edit is deleted - if (m_pElstCountProperty->GetValue() == 0) { - m_pElstCountProperty = NULL; - m_pElstMediaTimeProperty = NULL; - m_pElstDurationProperty = NULL; - m_pElstRateProperty = NULL; - m_pElstReservedProperty = NULL; - - m_trakAtom.DeleteChildAtom( - m_trakAtom.FindAtom("trak.edts")); - } -} - -MP4Timestamp MP4Track::GetEditStart( - MP4EditId editId) -{ - if (editId == MP4_INVALID_EDIT_ID) { - return MP4_INVALID_TIMESTAMP; - } else if (editId == 1) { - return 0; - } - return (MP4Timestamp)GetEditTotalDuration(editId - 1); -} - -MP4Duration MP4Track::GetEditTotalDuration( - MP4EditId editId) -{ - uint32_t numEdits = 0; - - if (m_pElstCountProperty) { - numEdits = m_pElstCountProperty->GetValue(); - } - - if (editId == MP4_INVALID_EDIT_ID) { - editId = numEdits; - } - - if (numEdits == 0 || editId > numEdits) { - return MP4_INVALID_DURATION; - } - - MP4Duration totalDuration = 0; - - for (MP4EditId eid = 1; eid <= editId; eid++) { - totalDuration += - m_pElstDurationProperty->GetValue(eid - 1); - } - - return totalDuration; -} - -MP4SampleId MP4Track::GetSampleIdFromEditTime( - MP4Timestamp editWhen, - MP4Timestamp* pStartTime, - MP4Duration* pDuration) -{ - MP4SampleId sampleId = MP4_INVALID_SAMPLE_ID; - uint32_t numEdits = 0; - - if (m_pElstCountProperty) { - numEdits = m_pElstCountProperty->GetValue(); - } - - if (numEdits) { - MP4Duration editElapsedDuration = 0; - - for (MP4EditId editId = 1; editId <= numEdits; editId++) { - // remember edit segment's start time (in edit timeline) - MP4Timestamp editStartTime = - (MP4Timestamp)editElapsedDuration; - - // accumulate edit segment's duration - editElapsedDuration += - m_pElstDurationProperty->GetValue(editId - 1); - - // calculate difference between the specified edit time - // and the end of this edit segment - if (editElapsedDuration - editWhen <= 0) { - // the specified time has not yet been reached - continue; - } - - // 'editWhen' is within this edit segment - - // calculate the specified edit time - // relative to just this edit segment - MP4Duration editOffset = - editWhen - editStartTime; - - // calculate the media (track) time that corresponds - // to the specified edit time based on the edit list - MP4Timestamp mediaWhen = - m_pElstMediaTimeProperty->GetValue(editId - 1) - + editOffset; - - // lookup the sample id for the media time - sampleId = GetSampleIdFromTime(mediaWhen, false); - - // lookup the sample's media start time and duration - MP4Timestamp sampleStartTime; - MP4Duration sampleDuration; - - GetSampleTimes(sampleId, &sampleStartTime, &sampleDuration); - - // calculate the difference if any between when the sample - // would naturally start and when it starts in the edit timeline - MP4Duration sampleStartOffset = - mediaWhen - sampleStartTime; - - // calculate the start time for the sample in the edit time line - MP4Timestamp editSampleStartTime = - editWhen - min(editOffset, sampleStartOffset); - - MP4Duration editSampleDuration = 0; - - // calculate how long this sample lasts in the edit list timeline - if (m_pElstRateProperty->GetValue(editId - 1) == 0) { - // edit segment is a "dwell" - // so sample duration is that of the edit segment - editSampleDuration = - m_pElstDurationProperty->GetValue(editId - 1); - - } else { - // begin with the natural sample duration - editSampleDuration = sampleDuration; - - // now shorten that if the edit segment starts - // after the sample would naturally start - if (editOffset < sampleStartOffset) { - editSampleDuration -= sampleStartOffset - editOffset; - } - - // now shorten that if the edit segment ends - // before the sample would naturally end - if (editElapsedDuration - < editSampleStartTime + sampleDuration) { - editSampleDuration -= (editSampleStartTime + sampleDuration) - - editElapsedDuration; - } - } - - if (pStartTime) { - *pStartTime = editSampleStartTime; - } - - if (pDuration) { - *pDuration = editSampleDuration; - } - - log.verbose2f("\"%s\": GetSampleIdFromEditTime: when %" PRIu64 " " - "sampleId %u start %" PRIu64 " duration %" PRId64, - GetFile().GetFilename().c_str(), - editWhen, sampleId, - editSampleStartTime, editSampleDuration); - - return sampleId; - } - - throw new Exception("time out of range", - __FILE__, __LINE__, __FUNCTION__ ); - - } else { // no edit list - sampleId = GetSampleIdFromTime(editWhen, false); - - if (pStartTime || pDuration) { - GetSampleTimes(sampleId, pStartTime, pDuration); - } - } - - return sampleId; -} - -void MP4Track::CalculateBytesPerSample () -{ - MP4Atom *pMedia = m_trakAtom.FindAtom("trak.mdia.minf.stbl.stsd"); - MP4Atom *pMediaData; - const char *media_data_name; - if (pMedia == NULL) return; - - if (pMedia->GetNumberOfChildAtoms() != 1) return; - - pMediaData = pMedia->GetChildAtom(0); - media_data_name = pMediaData->GetType(); - if ((ATOMID(media_data_name) == ATOMID("twos")) || - (ATOMID(media_data_name) == ATOMID("sowt"))) { - MP4IntegerProperty *chan, *sampleSize; - chan = (MP4IntegerProperty *)pMediaData->GetProperty(4); - sampleSize = (MP4IntegerProperty *)pMediaData->GetProperty(5); - m_bytesPerSample = chan->GetValue() * (sampleSize->GetValue() / 8); - } -} - -MP4Duration MP4Track::GetDurationPerChunk() -{ - return m_durationPerChunk; -} - -void MP4Track::SetDurationPerChunk( MP4Duration duration ) -{ - m_durationPerChunk = duration; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4track.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4track.h deleted file mode 100644 index 2a649f20..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4track.h +++ /dev/null @@ -1,294 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001 - 2004. All Rights Reserved. - * - * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, - * and was contributed by Ximpo Group Ltd. - * - * Portions created by Ximpo Group Ltd. are - * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Ximpo Group Ltd. mp4v2@ximpo.com - */ - -#ifndef MP4V2_IMPL_MP4TRACK_H -#define MP4V2_IMPL_MP4TRACK_H - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -typedef uint32_t MP4ChunkId; - -// forward declarations -class MP4File; -class MP4Atom; -class MP4Property; -class MP4IntegerProperty; -class MP4Integer8Property; -class MP4Integer16Property; -class MP4Integer32Property; -class MP4Integer64Property; -class MP4StringProperty; - -class MP4Track -{ -public: - MP4Track(MP4File& file, MP4Atom& trakAtom); - - virtual ~MP4Track(); - - MP4TrackId GetId() { - return m_trackId; - } - - const char* GetType(); - - void SetType(const char* type); - - MP4File& GetFile() { - return m_File; - } - - MP4Atom& GetTrakAtom() { - return m_trakAtom; - } - - void ReadSample( - // input parameters - MP4SampleId sampleId, - // output parameters - uint8_t** ppBytes, - uint32_t* pNumBytes, - MP4Timestamp* pStartTime = NULL, - MP4Duration* pDuration = NULL, - MP4Duration* pRenderingOffset = NULL, - bool* pIsSyncSample = NULL, - bool* hasDependencyFlags = NULL, - uint32_t* dependencyFlags = NULL ); - - void WriteSample( - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration = 0, - MP4Duration renderingOffset = 0, - bool isSyncSample = true); - - void WriteSampleDependency( - const uint8_t* pBytes, - uint32_t numBytes, - MP4Duration duration, - MP4Duration renderingOffset, - bool isSyncSample, - uint32_t dependencyFlags ); - - virtual void FinishWrite(uint32_t options = 0); - - uint64_t GetDuration(); // in track timeScale units - uint32_t GetTimeScale(); - uint32_t GetNumberOfSamples(); - uint32_t GetSampleSize(MP4SampleId sampleId); - uint32_t GetMaxSampleSize(); - uint64_t GetTotalOfSampleSizes(); - uint32_t GetAvgBitrate(); // in bps - uint32_t GetMaxBitrate(); // in bps - - MP4Duration GetFixedSampleDuration(); - void SetFixedSampleDuration(MP4Duration duration); - - void GetSampleTimes(MP4SampleId sampleId, - MP4Timestamp* pStartTime, MP4Duration* pDuration); - - bool IsSyncSample(MP4SampleId sampleId); - - MP4SampleId GetSampleIdFromTime( - MP4Timestamp when, - bool wantSyncSample = false); - - MP4Duration GetSampleRenderingOffset(MP4SampleId sampleId); - void SetSampleRenderingOffset(MP4SampleId sampleId, - MP4Duration renderingOffset); - - MP4EditId AddEdit( - MP4EditId editId = MP4_INVALID_EDIT_ID); - - void DeleteEdit( - MP4EditId editId); - - MP4Timestamp GetEditStart( - MP4EditId editId); - - MP4Timestamp GetEditTotalDuration( - MP4EditId editId); - - MP4SampleId GetSampleIdFromEditTime( - MP4Timestamp editWhen, - MP4Timestamp* pStartTime = NULL, - MP4Duration* pDuration = NULL); - - // special operation for use during hint track packet assembly - void ReadSampleFragment( - MP4SampleId sampleId, - uint32_t sampleOffset, - uint16_t sampleLength, - uint8_t* pDest); - - // special operations for use during optimization - - uint32_t GetNumberOfChunks(); - - MP4Timestamp GetChunkTime(MP4ChunkId chunkId); - - void ReadChunk(MP4ChunkId chunkId, - uint8_t** ppChunk, uint32_t* pChunkSize); - - void RewriteChunk(MP4ChunkId chunkId, - uint8_t* pChunk, uint32_t chunkSize); - - MP4Duration GetDurationPerChunk(); - void SetDurationPerChunk( MP4Duration ); - -protected: - bool InitEditListProperties(); - - File* GetSampleFile( MP4SampleId sampleId ); - uint64_t GetSampleFileOffset(MP4SampleId sampleId); - uint32_t GetSampleStscIndex(MP4SampleId sampleId); - uint32_t GetChunkStscIndex(MP4ChunkId chunkId); - uint32_t GetChunkSize(MP4ChunkId chunkId); - uint32_t GetSampleCttsIndex(MP4SampleId sampleId, - MP4SampleId* pFirstSampleId = NULL); - MP4SampleId GetNextSyncSample(MP4SampleId sampleId); - - void UpdateSampleSizes(MP4SampleId sampleId, - uint32_t numBytes); - bool IsChunkFull(MP4SampleId sampleId); - void UpdateSampleToChunk(MP4SampleId sampleId, - MP4ChunkId chunkId, uint32_t samplesPerChunk); - void UpdateChunkOffsets(uint64_t chunkOffset); - void UpdateSampleTimes(MP4Duration duration); - void UpdateRenderingOffsets(MP4SampleId sampleId, - MP4Duration renderingOffset); - void UpdateSyncSamples(MP4SampleId sampleId, - bool isSyncSample); - - MP4Atom* AddAtom(const char* parentName, const char* childName); - - void UpdateDurations(MP4Duration duration); - MP4Duration ToMovieDuration(MP4Duration trackDuration); - - void UpdateModificationTimes(); - - void WriteChunkBuffer(); - - void CalculateBytesPerSample(); - - void FinishSdtp(); - -protected: - MP4File& m_File; - MP4Atom& m_trakAtom; // moov.trak[] - MP4TrackId m_trackId; // moov.trak[].tkhd.trackId - MP4StringProperty* m_pTypeProperty; // moov.trak[].mdia.hdlr.handlerType - - uint32_t m_lastStsdIndex; - File* m_lastSampleFile; - - // for efficient construction of hint track packets - MP4SampleId m_cachedReadSampleId; - uint8_t* m_pCachedReadSample; - uint32_t m_cachedReadSampleSize; - - // for writing - MP4SampleId m_writeSampleId; - MP4Duration m_fixedSampleDuration; - uint8_t* m_pChunkBuffer; - uint32_t m_chunkBufferSize; // Actual size of our chunk buffer. - uint32_t m_sizeOfDataInChunkBuffer; // Size of the data in the chunk buffer. - uint32_t m_chunkSamples; - MP4Duration m_chunkDuration; - - // controls for chunking - uint32_t m_samplesPerChunk; - MP4Duration m_durationPerChunk; - - uint32_t m_bytesPerSample; - - // controls for AMR chunking - int m_isAmr; - uint8_t m_curMode; - - MP4Integer32Property* m_pTimeScaleProperty; - MP4IntegerProperty* m_pTrackDurationProperty; // 32 or 64 bits - MP4IntegerProperty* m_pMediaDurationProperty; // 32 or 64 bits - MP4IntegerProperty* m_pTrackModificationProperty; // 32 or 64 bits - MP4IntegerProperty* m_pMediaModificationProperty; // 32 or 64 bits - - MP4Integer32Property* m_pStszFixedSampleSizeProperty; - MP4Integer32Property* m_pStszSampleCountProperty; - - void SampleSizePropertyAddValue(uint32_t bytes); - uint8_t m_stsz_sample_bits; - bool m_have_stz2_4bit_sample; - uint8_t m_stz2_4bit_sample_value; - MP4IntegerProperty* m_pStszSampleSizeProperty; - - MP4Integer32Property* m_pStscCountProperty; - MP4Integer32Property* m_pStscFirstChunkProperty; - MP4Integer32Property* m_pStscSamplesPerChunkProperty; - MP4Integer32Property* m_pStscSampleDescrIndexProperty; - MP4Integer32Property* m_pStscFirstSampleProperty; - - MP4Integer32Property* m_pChunkCountProperty; - MP4IntegerProperty* m_pChunkOffsetProperty; // 32 or 64 bits - - MP4Integer32Property* m_pSttsCountProperty; - MP4Integer32Property* m_pSttsSampleCountProperty; - MP4Integer32Property* m_pSttsSampleDeltaProperty; - - // for improve sequental timestamp index access - uint32_t m_cachedSttsIndex; - MP4SampleId m_cachedSttsSid; - MP4Timestamp m_cachedSttsElapsed; - - uint32_t m_cachedCttsIndex; - MP4SampleId m_cachedCttsSid; - - MP4Integer32Property* m_pCttsCountProperty; - MP4Integer32Property* m_pCttsSampleCountProperty; - MP4Integer32Property* m_pCttsSampleOffsetProperty; - - MP4Integer32Property* m_pStssCountProperty; - MP4Integer32Property* m_pStssSampleProperty; - - MP4Integer32Property* m_pElstCountProperty; - MP4IntegerProperty* m_pElstMediaTimeProperty; // 32 or 64 bits - MP4IntegerProperty* m_pElstDurationProperty; // 32 or 64 bits - MP4Integer16Property* m_pElstRateProperty; - MP4Integer16Property* m_pElstReservedProperty; - - string m_sdtpLog; // records frame types for H264 samples -}; - -MP4ARRAY_DECL(MP4Track, MP4Track*); - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_MP4TRACK_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4util.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4util.cpp deleted file mode 100644 index 47bd74ea..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4util.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001-2005. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Bill May wmay@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -bool MP4NameFirstMatches(const char* s1, const char* s2) -{ - if (s1 == NULL || *s1 == '\0' || s2 == NULL || *s2 == '\0') { - return false; - } - - if (*s2 == '*') { - return true; - } - - while (*s1 != '\0') { - if (*s2 == '\0' || strchr("[.", *s2)) { - break; - } - if (tolower(*s1) != tolower(*s2)) { - return false; - } - s1++; - s2++; - } - return true; -} - -bool MP4NameFirstIndex(const char* s, uint32_t* pIndex) -{ - if (s == NULL) { - return false; - } - - while (*s != '\0' && *s != '.') { - if (*s == '[') { - s++; - ASSERT(pIndex); - if (sscanf(s, "%u", pIndex) != 1) { - return false; - } - return true; - } - s++; - } - return false; -} - -char* MP4NameFirst(const char *s) -{ - if (s == NULL) { - return NULL; - } - - const char* end = s; - - while (*end != '\0' && *end != '.') { - end++; - } - - char* first = (char*)MP4Calloc((end - s) + 1); - - if (first) { - strncpy(first, s, end - s); - } - - return first; -} - -const char* MP4NameAfterFirst(const char *s) -{ - if (s == NULL) { - return NULL; - } - - while (*s != '\0') { - if (*s == '.') { - s++; - if (*s == '\0') { - return NULL; - } - return s; - } - s++; - } - return NULL; -} - -char* MP4ToBase16(const uint8_t* pData, uint32_t dataSize) -{ - if (dataSize) { - ASSERT(pData); - } - uint32_t size = 2 * dataSize + 1; - char* s = (char*)MP4Calloc(size); - - uint32_t i, j; - for (i = 0, j = 0; i < dataSize; i++) { - size -= snprintf(&s[j], size, "%02x", pData[i]); - j += 2; - } - - return s; /* N.B. caller is responsible for free'ing s */ -} - -char* MP4ToBase64(const uint8_t* pData, uint32_t dataSize) -{ - if (pData == NULL || dataSize == 0) return NULL; - - static const char encoding[64] = { - 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', - 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', - 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', - 'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/' - }; - - char* s = (char*)MP4Calloc((((dataSize + 2) * 4) / 3) + 1); - - const uint8_t* src = pData; - if (pData == NULL) return NULL; - char* dest = s; - uint32_t numGroups = dataSize / 3; - - for (uint32_t i = 0; i < numGroups; i++) { - *dest++ = encoding[src[0] >> 2]; - *dest++ = encoding[((src[0] & 0x03) << 4) | (src[1] >> 4)]; - *dest++ = encoding[((src[1] & 0x0F) << 2) | (src[2] >> 6)]; - *dest++ = encoding[src[2] & 0x3F]; - src += 3; - } - - if (dataSize % 3 == 1) { - *dest++ = encoding[src[0] >> 2]; - *dest++ = encoding[((src[0] & 0x03) << 4)]; - *dest++ = '='; - *dest++ = '='; - } else if (dataSize % 3 == 2) { - *dest++ = encoding[src[0] >> 2]; - *dest++ = encoding[((src[0] & 0x03) << 4) | (src[1] >> 4)]; - *dest++ = encoding[((src[1] & 0x0F) << 2)]; - *dest++ = '='; - } - *dest = '\0'; - return s; /* N.B. caller is responsible for free'ing s */ -} - -static bool convertBase64 (const char data, uint8_t *value) -{ - static const uint8_t decodingarr64[128] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f, - 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, - 0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, - 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, - 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, - 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, - 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, - 0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, - }; - uint8_t index = (uint8_t)data; - if ((index & 0x80) != 0) return false; - - if (decodingarr64[index] == 0xff) return false; - *value = decodingarr64[index]; - return true; -} - -uint8_t *Base64ToBinary (const char *pData, uint32_t decodeSize, uint32_t *pDataSize) -{ - uint8_t *ret; - uint32_t size, ix, groups; - if (pData == NULL || decodeSize == 0 || pDataSize == NULL) - return NULL; - - if ((decodeSize % 4) != 0) { - // must be multiples of 4 characters - return NULL; - } - size = (decodeSize * 3) / 4; - groups = decodeSize / 4; - ret = (uint8_t *)MP4Calloc(size); - if (ret == NULL) return NULL; - for (ix = 0; ix < groups; ix++) { - uint8_t value[4]; - for (uint8_t jx = 0; jx < 4; jx++) { - if (pData[jx] == '=') { - if (ix != (groups - 1)) { - free(ret); - return NULL; - } - size--; - value[jx] = 0; - } else if (convertBase64(pData[jx], &value[jx]) == false) { - free(ret); - return NULL; - } - } - ret[(ix * 3)] = value[0] << 2 | ((value[1] >> 4) & 0x3); - ret[(ix * 3) + 1] = (value[1] << 4) | (value[2] >> 2 & 0xf); - ret[(ix * 3) + 2] = ((value[2] & 0x3) << 6) | value[3]; - pData += 4; - } - *pDataSize = size; - return ret; -} - -// log2 of value, rounded up -static uint8_t ilog2(uint64_t value) -{ - uint64_t powerOf2 = 1; - for (uint8_t i = 0; i < 64; i++) { - if (value <= powerOf2) { - return i; - } - powerOf2 <<= 1; - } - return 64; -} - -uint64_t MP4ConvertTime(uint64_t t, - uint32_t oldTimeScale, uint32_t newTimeScale) -{ - // avoid float point exception - if (oldTimeScale == 0) { - throw new Exception("division by zero", __FILE__, __LINE__, __FUNCTION__ ); - } - - if (oldTimeScale == newTimeScale) return t; - - // check if we can safely use integer operations - if (ilog2(t) + ilog2(newTimeScale) <= 64) { - return (t * newTimeScale) / oldTimeScale; - } - - // final resort is to use floating point - double d = (double)newTimeScale; - d *= double(t); - d /= (double)oldTimeScale; - d += 0.5; // round up. - - return (uint64_t)d; -} - -const char* MP4NormalizeTrackType (const char* type) -{ - if (!strcasecmp(type, "vide") - || !strcasecmp(type, "video") - || !strcasecmp(type, "mp4v") - || !strcasecmp(type, "avc1") - || !strcasecmp(type, "s263") // 3GPP H.263 - || !strcasecmp(type, "encv")) { - return MP4_VIDEO_TRACK_TYPE; - } - - if (!strcasecmp(type, "soun") - || !strcasecmp(type, "sound") - || !strcasecmp(type, "audio") - || !strcasecmp(type, "enca") - || !strcasecmp(type, "samr") // 3GPP AMR - || !strcasecmp(type, "sawb") // 3GPP AMR/WB - || !strcasecmp(type, "mp4a")) { - return MP4_AUDIO_TRACK_TYPE; - } - - if (!strcasecmp(type, "sdsm") - || !strcasecmp(type, "scene") - || !strcasecmp(type, "bifs")) { - return MP4_SCENE_TRACK_TYPE; - } - - if (!strcasecmp(type, "odsm") - || !strcasecmp(type, "od")) { - return MP4_OD_TRACK_TYPE; - } - if (strcasecmp(type, "cntl") == 0) { - return MP4_CNTL_TRACK_TYPE; - } - - log.verbose1f("Attempt to normalize %s did not match",type); - - return type; -} - -MP4Timestamp MP4GetAbsTimestamp() { - /* MP4 epoch is midnight, January 1, 1904 - * offset from midnight, January 1, 1970 is 2082844800 seconds - * 208284480 is (((1970 - 1904) * 365) + 17) * 24 * 60 * 60 - */ - return time::getLocalTimeSeconds() + 2082844800; -} - -/////////////////////////////////////////////////////////////////////////////// - -uint32_t STRTOINT32( const char* s ) -{ -#if defined( MP4V2_INTSTRING_ALIGNMENT ) - // it seems ARM integer instructions require 4-byte alignment so we - // manually copy string-data into the integer before performing ops - uint32_t tmp; - memcpy( &tmp, s, sizeof(tmp) ); - return MP4V2_NTOHL( tmp ); -#else - return MP4V2_NTOHL(*(uint32_t *)s); -#endif -} - -void INT32TOSTR( uint32_t i, char* s ) -{ -#if defined( MP4V2_INTSTRING_ALIGNMENT ) - // it seems ARM integer instructions require 4-byte alignment so we - // manually copy string-data into the integer before performing ops - uint32_t tmp = MP4V2_HTONL( i ); - memcpy( s, &tmp, sizeof(tmp) ); -#else - *(uint32_t *)s = MP4V2_HTONL(i); -#endif - s[4] = 0; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4util.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4util.h deleted file mode 100644 index 1fbbd81e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/mp4util.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#ifndef MP4V2_IMPL_MP4UTIL_H -#define MP4V2_IMPL_MP4UTIL_H - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -#include - -#define LIBMPV42_STRINGIFY(x) #x - -#ifndef ASSERT -# define ASSERT(expr) \ - if (!(expr)) { \ - throw new Exception("assert failure: "LIBMPV42_STRINGIFY((expr)), __FILE__, __LINE__, __FUNCTION__ ); \ - } -#endif - -#define WARNING(expr) \ - if (expr) { \ - log.errorf("Warning (%s) in %s at line %u", \ - LIBMPV42_STRINGIFY(expr), __FILE__, __LINE__); \ - } - -/////////////////////////////////////////////////////////////////////////////// - -#define CHECK_AND_FREE(a) if ((a) != NULL) { free((void *)(a)); (a) = NULL;} - -#define NUM_ELEMENTS_IN_ARRAY(name) ((sizeof((name))) / (sizeof(*(name)))) - -/////////////////////////////////////////////////////////////////////////////// - -inline void* MP4Malloc(size_t size) { - if (size == 0) return NULL; - void* p = malloc(size); - if (p == NULL && size > 0) { - throw new PlatformException("malloc failed",errno,__FILE__,__LINE__,__FUNCTION__); - } - return p; -} - -inline void* MP4Calloc(size_t size) { - if (size == 0) return NULL; - return memset(MP4Malloc(size), 0, size); -} - -inline char* MP4Stralloc(const char* s1) { - char* s2 = (char*)MP4Malloc(strlen(s1) + 1); - strcpy(s2, s1); - return s2; -} - -inline void* MP4Realloc(void* p, uint32_t newSize) { - // workaround library bug - if (p == NULL && newSize == 0) { - return NULL; - } - - void* temp = realloc(p, newSize); - if (temp == NULL && newSize > 0) { - throw new PlatformException("malloc failed",errno,__FILE__,__LINE__,__FUNCTION__); - } - return temp; -} - -uint32_t STRTOINT32( const char* ); -void INT32TOSTR( uint32_t, char* ); - -MP4Timestamp MP4GetAbsTimestamp(); - -uint64_t MP4ConvertTime(uint64_t t, - uint32_t oldTimeScale, uint32_t newTimeScale); - -bool MP4NameFirstMatches(const char* s1, const char* s2); - -bool MP4NameFirstIndex(const char* s, uint32_t* pIndex); - -char* MP4NameFirst(const char *s); - -const char* MP4NameAfterFirst(const char *s); - -char* MP4ToBase16(const uint8_t* pData, uint32_t dataSize); - -char* MP4ToBase64(const uint8_t* pData, uint32_t dataSize); - -const char* MP4NormalizeTrackType(const char* type); - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_MP4UTIL_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/ocidescriptors.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/ocidescriptors.cpp deleted file mode 100644 index 0f78850d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/ocidescriptors.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4ContentClassDescriptor::MP4ContentClassDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom) -{ - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "classificationEntity")); - AddProperty( /* 1 */ - new MP4Integer16Property(parentAtom, "classificationTable")); - AddProperty( /* 2 */ - new MP4BytesProperty(parentAtom, "contentClassificationData")); -} - -void MP4ContentClassDescriptor::Read(MP4File& file) -{ - ReadHeader(file); - - /* byte properties need to know how long they are before reading */ - ((MP4BytesProperty*)m_pProperties[2])->SetValueSize(m_size - 6); - - ReadProperties(file); -} - -MP4KeywordDescriptor::MP4KeywordDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom) -{ - AddProperty( /* 0 */ - new MP4BytesProperty(parentAtom, "languageCode", 3)); - AddProperty( /* 1 */ - new MP4BitfieldProperty(parentAtom, "isUTF8String", 1)); - AddProperty( /* 2 */ - new MP4BitfieldProperty(parentAtom, "reserved", 7)); - MP4Integer8Property* pCount = - new MP4Integer8Property(parentAtom, "keywordCount"); - AddProperty(pCount); /* 3 */ - - MP4TableProperty* pTable = new MP4TableProperty(parentAtom, "keywords", pCount); - AddProperty(pTable); /* 4 */ - - pTable->AddProperty( /* 4, 0 */ - new MP4StringProperty(pTable->GetParentAtom(), "string", Counted)); - - SetReadMutate(2); -} - -void MP4KeywordDescriptor::Mutate() -{ - bool utf8Flag = ((MP4BitfieldProperty*)m_pProperties[1])->GetValue(); - MP4Property* pProperty = - ((MP4TableProperty*)m_pProperties[4])->GetProperty(0); - ASSERT(pProperty); - ((MP4StringProperty*)pProperty)->SetUnicode(!utf8Flag); -} - -MP4RatingDescriptor::MP4RatingDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom) -{ - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "ratingEntity")); - AddProperty( /* 1 */ - new MP4Integer16Property(parentAtom, "ratingCriteria")); - AddProperty( /* 2 */ - new MP4BytesProperty(parentAtom, "ratingInfo")); -} - -void MP4RatingDescriptor::Read(MP4File& file) -{ - ReadHeader(file); - - /* byte properties need to know how long they are before reading */ - ((MP4BytesProperty*)m_pProperties[2])->SetValueSize(m_size - 6); - - ReadProperties(file); -} - -MP4LanguageDescriptor::MP4LanguageDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom) -{ - AddProperty( /* 0 */ - new MP4BytesProperty(parentAtom, "languageCode", 3)); -} - -MP4ShortTextDescriptor::MP4ShortTextDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom) -{ - AddProperty( /* 0 */ - new MP4BytesProperty(parentAtom, "languageCode", 3)); - AddProperty( /* 1 */ - new MP4BitfieldProperty(parentAtom, "isUTF8String", 1)); - AddProperty( /* 2 */ - new MP4BitfieldProperty(parentAtom, "reserved", 7)); - AddProperty( /* 3 */ - new MP4StringProperty(parentAtom, "eventName", Counted)); - AddProperty( /* 4 */ - new MP4StringProperty(parentAtom, "eventText", Counted)); - - SetReadMutate(2); -} - -void MP4ShortTextDescriptor::Mutate() -{ - bool utf8Flag = ((MP4BitfieldProperty*)m_pProperties[1])->GetValue(); - ((MP4StringProperty*)m_pProperties[3])->SetUnicode(!utf8Flag); - ((MP4StringProperty*)m_pProperties[4])->SetUnicode(!utf8Flag); -} - -MP4ExpandedTextDescriptor::MP4ExpandedTextDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom) -{ - AddProperty( /* 0 */ - new MP4BytesProperty(parentAtom, "languageCode", 3)); - AddProperty( /* 1 */ - new MP4BitfieldProperty(parentAtom, "isUTF8String", 1)); - AddProperty( /* 2 */ - new MP4BitfieldProperty(parentAtom, "reserved", 7)); - MP4Integer8Property* pCount = - new MP4Integer8Property(parentAtom, "itemCount"); - AddProperty(pCount); /* 3 */ - - MP4TableProperty* pTable = new MP4TableProperty(parentAtom, "items", pCount); - AddProperty(pTable); /* 4 */ - - pTable->AddProperty( /* Table 0 */ - new MP4StringProperty(pTable->GetParentAtom(), "itemDescription", Counted)); - pTable->AddProperty( /* Table 1 */ - new MP4StringProperty(pTable->GetParentAtom(), "itemText", Counted)); - - AddProperty( /* 5 */ - new MP4StringProperty(parentAtom, "nonItemText")); - ((MP4StringProperty*)m_pProperties[5])->SetExpandedCountedFormat(true); - - SetReadMutate(2); -} - -void MP4ExpandedTextDescriptor::Mutate() -{ - bool utf8Flag = ((MP4BitfieldProperty*)m_pProperties[1])->GetValue(); - - MP4Property* pProperty = - ((MP4TableProperty*)m_pProperties[4])->GetProperty(0); - ASSERT(pProperty); - ((MP4StringProperty*)pProperty)->SetUnicode(!utf8Flag); - - pProperty = ((MP4TableProperty*)m_pProperties[4])->GetProperty(1); - ASSERT(pProperty); - ((MP4StringProperty*)pProperty)->SetUnicode(!utf8Flag); - - ((MP4StringProperty*)m_pProperties[5])->SetUnicode(!utf8Flag); -} - -class MP4CreatorTableProperty : public MP4TableProperty { -public: - MP4CreatorTableProperty(MP4Atom& parentAtom, const char* name, MP4Integer8Property* pCountProperty) : - MP4TableProperty(parentAtom, name, pCountProperty) { - }; -protected: - void ReadEntry(MP4File& file, uint32_t index); - void WriteEntry(MP4File& file, uint32_t index); -private: - MP4CreatorTableProperty(); - MP4CreatorTableProperty ( const MP4CreatorTableProperty &src ); - MP4CreatorTableProperty &operator= ( const MP4CreatorTableProperty &src ); -}; - -MP4CreatorDescriptor::MP4CreatorDescriptor(MP4Atom& parentAtom, uint8_t tag) - : MP4Descriptor(parentAtom, tag) -{ - MP4Integer8Property* pCount = - new MP4Integer8Property(parentAtom, "creatorCount"); - AddProperty(pCount); /* 0 */ - - MP4TableProperty* pTable = new MP4CreatorTableProperty(parentAtom, "creators", pCount); - AddProperty(pTable); /* 1 */ - - pTable->AddProperty( /* Table 0 */ - new MP4BytesProperty(pTable->GetParentAtom(), "languageCode", 3, 3)); - pTable->AddProperty( /* Table 1 */ - new MP4BitfieldProperty(pTable->GetParentAtom(), "isUTF8String", 1)); - pTable->AddProperty( /* Table 2 */ - new MP4BitfieldProperty(pTable->GetParentAtom(), "reserved", 7)); - pTable->AddProperty( /* Table 3 */ - new MP4StringProperty(pTable->GetParentAtom(), "name", Counted)); -} - -void MP4CreatorTableProperty::ReadEntry(MP4File& file, uint32_t index) -{ - m_pProperties[0]->Read(file, index); - m_pProperties[1]->Read(file, index); - - bool utf8Flag = ((MP4BitfieldProperty*)m_pProperties[1])->GetValue(index); - ((MP4StringProperty*)m_pProperties[3])->SetUnicode(!utf8Flag); - - m_pProperties[2]->Read(file, index); - m_pProperties[3]->Read(file, index); -} - -void MP4CreatorTableProperty::WriteEntry(MP4File& file, uint32_t index) -{ - bool utf8Flag = ((MP4BitfieldProperty*)m_pProperties[1])->GetValue(index); - ((MP4StringProperty*)m_pProperties[3])->SetUnicode(!utf8Flag); - - MP4TableProperty::WriteEntry(file, index); -} - -MP4CreationDescriptor::MP4CreationDescriptor(MP4Atom& parentAtom, uint8_t tag) - : MP4Descriptor(parentAtom, tag) -{ - AddProperty( /* 0 */ - new MP4BitfieldProperty(parentAtom, "contentCreationDate", 40)); -} - -MP4SmpteCameraDescriptor::MP4SmpteCameraDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom) -{ - MP4Integer8Property* pCount = - new MP4Integer8Property(parentAtom, "parameterCount"); - AddProperty(pCount); - - MP4TableProperty* pTable = new MP4TableProperty(parentAtom, "parameters", pCount); - AddProperty(pTable); - - pTable->AddProperty( - new MP4Integer8Property(parentAtom, "id")); - pTable->AddProperty( - new MP4Integer32Property(parentAtom, "value")); -} - -MP4UnknownOCIDescriptor::MP4UnknownOCIDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom) -{ - AddProperty( /* 0 */ - new MP4BytesProperty(parentAtom, "data")); -} - -void MP4UnknownOCIDescriptor::Read(MP4File& file) -{ - ReadHeader(file); - - /* byte properties need to know how long they are before reading */ - ((MP4BytesProperty*)m_pProperties[0])->SetValueSize(m_size); - - ReadProperties(file); -} - -MP4Descriptor* CreateOCIDescriptor(MP4Atom& parentAtom, uint8_t tag) -{ - MP4Descriptor* pDescriptor = NULL; - - switch (tag) { - case MP4ContentClassDescrTag: - pDescriptor = new MP4ContentClassDescriptor(parentAtom); - break; - case MP4KeywordDescrTag: - pDescriptor = new MP4KeywordDescriptor(parentAtom); - break; - case MP4RatingDescrTag: - pDescriptor = new MP4RatingDescriptor(parentAtom); - break; - case MP4LanguageDescrTag: - pDescriptor = new MP4LanguageDescriptor(parentAtom); - break; - case MP4ShortTextDescrTag: - pDescriptor = new MP4ShortTextDescriptor(parentAtom); - break; - case MP4ExpandedTextDescrTag: - pDescriptor = new MP4ExpandedTextDescriptor(parentAtom); - break; - case MP4ContentCreatorDescrTag: - case MP4OCICreatorDescrTag: - pDescriptor = new MP4CreatorDescriptor(parentAtom, tag); - break; - case MP4ContentCreationDescrTag: - case MP4OCICreationDescrTag: - pDescriptor = new MP4CreationDescriptor(parentAtom, tag); - break; - case MP4SmpteCameraDescrTag: - pDescriptor = new MP4SmpteCameraDescriptor(parentAtom); - break; - } - - if (pDescriptor == NULL) { - if (tag >= MP4OCIDescrTagsStart && tag <= MP4OCIDescrTagsEnd) { - pDescriptor = new MP4UnknownOCIDescriptor(parentAtom); - pDescriptor->SetTag(tag); - } - } - - return pDescriptor; -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/ocidescriptors.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/ocidescriptors.h deleted file mode 100644 index c3018501..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/ocidescriptors.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#ifndef MP4V2_IMPL_OCIDESCRIPTORS_H -#define MP4V2_IMPL_OCIDESCRIPTORS_H - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -const uint8_t MP4OCIDescrTagsStart = 0x40; -const uint8_t MP4ContentClassDescrTag = 0x40; -const uint8_t MP4KeywordDescrTag = 0x41; -const uint8_t MP4RatingDescrTag = 0x42; -const uint8_t MP4LanguageDescrTag = 0x43; -const uint8_t MP4ShortTextDescrTag = 0x44; -const uint8_t MP4ExpandedTextDescrTag = 0x45; -const uint8_t MP4ContentCreatorDescrTag = 0x46; -const uint8_t MP4ContentCreationDescrTag = 0x47; -const uint8_t MP4OCICreatorDescrTag = 0x48; -const uint8_t MP4OCICreationDescrTag = 0x49; -const uint8_t MP4SmpteCameraDescrTag = 0x4A; -const uint8_t MP4OCIDescrTagsEnd = 0x5F; - -class MP4ContentClassDescriptor : public MP4Descriptor { -public: - MP4ContentClassDescriptor(MP4Atom& parentAtom); - void Read(MP4File& file); -private: - MP4ContentClassDescriptor(); - MP4ContentClassDescriptor ( const MP4ContentClassDescriptor &src ); - MP4ContentClassDescriptor &operator= ( const MP4ContentClassDescriptor &src ); -}; - -class MP4KeywordDescriptor : public MP4Descriptor { -public: - MP4KeywordDescriptor(MP4Atom& parentAtom); -protected: - void Mutate(); -private: - MP4KeywordDescriptor(); - MP4KeywordDescriptor ( const MP4KeywordDescriptor &src ); - MP4KeywordDescriptor &operator= ( const MP4KeywordDescriptor &src ); -}; - -class MP4RatingDescriptor : public MP4Descriptor { -public: - MP4RatingDescriptor(MP4Atom& parentAtom); - void Read(MP4File& file); -private: - MP4RatingDescriptor(); - MP4RatingDescriptor ( const MP4RatingDescriptor &src ); - MP4RatingDescriptor &operator= ( const MP4RatingDescriptor &src ); -}; - -class MP4LanguageDescriptor : public MP4Descriptor { -public: - MP4LanguageDescriptor(MP4Atom& parentAtom); -private: - MP4LanguageDescriptor(); - MP4LanguageDescriptor ( const MP4LanguageDescriptor &src ); - MP4LanguageDescriptor &operator= ( const MP4LanguageDescriptor &src ); -}; - -class MP4ShortTextDescriptor : public MP4Descriptor { -public: - MP4ShortTextDescriptor(MP4Atom& parentAtom); -protected: - void Mutate(); -private: - MP4ShortTextDescriptor(); - MP4ShortTextDescriptor ( const MP4ShortTextDescriptor &src ); - MP4ShortTextDescriptor &operator= ( const MP4ShortTextDescriptor &src ); -}; - -class MP4ExpandedTextDescriptor : public MP4Descriptor { -public: - MP4ExpandedTextDescriptor(MP4Atom& parentAtom); -protected: - void Mutate(); -private: - MP4ExpandedTextDescriptor(); - MP4ExpandedTextDescriptor ( const MP4ExpandedTextDescriptor &src ); - MP4ExpandedTextDescriptor &operator= ( const MP4ExpandedTextDescriptor &src ); -}; - -class MP4CreatorDescriptor : public MP4Descriptor { -public: - MP4CreatorDescriptor(MP4Atom& parentAtom, uint8_t tag); -private: - MP4CreatorDescriptor(); - MP4CreatorDescriptor ( const MP4CreatorDescriptor &src ); - MP4CreatorDescriptor &operator= ( const MP4CreatorDescriptor &src ); -}; - -class MP4CreationDescriptor : public MP4Descriptor { -public: - MP4CreationDescriptor(MP4Atom& parentAtom, uint8_t tag); -private: - MP4CreationDescriptor(); - MP4CreationDescriptor ( const MP4CreationDescriptor &src ); - MP4CreationDescriptor &operator= ( const MP4CreationDescriptor &src ); -}; - -class MP4SmpteCameraDescriptor : public MP4Descriptor { -public: - MP4SmpteCameraDescriptor(MP4Atom& parentAtom); -private: - MP4SmpteCameraDescriptor(); - MP4SmpteCameraDescriptor ( const MP4SmpteCameraDescriptor &src ); - MP4SmpteCameraDescriptor &operator= ( const MP4SmpteCameraDescriptor &src ); -}; - -class MP4UnknownOCIDescriptor : public MP4Descriptor { -public: - MP4UnknownOCIDescriptor(MP4Atom& parentAtom); - void Read(MP4File& file); -private: - MP4UnknownOCIDescriptor(); - MP4UnknownOCIDescriptor ( const MP4UnknownOCIDescriptor &src ); - MP4UnknownOCIDescriptor &operator= ( const MP4UnknownOCIDescriptor &src ); -}; - - -extern MP4Descriptor *CreateOCIDescriptor(MP4Atom& parentAtom, uint8_t tag); - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_OCIDESCRIPTORS_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/odcommands.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/odcommands.cpp deleted file mode 100644 index 7cf4f748..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/odcommands.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -MP4ODUpdateDescriptor::MP4ODUpdateDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom, MP4ODUpdateODCommandTag) -{ - // just a container for ObjectDescriptors - AddProperty( /* 0 */ - new MP4DescriptorProperty(parentAtom, NULL, - MP4FileODescrTag, 0, Required, Many)); -} - -MP4ODRemoveDescriptor::MP4ODRemoveDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom, MP4ODRemoveODCommandTag) -{ - MP4Integer32Property* pCount = - new MP4Integer32Property(parentAtom, "entryCount"); - pCount->SetImplicit(); - AddProperty(pCount); /* 0 */ - - MP4TableProperty* pTable = - new MP4TableProperty(parentAtom, "entries", pCount); - AddProperty(pTable); /* 1 */ - - pTable->AddProperty( /* 1, 0 */ - new MP4BitfieldProperty(pTable->GetParentAtom(), "objectDescriptorId", 10)); -} - -void MP4ODRemoveDescriptor::Read(MP4File& file) -{ - // table entry count computed from descriptor size - ((MP4Integer32Property*)m_pProperties[0])->SetReadOnly(false); - ((MP4Integer32Property*)m_pProperties[0])->SetValue((m_size * 8) / 10); - ((MP4Integer32Property*)m_pProperties[0])->SetReadOnly(true); - - MP4Descriptor::Read(file); -} - -MP4ESUpdateDescriptor::MP4ESUpdateDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom, MP4ESUpdateODCommandTag) -{ - AddProperty( /* 0 */ - new MP4BitfieldProperty(parentAtom, "objectDescriptorId", 10)); - AddProperty( /* 1 */ - new MP4BitfieldProperty(parentAtom, "pad", 6)); - AddProperty( /* 2 */ - new MP4DescriptorProperty(parentAtom, "esIdRefs", - MP4ESIDRefDescrTag, 0, Required, Many)); -} - -// LATER might be able to combine with ESUpdateDescriptor -MP4ESRemoveDescriptor::MP4ESRemoveDescriptor(MP4Atom& parentAtom) - : MP4Descriptor(parentAtom, MP4ESRemoveODCommandTag) -{ - AddProperty( /* 0 */ - new MP4BitfieldProperty(parentAtom, "objectDescriptorId", 10)); - AddProperty( /* 1 */ - new MP4BitfieldProperty(parentAtom, "pad", 6)); - AddProperty( /* 2 */ - new MP4DescriptorProperty(parentAtom, "esIdRefs", - MP4ESIDRefDescrTag, 0, Required, Many)); -} - -MP4Descriptor* CreateODCommand(MP4Atom& parentAtom, uint8_t tag) -{ - MP4Descriptor* pDescriptor = NULL; - - switch (tag) { - case MP4ODUpdateODCommandTag: - pDescriptor = new MP4ODUpdateDescriptor(parentAtom); - break; - case MP4ODRemoveODCommandTag: - pDescriptor = new MP4ODRemoveDescriptor(parentAtom); - break; - case MP4ESUpdateODCommandTag: - pDescriptor = new MP4ESUpdateDescriptor(parentAtom); - break; - case MP4ESRemoveODCommandTag: - pDescriptor = new MP4ESRemoveDescriptor(parentAtom); - break; - } - return pDescriptor; -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/odcommands.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/odcommands.h deleted file mode 100644 index 08f11974..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/odcommands.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#ifndef MP4V2_IMPL_ODCOMMANDS_H -#define MP4V2_IMPL_ODCOMMANDS_H - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -// OD stream command descriptors -const uint8_t MP4ODUpdateODCommandTag = 0x01; -const uint8_t MP4ODRemoveODCommandTag = 0x02; -const uint8_t MP4ESUpdateODCommandTag = 0x03; -const uint8_t MP4ESRemoveODCommandTag = 0x04; -const uint8_t MP4IPMPUpdateODCommandTag = 0x05; -const uint8_t MP4IPMPRemoveODCommandTag = 0x06; -const uint8_t MP4ESRemoveRefODCommandTag = 0x07; - -class MP4ODUpdateDescriptor : public MP4Descriptor { -public: - MP4ODUpdateDescriptor(MP4Atom& parentAtom); -private: - MP4ODUpdateDescriptor(); - MP4ODUpdateDescriptor ( const MP4ODUpdateDescriptor &src ); - MP4ODUpdateDescriptor &operator= ( const MP4ODUpdateDescriptor &src ); -}; - -class MP4ODRemoveDescriptor : public MP4Descriptor { -public: - MP4ODRemoveDescriptor(MP4Atom& parentAtom); - void Read(MP4File& file); -private: - MP4ODRemoveDescriptor(); - MP4ODRemoveDescriptor ( const MP4ODRemoveDescriptor &src ); - MP4ODRemoveDescriptor &operator= ( const MP4ODRemoveDescriptor &src ); -}; - -class MP4ESUpdateDescriptor : public MP4Descriptor { -public: - MP4ESUpdateDescriptor(MP4Atom& parentAtom); -private: - MP4ESUpdateDescriptor(); - MP4ESUpdateDescriptor ( const MP4ESUpdateDescriptor &src ); - MP4ESUpdateDescriptor &operator= ( const MP4ESUpdateDescriptor &src ); -}; - -class MP4ESRemoveDescriptor : public MP4Descriptor { -public: - MP4ESRemoveDescriptor(MP4Atom& parentAtom); -private: - MP4ESRemoveDescriptor(); - MP4ESRemoveDescriptor ( const MP4ESRemoveDescriptor &src ); - MP4ESRemoveDescriptor &operator= ( const MP4ESRemoveDescriptor &src ); -}; - -MP4Descriptor* CreateODCommand(MP4Atom& parentAtom, uint8_t tag); - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_ODCOMMANDS_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qosqualifiers.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qosqualifiers.cpp deleted file mode 100644 index 02d54c1e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qosqualifiers.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -#if 1 -MP4QosDescriptorBase::MP4QosDescriptorBase (MP4Atom& parentAtom, uint8_t tag) - : MP4Descriptor(parentAtom, tag) -{ - switch (tag) { - case MP4QosDescrTag: - AddProperty( /* 0 */ - new MP4Integer8Property(parentAtom, "predefined")); - AddProperty( /* 1 */ - new MP4QosQualifierProperty(parentAtom, "qualifiers", - MP4QosTagsStart, - MP4QosTagsEnd, Optional, Many)); - break; - case MP4MaxDelayQosTag: - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "maxDelay")); - break; - case MP4PrefMaxDelayQosTag: - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "prefMaxDelay")); - break; - case MP4LossProbQosTag: - AddProperty( /* 0 */ - new MP4Float32Property(parentAtom, "lossProb")); - break; - case MP4MaxGapLossQosTag: - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "maxGapLoss")); - break; - case MP4MaxAUSizeQosTag: - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "maxAUSize")); - break; - case MP4AvgAUSizeQosTag: - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "avgAUSize")); - break; - case MP4MaxAURateQosTag: - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "maxAURate")); - break; - } -} - -#else -MP4QosDescriptor::MP4QosDescriptor(MP4Atom &parentAtom) - : MP4Descriptor(parentAtom, MP4QosDescrTag) -{ - AddProperty( /* 0 */ - new MP4Integer8Property(parentAtom, "predefined")); - AddProperty( /* 1 */ - new MP4QosQualifierProperty(parentAtom, "qualifiers", - MP4QosTagsStart, MP4QosTagsEnd, Optional, Many)); -} - -MP4MaxDelayQosQualifier::MP4MaxDelayQosQualifier(MP4Atom &parentAtom) - : MP4QosQualifier(parentAtom, MP4MaxDelayQosTag) -{ - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "maxDelay")); -} - -MP4PrefMaxDelayQosQualifier::MP4PrefMaxDelayQosQualifier(MP4Atom &parentAtom) - : MP4QosQualifier(parentAtom, MP4PrefMaxDelayQosTag) -{ - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "prefMaxDelay")); -} - -MP4LossProbQosQualifier::MP4LossProbQosQualifier(MP4Atom &parentAtom) - : MP4QosQualifier(parentAtom, MP4LossProbQosTag) -{ - AddProperty( /* 0 */ - new MP4Float32Property(parentAtom, "lossProb")); -} - -MP4MaxGapLossQosQualifier::MP4MaxGapLossQosQualifier(MP4Atom &parentAtom) - : MP4QosQualifier(parentAtom, MP4MaxGapLossQosTag) -{ - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "maxGapLoss")); -} - -MP4MaxAUSizeQosQualifier::MP4MaxAUSizeQosQualifier(MP4Atom &parentAtom) - : MP4QosQualifier(parentAtom, MP4MaxAUSizeQosTag) -{ - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "maxAUSize")); -} - -MP4AvgAUSizeQosQualifier::MP4AvgAUSizeQosQualifier(MP4Atom &parentAtom) - : MP4QosQualifier(parentAtom, MP4AvgAUSizeQosTag) -{ - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "avgAUSize")); -} - -MP4MaxAURateQosQualifier::MP4MaxAURateQosQualifier(MP4Atom &parentAtom) - : MP4QosQualifier(parentAtom, MP4MaxAURateQosTag) -{ - AddProperty( /* 0 */ - new MP4Integer32Property(parentAtom, "maxAURate")); -} -#endif -MP4UnknownQosQualifier::MP4UnknownQosQualifier(MP4Atom &parentAtom) - : MP4Descriptor(parentAtom) -{ - AddProperty( /* 0 */ - new MP4BytesProperty(parentAtom, "data")); -} - -void MP4UnknownQosQualifier::Read(MP4File& file) -{ - ReadHeader(file); - - /* byte properties need to know how long they are before reading */ - ((MP4BytesProperty*)m_pProperties[0])->SetValueSize(m_size); - - ReadProperties(file); -} - -MP4Descriptor* MP4QosQualifierProperty::CreateDescriptor(MP4Atom &parentAtom, uint8_t tag) -{ - MP4Descriptor* pDescriptor = NULL; - switch (tag) { - case MP4MaxDelayQosTag: - case MP4PrefMaxDelayQosTag: - case MP4LossProbQosTag: - case MP4MaxGapLossQosTag: - case MP4MaxAUSizeQosTag: - case MP4AvgAUSizeQosTag: - case MP4MaxAURateQosTag: - pDescriptor = new MP4QosDescriptorBase(parentAtom, tag); - break; - default: - pDescriptor = new MP4UnknownQosQualifier(parentAtom); - pDescriptor->SetTag(tag); - } - - return pDescriptor; -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qosqualifiers.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qosqualifiers.h deleted file mode 100644 index 5bd4bd0e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qosqualifiers.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#ifndef MP4V2_IMPL_QOSQUALIFIERS_H -#define MP4V2_IMPL_QOSQUALIFIERS_H - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -const uint8_t MP4QosDescrTag = 0x0C; -const uint8_t MP4QosTagsStart = 0x01; -const uint8_t MP4MaxDelayQosTag = 0x01; -const uint8_t MP4PrefMaxDelayQosTag = 0x02; -const uint8_t MP4LossProbQosTag = 0x03; -const uint8_t MP4MaxGapLossQosTag = 0x04; -const uint8_t MP4MaxAUSizeQosTag = 0x41; -const uint8_t MP4AvgAUSizeQosTag = 0x42; -const uint8_t MP4MaxAURateQosTag = 0x43; -const uint8_t MP4QosTagsEnd = 0xFF; - -class MP4QosDescriptorBase : public MP4Descriptor { -public: - MP4QosDescriptorBase(MP4Atom &parentAtom, uint8_t tag); -private: - MP4QosDescriptorBase(); - MP4QosDescriptorBase ( const MP4QosDescriptorBase &src ); - MP4QosDescriptorBase &operator= ( const MP4QosDescriptorBase &src ); -}; - -class MP4UnknownQosQualifier : public MP4Descriptor { -public: - MP4UnknownQosQualifier(MP4Atom &parentAtom); - void Read(MP4File& file); -private: - MP4UnknownQosQualifier(); - MP4UnknownQosQualifier ( const MP4UnknownQosQualifier &src ); - MP4UnknownQosQualifier &operator= ( const MP4UnknownQosQualifier &src ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_QOSQUALIFIERS_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/ColorParameterBox.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/ColorParameterBox.cpp deleted file mode 100644 index 7581c63b..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/ColorParameterBox.cpp +++ /dev/null @@ -1,345 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "impl.h" - -namespace mp4v2 { namespace impl { namespace qtff { - -/////////////////////////////////////////////////////////////////////////////// - -namespace { - const string BOX_CODE = "colr"; - - bool findColorParameterBox( MP4FileHandle file, MP4Atom& coding, MP4Atom*& colr ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ColorParameterBox::add( MP4FileHandle file, uint16_t trackIndex, const Item& item ) -{ - MP4Atom* coding; - - if( !MP4_IS_VALID_FILE_HANDLE( file )) - throw new Exception( "invalid file handle", __FILE__, __LINE__, __FUNCTION__ ); - - if( findCoding( file, trackIndex, coding )) - throw new Exception( "supported coding not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Atom* colr; - if( !findColorParameterBox( file, *coding, colr )) - throw new Exception( "colr-box already exists", __FILE__, __LINE__, __FUNCTION__ ); - - colr = MP4Atom::CreateAtom( *((MP4File *)file), coding, BOX_CODE.c_str() ); - coding->AddChildAtom( colr ); - colr->Generate(); - - MP4StringProperty* type; - MP4Integer16Property* primariesIndex; - MP4Integer16Property* transferFunctionIndex; - MP4Integer16Property* matrixIndex; - - if( colr->FindProperty( "colr.colorParameterType", (MP4Property**)&type )) - type->SetValue( "nclc" ); - - if( colr->FindProperty( "colr.primariesIndex", (MP4Property**)&primariesIndex )) - primariesIndex->SetValue( item.primariesIndex ); - - if( colr->FindProperty( "colr.transferFunctionIndex", (MP4Property**)&transferFunctionIndex )) - transferFunctionIndex->SetValue( item.transferFunctionIndex ); - - if( colr->FindProperty( "colr.matrixIndex", (MP4Property**)&matrixIndex )) - matrixIndex->SetValue( item.matrixIndex ); - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ColorParameterBox::add( MP4FileHandle file, MP4TrackId trackId, const Item& item ) -{ - MP4File& mp4 = *((MP4File*)file); - return add( file, mp4.FindTrackIndex( trackId ), item ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ColorParameterBox::get( MP4FileHandle file, uint16_t trackIndex, Item& item ) -{ - item.reset(); - - MP4Atom* coding; - if( findCoding( file, trackIndex, coding )) - throw new Exception( "supported coding not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Atom* colr; - if( findColorParameterBox( file, *coding, colr )) - throw new Exception( "colr-box not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Integer16Property* primariesIndex; - MP4Integer16Property* transferFunctionIndex; - MP4Integer16Property* matrixIndex; - - if( colr->FindProperty( "colr.primariesIndex", (MP4Property**)&primariesIndex )) - item.primariesIndex = primariesIndex->GetValue(); - - if( colr->FindProperty( "colr.transferFunctionIndex", (MP4Property**)&transferFunctionIndex )) - item.transferFunctionIndex = transferFunctionIndex->GetValue(); - - if( colr->FindProperty( "colr.matrixIndex", (MP4Property**)&matrixIndex )) - item.matrixIndex = matrixIndex->GetValue(); - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ColorParameterBox::get( MP4FileHandle file, MP4TrackId trackId, Item& item ) -{ - MP4File& mp4 = *((MP4File*)file); - return get( file, mp4.FindTrackIndex( trackId ), item ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ColorParameterBox::list( MP4FileHandle file, ItemList& itemList ) -{ - itemList.clear(); - MP4File& mp4 = *((MP4File*)file); - - const uint16_t trackc = mp4.GetNumberOfTracks(); - for( uint16_t i = 0; i < trackc; i++) { - MP4TrackId id = mp4.FindTrackId( i ); - if( id == MP4_INVALID_TRACK_ID ) - continue; - - const char* type = mp4.GetTrackType( id ); - if( !type ) - continue; - - itemList.resize( itemList.size() + 1 ); - IndexedItem& xitem = itemList[itemList.size()-1]; - - xitem.trackIndex = i; - xitem.trackId = id; - - bool success = false; - try { - success = !get( file, i, xitem.item ); - } - catch( Exception* x ) { - delete x; - } - - if( !success ) { - itemList.resize( itemList.size() - 1 ); - continue; - } - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ColorParameterBox::remove( MP4FileHandle file, uint16_t trackIndex ) -{ - MP4Atom* coding; - if( findCoding( file, trackIndex, coding )) - throw new Exception( "supported coding not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Atom* colr; - if( findColorParameterBox( file, *coding, colr )) - throw new Exception( "colr-box not found", __FILE__, __LINE__, __FUNCTION__ ); - - coding->DeleteChildAtom( colr ); - delete colr; - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ColorParameterBox::remove( MP4FileHandle file, MP4TrackId trackId ) -{ - MP4File& mp4 = *((MP4File*)file); - return remove( file, mp4.FindTrackIndex( trackId )); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ColorParameterBox::set( MP4FileHandle file, uint16_t trackIndex, const Item& item ) -{ - MP4Atom* coding; - if( findCoding( file, trackIndex, coding )) - throw new Exception( "supported coding not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Atom* colr; - if( findColorParameterBox( file, *coding, colr )) - throw new Exception( "colr-box not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Integer16Property* primariesIndex; - MP4Integer16Property* transferFunctionIndex; - MP4Integer16Property* matrixIndex; - - if( colr->FindProperty( "colr.primariesIndex", (MP4Property**)&primariesIndex )) - primariesIndex->SetValue( item.primariesIndex ); - - if( colr->FindProperty( "colr.transferFunctionIndex", (MP4Property**)&transferFunctionIndex )) - transferFunctionIndex->SetValue( item.transferFunctionIndex ); - - if( colr->FindProperty( "colr.matrixIndex", (MP4Property**)&matrixIndex )) - matrixIndex->SetValue( item.matrixIndex ); - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ColorParameterBox::set( MP4FileHandle file, MP4TrackId trackId, const Item& item ) -{ - MP4File& mp4 = *((MP4File*)file); - return set( file, mp4.FindTrackIndex( trackId ), item ); -} - -/////////////////////////////////////////////////////////////////////////////// - -ColorParameterBox::IndexedItem::IndexedItem() - : trackIndex ( numeric_limits::max() ) - , trackId ( MP4_INVALID_TRACK_ID ) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -ColorParameterBox::Item::Item() - : primariesIndex ( 6 ) - , transferFunctionIndex ( 1 ) - , matrixIndex ( 6 ) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -void -ColorParameterBox::Item::convertFromCSV( const string& text ) -{ - istringstream iss( text ); - char delim; - - iss >> primariesIndex; - iss >> delim; - iss >> transferFunctionIndex; - iss >> delim; - iss >> matrixIndex; - - // input was good if we end up with only eofbit set - if( iss.rdstate() != ios::eofbit ) { - reset(); - ostringstream xss; - xss << "invalid ColorParameterBox format" - << " (expecting: INDEX1,INDEX2,INDEX3)" - << " got: " << text; - throw new Exception( xss.str(), __FILE__, __LINE__, __FUNCTION__ ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -string -ColorParameterBox::Item::convertToCSV() const -{ - string buffer; - return convertToCSV( buffer ); -} - -/////////////////////////////////////////////////////////////////////////////// - -string& -ColorParameterBox::Item::convertToCSV( string& buffer ) const -{ - ostringstream oss; - oss << primariesIndex << ',' << transferFunctionIndex << ',' << matrixIndex; - buffer = oss.str(); - return buffer; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -ColorParameterBox::Item::reset() -{ - primariesIndex = 6; - transferFunctionIndex = 1; - matrixIndex = 6; -} - -/////////////////////////////////////////////////////////////////////////////// - -namespace { - -/////////////////////////////////////////////////////////////////////////////// - -bool -findColorParameterBox( MP4FileHandle file, MP4Atom& coding, MP4Atom*& colr ) -{ - colr = NULL; - - MP4Atom* found = NULL; - const uint32_t atomc = coding.GetNumberOfChildAtoms(); - for( uint32_t i = 0; i < atomc; i++ ) { - MP4Atom* atom = coding.GetChildAtom( i ); - if( BOX_CODE != atom->GetType() ) - continue; - found = atom; - } - if( !found ) - return true; - - MP4StringProperty* type; - if( !found->FindProperty( "colr.colorParameterType", (MP4Property**)&type )) - return true; - - const string type_nclc = "nclc"; - if( type_nclc != type->GetValue() ) - return true; - - colr = found; - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -} // anonymous - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::qtff diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/ColorParameterBox.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/ColorParameterBox.h deleted file mode 100644 index 9a27fcd4..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/ColorParameterBox.h +++ /dev/null @@ -1,207 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_QTFF_COLORPARAMETERBOX_H -#define MP4V2_IMPL_QTFF_COLORPARAMETERBOX_H - -namespace mp4v2 { namespace impl { namespace qtff { - -/////////////////////////////////////////////////////////////////////////////// - -/// Functional class for colr-box (Color Parameter Box) support. -/// -/// A colr-box is expected to be contained in a video track which is one of -/// the following coding types: -/// @li avc1 -/// @li mp4v -/// -/// This implementation assumes a maximum count of 1 for -/// VideoSampleEntry of the supported codings. -/// -/// This implementation supports parameter-type 'nclc' only. -/// -class MP4V2_EXPORT ColorParameterBox -{ -public: - /// Data object for colr-box item. - /// This object correlates to one colr-box (Color Parameter Box). - /// - class MP4V2_EXPORT Item - { - public: - Item(); - - /// reset to state of newly constructed object. - void reset(); - - // convert from string CSV format. - void convertFromCSV( const string& csv ); - - // convert to string CSV format. - string convertToCSV() const; - - // convert to string CSV format with buffer. - string& convertToCSV( string& buffer ) const; - - public: - /// a 16-bit unsigned integer index. - /// Specifies an index into a table specifying the CIE 1931 xy - /// chromaticity coordinates of the white point and the red, green, and - /// blue primaries. The table of primaries specifies the white point and - /// the red, green, and blue primary color points for a video system. - uint16_t primariesIndex; - - /// a 16-bit unsigned integer index. - /// Specifies an an index into a table specifying the nonlinear transfer - /// function coefficients used to translate between RGB color space values - /// and Y′CbCr values. The table of transfer function coefficients - /// specifies the nonlinear function coefficients used to translate - /// between the stored Y′CbCr values and a video capture or display - /// system. - uint16_t transferFunctionIndex; - - /// a 16-bit unsigned integer index. - /// Specifies an index into a table specifying the transformation matrix - /// coefficients used to translate between RGB color space values and - /// Y′CbCr values. The table of matrixes specifies the matrix used during - /// the translation. - uint16_t matrixIndex; - }; - - class MP4V2_EXPORT IndexedItem { - public: - IndexedItem(); - - uint16_t trackIndex; - uint16_t trackId; - Item item; - }; - - typedef vector ItemList; - - static bool list( MP4FileHandle file, ItemList& itemList ); - - /// Add colr-box by track-index. - /// - /// This function adds a colr-box to trackId of file. - /// The track must be a video-track and match one of the supporting - /// codings. - /// - /// @param file on which to operate. - /// @param trackIndex on which to operate. - /// @param item colr-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool add( MP4FileHandle file, uint16_t trackIndex, const Item& item ); - - /// Add colr-box by track-id. - /// - /// This function adds a colr-box to trackId of file. - /// The track must be a video-track and match one of the supporting - /// codings. - /// - /// @param file on which to operate. - /// @param trackId on which to operate. - /// @param item colr-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool add( MP4FileHandle file, MP4TrackId trackId, const Item& item ); - - /// Store colr-box (Color Parameter Box) properties by track-index. - /// - /// This function sets the properties of a colr-box - /// (Color Parameter Box). - /// - /// @param file on which to operate. - /// @param trackIndex on which to operate. - /// @param item colr-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool set( MP4FileHandle file, uint16_t trackIndex, const Item& item ); - - /// Store colr-box (Color Parameter Box) properties by track-id. - /// - /// This function sets the properties of a colr-box - /// (Color Parameter Box). - /// - /// @param file on which to operate. - /// @param trackId on which to operate. - /// @param item colr-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool set( MP4FileHandle file, MP4TrackId trackId, const Item& item ); - - /// Fetch colr-box (Color Parameter Box) properties by track-index. - /// - /// This function gets the properties of a colr-box - /// (Color Parameter Box). - /// - /// @param file on which to operate. - /// @param trackIndex on which to operate. - /// @param item colr-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool get( MP4FileHandle file, uint16_t trackIndex, Item& item ); - - /// Fetch colr-box (Color Parameter Box) properties by track-id. - /// - /// This function gets the properties of a colr-box - /// (Color Parameter Box). - /// - /// @param file on which to operate. - /// @param trackId on which to operate. - /// @param item colr-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool get( MP4FileHandle file, MP4TrackId trackId, Item& item ); - - /// Remove colr-box (Color Parameter Box) by track-index. - /// - /// @param file on which to operate. - /// @param trackIndex on which to operate. - /// - /// @return true on failure, false on success. - /// - static bool remove( MP4FileHandle file, uint16_t trackIndex ); - - /// Remove colr-box (Color Parameter Box) by track-id. - /// - /// @param file on which to operate. - /// @param trackId on which to operate. - /// - /// @return true on failure, false on success. - /// - static bool remove( MP4FileHandle file, MP4TrackId trackId ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::qtff - -#endif // MP4V2_IMPL_QTTF_COLORPARAMETERBOX_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/PictureAspectRatioBox.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/PictureAspectRatioBox.cpp deleted file mode 100644 index 4fe5916d..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/PictureAspectRatioBox.cpp +++ /dev/null @@ -1,313 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "impl.h" - -namespace mp4v2 { namespace impl { namespace qtff { - -/////////////////////////////////////////////////////////////////////////////// - -namespace { - const string BOX_CODE = "pasp"; - - bool findPictureAspectRatioBox( MP4FileHandle file, MP4Atom& coding, MP4Atom*& pasp ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -PictureAspectRatioBox::add( MP4FileHandle file, uint16_t trackIndex, const Item& item ) -{ - MP4Atom* coding; - - if( !MP4_IS_VALID_FILE_HANDLE( file )) - throw new Exception( "invalid file handle", __FILE__, __LINE__, __FUNCTION__ ); - - if( findCoding( file, trackIndex, coding )) - throw new Exception( "supported coding not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Atom* pasp; - if( !findPictureAspectRatioBox( file, *coding, pasp )) - throw new Exception( "pasp-box already exists", __FILE__, __LINE__, __FUNCTION__ ); - - pasp = MP4Atom::CreateAtom( *((MP4File *)file), coding, BOX_CODE.c_str() ); - coding->AddChildAtom( pasp ); - pasp->Generate(); - - MP4Integer16Property* hSpacing; - MP4Integer16Property* vSpacing; - - if( pasp->FindProperty( "pasp.hSpacing", (MP4Property**)&hSpacing )) - hSpacing->SetValue( item.hSpacing ); - - if( pasp->FindProperty( "pasp.vSpacing", (MP4Property**)&vSpacing )) - vSpacing->SetValue( item.vSpacing ); - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -PictureAspectRatioBox::add( MP4FileHandle file, MP4TrackId trackId, const Item& item ) -{ - MP4File& mp4 = *((MP4File*)file); - return add( file, mp4.FindTrackIndex( trackId ), item ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -PictureAspectRatioBox::get( MP4FileHandle file, uint16_t trackIndex, Item& item ) -{ - item.reset(); - - MP4Atom* coding; - if( findCoding( file, trackIndex, coding )) - throw new Exception( "supported coding not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Atom* pasp; - if( findPictureAspectRatioBox( file, *coding, pasp )) - throw new Exception( "pasp-box not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Integer16Property* hSpacing; - MP4Integer16Property* vSpacing; - - if( pasp->FindProperty( "pasp.hSpacing", (MP4Property**)&hSpacing )) - item.hSpacing = hSpacing->GetValue(); - - if( pasp->FindProperty( "pasp.vSpacing", (MP4Property**)&vSpacing )) - item.vSpacing = vSpacing->GetValue(); - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -PictureAspectRatioBox::get( MP4FileHandle file, MP4TrackId trackId, Item& item ) -{ - MP4File& mp4 = *((MP4File*)file); - return get( file, mp4.FindTrackIndex( trackId ), item ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -PictureAspectRatioBox::list( MP4FileHandle file, ItemList& itemList ) -{ - itemList.clear(); - MP4File& mp4 = *((MP4File*)file); - - const uint16_t trackc = mp4.GetNumberOfTracks(); - for( uint16_t i = 0; i < trackc; i++) { - MP4TrackId id = mp4.FindTrackId( i ); - if( id == MP4_INVALID_TRACK_ID ) - continue; - - const char* type = mp4.GetTrackType( id ); - if( !type ) - continue; - - itemList.resize( itemList.size() + 1 ); - IndexedItem& xitem = itemList[itemList.size()-1]; - - xitem.trackIndex = i; - xitem.trackId = id; - - bool success = false; - try { - success = !get( file, i, xitem.item ); - } - catch( Exception* x ) { - delete x; - } - - if( !success ) { - itemList.resize( itemList.size() - 1 ); - continue; - } - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -PictureAspectRatioBox::remove( MP4FileHandle file, uint16_t trackIndex ) -{ - MP4Atom* coding; - if( findCoding( file, trackIndex, coding )) - throw new Exception( "supported coding not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Atom* pasp; - if( findPictureAspectRatioBox( file, *coding, pasp )) - throw new Exception( "pasp-box not found", __FILE__, __LINE__, __FUNCTION__ ); - - coding->DeleteChildAtom( pasp ); - delete pasp; - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -PictureAspectRatioBox::remove( MP4FileHandle file, MP4TrackId trackId ) -{ - MP4File& mp4 = *((MP4File*)file); - return remove( file, mp4.FindTrackIndex( trackId )); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -PictureAspectRatioBox::set( MP4FileHandle file, uint16_t trackIndex, const Item& item ) -{ - MP4Atom* coding; - if( findCoding( file, trackIndex, coding )) - throw new Exception( "supported coding not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Atom* pasp; - if( findPictureAspectRatioBox( file, *coding, pasp )) - throw new Exception( "pasp-box not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4Integer16Property* hSpacing; - MP4Integer16Property* vSpacing; - - if( pasp->FindProperty( "pasp.hSpacing", (MP4Property**)&hSpacing )) - hSpacing->SetValue( item.hSpacing ); - - if( pasp->FindProperty( "pasp.vSpacing", (MP4Property**)&vSpacing )) - vSpacing->SetValue( item.vSpacing ); - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -PictureAspectRatioBox::set( MP4FileHandle file, MP4TrackId trackId, const Item& item ) -{ - MP4File& mp4 = *((MP4File*)file); - return set( file, mp4.FindTrackIndex( trackId ), item ); -} - -/////////////////////////////////////////////////////////////////////////////// - -PictureAspectRatioBox::IndexedItem::IndexedItem() - : trackIndex ( numeric_limits::max() ) - , trackId ( MP4_INVALID_TRACK_ID ) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -PictureAspectRatioBox::Item::Item() - : hSpacing ( 1 ) - , vSpacing ( 1 ) -{ -} - -/////////////////////////////////////////////////////////////////////////////// - -void -PictureAspectRatioBox::Item::reset() -{ - hSpacing = 1; - vSpacing = 1; -} - -/////////////////////////////////////////////////////////////////////////////// - -void -PictureAspectRatioBox::Item::convertFromCSV( const string& text ) -{ - istringstream iss( text ); - char delim; - - iss >> hSpacing; - iss >> delim; - iss >> vSpacing; - - // input was good if we end up with only eofbit set - if( iss.rdstate() != ios::eofbit ) { - reset(); - ostringstream xss; - xss << "invalid PcitureAspectRatioBox format" - << " (expecting: hSpacing,vSpacing)" - << " got: " << text; - throw new Exception( xss.str(), __FILE__, __LINE__, __FUNCTION__ ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -string -PictureAspectRatioBox::Item::convertToCSV() const -{ - string buffer; - return convertToCSV( buffer ); -} - -/////////////////////////////////////////////////////////////////////////////// - -string& -PictureAspectRatioBox::Item::convertToCSV( string& buffer ) const -{ - ostringstream oss; - oss << hSpacing << ',' << vSpacing; - buffer = oss.str(); - return buffer; -} - -/////////////////////////////////////////////////////////////////////////////// - -namespace { - -/////////////////////////////////////////////////////////////////////////////// - -bool -findPictureAspectRatioBox( MP4FileHandle file, MP4Atom& coding, MP4Atom*& pasp ) -{ - pasp = NULL; - - MP4Atom* found = NULL; - const uint32_t atomc = coding.GetNumberOfChildAtoms(); - for( uint32_t i = 0; i < atomc; i++ ) { - MP4Atom* atom = coding.GetChildAtom( i ); - if( BOX_CODE != atom->GetType() ) - continue; - found = atom; - } - if( !found ) - return true; - - pasp = found; - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -}}}} // namespace mp4v2::impl::qtff::anonymous diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/PictureAspectRatioBox.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/PictureAspectRatioBox.h deleted file mode 100644 index 75e4c8fa..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/PictureAspectRatioBox.h +++ /dev/null @@ -1,188 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_QTFF_PICTUREAPSECTRATIOBOX_H -#define MP4V2_IMPL_QTFF_PICTUREAPSECTRATIOBOX_H - -namespace mp4v2 { namespace impl { namespace qtff { - using namespace std; - -/////////////////////////////////////////////////////////////////////////////// - -/// Functional class for pasp-box (Picture Aspect Ratio Box) support. -/// -/// A pasp-box is expected to be contained in a video track which is one of -/// the following coding types: -/// @li avc1 -/// @li mp4v -/// -/// This implementation assumes a maximum count of 1 for -/// VideoSampleEntry of the supported codings. -/// -class MP4V2_EXPORT PictureAspectRatioBox -{ -public: - /// Data object for pasp-box item. - /// This object correlates to one pasp-box (Picture Aspect Ratio Box). - class MP4V2_EXPORT Item - { - public: - Item (); - - /// reset to state of newly constructed object. - void reset(); - - // convert from string CSV format. - void convertFromCSV( const string& csv ); - - // convert to string CSV format. - string convertToCSV() const; - - // convert to string CSV format with buffer. - string& convertToCSV( string& buffer ) const; - - public: - /// an unsigned 32-bit integer specifying the vertical spacing of pixels. - uint32_t hSpacing; - - /// an unsigned 32-bit integer specifying the horizontal spacing of pixels. - uint32_t vSpacing; - }; - - class MP4V2_EXPORT IndexedItem { - public: - IndexedItem(); - - uint16_t trackIndex; - uint16_t trackId; - Item item; - }; - - typedef vector ItemList; - - static bool list( MP4FileHandle file, ItemList& itemList ); - - /// Add pasp-box by track-index. - /// - /// This function adds a pasp-box to trackId of file. - /// The track must be a video-track and match one of the supporting - /// codings. - /// - /// @param file on which to operate. - /// @param trackIndex on which to operate. - /// @param item pasp-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool add( MP4FileHandle file, uint16_t trackIndex, const Item& item ); - - /// Add pasp-box by track-id. - /// - /// This function adds a pasp-box to trackId of file. - /// The track must be a video-track and match one of the supporting - /// codings. - /// - /// @param file on which to operate. - /// @param trackId on which to operate. - /// @param item pasp-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool add( MP4FileHandle file, MP4TrackId trackId, const Item& item ); - - /// Store pasp-box (Color Parameter Box) properties by track-index. - /// - /// This function sets the properties of a pasp-box - /// (Color Parameter Box). - /// - /// @param file on which to operate. - /// @param trackIndex on which to operate. - /// @param item pasp-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool set( MP4FileHandle file, uint16_t trackIndex, const Item& item ); - - /// Store pasp-box (Color Parameter Box) properties by track-id. - /// - /// This function sets the properties of a pasp-box - /// (Color Parameter Box). - /// - /// @param file on which to operate. - /// @param trackId on which to operate. - /// @param item pasp-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool set( MP4FileHandle file, MP4TrackId trackId, const Item& item ); - - /// Fetch pasp-box (Color Parameter Box) properties by track-index. - /// - /// This function gets the properties of a pasp-box - /// (Color Parameter Box). - /// - /// @param file on which to operate. - /// @param trackIndex on which to operate. - /// @param item pasp-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool get( MP4FileHandle file, uint16_t trackIndex, Item& item ); - - /// Fetch pasp-box (Color Parameter Box) properties by track-id. - /// - /// This function gets the properties of a pasp-box - /// (Color Parameter Box). - /// - /// @param file on which to operate. - /// @param trackId on which to operate. - /// @param item pasp-box properties to set. - /// - /// @return true on failure, false on success. - /// - static bool get( MP4FileHandle file, MP4TrackId trackId, Item& item ); - - /// Remove pasp-box (Color Parameter Box) by track-index. - /// - /// @param file on which to operate. - /// @param trackIndex on which to operate. - /// - /// @return true on failure, false on success. - /// - static bool remove( MP4FileHandle file, uint16_t trackIndex ); - - /// Remove pasp-box (Color Parameter Box) by track-id. - /// - /// @param file on which to operate. - /// @param trackId on which to operate. - /// - /// @return true on failure, false on success. - /// - static bool remove( MP4FileHandle file, MP4TrackId trackId ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::qtff - -#endif // MP4V2_IMPL_QTTF_PICTUREAPSECTRATIOBOX_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/coding.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/coding.cpp deleted file mode 100644 index 29eaf779..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/coding.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "impl.h" - -namespace mp4v2 { namespace impl { namespace qtff { - -/////////////////////////////////////////////////////////////////////////////// - -namespace { - class StaticData - { - public: - StaticData() - { - supportedCodings.insert( "avc1" ); - supportedCodings.insert( "mp4v" ); - } - - set supportedCodings; - }; - - const StaticData STATIC_DATA; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -findCoding( MP4FileHandle file, uint16_t trackIndex, MP4Atom*& coding ) -{ - coding = NULL; - MP4File& mp4 = *((MP4File*)file); - - if( trackIndex == numeric_limits::max() ) { - ostringstream xss; - xss << "invalid track-index: " << trackIndex; - throw new Exception( xss.str(), __FILE__, __LINE__, __FUNCTION__ ); - } - - ostringstream oss; - oss << "moov.trak[" << trackIndex << "].mdia.hdlr"; - MP4Atom* hdlr = mp4.FindAtom( oss.str().c_str() ); - if( !hdlr ) - throw new Exception( "media handler not found", __FILE__, __LINE__, __FUNCTION__ ); - - MP4StringProperty* handlerType; - if( !hdlr->FindProperty( "hdlr.handlerType", (MP4Property**)&handlerType )) - throw new Exception( "media handler type-property not found", __FILE__, __LINE__, __FUNCTION__ ); - - const string video = "vide"; - if( video != handlerType->GetValue() ) - throw new Exception( "video-track required", __FILE__, __LINE__, __FUNCTION__ ); - - oss.str( "" ); - oss.clear(); - oss << "moov.trak[" << trackIndex << "].mdia.minf.stbl.stsd"; - MP4Atom* stsd = mp4.FindAtom( oss.str().c_str() ); - if( !stsd ) - throw new Exception( "media handler type-property not found", __FILE__, __LINE__, __FUNCTION__ ); - - // find first atom which is a supported coding - const uint32_t atomc = stsd->GetNumberOfChildAtoms(); - for( uint32_t i = 0; i < atomc; i++ ) { - MP4Atom* atom = stsd->GetChildAtom( i ); - if( STATIC_DATA.supportedCodings.find( atom->GetType() ) == STATIC_DATA.supportedCodings.end() ) - continue; - coding = atom; - } - - return coding == NULL; -} - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::qtff diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/coding.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/coding.h deleted file mode 100644 index 819c5cc9..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/coding.h +++ /dev/null @@ -1,37 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_QTFF_CODING_H -#define MP4V2_IMPL_QTFF_CODING_H - -namespace mp4v2 { namespace impl { namespace qtff { - -/////////////////////////////////////////////////////////////////////////////// - -bool findCoding( MP4FileHandle file, uint16_t trackIndex, MP4Atom*& coding ); - -/////////////////////////////////////////////////////////////////////////////// - -}}} // namespace mp4v2::impl::qtff - -#endif // MP4V2_IMPL_QTTF_CODING_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/impl.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/impl.h deleted file mode 100644 index 27c7edbd..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/impl.h +++ /dev/null @@ -1,34 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_QTFF_IMPL_H -#define MP4V2_IMPL_QTFF_IMPL_H - -/////////////////////////////////////////////////////////////////////////////// - -#include "src/impl.h" -#include "qtff.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_IMPL_QTFF_IMPL_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/qtff.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/qtff.h deleted file mode 100644 index 64038219..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/qtff/qtff.h +++ /dev/null @@ -1,45 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef MP4V2_IMPL_QTFF_QTFF_H -#define MP4V2_IMPL_QTFF_QTFF_H - -/// @namespace mp4v2::impl::qtff (private) QuickTime File Format. -/// WARNING: THIS IS A PRIVATE NAMESPACE. NOT FOR PUBLIC CONSUMPTION. -/// -/// This namespace implements some features that are specified by the -/// QuickTime File Format Specification, revision 2007-09-04. -/// -namespace mp4v2 { namespace impl { namespace qtff { - ; -}}} - -/////////////////////////////////////////////////////////////////////////////// - -#include "ColorParameterBox.h" -#include "PictureAspectRatioBox.h" -#include "coding.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_IMPL_QTTF_QTFF_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/rtphint.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/rtphint.cpp deleted file mode 100644 index e07309d6..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/rtphint.cpp +++ /dev/null @@ -1,1358 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#include "src/impl.h" - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -/* rtp hint track operations */ - -MP4RtpHintTrack::MP4RtpHintTrack(MP4File& file, MP4Atom& trakAtom) - : MP4Track(file, trakAtom) -{ - m_pRefTrack = NULL; - - m_pRtpMapProperty = NULL; - m_pPayloadNumberProperty = NULL; - m_pMaxPacketSizeProperty = NULL; - m_pSnroProperty = NULL; - m_pTsroProperty = NULL; - - m_pReadHint = NULL; - m_pReadHintSample = NULL; - m_readHintSampleSize = 0; - - m_pWriteHint = NULL; - m_writeHintId = MP4_INVALID_SAMPLE_ID; - m_writePacketId = 0; - - m_pTrpy = NULL; - m_pNump = NULL; - m_pTpyl = NULL; - m_pMaxr = NULL; - m_pDmed = NULL; - m_pDimm = NULL; - m_pPmax = NULL; - m_pDmax = NULL; - - m_pMaxPdu = NULL; - m_pAvgPdu = NULL; - m_pMaxBitRate = NULL; - m_pAvgBitRate = NULL; - - m_thisSec = 0; - m_bytesThisSec = 0; - m_bytesThisHint = 0; - m_bytesThisPacket = 0; -} - -MP4RtpHintTrack::~MP4RtpHintTrack() -{ - delete m_pReadHint; m_pReadHint = NULL; - MP4Free( m_pReadHintSample ); m_pReadHintSample = NULL; - delete m_pWriteHint; m_pWriteHint = NULL; -} - -void MP4RtpHintTrack::InitRefTrack() -{ - if (m_pRefTrack == NULL) { - MP4Integer32Property* pRefTrackIdProperty = NULL; - (void)m_trakAtom.FindProperty( - "trak.tref.hint.entries[0].trackId", - (MP4Property**)&pRefTrackIdProperty); - ASSERT(pRefTrackIdProperty); - - m_pRefTrack = m_File.GetTrack(pRefTrackIdProperty->GetValue()); - } -} - -void MP4RtpHintTrack::InitRtpStart() -{ - number::srandom( time::getLocalTimeMilliseconds() ); - - (void)m_trakAtom.FindProperty( - "trak.udta.hnti.rtp .snro.offset", - (MP4Property**)&m_pSnroProperty); - - if (m_pSnroProperty) { - m_rtpSequenceStart = m_pSnroProperty->GetValue(); - } else { - m_rtpSequenceStart = number::random32(); - } - - (void)m_trakAtom.FindProperty( - "trak.udta.hnti.rtp .tsro.offset", - (MP4Property**)&m_pTsroProperty); - - if (m_pTsroProperty) { - m_rtpTimestampStart = m_pTsroProperty->GetValue(); - } else { - m_rtpTimestampStart = number::random32(); - } -} - -void MP4RtpHintTrack::ReadHint( - MP4SampleId hintSampleId, - uint16_t* pNumPackets) -{ - if (m_pRefTrack == NULL) { - InitRefTrack(); - InitRtpStart(); - } - - // dispose of any old hint - delete m_pReadHint; m_pReadHint = NULL; - MP4Free( m_pReadHintSample ); m_pReadHintSample = NULL; - m_readHintSampleSize = 0; - - // read the desired hint sample into memory - ReadSample( - hintSampleId, - &m_pReadHintSample, - &m_readHintSampleSize, - &m_readHintTimestamp); - - m_File.EnableMemoryBuffer(m_pReadHintSample, m_readHintSampleSize); - - m_pReadHint = new MP4RtpHint(*this); - m_pReadHint->Read(m_File); - - m_File.DisableMemoryBuffer(); - - if (pNumPackets) { - *pNumPackets = GetHintNumberOfPackets(); - } -} - -uint16_t MP4RtpHintTrack::GetHintNumberOfPackets() -{ - if (m_pReadHint == NULL) { - throw new Exception("no hint has been read", - __FILE__, __LINE__, __FUNCTION__); - } - return m_pReadHint->GetNumberOfPackets(); -} - -bool MP4RtpHintTrack::GetPacketBFrame(uint16_t packetIndex) -{ - if (m_pReadHint == NULL) { - throw new Exception("no hint has been read", - __FILE__, __LINE__, __FUNCTION__); - } - MP4RtpPacket* pPacket = - m_pReadHint->GetPacket(packetIndex); - - return pPacket->IsBFrame(); -} - -uint16_t MP4RtpHintTrack::GetPacketTransmitOffset(uint16_t packetIndex) -{ - if (m_pReadHint == NULL) { - throw new Exception("no hint has been read", - __FILE__, __LINE__, __FUNCTION__); - } - - MP4RtpPacket* pPacket = - m_pReadHint->GetPacket(packetIndex); - - return pPacket->GetTransmitOffset(); -} - -void MP4RtpHintTrack::ReadPacket( - uint16_t packetIndex, - uint8_t** ppBytes, - uint32_t* pNumBytes, - uint32_t ssrc, - bool addHeader, - bool addPayload) -{ - if (m_pReadHint == NULL) { - throw new Exception("no hint has been read", - __FILE__, __LINE__, __FUNCTION__); - } - if (!addHeader && !addPayload) { - throw new Exception("no data requested", - __FILE__, __LINE__, __FUNCTION__); - } - - MP4RtpPacket* pPacket = - m_pReadHint->GetPacket(packetIndex); - - *pNumBytes = 0; - if (addHeader) { - *pNumBytes += 12; - } - if (addPayload) { - *pNumBytes += pPacket->GetDataSize(); - } - - // if needed, allocate the packet memory - bool buffer_malloc = false; - - if (*ppBytes == NULL) { - *ppBytes = (uint8_t*)MP4Malloc(*pNumBytes); - buffer_malloc = true; - } - - try { - uint8_t* pDest = *ppBytes; - - if (addHeader) { - *pDest++ = - 0x80 | (pPacket->GetPBit() << 5) | (pPacket->GetXBit() << 4); - - *pDest++ = - (pPacket->GetMBit() << 7) | pPacket->GetPayload(); - - *((uint16_t*)pDest) = - MP4V2_HTONS(m_rtpSequenceStart + pPacket->GetSequenceNumber()); - pDest += 2; - - *((uint32_t*)pDest) = - MP4V2_HTONL(m_rtpTimestampStart + (uint32_t)m_readHintTimestamp); - pDest += 4; - - *((uint32_t*)pDest) = - MP4V2_HTONL(ssrc); - pDest += 4; - } - - if (addPayload) { - pPacket->GetData(pDest); - } - } - catch (Exception* x) { - if (buffer_malloc) { - MP4Free(*ppBytes); - *ppBytes = NULL; - } - throw x; - } - - log.hexDump(0, MP4_LOG_VERBOSE1, *ppBytes, *pNumBytes, - "\"%s\": %u ", GetFile().GetFilename().c_str(), - packetIndex); -} - -MP4Timestamp MP4RtpHintTrack::GetRtpTimestampStart() -{ - if (m_pRefTrack == NULL) { - InitRefTrack(); - InitRtpStart(); - } - - return m_rtpTimestampStart; -} - -void MP4RtpHintTrack::SetRtpTimestampStart(MP4Timestamp start) -{ - if (!m_pTsroProperty) { - MP4Atom* pTsroAtom = - m_File.AddDescendantAtoms(&m_trakAtom, "udta.hnti.rtp .tsro"); - - ASSERT(pTsroAtom); - - (void)pTsroAtom->FindProperty("offset", - (MP4Property**)&m_pTsroProperty); - - ASSERT(m_pTsroProperty); - } - - m_pTsroProperty->SetValue(start); - m_rtpTimestampStart = start; -} - -void MP4RtpHintTrack::InitPayload() -{ - if (m_pRtpMapProperty == NULL) { - (void)m_trakAtom.FindProperty( - "trak.udta.hinf.payt.rtpMap", - (MP4Property**)&m_pRtpMapProperty); - } - - if (m_pPayloadNumberProperty == NULL) { - (void)m_trakAtom.FindProperty( - "trak.udta.hinf.payt.payloadNumber", - (MP4Property**)&m_pPayloadNumberProperty); - } - - if (m_pMaxPacketSizeProperty == NULL) { - (void)m_trakAtom.FindProperty( - "trak.mdia.minf.stbl.stsd.rtp .maxPacketSize", - (MP4Property**)&m_pMaxPacketSizeProperty); - } -} - -void MP4RtpHintTrack::GetPayload( - char** ppPayloadName, - uint8_t* pPayloadNumber, - uint16_t* pMaxPayloadSize, - char **ppEncodingParams) -{ - const char* pRtpMap; - const char* pSlash; - uint32_t length; - InitPayload(); - - if (ppPayloadName || ppEncodingParams) { - if (ppPayloadName) - *ppPayloadName = NULL; - if (ppEncodingParams) - *ppEncodingParams = NULL; - if (m_pRtpMapProperty) { - pRtpMap = m_pRtpMapProperty->GetValue(); - pSlash = strchr(pRtpMap, '/'); - - if (pSlash) { - length = pSlash - pRtpMap; - } else { - length = (uint32_t)strlen(pRtpMap); - } - - if (ppPayloadName) { - *ppPayloadName = (char*)MP4Calloc(length + 1); - strncpy(*ppPayloadName, pRtpMap, length); - } - if (pSlash && ppEncodingParams) { - pSlash++; - pSlash = strchr(pSlash, '/'); - if (pSlash != NULL) { - pSlash++; - if (pSlash != '\0') { - length = (uint32_t)strlen(pRtpMap) - (pSlash - pRtpMap); - *ppEncodingParams = (char *)MP4Calloc(length + 1); - strncpy(*ppEncodingParams, pSlash, length); - } - } - } - } - } - - if (pPayloadNumber) { - if (m_pPayloadNumberProperty) { - *pPayloadNumber = m_pPayloadNumberProperty->GetValue(); - } else { - *pPayloadNumber = 0; - } - } - - if (pMaxPayloadSize) { - if (m_pMaxPacketSizeProperty) { - *pMaxPayloadSize = m_pMaxPacketSizeProperty->GetValue(); - } else { - *pMaxPayloadSize = 0; - } - } -} - -void MP4RtpHintTrack::SetPayload( - const char* payloadName, - uint8_t payloadNumber, - uint16_t maxPayloadSize, - const char *encoding_parms, - bool include_rtp_map, - bool include_mpeg4_esid) -{ - InitRefTrack(); - InitPayload(); - - ASSERT(m_pRtpMapProperty); - ASSERT(m_pPayloadNumberProperty); - ASSERT(m_pMaxPacketSizeProperty); - - size_t len = strlen(payloadName) + 16; - if (encoding_parms != NULL) { - size_t temp = strlen(encoding_parms); - if (temp == 0) { - encoding_parms = NULL; - } else { - len += temp; - } - } - - char* rtpMapBuf = (char*)MP4Malloc(len); - snprintf(rtpMapBuf, len, "%s/%u%c%s", - payloadName, - GetTimeScale(), - encoding_parms != NULL ? '/' : '\0', - encoding_parms == NULL ? "" : encoding_parms); - m_pRtpMapProperty->SetValue(rtpMapBuf); - - m_pPayloadNumberProperty->SetValue(payloadNumber); - - if (maxPayloadSize == 0) { - maxPayloadSize = 1460; - } - m_pMaxPacketSizeProperty->SetValue(maxPayloadSize); - - // set sdp media type - const char* sdpMediaType; - if (!strcmp(m_pRefTrack->GetType(), MP4_AUDIO_TRACK_TYPE)) { - sdpMediaType = "audio"; - } else if (!strcmp(m_pRefTrack->GetType(), MP4_VIDEO_TRACK_TYPE)) { - sdpMediaType = "video"; - } else if (!strcmp(m_pRefTrack->GetType(), MP4_CNTL_TRACK_TYPE)) { - sdpMediaType = "control"; - } else { - sdpMediaType = "application"; - } - - uint32_t maxlen = - (uint32_t)strlen(sdpMediaType) + (uint32_t)strlen(rtpMapBuf) + 256; - char* sdpBuf = (char*)MP4Malloc(maxlen); - uint32_t buflen; - buflen = snprintf(sdpBuf, maxlen, - "m=%s 0 RTP/AVP %u\015\012" - "a=control:trackID=%u\015\012", - sdpMediaType, payloadNumber, - m_trackId); - if (include_rtp_map) { - buflen += snprintf(sdpBuf + buflen, maxlen - buflen, - "a=rtpmap:%u %s\015\012", - payloadNumber, rtpMapBuf); - } - if (include_mpeg4_esid) { - snprintf(sdpBuf + buflen, maxlen - buflen, - "a=mpeg4-esid:%u\015\012", - m_pRefTrack->GetId()); - } - - MP4StringProperty* pSdpProperty = NULL; - (void)m_trakAtom.FindProperty("trak.udta.hnti.sdp .sdpText", - (MP4Property**)&pSdpProperty); - ASSERT(pSdpProperty); - pSdpProperty->SetValue(sdpBuf); - - // cleanup - MP4Free(rtpMapBuf); - MP4Free(sdpBuf); -} - -void MP4RtpHintTrack::AddHint(bool isBFrame, uint32_t timestampOffset) -{ - // on first hint, need to lookup the reference track - if (m_writeHintId == MP4_INVALID_SAMPLE_ID) { - InitRefTrack(); - InitStats(); - } - - if (m_pWriteHint) { - throw new Exception("unwritten hint is still pending", __FILE__, __LINE__, __FUNCTION__); - } - - m_pWriteHint = new MP4RtpHint(*this); - m_pWriteHint->SetBFrame(isBFrame); - m_pWriteHint->SetTimestampOffset(timestampOffset); - - m_bytesThisHint = 0; - m_writeHintId++; -} - -void MP4RtpHintTrack::AddPacket(bool setMbit, int32_t transmitOffset) -{ - if (m_pWriteHint == NULL) { - throw new Exception("no hint pending", __FILE__, __LINE__, __FUNCTION__); - } - - MP4RtpPacket* pPacket = m_pWriteHint->AddPacket(); - - ASSERT(m_pPayloadNumberProperty); - - pPacket->Set( - m_pPayloadNumberProperty->GetValue(), - m_writePacketId++, - setMbit); - pPacket->SetTransmitOffset(transmitOffset); - - m_bytesThisHint += 12; - if (m_bytesThisPacket > m_pPmax->GetValue()) { - m_pPmax->SetValue(m_bytesThisPacket); - } - m_bytesThisPacket = 12; - m_pNump->IncrementValue(); - m_pTrpy->IncrementValue(12); // RTP packet header size -} - -void MP4RtpHintTrack::AddImmediateData( - const uint8_t* pBytes, - uint32_t numBytes) -{ - if (m_pWriteHint == NULL) { - throw new Exception("no hint pending", __FILE__, __LINE__, __FUNCTION__ ); - } - - MP4RtpPacket* pPacket = m_pWriteHint->GetCurrentPacket(); - if (pPacket == NULL) { - throw new Exception("no packet pending", __FILE__, __LINE__, __FUNCTION__); - } - - if (pBytes == NULL || numBytes == 0) { - throw new Exception("no data", - __FILE__, __LINE__, __FUNCTION__ ); - } - if (numBytes > 14) { - throw new Exception("data size is larger than 14 bytes", - __FILE__, __LINE__, __FUNCTION__ ); - } - - MP4RtpImmediateData* pData = new MP4RtpImmediateData(*pPacket); - pData->Set(pBytes, numBytes); - - pPacket->AddData(pData); - - m_bytesThisHint += numBytes; - m_bytesThisPacket += numBytes; - m_pDimm->IncrementValue(numBytes); - m_pTpyl->IncrementValue(numBytes); - m_pTrpy->IncrementValue(numBytes); -} - -void MP4RtpHintTrack::AddSampleData( - MP4SampleId sampleId, - uint32_t dataOffset, - uint32_t dataLength) -{ - if (m_pWriteHint == NULL) { - throw new Exception("no hint pending", __FILE__, __LINE__, __FUNCTION__ ); - } - - MP4RtpPacket* pPacket = m_pWriteHint->GetCurrentPacket(); - if (pPacket == NULL) { - throw new Exception("no packet pending", __FILE__, __LINE__, __FUNCTION__ ); - } - - MP4RtpSampleData* pData = new MP4RtpSampleData(*pPacket); - - pData->SetReferenceSample(sampleId, dataOffset, dataLength); - - pPacket->AddData(pData); - - m_bytesThisHint += dataLength; - m_bytesThisPacket += dataLength; - m_pDmed->IncrementValue(dataLength); - m_pTpyl->IncrementValue(dataLength); - m_pTrpy->IncrementValue(dataLength); -} - -void MP4RtpHintTrack::AddESConfigurationPacket() -{ - if (m_pWriteHint == NULL) { - throw new Exception("no hint pending", __FILE__, __LINE__, __FUNCTION__ ); - } - - uint8_t* pConfig = NULL; - uint32_t configSize = 0; - - m_File.GetTrackESConfiguration(m_pRefTrack->GetId(), - &pConfig, &configSize); - - if (pConfig == NULL) { - return; - } - - ASSERT(m_pMaxPacketSizeProperty); - - if (configSize > m_pMaxPacketSizeProperty->GetValue()) { - throw new Exception("ES configuration is too large for RTP payload", __FILE__, __LINE__, __FUNCTION__ ); - } - - AddPacket(false); - - MP4RtpPacket* pPacket = m_pWriteHint->GetCurrentPacket(); - ASSERT(pPacket); - - // This is ugly! - // To get the ES configuration data somewhere known - // we create a sample data reference that points to - // this hint track (not the media track) - // and this sample of the hint track - // the offset into this sample is filled in during the write process - MP4RtpSampleData* pData = new MP4RtpSampleData(*pPacket); - - pData->SetEmbeddedImmediate(m_writeSampleId, pConfig, configSize); - - pPacket->AddData(pData); - - m_bytesThisHint += configSize; - m_bytesThisPacket += configSize; - m_pTpyl->IncrementValue(configSize); - m_pTrpy->IncrementValue(configSize); -} - -void MP4RtpHintTrack::WriteHint(MP4Duration duration, bool isSyncSample) -{ - if (m_pWriteHint == NULL) { - throw new Exception("no hint pending", __FILE__, __LINE__, __FUNCTION__ ); - } - - uint8_t* pBytes; - uint64_t numBytes; - - m_File.EnableMemoryBuffer(); - - m_pWriteHint->Write(m_File); - - m_File.DisableMemoryBuffer(&pBytes, &numBytes); - - WriteSample(pBytes, numBytes, duration, 0, isSyncSample); - - MP4Free(pBytes); - - // update statistics - if (m_bytesThisPacket > m_pPmax->GetValue()) { - m_pPmax->SetValue(m_bytesThisPacket); - } - - if (duration > m_pDmax->GetValue()) { - m_pDmax->SetValue(duration); - } - - MP4Timestamp startTime; - - GetSampleTimes(m_writeHintId, &startTime, NULL); - - if (startTime < m_thisSec + GetTimeScale()) { - m_bytesThisSec += m_bytesThisHint; - } else { - if (m_bytesThisSec > m_pMaxr->GetValue()) { - m_pMaxr->SetValue(m_bytesThisSec); - } - m_thisSec = startTime - (startTime % GetTimeScale()); - m_bytesThisSec = m_bytesThisHint; - } - - // cleanup - delete m_pWriteHint; - m_pWriteHint = NULL; -} - -void MP4RtpHintTrack::FinishWrite(uint32_t option) -{ - if (m_writeHintId != MP4_INVALID_SAMPLE_ID) { - m_pMaxPdu->SetValue(m_pPmax->GetValue()); - if (m_pNump->GetValue()) { - m_pAvgPdu->SetValue(m_pTrpy->GetValue() / m_pNump->GetValue()); - } - - m_pMaxBitRate->SetValue(m_pMaxr->GetValue() * 8); - if (GetDuration()) { - m_pAvgBitRate->SetValue( - m_pTrpy->GetValue() * 8 * GetTimeScale() / GetDuration()); - } - } - - MP4Track::FinishWrite(); -} - -void MP4RtpHintTrack::InitStats() -{ - MP4Atom* pHinfAtom = m_trakAtom.FindAtom("trak.udta.hinf"); - - ASSERT(pHinfAtom); - - (void)pHinfAtom->FindProperty("hinf.trpy.bytes", (MP4Property**)&m_pTrpy); - (void)pHinfAtom->FindProperty("hinf.nump.packets", (MP4Property**)&m_pNump); - (void)pHinfAtom->FindProperty("hinf.tpyl.bytes", (MP4Property**)&m_pTpyl); - (void)pHinfAtom->FindProperty("hinf.maxr.bytes", (MP4Property**)&m_pMaxr); - (void)pHinfAtom->FindProperty("hinf.dmed.bytes", (MP4Property**)&m_pDmed); - (void)pHinfAtom->FindProperty("hinf.dimm.bytes", (MP4Property**)&m_pDimm); - (void)pHinfAtom->FindProperty("hinf.pmax.bytes", (MP4Property**)&m_pPmax); - (void)pHinfAtom->FindProperty("hinf.dmax.milliSecs", (MP4Property**)&m_pDmax); - - MP4Atom* pHmhdAtom = m_trakAtom.FindAtom("trak.mdia.minf.hmhd"); - - ASSERT(pHmhdAtom); - - (void)pHmhdAtom->FindProperty("hmhd.maxPduSize", (MP4Property**)&m_pMaxPdu); - (void)pHmhdAtom->FindProperty("hmhd.avgPduSize", (MP4Property**)&m_pAvgPdu); - (void)pHmhdAtom->FindProperty("hmhd.maxBitRate", (MP4Property**)&m_pMaxBitRate); - (void)pHmhdAtom->FindProperty("hmhd.avgBitRate", (MP4Property**)&m_pAvgBitRate); - - MP4Integer32Property* pMaxrPeriod = NULL; - (void)pHinfAtom->FindProperty("hinf.maxr.granularity", - (MP4Property**)&pMaxrPeriod); - if (pMaxrPeriod) { - pMaxrPeriod->SetValue(1000); // 1 second - } -} - - -MP4RtpHint::MP4RtpHint(MP4RtpHintTrack& track) - : m_track(track) -{ - AddProperty( /* 0 */ - new MP4Integer16Property(this->GetTrack().GetTrakAtom(), "packetCount")); - AddProperty( /* 1 */ - new MP4Integer16Property(this->GetTrack().GetTrakAtom(), "reserved")); -} - -MP4RtpHint::~MP4RtpHint() -{ - for (uint32_t i = 0; i < m_rtpPackets.Size(); i++) { - delete m_rtpPackets[i]; - } -} - -MP4RtpPacket* MP4RtpHint::AddPacket() -{ - MP4RtpPacket* pPacket = new MP4RtpPacket(*this); - m_rtpPackets.Add(pPacket); - - // packetCount property - ((MP4Integer16Property*)m_pProperties[0])->IncrementValue(); - - pPacket->SetBFrame(m_isBFrame); - pPacket->SetTimestampOffset(m_timestampOffset); - - return pPacket; -} - -void MP4RtpHint::Read(MP4File& file) -{ - // call base class Read for required properties - MP4Container::Read(file); - - uint16_t numPackets = - ((MP4Integer16Property*)m_pProperties[0])->GetValue(); - - for (uint16_t i = 0; i < numPackets; i++) { - MP4RtpPacket* pPacket = new MP4RtpPacket(*this); - - m_rtpPackets.Add(pPacket); - - pPacket->Read(file); - } - - if (log.verbosity >= MP4_LOG_VERBOSE1) { - log.verbose1f("\"%s\": ReadHint:", GetTrack().GetFile().GetFilename().c_str()); - Dump(10, false); - } -} - -void MP4RtpHint::Write(MP4File& file) -{ - uint64_t hintStartPos = file.GetPosition(); - - MP4Container::Write(file); - - uint64_t packetStartPos = file.GetPosition(); - - uint32_t i; - - // first write out packet (and data) entries - for (i = 0; i < m_rtpPackets.Size(); i++) { - m_rtpPackets[i]->Write(file); - } - - // now let packets write their extra data into the hint sample - for (i = 0; i < m_rtpPackets.Size(); i++) { - m_rtpPackets[i]->WriteEmbeddedData(file, hintStartPos); - } - - uint64_t endPos = file.GetPosition(); - - file.SetPosition(packetStartPos); - - // finally rewrite the packet and data entries - // which now contain the correct offsets for the embedded data - for (i = 0; i < m_rtpPackets.Size(); i++) { - m_rtpPackets[i]->Write(file); - } - - file.SetPosition(endPos); - - if (log.verbosity >= MP4_LOG_VERBOSE1) { - log.verbose1f("\"%s\": WriteRtpHint:", GetTrack().GetFile().GetFilename().c_str()); - Dump(14, false); - } -} - -void MP4RtpHint::Dump(uint8_t indent, bool dumpImplicits) -{ - MP4Container::Dump(indent, dumpImplicits); - - for (uint32_t i = 0; i < m_rtpPackets.Size(); i++) { - log.dump(indent, MP4_LOG_VERBOSE1,"\"%s\": RtpPacket: %u", - GetTrack().GetFile().GetFilename().c_str(), i); - m_rtpPackets[i]->Dump(indent + 1, dumpImplicits); - } -} - -MP4RtpPacket::MP4RtpPacket(MP4RtpHint& hint) - : m_hint(hint) -{ - AddProperty( /* 0 */ - new MP4Integer32Property(this->GetHint().GetTrack().GetTrakAtom(), "relativeXmitTime")); - AddProperty( /* 1 */ - new MP4BitfieldProperty(this->GetHint().GetTrack().GetTrakAtom(), "reserved1", 2)); - AddProperty( /* 2 */ - new MP4BitfieldProperty(this->GetHint().GetTrack().GetTrakAtom(), "Pbit", 1)); - AddProperty( /* 3 */ - new MP4BitfieldProperty(this->GetHint().GetTrack().GetTrakAtom(), "Xbit", 1)); - AddProperty( /* 4 */ - new MP4BitfieldProperty(this->GetHint().GetTrack().GetTrakAtom(), "reserved2", 4)); - AddProperty( /* 5 */ - new MP4BitfieldProperty(this->GetHint().GetTrack().GetTrakAtom(), "Mbit", 1)); - AddProperty( /* 6 */ - new MP4BitfieldProperty(this->GetHint().GetTrack().GetTrakAtom(), "payloadType", 7)); - AddProperty( /* 7 */ - new MP4Integer16Property(this->GetHint().GetTrack().GetTrakAtom(), "sequenceNumber")); - AddProperty( /* 8 */ - new MP4BitfieldProperty(this->GetHint().GetTrack().GetTrakAtom(), "reserved3", 13)); - AddProperty( /* 9 */ - new MP4BitfieldProperty(this->GetHint().GetTrack().GetTrakAtom(), "extraFlag", 1)); - AddProperty( /* 10 */ - new MP4BitfieldProperty(this->GetHint().GetTrack().GetTrakAtom(), "bFrameFlag", 1)); - AddProperty( /* 11 */ - new MP4BitfieldProperty(this->GetHint().GetTrack().GetTrakAtom(), "repeatFlag", 1)); - AddProperty( /* 12 */ - new MP4Integer16Property(this->GetHint().GetTrack().GetTrakAtom(), "entryCount")); -} - -MP4RtpPacket::~MP4RtpPacket() -{ - for (uint32_t i = 0; i < m_rtpData.Size(); i++) { - delete m_rtpData[i]; - } -} - -void MP4RtpPacket::AddExtraProperties() -{ - AddProperty( /* 13 */ - new MP4Integer32Property(this->GetHint().GetTrack().GetTrakAtom(), "extraInformationLength")); - - // This is a bit of a hack, since the tlv entries are really defined - // as atoms but there is only one type defined now, rtpo, and getting - // our atom code hooked up here would be a major pain with little gain - - AddProperty( /* 14 */ - new MP4Integer32Property(this->GetHint().GetTrack().GetTrakAtom(), "tlvLength")); - AddProperty( /* 15 */ - new MP4StringProperty(this->GetHint().GetTrack().GetTrakAtom(), "tlvType")); - AddProperty( /* 16 */ - new MP4Integer32Property(this->GetHint().GetTrack().GetTrakAtom(), "timestampOffset")); - - ((MP4Integer32Property*)m_pProperties[13])->SetValue(16); - ((MP4Integer32Property*)m_pProperties[14])->SetValue(12); - ((MP4StringProperty*)m_pProperties[15])->SetFixedLength(4); - ((MP4StringProperty*)m_pProperties[15])->SetValue("rtpo"); -} - -void MP4RtpPacket::Read(MP4File& file) -{ - // call base class Read for required properties - MP4Container::Read(file); - - // read extra info if present - // we only support the rtpo field! - if (((MP4BitfieldProperty*)m_pProperties[9])->GetValue() == 1) { - ReadExtra(file); - } - - uint16_t numDataEntries = - ((MP4Integer16Property*)m_pProperties[12])->GetValue(); - - // read data entries - for (uint16_t i = 0; i < numDataEntries; i++) { - uint8_t dataType; - file.PeekBytes(&dataType, 1); - - MP4RtpData* pData; - - switch (dataType) { - case 0: - pData = new MP4RtpNullData(*this); - break; - case 1: - pData = new MP4RtpImmediateData(*this); - break; - case 2: - pData = new MP4RtpSampleData(*this); - break; - case 3: - pData = new MP4RtpSampleDescriptionData(*this); - break; - default: - throw new Exception("unknown packet data entry type", __FILE__, __LINE__, __FUNCTION__ ); - } - - m_rtpData.Add(pData); - - // read data entry's properties - pData->Read(file); - } -} - -void MP4RtpPacket::ReadExtra(MP4File& file) -{ - AddExtraProperties(); - - int32_t extraLength = (int32_t)file.ReadUInt32(); - - if (extraLength < 4) { - throw new Exception("bad packet extra info length", __FILE__, __LINE__, __FUNCTION__ ); - } - extraLength -= 4; - - while (extraLength > 0) { - uint32_t entryLength = file.ReadUInt32(); - uint32_t entryTag = file.ReadUInt32(); - - if (entryLength < 8) { - throw new Exception("bad packet extra info entry length", __FILE__, __LINE__, __FUNCTION__ ); - } - - if (entryTag == STRTOINT32("rtpo") && entryLength == 12) { - // read the rtp timestamp offset - m_pProperties[16]->Read(file); - } else { - // ignore it, LATER carry it along - file.SetPosition(file.GetPosition() + entryLength - 8); - } - - extraLength -= entryLength; - } - - if (extraLength < 0) { - throw new Exception("invalid packet extra info length", __FILE__, __LINE__, __FUNCTION__ ); - } -} - -void MP4RtpPacket::Set(uint8_t payloadNumber, - uint32_t packetId, bool setMbit) -{ - ((MP4BitfieldProperty*)m_pProperties[5])->SetValue(setMbit); - ((MP4BitfieldProperty*)m_pProperties[6])->SetValue(payloadNumber); - ((MP4Integer16Property*)m_pProperties[7])->SetValue(packetId); -} - -int32_t MP4RtpPacket::GetTransmitOffset() -{ - return ((MP4Integer32Property*)m_pProperties[0])->GetValue(); -} - -void MP4RtpPacket::SetTransmitOffset(int32_t transmitOffset) -{ - ((MP4Integer32Property*)m_pProperties[0])->SetValue(transmitOffset); -} - -bool MP4RtpPacket::GetPBit() -{ - return ((MP4BitfieldProperty*)m_pProperties[2])->GetValue(); -} - -bool MP4RtpPacket::GetXBit() -{ - return ((MP4BitfieldProperty*)m_pProperties[3])->GetValue(); -} - -bool MP4RtpPacket::GetMBit() -{ - return ((MP4BitfieldProperty*)m_pProperties[5])->GetValue(); -} - -uint8_t MP4RtpPacket::GetPayload() -{ - return ((MP4BitfieldProperty*)m_pProperties[6])->GetValue(); -} - -uint16_t MP4RtpPacket::GetSequenceNumber() -{ - return ((MP4Integer16Property*)m_pProperties[7])->GetValue(); -} - -bool MP4RtpPacket::IsBFrame() -{ - return ((MP4BitfieldProperty*)m_pProperties[10])->GetValue(); -} - -void MP4RtpPacket::SetBFrame(bool isBFrame) -{ - ((MP4BitfieldProperty*)m_pProperties[10])->SetValue(isBFrame); -} - -void MP4RtpPacket::SetTimestampOffset(uint32_t timestampOffset) -{ - if (timestampOffset == 0) { - return; - } - - ASSERT(((MP4BitfieldProperty*)m_pProperties[9])->GetValue() == 0); - - // set X bit - ((MP4BitfieldProperty*)m_pProperties[9])->SetValue(1); - - AddExtraProperties(); - - ((MP4Integer32Property*)m_pProperties[16])->SetValue(timestampOffset); -} - -void MP4RtpPacket::AddData(MP4RtpData* pData) -{ - m_rtpData.Add(pData); - - // increment entry count property - ((MP4Integer16Property*)m_pProperties[12])->IncrementValue(); -} - -uint32_t MP4RtpPacket::GetDataSize() -{ - uint32_t totalDataSize = 0; - - for (uint32_t i = 0; i < m_rtpData.Size(); i++) { - totalDataSize += m_rtpData[i]->GetDataSize(); - } - - return totalDataSize; -} - -void MP4RtpPacket::GetData(uint8_t* pDest) -{ - for (uint32_t i = 0; i < m_rtpData.Size(); i++) { - m_rtpData[i]->GetData(pDest); - pDest += m_rtpData[i]->GetDataSize(); - } -} - -void MP4RtpPacket::Write(MP4File& file) -{ - MP4Container::Write(file); - - for (uint32_t i = 0; i < m_rtpData.Size(); i++) { - m_rtpData[i]->Write(file); - } -} - -void MP4RtpPacket::WriteEmbeddedData(MP4File& file, uint64_t startPos) -{ - for (uint32_t i = 0; i < m_rtpData.Size(); i++) { - m_rtpData[i]->WriteEmbeddedData(file, startPos); - } -} - -void MP4RtpPacket::Dump(uint8_t indent, bool dumpImplicits) -{ - MP4Container::Dump(indent, dumpImplicits); - - for (uint32_t i = 0; i < m_rtpData.Size(); i++) { - log.dump(indent, MP4_LOG_VERBOSE1, "\"%s\": RtpData: %u", - GetHint().GetTrack().GetFile().GetFilename().c_str(), i); - m_rtpData[i]->Dump(indent + 1, dumpImplicits); - } -} - -MP4RtpData::MP4RtpData(MP4RtpPacket& packet) - : m_packet(packet) -{ - AddProperty( /* 0 */ - new MP4Integer8Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "type")); -} - -MP4Track* MP4RtpData::FindTrackFromRefIndex(uint8_t refIndex) -{ - MP4Track* pTrack; - - if (refIndex == (uint8_t)-1) { - // ourselves - pTrack = &GetPacket().GetHint().GetTrack(); - } else if (refIndex == 0) { - // our reference track - pTrack = GetPacket().GetHint().GetTrack().GetRefTrack(); - } else { - // some other track - MP4RtpHintTrack* pHintTrack = - &GetPacket().GetHint().GetTrack(); - - MP4Atom& trakAtom = pHintTrack->GetTrakAtom(); - - MP4Integer32Property* pTrackIdProperty = NULL; - (void)trakAtom.FindProperty( - "trak.tref.hint.entries", - (MP4Property**)&pTrackIdProperty); - ASSERT(pTrackIdProperty); - - uint32_t refTrackId = - pTrackIdProperty->GetValue(refIndex - 1); - - pTrack = pHintTrack->GetFile().GetTrack(refTrackId); - } - - return pTrack; -} - -MP4RtpNullData::MP4RtpNullData(MP4RtpPacket& packet) - : MP4RtpData(packet) -{ - ((MP4Integer8Property*)m_pProperties[0])->SetValue(0); - - AddProperty( /* 1 */ - new MP4BytesProperty(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "pad", 15)); - - ((MP4BytesProperty*)m_pProperties[1])->SetFixedSize(15); -} - -MP4RtpImmediateData::MP4RtpImmediateData(MP4RtpPacket& packet) - : MP4RtpData(packet) -{ - ((MP4Integer8Property*)m_pProperties[0])->SetValue(1); - - AddProperty( /* 1 */ - new MP4Integer8Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "count")); - AddProperty( /* 2 */ - new MP4BytesProperty(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "data", 14)); - - ((MP4BytesProperty*)m_pProperties[2])->SetFixedSize(14); -} - -void MP4RtpImmediateData::Set(const uint8_t* pBytes, uint8_t numBytes) -{ - ((MP4Integer8Property*)m_pProperties[1])->SetValue(numBytes); - ((MP4BytesProperty*)m_pProperties[2])->SetValue(pBytes, numBytes); -} - -uint16_t MP4RtpImmediateData::GetDataSize() -{ - return ((MP4Integer8Property*)m_pProperties[1])->GetValue(); -} - -void MP4RtpImmediateData::GetData(uint8_t* pDest) -{ - uint8_t* pValue; - uint32_t valueSize; - ((MP4BytesProperty*)m_pProperties[2])->GetValue(&pValue, &valueSize); - - memcpy(pDest, pValue, GetDataSize()); - MP4Free(pValue); -} - -MP4RtpSampleData::MP4RtpSampleData(MP4RtpPacket& packet) - : MP4RtpData(packet) -{ - ((MP4Integer8Property*)m_pProperties[0])->SetValue(2); - - AddProperty( /* 1 */ - new MP4Integer8Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "trackRefIndex")); - AddProperty( /* 2 */ - new MP4Integer16Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "length")); - AddProperty( /* 3 */ - new MP4Integer32Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "sampleNumber")); - AddProperty( /* 4 */ - new MP4Integer32Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "sampleOffset")); - AddProperty( /* 5 */ - new MP4Integer16Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "bytesPerBlock")); - AddProperty( /* 6 */ - new MP4Integer16Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "samplesPerBlock")); - - ((MP4Integer16Property*)m_pProperties[5])->SetValue(1); - ((MP4Integer16Property*)m_pProperties[6])->SetValue(1); - - m_pRefData = NULL; - m_pRefTrack = NULL; - m_refSampleId = MP4_INVALID_SAMPLE_ID; - m_refSampleOffset = 0; -} - -void MP4RtpSampleData::SetEmbeddedImmediate(MP4SampleId sampleId, - uint8_t* pData, uint16_t dataLength) -{ - ((MP4Integer8Property*)m_pProperties[1])->SetValue((uint8_t)-1); - ((MP4Integer16Property*)m_pProperties[2])->SetValue(dataLength); - ((MP4Integer32Property*)m_pProperties[3])->SetValue(sampleId); - ((MP4Integer32Property*)m_pProperties[4])->SetValue(0); - CHECK_AND_FREE(m_pRefData); - m_pRefData = pData; -} - -void MP4RtpSampleData::SetReferenceSample( - MP4SampleId refSampleId, uint32_t refSampleOffset, - uint16_t sampleLength) -{ - ((MP4Integer8Property*)m_pProperties[1])->SetValue(0); - ((MP4Integer16Property*)m_pProperties[2])->SetValue(sampleLength); - ((MP4Integer32Property*)m_pProperties[3])->SetValue(refSampleId); - ((MP4Integer32Property*)m_pProperties[4])->SetValue(refSampleOffset); -} - -void MP4RtpSampleData::SetEmbeddedSample( - MP4SampleId sampleId, MP4Track* pRefTrack, - MP4SampleId refSampleId, uint32_t refSampleOffset, - uint16_t sampleLength) -{ - ((MP4Integer8Property*)m_pProperties[1])->SetValue((uint8_t)-1); - ((MP4Integer16Property*)m_pProperties[2])->SetValue(sampleLength); - ((MP4Integer32Property*)m_pProperties[3])->SetValue(sampleId); - ((MP4Integer32Property*)m_pProperties[4])->SetValue(0); - m_pRefTrack = pRefTrack; - m_refSampleId = refSampleId; - m_refSampleOffset = refSampleOffset; -} - -uint16_t MP4RtpSampleData::GetDataSize() -{ - return ((MP4Integer16Property*)m_pProperties[2])->GetValue(); -} - -void MP4RtpSampleData::GetData(uint8_t* pDest) -{ - uint8_t trackRefIndex = - ((MP4Integer8Property*)m_pProperties[1])->GetValue(); - - MP4Track* pSampleTrack = - FindTrackFromRefIndex(trackRefIndex); - - pSampleTrack->ReadSampleFragment( - ((MP4Integer32Property*)m_pProperties[3])->GetValue(), // sampleId - ((MP4Integer32Property*)m_pProperties[4])->GetValue(), // sampleOffset - ((MP4Integer16Property*)m_pProperties[2])->GetValue(), // sampleLength - pDest); -} - -void MP4RtpSampleData::WriteEmbeddedData(MP4File& file, uint64_t startPos) -{ - // if not using embedded data, nothing to do - if (((MP4Integer8Property*)m_pProperties[1])->GetValue() != (uint8_t)-1) { - return; - } - - // figure out the offset within this hint sample for this embedded data - uint64_t offset = file.GetPosition() - startPos; - ASSERT(offset <= 0xFFFFFFFF); - ((MP4Integer32Property*)m_pProperties[4])->SetValue((uint32_t)offset); - - uint16_t length = ((MP4Integer16Property*)m_pProperties[2])->GetValue(); - - if (m_pRefData) { - file.WriteBytes(m_pRefData, length); - return; - } - - if (m_refSampleId != MP4_INVALID_SAMPLE_ID) { - uint8_t* pSample = NULL; - uint32_t sampleSize = 0; - - ASSERT(m_pRefTrack); - m_pRefTrack->ReadSample(m_refSampleId, &pSample, &sampleSize); - - ASSERT(m_refSampleOffset + length <= sampleSize); - - file.WriteBytes(&pSample[m_refSampleOffset], length); - - MP4Free(pSample); - return; - } -} - -MP4RtpSampleDescriptionData::MP4RtpSampleDescriptionData(MP4RtpPacket& packet) - : MP4RtpData(packet) -{ - ((MP4Integer8Property*)m_pProperties[0])->SetValue(3); - - AddProperty( /* 1 */ - new MP4Integer8Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "trackRefIndex")); - AddProperty( /* 2 */ - new MP4Integer16Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "length")); - AddProperty( /* 3 */ - new MP4Integer32Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "sampleDescriptionIndex")); - AddProperty( /* 4 */ - new MP4Integer32Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "sampleDescriptionOffset")); - AddProperty( /* 5 */ - new MP4Integer32Property(this->GetPacket().GetHint().GetTrack().GetTrakAtom(), "reserved")); -} - -void MP4RtpSampleDescriptionData::Set(uint32_t sampleDescrIndex, - uint32_t offset, uint16_t length) -{ - ((MP4Integer16Property*)m_pProperties[2])->SetValue(length); - ((MP4Integer32Property*)m_pProperties[3])->SetValue(sampleDescrIndex); - ((MP4Integer32Property*)m_pProperties[4])->SetValue(offset); -} - -uint16_t MP4RtpSampleDescriptionData::GetDataSize() -{ - return ((MP4Integer16Property*)m_pProperties[2])->GetValue(); -} - -void MP4RtpSampleDescriptionData::GetData(uint8_t* pDest) -{ - // we start with the index into our track references - uint8_t trackRefIndex = - ((MP4Integer8Property*)m_pProperties[1])->GetValue(); - - // from which we can find the track structure - MP4Track* pSampleTrack = - FindTrackFromRefIndex(trackRefIndex); - - // next find the desired atom in the track's sample description table - uint32_t sampleDescrIndex = - ((MP4Integer32Property*)m_pProperties[3])->GetValue(); - - MP4Atom& trakAtom = - pSampleTrack->GetTrakAtom(); - - char sdName[64]; - snprintf(sdName, 64, "trak.mdia.minf.stbl.stsd.*[%u]", sampleDescrIndex); - - MP4Atom* pSdAtom = - trakAtom.FindAtom(sdName); - - // bad reference - if (pSdAtom == NULL) { - throw new Exception("invalid sample description index", __FILE__, __LINE__, __FUNCTION__ ); - } - - // check validity of the upcoming copy - uint16_t length = - ((MP4Integer16Property*)m_pProperties[2])->GetValue(); - uint32_t offset = - ((MP4Integer32Property*)m_pProperties[4])->GetValue(); - - if (offset + length > pSdAtom->GetSize()) { - throw new Exception("offset and/or length are too large", - __FILE__, __LINE__, __FUNCTION__); - } - - // now we use the raw file to get the desired bytes - - MP4File& file = GetPacket().GetHint().GetTrack().GetFile(); - - uint64_t orgPos = file.GetPosition(); - - // It's not entirely clear from the spec whether the offset is from - // the start of the sample descirption atom, or the start of the atom's - // data. I believe it is the former, but the commented out code will - // realize the latter interpretation if I turn out to be wrong. - uint64_t dataPos = pSdAtom->GetStart(); - //uint64_t dataPos = pSdAtom->GetEnd() - pSdAtom->GetSize(); - - file.SetPosition(dataPos + offset); - - file.ReadBytes(pDest, length); - - file.SetPosition(orgPos); -} - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/rtphint.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/rtphint.h deleted file mode 100644 index a2a4fa8a..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/rtphint.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -#ifndef MP4V2_IMPL_RTPHINT_H -#define MP4V2_IMPL_RTPHINT_H - -namespace mp4v2 { -namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -// forward declarations -class MP4RtpHintTrack; -class MP4RtpHint; -class MP4RtpPacket; - -class MP4RtpData : public MP4Container { -public: - MP4RtpData(MP4RtpPacket& packet); - - MP4RtpPacket& GetPacket() { - return m_packet; - } - - virtual uint16_t GetDataSize() = 0; - virtual void GetData(uint8_t* pDest) = 0; - - MP4Track* FindTrackFromRefIndex(uint8_t refIndex); - - virtual void WriteEmbeddedData(MP4File& file, uint64_t startPos) { - // default is no-op - } - -protected: - MP4RtpPacket& m_packet; -}; - -MP4ARRAY_DECL(MP4RtpData, MP4RtpData*) - -class MP4RtpNullData : public MP4RtpData { -public: - MP4RtpNullData(MP4RtpPacket& packet); - - uint16_t GetDataSize() { - return 0; - } - - void GetData(uint8_t* pDest) { - // no-op - } -}; - -class MP4RtpImmediateData : public MP4RtpData { -public: - MP4RtpImmediateData(MP4RtpPacket& packet); - - void Set(const uint8_t* pBytes, uint8_t numBytes); - - uint16_t GetDataSize(); - - void GetData(uint8_t* pDest); -}; - -class MP4RtpSampleData : public MP4RtpData { -public: - MP4RtpSampleData(MP4RtpPacket& packet); - - ~MP4RtpSampleData(void) { - CHECK_AND_FREE(m_pRefData); - }; - - void SetEmbeddedImmediate( - MP4SampleId sampleId, - uint8_t* pData, uint16_t dataLength); - - void SetReferenceSample( - MP4SampleId refSampleId, uint32_t refSampleOffset, - uint16_t sampleLength); - - void SetEmbeddedSample( - MP4SampleId sampleId, MP4Track* pRefTrack, - MP4SampleId refSampleId, uint32_t refSampleOffset, - uint16_t sampleLength); - - uint16_t GetDataSize(); - - void GetData(uint8_t* pDest); - - void WriteEmbeddedData(MP4File& file, uint64_t startPos); - -protected: - uint8_t* m_pRefData; - - MP4Track* m_pRefTrack; - MP4SampleId m_refSampleId; - uint32_t m_refSampleOffset; -}; - -class MP4RtpSampleDescriptionData : public MP4RtpData { -public: - MP4RtpSampleDescriptionData(MP4RtpPacket& packet); - - void Set(uint32_t sampleDescrIndex, - uint32_t offset, uint16_t length); - - uint16_t GetDataSize(); - - void GetData(uint8_t* pDest); -}; - -class MP4RtpPacket : public MP4Container { -public: - MP4RtpPacket(MP4RtpHint& hint); - - ~MP4RtpPacket(); - - void AddExtraProperties(); - - MP4RtpHint& GetHint() { - return m_hint; - } - - void Set(uint8_t payloadNumber, uint32_t packetId, bool setMbit); - - int32_t GetTransmitOffset(); - - bool GetPBit(); - - bool GetXBit(); - - bool GetMBit(); - - uint8_t GetPayload(); - - uint16_t GetSequenceNumber(); - - void SetTransmitOffset(int32_t transmitOffset); - - bool IsBFrame(); - - void SetBFrame(bool isBFrame); - - void SetTimestampOffset(uint32_t timestampOffset); - - void AddData(MP4RtpData* pData); - - uint32_t GetDataSize(); - - void GetData(uint8_t* pDest); - - void Read(MP4File& file); - - void ReadExtra(MP4File& file); - - void Write(MP4File& file); - - void WriteEmbeddedData(MP4File& file, uint64_t startPos); - - void Dump(uint8_t indent, bool dumpImplicits); - -protected: - MP4RtpHint& m_hint; - MP4RtpDataArray m_rtpData; -}; - -MP4ARRAY_DECL(MP4RtpPacket, MP4RtpPacket*) - -class MP4RtpHint : public MP4Container { -public: - MP4RtpHint(MP4RtpHintTrack& track); - - ~MP4RtpHint(); - - MP4RtpHintTrack& GetTrack() { - return m_track; - } - - uint16_t GetNumberOfPackets() { - return m_rtpPackets.Size(); - } - - bool IsBFrame() { - return m_isBFrame; - } - void SetBFrame(bool isBFrame) { - m_isBFrame = isBFrame; - } - - uint32_t GetTimestampOffset() { - return m_timestampOffset; - } - void SetTimestampOffset(uint32_t timestampOffset) { - m_timestampOffset = timestampOffset; - } - - MP4RtpPacket* AddPacket(); - - MP4RtpPacket* GetPacket(uint16_t index) { - return m_rtpPackets[index]; - } - - MP4RtpPacket* GetCurrentPacket() { - if (m_rtpPackets.Size() == 0) { - return NULL; - } - return m_rtpPackets[m_rtpPackets.Size() - 1]; - } - - void Read(MP4File& file); - - void Write(MP4File& file); - - void Dump(uint8_t indent, bool dumpImplicits); - -protected: - MP4RtpHintTrack& m_track; - MP4RtpPacketArray m_rtpPackets; - - // values when adding packets to a hint (write mode) - bool m_isBFrame; - uint32_t m_timestampOffset; -}; - -class MP4RtpHintTrack : public MP4Track { -public: - MP4RtpHintTrack(MP4File& file, MP4Atom& trakAtom); - - ~MP4RtpHintTrack(); - - void InitRefTrack(); - - void InitPayload(); - - void InitRtpStart(); - - void InitStats(); - - MP4Track* GetRefTrack() { - InitRefTrack(); - return m_pRefTrack; - } - - void GetPayload( - char** ppPayloadName = NULL, - uint8_t* pPayloadNumber = NULL, - uint16_t* pMaxPayloadSize = NULL, - char **ppEncodingParams = NULL); - - void SetPayload( - const char* payloadName, - uint8_t payloadNumber, - uint16_t maxPayloadSize, - const char *encoding_parms, - bool add_rtpmap, - bool add_mpeg4_esid); - - void ReadHint( - MP4SampleId hintSampleId, - uint16_t* pNumPackets = NULL); - - uint16_t GetHintNumberOfPackets(); - - bool GetPacketBFrame(uint16_t packetIndex); - - uint16_t GetPacketTransmitOffset(uint16_t packetIndex); - - void ReadPacket( - uint16_t packetIndex, - uint8_t** ppBytes, - uint32_t* pNumBytes, - uint32_t ssrc, - bool includeHeader = true, - bool includePayload = true); - - MP4Timestamp GetRtpTimestampStart(); - - void SetRtpTimestampStart(MP4Timestamp start); - - void AddHint(bool isBFrame, uint32_t timestampOffset); - - void AddPacket(bool setMbit, int32_t transmitOffset = 0); - - void AddImmediateData(const uint8_t* pBytes, uint32_t numBytes); - - void AddSampleData(MP4SampleId sampleId, - uint32_t dataOffset, uint32_t dataLength); - - void AddESConfigurationPacket(); - - void WriteHint(MP4Duration duration, bool isSyncSample); - - void FinishWrite(uint32_t options = 0); - -protected: - MP4Track* m_pRefTrack; - - MP4StringProperty* m_pRtpMapProperty; - MP4Integer32Property* m_pPayloadNumberProperty; - MP4Integer32Property* m_pMaxPacketSizeProperty; - MP4Integer32Property* m_pSnroProperty; - MP4Integer32Property* m_pTsroProperty; - uint32_t m_rtpSequenceStart; - uint32_t m_rtpTimestampStart; - - // reading - MP4RtpHint* m_pReadHint; - uint8_t* m_pReadHintSample; - uint32_t m_readHintSampleSize; - MP4Timestamp m_readHintTimestamp; - - // writing - MP4RtpHint* m_pWriteHint; - MP4SampleId m_writeHintId; - uint32_t m_writePacketId; - - // statistics - // in trak.udta.hinf - MP4Integer64Property* m_pTrpy; - MP4Integer64Property* m_pNump; - MP4Integer64Property* m_pTpyl; - MP4Integer32Property* m_pMaxr; - MP4Integer64Property* m_pDmed; - MP4Integer64Property* m_pDimm; - MP4Integer32Property* m_pPmax; - MP4Integer32Property* m_pDmax; - - // in trak.mdia.minf.hmhd - MP4Integer16Property* m_pMaxPdu; - MP4Integer16Property* m_pAvgPdu; - MP4Integer32Property* m_pMaxBitRate; - MP4Integer32Property* m_pAvgBitRate; - - MP4Timestamp m_thisSec; - uint32_t m_bytesThisSec; - uint32_t m_bytesThisHint; - uint32_t m_bytesThisPacket; -}; - -/////////////////////////////////////////////////////////////////////////////// - -} -} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_RTPHINT_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/src.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/src.h deleted file mode 100644 index 472d8a0e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/src.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef MP4V2_IMPL_SRC_H -#define MP4V2_IMPL_SRC_H - -/////////////////////////////////////////////////////////////////////////////// - -#include "libplatform/platform.h" -#include - -/////////////////////////////////////////////////////////////////////////////// - -namespace mp4v2 { namespace impl { - using namespace mp4v2::platform; - using io::File; - using io::FileSystem; -}} // namspace mp4v2::impl - -/////////////////////////////////////////////////////////////////////////////// - -#include "text.h" -#include "enum.h" -#include "exception.h" - -#include "bmff/typebmff.h" -#include "itmf/type.h" - -#include "util.h" -#include "log.h" -#include "mp4util.h" -#include "mp4array.h" -#include "mp4track.h" -#include "mp4file.h" -#include "mp4property.h" -#include "mp4container.h" - -#include "mp4atom.h" -#include "atoms.h" - -#include "bmff/bmff.h" -#include "itmf/itmf.h" -#include "qtff/qtff.h" - -#include "mp4descriptor.h" -#include "descriptors.h" -#include "ocidescriptors.h" - -#include "qosqualifiers.h" -#include "odcommands.h" -#include "rtphint.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_IMPL_SRC_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/text.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/text.cpp deleted file mode 100644 index 5790f967..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/text.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "src/impl.h" - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -bool -LessIgnoreCase::operator()( const string& xstr, const string& ystr ) const -{ - const string::size_type xlen = xstr.length(); - const string::size_type ylen = ystr.length(); - - if( xlen < ylen ) { - for( string::size_type i = 0; i < xlen; i++ ) { - const char x = std::toupper( xstr[i] ); - const char y = std::toupper( ystr[i] ); - - if( x < y ) - return true; - else if ( x > y ) - return false; - } - return true; - } - else { - for( string::size_type i = 0; i < ylen; i++ ) { - const char x = std::toupper( xstr[i] ); - const char y = std::toupper( ystr[i] ); - - if( x < y ) - return true; - else if ( x > y ) - return false; - } - return false; - } -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/text.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/text.h deleted file mode 100644 index 4afd336b..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/text.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef MP4V2_IMPL_TEXT_H -#define MP4V2_IMPL_TEXT_H - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -struct MP4V2_EXPORT LessIgnoreCase : less -{ - bool operator()( const string&, const string& ) const; -}; - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_TEXT_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/util.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/util.h deleted file mode 100644 index aa3aba67..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/src/util.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef MP4V2_IMPL_UTIL_H -#define MP4V2_IMPL_UTIL_H - -namespace mp4v2 { namespace impl { - -/////////////////////////////////////////////////////////////////////////////// - -inline int8_t max( int8_t a, int8_t b ) { - return ( a > b ) ? a : b; -} - -inline int16_t max( int16_t a, int16_t b ) { - return ( a > b ) ? a : b; -} - -inline int32_t max( int32_t a, int32_t b ) { - return ( a > b ) ? a : b; -} - -inline int64_t max( int64_t a, int64_t b ) { - return ( a > b ) ? a : b; -} - -/////////////////////////////////////////////////////////////////////////////// - -inline uint8_t max( uint8_t a, uint8_t b ) { - return ( a > b ) ? a : b; -} - -inline uint16_t max( uint16_t a, uint16_t b ) { - return ( a > b ) ? a : b; -} - -inline uint32_t max( uint32_t a, uint32_t b ) { - return ( a > b ) ? a : b; -} - -inline uint64_t max( uint64_t a, uint64_t b ) { - return ( a > b ) ? a : b; -} - -/////////////////////////////////////////////////////////////////////////////// - -inline int8_t min( int8_t a, int8_t b ) { - return ( a < b ) ? a : b; -} - -inline int16_t min( int16_t a, int16_t b ) { - return ( a < b ) ? a : b; -} - -inline int32_t min( int32_t a, int32_t b ) { - return ( a < b ) ? a : b; -} - -inline int64_t min( int64_t a, int64_t b ) { - return ( a < b ) ? a : b; -} - -/////////////////////////////////////////////////////////////////////////////// - -inline uint8_t min( uint8_t a, uint8_t b ) { - return ( a < b ) ? a : b; -} - -inline uint16_t min( uint16_t a, uint16_t b ) { - return ( a < b ) ? a : b; -} - -inline uint32_t min( uint32_t a, uint32_t b ) { - return ( a < b ) ? a : b; -} - -inline uint64_t min( uint64_t a, uint64_t b ) { - return ( a < b ) ? a : b; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::impl - -#endif // MP4V2_IMPL_UTIL_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/impl.h b/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/impl.h deleted file mode 100644 index 9daa2970..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/impl.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef MP4V2_UTIL_IMPL_H -#define MP4V2_UTIL_IMPL_H - -/////////////////////////////////////////////////////////////////////////////// - -#include "libutil/util.h" - -/////////////////////////////////////////////////////////////////////////////// - -#endif // MP4V2_UTIL_IMPL_H diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4art.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4art.cpp deleted file mode 100644 index add935ec..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4art.cpp +++ /dev/null @@ -1,438 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// Portions created by David Byron are Copyright (C) 2010. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// David Byron, dbyron@dbyron.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "util/impl.h" - -namespace mp4v2 { namespace util { - using namespace itmf; - -/////////////////////////////////////////////////////////////////////////////// - -class ArtUtility : public Utility -{ -private: - enum ArtLongCode { - LC_ART_ANY = _LC_MAX, - LC_ART_INDEX, - LC_LIST, - LC_ADD, - LC_REMOVE, - LC_REPLACE, - LC_EXTRACT, - }; - -public: - ArtUtility( int, char** ); - -protected: - // delegates implementation - bool utility_option( int, bool& ); - bool utility_job( JobContext& ); - -private: - struct ArtType { - string name; - string ext; - vector cwarns; // compatibility warnings - string cerror; // compatibility error - }; - - bool actionList ( JobContext& ); - bool actionAdd ( JobContext& ); - bool actionRemove ( JobContext& ); - bool actionReplace ( JobContext& ); - bool actionExtract ( JobContext& ); - - bool extractSingle( JobContext&, const CoverArtBox::Item&, uint32_t ); - -private: - Group _actionGroup; - Group _parmGroup; - - bool (ArtUtility::*_action)( JobContext& ); - - string _artImageFile; - uint32_t _artFilter; -}; - -/////////////////////////////////////////////////////////////////////////////// - -ArtUtility::ArtUtility( int argc, char** argv ) - : Utility ( "mp4art", argc, argv ) - , _actionGroup ( "ACTIONS" ) - , _parmGroup ( "ACTION PARAMETERS" ) - , _action ( NULL ) - , _artFilter ( numeric_limits::max() ) -{ - // add standard options which make sense for this utility - _group.add( STD_OPTIMIZE ); - _group.add( STD_DRYRUN ); - _group.add( STD_KEEPGOING ); - _group.add( STD_OVERWRITE ); - _group.add( STD_FORCE ); - _group.add( STD_QUIET ); - _group.add( STD_DEBUG ); - _group.add( STD_VERBOSE ); - _group.add( STD_HELP ); - _group.add( STD_VERSION ); - _group.add( STD_VERSIONX ); - - _parmGroup.add( "art-any", false, LC_ART_ANY, "act on all covr-boxes (default)" ); - _parmGroup.add( "art-index", true, LC_ART_INDEX, "act on covr-box index IDX", "IDX" ); - _groups.push_back( &_parmGroup ); - - _actionGroup.add( "list", false, LC_LIST, "list all covr-boxes" ); - _actionGroup.add( "add", true, LC_ADD, "add covr-box from IMG file", "IMG" ); - _actionGroup.add( "replace", true, LC_REPLACE, "replace covr-box with IMG file", "IMG" ); - _actionGroup.add( "remove", false, LC_REMOVE, "remove covr-box" ); - _actionGroup.add( "extract", false, LC_EXTRACT, "extract covr-box" ); - _groups.push_back( &_actionGroup ); - - _usage = "[OPTION]... ACTION file..."; - _description = - // 79-cols, inclusive, max desired width - // |----------------------------------------------------------------------------| - "\nFor each mp4 (m4a) file specified, perform the specified ACTION. An action" - "\nmust be specified. Some options are not applicable for some actions."; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ArtUtility::actionAdd( JobContext& job ) -{ - File in( _artImageFile, File::MODE_READ ); - if( in.open() ) - return herrf( "unable to open %s for read: %s\n", _artImageFile.c_str(), sys::getLastErrorStr() ); - - const uint32_t max = numeric_limits::max(); - if( in.size > max ) - return herrf( "file too large: %s (exceeds %u bytes)\n", _artImageFile.c_str(), max ); - - CoverArtBox::Item item; - item.size = static_cast( in.size ); - item.buffer = static_cast( malloc( item.size )); - item.autofree = true; - - File::Size nin; - if( in.read( item.buffer, item.size, nin )) - return herrf( "read failed: %s\n", _artImageFile.c_str() ); - - in.close(); - - verbose1f( "adding %s -> %s\n", _artImageFile.c_str(), job.file.c_str() ); - if( dryrunAbort() ) - return SUCCESS; - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - if( CoverArtBox::add( job.fileHandle, item )) - return herrf( "unable to add covr-box\n" ); - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ArtUtility::actionExtract( JobContext& job ) -{ - job.fileHandle = MP4Read( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for read: %s\n", job.file.c_str() ); - - // single-mode - if( _artFilter != numeric_limits::max() ) { - CoverArtBox::Item item; - if( CoverArtBox::get( job.fileHandle, item, _artFilter )) - return herrf( "unable to retrieve covr-box (index=%d): %s\n", _artFilter, job.file.c_str() ); - - return extractSingle( job, item, _artFilter ); - } - - // wildcard-mode - CoverArtBox::ItemList items; - if( CoverArtBox::list( job.fileHandle, items )) - return herrf( "unable to fetch list of covr-box: %s\n", job.file.c_str() ); - - bool onesuccess = false; - const CoverArtBox::ItemList::size_type max = items.size(); - for( CoverArtBox::ItemList::size_type i = 0; i < max; i++ ) { - bool rv = extractSingle( job, items[i], (uint32_t)i ); - if( !rv ) - onesuccess = true; - if( !_keepgoing && rv ) - return FAILURE; - } - - return _keepgoing ? onesuccess : SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ArtUtility::actionList( JobContext& job ) -{ - ostringstream report; - - const int widx = 3; - const int wsize = 8; - const int wtype = 9; - const string sep = " "; - - if( _jobCount == 0 ) { - report << setw(widx) << right << "IDX" << left - << sep << setw(wsize) << right << "BYTES" << left - << sep << setw(8) << "CRC32" - << sep << setw(wtype) << "TYPE" - << sep << setw(0) << "FILE" - << '\n'; - - report << setfill('-') << setw(70) << "" << setfill(' ') << '\n'; - } - - job.fileHandle = MP4Read( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for read: %s\n", job.file.c_str() ); - - CoverArtBox::ItemList items; - if( CoverArtBox::list( job.fileHandle, items )) - return herrf( "unable to get list of covr-box: %s\n", job.file.c_str() ); - - int line = 0; - const CoverArtBox::ItemList::size_type max = items.size(); - for( CoverArtBox::ItemList::size_type i = 0; i < max; i++ ) { - if( _artFilter != numeric_limits::max() && _artFilter != i ) - continue; - - CoverArtBox::Item& item = items[i]; - const uint32_t crc = crc32( item.buffer, item.size ); - - report << setw(widx) << right << i - << sep << setw(wsize) << item.size - << sep << setw(8) << setfill('0') << hex << crc << setfill(' ') << dec - << sep << setw(wtype) << left << enumBasicType.toString( item.type ); - - if( line++ == 0 ) - report << sep << setw(0) << job.file; - - report << '\n'; - } - - verbose1f( "%s", report.str().c_str() ); - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ArtUtility::actionRemove( JobContext& job ) -{ - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - if( _artFilter == numeric_limits::max() ) - verbose1f( "removing covr-box (all) from %s\n", job.file.c_str() ); - else - verbose1f( "removing covr-box (index=%d) from %s\n", _artFilter, job.file.c_str() ); - - if( dryrunAbort() ) - return SUCCESS; - - if( CoverArtBox::remove( job.fileHandle, _artFilter )) - return herrf( "remove failed\n" ); - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ArtUtility::actionReplace( JobContext& job ) -{ - File in( _artImageFile, File::MODE_READ ); - if( in.open() ) - return herrf( "unable to open %s for read: %s\n", _artImageFile.c_str(), sys::getLastErrorStr() ); - - const uint32_t max = numeric_limits::max(); - if( in.size > max ) - return herrf( "file too large: %s (exceeds %u bytes)\n", _artImageFile.c_str(), max ); - - CoverArtBox::Item item; - item.size = static_cast( in.size ); - item.buffer = static_cast( malloc( item.size )); - item.autofree = true; - - File::Size nin; - if( in.read( item.buffer, item.size, nin )) - return herrf( "read failed: %s\n", _artImageFile.c_str() ); - - in.close(); - - if( _artFilter == numeric_limits::max() ) - verbose1f( "replacing %s -> %s (all)\n", _artImageFile.c_str(), job.file.c_str() ); - else - verbose1f( "replacing %s -> %s (index=%d)\n", _artImageFile.c_str(), job.file.c_str(), _artFilter ); - - if( dryrunAbort() ) - return SUCCESS; - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - if( CoverArtBox::set( job.fileHandle, item, _artFilter )) - return herrf( "unable to add covr-box: %s\n", job.file.c_str() ); - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ArtUtility::extractSingle( JobContext& job, const CoverArtBox::Item& item, uint32_t index ) -{ - // compute out filename - string out_name = job.file; - FileSystem::pathnameStripExtension( out_name ); - - ostringstream oss; - oss << out_name << ".art[" << index << ']'; - - // if implicit we try to determine type by inspecting data - BasicType bt = item.type; - if( bt == BT_IMPLICIT ) - bt = computeBasicType( item.buffer, item.size ); - - // add file extension appropriate for known covr-box types - switch( bt ) { - case BT_GIF: oss << ".gif"; break; - case BT_JPEG: oss << ".jpg"; break; - case BT_PNG: oss << ".png"; break; - case BT_BMP: oss << ".bmp"; break; - - default: - oss << ".dat"; - break; - } - - out_name = oss.str(); - verbose1f( "extracting %s (index=%d) -> %s\n", job.file.c_str(), index, out_name.c_str() ); - if( dryrunAbort() ) - return SUCCESS; - - File out( out_name, File::MODE_CREATE ); - if( openFileForWriting( out )) - return FAILURE; - - File::Size nout; - if( out.write( item.buffer, item.size, nout )) - return herrf( "write failed: %s\n", out_name.c_str() ); - - out.close(); - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ArtUtility::utility_job( JobContext& job ) -{ - if( !_action ) - return herrf( "no action specified\n" ); - - return (this->*_action)( job ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -ArtUtility::utility_option( int code, bool& handled ) -{ - handled = true; - - switch( code ) { - case LC_ART_ANY: - _artFilter = numeric_limits::max(); - break; - - case LC_ART_INDEX: - { - istringstream iss( prog::optarg ); - iss >> _artFilter; - if( iss.rdstate() != ios::eofbit ) - return herrf( "invalid cover-art index: %s\n", prog::optarg ); - break; - } - - case LC_LIST: - _action = &ArtUtility::actionList; - break; - - case LC_ADD: - _action = &ArtUtility::actionAdd; - _artImageFile = prog::optarg; - if( _artImageFile.empty() ) - return herrf( "invalid image file: empty-string\n" ); - break; - - case LC_REMOVE: - _action = &ArtUtility::actionRemove; - break; - - case LC_REPLACE: - _action = &ArtUtility::actionReplace; - _artImageFile = prog::optarg; - if( _artImageFile.empty() ) - return herrf( "invalid image file: empty-string\n" ); - break; - - case LC_EXTRACT: - _action = &ArtUtility::actionExtract; - break; - - default: - handled = false; - break; - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util - -/////////////////////////////////////////////////////////////////////////////// - -extern "C" -int main( int argc, char** argv ) -{ - mp4v2::util::ArtUtility util( argc, argv ); - return util.process(); -} diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4chaps.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4chaps.cpp deleted file mode 100644 index 56aa484e..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4chaps.cpp +++ /dev/null @@ -1,1157 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Ullrich Pollaehne. -// Portions created by Kona Blend are Copyright (C) 2008. -// Portions created by David Byron are Copyright (C) 2010. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// Ullrich Pollaehne, u.pollaehne@@gmail.com -// David Byron, dbyron@dbyron.com -// -/////////////////////////////////////////////////////////////////////////////// -#include "util/impl.h" - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// -/// -/// Chapter utility program class. -/// -/// This class provides an implementation for a QuickTime/Nero chapter utility which -/// allows to add, delete, convert export or import QuickTime and Nero chapters -/// in MP4 container files. -/// -/// -/// @see Utility -/// -/////////////////////////////////////////////////////////////////////////////// -class ChapterUtility : public Utility -{ -private: - static const double CHAPTERTIMESCALE; //!< the timescale used for chapter tracks (1000) - - enum FileLongCode { - LC_CHPT_ANY = _LC_MAX, - LC_CHPT_QT, - LC_CHPT_NERO, - LC_CHPT_COMMON, - LC_CHP_LIST, - LC_CHP_CONVERT, - LC_CHP_EVERY, - LC_CHP_EXPORT, - LC_CHP_IMPORT, - LC_CHP_REMOVE - }; - - enum ChapterFormat { - CHPT_FMT_NATIVE, - CHPT_FMT_COMMON - }; - - enum FormatState { - FMT_STATE_INITIAL, - FMT_STATE_TIME_LINE, - FMT_STATE_TITLE_LINE, - FMT_STATE_FINISH - }; - -public: - ChapterUtility( int, char** ); - -protected: - // delegates implementation - bool utility_option( int, bool& ); - bool utility_job( JobContext& ); - -private: - bool actionList ( JobContext& ); - bool actionConvert ( JobContext& ); - bool actionEvery ( JobContext& ); - bool actionExport ( JobContext& ); - bool actionImport ( JobContext& ); - bool actionRemove ( JobContext& ); - -private: - Group _actionGroup; - Group _parmGroup; - - bool (ChapterUtility::*_action)( JobContext& ); - void fixQtScale(MP4FileHandle ); - MP4TrackId getReferencingTrack( MP4FileHandle, bool& ); - string getChapterTypeName( MP4ChapterType ) const; - bool parseChapterFile( const string, vector&, Timecode::Format& ); - bool readChapterFile( const string, char**, File::Size& ); - MP4Duration convertFrameToMillis( MP4Duration, uint32_t ); - - MP4ChapterType _ChapterType; - ChapterFormat _ChapterFormat; - uint32_t _ChaptersEvery; - string _ChapterFile; -}; - -/////////////////////////////////////////////////////////////////////////////// - -const double ChapterUtility::CHAPTERTIMESCALE = 1000.0; - -/////////////////////////////////////////////////////////////////////////////// - -ChapterUtility::ChapterUtility( int argc, char** argv ) - : Utility ( "mp4chaps", argc, argv ) - , _actionGroup ( "ACTIONS" ) - , _parmGroup ( "ACTION PARAMETERS" ) - , _action ( NULL ) - , _ChapterType ( MP4ChapterTypeAny ) - , _ChapterFormat ( CHPT_FMT_NATIVE ) - , _ChaptersEvery ( 0 ) -{ - // add standard options which make sense for this utility - _group.add( STD_OPTIMIZE ); - _group.add( STD_DRYRUN ); - _group.add( STD_KEEPGOING ); - _group.add( STD_OVERWRITE ); - _group.add( STD_FORCE ); - _group.add( STD_QUIET ); - _group.add( STD_DEBUG ); - _group.add( STD_VERBOSE ); - _group.add( STD_HELP ); - _group.add( STD_VERSION ); - _group.add( STD_VERSIONX ); - - _parmGroup.add( 'A', false, "chapter-any", false, LC_CHPT_ANY, "act on any chapter type (default)" ); - _parmGroup.add( 'Q', false, "chapter-qt", false, LC_CHPT_QT, "act on QuickTime chapters" ); - _parmGroup.add( 'N', false, "chapter-nero", false, LC_CHPT_NERO, "act on Nero chapters" ); - _parmGroup.add( 'C', false, "format-common", false, LC_CHPT_COMMON, "export chapters in common format" ); - _groups.push_back( &_parmGroup ); - - _actionGroup.add( 'l', false, "list", false, LC_CHP_LIST, "list available chapters" ); - _actionGroup.add( 'c', false, "convert", false, LC_CHP_CONVERT, "convert available chapters" ); - _actionGroup.add( 'e', true, "every", true, LC_CHP_EVERY, "create chapters every NUM seconds", "NUM" ); - _actionGroup.add( 'x', false, "export", false, LC_CHP_EXPORT, "export chapters to mp4file.chapters.txt", "TXT" ); - _actionGroup.add( 'i', false, "import", false, LC_CHP_IMPORT, "import chapters from mp4file.chapters.txt", "TXT" ); - _actionGroup.add( 'r', false, "remove", false, LC_CHP_REMOVE, "remove all chapters" ); - _groups.push_back( &_actionGroup ); - - _usage = "[OPTION]... ACTION [ACTION PARAMETERS] mp4file..."; - _description = - // 79-cols, inclusive, max desired width - // |----------------------------------------------------------------------------| - "\nFor each mp4 file specified, perform the specified ACTION. An action must be" - "\nspecified. Some options are not applicable to some actions."; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Action for listing chapters from job.file - * - * - * @param job the job to process - * @return mp4v2::util::SUCCESS if successful, mp4v2::util::FAILURE otherwise - */ -bool -ChapterUtility::actionList( JobContext& job ) -{ - job.fileHandle = MP4Read( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - { - return herrf( "unable to open for read: %s\n", job.file.c_str() ); - } - - MP4Chapter_t * chapters = 0; - uint32_t chapterCount = 0; - - // get the list of chapters - MP4ChapterType chtp = MP4GetChapters(job.fileHandle, &chapters, &chapterCount, _ChapterType); - if (0 == chapterCount) - { - verbose1f( "File \"%s\" does not contain chapters of type %s\n", job.file.c_str(), - getChapterTypeName( _ChapterType ).c_str() ); - return SUCCESS; - } - - // start output (more or less like mp4box does) - ostringstream report; - report << getChapterTypeName( chtp ) << ' ' << "Chapters of " << '"' << job.file << '"' << endl; - - Timecode duration(0, CHAPTERTIMESCALE); - duration.setFormat( Timecode::DECIMAL ); - for (uint32_t i = 0; i < chapterCount; ++i) - { - // print the infos - report << '\t' << "Chapter #" << setw( 3 ) << setfill( '0' ) << i+1 - << " - " << duration.svalue << " - " << '"' << chapters[i].title << '"' << endl; - - // add the duration of this chapter to the sum (is the start time of the next chapter) - duration += Timecode(chapters[i].duration, CHAPTERTIMESCALE); - } - - verbose1f( "%s", report.str().c_str() ); - - // free up the memory - MP4Free(chapters); - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Action for converting chapters in job.file - * - * - * @param job the job to process - * @return mp4v2::util::SUCCESS if successful, mp4v2::util::FAILURE otherwise - */ -bool -ChapterUtility::actionConvert( JobContext& job ) -{ - MP4ChapterType sourceType; - - switch( _ChapterType ) - { - case MP4ChapterTypeNero: - sourceType = MP4ChapterTypeQt; - break; - case MP4ChapterTypeQt: - sourceType = MP4ChapterTypeNero; - break; - default: - return herrf( "invalid chapter type \"%s\" define the chapter type to convert to\n", - getChapterTypeName( _ChapterType ).c_str() ); - } - - ostringstream oss; - oss << "converting chapters in file " << '"' << job.file << '"' - << " from " << getChapterTypeName( sourceType ) << " to " << getChapterTypeName( _ChapterType ) << endl; - - verbose1f( "%s", oss.str().c_str() ); - if( dryrunAbort() ) - { - return SUCCESS; - } - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - { - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - } - - MP4ChapterType chtp = MP4ConvertChapters( job.fileHandle, _ChapterType ); - if( MP4ChapterTypeNone == chtp ) - { - return herrf( "File %s does not contain chapters of type %s\n", job.file.c_str(), - getChapterTypeName( sourceType ).c_str() ); - } - - fixQtScale( job.fileHandle ); - job.optimizeApplicable = true; - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Action for setting chapters every n second in job.file - * - * - * @param job the job to process - * @return mp4v2::util::SUCCESS if successful, mp4v2::util::FAILURE otherwise - */ -bool -ChapterUtility::actionEvery( JobContext& job ) -{ - ostringstream oss; - oss << "Setting " << getChapterTypeName( _ChapterType ) << " chapters every " - << _ChaptersEvery << " seconds in file " << '"' << job.file << '"' << endl; - - verbose1f( "%s", oss.str().c_str() ); - if( dryrunAbort() ) - { - return SUCCESS; - } - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - { - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - } - - bool isVideoTrack = false; - MP4TrackId refTrackId = getReferencingTrack( job.fileHandle, isVideoTrack ); - if( !MP4_IS_VALID_TRACK_ID(refTrackId) ) - { - return herrf( "unable to find a video or audio track in file %s\n", job.file.c_str() ); - } - - Timecode refTrackDuration( MP4GetTrackDuration( job.fileHandle, refTrackId ), MP4GetTrackTimeScale( job.fileHandle, refTrackId ) ); - refTrackDuration.setScale( CHAPTERTIMESCALE ); - - Timecode chapterDuration( _ChaptersEvery * 1000, CHAPTERTIMESCALE ); - chapterDuration.setFormat( Timecode::DECIMAL ); - vector chapters; - - do - { - MP4Chapter_t chap; - chap.duration = refTrackDuration.duration > chapterDuration.duration ? chapterDuration.duration : refTrackDuration.duration; - sprintf(chap.title, "Chapter %lu", (unsigned long)chapters.size()+1); - - chapters.push_back( chap ); - refTrackDuration -= chapterDuration; - } - while( refTrackDuration.duration > 0 ); - - if( 0 < chapters.size() ) - { - MP4SetChapters(job.fileHandle, &chapters[0], (uint32_t)chapters.size(), _ChapterType); - } - - fixQtScale( job.fileHandle ); - job.optimizeApplicable = true; - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Action for exporting chapters from the job.file - * - * - * @param job the job to process - * @return mp4v2::util::SUCCESS if successful, mp4v2::util::FAILURE otherwise - */ -bool -ChapterUtility::actionExport( JobContext& job ) -{ - job.fileHandle = MP4Read( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - { - return herrf( "unable to open for read: %s\n", job.file.c_str() ); - } - - // get the list of chapters - MP4Chapter_t* chapters = 0; - uint32_t chapterCount = 0; - MP4ChapterType chtp = MP4GetChapters( job.fileHandle, &chapters, &chapterCount, _ChapterType ); - if (0 == chapterCount) - { - return herrf( "File \"%s\" does not contain chapters of type %s\n", job.file.c_str(), - getChapterTypeName( chtp ).c_str() ); - } - - // build the filename - string outName = job.file; - if( _ChapterFile.empty() ) - { - FileSystem::pathnameStripExtension( outName ); - outName.append( ".chapters.txt" ); - } - else - { - outName = _ChapterFile; - } - - ostringstream oss; - oss << "Exporting " << chapterCount << " " << getChapterTypeName( chtp ); - oss << " chapters from file " << '"' << job.file << '"' << " into chapter file " << '"' << outName << '"' << endl; - - verbose1f( "%s", oss.str().c_str() ); - if( dryrunAbort() ) - { - // free up the memory - MP4Free(chapters); - - return SUCCESS; - } - - // open the file - File out( outName, File::MODE_CREATE ); - if( openFileForWriting( out ) ) - { - // free up the memory - MP4Free(chapters); - - return FAILURE; - } - - // write the chapters -#if defined( _WIN32 ) - static const char* LINEND = "\r\n"; -#else - static const char* LINEND = "\n"; -#endif - File::Size nout; - bool failure = SUCCESS; - int width = 2; - if( CHPT_FMT_COMMON == _ChapterFormat && (chapterCount / 100) >= 1 ) - { - width = 3; - } - Timecode duration( 0, CHAPTERTIMESCALE ); - duration.setFormat( Timecode::DECIMAL ); - for( uint32_t i = 0; i < chapterCount; ++i ) - { - // print the infos - ostringstream oss; - switch( _ChapterFormat ) - { - case CHPT_FMT_COMMON: - oss << "CHAPTER" << setw( width ) << setfill( '0' ) << i+1 << '=' << duration.svalue << LINEND - << "CHAPTER" << setw( width ) << setfill( '0' ) << i+1 << "NAME=" << chapters[i].title << LINEND; - break; - case CHPT_FMT_NATIVE: - default: - oss << duration.svalue << ' ' << chapters[i].title << LINEND; - } - - string str = oss.str(); - if( out.write( str.c_str(), str.size(), nout ) ) - { - failure = herrf( "write to %s failed: %s\n", outName.c_str(), sys::getLastErrorStr() ); - break; - } - - // add the duration of this chapter to the sum (the start time of the next chapter) - duration += Timecode(chapters[i].duration, CHAPTERTIMESCALE); - } - out.close(); - if( failure ) - { - verbose1f( "removing file %s\n", outName.c_str() ); - ::remove( outName.c_str() ); - } - - // free up the memory - MP4Free(chapters); - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Action for importing chapters into the job.file - * - * - * @param job the job to process - * @return mp4v2::util::SUCCESS if successful, mp4v2::util::FAILURE otherwise - */ -bool -ChapterUtility::actionImport( JobContext& job ) -{ - vector chapters; - Timecode::Format format; - - // create the chapter file name - string inName = job.file; - if( _ChapterFile.empty() ) - { - FileSystem::pathnameStripExtension( inName ); - inName.append( ".chapters.txt" ); - } - else - { - inName = _ChapterFile; - } - - if( parseChapterFile( inName, chapters, format ) ) - { - return FAILURE; - } - - ostringstream oss; - oss << "Importing " << chapters.size() << " " << getChapterTypeName( _ChapterType ); - oss << " chapters from file " << inName << " into file " << '"' << job.file << '"' << endl; - - verbose1f( "%s", oss.str().c_str() ); - if( dryrunAbort() ) - { - return SUCCESS; - } - - if( 0 == chapters.size() ) - { - return herrf( "No chapters found in file %s\n", inName.c_str() ); - } - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - { - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - } - - bool isVideoTrack = false; - MP4TrackId refTrackId = getReferencingTrack( job.fileHandle, isVideoTrack ); - if( !MP4_IS_VALID_TRACK_ID(refTrackId) ) - { - return herrf( "unable to find a video or audio track in file %s\n", job.file.c_str() ); - } - if( Timecode::FRAME == format && !isVideoTrack ) - { - // we need a video track for this - return herrf( "unable to find a video track in file %s but chapter file contains frame timestamps\n", job.file.c_str() ); - } - - // get duration and recalculate scale - Timecode refTrackDuration( MP4GetTrackDuration( job.fileHandle, refTrackId ), - MP4GetTrackTimeScale( job.fileHandle, refTrackId ) ); - refTrackDuration.setScale( CHAPTERTIMESCALE ); - - // check for chapters starting after duration of reftrack - for( vector::iterator it = chapters.begin(); it != chapters.end(); ) - { - Timecode curr( (*it).duration, CHAPTERTIMESCALE ); - if( refTrackDuration <= curr ) - { - hwarnf( "Chapter '%s' start: %s, playlength of file: %s, chapter cannot be set\n", - (*it).title, curr.svalue.c_str(), refTrackDuration.svalue.c_str() ); - it = chapters.erase( it ); - } - else - { - ++it; - } - } - if( 0 == chapters.size() ) - { - return SUCCESS; - } - - // convert start time into duration - uint32_t framerate = static_cast( CHAPTERTIMESCALE ); - if( Timecode::FRAME == format ) - { - // get the framerate - MP4SampleId sampleCount = MP4GetTrackNumberOfSamples( job.fileHandle, refTrackId ); - Timecode tmpcd( refTrackDuration.svalue, CHAPTERTIMESCALE ); - framerate = static_cast( std::ceil( ((double)sampleCount / (double)tmpcd.duration) * CHAPTERTIMESCALE ) ); - } - - for( vector::iterator it = chapters.begin(); it != chapters.end(); ++it ) - { - MP4Duration currDur = (*it).duration; - MP4Duration nextDur = chapters.end() == it+1 ? refTrackDuration.duration : (*(it+1)).duration; - - if( Timecode::FRAME == format ) - { - // convert from frame nr to milliseconds - currDur = convertFrameToMillis( (*it).duration, framerate ); - - if( chapters.end() != it+1 ) - { - nextDur = convertFrameToMillis( (*(it+1)).duration, framerate ); - } - } - - (*it).duration = nextDur - currDur; - } - - // now set the chapters - MP4SetChapters( job.fileHandle, &chapters[0], (uint32_t)chapters.size(), _ChapterType ); - - fixQtScale( job.fileHandle ); - job.optimizeApplicable = true; - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Action for removing chapters from the job.file - * - * - * @param job the job to process - * @return mp4v2::util::SUCCESS if successful, mp4v2::util::FAILURE otherwise - */ -bool -ChapterUtility::actionRemove( JobContext& job ) -{ - ostringstream oss; - oss << "Deleting " << getChapterTypeName( _ChapterType ) << " chapters from file " << '"' << job.file << '"' << endl; - - verbose1f( "%s", oss.str().c_str() ); - if( dryrunAbort() ) - { - return SUCCESS; - } - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - { - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - } - - MP4ChapterType chtp = MP4DeleteChapters( job.fileHandle, _ChapterType ); - if( MP4ChapterTypeNone == chtp ) - { - return FAILURE; - } - - fixQtScale( job.fileHandle ); - job.optimizeApplicable = true; - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** process positional argument - * - * @see Utility::utility_job( JobContext& ) - */ -bool -ChapterUtility::utility_job( JobContext& job ) -{ - if( !_action ) - { - return herrf( "no action specified\n" ); - } - - return (this->*_action)( job ); -} - -/////////////////////////////////////////////////////////////////////////////// - -/** process command-line option - * - * @see Utility::utility_option( int, bool& ) - */ -bool -ChapterUtility::utility_option( int code, bool& handled ) -{ - handled = true; - - switch( code ) { - case 'A': - case LC_CHPT_ANY: - _ChapterType = MP4ChapterTypeAny; - break; - - case 'Q': - case LC_CHPT_QT: - _ChapterType = MP4ChapterTypeQt; - break; - - case 'N': - case LC_CHPT_NERO: - _ChapterType = MP4ChapterTypeNero; - break; - - case 'C': - case LC_CHPT_COMMON: - _ChapterFormat = CHPT_FMT_COMMON; - break; - - case 'l': - case LC_CHP_LIST: - _action = &ChapterUtility::actionList; - break; - - case 'e': - case LC_CHP_EVERY: - { - istringstream iss( prog::optarg ); - iss >> _ChaptersEvery; - if( iss.rdstate() != ios::eofbit ) - { - return herrf( "invalid number of seconds: %s\n", prog::optarg ); - } - _action = &ChapterUtility::actionEvery; - break; - } - - case 'x': - _action = &ChapterUtility::actionExport; - break; - - case LC_CHP_EXPORT: - _action = &ChapterUtility::actionExport; - /* currently not supported since the chapters of n input files would be written to one chapter file - _ChapterFile = prog::optarg; - if( _ChapterFile.empty() ) - { - return herrf( "invalid TXT file: empty-string\n" ); - } - */ - break; - - case 'i': - _action = &ChapterUtility::actionImport; - break; - - case LC_CHP_IMPORT: - _action = &ChapterUtility::actionImport; - /* currently not supported since the chapters of n input files would be read from one chapter file - _ChapterFile = prog::optarg; - if( _ChapterFile.empty() ) - { - return herrf( "invalid TXT file: empty-string\n" ); - } - */ - break; - - case 'c': - case LC_CHP_CONVERT: - _action = &ChapterUtility::actionConvert; - break; - - case 'r': - case LC_CHP_REMOVE: - _action = &ChapterUtility::actionRemove; - break; - - default: - handled = false; - break; - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Fix a QuickTime/iPod issue with long audio files. - * - * This function checks if the file is a long audio file (more than - * about 6 1/2 hours) and modifies the timescale if necessary to allow - * playback of the file in QuickTime player and on some iPod models. - * - * @param file the opened MP4 file - */ -void -ChapterUtility::fixQtScale(MP4FileHandle file) -{ - // get around a QuickTime/iPod issue with storing the number of samples in a signed 32Bit value - if( INT_MAX < MP4GetDuration(file)) - { - bool isVideoTrack = false; - if( MP4_IS_VALID_TRACK_ID(getReferencingTrack( file, isVideoTrack )) & isVideoTrack ) - { - // if it is a video, everything is different - return; - } - - // timescale too high, lower it - MP4ChangeMovieTimeScale(file, 1000); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Finds a suitable track that can reference a chapter track. - * - * This function returns the first video or audio track that is found - * in the file. - * This track ca be used to reference the QuickTime chapter track. - * - * @param file the opened MP4 file - * @param isVideoTrack receives true if the found track is video, false otherwise - * @return the MP4TrackId of the found track - */ -MP4TrackId -ChapterUtility::getReferencingTrack( MP4FileHandle file, bool& isVideoTrack ) -{ - isVideoTrack = false; - - uint32_t trackCount = MP4GetNumberOfTracks( file ); - if( 0 == trackCount ) - { - return MP4_INVALID_TRACK_ID; - } - - MP4TrackId refTrackId = MP4_INVALID_TRACK_ID; - for( uint32_t i = 0; i < trackCount; ++i ) - { - MP4TrackId id = MP4FindTrackId( file, i ); - const char* type = MP4GetTrackType( file, id ); - if( MP4_IS_VIDEO_TRACK_TYPE( type ) ) - { - refTrackId = id; - isVideoTrack = true; - break; - } - else if( MP4_IS_AUDIO_TRACK_TYPE( type ) ) - { - refTrackId = id; - break; - } - } - - return refTrackId; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Return a human readable representation of a MP4ChapterType. - * - * @param chapterType the chapter type - * @return a string representing the chapter type - */ -string -ChapterUtility::getChapterTypeName( MP4ChapterType chapterType) const -{ - switch( chapterType ) - { - case MP4ChapterTypeQt: - return string( "QuickTime" ); - break; - - case MP4ChapterTypeNero: - return string( "Nero" ); - break; - - case MP4ChapterTypeAny: - return string( "QuickTime and Nero" ); - break; - - default: - return string( "Unknown" ); - } -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Read a file into a buffer. - * - * This function reads the file named by filename into a buffer allocated - * by malloc and returns the pointer to this buffer in buffer and the size - * of this buffer in fileSize. - * - * @param filename the name of the file. - * @param buffer receives a pointer to the created buffer - * @param fileSize reference to a io::StdioFile::Size that receives the size of the file - * @return true if there was an error, false otherwise - */ -bool -ChapterUtility::readChapterFile( const string filename, char** buffer, File::Size& fileSize ) -{ - // open the file - File in( filename, File::MODE_READ ); - File::Size nin; - if( in.open() ) { - return herrf( "opening chapter file '%s' failed: %s\n", filename.c_str(), sys::getLastErrorStr() ); - } - - // get the file size - fileSize = in.size; - if( 0 >= fileSize ) - { - in.close(); - return herrf( "getting size of chapter file '%s' failed: %s\n", filename.c_str(), sys::getLastErrorStr() ); - } - - // allocate a buffer for the file and read the content - char* inBuf = static_cast( malloc( fileSize+1 ) ); - if( in.read( inBuf, fileSize, nin ) ) - { - in.close(); - return herrf( "reading chapter file '%s' failed: %s\n", filename.c_str(), sys::getLastErrorStr() ); - } - in.close(); - inBuf[fileSize] = 0; - - *buffer = inBuf; - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Read and parse a chapter file. - * - * This function reads and parses a chapter file and returns a vector of - * MP4Chapter_t elements. - * - * @param filename the name of the file. - * @param vector receives a vector of chapters - * @param format receives the Timecode::Format of the timestamps - * @return true if there was an error, false otherwise - */ -bool -ChapterUtility::parseChapterFile( const string filename, vector& chapters, Timecode::Format& format ) -{ - // get the content - char * inBuf; - File::Size fileSize; - if( readChapterFile( filename, &inBuf, fileSize ) ) - { - return FAILURE; - } - - // separate the text lines - char* pos = inBuf; - while (pos < inBuf + fileSize) - { - if (*pos == '\n' || *pos == '\r') - { - *pos = 0; - if (pos > inBuf) - { - // remove trailing whitespace - char* tmp = pos-1; - while ((*tmp == ' ' || *tmp == '\t') && tmp > inBuf) - { - *tmp = 0; - tmp--; - } - } - } - pos++; - } - pos = inBuf; - - // check for a BOM - char bom[5] = {0}; - int bomLen = 0; - const unsigned char* uPos = reinterpret_cast( pos ); - if( 0xEF == *uPos && 0xBB == *(uPos+1) && 0xBF == *(uPos+2) ) - { - // UTF-8 (we do not need the BOM) - pos += 3; - } - else if( ( 0xFE == *uPos && 0xFF == *(uPos+1) ) // UTF-16 big endian - || ( 0xFF == *uPos && 0xFE == *(uPos+1) ) ) // UTF-16 little endian - { - // store the BOM to prepend the title strings - bom[0] = *pos++; - bom[1] = *pos++; - bomLen = 2; - return herrf( "chapter file '%s' has UTF-16 encoding which is not supported (only UTF-8 is allowed)\n", - filename.c_str() ); - } - else if( ( 0x0 == *uPos && 0x0 == *(uPos+1) && 0xFE == *(uPos+2) && 0xFF == *(uPos+3) ) // UTF-32 big endian - || ( 0xFF == *uPos && *(uPos+1) == 0xFE && *(uPos+2) == 0x0 && 0x0 == *(uPos+3) ) ) // UTF-32 little endian - { - // store the BOM to prepend the title strings - bom[0] = *pos++; - bom[1] = *pos++; - bom[2] = *pos++; - bom[3] = *pos++; - bomLen = 4; - return herrf( "chapter file '%s' has UTF-32 encoding which is not supported (only UTF-8 is allowed)\n", - filename.c_str() ); - } - - // parse the lines - bool failure = false; - uint32_t currentChapter = 0; - FormatState formatState = FMT_STATE_INITIAL; - char* titleStart = 0; - uint32_t titleLen = 0; - char* timeStart = 0; - while( pos < inBuf + fileSize ) - { - if( 0 == *pos || ' ' == *pos || '\t' == *pos ) - { - // uninteresting chars - pos++; - continue; - } - else if( '#' == *pos ) - { - // comment line - pos += strlen( pos ); - continue; - } - else if( isdigit( *pos ) ) - { - // mp4chaps native format: hh:mm:ss.sss - - timeStart = pos; - - // read the title if there is one - titleStart = strchr( timeStart, ' ' ); - if( NULL == titleStart ) - { - titleStart = strchr( timeStart, '\t' ); - } - - if( NULL != titleStart ) - { - *titleStart = 0; - pos = ++titleStart; - - while( ' ' == *titleStart || '\t' == *titleStart ) - { - titleStart++; - } - - titleLen = (uint32_t)strlen( titleStart ); - - // advance to the end of the line - pos = titleStart + 1 + titleLen; - } - else - { - // advance to the end of the line - pos += strlen( pos ); - } - - formatState = FMT_STATE_FINISH; - } -#if defined( _MSC_VER ) - else if( 0 == strnicmp( pos, "CHAPTER", 7 ) ) -#else - else if( 0 == strncasecmp( pos, "CHAPTER", 7 ) ) -#endif - { - // common format: CHAPTERxx=hh:mm:ss.sss\nCHAPTERxxNAME=<title> - - char* equalsPos = strchr( pos+7, '=' ); - if( NULL == equalsPos ) - { - herrf( "Unable to parse line \"%s\"\n", pos ); - failure = true; - break; - } - - *equalsPos = 0; - - char* tlwr = pos; - while( equalsPos != tlwr ) - { - *tlwr = tolower( *tlwr ); - tlwr++; - } - - if( NULL != strstr( pos, "name" ) ) - { - // mark the chapter title - uint32_t chNr = 0; - sscanf( pos, "chapter%dname", &chNr ); - if( chNr != currentChapter ) - { - // different chapter number => different chapter definition pair - if( FMT_STATE_INITIAL != formatState ) - { - herrf( "Chapter lines are not consecutive before line \"%s\"\n", pos ); - failure = true; - break; - } - - currentChapter = chNr; - } - formatState = FMT_STATE_TIME_LINE == formatState ? FMT_STATE_FINISH - : FMT_STATE_TITLE_LINE; - - titleStart = equalsPos + 1; - titleLen = (uint32_t)strlen( titleStart ); - - // advance to the end of the line - pos = titleStart + titleLen; - } - else - { - // mark the chapter start time - uint32_t chNr = 0; - sscanf( pos, "chapter%d", &chNr ); - if( chNr != currentChapter ) - { - // different chapter number => different chapter definition pair - if( FMT_STATE_INITIAL != formatState ) - { - herrf( "Chapter lines are not consecutive at line \"%s\"\n", pos ); - failure = true; - break; - } - - currentChapter = chNr; - } - formatState = FMT_STATE_TITLE_LINE == formatState ? FMT_STATE_FINISH - : FMT_STATE_TIME_LINE; - - timeStart = equalsPos + 1; - - // advance to the end of the line - pos = timeStart + strlen( timeStart ); - } - } - - if( FMT_STATE_FINISH == formatState ) - { - // now we have title and start time - MP4Chapter_t chap; - - strncpy( chap.title, titleStart, min( titleLen, (uint32_t)MP4V2_CHAPTER_TITLE_MAX ) ); - chap.title[titleLen] = 0; - - Timecode tc( 0, CHAPTERTIMESCALE ); - string tm( timeStart ); - if( tc.parse( tm ) ) - { - herrf( "Unable to parse time code from \"%s\"\n", tm.c_str() ); - failure = true; - break; - } - chap.duration = tc.duration; - format = tc.format; - - // ad the chapter to the list - chapters.push_back( chap ); - - // re-initialize - formatState = FMT_STATE_INITIAL; - titleStart = timeStart = NULL; - titleLen = 0; - } - } - free( inBuf ); - if( failure ) - { - return failure; - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -/** Convert from frame to millisecond timestamp. - * - * This function converts a timestamp from hh:mm:ss:ff to hh:mm:ss.sss - * - * @param duration the timestamp in hours:minutes:seconds:frames. - * @param framerate the frames per second - * @return the timestamp in milliseconds - */ -MP4Duration -ChapterUtility::convertFrameToMillis( MP4Duration duration, uint32_t framerate ) -{ - Timecode tc( duration, CHAPTERTIMESCALE ); - if( framerate < tc.subseconds ) - { - uint64_t seconds = tc.subseconds / framerate; - tc.setSeconds( tc.seconds + seconds ); - tc.setSubseconds( (tc.subseconds - (seconds * framerate)) * framerate ); - } - else - { - tc.setSubseconds( tc.subseconds * framerate ); - } - - return tc.duration; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util - -/////////////////////////////////////////////////////////////////////////////// - -extern "C" -int main( int argc, char** argv ) -{ - mp4v2::util::ChapterUtility util( argc, argv ); - return util.process(); -} diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4extract.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4extract.cpp deleted file mode 100644 index 1e3c2323..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4extract.cpp +++ /dev/null @@ -1,252 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -// N.B. mp4extract just extracts tracks/samples from an mp4 file -// For many track types this is insufficient to reconsruct a valid -// elementary stream (ES). Use "mp4creator -extract=<trackId>" if -// you need the ES reconstructed. - -#include "util/impl.h" - -using namespace mp4v2::util; - -char* ProgName; -char* Mp4PathName; -char* Mp4FileName; - -// forward declaration -void ExtractTrack( MP4FileHandle mp4File, MP4TrackId trackId, - bool sampleMode, MP4SampleId sampleId, char* dstFileName = NULL ); - -extern "C" int main( int argc, char** argv ) -{ - const char* const usageString = - "[-l] [-t <track-id>] [-s <sample-id>] [-v [<level>]] <file-name>"; - bool doList = false; - bool doSamples = false; - MP4TrackId trackId = MP4_INVALID_TRACK_ID; - MP4SampleId sampleId = MP4_INVALID_SAMPLE_ID; - char* dstFileName = NULL; - MP4LogLevel verbosity = MP4_LOG_ERROR; - - /* begin processing command line */ - ProgName = argv[0]; - while ( true ) { - int c = -1; - int option_index = 0; - static const prog::Option long_options[] = { - { "list", prog::Option::NO_ARG, 0, 'l' }, - { "track", prog::Option::REQUIRED_ARG, 0, 't' }, - { "sample", prog::Option::OPTIONAL_ARG, 0, 's' }, - { "verbose", prog::Option::OPTIONAL_ARG, 0, 'v' }, - { "version", prog::Option::NO_ARG, 0, 'V' }, - { NULL, prog::Option::NO_ARG, 0, 0 } - }; - - c = prog::getOptionSingle( argc, argv, "lt:s::v::V", long_options, &option_index ); - - if ( c == -1 ) - break; - - switch ( c ) { - case 'l': - doList = true; - break; - case 's': - doSamples = true; - if ( prog::optarg ) { - if ( sscanf( prog::optarg, "%u", &sampleId ) != 1 ) { - fprintf( stderr, - "%s: bad sample-id specified: %s\n", - ProgName, prog::optarg ); - } - } - break; - case 't': - if ( sscanf( prog::optarg, "%u", &trackId ) != 1 ) { - fprintf( stderr, - "%s: bad track-id specified: %s\n", - ProgName, prog::optarg ); - exit( 1 ); - } - break; - case 'v': - verbosity = MP4_LOG_VERBOSE1; - if ( prog::optarg ) { - uint32_t level; - if ( sscanf( prog::optarg, "%u", &level ) == 1 ) { - if ( level >= 2 ) { - verbosity = MP4_LOG_VERBOSE2; - } - if ( level >= 3 ) { - verbosity = MP4_LOG_VERBOSE3; - } - if ( level >= 4 ) { - verbosity = MP4_LOG_VERBOSE4; - } - } - } - break; - case '?': - fprintf( stderr, "usage: %s %s\n", ProgName, usageString ); - exit( 0 ); - case 'V': - fprintf( stderr, "%s - %s\n", ProgName, MP4V2_PROJECT_name_formal ); - exit( 0 ); - default: - fprintf( stderr, "%s: unknown option specified, ignoring: %c\n", - ProgName, c ); - } - } - - /* check that we have at least one non-option argument */ - if ( ( argc - prog::optind ) < 1 ) { - fprintf( stderr, "usage: %s %s\n", ProgName, usageString ); - exit( 1 ); - } - - MP4LogSetLevel(verbosity); - if ( verbosity ) { - fprintf( stderr, "%s version %s\n", ProgName, MP4V2_PROJECT_version ); - } - - /* point to the specified file names */ - Mp4PathName = argv[prog::optind++]; - - /* get dest file name for a single track */ - if ( trackId && ( argc - prog::optind ) > 0 ) { - dstFileName = argv[prog::optind++]; - } - - char* lastSlash = strrchr( Mp4PathName, '/' ); - if ( lastSlash ) { - Mp4FileName = lastSlash + 1; - } - else { - Mp4FileName = Mp4PathName; - } - - /* warn about extraneous non-option arguments */ - if ( prog::optind < argc ) { - fprintf( stderr, "%s: unknown options specified, ignoring: ", ProgName ); - while ( prog::optind < argc ) { - fprintf( stderr, "%s ", argv[prog::optind++] ); - } - fprintf( stderr, "\n" ); - } - - /* end processing of command line */ - - - MP4FileHandle mp4File = MP4Read( Mp4PathName ); - - if ( !mp4File ) { - exit( 1 ); - } - - if ( doList ) { - MP4Info( mp4File ); - exit( 0 ); - } - - if ( trackId == 0 ) { - uint32_t numTracks = MP4GetNumberOfTracks( mp4File ); - - for ( uint32_t i = 0; i < numTracks; i++ ) { - trackId = MP4FindTrackId( mp4File, i ); - ExtractTrack( mp4File, trackId, doSamples, sampleId ); - } - } - else { - ExtractTrack( mp4File, trackId, doSamples, sampleId, dstFileName ); - } - - MP4Close( mp4File ); - - return( 0 ); -} - -void ExtractTrack( MP4FileHandle mp4File, MP4TrackId trackId, - bool sampleMode, MP4SampleId sampleId, char* dstFileName ) -{ - static string outName; - File out; - - if( !sampleMode ) { - if( !dstFileName ) { - stringstream ss; - ss << Mp4FileName << ".t" << trackId; - outName = ss.str(); - } else { - outName = dstFileName; - } - - if( out.open( outName.c_str(), File::MODE_CREATE )) { - fprintf( stderr, "%s: can't open %s: %s\n", ProgName, outName.c_str(), sys::getLastErrorStr() ); - return; - } - } - - MP4SampleId numSamples; - - if ( sampleMode && sampleId != MP4_INVALID_SAMPLE_ID ) { - numSamples = sampleId; - } - else { - sampleId = 1; - numSamples = MP4GetTrackNumberOfSamples( mp4File, trackId ); - } - - for ( ; sampleId <= numSamples; sampleId++ ) { - // signals to ReadSample() that it should malloc a buffer for us - uint8_t* pSample = NULL; - uint32_t sampleSize = 0; - - if( !MP4ReadSample( mp4File, trackId, sampleId, &pSample, &sampleSize )) { - fprintf( stderr, "%s: read sample %u for %s failed\n", ProgName, sampleId, outName.c_str() ); - break; - } - - if ( sampleMode ) { - stringstream ss; - ss << Mp4FileName << ".t" << trackId << ".s" << sampleId; - outName = ss.str(); - - if( out.open( outName.c_str(), File::MODE_CREATE )) { - fprintf( stderr, "%s: can't open %s: %s\n", ProgName, outName.c_str(), sys::getLastErrorStr() ); - break; - } - } - - File::Size nout; - if( out.write( pSample, sampleSize, nout )) { - fprintf( stderr, "%s: write to %s failed: %s\n", ProgName, outName.c_str(), sys::getLastErrorStr() ); - break; - } - - free( pSample ); - - if( sampleMode ) - out.close(); - } - - out.close(); -} diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4file.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4file.cpp deleted file mode 100644 index c27844b9..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4file.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// Portions created by David Byron are Copyright (C) 2010. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// David Byron, dbyron@dbyron.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "util/impl.h" - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -class FileUtility : public Utility -{ -private: - enum FileLongCode { - LC_LIST = _LC_MAX, - LC_OPTIMIZE, - LC_DUMP, - }; - -public: - FileUtility( int, char** ); - -protected: - // delegates implementation - bool utility_option( int, bool& ); - bool utility_job( JobContext& ); - -private: - bool actionList ( JobContext& ); - bool actionOptimize ( JobContext& ); - bool actionDump ( JobContext& ); - -private: - Group _actionGroup; - - bool (FileUtility::*_action)( JobContext& ); -}; - -/////////////////////////////////////////////////////////////////////////////// - -FileUtility::FileUtility( int argc, char** argv ) - : Utility ( "mp4file", argc, argv ) - , _actionGroup ( "ACTIONS" ) - , _action ( NULL ) -{ - // add standard options which make sense for this utility - _group.add( STD_DRYRUN ); - _group.add( STD_KEEPGOING ); - _group.add( STD_QUIET ); - _group.add( STD_DEBUG ); - _group.add( STD_VERBOSE ); - _group.add( STD_HELP ); - _group.add( STD_VERSION ); - _group.add( STD_VERSIONX ); - - _actionGroup.add( "list", false, LC_LIST, "list (summary information)" ); - _actionGroup.add( "optimize", false, LC_OPTIMIZE, "optimize mp4 structure" ); - _actionGroup.add( "dump", false, LC_DUMP, "dump mp4 structure in human-readable format" ); - _groups.push_back( &_actionGroup ); - - _usage = "[OPTION]... ACTION file..."; - _description = - // 79-cols, inclusive, max desired width - // |----------------------------------------------------------------------------| - "\nFor each mp4 file specified, perform the specified ACTION. An action must be" - "\nspecified. Some options are not applicable to some actions."; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileUtility::actionDump( JobContext& job ) -{ - job.fileHandle = MP4Read( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for read: %s\n", job.file.c_str() ); - - if( !MP4Dump( job.fileHandle, _debugImplicits )) - return herrf( "dump failed: %s\n", job.file.c_str() ); - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileUtility::actionList( JobContext& job ) -{ - ostringstream report; - - const int wbrand = 5; - const int wcompat = 18; - const int wsizing = 6; - const string sep = " "; - - if( _jobCount == 0 ) { - report << setw(wbrand) << left << "BRAND" - << sep << setw(wcompat) << left << "COMPAT" - << sep << setw(wsizing) << left << "SIZING" - << sep << setw(0) << "FILE" - << '\n'; - - report << setfill('-') << setw(70) << "" << setfill(' ') << '\n'; - } - - job.fileHandle = MP4Read( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for read: %s\n", job.file.c_str() ); - - FileSummaryInfo info; - if( fileFetchSummaryInfo( job.fileHandle, info )) - return herrf( "unable to fetch file summary info" ); - - string compat; - { - const FileSummaryInfo::BrandSet::iterator ie = info.compatible_brands.end(); - int count = 0; - for( FileSummaryInfo::BrandSet::iterator it = info.compatible_brands.begin(); it != ie; it++, count++ ) { - if( count > 0 ) - compat += ','; - compat += *it; - } - } - - const bool sizing = info.nlargesize | info.nversion1 | info.nspecial; - - report << setw(wbrand) << left << info.major_brand - << sep << setw(wcompat) << left << compat - << sep << setw(wsizing) << left << (sizing ? "64-bit" : "32-bit") - << sep << job.file - << '\n'; - - verbose1f( "%s", report.str().c_str() ); - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileUtility::actionOptimize( JobContext& job ) -{ - verbose1f( "optimizing %s\n", job.file.c_str() ); - - if( dryrunAbort() ) - return SUCCESS; - - if( !MP4Optimize( job.file.c_str(), NULL )) - return herrf( "optimize failed: %s\n", job.file.c_str() ); - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileUtility::utility_job( JobContext& job ) -{ - if( !_action ) - return herrf( "no action specified\n" ); - - return (this->*_action)( job ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -FileUtility::utility_option( int code, bool& handled ) -{ - handled = true; - - switch( code ) { - case LC_LIST: - _action = &FileUtility::actionList; - break; - - case LC_OPTIMIZE: - _action = &FileUtility::actionOptimize; - break; - - case LC_DUMP: - _action = &FileUtility::actionDump; - break; - - default: - handled = false; - break; - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util - -/////////////////////////////////////////////////////////////////////////////// - -extern "C" -int main( int argc, char** argv ) -{ - mp4v2::util::FileUtility util( argc, argv ); - return util.process(); -} diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4info.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4info.cpp deleted file mode 100644 index 4c1c7666..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4info.cpp +++ /dev/null @@ -1,249 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001-2002. All Rights Reserved. - * - * Portions created by Rouven Wessling are - * Copyright (C) 2008-2009. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - * Rouven Wessling mp4v2@rouvenwessling.de - */ - -#include "util/impl.h" - -using namespace mp4v2::util; - -extern "C" int main( int argc, char** argv ) -{ - const char* const usageString = - "<file-name>"; - - /* begin processing command line */ - char* ProgName = argv[0]; - while ( true ) { - int c = -1; - int option_index = 0; - static const prog::Option long_options[] = { - { "version", prog::Option::NO_ARG, 0, 'V' }, - { NULL, prog::Option::NO_ARG, 0, 0 } - }; - - c = prog::getOptionSingle( argc, argv, "V", long_options, &option_index ); - - if ( c == -1 ) - break; - - switch ( c ) { - case '?': - fprintf( stderr, "usage: %s %s\n", ProgName, usageString ); - exit( 0 ); - case 'V': - fprintf( stderr, "%s - %s\n", ProgName, MP4V2_PROJECT_name_formal ); - exit( 0 ); - default: - fprintf( stderr, "%s: unknown option specified, ignoring: %c\n", - ProgName, c ); - } - } - - /* check that we have at least one non-option argument */ - if ( ( argc - prog::optind ) < 1 ) { - fprintf( stderr, "usage: %s %s\n", ProgName, usageString ); - exit( 1 ); - } - - /* end processing of command line */ - printf( "%s version %s\n", ProgName, MP4V2_PROJECT_version ); - - while ( prog::optind < argc ) { - char *mp4FileName = argv[prog::optind++]; - - printf( "%s:\n", mp4FileName ); - - char* info = MP4FileInfo( mp4FileName ); - - if ( !info ) { - fprintf( stderr, - "%s: can't open %s\n", - ProgName, mp4FileName ); - continue; - } - - fputs( info, stdout ); - MP4FileHandle mp4file = MP4Read( mp4FileName ); //, MP4_DETAILS_ERROR); - if ( mp4file != MP4_INVALID_FILE_HANDLE ) { - const MP4Tags* tags = MP4TagsAlloc(); - MP4TagsFetch( tags, mp4file ); - if ( tags->name ) { - fprintf( stdout, " Name: %s\n", tags->name ); - } - if ( tags->sortName ) { - fprintf( stdout, " Sort Name: %s\n", tags->sortName ); - } - if ( tags->artist ) { - fprintf( stdout, " Artist: %s\n", tags->artist ); - } - if ( tags->sortArtist ) { - fprintf( stdout, " Sort Artist: %s\n", tags->sortArtist ); - } - if ( tags->composer ) { - fprintf( stdout, " Composer: %s\n", tags->composer ); - } - if ( tags->sortComposer ) { - fprintf( stdout, " Sort Composer: %s\n", tags->sortComposer ); - } - if ( tags->encodingTool ) { - fprintf( stdout, " Encoded with: %s\n", tags->encodingTool ); - } - if ( tags->encodedBy ) { - fprintf( stdout, " Encoded by: %s\n", tags->encodedBy ); - } - if ( tags->releaseDate ) { - fprintf( stdout, " Release Date: %s\n", tags->releaseDate ); - } - if ( tags->album ) { - fprintf( stdout, " Album: %s\n", tags->album ); - } - if ( tags->sortAlbum ) { - fprintf( stdout, " Sort Album: %s\n", tags->sortAlbum ); - } - if ( tags->track ) { - fprintf( stdout, " Track: %u of %u\n", tags->track->index, tags->track->total ); - } - if ( tags->disk ) { - fprintf( stdout, " Disk: %u of %u\n", tags->disk->index, tags->disk->total ); - } - if ( tags->genre ) { - fprintf( stdout, " Genre: %s\n", tags->genre ); - } - if ( tags->genreType ) { - string s = itmf::enumGenreType.toString(static_cast<itmf::GenreType>(*tags->genreType ), true); - fprintf( stdout, " GenreType: %u, %s\n", *tags->genreType, s.c_str() ); - } - if ( tags->grouping ) { - fprintf( stdout, " Grouping: %s\n", tags->grouping ); - } - if ( tags->tempo ) { - fprintf( stdout, " BPM: %u\n", *tags->tempo ); - } - if ( tags->comments ) { - fprintf( stdout, " Comments: %s\n", tags->comments ); - } - if ( tags->compilation ) { - fprintf( stdout, " Part of Compilation: %s\n", *tags->compilation ? "yes" : "no" ); - } - if ( tags->gapless ) { - fprintf( stdout, " Part of Gapless Album: %s\n", *tags->gapless ? "yes" : "no" ); - } - if ( tags->artworkCount ) { - fprintf( stdout, " Cover Art pieces: %u\n", tags->artworkCount ); - } - if ( tags->albumArtist ) { - fprintf( stdout, " Album Artist: %s\n", tags->albumArtist ); - } - if ( tags->sortAlbumArtist ) { - fprintf( stdout, " Sort Album Artist: %s\n", tags->sortAlbumArtist ); - } - if ( tags->copyright ) { - fprintf( stdout, " Copyright: %s\n", tags->copyright ); - } - if ( tags->contentRating ) { - string s = itmf::enumContentRating.toString( static_cast<itmf::ContentRating>( *tags->contentRating ), true ); - fprintf( stdout, " Content Rating: %s\n", s.c_str() ); - } - if ( tags->hdVideo ) { - fprintf( stdout, " HD Video: %s\n", *tags->hdVideo ? "yes" : "no"); - } - if ( tags->mediaType ) { - string s = itmf::enumStikType.toString( static_cast<itmf::StikType>( *tags->mediaType ), true ); - fprintf( stdout, " Media Type: %s\n", s.c_str() ); - } - if ( tags->tvShow ) { - fprintf( stdout, " TV Show: %s\n", tags->tvShow ); - } - if ( tags->sortTVShow ) { - fprintf( stdout, " Sort TV Show: %s\n", tags->sortTVShow ); - } - if ( tags->tvNetwork ) { - fprintf( stdout, " TV Network: %s\n", tags->tvNetwork ); - } - if ( tags->tvEpisodeID ) { - fprintf( stdout, " TV Episode Number: %s\n", tags->tvEpisodeID ); - } - if ( tags->description ) { - fprintf( stdout, " Short Description: %s\n", tags->description ); - } - if ( tags->longDescription ) { - fprintf( stdout, " Long Description: %s\n", tags->longDescription ); - } - if ( tags->lyrics ) { - fprintf( stdout, " Lyrics: \n %s\n", tags->lyrics ); - } - if ( tags->tvEpisode ) { - fprintf( stdout, " TV Episode: %u\n", *tags->tvEpisode ); - } - if ( tags->tvSeason ) { - fprintf( stdout, " TV Season: %u\n", *tags->tvSeason ); - } - if ( tags->podcast) { - fprintf( stdout, " Podcast: %s\n", *tags->podcast ? "yes" : "no" ); - } - if ( tags->keywords ) { - fprintf( stdout, " Keywords: %s\n", tags->keywords ); - } - if ( tags->category ) { - fprintf( stdout, " Category: %s\n", tags->category ); - } - if ( tags->contentID ) { - fprintf( stdout, " Content ID: %u\n", *tags->contentID ); - } - if ( tags->artistID ) { - fprintf( stdout, " Artist ID: %u\n", *tags->artistID ); - } - if ( tags->playlistID ) { - fprintf( stdout, " Playlist ID: %llu\n", *tags->playlistID ); - } - if ( tags->genreID ) { - fprintf( stdout, " Genre ID: %u\n", *tags->genreID ); - } - if ( tags->composerID ) { - fprintf( stdout, " Composer ID: %u\n", *tags->composerID ); - } - if ( tags->xid ) { - fprintf( stdout, " xid: %s\n", tags->xid ); - } - if ( tags->iTunesAccount ) { - fprintf( stdout, " iTunes Account: %s\n", tags->iTunesAccount ); - } - if ( tags->iTunesAccountType ) { - string s = itmf::enumAccountType.toString( static_cast<itmf::AccountType>( *tags->iTunesAccountType ), true ); - fprintf( stdout, " iTunes Account Type: %s\n", s.c_str() ); - } - if ( tags->purchaseDate ) { - fprintf( stdout, " Purchase Date: %s\n", tags->purchaseDate ); - } - if ( tags->iTunesCountry ) { - string s = itmf::enumCountryCode.toString( static_cast<itmf::CountryCode>( *tags->iTunesCountry ), true ); - fprintf( stdout, " iTunes Store Country: %s\n", s.c_str() ); - } - MP4TagsFree( tags ); - MP4Close( mp4file ); - } - free( info ); - } - return( 0 ); -} diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4subtitle.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4subtitle.cpp deleted file mode 100644 index 74621536..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4subtitle.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// Edward Groenendaal, egroenen@@cisco.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "util/impl.h" - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -class SubtitleUtility : public Utility -{ -private: - enum SubtitleLongCode { - LC_LIST = _LC_MAX, - LC_EXPORT, - LC_IMPORT, - LC_REMOVE, - }; - -public: - SubtitleUtility( int, char** ); - -protected: - // delegates implementation - bool utility_option( int, bool& ); - bool utility_job( JobContext& ); - -private: - bool actionList ( JobContext& ); - bool actionExport ( JobContext& ); - bool actionImport ( JobContext& ); - bool actionRemove ( JobContext& ); - -private: - Group _actionGroup; - - bool (SubtitleUtility::*_action)( JobContext& ); - - string _stTextFile; -}; - -/////////////////////////////////////////////////////////////////////////////// - -SubtitleUtility::SubtitleUtility( int argc, char** argv ) - : Utility ( "mp4subtitle", argc, argv ) - , _actionGroup ( "ACTIONS" ) - , _action ( NULL ) -{ - // add standard options which make sense for this utility - _group.add( STD_OPTIMIZE ); - _group.add( STD_DRYRUN ); - _group.add( STD_KEEPGOING ); - _group.add( STD_OVERWRITE ); - _group.add( STD_FORCE ); - _group.add( STD_QUIET ); - _group.add( STD_DEBUG ); - _group.add( STD_VERBOSE ); - _group.add( STD_HELP ); - _group.add( STD_VERSION ); - _group.add( STD_VERSIONX ); - - _actionGroup.add( "list", false, LC_LIST, "list available subtitles" ); - _actionGroup.add( "export", true, LC_EXPORT, "export subtitles to TXT", "TXT" ); - _actionGroup.add( "import", true, LC_IMPORT, "import subtitles from TXT", "TXT" ); - _actionGroup.add( "remove", false, LC_REMOVE, "remove all subtitles" ); - _groups.push_back( &_actionGroup ); - - _usage = "[OPTION]... ACTION file..."; - _description = - // 79-cols, inclusive, max desired width - // |----------------------------------------------------------------------------| - "\nFor each mp4 file specified, perform the specified ACTION. An action must be" - "\nspecified. Some options are not applicable to some actions."; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -SubtitleUtility::actionExport( JobContext& job ) -{ - job.fileHandle = MP4Read( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for read: %s\n", job.file.c_str() ); - - verbose1f( "NOT IMPLEMENTED\n" ); - return FAILURE; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -SubtitleUtility::actionImport( JobContext& job ) -{ - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - verbose1f( "NOT IMPLEMENTED\n" ); - return FAILURE; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -SubtitleUtility::actionList( JobContext& job ) -{ - job.fileHandle = MP4Read( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for read: %s\n", job.file.c_str() ); - - verbose1f( "NOT IMPLEMENTED\n" ); - return FAILURE; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -SubtitleUtility::actionRemove( JobContext& job ) -{ - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - verbose1f( "NOT IMPLEMENTED" ); - return FAILURE; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -SubtitleUtility::utility_job( JobContext& job ) -{ - if( !_action ) - return herrf( "no action specified\n" ); - - return (this->*_action)( job ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -SubtitleUtility::utility_option( int code, bool& handled ) -{ - handled = true; - - switch( code ) { - case LC_LIST: - _action = &SubtitleUtility::actionList; - break; - - case LC_EXPORT: - _action = &SubtitleUtility::actionExport; - _stTextFile = prog::optarg; - if( _stTextFile.empty() ) - return herrf( "invalid TXT file: empty-string\n" ); - break; - - case LC_IMPORT: - _action = &SubtitleUtility::actionImport; - _stTextFile = prog::optarg; - if( _stTextFile.empty() ) - return herrf( "invalid TXT file: empty-string\n" ); - break; - - case LC_REMOVE: - _action = &SubtitleUtility::actionRemove; - break; - - default: - handled = false; - break; - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util - -/////////////////////////////////////////////////////////////////////////////// - -extern "C" -int main( int argc, char** argv ) -{ - mp4v2::util::SubtitleUtility util( argc, argv ); - return util.process(); -} diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4tags.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4tags.cpp deleted file mode 100644 index 1b9e866c..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4tags.cpp +++ /dev/null @@ -1,599 +0,0 @@ -/* mp4tags -- tool to set iTunes-compatible metadata tags - * - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * Contributed to MPEG4IP - * by Christopher League <league@contrapunctus.net> - */ - -#include "util/impl.h" - -using namespace mp4v2::util; - -/////////////////////////////////////////////////////////////////////////////// - -/* One-letter options -- if you want to rearrange these, change them - here, immediately below in OPT_STRING, and in the help text. */ -#define OPT_HELP 0x01ff -#define OPT_VERSION 0x02ff -#define OPT_REMOVE 'r' -#define OPT_ALBUM 'A' -#define OPT_ARTIST 'a' -#define OPT_TEMPO 'b' -#define OPT_COMMENT 'c' -#define OPT_COPYRIGHT 'C' -#define OPT_DISK 'd' -#define OPT_DISKS 'D' -#define OPT_ENCODEDBY 'e' -#define OPT_TOOL 'E' -#define OPT_GENRE 'g' -#define OPT_GROUPING 'G' -#define OPT_HD 'H' -#define OPT_MEDIA_TYPE 'i' -#define OPT_CONTENTID 'I' -#define OPT_LONGDESC 'l' -#define OPT_GENREID 'j' -#define OPT_LYRICS 'L' -#define OPT_DESCRIPTION 'm' -#define OPT_TVEPISODE 'M' -#define OPT_TVSEASON 'n' -#define OPT_TVNETWORK 'N' -#define OPT_TVEPISODEID 'o' -#define OPT_CATEGORY 'O' -#define OPT_PLAYLISTID 'p' -#define OPT_PICTURE 'P' -#define OPT_PODCAST 'B' -#define OPT_ALBUM_ARTIST 'R' -#define OPT_NAME 's' -#define OPT_TVSHOW 'S' -#define OPT_TRACK 't' -#define OPT_TRACKS 'T' -#define OPT_XID 'x' -#define OPT_RATING 'X' -#define OPT_COMPOSER 'w' -#define OPT_RELEASEDATE 'y' -#define OPT_ARTISTID 'z' -#define OPT_COMPOSERID 'Z' - -#define OPT_STRING "r:A:a:b:c:C:d:D:e:E:g:G:H:i:I:j:l:L:m:M:n:N:o:O:p:P:B:R:s:S:t:T:x:X:w:y:z:Z:" - -#define ELEMENT_OF(x,i) x[int(i)] - -static const char* const help_text = - "OPTION... FILE...\n" - "Adds or modifies iTunes-compatible tags on MP4 files.\n" - "\n" - " -help Display this help text and exit\n" - " -version Display version information and exit\n" - " -A, -album STR Set the album title\n" - " -a, -artist STR Set the artist information\n" - " -b, -tempo NUM Set the tempo (beats per minute)\n" - " -c, -comment STR Set a general comment\n" - " -C, -copyright STR Set the copyright information\n" - " -d, -disk NUM Set the disk number\n" - " -D, -disks NUM Set the number of disks\n" - " -e, -encodedby STR Set the name of the person or company who encoded the file\n" - " -E, -tool STR Set the software used for encoding\n" - " -g, -genre STR Set the genre name\n" - " -G, -grouping STR Set the grouping name\n" - " -H, -hdvideo NUM Set the HD flag (1\\0)\n" - " -i, -type STR Set the Media Type(tvshow, movie, music, ...)\n" - " -I, -contentid NUM Set the content ID\n" - " -j, -genreid NUM Set the genre ID\n" - " -l, -longdesc STR Set the long description\n" - " -L, -lyrics NUM Set the lyrics\n" - " -m, -description STR Set the short description\n" - " -M, -episode NUM Set the episode number\n" - " -n, -season NUM Set the season number\n" - " -N, -network STR Set the TV network\n" - " -o, -episodeid STR Set the TV episode ID\n" - " -O, -category STR Set the category\n" - " -p, -playlistid NUM Set the playlist ID\n" - " -P, -picture PTH Set the picture as a .png\n" - " -B, -podcast NUM Set the podcast flag.\n" - " -R, -albumartist STR Set the album artist\n" - " -s, -song STR Set the song title\n" - " -S -show STR Set the TV show\n" - " -t, -track NUM Set the track number\n" - " -T, -tracks NUM Set the number of tracks\n" - " -x, -xid STR Set the globally-unique xid (vendor:scheme:id)\n" - " -X, -rating STR Set the Rating(none, clean, explicit)\n" - " -w, -writer STR Set the composer information\n" - " -y, -year NUM Set the release date\n" - " -z, -artistid NUM Set the artist ID\n" - " -Z, -composerid NUM Set the composer ID\n" - " -r, -remove STR Remove tags by code (e.g. \"-r cs\"\n" - " removes the comment and song tags)"; - -extern "C" int - main( int argc, char** argv ) -{ - const prog::Option long_options[] = { - { "help", prog::Option::NO_ARG, 0, OPT_HELP }, - { "version", prog::Option::NO_ARG, 0, OPT_VERSION }, - { "album", prog::Option::REQUIRED_ARG, 0, OPT_ALBUM }, - { "artist", prog::Option::REQUIRED_ARG, 0, OPT_ARTIST }, - { "comment", prog::Option::REQUIRED_ARG, 0, OPT_COMMENT }, - { "copyright", prog::Option::REQUIRED_ARG, 0, OPT_COPYRIGHT }, - { "disk", prog::Option::REQUIRED_ARG, 0, OPT_DISK }, - { "disks", prog::Option::REQUIRED_ARG, 0, OPT_DISKS }, - { "encodedby", prog::Option::REQUIRED_ARG, 0, OPT_ENCODEDBY }, - { "tool", prog::Option::REQUIRED_ARG, 0, OPT_TOOL }, - { "genre", prog::Option::REQUIRED_ARG, 0, OPT_GENRE }, - { "grouping", prog::Option::REQUIRED_ARG, 0, OPT_GROUPING }, - { "hdvideo", prog::Option::REQUIRED_ARG, 0, OPT_HD }, - { "type", prog::Option::REQUIRED_ARG, 0, OPT_MEDIA_TYPE }, - { "contentid", prog::Option::REQUIRED_ARG, 0, OPT_CONTENTID }, - { "longdesc", prog::Option::REQUIRED_ARG, 0, OPT_LONGDESC }, - { "genreid", prog::Option::REQUIRED_ARG, 0, OPT_GENREID }, - { "lyrics", prog::Option::REQUIRED_ARG, 0, OPT_LYRICS }, - { "description", prog::Option::REQUIRED_ARG, 0, OPT_DESCRIPTION }, - { "episode", prog::Option::REQUIRED_ARG, 0, OPT_TVEPISODE }, - { "season", prog::Option::REQUIRED_ARG, 0, OPT_TVSEASON }, - { "network", prog::Option::REQUIRED_ARG, 0, OPT_TVNETWORK }, - { "episodeid", prog::Option::REQUIRED_ARG, 0, OPT_TVEPISODEID }, - { "playlistid", prog::Option::REQUIRED_ARG, 0, OPT_PLAYLISTID }, - { "picture", prog::Option::REQUIRED_ARG, 0, OPT_PICTURE }, - { "podcast", prog::Option::REQUIRED_ARG, 0, OPT_PODCAST }, - { "song", prog::Option::REQUIRED_ARG, 0, OPT_NAME }, - { "show", prog::Option::REQUIRED_ARG, 0, OPT_TVSHOW }, - { "tempo", prog::Option::REQUIRED_ARG, 0, OPT_TEMPO }, - { "track", prog::Option::REQUIRED_ARG, 0, OPT_TRACK }, - { "tracks", prog::Option::REQUIRED_ARG, 0, OPT_TRACKS }, - { "xid", prog::Option::REQUIRED_ARG, 0, OPT_XID }, - { "writer", prog::Option::REQUIRED_ARG, 0, OPT_COMPOSER }, - { "year", prog::Option::REQUIRED_ARG, 0, OPT_RELEASEDATE }, - { "artistid", prog::Option::REQUIRED_ARG, 0, OPT_ARTISTID }, - { "composerid", prog::Option::REQUIRED_ARG, 0, OPT_COMPOSERID }, - { "remove", prog::Option::REQUIRED_ARG, 0, OPT_REMOVE }, - { "albumartist", prog::Option::REQUIRED_ARG, 0, OPT_ALBUM_ARTIST }, - { "category", prog::Option::REQUIRED_ARG, 0, OPT_CATEGORY }, - { "rating", prog::Option::REQUIRED_ARG, 0, OPT_RATING }, - { NULL, prog::Option::NO_ARG, 0, 0 } - }; - - /* Sparse arrays of tag data: some space is wasted, but it's more - convenient to say tags[OPT_SONG] than to enumerate all the - metadata types (again) as a struct. */ - const char *tags[UCHAR_MAX]; - uint64_t nums[UCHAR_MAX]; - - memset( tags, 0, sizeof( tags ) ); - memset( nums, 0, sizeof( nums ) ); - - /* Any modifications requested? */ - int mods = 0; - - /* Option-processing loop. */ - int c = prog::getOptionSingle( argc, argv, OPT_STRING, long_options, NULL ); - while ( c != -1 ) { - int r = 2; - switch ( c ) { - /* getopt() returns '?' if there was an error. It already - printed the error message, so just return. */ - case '?': - return 1; - - /* Help and version requests handled here. */ - case OPT_HELP: - fprintf( stderr, "usage %s %s\n", argv[0], help_text ); - return 0; - case OPT_VERSION: - fprintf( stderr, "%s - %s\n", argv[0], MP4V2_PROJECT_name_formal ); - return 0; - - /* Integer arguments: convert them using sscanf(). */ - case OPT_TEMPO: - case OPT_DISK: - case OPT_DISKS: - case OPT_HD: - case OPT_CONTENTID: - case OPT_GENREID: - case OPT_TVEPISODE: - case OPT_TVSEASON: - case OPT_PLAYLISTID: - case OPT_TRACK: - case OPT_TRACKS: - case OPT_ARTISTID: - case OPT_COMPOSERID: - case OPT_PODCAST: - if ( c == OPT_PLAYLISTID ) { - r = sscanf( prog::optarg, "%llu", &nums[c] ); - } else { - unsigned int n; - r = sscanf( prog::optarg, "%u", &n ); - if ( r >= 1 ) - { - nums[c] = static_cast<uint64_t>( n ); - } - } - if ( r < 1 ) { - fprintf( stderr, "%s: option requires integer argument -- %c\n", - argv[0], c ); - return 2; - } - /* Break not, lest ye be broken. :) */ - /* All arguments: all valid options end up here, and we just - stuff the string pointer into the tags[] array. */ - default: - tags[c] = prog::optarg; - mods++; - } /* end switch */ - - c = prog::getOptionSingle( argc, argv, OPT_STRING, long_options, NULL ); - } /* end while */ - - /* Check that we have at least one non-option argument */ - if ( ( argc - prog::optind ) < 1 ) { - fprintf( stderr, - "%s: You must specify at least one MP4 file.\n", - argv[0] ); - fprintf( stderr, "usage %s %s\n", argv[0], help_text ); - return 3; - } - - /* Check that we have at least one requested modification. Probably - it's useful instead to print the metadata if no modifications are - requested? */ - if ( !mods ) { - fprintf( stderr, - "%s: You must specify at least one tag modification.\n", - argv[0] ); - fprintf( stderr, "usage %s %s\n", argv[0], help_text ); - return 4; - } - - /* Loop through the non-option arguments, and modify the tags as - requested. */ - while ( prog::optind < argc ) { - char *mp4 = argv[prog::optind++]; - - MP4FileHandle h = MP4Modify( mp4 ); - if ( h == MP4_INVALID_FILE_HANDLE ) { - fprintf( stderr, "Could not open '%s'... aborting\n", mp4 ); - return 5; - } - /* Read out the existing metadata */ - const MP4Tags* mdata = MP4TagsAlloc(); - MP4TagsFetch( mdata, h ); - - /* Remove any tags */ - if ( ELEMENT_OF(tags,OPT_REMOVE) ) { - for ( const char *p = ELEMENT_OF(tags,OPT_REMOVE); *p; p++ ) { - switch ( *p ) { - case OPT_ALBUM: - MP4TagsSetAlbum( mdata, NULL ); - break; - case OPT_ARTIST: - MP4TagsSetArtist( mdata, NULL ); - break; - case OPT_TEMPO: - MP4TagsSetTempo( mdata, NULL ); - break; - case OPT_COMMENT: - MP4TagsSetComments( mdata, NULL ); - break; - case OPT_COPYRIGHT: - MP4TagsSetCopyright( mdata, NULL ); - break; - case OPT_DISK: - MP4TagsSetDisk( mdata, NULL ); - break; - case OPT_DISKS: - MP4TagsSetDisk( mdata, NULL ); - break; - case OPT_ENCODEDBY: - MP4TagsSetEncodedBy( mdata, NULL ); - break; - case OPT_TOOL: - MP4TagsSetEncodingTool( mdata, NULL ); - break; - case OPT_GENRE: - MP4TagsSetGenre( mdata, NULL ); - break; - case OPT_GROUPING: - MP4TagsSetGrouping( mdata, NULL ); - break; - case OPT_HD: - MP4TagsSetHDVideo( mdata, NULL ); - break; - case OPT_MEDIA_TYPE: - MP4TagsSetMediaType( mdata, NULL ); - break; - case OPT_CONTENTID: - MP4TagsSetContentID( mdata, NULL ); - break; - case OPT_LONGDESC: - MP4TagsSetLongDescription( mdata, NULL ); - break; - case OPT_GENREID: - MP4TagsSetGenreID( mdata, NULL ); - break; - case OPT_LYRICS: - MP4TagsSetLyrics( mdata, NULL ); - break; - case OPT_DESCRIPTION: - MP4TagsSetDescription( mdata, NULL ); - break; - case OPT_TVEPISODE: - MP4TagsSetTVEpisode( mdata, NULL ); - break; - case OPT_TVSEASON: - MP4TagsSetTVSeason( mdata, NULL ); - break; - case OPT_TVNETWORK: - MP4TagsSetTVNetwork( mdata, NULL ); - break; - case OPT_TVEPISODEID: - MP4TagsSetTVEpisodeID( mdata, NULL ); - break; - case OPT_PLAYLISTID: - MP4TagsSetPlaylistID( mdata, NULL ); - break; - case OPT_PICTURE: - if( mdata->artworkCount ) - MP4TagsRemoveArtwork( mdata, 0 ); - break; - case OPT_ALBUM_ARTIST: - MP4TagsSetAlbumArtist( mdata, NULL ); - break ; - case OPT_NAME: - MP4TagsSetName( mdata, NULL ); - break; - case OPT_TVSHOW: - MP4TagsSetTVShow( mdata, NULL ); - break; - case OPT_TRACK: - MP4TagsSetTrack( mdata, NULL ); - break; - case OPT_TRACKS: - MP4TagsSetTrack( mdata, NULL ); - break; - case OPT_XID: - MP4TagsSetXID( mdata, NULL ); - break; - case OPT_COMPOSER: - MP4TagsSetComposer( mdata, NULL ); - break; - case OPT_RELEASEDATE: - MP4TagsSetReleaseDate( mdata, NULL ); - break; - case OPT_ARTISTID: - MP4TagsSetArtistID( mdata, NULL ); - break; - case OPT_COMPOSERID: - MP4TagsSetComposerID( mdata, NULL ); - break; - case OPT_PODCAST: - MP4TagsSetPodcast(mdata, NULL); - break; - case OPT_CATEGORY: - MP4TagsSetCategory(mdata, NULL); - break; - case OPT_RATING: - MP4TagsSetContentRating(mdata, NULL); - break; - } - } - } - - /* Track/disk numbers need to be set all at once, but we'd like to - allow users to just specify -T 12 to indicate that all existing - track numbers are out of 12. This means we need to look up the - current info if it is not being set. */ - - if ( ELEMENT_OF(tags,OPT_TRACK) || ELEMENT_OF(tags,OPT_TRACKS) ) { - MP4TagTrack tt; - tt.index = 0; - tt.total = 0; - - if( mdata->track ) { - tt.index = mdata->track->index; - tt.total = mdata->track->total; - } - - if( ELEMENT_OF(tags,OPT_TRACK) ) - tt.index = static_cast<uint16_t>( ELEMENT_OF(nums,OPT_TRACK) ); - if( ELEMENT_OF(tags,OPT_TRACKS) ) - tt.total = static_cast<uint16_t>( ELEMENT_OF(nums,OPT_TRACKS) ); - - MP4TagsSetTrack( mdata, &tt ); - } - - if ( ELEMENT_OF(tags,OPT_DISK) || ELEMENT_OF(tags,OPT_DISKS) ) { - MP4TagDisk td; - td.index = 0; - td.total = 0; - - if( mdata->disk ) { - td.index = mdata->disk->index; - td.total = mdata->disk->total; - } - - if( ELEMENT_OF(tags,OPT_DISK) ) - td.index = static_cast<uint16_t>( ELEMENT_OF(nums,OPT_DISK) ); - if( ELEMENT_OF(tags,OPT_DISKS) ) - td.total = static_cast<uint16_t>( ELEMENT_OF(nums,OPT_DISKS) ); - - MP4TagsSetDisk( mdata, &td ); - } - - /* Set the other relevant attributes */ - for ( int i = 0; i < UCHAR_MAX; i++ ) { - if ( tags[i] ) { - switch ( i ) { - case OPT_ALBUM: - MP4TagsSetAlbum( mdata, tags[i] ); - break; - case OPT_ARTIST: - MP4TagsSetArtist( mdata, tags[i] ); - break; - case OPT_TEMPO: - { - uint16_t value = static_cast<uint16_t>( nums[i] ); - MP4TagsSetTempo( mdata, &value ); - break; - } - case OPT_COMMENT: - MP4TagsSetComments( mdata, tags[i] ); - break; - case OPT_COPYRIGHT: - MP4TagsSetCopyright( mdata, tags[i] ); - break; - case OPT_ENCODEDBY: - MP4TagsSetEncodedBy( mdata, tags[i] ); - break; - case OPT_TOOL: - MP4TagsSetEncodingTool( mdata, tags[i] ); - break; - case OPT_GENRE: - MP4TagsSetGenre( mdata, tags[i] ); - break; - case OPT_GROUPING: - MP4TagsSetGrouping( mdata, tags[i] ); - break; - case OPT_HD: - { - uint8_t value = static_cast<uint8_t>( nums[i] ); - MP4TagsSetHDVideo( mdata, &value ); - break; - } - case OPT_MEDIA_TYPE: - { - uint8_t st = static_cast<uint8_t>( itmf::enumStikType.toType( tags[i] ) ) ; - MP4TagsSetMediaType( mdata, &st ); - break; - } - case OPT_CONTENTID: - { - uint32_t value = static_cast<uint32_t>( nums[i] ); - MP4TagsSetContentID( mdata, &value ); - break; - } - case OPT_LONGDESC: - MP4TagsSetLongDescription( mdata, tags[i] ); - break; - case OPT_GENREID: - { - uint32_t value = static_cast<uint32_t>( nums[i] ); - MP4TagsSetGenreID( mdata, &value ); - break; - } - case OPT_LYRICS: - MP4TagsSetLyrics( mdata, tags[i] ); - break; - case OPT_DESCRIPTION: - MP4TagsSetDescription( mdata, tags[i] ); - break; - case OPT_TVEPISODE: - { - uint32_t value = static_cast<uint32_t>( nums[i] ); - MP4TagsSetTVEpisode( mdata, &value ); - break; - } - case OPT_TVSEASON: - { - uint32_t value = static_cast<uint32_t>( nums[i] ); - MP4TagsSetTVSeason( mdata, &value ); - break; - } - case OPT_TVNETWORK: - MP4TagsSetTVNetwork( mdata, tags[i] ); - break; - case OPT_TVEPISODEID: - MP4TagsSetTVEpisodeID( mdata, tags[i] ); - break; - case OPT_PLAYLISTID: - { - uint64_t value = static_cast<uint64_t>( nums[i] ); - MP4TagsSetPlaylistID( mdata, &value ); - break; - } - case OPT_PICTURE: - { - File in( tags[i], File::MODE_READ ); - if( !in.open() ) { - MP4TagArtwork art; - art.size = (uint32_t)in.size; - art.data = malloc( art.size ); - art.type = MP4_ART_UNDEFINED; - - File::Size nin; - if( !in.read( art.data, art.size, nin ) && nin == art.size ) { - if( mdata->artworkCount ) - MP4TagsRemoveArtwork( mdata, 0 ); - MP4TagsAddArtwork( mdata, &art ); - } - - free( art.data ); - in.close(); - } - else { - fprintf( stderr, "Art file %s not found\n", tags[i] ); - } - } - case OPT_ALBUM_ARTIST: - MP4TagsSetAlbumArtist( mdata, tags[i] ); - break; - case OPT_NAME: - MP4TagsSetName( mdata, tags[i] ); - break; - case OPT_TVSHOW: - MP4TagsSetTVShow( mdata, tags[i] ); - break; - case OPT_XID: - MP4TagsSetXID( mdata, tags[i] ); - break; - case OPT_COMPOSER: - MP4TagsSetComposer( mdata, tags[i] ); - break; - case OPT_RELEASEDATE: - MP4TagsSetReleaseDate( mdata, tags[i] ); - break; - case OPT_ARTISTID: - { - uint32_t value = static_cast<uint32_t>( nums[i] ); - MP4TagsSetArtistID( mdata, &value ); - break; - } - case OPT_COMPOSERID: - { - uint32_t value = static_cast<uint32_t>( nums[i] ); - MP4TagsSetComposerID( mdata, &value ); - break; - } - case OPT_PODCAST: - { - uint8_t value = static_cast<uint8_t>( nums[i] ); - MP4TagsSetPodcast(mdata, &value); - break; - } - case OPT_CATEGORY: - { - MP4TagsSetCategory(mdata, tags[i]); - break; - } - case OPT_RATING: - { - uint8_t rating = static_cast<uint8_t>( itmf::enumContentRating.toType( tags[i] ) ) ; - MP4TagsSetContentRating(mdata, &rating); - break; - } - } - } - } - /* Write out all tag modifications, free and close */ - MP4TagsStore( mdata, h ); - MP4TagsFree( mdata ); - MP4Close( h ); - } /* end while optind < argc */ - return 0; -} diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4track.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4track.cpp deleted file mode 100644 index d550506b..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4track.cpp +++ /dev/null @@ -1,997 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// The contents of this file are subject to the Mozilla Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is MP4v2. -// -// The Initial Developer of the Original Code is Kona Blend. -// Portions created by Kona Blend are Copyright (C) 2008. -// Portions created by David Byron are Copyright (C) 2010. -// All Rights Reserved. -// -// Contributors: -// Kona Blend, kona8lend@@gmail.com -// David Byron, dbyron@dbyron.com -// -/////////////////////////////////////////////////////////////////////////////// - -#include "util/impl.h" - -namespace mp4v2 { namespace util { - -/////////////////////////////////////////////////////////////////////////////// - -class TrackUtility : public Utility -{ -private: - enum TrackLongAction { - LC_TRACK_WILDCARD = _LC_MAX, - LC_TRACK_ID, - LC_TRACK_INDEX, - - LC_SAMPLE_WILDCARD, - LC_SAMPLE_ID, - LC_SAMPLE_INDEX, - - LC_LIST, - - LC_ENABLED, - LC_INMOVIE, - LC_INPREVIEW, - LC_LAYER, - LC_ALTGROUP, - LC_VOLUME, - LC_WIDTH, - LC_HEIGHT, - LC_LANGUAGE, - LC_HDLRNAME, - LC_UDTANAME, - LC_UDTANAME_R, - - LC_COLR_PARMS, - LC_COLR_PARM_HD, - LC_COLR_PARM_SD, - - LC_COLR_LIST, - LC_COLR_ADD, - LC_COLR_SET, - LC_COLR_REMOVE, - - LC_PASP_PARMS, - - LC_PASP_LIST, - LC_PASP_ADD, - LC_PASP_SET, - LC_PASP_REMOVE, - }; - -public: - TrackUtility( int, char** ); - -protected: - // delegates implementation - bool utility_option( int, bool& ); - bool utility_job( JobContext& ); - -private: - bool actionList( JobContext& ); - bool actionListSingle( JobContext&, uint16_t ); - - bool actionColorParameterList ( JobContext& ); - bool actionColorParameterAdd ( JobContext& ); - bool actionColorParameterSet ( JobContext& ); - bool actionColorParameterRemove ( JobContext& ); - - bool actionPictureAspectRatioList ( JobContext& ); - bool actionPictureAspectRatioAdd ( JobContext& ); - bool actionPictureAspectRatioSet ( JobContext& ); - bool actionPictureAspectRatioRemove ( JobContext& ); - - bool actionTrackModifierSet ( JobContext& ); - bool actionTrackModifierRemove ( JobContext& ); - -private: - enum TrackMode { - TM_UNDEFINED, - TM_INDEX, - TM_ID, - TM_WILDCARD, - }; - - enum SampleMode { - SM_UNDEFINED, - SM_INDEX, - SM_ID, - SM_WILDCARD, - }; - - Group _actionGroup; - Group _parmGroup; - - bool (TrackUtility::*_action)( JobContext& ); - - TrackMode _trackMode; - uint16_t _trackIndex; - uint32_t _trackId; - - SampleMode _sampleMode; - uint16_t _sampleIndex; - uint32_t _sampleId; - - qtff::ColorParameterBox::Item _colorParameterItem; - qtff::PictureAspectRatioBox::Item _pictureAspectRatioItem; - - void (TrackModifier::*_actionTrackModifierSet_function)( const string& ); - string _actionTrackModifierSet_name; - string _actionTrackModifierSet_value; - - void (TrackModifier::*_actionTrackModifierRemove_function)(); - string _actionTrackModifierRemove_name; -}; - -/////////////////////////////////////////////////////////////////////////////// - -string toStringTrackType( string ); - -/////////////////////////////////////////////////////////////////////////////// - -TrackUtility::TrackUtility( int argc, char** argv ) - : Utility ( "mp4track", argc, argv ) - , _actionGroup ( "ACTIONS" ) - , _parmGroup ( "PARAMETERS" ) - , _action ( NULL ) - , _trackMode ( TM_UNDEFINED ) - , _trackIndex ( 0 ) - , _trackId ( MP4_INVALID_TRACK_ID ) - , _sampleMode ( SM_UNDEFINED ) - , _sampleIndex ( 0 ) - , _sampleId ( MP4_INVALID_SAMPLE_ID ) -{ - // add standard options which make sense for this utility - _group.add( STD_OPTIMIZE ); - _group.add( STD_DRYRUN ); - _group.add( STD_KEEPGOING ); - _group.add( STD_OVERWRITE ); - _group.add( STD_FORCE ); - _group.add( STD_QUIET ); - _group.add( STD_DEBUG ); - _group.add( STD_VERBOSE ); - _group.add( STD_HELP ); - _group.add( STD_VERSION ); - _group.add( STD_VERSIONX ); - - _parmGroup.add( "track-any", false, LC_TRACK_WILDCARD, "act on any/all tracks" ); - _parmGroup.add( "track-index", true, LC_TRACK_INDEX, "act on track index IDX", "IDX" ); - _parmGroup.add( "track-id", true, LC_TRACK_ID, "act on track id ID", "ID" ); -/* - _parmGroup.add( "sample-any", false, LC_SAMPLE_WILDCARD, "act on any sample (default)" ); - _parmGroup.add( "sample-index", true, LC_SAMPLE_INDEX, "act on sample index IDX" ); - _parmGroup.add( "sample-id", true, LC_SAMPLE_ID, "act on sample id ID" ); -*/ - _parmGroup.add( "colr-parms", true, LC_COLR_PARMS, "where CSV is IDX1,IDX2,IDX3", "CSV" ); - _parmGroup.add( "colr-parm-hd", false, LC_COLR_PARM_HD, "equivalent to --colr-parms=1,1,1" ); - _parmGroup.add( "colr-parm-sd", false, LC_COLR_PARM_SD, "equivalent to --colr-parms=6,1,6" ); - _parmGroup.add( "pasp-parms", true, LC_PASP_PARMS, "where CSV is hSPACING,vSPACING", "CSV" ); - _groups.push_back( &_parmGroup ); - - _actionGroup.add( "list", false, LC_LIST, "list all tracks in mp4" ); - - _actionGroup.add( "enabled", true, LC_ENABLED, "set trak.tkhd.flags (enabled bit)", "BOOL" ); - _actionGroup.add( "inmovie", true, LC_INMOVIE, "set trak.tkhd.flags (inMovie bit)", "BOOL" ); - _actionGroup.add( "inpreview", true, LC_INPREVIEW, "set trak.tkhd.flags (inPreview bit)", "BOOL" ); - _actionGroup.add( "layer", true, LC_LAYER, "set trak.tkhd.layer", "NUM" ); - _actionGroup.add( "altgroup", true, LC_ALTGROUP, "set trak.tkhd.alternate_group", "NUM" ); - _actionGroup.add( "volume", true, LC_VOLUME, "set trak.tkhd.volume", "FLOAT" ); - _actionGroup.add( "width", true, LC_WIDTH, "set trak.tkhd.width", "FLOAT" ); - _actionGroup.add( "height", true, LC_HEIGHT, "set trak.tkhd.height", "FLOAT" ); - _actionGroup.add( "language", true, LC_LANGUAGE, "set trak.mdia.mdhd.language", "CODE" ); - _actionGroup.add( "hdlrname", true, LC_HDLRNAME, "set trak.mdia.hdlr.name", "STR" ); - _actionGroup.add( "udtaname", true, LC_UDTANAME, "set trak.udta.name.value", "STR" ); - _actionGroup.add( "udtaname-remove", false, LC_UDTANAME_R, "remove trak.udta.name atom" ); - - _actionGroup.add( "colr-list", false, LC_COLR_LIST, "list all colr-boxes in mp4" ); - _actionGroup.add( "colr-add", false, LC_COLR_ADD, "add colr-box to a video track" ); - _actionGroup.add( "colr-set", false, LC_COLR_SET, "set colr-box parms" ); - _actionGroup.add( "colr-remove", false, LC_COLR_REMOVE, "remove colr-box from track" ); - _actionGroup.add( "pasp-list", false, LC_PASP_LIST, "list all pasp-boxes in mp4" ); - _actionGroup.add( "pasp-add", false, LC_PASP_ADD, "add pasp-box to a video track" ); - _actionGroup.add( "pasp-set", false, LC_PASP_SET, "set pasp-box parms" ); - _actionGroup.add( "pasp-remove", false, LC_PASP_REMOVE, "remove pasp-box from track" ); - - _groups.push_back( &_actionGroup ); - - _usage = "[OPTION]... [PARAMETERS]... ACTION file..."; - _description = - // 79-cols, inclusive, max desired width - // |----------------------------------------------------------------------------| - "\nFor each mp4 file specified, perform the specified ACTION. An action must be" - "\nspecified. Some options are not applicable to some actions."; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionColorParameterAdd( JobContext& job ) -{ - ostringstream oss; - oss << "adding colr-box(" << _colorParameterItem.convertToCSV() << ") -> " << job.file; - - switch( _trackMode ) { - case TM_INDEX: - oss << " (track index=" << _trackIndex << ')'; - break; - - case TM_ID: - oss << " (track id=" << _trackId << ')'; - break; - - default: - case TM_WILDCARD: - return herrf( "track not specified\n" ); - } - - verbose1f( "%s\n", oss.str().c_str() ); - if( dryrunAbort() ) - return SUCCESS; - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - switch( _trackMode ) { - default: - case TM_INDEX: - if( qtff::ColorParameterBox::add( job.fileHandle, _trackIndex, _colorParameterItem )) - return herrf( "unable to add colr-box\n" ); - break; - - case TM_ID: - if( qtff::ColorParameterBox::add( job.fileHandle, _trackId, _colorParameterItem )) - return herrf( "unable to add colr-box\n" ); - break; - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionColorParameterList( JobContext& job ) -{ - job.fileHandle = MP4Read( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for read: %s\n", job.file.c_str() ); - - ostringstream report; - - const int widx = 3; - const int wid = 3; - const int wtype = 8; - const int wparm = 6; - const string sep = " "; - - if( _jobCount == 0 ) { - report << setw(widx) << right << "IDX" - << sep << setw(wid) << "ID" - << sep << setw(wtype) << left << "TYPE" - << sep << setw(wparm) << right << "PRIMRY" - << sep << setw(wparm) << right << "XFERFN" - << sep << setw(wparm) << right << "MATRIX" - << sep << setw(0) << "FILE" - << '\n'; - - report << setfill('-') << setw(70) << "" << setfill(' ') << '\n'; - } - - qtff::ColorParameterBox::ItemList itemList; - if( qtff::ColorParameterBox::list( job.fileHandle, itemList )) - return herrf( "unable to fetch list of colr-boxes" ); - - const qtff::ColorParameterBox::ItemList::size_type max = itemList.size(); - for( qtff::ColorParameterBox::ItemList::size_type i = 0; i < max; i++ ) { - const qtff::ColorParameterBox::IndexedItem& xitem = itemList[i]; - - const char* type = MP4GetTrackType( job.fileHandle, xitem.trackId ); - if( !type) - type = "unknown"; - - report << right << setw(widx) << xitem.trackIndex - << sep << setw(wid) << xitem.trackId - << sep << setw(wtype) << left << toStringTrackType( type ) - << sep << setw(wparm) << right << xitem.item.primariesIndex - << sep << setw(wparm) << right << xitem.item.transferFunctionIndex - << sep << setw(wparm) << right << xitem.item.matrixIndex; - - if( i == 0 ) - report << sep << setw(0) << job.file; - - report << '\n'; - } - - verbose1f( "%s", report.str().c_str() ); - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionColorParameterRemove( JobContext& job ) -{ - ostringstream oss; - oss << "removing colr-box from " << job.file; - - switch( _trackMode ) { - case TM_INDEX: - oss << " (track index=" << _trackIndex << ')'; - break; - - case TM_ID: - oss << " (track id=" << _trackId << ')'; - break; - - case TM_WILDCARD: - oss << " (all tracks)"; - break; - - default: - return herrf( "track(s) not specified\n" ); - } - - verbose1f( "%s\n", oss.str().c_str() ); - if( dryrunAbort() ) - return SUCCESS; - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - switch( _trackMode ) { - case TM_INDEX: - if( qtff::ColorParameterBox::remove( job.fileHandle, _trackIndex )) - return herrf( "unable to remove colr-box\n" ); - break; - - case TM_ID: - if( qtff::ColorParameterBox::remove( job.fileHandle, _trackId )) - return herrf( "unable to remove colr-box\n" ); - break; - - default: - case TM_WILDCARD: - { - qtff::ColorParameterBox::ItemList itemList; - if( qtff::ColorParameterBox::list( job.fileHandle, itemList )) - return herrf( "unable to fetch list of colr-boxes" ); - - _trackMode = TM_INDEX; - const qtff::ColorParameterBox::ItemList::size_type max = itemList.size(); - for( qtff::ColorParameterBox::ItemList::size_type i = 0; i < max; i++ ) { - const qtff::ColorParameterBox::IndexedItem& xitem = itemList[i]; - _trackIndex = xitem.trackIndex; - actionColorParameterRemove( job ); - } - break; - } - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionColorParameterSet( JobContext& job ) -{ - ostringstream oss; - oss << "setting colr-box(" << _colorParameterItem.convertToCSV() << ") -> " << job.file; - - switch( _trackMode ) { - case TM_INDEX: - oss << " (track index=" << _trackIndex << ')'; - break; - - case TM_ID: - oss << " (track id=" << _trackId << ')'; - break; - - default: - case TM_WILDCARD: - return herrf( "track not specified\n" ); - } - - verbose1f( "%s\n", oss.str().c_str() ); - if( dryrunAbort() ) - return SUCCESS; - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - switch( _trackMode ) { - default: - case TM_INDEX: - if( qtff::ColorParameterBox::set( job.fileHandle, _trackIndex, _colorParameterItem )) - return herrf( "unable to set colr-box\n" ); - break; - - case TM_ID: - if( qtff::ColorParameterBox::set( job.fileHandle, _trackId, _colorParameterItem )) - return herrf( "unable to set colr-box\n" ); - break; - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionList( JobContext& job ) -{ - if( _jobTotal > 1 ) - verbose1f( "file %u of %u: %s\n", _jobCount+1, _jobTotal, job.file.c_str() ); - - ostringstream report; - - job.fileHandle = MP4Read( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for read: %s\n", job.file.c_str() ); - - switch( _trackMode ) { - case TM_INDEX: - return actionListSingle( job, _trackIndex ); - - case TM_ID: - return actionListSingle( job, MP4FindTrackIndex( job.fileHandle, _trackId )); - - case TM_WILDCARD: - default: - { - bool result = SUCCESS; - const uint16_t trackc = static_cast<uint16_t>( MP4GetNumberOfTracks( job.fileHandle )); - for( uint16_t i = 0; i < trackc; i++ ) { - if( actionListSingle( job, i )) - result = FAILURE; - } - return result; - } - } -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionListSingle( JobContext& job, uint16_t index ) -{ - TrackModifier tm( job.fileHandle, index ); - - ostringstream report; - tm.dump( report, ( _jobTotal > 1 ? " " : "" )); - - verbose1f( "%s", report.str().c_str() ); - return false; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionPictureAspectRatioAdd( JobContext& job ) -{ - ostringstream oss; - oss << "adding pasp-box(" << _pictureAspectRatioItem.convertToCSV() << ") -> " << job.file; - - switch( _trackMode ) { - case TM_INDEX: - oss << " (track index=" << _trackIndex << ')'; - break; - - case TM_ID: - oss << " (track id=" << _trackId << ')'; - break; - - default: - case TM_WILDCARD: - return herrf( "track not specified\n" ); - } - - verbose1f( "%s\n", oss.str().c_str() ); - if( dryrunAbort() ) - return SUCCESS; - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - switch( _trackMode ) { - default: - case TM_INDEX: - if( qtff::PictureAspectRatioBox::add( job.fileHandle, _trackIndex, _pictureAspectRatioItem )) - return herrf( "unable to add pasp-box\n" ); - break; - - case TM_ID: - if( qtff::PictureAspectRatioBox::add( job.fileHandle, _trackId, _pictureAspectRatioItem )) - return herrf( "unable to add pasp-box\n" ); - break; - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionPictureAspectRatioList( JobContext& job ) -{ - job.fileHandle = MP4Read( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for read: %s\n", job.file.c_str() ); - - ostringstream report; - - const int widx = 3; - const int wid = 3; - const int wtype = 8; - const int wparm = 6; - const string sep = " "; - - if( _jobCount == 0 ) { - report << setw(widx) << right << "IDX" - << sep << setw(wid) << "ID" - << sep << setw(wtype) << left << "TYPE" - << sep << setw(wparm) << right << "hSPACE" - << sep << setw(wparm) << right << "vSPACE" - << sep << setw(0) << "FILE" - << '\n'; - - report << setfill('-') << setw(70) << "" << setfill(' ') << '\n'; - } - - qtff::PictureAspectRatioBox::ItemList itemList; - if( qtff::PictureAspectRatioBox::list( job.fileHandle, itemList )) - return herrf( "unable to fetch list of pasp-boxes" ); - - const qtff::PictureAspectRatioBox::ItemList::size_type max = itemList.size(); - for( qtff::PictureAspectRatioBox::ItemList::size_type i = 0; i < max; i++ ) { - const qtff::PictureAspectRatioBox::IndexedItem& xitem = itemList[i]; - - const char* type = MP4GetTrackType( job.fileHandle, xitem.trackId ); - if( !type) - type = "unknown"; - - report << right << setw(widx) << xitem.trackIndex - << sep << setw(wid) << xitem.trackId - << sep << setw(wtype) << left << toStringTrackType( type ) - << sep << setw(wparm) << right << xitem.item.hSpacing - << sep << setw(wparm) << right << xitem.item.vSpacing; - - if( i == 0 ) - report << sep << setw(0) << job.file; - - report << '\n'; - } - - verbose1f( "%s", report.str().c_str() ); - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionPictureAspectRatioRemove( JobContext& job ) -{ - ostringstream oss; - oss << "removing pasp-box from " << job.file; - - switch( _trackMode ) { - case TM_INDEX: - oss << " (track index=" << _trackIndex << ')'; - break; - - case TM_ID: - oss << " (track id=" << _trackId << ')'; - break; - - default: - case TM_WILDCARD: - oss << " (all tracks)"; - } - - verbose1f( "%s\n", oss.str().c_str() ); - if( dryrunAbort() ) - return SUCCESS; - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - switch( _trackMode ) { - case TM_INDEX: - if( qtff::PictureAspectRatioBox::remove( job.fileHandle, _trackIndex )) - return herrf( "unable to remove pasp-box\n" ); - break; - - case TM_ID: - if( qtff::PictureAspectRatioBox::remove( job.fileHandle, _trackId )) - return herrf( "unable to remove pasp-box\n" ); - break; - - default: - case TM_WILDCARD: - { - qtff::PictureAspectRatioBox::ItemList itemList; - if( qtff::PictureAspectRatioBox::list( job.fileHandle, itemList )) - return herrf( "unable to fetch list of pasp-boxes" ); - - _trackMode = TM_INDEX; - const qtff::PictureAspectRatioBox::ItemList::size_type max = itemList.size(); - for( qtff::PictureAspectRatioBox::ItemList::size_type i = 0; i < max; i++ ) { - const qtff::PictureAspectRatioBox::IndexedItem& xitem = itemList[i]; - _trackIndex = xitem.trackIndex; - actionPictureAspectRatioRemove( job ); - } - break; - } - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionPictureAspectRatioSet( JobContext& job ) -{ - ostringstream oss; - oss << "setting pasp-box(" << _pictureAspectRatioItem.convertToCSV() << ") -> " << job.file; - - switch( _trackMode ) { - case TM_INDEX: - oss << " (track index=" << _trackIndex << ')'; - break; - - case TM_ID: - oss << " (track id=" << _trackId << ')'; - break; - - default: - case TM_WILDCARD: - return herrf( "track not specified\n" ); - } - - verbose1f( "%s\n", oss.str().c_str() ); - if( dryrunAbort() ) - return SUCCESS; - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - switch( _trackMode ) { - default: - case TM_INDEX: - if( qtff::PictureAspectRatioBox::set( job.fileHandle, _trackIndex, _pictureAspectRatioItem )) - return herrf( "unable to set pasp-box\n" ); - break; - - case TM_ID: - if( qtff::PictureAspectRatioBox::set( job.fileHandle, _trackId, _pictureAspectRatioItem )) - return herrf( "unable to set pasp-box\n" ); - break; - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionTrackModifierRemove( JobContext& job ) -{ - ostringstream oss; - oss << "removing " << _actionTrackModifierRemove_name << " -> " << job.file; - - switch( _trackMode ) { - case TM_INDEX: - oss << " (track index=" << _trackIndex << ')'; - break; - - case TM_ID: - oss << " (track id=" << _trackId << ')'; - break; - - default: - case TM_WILDCARD: - return herrf( "track not specified\n" ); - } - - verbose1f( "%s\n", oss.str().c_str() ); - if( dryrunAbort() ) - return SUCCESS; - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - if( _trackMode == TM_ID ) - _trackIndex = MP4FindTrackIndex( job.fileHandle, _trackId ); - - TrackModifier tm( job.fileHandle, _trackIndex ); - (tm.*_actionTrackModifierRemove_function)(); - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::actionTrackModifierSet( JobContext& job ) -{ - ostringstream oss; - oss << "setting " << _actionTrackModifierSet_name << "=" << _actionTrackModifierSet_value << " -> " << job.file; - - switch( _trackMode ) { - case TM_INDEX: - oss << " (track index=" << _trackIndex << ')'; - break; - - case TM_ID: - oss << " (track id=" << _trackId << ')'; - break; - - default: - case TM_WILDCARD: - return herrf( "track not specified\n" ); - } - - verbose1f( "%s\n", oss.str().c_str() ); - if( dryrunAbort() ) - return SUCCESS; - - job.fileHandle = MP4Modify( job.file.c_str() ); - if( job.fileHandle == MP4_INVALID_FILE_HANDLE ) - return herrf( "unable to open for write: %s\n", job.file.c_str() ); - - if( _trackMode == TM_ID ) - _trackIndex = MP4FindTrackIndex( job.fileHandle, _trackId ); - - TrackModifier tm( job.fileHandle, _trackIndex ); - (tm.*_actionTrackModifierSet_function)( _actionTrackModifierSet_value ); - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::utility_job( JobContext& job ) -{ - if( !_action ) - return herrf( "no action specified\n" ); - - return (this->*_action)( job ); -} - -/////////////////////////////////////////////////////////////////////////////// - -bool -TrackUtility::utility_option( int code, bool& handled ) -{ - handled = true; - - switch( code ) { - case LC_TRACK_WILDCARD: - _trackMode = TM_WILDCARD; - break; - - case LC_TRACK_INDEX: - { - _trackMode = TM_INDEX; - istringstream iss( prog::optarg ); - iss >> _trackIndex; - if( iss.rdstate() != ios::eofbit ) - return herrf( "invalid track index: %s\n", prog::optarg ); - break; - } - - case LC_TRACK_ID: - { - _trackMode = TM_ID; - istringstream iss( prog::optarg ); - iss >> _trackId; - if( iss.rdstate() != ios::eofbit ) - return herrf( "invalid track id: %s\n", prog::optarg ); - break; - } - - case LC_LIST: - _action = &TrackUtility::actionList; - break; - - case LC_COLR_PARMS: - _colorParameterItem.convertFromCSV( prog::optarg ); - break; - - case LC_COLR_PARM_HD: - _colorParameterItem.primariesIndex = 1; - _colorParameterItem.transferFunctionIndex = 1; - _colorParameterItem.matrixIndex = 1; - break; - - case LC_COLR_PARM_SD: - _colorParameterItem.primariesIndex = 6; - _colorParameterItem.transferFunctionIndex = 1; - _colorParameterItem.matrixIndex = 6; - break; - - case LC_COLR_LIST: - _action = &TrackUtility::actionColorParameterList; - break; - - case LC_ENABLED: - _action = &TrackUtility::actionTrackModifierSet; - _actionTrackModifierSet_function = &TrackModifier::setEnabled; - _actionTrackModifierSet_name = "enabled"; - _actionTrackModifierSet_value = prog::optarg; - break; - - case LC_INMOVIE: - _action = &TrackUtility::actionTrackModifierSet; - _actionTrackModifierSet_function = &TrackModifier::setInMovie; - _actionTrackModifierSet_name = "inMovie"; - _actionTrackModifierSet_value = prog::optarg; - break; - - case LC_INPREVIEW: - _action = &TrackUtility::actionTrackModifierSet; - _actionTrackModifierSet_function = &TrackModifier::setInPreview; - _actionTrackModifierSet_name = "inPreview"; - _actionTrackModifierSet_value = prog::optarg; - break; - - case LC_LAYER: - _action = &TrackUtility::actionTrackModifierSet; - _actionTrackModifierSet_function = &TrackModifier::setLayer; - _actionTrackModifierSet_name = "layer"; - _actionTrackModifierSet_value = prog::optarg; - break; - - case LC_ALTGROUP: - _action = &TrackUtility::actionTrackModifierSet; - _actionTrackModifierSet_function = &TrackModifier::setAlternateGroup; - _actionTrackModifierSet_name = "alternateGroup"; - _actionTrackModifierSet_value = prog::optarg; - break; - - case LC_VOLUME: - _action = &TrackUtility::actionTrackModifierSet; - _actionTrackModifierSet_function = &TrackModifier::setVolume; - _actionTrackModifierSet_name = "volume"; - _actionTrackModifierSet_value = prog::optarg; - break; - - case LC_WIDTH: - _action = &TrackUtility::actionTrackModifierSet; - _actionTrackModifierSet_function = &TrackModifier::setWidth; - _actionTrackModifierSet_name = "width"; - _actionTrackModifierSet_value = prog::optarg; - break; - - case LC_HEIGHT: - _action = &TrackUtility::actionTrackModifierSet; - _actionTrackModifierSet_function = &TrackModifier::setHeight; - _actionTrackModifierSet_name = "height"; - _actionTrackModifierSet_value = prog::optarg; - break; - - case LC_LANGUAGE: - _action = &TrackUtility::actionTrackModifierSet; - _actionTrackModifierSet_function = &TrackModifier::setLanguage; - _actionTrackModifierSet_name = "language"; - _actionTrackModifierSet_value = prog::optarg; - break; - - case LC_HDLRNAME: - _action = &TrackUtility::actionTrackModifierSet; - _actionTrackModifierSet_function = &TrackModifier::setHandlerName; - _actionTrackModifierSet_name = "handlerName"; - _actionTrackModifierSet_value = prog::optarg; - break; - - case LC_UDTANAME: - _action = &TrackUtility::actionTrackModifierSet; - _actionTrackModifierSet_function = &TrackModifier::setUserDataName; - _actionTrackModifierSet_name = "userDataName"; - _actionTrackModifierSet_value = prog::optarg; - break; - - case LC_UDTANAME_R: - _action = &TrackUtility::actionTrackModifierRemove; - _actionTrackModifierRemove_function = &TrackModifier::removeUserDataName; - _actionTrackModifierRemove_name = "userDataName"; - break; - - case LC_COLR_ADD: - _action = &TrackUtility::actionColorParameterAdd; - break; - - case LC_COLR_SET: - _action = &TrackUtility::actionColorParameterSet; - break; - - case LC_COLR_REMOVE: - _action = &TrackUtility::actionColorParameterRemove; - break; - - case LC_PASP_PARMS: - _pictureAspectRatioItem.convertFromCSV( prog::optarg ); - break; - - case LC_PASP_LIST: - _action = &TrackUtility::actionPictureAspectRatioList; - break; - - case LC_PASP_ADD: - _action = &TrackUtility::actionPictureAspectRatioAdd; - break; - - case LC_PASP_SET: - _action = &TrackUtility::actionPictureAspectRatioSet; - break; - - case LC_PASP_REMOVE: - _action = &TrackUtility::actionPictureAspectRatioRemove; - break; - - default: - handled = false; - break; - } - - return SUCCESS; -} - -/////////////////////////////////////////////////////////////////////////////// - -string -toStringTrackType( string code ) -{ - if( !code.compare( "vide" )) // 14496-12 - return "video"; - if( !code.compare( "soun" )) // 14496-12 - return "audio"; - if( !code.compare( "hint" )) // 14496-12 - return "hint"; - - if( !code.compare( "text" )) // QTFF - return "text"; - if( !code.compare( "tmcd" )) // QTFF - return "timecode"; - - if( !code.compare( "subt" )) // QTFF - return "subtitle"; - - return string( "(" ) + code + ")"; -} - -/////////////////////////////////////////////////////////////////////////////// - -}} // namespace mp4v2::util - -/////////////////////////////////////////////////////////////////////////////// - -extern "C" -int main( int argc, char** argv ) -{ - mp4v2::util::TrackUtility util( argc, argv ); - return util.process(); -} diff --git a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4trackdump.cpp b/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4trackdump.cpp deleted file mode 100644 index ab24d364..00000000 --- a/debian/mp4v2/mp4v2-2.0.0~dfsg0/util/mp4trackdump.cpp +++ /dev/null @@ -1,242 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is MPEG4IP. - * - * The Initial Developer of the Original Code is Cisco Systems Inc. - * Portions created by Cisco Systems Inc. are - * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. - * - * Contributor(s): - * Dave Mackie dmackie@cisco.com - */ - -// N.B. mp4extract just extracts tracks/samples from an mp4 file -// For many track types this is insufficient to reconsruct a valid -// elementary stream (ES). Use "mp4creator -extract=<trackId>" if -// you need the ES reconstructed. - -#include "util/impl.h" - -using namespace mp4v2::util; - -char* ProgName; -char* Mp4PathName; -char* Mp4FileName; - -static void DumpTrack ( MP4FileHandle mp4file, MP4TrackId tid ) -{ - uint32_t numSamples; - MP4SampleId sid; - MP4Duration time; - uint32_t timescale; - uint64_t msectime; - - uint64_t sectime, mintime, hrtime; - - numSamples = MP4GetTrackNumberOfSamples( mp4file, tid ); - timescale = MP4GetTrackTimeScale( mp4file, tid ); - printf( "mp4file %s, track %d, samples %d, timescale %d\n", - Mp4FileName, tid, numSamples, timescale ); - - for ( sid = 1; sid <= numSamples; sid++ ) { - time = MP4GetSampleTime( mp4file, tid, sid ); - msectime = time; - msectime *= UINT64_C( 1000 ); - msectime /= timescale; - if ( msectime == 0 ) { - hrtime = mintime = sectime = UINT64_C( 0 ); - } - else { - hrtime = msectime / UINT64_C( 3600000 ); // 3600 * 1000 - msectime -= hrtime * UINT64_C( 3600000 );// 3600 * 1000 - mintime = msectime / UINT64_C( 60000 );// 60 * 1000 - msectime -= ( mintime * UINT64_C( 60000 ) );// 60 * 1000 - sectime = msectime / UINT64_C( 1000 ); - msectime -= sectime * UINT64_C( 1000 ); - } - - printf( "sampleId %6d, size %5u duration %8" PRIu64 " time %8" PRIu64 " %02" PRIu64 ":%02" PRIu64 ":%02" PRIu64 ".%03" PRIu64 " %c\n", - sid, MP4GetSampleSize( mp4file, tid, sid ), - MP4GetSampleDuration( mp4file, tid, sid ), - time, hrtime, mintime, sectime, msectime, - MP4GetSampleSync( mp4file, tid, sid ) == 1 ? 'S' : ' ' ); - } -} - -extern "C" int main( int argc, char** argv ) -{ - const char* const usageString = - "[-l] [-t <track-id>] [-s <sample-id>] [-v [<level>]] <file-name>"; - MP4TrackId trackId = MP4_INVALID_TRACK_ID; - MP4SampleId sampleId = MP4_INVALID_SAMPLE_ID; - MP4LogLevel verbosity = MP4_LOG_ERROR; - - /* begin processing command line */ - ProgName = argv[0]; - while ( true ) { - int c = -1; - int option_index = 0; - static const prog::Option long_options[] = { - { "track", prog::Option::REQUIRED_ARG, 0, 't' }, - { "sample", prog::Option::REQUIRED_ARG, 0, 's' }, - { "verbose", prog::Option::OPTIONAL_ARG, 0, 'v' }, - { "version", prog::Option::NO_ARG, 0, 'V' }, - { NULL, prog::Option::NO_ARG, 0, 0 } - }; - - c = prog::getOptionSingle( argc, argv, "t:v::V", long_options, &option_index ); - - if ( c == -1 ) - break; - - switch ( c ) { - case 's': - if ( sscanf( prog::optarg, "%u", &sampleId ) != 1 ) { - fprintf( stderr, "%s: bad sample-id specified: %s\n", - ProgName, prog::optarg ); - exit( 1 ); - } - break; - case 't': - if ( sscanf( prog::optarg, "%u", &trackId ) != 1 ) { - fprintf( stderr, - "%s: bad track-id specified: %s\n", - ProgName, prog::optarg ); - exit( 1 ); - } - break; - case 'v': - verbosity = MP4_LOG_VERBOSE1; - if ( prog::optarg ) { - uint32_t level; - if ( sscanf( prog::optarg, "%u", &level ) == 1 ) { - if ( level >= 2 ) { - verbosity = MP4_LOG_VERBOSE2; - } - if ( level >= 3 ) { - verbosity = MP4_LOG_VERBOSE3; - } - if ( level >= 4 ) { - verbosity = MP4_LOG_VERBOSE4; - } - } - } - break; - case '?': - fprintf( stderr, "usage: %s %s\n", ProgName, usageString ); - exit( 0 ); - case 'V': - fprintf( stderr, "%s - %s\n", - ProgName, MP4V2_PROJECT_name_formal ); - exit( 0 ); - default: - fprintf( stderr, "%s: unknown option specified, ignoring: %c\n", - ProgName, c ); - } - } - - /* check that we have at least one non-option argument */ - if ( ( argc - prog::optind ) < 1 ) { - fprintf( stderr, "usage: %s %s\n", ProgName, usageString ); - exit( 1 ); - } - - MP4LogSetLevel(verbosity); - if ( verbosity ) { - fprintf( stderr, "%s version %s\n", ProgName, MP4V2_PROJECT_version ); - } - - /* point to the specified file names */ - Mp4PathName = argv[prog::optind++]; - - char* lastSlash = strrchr( Mp4PathName, '/' ); - if ( lastSlash ) { - Mp4FileName = lastSlash + 1; - } - else { - Mp4FileName = Mp4PathName; - } - - /* warn about extraneous non-option arguments */ - if ( prog::optind < argc ) { - fprintf( stderr, "%s: unknown options specified, ignoring: ", ProgName ); - while ( prog::optind < argc ) { - fprintf( stderr, "%s ", argv[prog::optind++] ); - } - fprintf( stderr, "\n" ); - } - - /* end processing of command line */ - - - MP4FileHandle mp4File = MP4Read( Mp4PathName ); - - if ( !mp4File ) { - exit( 1 ); - } - - if ( sampleId != MP4_INVALID_SAMPLE_ID ) { - if ( trackId == 0 ) { - fprintf( stderr, "%s: Must specify track for sample\n", ProgName ); - return -1; - } - if ( sampleId > MP4GetTrackNumberOfSamples( mp4File, trackId ) ) { - fprintf( stderr, "%s: Sample number %u is past end %u\n", - ProgName, sampleId, MP4GetTrackNumberOfSamples( mp4File, trackId ) ); - return -1; - } - uint32_t sample_size = MP4GetTrackMaxSampleSize( mp4File, trackId ); - uint8_t *sample = ( uint8_t * )malloc( sample_size ); - MP4Timestamp sampleTime; - MP4Duration sampleDuration, sampleRenderingOffset; - uint32_t this_size = sample_size; - bool isSyncSample; - bool ret = MP4ReadSample( mp4File, - trackId, - sampleId, - &sample, - &this_size, - &sampleTime, - &sampleDuration, - &sampleRenderingOffset, - &isSyncSample ); - if ( ret == false ) { - fprintf( stderr, "Sample read error\n" ); - return -1; - } - printf( "Track %u, Sample %u, Length %u\n", - trackId, sampleId, this_size ); - - for ( uint32_t ix = 0; ix < this_size; ix++ ) { - if ( ( ix % 16 ) == 0 ) printf( "\n%04u ", ix ); - printf( "%02x ", sample[ix] ); - } - printf( "\n" ); - } - else { - if ( trackId == 0 ) { - uint32_t numTracks = MP4GetNumberOfTracks( mp4File ); - - for ( uint32_t i = 0; i < numTracks; i++ ) { - trackId = MP4FindTrackId( mp4File, i ); - DumpTrack( mp4File, trackId ); - } - } - else { - DumpTrack( mp4File, trackId ); - } - } - - MP4Close( mp4File ); - - return( 0 ); -} diff --git a/debian/mp4v2/mp4v2_2.0.0~dfsg0.orig.tar.bz2 b/debian/mp4v2/mp4v2_2.0.0~dfsg0.orig.tar.bz2 deleted file mode 100644 index a4b09547..00000000 Binary files a/debian/mp4v2/mp4v2_2.0.0~dfsg0.orig.tar.bz2 and /dev/null differ -- cgit v1.2.1