From cd027c572f5f755f7f58c373b9b79b47d07edbdc Mon Sep 17 00:00:00 2001 From: Ermir Suldashi Date: Tue, 24 Dec 2019 15:18:11 +0100 Subject: [PATCH 01/27] replaced deprecated Nan and node functions to fix compilation in node 12 --- lib/decoder.js | 2 +- lib/encoder.js | 4 +- package-lock.json | 800 ++++++++++++++++++++++++++++++++++++++++----- package.json | 6 +- src/bindings.cc | 6 +- src/node_lame.cc | 18 +- src/node_mpg123.cc | 18 +- src/node_pointer.h | 4 +- 8 files changed, 744 insertions(+), 114 deletions(-) diff --git a/lib/decoder.js b/lib/decoder.js index 1e5bf69..c21a2f7 100644 --- a/lib/decoder.js +++ b/lib/decoder.js @@ -98,7 +98,7 @@ Decoder.prototype._transform = function (chunk, encoding, done) { } function read () { - out = new Buffer(safe_buffer); + out = Buffer.alloc(safe_buffer); binding.mpg123_read(mh, out, out.length, afterRead); // XXX: the `afterRead` function below holds the reference to the "out" // buffer while being filled by `mpg123_read()` on the thread pool. diff --git a/lib/encoder.js b/lib/encoder.js index 79172ce..16aa999 100644 --- a/lib/encoder.js +++ b/lib/encoder.js @@ -162,7 +162,7 @@ Encoder.prototype._transform = function (chunk, encoding, done) { var num_samples = chunk.length / this.blockAlign; // TODO: Use better calculation logic from lame.h here var estimated_size = 1.25 * num_samples + 7200; - var output = new Buffer(estimated_size); + var output = Buffer.alloc(estimated_size); debug('encoding %d byte chunk with %d byte output buffer (%d samples)', chunk.length, output.length, num_samples); @@ -204,7 +204,7 @@ Encoder.prototype._flush = function (done) { var self = this; var estimated_size = 7200; // value specified in lame.h - var output = new Buffer(estimated_size); + var output = Buffer.alloc(estimated_size); if (!this._initCalled) { try { this._init(); } catch (e) { return done(e); } diff --git a/package-lock.json b/package-lock.json index 9fe0f8f..5444b73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64,15 +64,149 @@ "integrity": "sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ==", "dev": true }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, "bindings": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", "integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==" }, - "commander": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.3.0.tgz", - "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "core-util-is": { @@ -88,93 +222,279 @@ "ms": "2.0.0" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, "diff": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", - "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, + "es-abstract": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz", + "integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "escape-string-regexp": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz", - "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", - "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", "inherits": "2", - "minimatch": "0.3" + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "growl": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", - "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, - "jade": { - "version": "0.26.3", - "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", - "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=", + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { - "commander": "0.6.1", - "mkdirp": "0.3.0" - }, - "dependencies": { - "commander": { - "version": "0.6.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-0.6.1.tgz", - "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=", - "dev": true - }, - "mkdirp": { - "version": "0.3.0", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", - "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=", - "dev": true - } + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, "minimatch": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", - "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" + "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -182,36 +502,49 @@ } }, "mocha": { - "version": "2.5.3", - "resolved": "http://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz", - "integrity": "sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg=", - "dev": true, - "requires": { - "commander": "2.3.0", - "debug": "2.2.0", - "diff": "1.4.0", - "escape-string-regexp": "1.0.2", - "glob": "3.2.11", - "growl": "1.9.2", - "jade": "0.26.3", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.2.tgz", + "integrity": "sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "2.2.0", + "minimatch": "3.0.4", "mkdirp": "0.5.1", - "supports-color": "1.2.0", - "to-iso-string": "0.0.2" + "ms": "2.1.1", + "node-environment-flags": "1.0.5", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.0", + "yargs-parser": "13.1.1", + "yargs-unparser": "1.6.0" }, "dependencies": { "debug": { - "version": "2.2.0", - "resolved": "http://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "ms": "0.7.1" + "ms": "^2.1.1" } }, "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true } } @@ -222,9 +555,98 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==" + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + }, + "node-environment-flags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", + "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "process-nextick-args": { "version": "2.0.0", @@ -243,40 +665,248 @@ "string_decoder": "~0.10.x" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string.prototype.trimleft": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", + "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", + "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, - "supports-color": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz", - "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4=", - "dev": true + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } }, - "to-iso-string": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz", - "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE=", + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + } } } } diff --git a/package.json b/package.json index a6abe70..8e76500 100644 --- a/package.json +++ b/package.json @@ -22,13 +22,13 @@ "dependencies": { "bindings": "^1.2.1", "debug": "^2.2.0", - "readable-stream": "^1.0.34", - "nan": "^2.3.5" + "nan": "^2.14.0", + "readable-stream": "^1.0.34" }, "devDependencies": { "@machinomy/types-readable-stream": "git+https://github.com/machinomy/types-readable-stream.git", "@types/node": "^10.11.4", - "mocha": "^2.4.5" + "mocha": "^6.2.2" }, "scripts": { "test": "mocha --reporter spec" diff --git a/src/bindings.cc b/src/bindings.cc index 3651c32..1bf1956 100644 --- a/src/bindings.cc +++ b/src/bindings.cc @@ -23,10 +23,10 @@ using namespace node; namespace nodelame { -void InitLame(Handle); -void InitMPG123(Handle); +void InitLame(Local); +void InitMPG123(Local); -void Initialize(Handle target) { +void Initialize(Local target) { Nan::HandleScope scope; InitLame(target); diff --git a/src/node_lame.cc b/src/node_lame.cc index 7c66742..7101be0 100644 --- a/src/node_lame.cc +++ b/src/node_lame.cc @@ -43,7 +43,7 @@ NAN_METHOD(PASTE(node_lame_get_, fn)) { \ } \ NAN_METHOD(PASTE(node_lame_set_, fn)) { \ UNWRAP_GFP; \ - type input = (type)info[1]->PASTE(v8type, Value)(); \ + type input = (type)info[1]->PASTE(v8type, Value)(Nan::GetCurrentContext()).FromJust(); \ int output = PASTE(lame_set_, fn)(gfp, input); \ info.GetReturnValue().Set(Nan::New(output)); \ } @@ -188,12 +188,12 @@ void node_lame_encode_buffer_after (uv_work_t *req) { encode_req *r = (encode_req *)req->data; - Handle argv[1]; + Local argv[1]; argv[0] = Nan::New(r->rtn); Nan::TryCatch try_catch; - Nan::New(r->callback)->Call(Nan::GetCurrentContext()->Global(), 1, argv); + Nan::Call(Nan::New(r->callback), Nan::GetCurrentContext()->Global(), 1, argv); // cleanup r->callback.Reset(); @@ -247,7 +247,7 @@ NAN_METHOD(node_lame_get_id3v1_tag) { UNWRAP_GFP; - Local outbuf = info[1]->ToObject(); + Local outbuf = info[1]->ToObject(Nan::GetCurrentContext()).ToLocalChecked(); unsigned char *buf = (unsigned char *)Buffer::Data(outbuf); size_t buf_size = (size_t)Buffer::Length(outbuf); @@ -264,7 +264,7 @@ NAN_METHOD(node_lame_get_id3v1_tag) { NAN_METHOD(node_lame_get_id3v2_tag) { UNWRAP_GFP; - Local outbuf = info[1]->ToObject(); + Local outbuf = info[1]->ToObject(Nan::GetCurrentContext()).ToLocalChecked(); unsigned char *buf = (unsigned char *)Buffer::Data(outbuf); size_t buf_size = (size_t)Buffer::Length(outbuf); @@ -373,12 +373,12 @@ FN(int, Int32, highpasswidth); // ... -void InitLame(Handle target) { +void InitLame(Local target) { Nan::HandleScope scope; /* sizeof's */ #define SIZEOF(value) \ - Nan::ForceSet(target, Nan::New("sizeof_" #value).ToLocalChecked(), Nan::New(static_cast(sizeof(value))), \ + Nan::DefineOwnProperty(target, Nan::New("sizeof_" #value).ToLocalChecked(), Nan::New(static_cast(sizeof(value))), \ static_cast(ReadOnly|DontDelete)) SIZEOF(short); SIZEOF(int); @@ -387,7 +387,7 @@ void InitLame(Handle target) { #define CONST_INT(value) \ - Nan::ForceSet(target, Nan::New(#value).ToLocalChecked(), Nan::New(value), \ + Nan::DefineOwnProperty(target, Nan::New(#value).ToLocalChecked(), Nan::New(value), \ static_cast(ReadOnly|DontDelete)); // vbr_mode_e @@ -476,7 +476,7 @@ void InitLame(Handle target) { LAME_SET_METHOD(highpassfreq); LAME_SET_METHOD(highpasswidth); // ... - + /* Nan::SetMethod(target, "lame_get_decode_only", node_lame_get_decode_only); Nan::SetMethod(target, "lame_set_decode_only", node_lame_set_decode_only); diff --git a/src/node_mpg123.cc b/src/node_mpg123.cc index 45e3cb4..1759422 100644 --- a/src/node_mpg123.cc +++ b/src/node_mpg123.cc @@ -202,12 +202,12 @@ void node_mpg123_feed_after (uv_work_t *req) { Nan::HandleScope scope; feed_req *r = (feed_req *)req->data; - Handle argv[1]; + Local argv[1]; argv[0] = Nan::New(r->rtn); Nan::TryCatch try_catch; - Nan::New(r->callback)->Call(Nan::GetCurrentContext()->Global(), 1, argv); + Nan::Call(Nan::New(r->callback), Nan::GetCurrentContext()->Global(), 1, argv); // cleanup r->callback.Reset(); @@ -256,14 +256,14 @@ void node_mpg123_read_after (uv_work_t *req) { Nan::HandleScope scope; read_req *r = (read_req *)req->data; - Handle argv[3]; + Local argv[3]; argv[0] = Nan::New(r->rtn); argv[1] = Nan::New(static_cast(r->done)); argv[2] = Nan::New(r->meta); Nan::TryCatch try_catch; - Nan::New(r->callback)->Call(Nan::GetCurrentContext()->Global(), 3, argv); + Nan::Call(Nan::New(r->callback), Nan::GetCurrentContext()->Global(), 3, argv); // cleanup r->callback.Reset(); @@ -304,7 +304,7 @@ void node_mpg123_id3_after (uv_work_t *req) { mpg123_id3v1 *v1 = ireq->v1; mpg123_id3v2 *v2 = ireq->v2; int r = ireq->rtn; - Handle rtn; + Local rtn; if (r == MPG123_OK) { if (v1 != NULL) { @@ -374,13 +374,13 @@ void node_mpg123_id3_after (uv_work_t *req) { } } - Handle argv[2]; + Local argv[2]; argv[0] = Nan::New(ireq->rtn); argv[1] = rtn; Nan::TryCatch try_catch; - Nan::New(ireq->callback)->Call(Nan::GetCurrentContext()->Global(), 2, argv); + Nan::Call(Nan::New(ireq->callback), Nan::GetCurrentContext()->Global(), 2, argv); // cleanup ireq->callback.Reset(); @@ -392,11 +392,11 @@ void node_mpg123_id3_after (uv_work_t *req) { } -void InitMPG123(Handle target) { +void InitMPG123(Local target) { Nan::HandleScope scope; #define CONST_INT(value) \ - Nan::ForceSet(target, Nan::New(#value).ToLocalChecked(), Nan::New(value), \ + Nan::DefineOwnProperty(target, Nan::New(#value).ToLocalChecked(), Nan::New(value), \ static_cast(ReadOnly|DontDelete)); // mpg123_errors diff --git a/src/node_pointer.h b/src/node_pointer.h index 584f578..a6f66b6 100644 --- a/src/node_pointer.h +++ b/src/node_pointer.h @@ -36,7 +36,7 @@ inline static Nan::MaybeLocal WrapPointer(void *ptr) { * Unwraps Buffer instance "buffer" to a C `char *` with the offset specified. */ -inline static char * UnwrapPointer(v8::Handle buffer, int64_t offset = 0) { +inline static char * UnwrapPointer(v8::Local buffer, int64_t offset = 0) { if (node::Buffer::HasInstance(buffer)) { return node::Buffer::Data(buffer.As()) + offset; } else { @@ -50,6 +50,6 @@ inline static char * UnwrapPointer(v8::Handle buffer, int64_t offset */ template -inline static Type UnwrapPointer(v8::Handle buffer) { +inline static Type UnwrapPointer(v8::Local buffer) { return reinterpret_cast(UnwrapPointer(buffer)); } From c1f2cdf31b37aff441a4a0986a9ce1a6c992716e Mon Sep 17 00:00:00 2001 From: Ermir Suldashi Date: Tue, 24 Dec 2019 15:18:23 +0100 Subject: [PATCH 02/27] 1.2.5 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5444b73..eeab57e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "lame", - "version": "1.2.4", + "version": "1.2.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8e76500..dc091e9 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "encode", "decode" ], - "version": "1.2.4", + "version": "1.2.5", "author": "Nathan Rajlich (http://tootallnate.net)", "license": "MIT", "repository": { From 4f04975f6421bfa94aa5822c2595338c6517c847 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Wed, 15 Jan 2020 19:53:59 +0100 Subject: [PATCH 03/27] chore(flat): @flat namespace --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dc091e9..9889445 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "lame", + "name": "@flat/lame", "description": "NodeJS native bindings to libmp3lame & libmpg123.", "keywords": [ "lame", From 0525f38da8954155324ea2ce024f84657a9ed25c Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 9 Sep 2022 12:46:24 +0200 Subject: [PATCH 04/27] chore: add github actions --- .github/workflows/node.js.yml | 32 + .travis.yml | 33 - package-lock.json | 1160 ++++++++++++++++++++++++++++++++- package.json | 2 +- 4 files changed, 1184 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/node.js.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..d30d77f --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,32 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [ + 16.x, + 18.4, + 18.5, + 18.6, + 18.7, + 18.8, + 18.9, + 18.x + ] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: npm install -d + - run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index eae9e61..0000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -sudo: false - -env: - - CXX=g++-4.8 -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.8 - -language: node_js - -node_js: - - "0.10" - - "0.12" - - "3.2" - - "4" - - "5" - - "6" - - "7" - -install: - - PATH="`npm bin`:`npm bin -g`:$PATH" - # Install dependencies and build - - npm install - -script: - # Output useful info for debugging - - node --version - - npm --version - # Run tests - - npm test diff --git a/package-lock.json b/package-lock.json index eeab57e..c6afb4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,1155 @@ { - "name": "lame", + "name": "@flat/lame", "version": "1.2.5", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "@flat/lame", + "version": "1.2.5", + "license": "MIT", + "dependencies": { + "bindings": "^1.2.1", + "debug": "^2.2.0", + "nan": "^2.14.0", + "readable-stream": "^1.0.34" + }, + "devDependencies": { + "@machinomy/types-readable-stream": "git+https://github.com/machinomy/types-readable-stream.git", + "@types/node": "^10.11.4", + "mocha": "^6.2.2" + } + }, + "node_modules/@machinomy/types-readable-stream": { + "version": "0.0.2", + "resolved": "git+ssh://git@github.com/machinomy/types-readable-stream.git#daa774fac334d2adcab07aac17637a55656583a6", + "integrity": "sha512-kZlw2EU78SLRaRxQ/IOtgRxjJ4XySZZzGW6yjO1g+1xwB1W896AJA+uLnF3+BaV82KUauolI/ZpXyeZWhosgsA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/events": "^1.2.0", + "@types/node": "^9.6.2", + "readable-stream": "^2.3.2" + } + }, + "node_modules/@machinomy/types-readable-stream/node_modules/@types/node": { + "version": "9.6.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.34.tgz", + "integrity": "sha512-PzJpSs2afoYqBA4yLBgaKUdZRk8+1yvkxcUBW6958h4vYOC+pc4k4C+QmQ6AO5Pt7uA4EIIboFog6YNCuITD0g==", + "dev": true + }, + "node_modules/@machinomy/types-readable-stream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "node_modules/@machinomy/types-readable-stream/node_modules/readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/@machinomy/types-readable-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/@types/events": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", + "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "10.11.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.4.tgz", + "integrity": "sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ==", + "dev": true + }, + "node_modules/ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/bindings": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", + "integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/es-abstract": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz", + "integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==", + "dev": true, + "dependencies": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "deprecated": "Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.", + "dev": true, + "dependencies": { + "is-buffer": "~2.0.3" + }, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "node_modules/is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "node_modules/log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "dependencies": { + "chalk": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "node_modules/mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", + "dev": true, + "dependencies": { + "minimist": "0.0.8" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.2.tgz", + "integrity": "sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A==", + "dev": true, + "dependencies": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "2.2.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "ms": "2.1.1", + "node-environment-flags": "1.0.5", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.0", + "yargs-parser": "13.1.1", + "yargs-unparser": "1.6.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/mocha/node_modules/debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + }, + "node_modules/node-environment-flags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", + "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", + "dev": true, + "dependencies": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "node_modules/object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "1.1.14", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/string.prototype.trimleft": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", + "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimright": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", + "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "node_modules/yargs": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "dev": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.1" + } + }, + "node_modules/yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "dependencies": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + } + }, "dependencies": { "@machinomy/types-readable-stream": { - "version": "git+https://github.com/machinomy/types-readable-stream.git#daa774fac334d2adcab07aac17637a55656583a6", - "from": "git+https://github.com/machinomy/types-readable-stream.git", + "version": "git+ssh://git@github.com/machinomy/types-readable-stream.git#daa774fac334d2adcab07aac17637a55656583a6", "dev": true, + "from": "@machinomy/types-readable-stream@git+https://github.com/machinomy/types-readable-stream.git", "requires": { "@types/events": "^1.2.0", "@types/node": "^9.6.2", @@ -701,6 +1843,11 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -731,11 +1878,6 @@ "function-bind": "^1.1.1" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", diff --git a/package.json b/package.json index 9889445..8e45267 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "git://github.com/TooTallNate/node-lame.git" + "url": "https://github.com/FlatIO/node-lame.git" }, "main": "./index.js", "types": "./index.d.ts", From 934f30ed60e1d5f8420ab13214ca613037319642 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 9 Sep 2022 11:09:54 +0000 Subject: [PATCH 05/27] chore(deps): update bindings, nan, debug --- package-lock.json | 83 ++++++++++++++++++++++++++++++----------------- package.json | 6 ++-- 2 files changed, 57 insertions(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index c6afb4a..ace6030 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "version": "1.2.5", "license": "MIT", "dependencies": { - "bindings": "^1.2.1", - "debug": "^2.2.0", - "nan": "^2.14.0", + "bindings": "^1.5.0", + "debug": "^4.3.4", + "nan": "^2.16.0", "readable-stream": "^1.0.34" }, "devDependencies": { @@ -126,9 +126,12 @@ "dev": true }, "node_modules/bindings": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", - "integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } }, "node_modules/brace-expansion": { "version": "1.1.11", @@ -254,11 +257,19 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { - "ms": "2.0.0" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/decamelize": { @@ -361,6 +372,11 @@ "node": ">=4" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "node_modules/find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -703,14 +719,14 @@ "dev": true }, "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.16.0.tgz", + "integrity": "sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==" }, "node_modules/node-environment-flags": { "version": "1.0.5", @@ -1148,6 +1164,7 @@ "dependencies": { "@machinomy/types-readable-stream": { "version": "git+ssh://git@github.com/machinomy/types-readable-stream.git#daa774fac334d2adcab07aac17637a55656583a6", + "integrity": "sha512-kZlw2EU78SLRaRxQ/IOtgRxjJ4XySZZzGW6yjO1g+1xwB1W896AJA+uLnF3+BaV82KUauolI/ZpXyeZWhosgsA==", "dev": true, "from": "@machinomy/types-readable-stream@git+https://github.com/machinomy/types-readable-stream.git", "requires": { @@ -1243,9 +1260,12 @@ "dev": true }, "bindings": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", - "integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } }, "brace-expansion": { "version": "1.1.11", @@ -1357,11 +1377,11 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { - "ms": "2.0.0" + "ms": "2.1.2" } }, "decamelize": { @@ -1433,6 +1453,11 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -1692,14 +1717,14 @@ } }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.16.0.tgz", + "integrity": "sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==" }, "node-environment-flags": { "version": "1.0.5", diff --git a/package.json b/package.json index 8e45267..168c376 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,9 @@ "main": "./index.js", "types": "./index.d.ts", "dependencies": { - "bindings": "^1.2.1", - "debug": "^2.2.0", - "nan": "^2.14.0", + "bindings": "^1.5.0", + "debug": "^4.3.4", + "nan": "^2.16.0", "readable-stream": "^1.0.34" }, "devDependencies": { From 87480518e6bd18c34d4361dc60a39a79b62e9876 Mon Sep 17 00:00:00 2001 From: Corentin Gurtner Date: Fri, 9 Sep 2022 13:01:34 +0200 Subject: [PATCH 06/27] fix: replace pointer wrapping buffer length from 0 to 1 to fix node 18.8.0 behavior --- package.json | 2 +- src/node_pointer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 168c376..a71b344 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "encode", "decode" ], - "version": "1.2.5", + "version": "1.2.6", "author": "Nathan Rajlich (http://tootallnate.net)", "license": "MIT", "repository": { diff --git a/src/node_pointer.h b/src/node_pointer.h index a6f66b6..dd37f87 100644 --- a/src/node_pointer.h +++ b/src/node_pointer.h @@ -29,7 +29,7 @@ inline static Nan::MaybeLocal WrapPointer(void *ptr, size_t length) */ inline static Nan::MaybeLocal WrapPointer(void *ptr) { - return WrapPointer((char *)ptr, 0); + return WrapPointer((char *)ptr, 1); } /* From 2f9a094a7e668298a4b986a759c36ae63d6b898f Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 9 Sep 2022 11:16:10 +0000 Subject: [PATCH 07/27] chore: remove old travis badge --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 40fa961..3fc0a31 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ node-lame ========= ### NodeJS native bindings to libmp3lame & libmpg123 -[![Build Status](https://travis-ci.org/TooTallNate/node-lame.svg?branch=master)](https://travis-ci.org/TooTallNate/node-lame) For all your async streaming MP3 encoding/decoding needs, there's `node-lame`! This module hooks into libmp3lame, the library that the `lame` command uses, to From acba5280c9be74fcb721ffce1b1f63ef5c090140 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 9 Sep 2022 11:19:05 +0000 Subject: [PATCH 08/27] chore: add changelog for 1.2.5 & 1.2.6 --- History.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/History.md b/History.md index 061ed09..52fe923 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,13 @@ +1.2.6 / 2022-09-09 +================== + + * Fixed support for Node >= 18.8.0 (@corentingurtner - see nodejs/node#44554) + +1.2.5 / 2019-12-24 +================== + + * Fixed support for Node >= 12 (@suldashi) + 1.2.4 / 2016-06-27 ================== From 288bcf9e9f046d2c7353d13a0628b061ab477b59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 11:37:05 +0000 Subject: [PATCH 09/27] build(deps): bump ansi-regex from 3.0.0 to 3.0.1 Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index ace6030..21d16e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@flat/lame", - "version": "1.2.5", + "version": "1.2.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@flat/lame", - "version": "1.2.5", + "version": "1.2.6", "license": "MIT", "dependencies": { "bindings": "^1.5.0", @@ -90,9 +90,9 @@ } }, "node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true, "engines": { "node": ">=4" @@ -196,9 +196,9 @@ } }, "node_modules/cliui/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, "engines": { "node": ">=6" @@ -1037,9 +1037,9 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, "engines": { "node": ">=6" @@ -1126,9 +1126,9 @@ } }, "node_modules/yargs/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, "engines": { "node": ">=6" @@ -1230,9 +1230,9 @@ "dev": true }, "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true }, "ansi-styles": { @@ -1323,9 +1323,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "string-width": { @@ -1969,9 +1969,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "string-width": { @@ -2027,9 +2027,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "string-width": { From d3d008d58c5e580533fd175f21b4d5e5c6e3f41e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 11:37:37 +0000 Subject: [PATCH 10/27] build(deps): bump y18n from 4.0.0 to 4.0.3 Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.3. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/y18n-v4.0.3/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/compare/v4.0.0...y18n-v4.0.3) --- updated-dependencies: - dependency-name: y18n dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index ace6030..b9d553e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@flat/lame", - "version": "1.2.5", + "version": "1.2.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@flat/lame", - "version": "1.2.5", + "version": "1.2.6", "license": "MIT", "dependencies": { "bindings": "^1.5.0", @@ -1078,9 +1078,9 @@ "dev": true }, "node_modules/y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "node_modules/yargs": { @@ -2003,9 +2003,9 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "yargs": { From c1d09e631b3c1ddf8c795ce808f271649af2ce3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 11:37:38 +0000 Subject: [PATCH 11/27] build(deps): bump lodash from 4.17.15 to 4.17.21 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.21) --- updated-dependencies: - dependency-name: lodash dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index ace6030..618261d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@flat/lame", - "version": "1.2.5", + "version": "1.2.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@flat/lame", - "version": "1.2.5", + "version": "1.2.6", "license": "MIT", "dependencies": { "bindings": "^1.5.0", @@ -616,9 +616,9 @@ } }, "node_modules/lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "node_modules/log-symbols": { @@ -1630,9 +1630,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "log-symbols": { From 9f1c67f4912e2d2407a28c812f6edb386b4b6989 Mon Sep 17 00:00:00 2001 From: Vincent Giersch Date: Fri, 9 Sep 2022 13:38:03 +0200 Subject: [PATCH 12/27] chore: add dependabot --- .github/dependabot.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..cd44b57 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 From f5b2a1d2bd0cfe460bb270b0c747181797c3debe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 11:39:42 +0000 Subject: [PATCH 13/27] build(deps-dev): bump @types/node from 10.11.4 to 18.7.16 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.11.4 to 18.7.16. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index ace6030..5ab7b0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@flat/lame", - "version": "1.2.5", + "version": "1.2.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@flat/lame", - "version": "1.2.5", + "version": "1.2.6", "license": "MIT", "dependencies": { "bindings": "^1.5.0", @@ -16,7 +16,7 @@ }, "devDependencies": { "@machinomy/types-readable-stream": "git+https://github.com/machinomy/types-readable-stream.git", - "@types/node": "^10.11.4", + "@types/node": "^18.7.16", "mocha": "^6.2.2" } }, @@ -75,9 +75,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "10.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.4.tgz", - "integrity": "sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ==", + "version": "18.7.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.16.tgz", + "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==", "dev": true }, "node_modules/ansi-colors": { @@ -1218,9 +1218,9 @@ "dev": true }, "@types/node": { - "version": "10.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.4.tgz", - "integrity": "sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ==", + "version": "18.7.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.16.tgz", + "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==", "dev": true }, "ansi-colors": { diff --git a/package.json b/package.json index a71b344..aad6014 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "@machinomy/types-readable-stream": "git+https://github.com/machinomy/types-readable-stream.git", - "@types/node": "^10.11.4", + "@types/node": "^18.7.16", "mocha": "^6.2.2" }, "scripts": { From 524299ec5145b2a6fb9fbe661b2fba21089088c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 11:42:04 +0000 Subject: [PATCH 14/27] build(deps-dev): bump mocha from 6.2.2 to 10.0.0 Bumps [mocha](https://github.com/mochajs/mocha) from 6.2.2 to 10.0.0. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v6.2.2...v10.0.0) --- updated-dependencies: - dependency-name: mocha dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 1987 +++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 851 insertions(+), 1138 deletions(-) diff --git a/package-lock.json b/package-lock.json index 75ddabf..50c2318 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "devDependencies": { "@machinomy/types-readable-stream": "git+https://github.com/machinomy/types-readable-stream.git", "@types/node": "^18.7.16", - "mocha": "^6.2.2" + "mocha": "^10.0.0" } }, "node_modules/@machinomy/types-readable-stream": { @@ -80,51 +80,79 @@ "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==", "dev": true }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, "node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "dependencies": { - "sprintf-js": "~1.0.2" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/bindings": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", @@ -134,13 +162,24 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" } }, "node_modules/browser-stdout": { @@ -150,105 +189,105 @@ "dev": true }, "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/chalk/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/cliui/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">=6" + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "node_modules/core-util-is": { @@ -273,131 +312,91 @@ } }, "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "dependencies": { - "object-keys": "^1.0.12" + "node": ">=10" }, - "engines": { - "node": ">= 0.4" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, "engines": { "node": ">=0.3.1" } }, "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/es-abstract": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz", - "integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==", + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6" } }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "dependencies": { + "to-regex-range": "^5.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, "node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "locate-path": "^3.0.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "deprecated": "Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, - "dependencies": { - "is-buffer": "~2.0.3" - }, "bin": { "flat": "cli.js" } @@ -405,14 +404,22 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, "node_modules/get-caller-file": { "version": "2.0.5", @@ -424,9 +431,9 @@ } }, "node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -438,48 +445,52 @@ }, "engines": { "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, "engines": { - "node": ">=4.x" + "node": ">= 6" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=4" + "node": "*" } }, - "node_modules/has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, "node_modules/he": { @@ -494,7 +505,7 @@ "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "dependencies": { "once": "^1.3.0", @@ -506,76 +517,76 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, - "node_modules/is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { - "node": ">= 0.4" + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.12.0" } }, - "node_modules/is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "dependencies": { - "has": "^1.0.3" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "dependencies": { - "has-symbols": "^1.0.1" - }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/isarray": { @@ -583,139 +594,106 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, "node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "node_modules/log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "dependencies": { - "chalk": "^2.0.1" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "node_modules/mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", - "dev": true, - "dependencies": { - "minimist": "0.0.8" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "node": ">=10" } }, "node_modules/mocha": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.2.tgz", - "integrity": "sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", "dev": true, "dependencies": { - "ansi-colors": "3.2.3", + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.0", - "yargs-parser": "13.1.1", - "yargs-unparser": "1.6.0" + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" }, "bin": { "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/mocha/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "^2.1.1" + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" } }, "node_modules/mocha/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "node_modules/ms": { @@ -728,131 +706,111 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.16.0.tgz", "integrity": "sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==" }, - "node_modules/node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "dependencies": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, - "node_modules/object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true, - "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "bin": { + "nanoid": "bin/nanoid.cjs" }, "engines": { - "node": ">= 0.4" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - }, "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { "wrappy": "1" } }, "node_modules/p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { - "p-limit": "^2.0.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=6" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, "node_modules/readable-stream": { "version": "1.1.14", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", @@ -864,129 +822,110 @@ "string_decoder": "~0.10.x" } }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "bin": { - "semver": "bin/semver" + "dependencies": { + "randombytes": "^2.1.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, "node_modules/string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/string.prototype.trimleft": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", - "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/string.prototype.trimright": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", - "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { - "ansi-regex": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "is-number": "^7.0.0" }, "engines": { - "node": ">=6" + "node": ">=8.0" } }, "node_modules/util-deprecate": { @@ -995,169 +934,96 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, "node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" + "node": ">=10" }, - "engines": { - "node": ">=6" + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "node_modules/yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", - "dev": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" - } - }, - "node_modules/yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "engines": { + "node": ">=10" } }, - "node_modules/yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" }, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/yargs/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" }, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } } }, @@ -1223,40 +1089,59 @@ "integrity": "sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==", "dev": true }, + "@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, "bindings": { @@ -1268,13 +1153,21 @@ } }, "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" } }, "browser-stdout": { @@ -1284,91 +1177,78 @@ "dev": true }, "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "dependencies": { "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "core-util-is": { @@ -1385,72 +1265,33 @@ } }, "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "es-abstract": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz", - "integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "file-uri-to-path": { @@ -1458,35 +1299,43 @@ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "to-regex-range": "^5.0.1" } }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { - "is-buffer": "~2.0.3" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" } }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true }, "get-caller-file": { "version": "2.0.5", @@ -1495,9 +1344,9 @@ "dev": true }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -1506,33 +1355,42 @@ "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { - "function-bind": "^1.1.1" + "is-glob": "^4.0.1" } }, "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "he": { @@ -1544,7 +1402,7 @@ "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "requires": { "once": "^1.3.0", @@ -1556,162 +1414,130 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { - "has": "^1.0.3" + "is-extglob": "^2.1.1" } }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" } }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^5.0.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "chalk": "^2.0.1" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" } }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "requires": { - "minimist": "0.0.8" + "brace-expansion": "^2.0.1" } }, "mocha": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.2.tgz", - "integrity": "sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", "dev": true, "requires": { - "ansi-colors": "3.2.3", + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.0", - "yargs-parser": "13.1.1", - "yargs-unparser": "1.6.0" + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" }, "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true } } @@ -1726,93 +1552,61 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.16.0.tgz", "integrity": "sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==" }, - "node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, - "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" } }, "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^3.0.2" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "process-nextick-args": { @@ -1821,6 +1615,15 @@ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, "readable-stream": { "version": "1.1.14", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", @@ -1832,16 +1635,19 @@ "string_decoder": "~0.10.x" } }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, "safe-buffer": { @@ -1850,23 +1656,14 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } }, "string_decoder": { "version": "0.10.31", @@ -1874,57 +1671,47 @@ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "string.prototype.trimleft": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", - "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - } - }, - "string.prototype.trimright": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", - "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^5.0.1" } }, "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "is-number": "^7.0.0" } }, "util-deprecate": { @@ -1933,147 +1720,73 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true }, "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index aad6014..9df3acd 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "devDependencies": { "@machinomy/types-readable-stream": "git+https://github.com/machinomy/types-readable-stream.git", "@types/node": "^18.7.16", - "mocha": "^6.2.2" + "mocha": "^10.0.0" }, "scripts": { "test": "mocha --reporter spec" From 217f852065023e37d886315ff4e2f5a92246e17e Mon Sep 17 00:00:00 2001 From: corentingurtner Date: Sat, 16 Sep 2023 18:02:44 +0200 Subject: [PATCH 15/27] feat: upgrade mpg123 library to add arm64 support (#31) * feat: upgrade mpg123 library to add arm64 support * fix: add HAVE_DIRENT_H macro for linux env * fix: define ASMALIGN_BALIGN for linux x64 * fix: remove node 16.x from test workflow * fix: add src/libmpg123/dct64_x86_64.S to build sources for linux x64 * chore(github): only run on 18.x --------- Co-authored-by: Corentin Gurtner Co-authored-by: Vincent Giersch --- .github/workflows/node.js.yml | 7 - README.md | 2 +- deps/lame/config/linux/arm64/config.h | 375 ++ deps/lame/config/mac/arm64/config.h | 375 ++ deps/mpg123/AUTHORS | 27 +- deps/mpg123/COPYING | 31 +- deps/mpg123/INSTALL | 8 +- deps/mpg123/Makefile.am | 211 +- deps/mpg123/Makefile.in | 3673 +++++++++++-- deps/mpg123/NEWS | 2183 +++++--- deps/mpg123/NEWS.libmpg123 | 65 + deps/mpg123/TODO | 8 +- deps/mpg123/aclocal.m4 | 1475 ++++- deps/mpg123/config/linux/arm/config.h | 3 + deps/mpg123/config/linux/arm64/config.h | 478 ++ deps/mpg123/config/linux/arm64/mpg123.h | 1441 +++++ deps/mpg123/config/linux/ia32/config.h | 3 + deps/mpg123/config/linux/x64/config.h | 6 + deps/mpg123/config/linux/x87/config.h | 3 + deps/mpg123/config/mac/arm64/config.h | 478 ++ deps/mpg123/config/mac/arm64/mpg123.h | 1441 +++++ deps/mpg123/config/mac/x64/config.h | 3 + deps/mpg123/configure | 4745 ++++++++++++----- deps/mpg123/configure.ac | 1068 ++-- deps/mpg123/doc/README.remote | 2 +- deps/mpg123/doc/TODO | 55 - deps/mpg123/doc/doxy_examples.c | 4 +- deps/mpg123/doc/doxygen.conf | 15 +- deps/mpg123/doc/doxyhead.xhtml | 13 +- deps/mpg123/doc/examples/Makefile | 26 +- deps/mpg123/doc/examples/extract_frames.c | 2 +- deps/mpg123/m4/libtool.m4 | 2561 +++++---- deps/mpg123/m4/ltoptions.m4 | 127 +- deps/mpg123/m4/ltsugar.m4 | 7 +- deps/mpg123/m4/ltversion.m4 | 12 +- deps/mpg123/m4/lt~obsolete.m4 | 7 +- deps/mpg123/man1/mpg123.1 | 122 +- deps/mpg123/mpg123.gyp | 30 +- deps/mpg123/mpg123.spec.in | 20 +- deps/mpg123/ports/MSVC++/config.h | 15 +- deps/mpg123/ports/MSVC++/examples/feedseek.c | 2 +- deps/mpg123/ports/MSVC++/examples/scan.c | 2 +- deps/mpg123/ports/MSVC++/mpg123.h | 11 +- deps/mpg123/ports/MSVC++/msvc.c | 8 +- deps/mpg123/ports/README | 29 +- deps/mpg123/scripts/benchmark-cpu.pl | 16 +- deps/mpg123/src/Makefile.am | 186 - deps/mpg123/src/Makefile.in | 1097 ---- deps/mpg123/src/audio.c | 712 +-- deps/mpg123/src/audio.h | 84 +- deps/mpg123/src/buffer.c | 312 -- deps/mpg123/src/buffer.h | 45 - deps/mpg123/src/common.c | 428 +- deps/mpg123/src/common.h | 17 +- deps/mpg123/src/compat/compat.c | 665 +++ .../mpg123/src/{libmpg123 => compat}/compat.h | 119 +- deps/mpg123/src/compat/compat_str.c | 43 + deps/mpg123/src/config.h.in | 65 +- deps/mpg123/src/control_generic.c | 93 +- deps/mpg123/src/equalizer.c | 6 +- deps/mpg123/src/getlopt.c | 15 +- deps/mpg123/src/httpget.c | 67 +- deps/mpg123/src/{libmpg123 => }/intsym.h | 132 +- deps/mpg123/src/legacy_module.c | 74 - deps/mpg123/src/libmpg123/Makefile.am | 141 - deps/mpg123/src/libmpg123/Makefile.in | 919 ---- deps/mpg123/src/libmpg123/abi_align.h | 41 + deps/mpg123/src/libmpg123/check_neon.S | 35 + deps/mpg123/src/libmpg123/compat.c | 138 - deps/mpg123/src/libmpg123/dct36_3dnow.S | 121 +- deps/mpg123/src/libmpg123/dct36_3dnowext.S | 120 +- deps/mpg123/src/libmpg123/dct36_avx.S | 358 ++ deps/mpg123/src/libmpg123/dct36_neon.S | 283 + deps/mpg123/src/libmpg123/dct36_neon64.S | 249 + deps/mpg123/src/libmpg123/dct36_sse.S | 387 ++ deps/mpg123/src/libmpg123/dct36_x86_64.S | 394 ++ deps/mpg123/src/libmpg123/dct64_3dnow.S | 47 +- deps/mpg123/src/libmpg123/dct64_3dnowext.S | 31 +- deps/mpg123/src/libmpg123/dct64_avx.S | 324 ++ deps/mpg123/src/libmpg123/dct64_avx_float.S | 294 + deps/mpg123/src/libmpg123/dct64_mmx.S | 16 +- deps/mpg123/src/libmpg123/dct64_neon.S | 15 +- deps/mpg123/src/libmpg123/dct64_neon64.S | 299 ++ .../mpg123/src/libmpg123/dct64_neon64_float.S | 282 + deps/mpg123/src/libmpg123/dct64_neon_float.S | 15 +- deps/mpg123/src/libmpg123/dct64_sse.S | 70 +- deps/mpg123/src/libmpg123/dct64_sse_float.S | 64 +- deps/mpg123/src/libmpg123/dct64_x86_64.S | 6 +- .../mpg123/src/libmpg123/dct64_x86_64_float.S | 6 +- deps/mpg123/src/libmpg123/debug.h | 137 +- deps/mpg123/src/libmpg123/decode.h | 19 +- deps/mpg123/src/libmpg123/dither.c | 122 +- deps/mpg123/src/libmpg123/dither_impl.h | 119 + deps/mpg123/src/libmpg123/feature.c | 6 + deps/mpg123/src/libmpg123/fmt123.h | 135 + deps/mpg123/src/libmpg123/format.c | 298 +- deps/mpg123/src/libmpg123/frame.c | 77 +- deps/mpg123/src/libmpg123/frame.h | 12 +- deps/mpg123/src/libmpg123/getbits.h | 6 +- deps/mpg123/src/libmpg123/getcpuflags.S | 11 + deps/mpg123/src/libmpg123/getcpuflags.h | 15 +- deps/mpg123/src/libmpg123/getcpuflags_arm.c | 61 + .../mpg123/src/libmpg123/getcpuflags_x86_64.S | 57 + deps/mpg123/src/libmpg123/icy.c | 4 +- deps/mpg123/src/libmpg123/icy2utf8.c | 4 +- deps/mpg123/src/libmpg123/id3.c | 299 +- deps/mpg123/src/libmpg123/index.c | 4 +- .../mpg123/src/libmpg123/l12_integer_tables.h | 6 +- deps/mpg123/src/libmpg123/layer1.c | 50 +- deps/mpg123/src/libmpg123/layer3.c | 189 +- deps/mpg123/src/libmpg123/lfs_alias.c | 184 +- deps/mpg123/src/libmpg123/lfs_wrap.c | 19 +- deps/mpg123/src/libmpg123/libmpg123.c | 227 +- deps/mpg123/src/libmpg123/mangle.h | 129 +- deps/mpg123/src/libmpg123/mpeghead.h | 6 +- deps/mpg123/src/libmpg123/mpg123.h | 1441 +++++ deps/mpg123/src/libmpg123/mpg123.h.in | 898 +++- deps/mpg123/src/libmpg123/mpg123lib_intern.h | 70 +- deps/mpg123/src/libmpg123/newhuffman.h | 824 +++ deps/mpg123/src/libmpg123/ntom.c | 16 +- deps/mpg123/src/libmpg123/optimize.c | 464 +- deps/mpg123/src/libmpg123/optimize.h | 188 +- deps/mpg123/src/libmpg123/parse.c | 746 +-- deps/mpg123/src/libmpg123/readers.c | 10 +- deps/mpg123/src/libmpg123/sample.h | 12 +- deps/mpg123/src/libmpg123/stringbuf.c | 49 +- deps/mpg123/src/libmpg123/synth.c | 444 +- deps/mpg123/src/libmpg123/synth.h | 4 +- deps/mpg123/src/libmpg123/synth_3dnow.S | 49 +- deps/mpg123/src/libmpg123/synth_3dnowext.S | 9 +- deps/mpg123/src/libmpg123/synth_altivec.c | 26 +- deps/mpg123/src/libmpg123/synth_arm.S | 15 +- .../mpg123/src/libmpg123/synth_arm_accurate.S | 15 +- deps/mpg123/src/libmpg123/synth_i586.S | 9 +- deps/mpg123/src/libmpg123/synth_i586_dither.S | 9 +- deps/mpg123/src/libmpg123/synth_mmx.S | 46 +- deps/mpg123/src/libmpg123/synth_neon.S | 26 +- deps/mpg123/src/libmpg123/synth_neon64.S | 127 + .../src/libmpg123/synth_neon64_accurate.S | 135 + .../mpg123/src/libmpg123/synth_neon64_float.S | 118 + deps/mpg123/src/libmpg123/synth_neon64_s32.S | 136 + .../src/libmpg123/synth_neon_accurate.S | 18 +- deps/mpg123/src/libmpg123/synth_neon_float.S | 22 +- deps/mpg123/src/libmpg123/synth_neon_s32.S | 26 +- deps/mpg123/src/libmpg123/synth_ntom.h | 4 +- deps/mpg123/src/libmpg123/synth_real.c | 207 +- deps/mpg123/src/libmpg123/synth_s32.c | 213 +- deps/mpg123/src/libmpg123/synth_sse.S | 9 +- deps/mpg123/src/libmpg123/synth_sse3d.h | 56 +- .../mpg123/src/libmpg123/synth_sse_accurate.S | 24 +- deps/mpg123/src/libmpg123/synth_sse_float.S | 20 +- deps/mpg123/src/libmpg123/synth_sse_s32.S | 32 +- deps/mpg123/src/libmpg123/synth_stereo_avx.S | 256 + .../src/libmpg123/synth_stereo_avx_accurate.S | 286 + .../src/libmpg123/synth_stereo_avx_float.S | 243 + .../src/libmpg123/synth_stereo_avx_s32.S | 292 + deps/mpg123/src/libmpg123/synth_stereo_neon.S | 30 +- .../src/libmpg123/synth_stereo_neon64.S | 185 + .../libmpg123/synth_stereo_neon64_accurate.S | 200 + .../src/libmpg123/synth_stereo_neon64_float.S | 174 + .../src/libmpg123/synth_stereo_neon64_s32.S | 203 + .../libmpg123/synth_stereo_neon_accurate.S | 18 +- .../src/libmpg123/synth_stereo_neon_float.S | 22 +- .../src/libmpg123/synth_stereo_neon_s32.S | 26 +- .../src/libmpg123/synth_stereo_sse_accurate.S | 30 +- .../src/libmpg123/synth_stereo_sse_float.S | 22 +- .../src/libmpg123/synth_stereo_sse_s32.S | 40 +- .../src/libmpg123/synth_stereo_x86_64.S | 16 +- .../libmpg123/synth_stereo_x86_64_accurate.S | 16 +- .../src/libmpg123/synth_stereo_x86_64_float.S | 16 +- .../src/libmpg123/synth_stereo_x86_64_s32.S | 16 +- deps/mpg123/src/libmpg123/synth_x86_64.S | 14 +- .../src/libmpg123/synth_x86_64_accurate.S | 14 +- .../mpg123/src/libmpg123/synth_x86_64_float.S | 14 +- deps/mpg123/src/libmpg123/synth_x86_64_s32.S | 14 +- deps/mpg123/src/libmpg123/tabinit.c | 174 +- deps/mpg123/src/libmpg123/tabinit_mmx.S | 55 +- deps/mpg123/src/metaprint.c | 178 +- deps/mpg123/src/module.c | 306 -- deps/mpg123/src/module.h | 48 - deps/mpg123/src/mpg123-id3dump.c | 422 ++ deps/mpg123/src/mpg123-strip.c | 160 + deps/mpg123/src/mpg123.c | 715 ++- deps/mpg123/src/mpg123app.h | 44 +- deps/mpg123/src/out123.c | 950 ++++ deps/mpg123/src/output/Makefile.am | 213 - deps/mpg123/src/output/Makefile.in | 1238 ----- deps/mpg123/src/output/aix.c | 300 -- deps/mpg123/src/output/alib.c | 209 - deps/mpg123/src/output/alsa.c | 297 -- deps/mpg123/src/output/arts.c | 117 - deps/mpg123/src/output/coreaudio.c | 370 -- deps/mpg123/src/output/dummy.c | 78 - deps/mpg123/src/output/esd.c | 167 - deps/mpg123/src/output/hp.c | 184 - deps/mpg123/src/output/jack.c | 450 -- deps/mpg123/src/output/mint.c | 197 - deps/mpg123/src/output/nas.c | 335 -- deps/mpg123/src/output/openal.c | 197 - deps/mpg123/src/output/os2.c | 665 --- deps/mpg123/src/output/oss.c | 319 -- deps/mpg123/src/output/output.h | 13 - deps/mpg123/src/output/portaudio.c | 255 - deps/mpg123/src/output/pulse.c | 164 - deps/mpg123/src/output/sdl.c | 206 - deps/mpg123/src/output/sgi.c | 213 - deps/mpg123/src/output/sndio.c | 161 - deps/mpg123/src/output/sun.c | 281 - deps/mpg123/src/output/win32.c | 229 - deps/mpg123/src/playlist.c | 183 +- deps/mpg123/src/playlist.h | 42 +- deps/mpg123/src/resolver.c | 26 +- deps/mpg123/src/resolver.h | 1 + deps/mpg123/src/sfifo.c | 146 - deps/mpg123/src/sfifo.h | 95 - deps/mpg123/src/sysutil.c | 88 + deps/mpg123/src/sysutil.h | 17 + deps/mpg123/src/term.c | 225 +- deps/mpg123/src/term.h | 11 +- deps/mpg123/src/tests/noise.c | 4 + deps/mpg123/src/tests/seek_accuracy.c | 261 - deps/mpg123/src/wav.c | 464 -- deps/mpg123/src/waves.c | 428 ++ deps/mpg123/src/waves.h | 57 + deps/mpg123/src/wavhead.h | 68 - deps/mpg123/src/win32_net.c | 25 +- deps/mpg123/src/win32_support.c | 16 +- deps/mpg123/src/win32_support.h | 1 + deps/mpg123/src/xfermem.c | 321 -- deps/mpg123/src/xfermem.h | 74 - deps/mpg123/windows-builds.sh | 22 +- 231 files changed, 34157 insertions(+), 19198 deletions(-) create mode 100644 deps/lame/config/linux/arm64/config.h create mode 100644 deps/lame/config/mac/arm64/config.h create mode 100644 deps/mpg123/config/linux/arm64/config.h create mode 100644 deps/mpg123/config/linux/arm64/mpg123.h create mode 100644 deps/mpg123/config/mac/arm64/config.h create mode 100644 deps/mpg123/config/mac/arm64/mpg123.h delete mode 100644 deps/mpg123/src/Makefile.am delete mode 100644 deps/mpg123/src/Makefile.in delete mode 100644 deps/mpg123/src/buffer.c delete mode 100644 deps/mpg123/src/buffer.h create mode 100644 deps/mpg123/src/compat/compat.c rename deps/mpg123/src/{libmpg123 => compat}/compat.h (54%) create mode 100644 deps/mpg123/src/compat/compat_str.c rename deps/mpg123/src/{libmpg123 => }/intsym.h (71%) delete mode 100644 deps/mpg123/src/legacy_module.c delete mode 100644 deps/mpg123/src/libmpg123/Makefile.am delete mode 100644 deps/mpg123/src/libmpg123/Makefile.in create mode 100644 deps/mpg123/src/libmpg123/abi_align.h create mode 100644 deps/mpg123/src/libmpg123/check_neon.S delete mode 100644 deps/mpg123/src/libmpg123/compat.c create mode 100644 deps/mpg123/src/libmpg123/dct36_avx.S create mode 100644 deps/mpg123/src/libmpg123/dct36_neon.S create mode 100644 deps/mpg123/src/libmpg123/dct36_neon64.S create mode 100644 deps/mpg123/src/libmpg123/dct36_sse.S create mode 100644 deps/mpg123/src/libmpg123/dct36_x86_64.S create mode 100644 deps/mpg123/src/libmpg123/dct64_avx.S create mode 100644 deps/mpg123/src/libmpg123/dct64_avx_float.S create mode 100644 deps/mpg123/src/libmpg123/dct64_neon64.S create mode 100644 deps/mpg123/src/libmpg123/dct64_neon64_float.S create mode 100644 deps/mpg123/src/libmpg123/dither_impl.h create mode 100644 deps/mpg123/src/libmpg123/fmt123.h create mode 100644 deps/mpg123/src/libmpg123/getcpuflags_arm.c create mode 100644 deps/mpg123/src/libmpg123/getcpuflags_x86_64.S create mode 100644 deps/mpg123/src/libmpg123/mpg123.h create mode 100644 deps/mpg123/src/libmpg123/newhuffman.h create mode 100644 deps/mpg123/src/libmpg123/synth_neon64.S create mode 100644 deps/mpg123/src/libmpg123/synth_neon64_accurate.S create mode 100644 deps/mpg123/src/libmpg123/synth_neon64_float.S create mode 100644 deps/mpg123/src/libmpg123/synth_neon64_s32.S create mode 100644 deps/mpg123/src/libmpg123/synth_stereo_avx.S create mode 100644 deps/mpg123/src/libmpg123/synth_stereo_avx_accurate.S create mode 100644 deps/mpg123/src/libmpg123/synth_stereo_avx_float.S create mode 100644 deps/mpg123/src/libmpg123/synth_stereo_avx_s32.S create mode 100644 deps/mpg123/src/libmpg123/synth_stereo_neon64.S create mode 100644 deps/mpg123/src/libmpg123/synth_stereo_neon64_accurate.S create mode 100644 deps/mpg123/src/libmpg123/synth_stereo_neon64_float.S create mode 100644 deps/mpg123/src/libmpg123/synth_stereo_neon64_s32.S delete mode 100644 deps/mpg123/src/module.c delete mode 100644 deps/mpg123/src/module.h create mode 100644 deps/mpg123/src/mpg123-id3dump.c create mode 100644 deps/mpg123/src/mpg123-strip.c create mode 100644 deps/mpg123/src/out123.c delete mode 100644 deps/mpg123/src/output/Makefile.am delete mode 100644 deps/mpg123/src/output/Makefile.in delete mode 100644 deps/mpg123/src/output/aix.c delete mode 100644 deps/mpg123/src/output/alib.c delete mode 100644 deps/mpg123/src/output/alsa.c delete mode 100644 deps/mpg123/src/output/arts.c delete mode 100644 deps/mpg123/src/output/coreaudio.c delete mode 100644 deps/mpg123/src/output/dummy.c delete mode 100644 deps/mpg123/src/output/esd.c delete mode 100644 deps/mpg123/src/output/hp.c delete mode 100644 deps/mpg123/src/output/jack.c delete mode 100644 deps/mpg123/src/output/mint.c delete mode 100644 deps/mpg123/src/output/nas.c delete mode 100644 deps/mpg123/src/output/openal.c delete mode 100644 deps/mpg123/src/output/os2.c delete mode 100644 deps/mpg123/src/output/oss.c delete mode 100755 deps/mpg123/src/output/output.h delete mode 100644 deps/mpg123/src/output/portaudio.c delete mode 100644 deps/mpg123/src/output/pulse.c delete mode 100644 deps/mpg123/src/output/sdl.c delete mode 100644 deps/mpg123/src/output/sgi.c delete mode 100644 deps/mpg123/src/output/sndio.c delete mode 100644 deps/mpg123/src/output/sun.c delete mode 100644 deps/mpg123/src/output/win32.c delete mode 100644 deps/mpg123/src/sfifo.c delete mode 100644 deps/mpg123/src/sfifo.h create mode 100644 deps/mpg123/src/sysutil.c create mode 100644 deps/mpg123/src/sysutil.h delete mode 100644 deps/mpg123/src/tests/seek_accuracy.c delete mode 100644 deps/mpg123/src/wav.c create mode 100644 deps/mpg123/src/waves.c create mode 100644 deps/mpg123/src/waves.h delete mode 100644 deps/mpg123/src/wavhead.h delete mode 100644 deps/mpg123/src/xfermem.c delete mode 100644 deps/mpg123/src/xfermem.h diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d30d77f..b848d30 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,13 +12,6 @@ jobs: strategy: matrix: node-version: [ - 16.x, - 18.4, - 18.5, - 18.6, - 18.7, - 18.8, - 18.9, 18.x ] diff --git a/README.md b/README.md index 3fc0a31..519f155 100644 --- a/README.md +++ b/README.md @@ -65,4 +65,4 @@ the MP3 file is determined (usually right at the beginning). The `Encoder` class is a `Stream` subclass that accepts raw PCM data written to it, and outputs a valid MP3 file. You must specify the PCM data format when creating the encoder instance. Only 16-bit signed samples are currently -supported (rescale before passing to the encoder if necessary)... +supported (rescale before passing to the encoder if necessary)... \ No newline at end of file diff --git a/deps/lame/config/linux/arm64/config.h b/deps/lame/config/linux/arm64/config.h new file mode 100644 index 0000000..7825675 --- /dev/null +++ b/deps/lame/config/linux/arm64/config.h @@ -0,0 +1,375 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +#ifndef LAME_CONFIG_H +#define LAME_CONFIG_H + +/* debug define */ +/* #undef ABORTFP */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* alot of debug output */ +/* #undef DEBUG */ + +/* allow to compute a more accurate replaygain value */ +/* #undef DECODE_ON_THE_FLY */ + +/* double is faster than float on Alpha */ +/* #undef FLOAT */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* we link against libefence */ +/* #undef HAVE_EFENCE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* add ieee754_float32_t type */ +/* #undef HAVE_IEEE754_FLOAT32_T */ +#ifndef HAVE_IEEE754_FLOAT32_T + typedef float ieee754_float32_t; +#endif + +/* add ieee754_float64_t type */ +/* #undef HAVE_IEEE754_FLOAT64_T */ +#ifndef HAVE_IEEE754_FLOAT64_T + typedef double ieee754_float64_t; +#endif + +/* system has 80 bit floats */ +/* #undef HAVE_IEEE854_FLOAT80 */ + +/* add ieee854_float80_t type */ +/* #undef HAVE_IEEE854_FLOAT80_T */ +#ifndef HAVE_IEEE854_FLOAT80_T + typedef long double ieee854_float80_t; +#endif + +/* add int16_t type */ +#define HAVE_INT16_T 1 +#ifndef HAVE_INT16_T + typedef short int16_t; +#endif + +/* add int32_t type */ +#define HAVE_INT32_T 1 +#ifndef HAVE_INT32_T +#define A_INT32_T int + typedef A_INT32_T int32_t; +#endif + +/* add int64_t type */ +#define HAVE_INT64_T 1 +#ifndef HAVE_INT64_T +#define A_INT64_T long long + typedef A_INT64_T int64_t; +#endif + +/* add int8_t type */ +#define HAVE_INT8_T 1 +#ifndef HAVE_INT8_T + typedef char int8_t; +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LINUX_SOUNDCARD_H 1 + +/* Define to 1 if the type `long double' works and has more range or precision + than `double'. */ +/* #undef HAVE_LONG_DOUBLE */ + +/* Define to 1 if the type `long double' works and has more range or precision + than `double'. */ +/* #undef HAVE_LONG_DOUBLE_WIDER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* build with mpglib support */ +/* #undef HAVE_MPGLIB */ + +/* have nasm */ +/* #undef HAVE_NASM */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NCURSES_TERMCAP_H */ + +/* Define to 1 if you have the `socket' function. */ +#define HAVE_SOCKET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOUNDCARD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* have termcap */ +/* #undef HAVE_TERMCAP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_TERMCAP_H */ + +/* add uint16_t type */ +#define HAVE_UINT16_T 1 +#ifndef HAVE_UINT16_T + typedef unsigned short uint16_t; +#endif + +/* add uint32_t type */ +#define HAVE_UINT32_T 1 +#ifndef HAVE_UINT32_T +#define A_UINT32_T unsigned int + typedef A_UINT32_T uint32_t; +#endif + +/* add uint64_t type */ +#define HAVE_UINT64_T 1 +#ifndef HAVE_UINT64_T +#define A_UINT64_T unsigned long long + typedef A_UINT64_T uint64_t; +#endif + +/* add uint8_t type */ +#define HAVE_UINT8_T 1 +#ifndef HAVE_UINT8_T + typedef unsigned char uint8_t; +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_XMMINTRIN_H */ + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* requested by Frank, seems to be temporary needed for a smooth transition */ +#define LAME_LIBRARY_BUILD 1 + +/* set to 1 if you have libsndfile */ +/* #undef LIBSNDFILE */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* use MMX version of choose_table */ +/* #undef MMX_choose_table */ + +/* no debug build */ +#define NDEBUG 1 + +/* build without hooks for analyzer */ +/* #undef NOANALYSIS */ + +/* Name of package */ +#define PACKAGE "lame" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "lame-dev@lists.sf.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "lame" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "lame 3.99.5" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "lame" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "3.99.5" + +/* Define to 1 if the C compiler supports function prototypes. */ +#define PROTOTYPES 1 + +/* The size of `double', as computed by sizeof. */ +#define SIZEOF_DOUBLE 8 + +/* The size of `float', as computed by sizeof. */ +#define SIZEOF_FLOAT 4 + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long double', as computed by sizeof. */ +/* #undef SIZEOF_LONG_DOUBLE */ + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `short', as computed by sizeof. */ +#define SIZEOF_SHORT 2 + +/* The size of `unsigned int', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_INT 4 + +/* The size of `unsigned long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG 4 + +/* The size of `unsigned long long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG_LONG 8 + +/* The size of `unsigned short', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_SHORT 2 + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* IEEE754 compatible machine */ +/* #undef TAKEHIRO_IEEE754_HACK */ + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* faster log implementation with less but enough precission */ +/* #undef USE_FAST_LOG */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "3.99.5" + +/* Define if using the dmalloc debugging malloc package */ +/* #undef WITH_DMALLOC */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#define _FILE_OFFSET_BITS 64 + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* we're on DEC Alpha */ +/* #undef __DECALPHA__ */ + +/* work around a glibc bug */ +/* #undef __NO_MATH_INLINES */ + +/* Define like PROTOTYPES; this can be used by system headers. */ +#define __PROTOTYPES 1 + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +#endif /* LAME_CONFIG_H */ \ No newline at end of file diff --git a/deps/lame/config/mac/arm64/config.h b/deps/lame/config/mac/arm64/config.h new file mode 100644 index 0000000..7825675 --- /dev/null +++ b/deps/lame/config/mac/arm64/config.h @@ -0,0 +1,375 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +#ifndef LAME_CONFIG_H +#define LAME_CONFIG_H + +/* debug define */ +/* #undef ABORTFP */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* alot of debug output */ +/* #undef DEBUG */ + +/* allow to compute a more accurate replaygain value */ +/* #undef DECODE_ON_THE_FLY */ + +/* double is faster than float on Alpha */ +/* #undef FLOAT */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* we link against libefence */ +/* #undef HAVE_EFENCE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* add ieee754_float32_t type */ +/* #undef HAVE_IEEE754_FLOAT32_T */ +#ifndef HAVE_IEEE754_FLOAT32_T + typedef float ieee754_float32_t; +#endif + +/* add ieee754_float64_t type */ +/* #undef HAVE_IEEE754_FLOAT64_T */ +#ifndef HAVE_IEEE754_FLOAT64_T + typedef double ieee754_float64_t; +#endif + +/* system has 80 bit floats */ +/* #undef HAVE_IEEE854_FLOAT80 */ + +/* add ieee854_float80_t type */ +/* #undef HAVE_IEEE854_FLOAT80_T */ +#ifndef HAVE_IEEE854_FLOAT80_T + typedef long double ieee854_float80_t; +#endif + +/* add int16_t type */ +#define HAVE_INT16_T 1 +#ifndef HAVE_INT16_T + typedef short int16_t; +#endif + +/* add int32_t type */ +#define HAVE_INT32_T 1 +#ifndef HAVE_INT32_T +#define A_INT32_T int + typedef A_INT32_T int32_t; +#endif + +/* add int64_t type */ +#define HAVE_INT64_T 1 +#ifndef HAVE_INT64_T +#define A_INT64_T long long + typedef A_INT64_T int64_t; +#endif + +/* add int8_t type */ +#define HAVE_INT8_T 1 +#ifndef HAVE_INT8_T + typedef char int8_t; +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LINUX_SOUNDCARD_H 1 + +/* Define to 1 if the type `long double' works and has more range or precision + than `double'. */ +/* #undef HAVE_LONG_DOUBLE */ + +/* Define to 1 if the type `long double' works and has more range or precision + than `double'. */ +/* #undef HAVE_LONG_DOUBLE_WIDER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* build with mpglib support */ +/* #undef HAVE_MPGLIB */ + +/* have nasm */ +/* #undef HAVE_NASM */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NCURSES_TERMCAP_H */ + +/* Define to 1 if you have the `socket' function. */ +#define HAVE_SOCKET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOUNDCARD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* have termcap */ +/* #undef HAVE_TERMCAP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_TERMCAP_H */ + +/* add uint16_t type */ +#define HAVE_UINT16_T 1 +#ifndef HAVE_UINT16_T + typedef unsigned short uint16_t; +#endif + +/* add uint32_t type */ +#define HAVE_UINT32_T 1 +#ifndef HAVE_UINT32_T +#define A_UINT32_T unsigned int + typedef A_UINT32_T uint32_t; +#endif + +/* add uint64_t type */ +#define HAVE_UINT64_T 1 +#ifndef HAVE_UINT64_T +#define A_UINT64_T unsigned long long + typedef A_UINT64_T uint64_t; +#endif + +/* add uint8_t type */ +#define HAVE_UINT8_T 1 +#ifndef HAVE_UINT8_T + typedef unsigned char uint8_t; +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_XMMINTRIN_H */ + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* requested by Frank, seems to be temporary needed for a smooth transition */ +#define LAME_LIBRARY_BUILD 1 + +/* set to 1 if you have libsndfile */ +/* #undef LIBSNDFILE */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* use MMX version of choose_table */ +/* #undef MMX_choose_table */ + +/* no debug build */ +#define NDEBUG 1 + +/* build without hooks for analyzer */ +/* #undef NOANALYSIS */ + +/* Name of package */ +#define PACKAGE "lame" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "lame-dev@lists.sf.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "lame" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "lame 3.99.5" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "lame" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "3.99.5" + +/* Define to 1 if the C compiler supports function prototypes. */ +#define PROTOTYPES 1 + +/* The size of `double', as computed by sizeof. */ +#define SIZEOF_DOUBLE 8 + +/* The size of `float', as computed by sizeof. */ +#define SIZEOF_FLOAT 4 + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long double', as computed by sizeof. */ +/* #undef SIZEOF_LONG_DOUBLE */ + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `short', as computed by sizeof. */ +#define SIZEOF_SHORT 2 + +/* The size of `unsigned int', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_INT 4 + +/* The size of `unsigned long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG 4 + +/* The size of `unsigned long long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG_LONG 8 + +/* The size of `unsigned short', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_SHORT 2 + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* IEEE754 compatible machine */ +/* #undef TAKEHIRO_IEEE754_HACK */ + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* faster log implementation with less but enough precission */ +/* #undef USE_FAST_LOG */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "3.99.5" + +/* Define if using the dmalloc debugging malloc package */ +/* #undef WITH_DMALLOC */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#define _FILE_OFFSET_BITS 64 + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* we're on DEC Alpha */ +/* #undef __DECALPHA__ */ + +/* work around a glibc bug */ +/* #undef __NO_MATH_INLINES */ + +/* Define like PROTOTYPES; this can be used by system headers. */ +#define __PROTOTYPES 1 + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +#endif /* LAME_CONFIG_H */ \ No newline at end of file diff --git a/deps/mpg123/AUTHORS b/deps/mpg123/AUTHORS index 4e495b7..c1eac97 100644 --- a/deps/mpg123/AUTHORS +++ b/deps/mpg123/AUTHORS @@ -3,22 +3,47 @@ There are names and email addresses listed. Please use these addresses only to c You are explicitly not allowed to send them unwanted business offers or to question the quality of their sex life. -------------------- +Being on the list of contributing authors not necessarily means that there +is significant copyright in parts of the source code. There are obviously +contributions of differing complexity. I try to mention people who motivated +changes at least by suggesting some definite code changes, even if their +code did not enter the mpg123 source verbatim. Trivial changes like pointing +out ovbious syntax errors that make compilers cry do not land here. + +-------------------- + Current maintainers with various sorts of contributions: Thomas Orgis Patrick Dehne Jonathan Yong <10walls@gmail.com> + Taihei Momma Co-initiator of the revived mpg123 project, but not that involved anymore: Nicholas J Humfrey +Special thanks go to Taihei, the person who keeps the assembly optimisations alive +and takes care of portability to OSX/iOS platforms. + Generic address pointing to the current maintainer (hopefully still works in future in case maintainership will change again): The creator: Michael Hipp (email: hippm@informatik.uni-tuebingen.de - please bother maintainers first) Contributions/ideas Thomas Orgis era (includes backports from mhipp trunk): +Won-Kyu Park : patch to get rid of asm textrels (x86 PIC) +Michael Weiser : update of coreaudio output to AudioComponents API +Bent Bisballe Nyeng : patch for MPG123_NO_PEEK_END and MPG123_FORCE_SEEKABLE +Eric S. Raymond : man page fixes +Tobias Weber : patch for --disable-equalizer +Hans de Goede : patch to skip APE tags +Stephan Vedder : MSVC++ 2013 port update +Rajeev V. Pillai : pointing out/patching issues in HTTP code and behaviour of mpg123 remote/terminal control +Jarno Lehtinen : tinyalsa output +Anthony Wells : initial version of ID3v2 APIC patch +David Wohlferd : Win32 WaveOut buffer destructor fix. +Mike Gorchak : QNX native audio output (QSA) Dan McGee : various patches (also for test suite) -Jonathan Yong (jon_y) <10walls@gmail.com>: win32 hacking +Jonathan Yong (jon_y) <10walls@gmail.com>: win32 hacking, win32 wasapi audio. Malcolm Boczek : Common language runtime wrapper Elbert Pol (TeLLie) : OS/2 port fixup Jeroen Valkonet : motivate pitch control, suggestive patch for pitch command in generic control interface diff --git a/deps/mpg123/COPYING b/deps/mpg123/COPYING index cf361b2..d7bb85f 100644 --- a/deps/mpg123/COPYING +++ b/deps/mpg123/COPYING @@ -1,25 +1,24 @@ This is the file that contains the terms of use, copying, etc. for the mpg123 distribution package. -Main message: +Main message, to include in "About ..." boxes, etc: - Code is copyrighted by Michael Hipp, who made it free software under the terms of the LGPL 2.1. + Copyright (c) 1995-2013 by Michael Hipp and others, + free software under the terms of the LGPL v2.1 -But that is not all of it. -mpg123 is licensed under the GNU General Lesser Public License, version 2.1, and in parts under the GNU General Public License, version 2. -That means that _all_ of mpg123 is licensed under GPL and the major part also under the LGPL. +There is an attempt to cover the actual list of authors in the AUTHORS file. +Project maintainer since 2006 is Thomas Orgis and many people have contributed +since the Michael Hipp era, but he stays the initial source and it would +be impractical to count them all individually, so it's "and others". +Source files contain the phrase "the mpg123 project" to the same effect +in their license boilerplate; especially those that were added after +maintainership changed. The person mainly responsible for the first version +is usually named in the phrase "initially written by ...". -Actually, the "major part" currently is the whole distributed package of mpg123. There are some files (old alsa output, libao output) that you get from our svn repository and that do not fall under LGPL. - -When the copyright marker in a source file says "the mpg123 project" that means that the file contains code copyrighted by contributors to mpg123, the "initially written by" naming the person(s) that created the file and thus may have the largest part of copyrights on it. -I am explaining this here to emphasize that the copyright always actually lies by the individual member (i.e. contributor to) of the mpg123 project who wrote a specific section of code. -Usage of a source code management system like Subversion should provide keeping track of individual copyright traces... - -Please consider that any code that is contributed to the mpg123 project shall be licensed under LGPL 2.1 . -If you want to contribute, but don't agree to that (i.e. you want to have your code GPL only) please say so - then, we either you convince is to include your code under GPL, we convince you to make it LGPL instead or, as a last resort, you'll have to do you own GPLed fork. -But we should try to avoid the last option... - -All files in the distribution that don't carry a license note on their own are licensed under the terms of the LGPL 2.1; all files that do carry either a LGPL or GPL note are licensed respectively under the LGPL or GPL as follows: +All files in the distribution that don't carry a license note on their own are +licensed under the terms of the LGPL 2.1; exceptions may apply, especially to +files not in the official distribution but in the revision control repository. +The formal license text follows. ======================= 1. The LGPL version 2.1 diff --git a/deps/mpg123/INSTALL b/deps/mpg123/INSTALL index c618eff..5585d0f 100644 --- a/deps/mpg123/INSTALL +++ b/deps/mpg123/INSTALL @@ -21,8 +21,6 @@ You want: - working assembler (recent GNU binutils) if using certain CPU optimizations - headers and lib for certain audio output drivers (libasound for alsa, sdl for sdl...) -- libtool's libltdl for runtime output modules (this used to be included, but now we rely on an existing install) - 1. Build @@ -109,3 +107,9 @@ The libmpg123 API includes the generic off_t type for file offsets and thus is s To deal with the incompatibilities that can cause, the library needs to separate code paths for small and large off_t. Since version 1.12.0, a large-file-enabled libmpg123 (the default set by configure) provides a dual-mode ABI. Depending on _FILE_OFFSET_BITS, the mpg123.h header file selects different library symbols to use for your app. In both large-file and normal mode, the library should just work for your app. + +6. Security + +If you consider installing the mpg123 binary or any program using libout123 as suid root, please don't. Apart from evaluating MPG123_MODDIR from the environment and thus possibly loading any code, the purpose of libout123 is to write audio data to somewhere. That includes writing raw data to files. Any files you specify to the program. You do not install dd or gzip suid root, do you? + +Programs using libmpg123 should be fine, as that one does not load runtime modules and also only has code to read files, not write them. Still, if your task involves decoding random MPEG audio files from anywhere, it is only sensible to limit the damage of a possible bug triggered by certain crafted files. This is not specific to libmpg123 but generally a good idea working with data from untrusted sources. diff --git a/deps/mpg123/Makefile.am b/deps/mpg123/Makefile.am index a837ffa..c6d51ba 100644 --- a/deps/mpg123/Makefile.am +++ b/deps/mpg123/Makefile.am @@ -3,97 +3,132 @@ ## copyright by the mpg123 project - free software under the terms of the LGPL 2.1 ## see COPYING and AUTHORS files in distribution or http://mpg123.org ## initially written by Nicholas J. Humfrey -dist_man_MANS = man1/mpg123.1 +## reworked for non-recursive make by Thomas Orgis -SUBDIRS = src doc -DIST_SUBDIRS = src doc +# Mention all global variables first before including Make modules. ACLOCAL_AMFLAGS = -I m4 +bin_PROGRAMS = +EXTRA_PROGRAMS = +EXTRA_DIST = +pkglib_LTLIBRARIES = +lib_LTLIBRARIES = +noinst_LIBRARIES = +noinst_LTLIBRARIES = +nodist_include_HEADERS = +include_HEADERS = +dist_man_MANS = +CLEANFILES = + +AM_CPPFLAGS = -DPKGLIBDIR="\"$(pkglibdir)\"" +# That can be trimmed down later when adapting the sources to +# use relative paths for includes. +# Watch out for generated headers (that's why top_builddir is also present). +AM_CPPFLAGS += \ + $(LTDLINCL) \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/compat \ + -I$(top_srcdir)/src/libmpg123 \ + -I$(top_srcdir)/src/libout123 \ + -I$(top_builddir)/src/libmpg123 \ + -I$(top_builddir)/src/libout123 -# pkg-config file for the mpg123 library pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libmpg123.pc +pkgconfig_DATA = -# mpg123.spec is autogenerated but needs to be present in tarball! -EXTRA_DIST = \ - mpg123.spec \ - makedll.sh \ - windows-builds.sh \ - equalize.dat \ - NEWS.libmpg123 \ - ports/MSVC++/mpg123.h \ - ports/MSVC++/config.h \ - ports/MSVC++/msvc.c \ - ports/MSVC++/examples/scan.c \ - ports/MSVC++/examples/feedseek.c \ - ports/MSVC++/2005/libmpg123/libmpg123.vcproj \ - ports/MSVC++/2008/mpg123.sln \ - ports/MSVC++/2008/feedseek/feedseek.vcproj \ - ports/MSVC++/2008/mpglib/mpglib.vcproj \ - ports/MSVC++/2008/libmpg123/libmpg123.vcproj \ - ports/MSVC++/2008/scan/scan.vcproj \ - ports/MSVC++/2008/dump_seekindex/dump_seekindex.vcproj \ - ports/MSVC++/2008clr/2008clr.sln \ - ports/MSVC++/2008clr/mpg123clr/advanced.cpp \ - ports/MSVC++/2008clr/mpg123clr/advanced.h \ - ports/MSVC++/2008clr/mpg123clr/AssemblyInfo.cpp \ - ports/MSVC++/2008clr/mpg123clr/dllmain.cpp \ - ports/MSVC++/2008clr/mpg123clr/enum.h \ - ports/MSVC++/2008clr/mpg123clr/error.cpp \ - ports/MSVC++/2008clr/mpg123clr/error.h \ - ports/MSVC++/2008clr/mpg123clr/id3v1.cpp \ - ports/MSVC++/2008clr/mpg123clr/id3v1.h \ - ports/MSVC++/2008clr/mpg123clr/id3v2.cpp \ - ports/MSVC++/2008clr/mpg123clr/id3v2.h \ - ports/MSVC++/2008clr/mpg123clr/mpg123clr.cpp \ - ports/MSVC++/2008clr/mpg123clr/mpg123clr.h \ - ports/MSVC++/2008clr/mpg123clr/mpg123clr.rc \ - ports/MSVC++/2008clr/mpg123clr/mpg123clr.vcproj \ - ports/MSVC++/2008clr/mpg123clr/ReadMe.txt \ - ports/MSVC++/2008clr/mpg123clr/resource.h \ - ports/MSVC++/2008clr/mpg123clr/stdafx.cpp \ - ports/MSVC++/2008clr/mpg123clr/stdafx.h \ - ports/MSVC++/2008clr/mpg123clr/string.cpp \ - ports/MSVC++/2008clr/mpg123clr/string.h \ - ports/MSVC++/2008clr/mpg123clr/targetver.h \ - ports/MSVC++/2008clr/mpg123clr/text.cpp \ - ports/MSVC++/2008clr/mpg123clr/text.h \ - ports/MSVC++/2008clr/examples/feedseekclr/feedseekclr.csproj \ - ports/MSVC++/2008clr/examples/feedseekclr/Program.cs \ - ports/MSVC++/2008clr/examples/feedseekclr/Properties/AssemblyInfo.cs \ - ports/MSVC++/2008clr/examples/ReplaceReaderclr/ReplaceReaderclr.csproj \ - ports/MSVC++/2008clr/examples/ReplaceReaderclr/Program.cs \ - ports/MSVC++/2008clr/examples/ReplaceReaderclr/Properties/AssemblyInfo.cs \ - ports/MSVC++/2008clr/examples/scanclr/scanclr.csproj \ - ports/MSVC++/2008clr/examples/scanclr/Program.cs \ - ports/MSVC++/2008clr/examples/scanclr/Properties/AssemblyInfo.cs \ - ports/MSVC++/2010/mpg123.sln \ - ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj \ - ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj.filters \ - ports/MSVC++/2010/feedseek/feedseek.vcxproj \ - ports/MSVC++/2010/feedseek/feedseek.vcxproj.filters \ - ports/MSVC++/2010/libmpg123/libmpg123.vcxproj \ - ports/MSVC++/2010/scan/scan.vcxproj \ - ports/MSVC++/2010/scan/scan.vcxproj.filters \ - ports/MSVC++/CMP3Stream/libMPG123/libMPG123.vcproj \ - ports/MSVC++/CMP3Stream/libMPG123/PLACE_LIBMPG123_SOURCES_HERE \ - ports/MSVC++/CMP3Stream/README \ - ports/MSVC++/CMP3Stream/SOURCE/CORE_Log.CPP \ - ports/MSVC++/CMP3Stream/SOURCE/CORE_FileIn.CPP \ - ports/MSVC++/CMP3Stream/SOURCE/SourceFilter_MP3Stream.CPP \ - ports/MSVC++/CMP3Stream/SOURCE/CORE_Mutex.CPP \ - ports/MSVC++/CMP3Stream/INCLUDE/CORE/CORE_FileIn.H \ - ports/MSVC++/CMP3Stream/INCLUDE/CORE/SourceFilter_MP3.H \ - ports/MSVC++/CMP3Stream/INCLUDE/IIEP_FileIn.H \ - ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H \ - ports/README \ - ports/Sony_PSP/config.h \ - ports/Sony_PSP/README \ - ports/Sony_PSP/Makefile.psp \ - ports/Sony_PSP/readers.c.patch \ - ports/mpg123_.pas \ - ports/Xcode/config.h \ - ports/Xcode/mpg123.h \ - ports/Xcode/mpg123.xcodeproj/project.pbxproj \ - scripts/benchmark-cpu.pl \ - scripts/tag_lyrics.py +# Include Make modules from subdirectories. +include src/Makemodule.am +include doc/Makemodule.am + +# Stuff from this directory. +pkgconfig_DATA += libmpg123.pc libout123.pc +dist_man_MANS += man1/mpg123.1 man1/out123.1 + +# mpg123.spec is autogenerated but needs to be present in tarball! +EXTRA_DIST += \ + mpg123.spec \ + makedll.sh \ + windows-builds.sh \ + equalize.dat \ + NEWS.libmpg123 \ + NEWS.libout123 \ + ports/MSVC++/mpg123.h \ + ports/MSVC++/config.h \ + ports/MSVC++/msvc.c \ + ports/MSVC++/examples/scan.c \ + ports/MSVC++/examples/feedseek.c \ + ports/MSVC++/2008clr/2008clr.sln \ + ports/MSVC++/2008clr/mpg123clr/advanced.cpp \ + ports/MSVC++/2008clr/mpg123clr/advanced.h \ + ports/MSVC++/2008clr/mpg123clr/AssemblyInfo.cpp \ + ports/MSVC++/2008clr/mpg123clr/dllmain.cpp \ + ports/MSVC++/2008clr/mpg123clr/enum.h \ + ports/MSVC++/2008clr/mpg123clr/error.cpp \ + ports/MSVC++/2008clr/mpg123clr/error.h \ + ports/MSVC++/2008clr/mpg123clr/id3v1.cpp \ + ports/MSVC++/2008clr/mpg123clr/id3v1.h \ + ports/MSVC++/2008clr/mpg123clr/id3v2.cpp \ + ports/MSVC++/2008clr/mpg123clr/id3v2.h \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.cpp \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.h \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.rc \ + ports/MSVC++/2008clr/mpg123clr/mpg123clr.vcproj \ + ports/MSVC++/2008clr/mpg123clr/ReadMe.txt \ + ports/MSVC++/2008clr/mpg123clr/resource.h \ + ports/MSVC++/2008clr/mpg123clr/stdafx.cpp \ + ports/MSVC++/2008clr/mpg123clr/stdafx.h \ + ports/MSVC++/2008clr/mpg123clr/string.cpp \ + ports/MSVC++/2008clr/mpg123clr/string.h \ + ports/MSVC++/2008clr/mpg123clr/targetver.h \ + ports/MSVC++/2008clr/mpg123clr/text.cpp \ + ports/MSVC++/2008clr/mpg123clr/text.h \ + ports/MSVC++/2008clr/examples/feedseekclr/feedseekclr.csproj \ + ports/MSVC++/2008clr/examples/feedseekclr/Program.cs \ + ports/MSVC++/2008clr/examples/feedseekclr/Properties/AssemblyInfo.cs \ + ports/MSVC++/2008clr/examples/ReplaceReaderclr/ReplaceReaderclr.csproj \ + ports/MSVC++/2008clr/examples/ReplaceReaderclr/Program.cs \ + ports/MSVC++/2008clr/examples/ReplaceReaderclr/Properties/AssemblyInfo.cs \ + ports/MSVC++/2008clr/examples/scanclr/scanclr.csproj \ + ports/MSVC++/2008clr/examples/scanclr/Program.cs \ + ports/MSVC++/2008clr/examples/scanclr/Properties/AssemblyInfo.cs \ + ports/MSVC++/2015/win32/feedseek \ + ports/MSVC++/2015/win32/feedseek/feedseek.vcxproj.filters \ + ports/MSVC++/2015/win32/feedseek/feedseek.vcxproj \ + ports/MSVC++/2015/win32/libmpg123 \ + ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj \ + ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj.filters \ + ports/MSVC++/2015/win32/mpg123.sln \ + ports/MSVC++/2015/win32/dump_seekindex \ + ports/MSVC++/2015/win32/dump_seekindex/dump_seekindex.vcxproj \ + ports/MSVC++/2015/win32/dump_seekindex/dump_seekindex.vcxproj.filters \ + ports/MSVC++/2015/win32/scan \ + ports/MSVC++/2015/win32/scan/scan.vcxproj.filters \ + ports/MSVC++/2015/win32/scan/scan.vcxproj \ + ports/MSVC++/2015/uwp/libmpg123 \ + ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj \ + ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj.filters \ + ports/MSVC++/2015/uwp/libmpg123.sln \ + ports/MSVC++/CMP3Stream/libMPG123/libMPG123.vcproj \ + ports/MSVC++/CMP3Stream/libMPG123/PLACE_LIBMPG123_SOURCES_HERE \ + ports/MSVC++/CMP3Stream/README \ + ports/MSVC++/CMP3Stream/SOURCE/CORE_Log.CPP \ + ports/MSVC++/CMP3Stream/SOURCE/CORE_FileIn.CPP \ + ports/MSVC++/CMP3Stream/SOURCE/SourceFilter_MP3Stream.CPP \ + ports/MSVC++/CMP3Stream/SOURCE/CORE_Mutex.CPP \ + ports/MSVC++/CMP3Stream/INCLUDE/CORE/CORE_FileIn.H \ + ports/MSVC++/CMP3Stream/INCLUDE/CORE/SourceFilter_MP3.H \ + ports/MSVC++/CMP3Stream/INCLUDE/IIEP_FileIn.H \ + ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H \ + ports/README \ + ports/Sony_PSP/config.h \ + ports/Sony_PSP/README \ + ports/Sony_PSP/Makefile.psp \ + ports/Sony_PSP/readers.c.patch \ + ports/mpg123_.pas \ + ports/Xcode/config.h \ + ports/Xcode/mpg123.h \ + ports/Xcode/mpg123.xcodeproj/project.pbxproj \ + scripts/benchmark-cpu.pl \ + scripts/tag_lyrics.py \ + scripts/conplay \ + scripts/mpg123info diff --git a/deps/mpg123/Makefile.in b/deps/mpg123/Makefile.in index 83b9797..b435730 100644 --- a/deps/mpg123/Makefile.in +++ b/deps/mpg123/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,24 +14,84 @@ @SET_MAKE@ +# Module for non-recursive mpg123 build system. + +# Module for non-recursive mpg123 build system. + +# Module for non-recursive mpg123 build system. + +# Module for non-recursive mpg123 build system. +# Gah! Not even re-defining that variable is allowed in automake! +# I WANT TO USE PROPER MAKE! +# makedir := src/libout123/modules +# Experiment: Does automake pick that up in a Make variable? +# Damn, no! It complains wildly. +# I just want to use GNU Make and be done with it! +# Perhaps the next build system rewrite ... +#makenam=src_libout123_modules + +# Module for non-recursive mpg123 build system. + + + + + VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -50,16 +110,104 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +bin_PROGRAMS = src/mpg123$(EXEEXT) src/out123$(EXEEXT) \ + src/mpg123-id3dump$(EXEEXT) src/mpg123-strip$(EXEEXT) +EXTRA_PROGRAMS = src/libmpg123/testcpu$(EXEEXT) \ + src/tests/seek_whence$(EXEEXT) src/tests/noise$(EXEEXT) \ + src/tests/text$(EXEEXT) src/tests/plain_id3$(EXEEXT) + +# Optionally containing the one static module to use. +@HAVE_MODULES_FALSE@am__append_1 = src/libout123/modules/libdefaultmodule.la + +# These are not tested and _very_ likely need work: aix alib hp os2 sgi mint + +# Use that sh/perl script to generate the module entries: +# Confused as to when to use _LIBADD and when _LDADD. +# _LDADD gives errors from autotools. +#echo \ +#dummy tinyalsa alsa qsa coreaudio esd jack nas oss portaudio \ +#pulse sdl sndio sun win32 win32_wasapi aix alib arts hp os2 \ +#sgi mint openal \ +#| tr ' ' '\n' | +#perl -ne 'chomp; $big = uc($_); print </dev/null 2>&1;; \ - esac +LIBRARIES = $(noinst_LIBRARIES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -114,19 +252,671 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglibdir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \ + "$(DESTDIR)$(includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) \ + $(pkglib_LTLIBRARIES) +src_compat_libcompat_la_LIBADD = +am__dirstamp = $(am__leading_dot)dirstamp +am_src_compat_libcompat_la_OBJECTS = src/compat/compat_str.lo \ + src/compat/compat.lo +src_compat_libcompat_la_OBJECTS = \ + $(am_src_compat_libcompat_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +src_compat_libcompat_str_la_LIBADD = +am_src_compat_libcompat_str_la_OBJECTS = src/compat/compat_str.lo +src_compat_libcompat_str_la_OBJECTS = \ + $(am_src_compat_libcompat_str_la_OBJECTS) +am_src_libmpg123_libmpg123_la_OBJECTS = src/libmpg123/parse.lo \ + src/libmpg123/frame.lo src/libmpg123/format.lo \ + src/libmpg123/dct64.lo src/libmpg123/equalizer.lo \ + src/libmpg123/id3.lo src/libmpg123/optimize.lo \ + src/libmpg123/readers.lo src/libmpg123/tabinit.lo \ + src/libmpg123/libmpg123.lo src/libmpg123/index.lo +src_libmpg123_libmpg123_la_OBJECTS = \ + $(am_src_libmpg123_libmpg123_la_OBJECTS) +src_libmpg123_libmpg123_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(src_libmpg123_libmpg123_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +src_libout123_libmodule_la_LIBADD = +am__src_libout123_libmodule_la_SOURCES_DIST = src/libout123/module.h \ + src/libout123/module.c src/libout123/legacy_module.c +@HAVE_MODULES_TRUE@am__objects_1 = src/libout123/module.lo +@HAVE_MODULES_FALSE@am__objects_2 = src/libout123/legacy_module.lo +am_src_libout123_libmodule_la_OBJECTS = $(am__objects_1) \ + $(am__objects_2) +src_libout123_libmodule_la_OBJECTS = \ + $(am_src_libout123_libmodule_la_OBJECTS) +src_libout123_libout123_la_DEPENDENCIES = src/libout123/libmodule.la \ + src/compat/libcompat.la $(am__append_27) +am__src_libout123_libout123_la_SOURCES_DIST = \ + src/libout123/libout123.c src/libout123/stringlists.h \ + src/libout123/stringlists.c src/libout123/out123_int.h \ + src/libout123/wav.c src/libout123/wav.h \ + src/libout123/wavhead.h src/libout123/buffer.c \ + src/libout123/buffer.h src/libout123/xfermem.c \ + src/libout123/xfermem.h +@BUILD_BUFFER_TRUE@am__objects_3 = src/libout123/buffer.lo \ +@BUILD_BUFFER_TRUE@ src/libout123/xfermem.lo +am_src_libout123_libout123_la_OBJECTS = src/libout123/libout123.lo \ + src/libout123/stringlists.lo src/libout123/wav.lo \ + $(am__objects_3) +src_libout123_libout123_la_OBJECTS = \ + $(am_src_libout123_libout123_la_OBJECTS) +src_libout123_libout123_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(src_libout123_libout123_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +src_libout123_modules_libdefaultmodule_la_DEPENDENCIES = +am__src_libout123_modules_libdefaultmodule_la_SOURCES_DIST = \ + src/libout123/modules/aix.c src/libout123/modules/alib.c \ + src/libout123/modules/alsa.c src/libout123/modules/arts.c \ + src/libout123/modules/coreaudio.c \ + src/libout123/modules/dummy.c src/libout123/modules/esd.c \ + src/libout123/modules/hp.c src/libout123/modules/jack.c \ + src/libout123/modules/mint.c src/libout123/modules/nas.c \ + src/libout123/modules/openal.c src/libout123/modules/os2.c \ + src/libout123/modules/oss.c src/libout123/modules/portaudio.c \ + src/libout123/modules/pulse.c src/libout123/modules/qsa.c \ + src/libout123/modules/sdl.c src/libout123/modules/sgi.c \ + src/libout123/modules/sndio.c src/libout123/modules/sun.c \ + src/libout123/modules/tinyalsa.c src/libout123/modules/win32.c \ + src/libout123/modules/win32_wasapi.c +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_FALSE@@BUILD_OSS_FALSE@@BUILD_PORTAUDIO_FALSE@@BUILD_PULSE_FALSE@@BUILD_QSA_FALSE@@BUILD_SDL_FALSE@@BUILD_SGI_FALSE@@BUILD_SNDIO_FALSE@@BUILD_SUN_FALSE@@BUILD_TINYALSA_FALSE@@BUILD_WIN32_FALSE@@BUILD_WIN32_WASAPI_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32_wasapi.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_FALSE@@BUILD_OSS_FALSE@@BUILD_PORTAUDIO_FALSE@@BUILD_PULSE_FALSE@@BUILD_QSA_FALSE@@BUILD_SDL_FALSE@@BUILD_SGI_FALSE@@BUILD_SNDIO_FALSE@@BUILD_SUN_FALSE@@BUILD_TINYALSA_FALSE@@BUILD_WIN32_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_FALSE@@BUILD_OSS_FALSE@@BUILD_PORTAUDIO_FALSE@@BUILD_PULSE_FALSE@@BUILD_QSA_FALSE@@BUILD_SDL_FALSE@@BUILD_SGI_FALSE@@BUILD_SNDIO_FALSE@@BUILD_SUN_FALSE@@BUILD_TINYALSA_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-tinyalsa.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_FALSE@@BUILD_OSS_FALSE@@BUILD_PORTAUDIO_FALSE@@BUILD_PULSE_FALSE@@BUILD_QSA_FALSE@@BUILD_SDL_FALSE@@BUILD_SGI_FALSE@@BUILD_SNDIO_FALSE@@BUILD_SUN_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sun.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_FALSE@@BUILD_OSS_FALSE@@BUILD_PORTAUDIO_FALSE@@BUILD_PULSE_FALSE@@BUILD_QSA_FALSE@@BUILD_SDL_FALSE@@BUILD_SGI_FALSE@@BUILD_SNDIO_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sndio.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_FALSE@@BUILD_OSS_FALSE@@BUILD_PORTAUDIO_FALSE@@BUILD_PULSE_FALSE@@BUILD_QSA_FALSE@@BUILD_SDL_FALSE@@BUILD_SGI_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sgi.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_FALSE@@BUILD_OSS_FALSE@@BUILD_PORTAUDIO_FALSE@@BUILD_PULSE_FALSE@@BUILD_QSA_FALSE@@BUILD_SDL_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sdl.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_FALSE@@BUILD_OSS_FALSE@@BUILD_PORTAUDIO_FALSE@@BUILD_PULSE_FALSE@@BUILD_QSA_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-qsa.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_FALSE@@BUILD_OSS_FALSE@@BUILD_PORTAUDIO_FALSE@@BUILD_PULSE_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-pulse.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_FALSE@@BUILD_OSS_FALSE@@BUILD_PORTAUDIO_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-portaudio.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_FALSE@@BUILD_OSS_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-oss.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_FALSE@@BUILD_OS2_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-os2.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_FALSE@@BUILD_OPENAL_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-openal.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_FALSE@@BUILD_NAS_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-nas.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_FALSE@@BUILD_MINT_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-mint.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_FALSE@@BUILD_JACK_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-jack.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_FALSE@@BUILD_HP_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-hp.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_FALSE@@BUILD_ESD_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-esd.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_FALSE@@BUILD_DUMMY_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-dummy.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_FALSE@@BUILD_COREAUDIO_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-coreaudio.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_FALSE@@BUILD_ARTS_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-arts.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_FALSE@@BUILD_ALSA_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alsa.lo +@BUILD_AIX_FALSE@@BUILD_ALIB_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alib.lo +@BUILD_AIX_TRUE@@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_OBJECTS = src/libout123/modules/src_libout123_modules_libdefaultmodule_la-aix.lo +src_libout123_modules_libdefaultmodule_la_OBJECTS = \ + $(am_src_libout123_modules_libdefaultmodule_la_OBJECTS) +src_libout123_modules_libdefaultmodule_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_libdefaultmodule_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_FALSE@am_src_libout123_modules_libdefaultmodule_la_rpath = +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_aix_la_DEPENDENCIES = \ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la +am__src_libout123_modules_output_aix_la_SOURCES_DIST = \ + src/libout123/modules/aix.c +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_aix_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_aix_la-aix.lo +src_libout123_modules_output_aix_la_OBJECTS = \ + $(am_src_libout123_modules_output_aix_la_OBJECTS) +src_libout123_modules_output_aix_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_aix_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_aix_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_aix_la_rpath = \ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@ -rpath $(pkglibdir) +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_alib_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_alib_la_SOURCES_DIST = \ + src/libout123/modules/alib.c +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_alib_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_alib_la-alib.lo +src_libout123_modules_output_alib_la_OBJECTS = \ + $(am_src_libout123_modules_output_alib_la_OBJECTS) +src_libout123_modules_output_alib_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_alib_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_alib_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_alib_la_rpath = \ +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@ -rpath $(pkglibdir) +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_alsa_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_alsa_la_SOURCES_DIST = \ + src/libout123/modules/alsa.c +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_alsa_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_alsa_la-alsa.lo +src_libout123_modules_output_alsa_la_OBJECTS = \ + $(am_src_libout123_modules_output_alsa_la_OBJECTS) +src_libout123_modules_output_alsa_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_alsa_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_alsa_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_alsa_la_rpath = \ +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@ -rpath $(pkglibdir) +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_arts_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_arts_la_SOURCES_DIST = \ + src/libout123/modules/arts.c +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_arts_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_arts_la-arts.lo +src_libout123_modules_output_arts_la_OBJECTS = \ + $(am_src_libout123_modules_output_arts_la_OBJECTS) +src_libout123_modules_output_arts_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_arts_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_arts_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_arts_la_rpath = \ +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@ -rpath $(pkglibdir) +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_coreaudio_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_coreaudio_la_SOURCES_DIST = \ + src/libout123/modules/coreaudio.c +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_coreaudio_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_coreaudio_la-coreaudio.lo +src_libout123_modules_output_coreaudio_la_OBJECTS = \ + $(am_src_libout123_modules_output_coreaudio_la_OBJECTS) +src_libout123_modules_output_coreaudio_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_coreaudio_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_coreaudio_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_coreaudio_la_rpath = \ +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@ -rpath $(pkglibdir) +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_dummy_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_dummy_la_SOURCES_DIST = \ + src/libout123/modules/dummy.c +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_dummy_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_dummy_la-dummy.lo +src_libout123_modules_output_dummy_la_OBJECTS = \ + $(am_src_libout123_modules_output_dummy_la_OBJECTS) +src_libout123_modules_output_dummy_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_dummy_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_dummy_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_dummy_la_rpath = \ +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@ -rpath $(pkglibdir) +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_esd_la_DEPENDENCIES = \ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la +am__src_libout123_modules_output_esd_la_SOURCES_DIST = \ + src/libout123/modules/esd.c +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_esd_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_esd_la-esd.lo +src_libout123_modules_output_esd_la_OBJECTS = \ + $(am_src_libout123_modules_output_esd_la_OBJECTS) +src_libout123_modules_output_esd_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_esd_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_esd_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_esd_la_rpath = \ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@ -rpath $(pkglibdir) +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_hp_la_DEPENDENCIES = \ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la +am__src_libout123_modules_output_hp_la_SOURCES_DIST = \ + src/libout123/modules/hp.c +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_hp_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_hp_la-hp.lo +src_libout123_modules_output_hp_la_OBJECTS = \ + $(am_src_libout123_modules_output_hp_la_OBJECTS) +src_libout123_modules_output_hp_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_hp_la_CFLAGS) $(CFLAGS) \ + $(src_libout123_modules_output_hp_la_LDFLAGS) $(LDFLAGS) -o $@ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_hp_la_rpath = \ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@ -rpath $(pkglibdir) +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_jack_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_jack_la_SOURCES_DIST = \ + src/libout123/modules/jack.c +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_jack_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_jack_la-jack.lo +src_libout123_modules_output_jack_la_OBJECTS = \ + $(am_src_libout123_modules_output_jack_la_OBJECTS) +src_libout123_modules_output_jack_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_jack_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_jack_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_jack_la_rpath = \ +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@ -rpath $(pkglibdir) +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_mint_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_mint_la_SOURCES_DIST = \ + src/libout123/modules/mint.c +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_mint_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_mint_la-mint.lo +src_libout123_modules_output_mint_la_OBJECTS = \ + $(am_src_libout123_modules_output_mint_la_OBJECTS) +src_libout123_modules_output_mint_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_mint_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_mint_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@am_src_libout123_modules_output_mint_la_rpath = \ +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@src_libout123_modules_output_nas_la_DEPENDENCIES = \ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@ src/compat/libcompat_str.la +am__src_libout123_modules_output_nas_la_SOURCES_DIST = \ + src/libout123/modules/nas.c +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@am_src_libout123_modules_output_nas_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_nas_la-nas.lo +src_libout123_modules_output_nas_la_OBJECTS = \ + $(am_src_libout123_modules_output_nas_la_OBJECTS) +src_libout123_modules_output_nas_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_nas_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_nas_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@am_src_libout123_modules_output_nas_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@src_libout123_modules_output_openal_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_openal_la_SOURCES_DIST = \ + src/libout123/modules/openal.c +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@am_src_libout123_modules_output_openal_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_openal_la-openal.lo +src_libout123_modules_output_openal_la_OBJECTS = \ + $(am_src_libout123_modules_output_openal_la_OBJECTS) +src_libout123_modules_output_openal_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_openal_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_openal_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@am_src_libout123_modules_output_openal_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@src_libout123_modules_output_os2_la_DEPENDENCIES = \ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@ src/compat/libcompat_str.la +am__src_libout123_modules_output_os2_la_SOURCES_DIST = \ + src/libout123/modules/os2.c +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@am_src_libout123_modules_output_os2_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_os2_la-os2.lo +src_libout123_modules_output_os2_la_OBJECTS = \ + $(am_src_libout123_modules_output_os2_la_OBJECTS) +src_libout123_modules_output_os2_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_os2_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_os2_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@am_src_libout123_modules_output_os2_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@src_libout123_modules_output_oss_la_DEPENDENCIES = \ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@ src/compat/libcompat_str.la +am__src_libout123_modules_output_oss_la_SOURCES_DIST = \ + src/libout123/modules/oss.c +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@am_src_libout123_modules_output_oss_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_oss_la-oss.lo +src_libout123_modules_output_oss_la_OBJECTS = \ + $(am_src_libout123_modules_output_oss_la_OBJECTS) +src_libout123_modules_output_oss_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_oss_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_oss_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@am_src_libout123_modules_output_oss_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@src_libout123_modules_output_portaudio_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_portaudio_la_SOURCES_DIST = \ + src/libout123/modules/portaudio.c +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@am_src_libout123_modules_output_portaudio_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_portaudio_la-portaudio.lo +src_libout123_modules_output_portaudio_la_OBJECTS = \ + $(am_src_libout123_modules_output_portaudio_la_OBJECTS) +src_libout123_modules_output_portaudio_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_portaudio_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_portaudio_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@am_src_libout123_modules_output_portaudio_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@src_libout123_modules_output_pulse_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_pulse_la_SOURCES_DIST = \ + src/libout123/modules/pulse.c +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@am_src_libout123_modules_output_pulse_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_pulse_la-pulse.lo +src_libout123_modules_output_pulse_la_OBJECTS = \ + $(am_src_libout123_modules_output_pulse_la_OBJECTS) +src_libout123_modules_output_pulse_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_pulse_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_pulse_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@am_src_libout123_modules_output_pulse_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@src_libout123_modules_output_qsa_la_DEPENDENCIES = \ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@ src/compat/libcompat_str.la +am__src_libout123_modules_output_qsa_la_SOURCES_DIST = \ + src/libout123/modules/qsa.c +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@am_src_libout123_modules_output_qsa_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_qsa_la-qsa.lo +src_libout123_modules_output_qsa_la_OBJECTS = \ + $(am_src_libout123_modules_output_qsa_la_OBJECTS) +src_libout123_modules_output_qsa_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_qsa_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_qsa_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@am_src_libout123_modules_output_qsa_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@src_libout123_modules_output_sdl_la_DEPENDENCIES = \ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@ src/compat/libcompat_str.la +am__src_libout123_modules_output_sdl_la_SOURCES_DIST = \ + src/libout123/modules/sdl.c +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@am_src_libout123_modules_output_sdl_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_sdl_la-sdl.lo +src_libout123_modules_output_sdl_la_OBJECTS = \ + $(am_src_libout123_modules_output_sdl_la_OBJECTS) +src_libout123_modules_output_sdl_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_sdl_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_sdl_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@am_src_libout123_modules_output_sdl_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@src_libout123_modules_output_sgi_la_DEPENDENCIES = \ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@ src/compat/libcompat_str.la +am__src_libout123_modules_output_sgi_la_SOURCES_DIST = \ + src/libout123/modules/sgi.c +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@am_src_libout123_modules_output_sgi_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_sgi_la-sgi.lo +src_libout123_modules_output_sgi_la_OBJECTS = \ + $(am_src_libout123_modules_output_sgi_la_OBJECTS) +src_libout123_modules_output_sgi_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_sgi_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_sgi_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@am_src_libout123_modules_output_sgi_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@src_libout123_modules_output_sndio_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_sndio_la_SOURCES_DIST = \ + src/libout123/modules/sndio.c +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@am_src_libout123_modules_output_sndio_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_sndio_la-sndio.lo +src_libout123_modules_output_sndio_la_OBJECTS = \ + $(am_src_libout123_modules_output_sndio_la_OBJECTS) +src_libout123_modules_output_sndio_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_sndio_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_sndio_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@am_src_libout123_modules_output_sndio_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@src_libout123_modules_output_sun_la_DEPENDENCIES = \ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@ src/compat/libcompat_str.la +am__src_libout123_modules_output_sun_la_SOURCES_DIST = \ + src/libout123/modules/sun.c +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@am_src_libout123_modules_output_sun_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_sun_la-sun.lo +src_libout123_modules_output_sun_la_OBJECTS = \ + $(am_src_libout123_modules_output_sun_la_OBJECTS) +src_libout123_modules_output_sun_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_sun_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_sun_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@am_src_libout123_modules_output_sun_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@src_libout123_modules_output_tinyalsa_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_tinyalsa_la_SOURCES_DIST = \ + src/libout123/modules/tinyalsa.c +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@am_src_libout123_modules_output_tinyalsa_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_tinyalsa_la-tinyalsa.lo +src_libout123_modules_output_tinyalsa_la_OBJECTS = \ + $(am_src_libout123_modules_output_tinyalsa_la_OBJECTS) +src_libout123_modules_output_tinyalsa_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_tinyalsa_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_tinyalsa_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@am_src_libout123_modules_output_tinyalsa_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@src_libout123_modules_output_win32_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_win32_la_SOURCES_DIST = \ + src/libout123/modules/win32.c +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@am_src_libout123_modules_output_win32_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_win32_la-win32.lo +src_libout123_modules_output_win32_la_OBJECTS = \ + $(am_src_libout123_modules_output_win32_la_OBJECTS) +src_libout123_modules_output_win32_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_libout123_modules_output_win32_la_CFLAGS) \ + $(CFLAGS) $(src_libout123_modules_output_win32_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@am_src_libout123_modules_output_win32_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@ -rpath $(pkglibdir) +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@src_libout123_modules_output_win32_wasapi_la_DEPENDENCIES = src/compat/libcompat_str.la +am__src_libout123_modules_output_win32_wasapi_la_SOURCES_DIST = \ + src/libout123/modules/win32_wasapi.c +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@am_src_libout123_modules_output_win32_wasapi_la_OBJECTS = src/libout123/modules/src_libout123_modules_output_win32_wasapi_la-win32_wasapi.lo +src_libout123_modules_output_win32_wasapi_la_OBJECTS = \ + $(am_src_libout123_modules_output_win32_wasapi_la_OBJECTS) +src_libout123_modules_output_win32_wasapi_la_LINK = $(LIBTOOL) \ + $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) \ + $(src_libout123_modules_output_win32_wasapi_la_CFLAGS) \ + $(CFLAGS) \ + $(src_libout123_modules_output_win32_wasapi_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@am_src_libout123_modules_output_win32_wasapi_la_rpath = \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@ -rpath $(pkglibdir) +PROGRAMS = $(bin_PROGRAMS) +am_src_libmpg123_testcpu_OBJECTS = src/libmpg123/testcpu.$(OBJEXT) +src_libmpg123_testcpu_OBJECTS = $(am_src_libmpg123_testcpu_OBJECTS) +am__src_mpg123_SOURCES_DIST = src/audio.c src/audio.h src/common.c \ + src/common.h src/sysutil.c src/sysutil.h src/control_generic.c \ + src/equalizer.c src/getlopt.c src/getlopt.h src/httpget.c \ + src/httpget.h src/resolver.c src/resolver.h src/genre.h \ + src/genre.c src/mpg123.c src/mpg123app.h src/metaprint.c \ + src/metaprint.h src/local.h src/local.c src/playlist.c \ + src/playlist.h src/streamdump.h src/streamdump.c src/term.c \ + src/term.h src/win32_support.h src/win32_support.c \ + src/win32_net.c +@WIN32_CODES_TRUE@am__objects_4 = src/win32_support.$(OBJEXT) \ +@WIN32_CODES_TRUE@ src/win32_net.$(OBJEXT) +am_src_mpg123_OBJECTS = src/audio.$(OBJEXT) src/common.$(OBJEXT) \ + src/sysutil.$(OBJEXT) src/control_generic.$(OBJEXT) \ + src/equalizer.$(OBJEXT) src/getlopt.$(OBJEXT) \ + src/httpget.$(OBJEXT) src/resolver.$(OBJEXT) \ + src/genre.$(OBJEXT) src/mpg123.$(OBJEXT) \ + src/metaprint.$(OBJEXT) src/local.$(OBJEXT) \ + src/playlist.$(OBJEXT) src/streamdump.$(OBJEXT) \ + src/term.$(OBJEXT) $(am__objects_4) +src_mpg123_OBJECTS = $(am_src_mpg123_OBJECTS) +am__DEPENDENCIES_1 = +src_mpg123_DEPENDENCIES = src/compat/libcompat.la \ + src/libmpg123/libmpg123.la src/libout123/libout123.la \ + $(am__DEPENDENCIES_1) +src_mpg123_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(src_mpg123_LDFLAGS) $(LDFLAGS) -o $@ +am__src_mpg123_id3dump_SOURCES_DIST = src/mpg123-id3dump.c \ + src/getlopt.c src/getlopt.h src/win32_support.c +@WIN32_CODES_TRUE@am__objects_5 = src/win32_support.$(OBJEXT) +am_src_mpg123_id3dump_OBJECTS = src/mpg123-id3dump.$(OBJEXT) \ + src/getlopt.$(OBJEXT) $(am__objects_5) +src_mpg123_id3dump_OBJECTS = $(am_src_mpg123_id3dump_OBJECTS) +src_mpg123_id3dump_DEPENDENCIES = src/compat/libcompat.la \ + src/libmpg123/libmpg123.la +am_src_mpg123_strip_OBJECTS = src/mpg123-strip.$(OBJEXT) \ + src/getlopt.$(OBJEXT) +src_mpg123_strip_OBJECTS = $(am_src_mpg123_strip_OBJECTS) +src_mpg123_strip_DEPENDENCIES = src/compat/libcompat.la \ + src/libmpg123/libmpg123.la +am__src_out123_SOURCES_DIST = src/sysutil.c src/sysutil.h src/waves.c \ + src/waves.h src/common.h src/getlopt.c src/getlopt.h \ + src/out123.c src/mpg123app.h src/win32_support.h \ + src/win32_support.c +am_src_out123_OBJECTS = src/sysutil.$(OBJEXT) src/waves.$(OBJEXT) \ + src/getlopt.$(OBJEXT) src/out123.$(OBJEXT) $(am__objects_5) +src_out123_OBJECTS = $(am_src_out123_OBJECTS) +src_out123_DEPENDENCIES = src/compat/libcompat.la \ + src/libout123/libout123.la +src_out123_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(src_out123_LDFLAGS) $(LDFLAGS) -o $@ +am_src_tests_noise_OBJECTS = src/tests/noise.$(OBJEXT) +src_tests_noise_OBJECTS = $(am_src_tests_noise_OBJECTS) +src_tests_noise_DEPENDENCIES = src/compat/libcompat.la +am_src_tests_plain_id3_OBJECTS = src/tests/plain_id3.$(OBJEXT) +src_tests_plain_id3_OBJECTS = $(am_src_tests_plain_id3_OBJECTS) +src_tests_plain_id3_DEPENDENCIES = src/compat/libcompat.la \ + src/libmpg123/libmpg123.la +am_src_tests_seek_whence_OBJECTS = src/tests/seek_whence.$(OBJEXT) +src_tests_seek_whence_OBJECTS = $(am_src_tests_seek_whence_OBJECTS) +src_tests_seek_whence_DEPENDENCIES = src/compat/libcompat.la \ + src/libmpg123/libmpg123.la +am_src_tests_text_OBJECTS = src/tests/text.$(OBJEXT) +src_tests_text_OBJECTS = $(am_src_tests_text_OBJECTS) +src_tests_text_DEPENDENCIES = src/compat/libcompat.la \ + src/libmpg123/libmpg123.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/build/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CCASFLAGS) $(CCASFLAGS) +AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) +am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) +am__v_CPPAS_0 = @echo " CPPAS " $@; +am__v_CPPAS_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(src_compat_libcompat_la_SOURCES) \ + $(src_compat_libcompat_str_la_SOURCES) \ + $(src_libmpg123_libmpg123_la_SOURCES) \ + $(EXTRA_src_libmpg123_libmpg123_la_SOURCES) \ + $(src_libout123_libmodule_la_SOURCES) \ + $(src_libout123_libout123_la_SOURCES) \ + $(src_libout123_modules_libdefaultmodule_la_SOURCES) \ + $(src_libout123_modules_output_aix_la_SOURCES) \ + $(src_libout123_modules_output_alib_la_SOURCES) \ + $(src_libout123_modules_output_alsa_la_SOURCES) \ + $(src_libout123_modules_output_arts_la_SOURCES) \ + $(src_libout123_modules_output_coreaudio_la_SOURCES) \ + $(src_libout123_modules_output_dummy_la_SOURCES) \ + $(src_libout123_modules_output_esd_la_SOURCES) \ + $(src_libout123_modules_output_hp_la_SOURCES) \ + $(src_libout123_modules_output_jack_la_SOURCES) \ + $(src_libout123_modules_output_mint_la_SOURCES) \ + $(src_libout123_modules_output_nas_la_SOURCES) \ + $(src_libout123_modules_output_openal_la_SOURCES) \ + $(src_libout123_modules_output_os2_la_SOURCES) \ + $(src_libout123_modules_output_oss_la_SOURCES) \ + $(src_libout123_modules_output_portaudio_la_SOURCES) \ + $(src_libout123_modules_output_pulse_la_SOURCES) \ + $(src_libout123_modules_output_qsa_la_SOURCES) \ + $(src_libout123_modules_output_sdl_la_SOURCES) \ + $(src_libout123_modules_output_sgi_la_SOURCES) \ + $(src_libout123_modules_output_sndio_la_SOURCES) \ + $(src_libout123_modules_output_sun_la_SOURCES) \ + $(src_libout123_modules_output_tinyalsa_la_SOURCES) \ + $(src_libout123_modules_output_win32_la_SOURCES) \ + $(src_libout123_modules_output_win32_wasapi_la_SOURCES) \ + $(src_libmpg123_testcpu_SOURCES) $(src_mpg123_SOURCES) \ + $(src_mpg123_id3dump_SOURCES) $(src_mpg123_strip_SOURCES) \ + $(src_out123_SOURCES) $(src_tests_noise_SOURCES) \ + $(src_tests_plain_id3_SOURCES) \ + $(src_tests_seek_whence_SOURCES) $(src_tests_text_SOURCES) +DIST_SOURCES = $(src_compat_libcompat_la_SOURCES) \ + $(src_compat_libcompat_str_la_SOURCES) \ + $(src_libmpg123_libmpg123_la_SOURCES) \ + $(EXTRA_src_libmpg123_libmpg123_la_SOURCES) \ + $(am__src_libout123_libmodule_la_SOURCES_DIST) \ + $(am__src_libout123_libout123_la_SOURCES_DIST) \ + $(am__src_libout123_modules_libdefaultmodule_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_aix_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_alib_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_alsa_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_arts_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_coreaudio_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_dummy_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_esd_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_hp_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_jack_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_mint_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_nas_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_openal_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_os2_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_oss_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_portaudio_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_pulse_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_qsa_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_sdl_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_sgi_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_sndio_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_sun_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_tinyalsa_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_win32_la_SOURCES_DIST) \ + $(am__src_libout123_modules_output_win32_wasapi_la_SOURCES_DIST) \ + $(src_libmpg123_testcpu_SOURCES) \ + $(am__src_mpg123_SOURCES_DIST) \ + $(am__src_mpg123_id3dump_SOURCES_DIST) \ + $(src_mpg123_strip_SOURCES) $(am__src_out123_SOURCES_DIST) \ + $(src_tests_noise_SOURCES) $(src_tests_plain_id3_SOURCES) \ + $(src_tests_seek_whence_SOURCES) $(src_tests_text_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac man1dir = $(mandir)/man1 -am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" NROFF = nroff MANS = $(dist_man_MANS) DATA = $(pkgconfig_DATA) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - cscope distdir dist dist-all distcheck +HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ + $(srcdir)/doc/Makemodule.am $(srcdir)/libmpg123.pc.in \ + $(srcdir)/libout123.pc.in $(srcdir)/mpg123.spec.in \ + $(srcdir)/src/Makemodule.am $(srcdir)/src/compat/Makemodule.am \ + $(srcdir)/src/libmpg123/Makemodule.am \ + $(srcdir)/src/libout123/Makemodule.am \ + $(srcdir)/src/libout123/modules/Makemodule.am \ + $(top_srcdir)/build/compile $(top_srcdir)/build/config.guess \ + $(top_srcdir)/build/config.sub $(top_srcdir)/build/depcomp \ + $(top_srcdir)/build/install-sh $(top_srcdir)/build/ltmain.sh \ + $(top_srcdir)/build/missing $(top_srcdir)/src/config.h.in \ + $(top_srcdir)/src/libmpg123/mpg123.h.in \ + $(top_srcdir)/src/libout123/out123.h.in AUTHORS COPYING \ + ChangeLog INSTALL NEWS README TODO build/compile \ + build/config.guess build/config.sub build/depcomp \ + build/install-sh build/ltmain.sh build/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -137,31 +927,6 @@ am__remove_distdir = \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip @@ -180,6 +945,7 @@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LDFLAGS = @ALSA_LDFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ API_VERSION = @API_VERSION@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ @@ -240,21 +1006,23 @@ JACK_LIBS = @JACK_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LFS_LOBJ = @LFS_LOBJ@ +LIBM = @LIBM@ LIBMPG123_VERSION = @LIBMPG123_VERSION@ LIBOBJS = @LIBOBJS@ +LIBOUT123_VERSION = @LIBOUT123_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_LDFLAGS = @LT_LDFLAGS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MINT_CFLAGS = @MINT_CFLAGS@ MINT_LDFLAGS = @MINT_LDFLAGS@ MINT_LIBS = @MINT_LIBS@ MKDIR_P = @MKDIR_P@ -MODULE_OBJ = @MODULE_OBJ@ NAS_CFLAGS = @NAS_CFLAGS@ NAS_LDFLAGS = @NAS_LDFLAGS@ NAS_LIBS = @NAS_LIBS@ @@ -273,11 +1041,7 @@ OSS_LDFLAGS = @OSS_LDFLAGS@ OSS_LIBS = @OSS_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ -OUTPUT_CFLAGS = @OUTPUT_CFLAGS@ -OUTPUT_LDFLAGS = @OUTPUT_LDFLAGS@ -OUTPUT_LIBS = @OUTPUT_LIBS@ -OUTPUT_MOD = @OUTPUT_MOD@ -OUTPUT_OBJ = @OUTPUT_OBJ@ +OUTAPI_VERSION = @OUTAPI_VERSION@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -287,12 +1051,17 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ PORTAUDIO_LDFLAGS = @PORTAUDIO_LDFLAGS@ PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ PULSE_CFLAGS = @PULSE_CFLAGS@ PULSE_LDFLAGS = @PULSE_LDFLAGS@ PULSE_LIBS = @PULSE_LIBS@ +QSA_CFLAGS = @QSA_CFLAGS@ +QSA_LDFLAGS = @QSA_LDFLAGS@ +QSA_LIBS = @QSA_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LDFLAGS = @SDL_LDFLAGS@ @@ -310,10 +1079,19 @@ STRIP = @STRIP@ SUN_CFLAGS = @SUN_CFLAGS@ SUN_LDFLAGS = @SUN_LDFLAGS@ SUN_LIBS = @SUN_LIBS@ +TINYALSA_CFLAGS = @TINYALSA_CFLAGS@ +TINYALSA_LDFLAGS = @TINYALSA_LDFLAGS@ +TINYALSA_LIBS = @TINYALSA_LIBS@ VERSION = @VERSION@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_LDFLAGS = @WIN32_LDFLAGS@ WIN32_LIBS = @WIN32_LIBS@ +WIN32_WASAPI_CFLAGS = @WIN32_WASAPI_CFLAGS@ +WIN32_WASAPI_LDFLAGS = @WIN32_WASAPI_LDFLAGS@ +WIN32_WASAPI_LIBS = @WIN32_WASAPI_LIBS@ +YASM = @YASM@ +YASMFLAGS = @YASMFLAGS@ +YASM_FORMAT = @YASM_FORMAT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -354,6 +1132,8 @@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +output_modules = @output_modules@ +output_modules_la = @output_modules_la@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -366,34 +1146,29 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -dist_man_MANS = man1/mpg123.1 -SUBDIRS = src doc -DIST_SUBDIRS = src doc + +# Mention all global variables first before including Make modules. ACLOCAL_AMFLAGS = -I m4 -# pkg-config file for the mpg123 library -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libmpg123.pc +# The sfifo code is directly used in some modules. # mpg123.spec is autogenerated but needs to be present in tarball! -EXTRA_DIST = \ - mpg123.spec \ - makedll.sh \ - windows-builds.sh \ - equalize.dat \ - NEWS.libmpg123 \ - ports/MSVC++/mpg123.h \ - ports/MSVC++/config.h \ - ports/MSVC++/msvc.c \ - ports/MSVC++/examples/scan.c \ - ports/MSVC++/examples/feedseek.c \ - ports/MSVC++/2005/libmpg123/libmpg123.vcproj \ - ports/MSVC++/2008/mpg123.sln \ - ports/MSVC++/2008/feedseek/feedseek.vcproj \ - ports/MSVC++/2008/mpglib/mpglib.vcproj \ - ports/MSVC++/2008/libmpg123/libmpg123.vcproj \ - ports/MSVC++/2008/scan/scan.vcproj \ - ports/MSVC++/2008/dump_seekindex/dump_seekindex.vcproj \ +EXTRA_DIST = src/libmpg123/mpg123.h.in src/libout123/out123.h.in \ + src/libout123/sfifo.c src/libout123/sfifo.h src/intsym.h \ + src/mpg123-with-modules src/out123-with-modules \ + doc/BENCHMARKING doc/BUGS doc/CONTACT doc/PATENTS \ + doc/README.3DNOW doc/README.gain doc/README.remote \ + doc/ROAD_TO_LGPL doc/TODO doc/LICENSE doc/THANKS doc/ACCURACY \ + doc/LARGEFILE doc/libmpg123_speed.txt doc/doxyhead.xhtml \ + doc/doxyfoot.xhtml doc/doxy_examples.c doc/doxygen.conf \ + doc/examples/mpg123_to_out123.c doc/examples/scan.c \ + doc/examples/mpglib.c doc/examples/id3dump.c \ + doc/examples/feedseek.c doc/examples/dump_seekindex.c \ + doc/examples/extract_frames.c doc/examples/Makefile \ + mpg123.spec makedll.sh windows-builds.sh equalize.dat \ + NEWS.libmpg123 NEWS.libout123 ports/MSVC++/mpg123.h \ + ports/MSVC++/config.h ports/MSVC++/msvc.c \ + ports/MSVC++/examples/scan.c ports/MSVC++/examples/feedseek.c \ ports/MSVC++/2008clr/2008clr.sln \ ports/MSVC++/2008clr/mpg123clr/advanced.cpp \ ports/MSVC++/2008clr/mpg123clr/advanced.h \ @@ -428,14 +1203,23 @@ EXTRA_DIST = \ ports/MSVC++/2008clr/examples/scanclr/scanclr.csproj \ ports/MSVC++/2008clr/examples/scanclr/Program.cs \ ports/MSVC++/2008clr/examples/scanclr/Properties/AssemblyInfo.cs \ - ports/MSVC++/2010/mpg123.sln \ - ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj \ - ports/MSVC++/2010/dump_seekindex/dump_seekindex.vcxproj.filters \ - ports/MSVC++/2010/feedseek/feedseek.vcxproj \ - ports/MSVC++/2010/feedseek/feedseek.vcxproj.filters \ - ports/MSVC++/2010/libmpg123/libmpg123.vcxproj \ - ports/MSVC++/2010/scan/scan.vcxproj \ - ports/MSVC++/2010/scan/scan.vcxproj.filters \ + ports/MSVC++/2015/win32/feedseek \ + ports/MSVC++/2015/win32/feedseek/feedseek.vcxproj.filters \ + ports/MSVC++/2015/win32/feedseek/feedseek.vcxproj \ + ports/MSVC++/2015/win32/libmpg123 \ + ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj \ + ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj.filters \ + ports/MSVC++/2015/win32/mpg123.sln \ + ports/MSVC++/2015/win32/dump_seekindex \ + ports/MSVC++/2015/win32/dump_seekindex/dump_seekindex.vcxproj \ + ports/MSVC++/2015/win32/dump_seekindex/dump_seekindex.vcxproj.filters \ + ports/MSVC++/2015/win32/scan \ + ports/MSVC++/2015/win32/scan/scan.vcxproj.filters \ + ports/MSVC++/2015/win32/scan/scan.vcxproj \ + ports/MSVC++/2015/uwp/libmpg123 \ + ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj \ + ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj.filters \ + ports/MSVC++/2015/uwp/libmpg123.sln \ ports/MSVC++/CMP3Stream/libMPG123/libMPG123.vcproj \ ports/MSVC++/CMP3Stream/libMPG123/PLACE_LIBMPG123_SOURCES_HERE \ ports/MSVC++/CMP3Stream/README \ @@ -446,25 +1230,974 @@ EXTRA_DIST = \ ports/MSVC++/CMP3Stream/INCLUDE/CORE/CORE_FileIn.H \ ports/MSVC++/CMP3Stream/INCLUDE/CORE/SourceFilter_MP3.H \ ports/MSVC++/CMP3Stream/INCLUDE/IIEP_FileIn.H \ - ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H \ - ports/README \ - ports/Sony_PSP/config.h \ - ports/Sony_PSP/README \ - ports/Sony_PSP/Makefile.psp \ - ports/Sony_PSP/readers.c.patch \ - ports/mpg123_.pas \ - ports/Xcode/config.h \ - ports/Xcode/mpg123.h \ + ports/MSVC++/CMP3Stream/INCLUDE/IIEP_Def.H ports/README \ + ports/Sony_PSP/config.h ports/Sony_PSP/README \ + ports/Sony_PSP/Makefile.psp ports/Sony_PSP/readers.c.patch \ + ports/mpg123_.pas ports/Xcode/config.h ports/Xcode/mpg123.h \ ports/Xcode/mpg123.xcodeproj/project.pbxproj \ - scripts/benchmark-cpu.pl \ - scripts/tag_lyrics.py + scripts/benchmark-cpu.pl scripts/tag_lyrics.py scripts/conplay \ + scripts/mpg123info +pkglib_LTLIBRARIES = $(am__append_2) $(am__append_3) $(am__append_4) \ + $(am__append_5) $(am__append_6) $(am__append_7) \ + $(am__append_8) $(am__append_9) $(am__append_10) \ + $(am__append_11) $(am__append_12) $(am__append_13) \ + $(am__append_14) $(am__append_15) $(am__append_16) \ + $(am__append_17) $(am__append_18) $(am__append_19) \ + $(am__append_20) $(am__append_21) $(am__append_22) \ + $(am__append_23) $(am__append_24) $(am__append_25) +lib_LTLIBRARIES = src/libmpg123/libmpg123.la \ + src/libout123/libout123.la +noinst_LIBRARIES = + +# Precursor to the proper libout123. +# For now only wrapping the module loader or the legacy module. +noinst_LTLIBRARIES = src/compat/libcompat.la \ + src/compat/libcompat_str.la $(am__append_1) \ + src/libout123/libmodule.la +nodist_include_HEADERS = src/libmpg123/mpg123.h src/libout123/out123.h +include_HEADERS = src/libmpg123/fmt123.h +dist_man_MANS = man1/mpg123.1 man1/out123.1 + +# Necessary? +CLEANFILES = src/libmpg123/*.a src/*.a +# That can be trimmed down later when adapting the sources to +# use relative paths for includes. +# Watch out for generated headers (that's why top_builddir is also present). +AM_CPPFLAGS = -DPKGLIBDIR="\"$(pkglibdir)\"" $(LTDLINCL) \ + -I$(top_srcdir)/src -I$(top_srcdir)/src/compat \ + -I$(top_srcdir)/src/libmpg123 -I$(top_srcdir)/src/libout123 \ + -I$(top_builddir)/src/libmpg123 \ + -I$(top_builddir)/src/libout123 +pkgconfigdir = $(libdir)/pkgconfig -all: all-recursive +# Include Make modules from subdirectories. + +# Stuff from this directory. +pkgconfig_DATA = libmpg123.pc libout123.pc +src_compat_libcompat_la_SOURCES = \ + src/compat/compat_str.c \ + src/compat/compat.c \ + src/compat/compat.h + + +# A smaller one for the output modules. Do not want to grow them +# unnecessarily with unused code. +src_compat_libcompat_str_la_SOURCES = \ + src/compat/compat_str.c \ + src/compat/compat.h + +src_libmpg123_testcpu_DEPENDENCIES = src/libmpg123/getcpuflags.$(OBJEXT) +src_libmpg123_testcpu_SOURCES = src/libmpg123/testcpu.c +src_libmpg123_testcpu_LDADD = \ + src/compat/libcompat.la \ + src/libmpg123/getcpuflags.$(OBJEXT) + +src_libmpg123_libmpg123_la_LDFLAGS = \ + -no-undefined \ + -version-info @LIBMPG123_VERSION@ \ + -export-symbols-regex '^mpg123_' + +src_libmpg123_libmpg123_la_LIBADD = \ + src/compat/libcompat.la \ + @DECODER_LOBJ@ @LFS_LOBJ@ @LIBS@ + +src_libmpg123_libmpg123_la_DEPENDENCIES = \ + src/compat/libcompat.la \ + @DECODER_LOBJ@ @LFS_LOBJ@ + +src_libmpg123_libmpg123_la_SOURCES = \ + src/libmpg123/fmt123.h \ + src/libmpg123/mpeghead.h \ + src/libmpg123/parse.c \ + src/libmpg123/parse.h \ + src/libmpg123/frame.c \ + src/libmpg123/format.c \ + src/libmpg123/frame.h \ + src/libmpg123/reader.h \ + src/libmpg123/debug.h \ + src/libmpg123/decode.h \ + src/libmpg123/sample.h \ + src/libmpg123/dct64.c \ + src/libmpg123/synth.h \ + src/libmpg123/synth_mono.h \ + src/libmpg123/synth_ntom.h \ + src/libmpg123/synth_8bit.h \ + src/libmpg123/synths.h \ + src/libmpg123/equalizer.c \ + src/libmpg123/huffman.h \ + src/libmpg123/newhuffman.h \ + src/libmpg123/icy.h \ + src/libmpg123/icy2utf8.h \ + src/libmpg123/id3.h \ + src/libmpg123/id3.c \ + src/libmpg123/true.h \ + src/libmpg123/getbits.h \ + src/libmpg123/optimize.h \ + src/libmpg123/optimize.c \ + src/libmpg123/readers.c \ + src/libmpg123/tabinit.c \ + src/libmpg123/libmpg123.c \ + src/libmpg123/gapless.h \ + src/libmpg123/mpg123lib_intern.h \ + src/libmpg123/abi_align.h \ + src/libmpg123/mangle.h \ + src/libmpg123/getcpuflags.h \ + src/libmpg123/index.h \ + src/libmpg123/index.c + +EXTRA_src_libmpg123_libmpg123_la_SOURCES = \ + src/libmpg123/lfs_alias.c \ + src/libmpg123/lfs_wrap.c \ + src/libmpg123/icy.c \ + src/libmpg123/icy2utf8.c \ + src/libmpg123/l2tables.h \ + src/libmpg123/layer1.c \ + src/libmpg123/layer2.c \ + src/libmpg123/layer3.c \ + src/libmpg123/dither.h \ + src/libmpg123/dither_impl.h \ + src/libmpg123/dither.c \ + src/libmpg123/feature.c \ + src/libmpg123/dct36_3dnowext.S \ + src/libmpg123/dct36_3dnow.S \ + src/libmpg123/dct36_sse.S \ + src/libmpg123/dct36_x86_64.S \ + src/libmpg123/dct36_avx.S \ + src/libmpg123/dct36_neon.S \ + src/libmpg123/dct36_neon64.S \ + src/libmpg123/dct64_3dnowext.S \ + src/libmpg123/dct64_3dnow.S \ + src/libmpg123/dct64_altivec.c \ + src/libmpg123/dct64_i386.c \ + src/libmpg123/dct64_i486.c \ + src/libmpg123/dct64_mmx.S \ + src/libmpg123/dct64_sse.S \ + src/libmpg123/dct64_sse_float.S \ + src/libmpg123/dct64_x86_64.S \ + src/libmpg123/dct64_x86_64_float.S \ + src/libmpg123/dct64_neon.S \ + src/libmpg123/dct64_neon_float.S \ + src/libmpg123/dct64_neon64.S \ + src/libmpg123/dct64_neon64_float.S \ + src/libmpg123/dct64_avx.S \ + src/libmpg123/dct64_avx_float.S \ + src/libmpg123/synth_3dnowext.S \ + src/libmpg123/synth_3dnow.S \ + src/libmpg123/synth_altivec.c \ + src/libmpg123/synth_i486.c \ + src/libmpg123/synth_i586_dither.S \ + src/libmpg123/synth_i586.S \ + src/libmpg123/synth_mmx.S \ + src/libmpg123/synth_sse3d.h \ + src/libmpg123/synth_sse.S \ + src/libmpg123/synth_sse_float.S \ + src/libmpg123/synth_sse_s32.S \ + src/libmpg123/synth_sse_accurate.S \ + src/libmpg123/synth_stereo_sse_float.S \ + src/libmpg123/synth_stereo_sse_s32.S \ + src/libmpg123/synth_stereo_sse_accurate.S \ + src/libmpg123/synth_x86_64.S \ + src/libmpg123/synth_x86_64_float.S \ + src/libmpg123/synth_x86_64_s32.S \ + src/libmpg123/synth_x86_64_accurate.S \ + src/libmpg123/synth_stereo_x86_64.S \ + src/libmpg123/synth_stereo_x86_64_float.S \ + src/libmpg123/synth_stereo_x86_64_s32.S \ + src/libmpg123/synth_stereo_x86_64_accurate.S \ + src/libmpg123/synth_arm.S \ + src/libmpg123/synth_arm_accurate.S \ + src/libmpg123/synth_neon.S \ + src/libmpg123/synth_neon_float.S \ + src/libmpg123/synth_neon_s32.S \ + src/libmpg123/synth_neon_accurate.S \ + src/libmpg123/synth_stereo_neon.S \ + src/libmpg123/synth_stereo_neon_float.S \ + src/libmpg123/synth_stereo_neon_s32.S \ + src/libmpg123/synth_stereo_neon_accurate.S \ + src/libmpg123/synth_neon64.S \ + src/libmpg123/synth_neon64_float.S \ + src/libmpg123/synth_neon64_s32.S \ + src/libmpg123/synth_neon64_accurate.S \ + src/libmpg123/synth_stereo_neon64.S \ + src/libmpg123/synth_stereo_neon64_float.S \ + src/libmpg123/synth_stereo_neon64_s32.S \ + src/libmpg123/synth_stereo_neon64_accurate.S \ + src/libmpg123/synth_stereo_avx.S \ + src/libmpg123/synth_stereo_avx_float.S \ + src/libmpg123/synth_stereo_avx_s32.S \ + src/libmpg123/synth_stereo_avx_accurate.S \ + src/libmpg123/ntom.c \ + src/libmpg123/synth.c \ + src/libmpg123/synth_8bit.c \ + src/libmpg123/synth_real.c \ + src/libmpg123/synth_s32.c \ + src/libmpg123/equalizer_3dnow.S \ + src/libmpg123/tabinit_mmx.S \ + src/libmpg123/stringbuf.c \ + src/libmpg123/getcpuflags.S \ + src/libmpg123/getcpuflags_x86_64.S \ + src/libmpg123/getcpuflags_arm.c \ + src/libmpg123/check_neon.S \ + src/libmpg123/l12_integer_tables.h \ + src/libmpg123/l3_integer_tables.h + +@USE_YASM_FOR_AVX_TRUE@AVX_SRCS = \ +@USE_YASM_FOR_AVX_TRUE@ src/libmpg123/dct36_avx.S \ +@USE_YASM_FOR_AVX_TRUE@ src/libmpg123/dct64_avx.S \ +@USE_YASM_FOR_AVX_TRUE@ src/libmpg123/dct64_avx_float.S \ +@USE_YASM_FOR_AVX_TRUE@ src/libmpg123/synth_stereo_avx.S \ +@USE_YASM_FOR_AVX_TRUE@ src/libmpg123/synth_stereo_avx_float.S \ +@USE_YASM_FOR_AVX_TRUE@ src/libmpg123/synth_stereo_avx_s32.S \ +@USE_YASM_FOR_AVX_TRUE@ src/libmpg123/synth_stereo_avx_accurate.S + +@USE_YASM_FOR_AVX_TRUE@AVX_OBJS = $(AVX_SRCS:.S=.@OBJEXT@) +@USE_YASM_FOR_AVX_TRUE@ASM_DEPS = \ +@USE_YASM_FOR_AVX_TRUE@ src/libmpg123/mangle.h \ +@USE_YASM_FOR_AVX_TRUE@ $(top_builddir)/src/config.h \ +@USE_YASM_FOR_AVX_TRUE@ src/intsym.h + + +# Do not include uneeded headers from mpg123app.h . +libout123_mod_cppflags = -DBUILDING_OUTPUT_MODULES=1 +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_dummy_la_SOURCES = \ +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@ src/libout123/modules/dummy.c + +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_dummy_la_LDFLAGS = \ +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@ @DUMMY_LDFLAGS@ + +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_dummy_la_CFLAGS = @DUMMY_CFLAGS@ +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_dummy_la_LIBADD = \ +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la \ +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@ @DUMMY_LIBS@ + +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_outout_dummy_la_CPPFLAGS = \ +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@ $(libout123_mod_cppflags) + +@BUILD_AIX_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_AIX_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/aix.c + +@BUILD_ALIB_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_ALIB_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/alib.c + +@BUILD_ALSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_ALSA_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/alsa.c + +@BUILD_ARTS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_ARTS_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/arts.c + +@BUILD_COREAUDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_COREAUDIO_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/coreaudio.c + +@BUILD_DUMMY_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_DUMMY_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/dummy.c + +@BUILD_ESD_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_ESD_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/esd.c + +@BUILD_HP_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_HP_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/hp.c + +@BUILD_JACK_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_JACK_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/jack.c + +@BUILD_MINT_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_MINT_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/mint.c + +@BUILD_NAS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_NAS_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/nas.c + +@BUILD_OPENAL_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_OPENAL_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/openal.c + +@BUILD_OS2_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_OS2_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/os2.c + +@BUILD_OSS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_OSS_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/oss.c + +@BUILD_PORTAUDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_PORTAUDIO_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/portaudio.c + +@BUILD_PULSE_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_PULSE_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/pulse.c + +@BUILD_QSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_QSA_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/qsa.c + +@BUILD_SDL_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_SDL_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/sdl.c + +@BUILD_SGI_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_SGI_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/sgi.c + +@BUILD_SNDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_SNDIO_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/sndio.c + +@BUILD_SUN_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_SUN_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/sun.c + +@BUILD_TINYALSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_TINYALSA_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/tinyalsa.c + +@BUILD_WIN32_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_WIN32_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/win32.c + +@BUILD_WIN32_WASAPI_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_SOURCES = \ +@BUILD_WIN32_WASAPI_TRUE@@HAVE_MODULES_FALSE@ src/libout123/modules/win32_wasapi.c + +@BUILD_AIX_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @AIX_CFLAGS@ +@BUILD_ALIB_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @ALIB_CFLAGS@ +@BUILD_ALSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @ALSA_CFLAGS@ +@BUILD_ARTS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @ARTS_CFLAGS@ +@BUILD_COREAUDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @COREAUDIO_CFLAGS@ +@BUILD_DUMMY_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @DUMMY_CFLAGS@ +@BUILD_ESD_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @ESD_CFLAGS@ +@BUILD_HP_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @HP_CFLAGS@ +@BUILD_JACK_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @JACK_CFLAGS@ +@BUILD_MINT_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @MINT_CFLAGS@ +@BUILD_NAS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @NAS_CFLAGS@ +@BUILD_OPENAL_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @OPENAL_CFLAGS@ +@BUILD_OS2_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @OS2_CFLAGS@ +@BUILD_OSS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @OSS_CFLAGS@ +@BUILD_PORTAUDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @PORTAUDIO_CFLAGS@ +@BUILD_PULSE_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @PULSE_CFLAGS@ +@BUILD_QSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @QSA_CFLAGS@ +@BUILD_SDL_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @SDL_CFLAGS@ +@BUILD_SGI_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @SGI_CFLAGS@ +@BUILD_SNDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @SNDIO_CFLAGS@ +@BUILD_SUN_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @SUN_CFLAGS@ +@BUILD_TINYALSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @TINYALSA_CFLAGS@ +@BUILD_WIN32_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @WIN32_CFLAGS@ +@BUILD_WIN32_WASAPI_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CFLAGS = @WIN32_WASAPI_CFLAGS@ +@BUILD_AIX_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @AIX_LDFLAGS@ +@BUILD_ALIB_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @ALIB_LDFLAGS@ +@BUILD_ALSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @ALSA_LDFLAGS@ +@BUILD_ARTS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @ARTS_LDFLAGS@ +@BUILD_COREAUDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @COREAUDIO_LDFLAGS@ +@BUILD_DUMMY_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @DUMMY_LDFLAGS@ +@BUILD_ESD_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @ESD_LDFLAGS@ +@BUILD_HP_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @HP_LDFLAGS@ +@BUILD_JACK_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @JACK_LDFLAGS@ +@BUILD_MINT_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @MINT_LDFLAGS@ +@BUILD_NAS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @NAS_LDFLAGS@ +@BUILD_OPENAL_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @OPENAL_LDFLAGS@ +@BUILD_OS2_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @OS2_LDFLAGS@ +@BUILD_OSS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @OSS_LDFLAGS@ +@BUILD_PORTAUDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @PORTAUDIO_LDFLAGS@ +@BUILD_PULSE_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @PULSE_LDFLAGS@ +@BUILD_QSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @QSA_LDFLAGS@ +@BUILD_SDL_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @SDL_LDFLAGS@ +@BUILD_SGI_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @SGI_LDFLAGS@ +@BUILD_SNDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @SNDIO_LDFLAGS@ +@BUILD_SUN_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @SUN_LDFLAGS@ +@BUILD_TINYALSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @TINYALSA_LDFLAGS@ +@BUILD_WIN32_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @WIN32_LDFLAGS@ +@BUILD_WIN32_WASAPI_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LDFLAGS = @WIN32_WASAPI_LDFLAGS@ +@BUILD_AIX_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @AIX_LIBS@ +@BUILD_ALIB_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @ALIB_LIBS@ +@BUILD_ALSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @ALSA_LIBS@ +@BUILD_ARTS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @ARTS_LIBS@ +@BUILD_COREAUDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @COREAUDIO_LIBS@ +@BUILD_DUMMY_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @DUMMY_LIBS@ +@BUILD_ESD_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @ESD_LIBS@ +@BUILD_HP_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @HP_LIBS@ +@BUILD_JACK_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @JACK_LIBS@ +@BUILD_MINT_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @MINT_LIBS@ +@BUILD_NAS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @NAS_LIBS@ +@BUILD_OPENAL_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @OPENAL_LIBS@ +@BUILD_OS2_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @OS2_LIBS@ +@BUILD_OSS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @OSS_LIBS@ +@BUILD_PORTAUDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @PORTAUDIO_LIBS@ +@BUILD_PULSE_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @PULSE_LIBS@ +@BUILD_QSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @QSA_LIBS@ +@BUILD_SDL_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @SDL_LIBS@ +@BUILD_SGI_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @SGI_LIBS@ +@BUILD_SNDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @SNDIO_LIBS@ +@BUILD_SUN_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @SUN_LIBS@ +@BUILD_TINYALSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @TINYALSA_LIBS@ +@BUILD_WIN32_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @WIN32_LIBS@ +@BUILD_WIN32_WASAPI_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_LIBADD = @WIN32_WASAPI_LIBS@ +@BUILD_AIX_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_AIX_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_AIX_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_ALIB_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_ALIB_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_ALIB_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_ALSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_ALSA_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_ALSA_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_ARTS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_ARTS_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_ARTS_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_COREAUDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_COREAUDIO_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_COREAUDIO_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_DUMMY_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_DUMMY_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_DUMMY_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_ESD_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_ESD_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_ESD_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_HP_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_HP_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_HP_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_JACK_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_JACK_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_JACK_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_MINT_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_MINT_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_MINT_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_NAS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_NAS_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_NAS_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_OPENAL_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_OPENAL_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_OPENAL_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_OS2_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_OS2_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_OS2_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_OSS_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_OSS_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_OSS_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_PORTAUDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_PORTAUDIO_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_PORTAUDIO_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_PULSE_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_PULSE_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_PULSE_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_QSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_QSA_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_QSA_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_SDL_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_SDL_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_SDL_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_SGI_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_SGI_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_SGI_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_SNDIO_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_SNDIO_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_SNDIO_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_SUN_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_SUN_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_SUN_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_TINYALSA_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_TINYALSA_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_TINYALSA_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_WIN32_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_WIN32_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_WIN32_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@BUILD_WIN32_WASAPI_TRUE@@HAVE_MODULES_FALSE@src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ +@BUILD_WIN32_WASAPI_TRUE@@HAVE_MODULES_FALSE@ $(AM_CPPFLAGS) \ +@BUILD_WIN32_WASAPI_TRUE@@HAVE_MODULES_FALSE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@src_libout123_modules_output_tinyalsa_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@ src/libout123/modules/tinyalsa.c + +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@src_libout123_modules_output_tinyalsa_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@ @TINYALSA_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@src_libout123_modules_output_tinyalsa_la_CFLAGS = @TINYALSA_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@src_libout123_modules_output_tinyalsa_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@ @TINYALSA_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@src_libout123_modules_outout_tinyalsa_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_TINYALSA_TRUE@ $(libout123_mod_cppflags) + +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_alsa_la_SOURCES = \ +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@ src/libout123/modules/alsa.c + +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_alsa_la_LDFLAGS = \ +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@ @ALSA_LDFLAGS@ + +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_alsa_la_CFLAGS = @ALSA_CFLAGS@ +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_alsa_la_LIBADD = \ +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la \ +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@ @ALSA_LIBS@ + +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_outout_alsa_la_CPPFLAGS = \ +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@src_libout123_modules_output_qsa_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@ src/libout123/modules/qsa.c + +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@src_libout123_modules_output_qsa_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@ @QSA_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@src_libout123_modules_output_qsa_la_CFLAGS = @QSA_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@src_libout123_modules_output_qsa_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@ @QSA_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@src_libout123_modules_outout_qsa_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_QSA_TRUE@ $(libout123_mod_cppflags) + +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_coreaudio_la_SOURCES = \ +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@ src/libout123/modules/coreaudio.c + +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_coreaudio_la_LDFLAGS = \ +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@ @COREAUDIO_LDFLAGS@ + +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_coreaudio_la_CFLAGS = @COREAUDIO_CFLAGS@ +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_coreaudio_la_LIBADD = \ +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la \ +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@ @COREAUDIO_LIBS@ + +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_outout_coreaudio_la_CPPFLAGS = \ +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@ $(libout123_mod_cppflags) + +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_esd_la_SOURCES = \ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@ src/libout123/modules/esd.c + +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_esd_la_LDFLAGS = \ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@ @ESD_LDFLAGS@ + +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_esd_la_CFLAGS = @ESD_CFLAGS@ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_esd_la_LIBADD = \ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la \ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@ @ESD_LIBS@ + +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_outout_esd_la_CPPFLAGS = \ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@ $(libout123_mod_cppflags) + +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_jack_la_SOURCES = \ +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@ src/libout123/modules/jack.c + +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_jack_la_LDFLAGS = \ +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@ @JACK_LDFLAGS@ + +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_jack_la_CFLAGS = @JACK_CFLAGS@ +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_jack_la_LIBADD = \ +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la \ +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@ @JACK_LIBS@ + +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_outout_jack_la_CPPFLAGS = \ +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@src_libout123_modules_output_nas_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@ src/libout123/modules/nas.c + +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@src_libout123_modules_output_nas_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@ @NAS_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@src_libout123_modules_output_nas_la_CFLAGS = @NAS_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@src_libout123_modules_output_nas_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@ @NAS_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@src_libout123_modules_outout_nas_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@src_libout123_modules_output_oss_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@ src/libout123/modules/oss.c + +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@src_libout123_modules_output_oss_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@ @OSS_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@src_libout123_modules_output_oss_la_CFLAGS = @OSS_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@src_libout123_modules_output_oss_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@ @OSS_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@src_libout123_modules_outout_oss_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@src_libout123_modules_output_portaudio_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@ src/libout123/modules/portaudio.c + +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@src_libout123_modules_output_portaudio_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@ @PORTAUDIO_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@src_libout123_modules_output_portaudio_la_CFLAGS = @PORTAUDIO_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@src_libout123_modules_output_portaudio_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@ @PORTAUDIO_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@src_libout123_modules_outout_portaudio_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@src_libout123_modules_output_pulse_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@ src/libout123/modules/pulse.c + +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@src_libout123_modules_output_pulse_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@ @PULSE_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@src_libout123_modules_output_pulse_la_CFLAGS = @PULSE_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@src_libout123_modules_output_pulse_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@ @PULSE_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@src_libout123_modules_outout_pulse_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@src_libout123_modules_output_sdl_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@ src/libout123/modules/sdl.c + +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@src_libout123_modules_output_sdl_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@ @SDL_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@src_libout123_modules_output_sdl_la_CFLAGS = @SDL_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@src_libout123_modules_output_sdl_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@ @SDL_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@src_libout123_modules_outout_sdl_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@src_libout123_modules_output_sndio_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@ src/libout123/modules/sndio.c + +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@src_libout123_modules_output_sndio_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@ @SNDIO_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@src_libout123_modules_output_sndio_la_CFLAGS = @SNDIO_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@src_libout123_modules_output_sndio_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@ @SNDIO_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@src_libout123_modules_outout_sndio_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@src_libout123_modules_output_sun_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@ src/libout123/modules/sun.c + +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@src_libout123_modules_output_sun_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@ @SUN_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@src_libout123_modules_output_sun_la_CFLAGS = @SUN_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@src_libout123_modules_output_sun_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@ @SUN_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@src_libout123_modules_outout_sun_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@src_libout123_modules_output_win32_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@ src/libout123/modules/win32.c + +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@src_libout123_modules_output_win32_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@ @WIN32_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@src_libout123_modules_output_win32_la_CFLAGS = @WIN32_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@src_libout123_modules_output_win32_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@ @WIN32_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@src_libout123_modules_outout_win32_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@src_libout123_modules_output_win32_wasapi_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@ src/libout123/modules/win32_wasapi.c + +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@src_libout123_modules_output_win32_wasapi_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@ @WIN32_WASAPI_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@src_libout123_modules_output_win32_wasapi_la_CFLAGS = @WIN32_WASAPI_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@src_libout123_modules_output_win32_wasapi_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@ @WIN32_WASAPI_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@src_libout123_modules_outout_win32_wasapi_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_WIN32_WASAPI_TRUE@ $(libout123_mod_cppflags) + +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_aix_la_SOURCES = \ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@ src/libout123/modules/aix.c + +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_aix_la_LDFLAGS = \ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@ @AIX_LDFLAGS@ + +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_aix_la_CFLAGS = @AIX_CFLAGS@ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_aix_la_LIBADD = \ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la \ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@ @AIX_LIBS@ + +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_outout_aix_la_CPPFLAGS = \ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@ $(libout123_mod_cppflags) + +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_alib_la_SOURCES = \ +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@ src/libout123/modules/alib.c + +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_alib_la_LDFLAGS = \ +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@ @ALIB_LDFLAGS@ + +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_alib_la_CFLAGS = @ALIB_CFLAGS@ +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_alib_la_LIBADD = \ +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la \ +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@ @ALIB_LIBS@ + +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_outout_alib_la_CPPFLAGS = \ +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@ $(libout123_mod_cppflags) + +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_arts_la_SOURCES = \ +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@ src/libout123/modules/arts.c + +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_arts_la_LDFLAGS = \ +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@ @ARTS_LDFLAGS@ + +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_arts_la_CFLAGS = @ARTS_CFLAGS@ +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_arts_la_LIBADD = \ +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la \ +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@ @ARTS_LIBS@ + +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_outout_arts_la_CPPFLAGS = \ +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@ $(libout123_mod_cppflags) + +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_hp_la_SOURCES = \ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@ src/libout123/modules/hp.c + +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_hp_la_LDFLAGS = \ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@ @HP_LDFLAGS@ + +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_hp_la_CFLAGS = @HP_CFLAGS@ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_hp_la_LIBADD = \ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la \ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@ @HP_LIBS@ + +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_outout_hp_la_CPPFLAGS = \ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@src_libout123_modules_output_os2_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@ src/libout123/modules/os2.c + +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@src_libout123_modules_output_os2_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@ @OS2_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@src_libout123_modules_output_os2_la_CFLAGS = @OS2_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@src_libout123_modules_output_os2_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@ @OS2_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@src_libout123_modules_outout_os2_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@src_libout123_modules_output_sgi_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@ src/libout123/modules/sgi.c + +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@src_libout123_modules_output_sgi_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@ @SGI_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@src_libout123_modules_output_sgi_la_CFLAGS = @SGI_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@src_libout123_modules_output_sgi_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@ @SGI_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@src_libout123_modules_outout_sgi_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_mint_la_SOURCES = \ +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@ src/libout123/modules/mint.c + +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_mint_la_LDFLAGS = \ +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@ @MINT_LDFLAGS@ + +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_mint_la_CFLAGS = @MINT_CFLAGS@ +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_output_mint_la_LIBADD = \ +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@ @MINT_LIBS@ + +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@src_libout123_modules_outout_mint_la_CPPFLAGS = \ +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@ $(libout123_mod_cppflags) + +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@src_libout123_modules_output_openal_la_SOURCES = \ +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@ src/libout123/modules/openal.c + +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@src_libout123_modules_output_openal_la_LDFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@ -module -no-undefined -avoid-version \ +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@ -export-dynamic -export-symbols-regex '^mpg123_' \ +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@ @OPENAL_LDFLAGS@ + +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@src_libout123_modules_output_openal_la_CFLAGS = @OPENAL_CFLAGS@ +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@src_libout123_modules_output_openal_la_LIBADD = \ +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@ src/compat/libcompat_str.la \ +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@ @OPENAL_LIBS@ + +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@src_libout123_modules_outout_openal_la_CPPFLAGS = \ +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@ $(AM_CPPFLAGS) \ +@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@ $(libout123_mod_cppflags) + +src_libout123_libout123_la_SOURCES = src/libout123/libout123.c \ + src/libout123/stringlists.h src/libout123/stringlists.c \ + src/libout123/out123_int.h src/libout123/wav.c \ + src/libout123/wav.h src/libout123/wavhead.h $(am__append_26) +src_libout123_libout123_la_LDFLAGS = \ + -no-undefined -version-info @LIBOUT123_VERSION@ -export-symbols-regex '^out123_' + +src_libout123_libout123_la_LIBADD = src/libout123/libmodule.la \ + src/compat/libcompat.la $(am__append_27) +src_libout123_libmodule_la_SOURCES = src/libout123/module.h \ + $(am__append_28) $(am__append_29) +src_mpg123_LDADD = \ + src/compat/libcompat.la \ + src/libmpg123/libmpg123.la \ + src/libout123/libout123.la \ + $(LIBM) + +src_mpg123_LDFLAGS = @EXEC_LT_LDFLAGS@ +src_out123_LDADD = \ + src/compat/libcompat.la \ + src/libout123/libout123.la + +src_out123_LDFLAGS = @EXEC_LT_LDFLAGS@ +src_mpg123_id3dump_LDADD = \ + src/compat/libcompat.la \ + src/libmpg123/libmpg123.la + +src_mpg123_strip_LDADD = \ + src/compat/libcompat.la \ + src/libmpg123/libmpg123.la + + +# Does that finally work to build/link the correct object file? +src_mpg123_SOURCES = src/audio.c src/audio.h src/common.c src/common.h \ + src/sysutil.c src/sysutil.h src/control_generic.c \ + src/equalizer.c src/getlopt.c src/getlopt.h src/httpget.c \ + src/httpget.h src/resolver.c src/resolver.h src/genre.h \ + src/genre.c src/mpg123.c src/mpg123app.h src/metaprint.c \ + src/metaprint.h src/local.h src/local.c src/playlist.c \ + src/playlist.h src/streamdump.h src/streamdump.c src/term.c \ + src/term.h src/win32_support.h $(am__append_30) + +# Replace common.h by sysutil.h! +src_out123_SOURCES = src/sysutil.c src/sysutil.h src/waves.c \ + src/waves.h src/common.h src/getlopt.c src/getlopt.h \ + src/out123.c src/mpg123app.h src/win32_support.h \ + $(am__append_31) +src_mpg123_id3dump_SOURCES = src/mpg123-id3dump.c src/getlopt.c \ + src/getlopt.h $(am__append_32) +src_mpg123_strip_SOURCES = \ + src/mpg123-strip.c \ + src/getlopt.c \ + src/getlopt.h + +src_tests_seek_whence_SOURCES = \ + src/tests/seek_whence.c + +src_tests_seek_whence_LDADD = \ + src/compat/libcompat.la \ + src/libmpg123/libmpg123.la + +src_tests_noise_SOURCES = \ + src/tests/noise.c \ + src/libmpg123/dither.h \ + src/libmpg123/dither_impl.h + +src_tests_noise_LDADD = \ + src/compat/libcompat.la + +src_tests_text_SOURCES = \ + src/tests/text.c \ + src/tests/testtext.h + +src_tests_text_LDADD = \ + src/compat/libcompat.la \ + src/libmpg123/libmpg123.la + +src_tests_plain_id3_SOURCES = \ + src/tests/plain_id3.c + +src_tests_plain_id3_LDADD = \ + src/compat/libcompat.la \ + src/libmpg123/libmpg123.la + +all: all-am .SUFFIXES: +.SUFFIXES: .S .c .lo .o .obj am--refresh: Makefile @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/src/Makemodule.am $(srcdir)/src/compat/Makemodule.am $(srcdir)/src/libmpg123/Makemodule.am $(srcdir)/src/libout123/Makemodule.am $(srcdir)/src/libout123/modules/Makemodule.am $(srcdir)/doc/Makemodule.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -477,7 +2210,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -487,6 +2219,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; +$(srcdir)/src/Makemodule.am $(srcdir)/src/compat/Makemodule.am $(srcdir)/src/libmpg123/Makemodule.am $(srcdir)/src/libout123/Makemodule.am $(srcdir)/src/libout123/modules/Makemodule.am $(srcdir)/doc/Makemodule.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck @@ -496,16 +2229,1340 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): + +src/config.h: src/stamp-h1 + @test -f $@ || rm -f src/stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) src/stamp-h1 + +src/stamp-h1: $(top_srcdir)/src/config.h.in $(top_builddir)/config.status + @rm -f src/stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status src/config.h +$(top_srcdir)/src/config.h.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f src/stamp-h1 + touch $@ + +distclean-hdr: + -rm -f src/config.h src/stamp-h1 libmpg123.pc: $(top_builddir)/config.status $(srcdir)/libmpg123.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ +libout123.pc: $(top_builddir)/config.status $(srcdir)/libout123.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mpg123.spec: $(top_builddir)/config.status $(srcdir)/mpg123.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ +src/libmpg123/mpg123.h: $(top_builddir)/config.status $(top_srcdir)/src/libmpg123/mpg123.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/libout123/out123.h: $(top_builddir)/config.status $(top_srcdir)/src/libout123/out123.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @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 " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + 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)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +src/compat/$(am__dirstamp): + @$(MKDIR_P) src/compat + @: > src/compat/$(am__dirstamp) +src/compat/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/compat/$(DEPDIR) + @: > src/compat/$(DEPDIR)/$(am__dirstamp) +src/compat/compat_str.lo: src/compat/$(am__dirstamp) \ + src/compat/$(DEPDIR)/$(am__dirstamp) +src/compat/compat.lo: src/compat/$(am__dirstamp) \ + src/compat/$(DEPDIR)/$(am__dirstamp) + +src/compat/libcompat.la: $(src_compat_libcompat_la_OBJECTS) $(src_compat_libcompat_la_DEPENDENCIES) $(EXTRA_src_compat_libcompat_la_DEPENDENCIES) src/compat/$(am__dirstamp) + $(AM_V_CCLD)$(LINK) $(src_compat_libcompat_la_OBJECTS) $(src_compat_libcompat_la_LIBADD) $(LIBS) + +src/compat/libcompat_str.la: $(src_compat_libcompat_str_la_OBJECTS) $(src_compat_libcompat_str_la_DEPENDENCIES) $(EXTRA_src_compat_libcompat_str_la_DEPENDENCIES) src/compat/$(am__dirstamp) + $(AM_V_CCLD)$(LINK) $(src_compat_libcompat_str_la_OBJECTS) $(src_compat_libcompat_str_la_LIBADD) $(LIBS) +src/libmpg123/$(am__dirstamp): + @$(MKDIR_P) src/libmpg123 + @: > src/libmpg123/$(am__dirstamp) +src/libmpg123/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/libmpg123/$(DEPDIR) + @: > src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/parse.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/frame.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/format.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/equalizer.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/id3.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/optimize.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/readers.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/tabinit.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/libmpg123.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/index.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/lfs_alias.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/lfs_wrap.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/icy.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/icy2utf8.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/layer1.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/layer2.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/layer3.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dither.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/feature.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct36_3dnowext.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct36_3dnow.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct36_sse.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct36_x86_64.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct36_avx.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct36_neon.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct36_neon64.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_3dnowext.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_3dnow.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_altivec.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_i386.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_i486.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_mmx.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_sse.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_sse_float.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_x86_64.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_x86_64_float.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_neon.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_neon_float.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_neon64.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_neon64_float.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_avx.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/dct64_avx_float.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_3dnowext.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_3dnow.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_altivec.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_i486.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_i586_dither.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_i586.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_mmx.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_sse.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_sse_float.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_sse_s32.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_sse_accurate.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_sse_float.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_sse_s32.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_sse_accurate.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_x86_64.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_x86_64_float.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_x86_64_s32.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_x86_64_accurate.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_x86_64.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_x86_64_float.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_x86_64_s32.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_x86_64_accurate.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_arm.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_arm_accurate.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_neon.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_neon_float.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_neon_s32.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_neon_accurate.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_neon.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_neon_float.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_neon_s32.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_neon_accurate.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_neon64.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_neon64_float.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_neon64_s32.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_neon64_accurate.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_neon64.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_neon64_float.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_neon64_s32.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_neon64_accurate.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_avx.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_avx_float.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_avx_s32.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_stereo_avx_accurate.lo: \ + src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/ntom.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_8bit.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_real.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/synth_s32.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/equalizer_3dnow.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/tabinit_mmx.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/stringbuf.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/getcpuflags.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/getcpuflags_x86_64.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/getcpuflags_arm.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) +src/libmpg123/check_neon.lo: src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) + +src/libmpg123/libmpg123.la: $(src_libmpg123_libmpg123_la_OBJECTS) $(src_libmpg123_libmpg123_la_DEPENDENCIES) $(EXTRA_src_libmpg123_libmpg123_la_DEPENDENCIES) src/libmpg123/$(am__dirstamp) + $(AM_V_CCLD)$(src_libmpg123_libmpg123_la_LINK) -rpath $(libdir) $(src_libmpg123_libmpg123_la_OBJECTS) $(src_libmpg123_libmpg123_la_LIBADD) $(LIBS) +src/libout123/$(am__dirstamp): + @$(MKDIR_P) src/libout123 + @: > src/libout123/$(am__dirstamp) +src/libout123/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/libout123/$(DEPDIR) + @: > src/libout123/$(DEPDIR)/$(am__dirstamp) +src/libout123/module.lo: src/libout123/$(am__dirstamp) \ + src/libout123/$(DEPDIR)/$(am__dirstamp) +src/libout123/legacy_module.lo: src/libout123/$(am__dirstamp) \ + src/libout123/$(DEPDIR)/$(am__dirstamp) + +src/libout123/libmodule.la: $(src_libout123_libmodule_la_OBJECTS) $(src_libout123_libmodule_la_DEPENDENCIES) $(EXTRA_src_libout123_libmodule_la_DEPENDENCIES) src/libout123/$(am__dirstamp) + $(AM_V_CCLD)$(LINK) $(src_libout123_libmodule_la_OBJECTS) $(src_libout123_libmodule_la_LIBADD) $(LIBS) +src/libout123/libout123.lo: src/libout123/$(am__dirstamp) \ + src/libout123/$(DEPDIR)/$(am__dirstamp) +src/libout123/stringlists.lo: src/libout123/$(am__dirstamp) \ + src/libout123/$(DEPDIR)/$(am__dirstamp) +src/libout123/wav.lo: src/libout123/$(am__dirstamp) \ + src/libout123/$(DEPDIR)/$(am__dirstamp) +src/libout123/buffer.lo: src/libout123/$(am__dirstamp) \ + src/libout123/$(DEPDIR)/$(am__dirstamp) +src/libout123/xfermem.lo: src/libout123/$(am__dirstamp) \ + src/libout123/$(DEPDIR)/$(am__dirstamp) + +src/libout123/libout123.la: $(src_libout123_libout123_la_OBJECTS) $(src_libout123_libout123_la_DEPENDENCIES) $(EXTRA_src_libout123_libout123_la_DEPENDENCIES) src/libout123/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_libout123_la_LINK) -rpath $(libdir) $(src_libout123_libout123_la_OBJECTS) $(src_libout123_libout123_la_LIBADD) $(LIBS) +src/libout123/modules/$(am__dirstamp): + @$(MKDIR_P) src/libout123/modules + @: > src/libout123/modules/$(am__dirstamp) +src/libout123/modules/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/libout123/modules/$(DEPDIR) + @: > src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-aix.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alib.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alsa.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-arts.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-coreaudio.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-dummy.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-esd.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-hp.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-jack.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-mint.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-nas.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-openal.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-os2.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-oss.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-portaudio.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-pulse.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-qsa.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sdl.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sgi.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sndio.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sun.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-tinyalsa.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32_wasapi.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/libdefaultmodule.la: $(src_libout123_modules_libdefaultmodule_la_OBJECTS) $(src_libout123_modules_libdefaultmodule_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_libdefaultmodule_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_libdefaultmodule_la_LINK) $(am_src_libout123_modules_libdefaultmodule_la_rpath) $(src_libout123_modules_libdefaultmodule_la_OBJECTS) $(src_libout123_modules_libdefaultmodule_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_aix_la-aix.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_aix.la: $(src_libout123_modules_output_aix_la_OBJECTS) $(src_libout123_modules_output_aix_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_aix_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_aix_la_LINK) $(am_src_libout123_modules_output_aix_la_rpath) $(src_libout123_modules_output_aix_la_OBJECTS) $(src_libout123_modules_output_aix_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_alib_la-alib.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_alib.la: $(src_libout123_modules_output_alib_la_OBJECTS) $(src_libout123_modules_output_alib_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_alib_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_alib_la_LINK) $(am_src_libout123_modules_output_alib_la_rpath) $(src_libout123_modules_output_alib_la_OBJECTS) $(src_libout123_modules_output_alib_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_alsa_la-alsa.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_alsa.la: $(src_libout123_modules_output_alsa_la_OBJECTS) $(src_libout123_modules_output_alsa_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_alsa_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_alsa_la_LINK) $(am_src_libout123_modules_output_alsa_la_rpath) $(src_libout123_modules_output_alsa_la_OBJECTS) $(src_libout123_modules_output_alsa_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_arts_la-arts.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_arts.la: $(src_libout123_modules_output_arts_la_OBJECTS) $(src_libout123_modules_output_arts_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_arts_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_arts_la_LINK) $(am_src_libout123_modules_output_arts_la_rpath) $(src_libout123_modules_output_arts_la_OBJECTS) $(src_libout123_modules_output_arts_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_coreaudio_la-coreaudio.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_coreaudio.la: $(src_libout123_modules_output_coreaudio_la_OBJECTS) $(src_libout123_modules_output_coreaudio_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_coreaudio_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_coreaudio_la_LINK) $(am_src_libout123_modules_output_coreaudio_la_rpath) $(src_libout123_modules_output_coreaudio_la_OBJECTS) $(src_libout123_modules_output_coreaudio_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_dummy_la-dummy.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_dummy.la: $(src_libout123_modules_output_dummy_la_OBJECTS) $(src_libout123_modules_output_dummy_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_dummy_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_dummy_la_LINK) $(am_src_libout123_modules_output_dummy_la_rpath) $(src_libout123_modules_output_dummy_la_OBJECTS) $(src_libout123_modules_output_dummy_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_esd_la-esd.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_esd.la: $(src_libout123_modules_output_esd_la_OBJECTS) $(src_libout123_modules_output_esd_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_esd_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_esd_la_LINK) $(am_src_libout123_modules_output_esd_la_rpath) $(src_libout123_modules_output_esd_la_OBJECTS) $(src_libout123_modules_output_esd_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_hp_la-hp.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_hp.la: $(src_libout123_modules_output_hp_la_OBJECTS) $(src_libout123_modules_output_hp_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_hp_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_hp_la_LINK) $(am_src_libout123_modules_output_hp_la_rpath) $(src_libout123_modules_output_hp_la_OBJECTS) $(src_libout123_modules_output_hp_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_jack_la-jack.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_jack.la: $(src_libout123_modules_output_jack_la_OBJECTS) $(src_libout123_modules_output_jack_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_jack_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_jack_la_LINK) $(am_src_libout123_modules_output_jack_la_rpath) $(src_libout123_modules_output_jack_la_OBJECTS) $(src_libout123_modules_output_jack_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_mint_la-mint.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_mint.la: $(src_libout123_modules_output_mint_la_OBJECTS) $(src_libout123_modules_output_mint_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_mint_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_mint_la_LINK) $(am_src_libout123_modules_output_mint_la_rpath) $(src_libout123_modules_output_mint_la_OBJECTS) $(src_libout123_modules_output_mint_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_nas_la-nas.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_nas.la: $(src_libout123_modules_output_nas_la_OBJECTS) $(src_libout123_modules_output_nas_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_nas_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_nas_la_LINK) $(am_src_libout123_modules_output_nas_la_rpath) $(src_libout123_modules_output_nas_la_OBJECTS) $(src_libout123_modules_output_nas_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_openal_la-openal.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_openal.la: $(src_libout123_modules_output_openal_la_OBJECTS) $(src_libout123_modules_output_openal_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_openal_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_openal_la_LINK) $(am_src_libout123_modules_output_openal_la_rpath) $(src_libout123_modules_output_openal_la_OBJECTS) $(src_libout123_modules_output_openal_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_os2_la-os2.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_os2.la: $(src_libout123_modules_output_os2_la_OBJECTS) $(src_libout123_modules_output_os2_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_os2_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_os2_la_LINK) $(am_src_libout123_modules_output_os2_la_rpath) $(src_libout123_modules_output_os2_la_OBJECTS) $(src_libout123_modules_output_os2_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_oss_la-oss.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_oss.la: $(src_libout123_modules_output_oss_la_OBJECTS) $(src_libout123_modules_output_oss_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_oss_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_oss_la_LINK) $(am_src_libout123_modules_output_oss_la_rpath) $(src_libout123_modules_output_oss_la_OBJECTS) $(src_libout123_modules_output_oss_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_portaudio_la-portaudio.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_portaudio.la: $(src_libout123_modules_output_portaudio_la_OBJECTS) $(src_libout123_modules_output_portaudio_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_portaudio_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_portaudio_la_LINK) $(am_src_libout123_modules_output_portaudio_la_rpath) $(src_libout123_modules_output_portaudio_la_OBJECTS) $(src_libout123_modules_output_portaudio_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_pulse_la-pulse.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_pulse.la: $(src_libout123_modules_output_pulse_la_OBJECTS) $(src_libout123_modules_output_pulse_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_pulse_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_pulse_la_LINK) $(am_src_libout123_modules_output_pulse_la_rpath) $(src_libout123_modules_output_pulse_la_OBJECTS) $(src_libout123_modules_output_pulse_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_qsa_la-qsa.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_qsa.la: $(src_libout123_modules_output_qsa_la_OBJECTS) $(src_libout123_modules_output_qsa_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_qsa_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_qsa_la_LINK) $(am_src_libout123_modules_output_qsa_la_rpath) $(src_libout123_modules_output_qsa_la_OBJECTS) $(src_libout123_modules_output_qsa_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_sdl_la-sdl.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_sdl.la: $(src_libout123_modules_output_sdl_la_OBJECTS) $(src_libout123_modules_output_sdl_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_sdl_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_sdl_la_LINK) $(am_src_libout123_modules_output_sdl_la_rpath) $(src_libout123_modules_output_sdl_la_OBJECTS) $(src_libout123_modules_output_sdl_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_sgi_la-sgi.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_sgi.la: $(src_libout123_modules_output_sgi_la_OBJECTS) $(src_libout123_modules_output_sgi_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_sgi_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_sgi_la_LINK) $(am_src_libout123_modules_output_sgi_la_rpath) $(src_libout123_modules_output_sgi_la_OBJECTS) $(src_libout123_modules_output_sgi_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_sndio_la-sndio.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_sndio.la: $(src_libout123_modules_output_sndio_la_OBJECTS) $(src_libout123_modules_output_sndio_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_sndio_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_sndio_la_LINK) $(am_src_libout123_modules_output_sndio_la_rpath) $(src_libout123_modules_output_sndio_la_OBJECTS) $(src_libout123_modules_output_sndio_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_sun_la-sun.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_sun.la: $(src_libout123_modules_output_sun_la_OBJECTS) $(src_libout123_modules_output_sun_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_sun_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_sun_la_LINK) $(am_src_libout123_modules_output_sun_la_rpath) $(src_libout123_modules_output_sun_la_OBJECTS) $(src_libout123_modules_output_sun_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_tinyalsa_la-tinyalsa.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_tinyalsa.la: $(src_libout123_modules_output_tinyalsa_la_OBJECTS) $(src_libout123_modules_output_tinyalsa_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_tinyalsa_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_tinyalsa_la_LINK) $(am_src_libout123_modules_output_tinyalsa_la_rpath) $(src_libout123_modules_output_tinyalsa_la_OBJECTS) $(src_libout123_modules_output_tinyalsa_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_win32_la-win32.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_win32.la: $(src_libout123_modules_output_win32_la_OBJECTS) $(src_libout123_modules_output_win32_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_win32_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_win32_la_LINK) $(am_src_libout123_modules_output_win32_la_rpath) $(src_libout123_modules_output_win32_la_OBJECTS) $(src_libout123_modules_output_win32_la_LIBADD) $(LIBS) +src/libout123/modules/src_libout123_modules_output_win32_wasapi_la-win32_wasapi.lo: \ + src/libout123/modules/$(am__dirstamp) \ + src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + +src/libout123/modules/output_win32_wasapi.la: $(src_libout123_modules_output_win32_wasapi_la_OBJECTS) $(src_libout123_modules_output_win32_wasapi_la_DEPENDENCIES) $(EXTRA_src_libout123_modules_output_win32_wasapi_la_DEPENDENCIES) src/libout123/modules/$(am__dirstamp) + $(AM_V_CCLD)$(src_libout123_modules_output_win32_wasapi_la_LINK) $(am_src_libout123_modules_output_win32_wasapi_la_rpath) $(src_libout123_modules_output_win32_wasapi_la_OBJECTS) $(src_libout123_modules_output_win32_wasapi_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + 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 +src/libmpg123/testcpu.$(OBJEXT): src/libmpg123/$(am__dirstamp) \ + src/libmpg123/$(DEPDIR)/$(am__dirstamp) + +src/libmpg123/testcpu$(EXEEXT): $(src_libmpg123_testcpu_OBJECTS) $(src_libmpg123_testcpu_DEPENDENCIES) $(EXTRA_src_libmpg123_testcpu_DEPENDENCIES) src/libmpg123/$(am__dirstamp) + @rm -f src/libmpg123/testcpu$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(src_libmpg123_testcpu_OBJECTS) $(src_libmpg123_testcpu_LDADD) $(LIBS) +src/$(am__dirstamp): + @$(MKDIR_P) src + @: > src/$(am__dirstamp) +src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/$(DEPDIR) + @: > src/$(DEPDIR)/$(am__dirstamp) +src/audio.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/common.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/sysutil.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/control_generic.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/equalizer.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/getlopt.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/httpget.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/resolver.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/genre.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/mpg123.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/metaprint.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/local.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/playlist.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/streamdump.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/term.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/win32_support.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/win32_net.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) + +src/mpg123$(EXEEXT): $(src_mpg123_OBJECTS) $(src_mpg123_DEPENDENCIES) $(EXTRA_src_mpg123_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/mpg123$(EXEEXT) + $(AM_V_CCLD)$(src_mpg123_LINK) $(src_mpg123_OBJECTS) $(src_mpg123_LDADD) $(LIBS) +src/mpg123-id3dump.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) + +src/mpg123-id3dump$(EXEEXT): $(src_mpg123_id3dump_OBJECTS) $(src_mpg123_id3dump_DEPENDENCIES) $(EXTRA_src_mpg123_id3dump_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/mpg123-id3dump$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(src_mpg123_id3dump_OBJECTS) $(src_mpg123_id3dump_LDADD) $(LIBS) +src/mpg123-strip.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) + +src/mpg123-strip$(EXEEXT): $(src_mpg123_strip_OBJECTS) $(src_mpg123_strip_DEPENDENCIES) $(EXTRA_src_mpg123_strip_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/mpg123-strip$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(src_mpg123_strip_OBJECTS) $(src_mpg123_strip_LDADD) $(LIBS) +src/waves.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/out123.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) + +src/out123$(EXEEXT): $(src_out123_OBJECTS) $(src_out123_DEPENDENCIES) $(EXTRA_src_out123_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/out123$(EXEEXT) + $(AM_V_CCLD)$(src_out123_LINK) $(src_out123_OBJECTS) $(src_out123_LDADD) $(LIBS) +src/tests/$(am__dirstamp): + @$(MKDIR_P) src/tests + @: > src/tests/$(am__dirstamp) +src/tests/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/tests/$(DEPDIR) + @: > src/tests/$(DEPDIR)/$(am__dirstamp) +src/tests/noise.$(OBJEXT): src/tests/$(am__dirstamp) \ + src/tests/$(DEPDIR)/$(am__dirstamp) + +src/tests/noise$(EXEEXT): $(src_tests_noise_OBJECTS) $(src_tests_noise_DEPENDENCIES) $(EXTRA_src_tests_noise_DEPENDENCIES) src/tests/$(am__dirstamp) + @rm -f src/tests/noise$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(src_tests_noise_OBJECTS) $(src_tests_noise_LDADD) $(LIBS) +src/tests/plain_id3.$(OBJEXT): src/tests/$(am__dirstamp) \ + src/tests/$(DEPDIR)/$(am__dirstamp) + +src/tests/plain_id3$(EXEEXT): $(src_tests_plain_id3_OBJECTS) $(src_tests_plain_id3_DEPENDENCIES) $(EXTRA_src_tests_plain_id3_DEPENDENCIES) src/tests/$(am__dirstamp) + @rm -f src/tests/plain_id3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(src_tests_plain_id3_OBJECTS) $(src_tests_plain_id3_LDADD) $(LIBS) +src/tests/seek_whence.$(OBJEXT): src/tests/$(am__dirstamp) \ + src/tests/$(DEPDIR)/$(am__dirstamp) + +src/tests/seek_whence$(EXEEXT): $(src_tests_seek_whence_OBJECTS) $(src_tests_seek_whence_DEPENDENCIES) $(EXTRA_src_tests_seek_whence_DEPENDENCIES) src/tests/$(am__dirstamp) + @rm -f src/tests/seek_whence$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(src_tests_seek_whence_OBJECTS) $(src_tests_seek_whence_LDADD) $(LIBS) +src/tests/text.$(OBJEXT): src/tests/$(am__dirstamp) \ + src/tests/$(DEPDIR)/$(am__dirstamp) + +src/tests/text$(EXEEXT): $(src_tests_text_OBJECTS) $(src_tests_text_DEPENDENCIES) $(EXTRA_src_tests_text_DEPENDENCIES) src/tests/$(am__dirstamp) + @rm -f src/tests/text$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(src_tests_text_OBJECTS) $(src_tests_text_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f src/*.$(OBJEXT) + -rm -f src/compat/*.$(OBJEXT) + -rm -f src/compat/*.lo + -rm -f src/libmpg123/*.$(OBJEXT) + -rm -f src/libmpg123/*.lo + -rm -f src/libout123/*.$(OBJEXT) + -rm -f src/libout123/*.lo + -rm -f src/libout123/modules/*.$(OBJEXT) + -rm -f src/libout123/modules/*.lo + -rm -f src/tests/*.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/audio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/control_generic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/equalizer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/genre.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/getlopt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/httpget.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/local.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/metaprint.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mpg123-id3dump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mpg123-strip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mpg123.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/out123.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/playlist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/resolver.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/streamdump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sysutil.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/term.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/waves.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/win32_net.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/win32_support.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/compat/$(DEPDIR)/compat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/compat/$(DEPDIR)/compat_str.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/check_neon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct36_3dnow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct36_3dnowext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct36_avx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct36_neon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct36_neon64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct36_sse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct36_x86_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_3dnow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_3dnowext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_altivec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_avx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_avx_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_i386.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_i486.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_mmx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_neon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_neon64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_neon64_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_neon_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_sse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_sse_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_x86_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dct64_x86_64_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/dither.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/equalizer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/equalizer_3dnow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/feature.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/format.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/frame.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/getcpuflags.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/getcpuflags_arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/getcpuflags_x86_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/icy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/icy2utf8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/id3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/index.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/layer1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/layer2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/layer3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/lfs_alias.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/lfs_wrap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/libmpg123.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/ntom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/optimize.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/parse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/readers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/stringbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_3dnow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_3dnowext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_8bit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_altivec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_arm_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_i486.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_i586.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_i586_dither.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_mmx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_neon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_neon64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_neon64_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_neon64_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_neon64_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_neon_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_neon_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_neon_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_real.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_sse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_sse_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_sse_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_sse_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_avx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_avx_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_avx_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_avx_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_neon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_neon64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_neon64_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_neon64_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_neon64_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_neon_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_neon_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_neon_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_sse_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_sse_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_sse_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_x86_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_x86_64_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_x86_64_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_stereo_x86_64_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_x86_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_x86_64_accurate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_x86_64_float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/synth_x86_64_s32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/tabinit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/tabinit_mmx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libmpg123/$(DEPDIR)/testcpu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/$(DEPDIR)/buffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/$(DEPDIR)/legacy_module.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/$(DEPDIR)/libout123.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/$(DEPDIR)/module.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/$(DEPDIR)/stringlists.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/$(DEPDIR)/wav.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/$(DEPDIR)/xfermem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-aix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-alib.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-alsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-arts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-coreaudio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-dummy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-esd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-hp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-jack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-mint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-nas.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-openal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-os2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-oss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-portaudio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-pulse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-qsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sdl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sgi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sndio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sun.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-tinyalsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-win32_wasapi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_aix_la-aix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_alib_la-alib.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_alsa_la-alsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_arts_la-arts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_coreaudio_la-coreaudio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_dummy_la-dummy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_esd_la-esd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_hp_la-hp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_jack_la-jack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_mint_la-mint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_nas_la-nas.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_openal_la-openal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_os2_la-os2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_oss_la-oss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_portaudio_la-portaudio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_pulse_la-pulse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_qsa_la-qsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sdl_la-sdl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sgi_la-sgi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sndio_la-sndio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sun_la-sun.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_tinyalsa_la-tinyalsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_win32_la-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_win32_wasapi_la-win32_wasapi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/tests/$(DEPDIR)/noise.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/tests/$(DEPDIR)/plain_id3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/tests/$(DEPDIR)/seek_whence.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/tests/$(DEPDIR)/text.Po@am__quote@ + +.S.o: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< + +.S.obj: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.S.lo: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-aix.lo: src/libout123/modules/aix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-aix.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-aix.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-aix.lo `test -f 'src/libout123/modules/aix.c' || echo '$(srcdir)/'`src/libout123/modules/aix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-aix.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-aix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/aix.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-aix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-aix.lo `test -f 'src/libout123/modules/aix.c' || echo '$(srcdir)/'`src/libout123/modules/aix.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alib.lo: src/libout123/modules/alib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alib.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-alib.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alib.lo `test -f 'src/libout123/modules/alib.c' || echo '$(srcdir)/'`src/libout123/modules/alib.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-alib.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-alib.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/alib.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alib.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alib.lo `test -f 'src/libout123/modules/alib.c' || echo '$(srcdir)/'`src/libout123/modules/alib.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alsa.lo: src/libout123/modules/alsa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alsa.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-alsa.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alsa.lo `test -f 'src/libout123/modules/alsa.c' || echo '$(srcdir)/'`src/libout123/modules/alsa.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-alsa.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-alsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/alsa.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-alsa.lo `test -f 'src/libout123/modules/alsa.c' || echo '$(srcdir)/'`src/libout123/modules/alsa.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-arts.lo: src/libout123/modules/arts.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-arts.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-arts.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-arts.lo `test -f 'src/libout123/modules/arts.c' || echo '$(srcdir)/'`src/libout123/modules/arts.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-arts.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-arts.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/arts.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-arts.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-arts.lo `test -f 'src/libout123/modules/arts.c' || echo '$(srcdir)/'`src/libout123/modules/arts.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-coreaudio.lo: src/libout123/modules/coreaudio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-coreaudio.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-coreaudio.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-coreaudio.lo `test -f 'src/libout123/modules/coreaudio.c' || echo '$(srcdir)/'`src/libout123/modules/coreaudio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-coreaudio.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-coreaudio.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/coreaudio.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-coreaudio.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-coreaudio.lo `test -f 'src/libout123/modules/coreaudio.c' || echo '$(srcdir)/'`src/libout123/modules/coreaudio.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-dummy.lo: src/libout123/modules/dummy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-dummy.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-dummy.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-dummy.lo `test -f 'src/libout123/modules/dummy.c' || echo '$(srcdir)/'`src/libout123/modules/dummy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-dummy.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-dummy.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/dummy.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-dummy.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-dummy.lo `test -f 'src/libout123/modules/dummy.c' || echo '$(srcdir)/'`src/libout123/modules/dummy.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-esd.lo: src/libout123/modules/esd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-esd.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-esd.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-esd.lo `test -f 'src/libout123/modules/esd.c' || echo '$(srcdir)/'`src/libout123/modules/esd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-esd.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-esd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/esd.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-esd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-esd.lo `test -f 'src/libout123/modules/esd.c' || echo '$(srcdir)/'`src/libout123/modules/esd.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-hp.lo: src/libout123/modules/hp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-hp.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-hp.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-hp.lo `test -f 'src/libout123/modules/hp.c' || echo '$(srcdir)/'`src/libout123/modules/hp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-hp.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-hp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/hp.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-hp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-hp.lo `test -f 'src/libout123/modules/hp.c' || echo '$(srcdir)/'`src/libout123/modules/hp.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-jack.lo: src/libout123/modules/jack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-jack.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-jack.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-jack.lo `test -f 'src/libout123/modules/jack.c' || echo '$(srcdir)/'`src/libout123/modules/jack.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-jack.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-jack.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/jack.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-jack.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-jack.lo `test -f 'src/libout123/modules/jack.c' || echo '$(srcdir)/'`src/libout123/modules/jack.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-mint.lo: src/libout123/modules/mint.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-mint.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-mint.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-mint.lo `test -f 'src/libout123/modules/mint.c' || echo '$(srcdir)/'`src/libout123/modules/mint.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-mint.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-mint.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/mint.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-mint.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-mint.lo `test -f 'src/libout123/modules/mint.c' || echo '$(srcdir)/'`src/libout123/modules/mint.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-nas.lo: src/libout123/modules/nas.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-nas.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-nas.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-nas.lo `test -f 'src/libout123/modules/nas.c' || echo '$(srcdir)/'`src/libout123/modules/nas.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-nas.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-nas.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/nas.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-nas.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-nas.lo `test -f 'src/libout123/modules/nas.c' || echo '$(srcdir)/'`src/libout123/modules/nas.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-openal.lo: src/libout123/modules/openal.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-openal.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-openal.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-openal.lo `test -f 'src/libout123/modules/openal.c' || echo '$(srcdir)/'`src/libout123/modules/openal.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-openal.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-openal.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/openal.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-openal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-openal.lo `test -f 'src/libout123/modules/openal.c' || echo '$(srcdir)/'`src/libout123/modules/openal.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-os2.lo: src/libout123/modules/os2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-os2.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-os2.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-os2.lo `test -f 'src/libout123/modules/os2.c' || echo '$(srcdir)/'`src/libout123/modules/os2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-os2.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-os2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/os2.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-os2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-os2.lo `test -f 'src/libout123/modules/os2.c' || echo '$(srcdir)/'`src/libout123/modules/os2.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-oss.lo: src/libout123/modules/oss.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-oss.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-oss.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-oss.lo `test -f 'src/libout123/modules/oss.c' || echo '$(srcdir)/'`src/libout123/modules/oss.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-oss.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-oss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/oss.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-oss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-oss.lo `test -f 'src/libout123/modules/oss.c' || echo '$(srcdir)/'`src/libout123/modules/oss.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-portaudio.lo: src/libout123/modules/portaudio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-portaudio.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-portaudio.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-portaudio.lo `test -f 'src/libout123/modules/portaudio.c' || echo '$(srcdir)/'`src/libout123/modules/portaudio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-portaudio.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-portaudio.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/portaudio.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-portaudio.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-portaudio.lo `test -f 'src/libout123/modules/portaudio.c' || echo '$(srcdir)/'`src/libout123/modules/portaudio.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-pulse.lo: src/libout123/modules/pulse.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-pulse.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-pulse.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-pulse.lo `test -f 'src/libout123/modules/pulse.c' || echo '$(srcdir)/'`src/libout123/modules/pulse.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-pulse.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-pulse.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/pulse.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-pulse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-pulse.lo `test -f 'src/libout123/modules/pulse.c' || echo '$(srcdir)/'`src/libout123/modules/pulse.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-qsa.lo: src/libout123/modules/qsa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-qsa.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-qsa.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-qsa.lo `test -f 'src/libout123/modules/qsa.c' || echo '$(srcdir)/'`src/libout123/modules/qsa.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-qsa.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-qsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/qsa.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-qsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-qsa.lo `test -f 'src/libout123/modules/qsa.c' || echo '$(srcdir)/'`src/libout123/modules/qsa.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sdl.lo: src/libout123/modules/sdl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sdl.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sdl.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sdl.lo `test -f 'src/libout123/modules/sdl.c' || echo '$(srcdir)/'`src/libout123/modules/sdl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sdl.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sdl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/sdl.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sdl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sdl.lo `test -f 'src/libout123/modules/sdl.c' || echo '$(srcdir)/'`src/libout123/modules/sdl.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sgi.lo: src/libout123/modules/sgi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sgi.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sgi.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sgi.lo `test -f 'src/libout123/modules/sgi.c' || echo '$(srcdir)/'`src/libout123/modules/sgi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sgi.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sgi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/sgi.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sgi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sgi.lo `test -f 'src/libout123/modules/sgi.c' || echo '$(srcdir)/'`src/libout123/modules/sgi.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sndio.lo: src/libout123/modules/sndio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sndio.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sndio.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sndio.lo `test -f 'src/libout123/modules/sndio.c' || echo '$(srcdir)/'`src/libout123/modules/sndio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sndio.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sndio.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/sndio.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sndio.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sndio.lo `test -f 'src/libout123/modules/sndio.c' || echo '$(srcdir)/'`src/libout123/modules/sndio.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sun.lo: src/libout123/modules/sun.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sun.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sun.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sun.lo `test -f 'src/libout123/modules/sun.c' || echo '$(srcdir)/'`src/libout123/modules/sun.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sun.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-sun.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/sun.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sun.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-sun.lo `test -f 'src/libout123/modules/sun.c' || echo '$(srcdir)/'`src/libout123/modules/sun.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-tinyalsa.lo: src/libout123/modules/tinyalsa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-tinyalsa.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-tinyalsa.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-tinyalsa.lo `test -f 'src/libout123/modules/tinyalsa.c' || echo '$(srcdir)/'`src/libout123/modules/tinyalsa.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-tinyalsa.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-tinyalsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/tinyalsa.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-tinyalsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-tinyalsa.lo `test -f 'src/libout123/modules/tinyalsa.c' || echo '$(srcdir)/'`src/libout123/modules/tinyalsa.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32.lo: src/libout123/modules/win32.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-win32.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32.lo `test -f 'src/libout123/modules/win32.c' || echo '$(srcdir)/'`src/libout123/modules/win32.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-win32.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/win32.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32.lo `test -f 'src/libout123/modules/win32.c' || echo '$(srcdir)/'`src/libout123/modules/win32.c + +src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32_wasapi.lo: src/libout123/modules/win32_wasapi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32_wasapi.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-win32_wasapi.Tpo -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32_wasapi.lo `test -f 'src/libout123/modules/win32_wasapi.c' || echo '$(srcdir)/'`src/libout123/modules/win32_wasapi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-win32_wasapi.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_libdefaultmodule_la-win32_wasapi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/win32_wasapi.c' object='src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32_wasapi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libout123_modules_libdefaultmodule_la_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_libdefaultmodule_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_libdefaultmodule_la-win32_wasapi.lo `test -f 'src/libout123/modules/win32_wasapi.c' || echo '$(srcdir)/'`src/libout123/modules/win32_wasapi.c + +src/libout123/modules/src_libout123_modules_output_aix_la-aix.lo: src/libout123/modules/aix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_aix_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_aix_la-aix.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_aix_la-aix.Tpo -c -o src/libout123/modules/src_libout123_modules_output_aix_la-aix.lo `test -f 'src/libout123/modules/aix.c' || echo '$(srcdir)/'`src/libout123/modules/aix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_aix_la-aix.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_aix_la-aix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/aix.c' object='src/libout123/modules/src_libout123_modules_output_aix_la-aix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_aix_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_aix_la-aix.lo `test -f 'src/libout123/modules/aix.c' || echo '$(srcdir)/'`src/libout123/modules/aix.c + +src/libout123/modules/src_libout123_modules_output_alib_la-alib.lo: src/libout123/modules/alib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_alib_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_alib_la-alib.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_alib_la-alib.Tpo -c -o src/libout123/modules/src_libout123_modules_output_alib_la-alib.lo `test -f 'src/libout123/modules/alib.c' || echo '$(srcdir)/'`src/libout123/modules/alib.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_alib_la-alib.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_alib_la-alib.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/alib.c' object='src/libout123/modules/src_libout123_modules_output_alib_la-alib.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_alib_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_alib_la-alib.lo `test -f 'src/libout123/modules/alib.c' || echo '$(srcdir)/'`src/libout123/modules/alib.c + +src/libout123/modules/src_libout123_modules_output_alsa_la-alsa.lo: src/libout123/modules/alsa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_alsa_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_alsa_la-alsa.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_alsa_la-alsa.Tpo -c -o src/libout123/modules/src_libout123_modules_output_alsa_la-alsa.lo `test -f 'src/libout123/modules/alsa.c' || echo '$(srcdir)/'`src/libout123/modules/alsa.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_alsa_la-alsa.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_alsa_la-alsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/alsa.c' object='src/libout123/modules/src_libout123_modules_output_alsa_la-alsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_alsa_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_alsa_la-alsa.lo `test -f 'src/libout123/modules/alsa.c' || echo '$(srcdir)/'`src/libout123/modules/alsa.c + +src/libout123/modules/src_libout123_modules_output_arts_la-arts.lo: src/libout123/modules/arts.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_arts_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_arts_la-arts.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_arts_la-arts.Tpo -c -o src/libout123/modules/src_libout123_modules_output_arts_la-arts.lo `test -f 'src/libout123/modules/arts.c' || echo '$(srcdir)/'`src/libout123/modules/arts.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_arts_la-arts.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_arts_la-arts.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/arts.c' object='src/libout123/modules/src_libout123_modules_output_arts_la-arts.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_arts_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_arts_la-arts.lo `test -f 'src/libout123/modules/arts.c' || echo '$(srcdir)/'`src/libout123/modules/arts.c + +src/libout123/modules/src_libout123_modules_output_coreaudio_la-coreaudio.lo: src/libout123/modules/coreaudio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_coreaudio_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_coreaudio_la-coreaudio.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_coreaudio_la-coreaudio.Tpo -c -o src/libout123/modules/src_libout123_modules_output_coreaudio_la-coreaudio.lo `test -f 'src/libout123/modules/coreaudio.c' || echo '$(srcdir)/'`src/libout123/modules/coreaudio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_coreaudio_la-coreaudio.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_coreaudio_la-coreaudio.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/coreaudio.c' object='src/libout123/modules/src_libout123_modules_output_coreaudio_la-coreaudio.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_coreaudio_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_coreaudio_la-coreaudio.lo `test -f 'src/libout123/modules/coreaudio.c' || echo '$(srcdir)/'`src/libout123/modules/coreaudio.c + +src/libout123/modules/src_libout123_modules_output_dummy_la-dummy.lo: src/libout123/modules/dummy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_dummy_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_dummy_la-dummy.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_dummy_la-dummy.Tpo -c -o src/libout123/modules/src_libout123_modules_output_dummy_la-dummy.lo `test -f 'src/libout123/modules/dummy.c' || echo '$(srcdir)/'`src/libout123/modules/dummy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_dummy_la-dummy.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_dummy_la-dummy.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/dummy.c' object='src/libout123/modules/src_libout123_modules_output_dummy_la-dummy.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_dummy_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_dummy_la-dummy.lo `test -f 'src/libout123/modules/dummy.c' || echo '$(srcdir)/'`src/libout123/modules/dummy.c + +src/libout123/modules/src_libout123_modules_output_esd_la-esd.lo: src/libout123/modules/esd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_esd_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_esd_la-esd.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_esd_la-esd.Tpo -c -o src/libout123/modules/src_libout123_modules_output_esd_la-esd.lo `test -f 'src/libout123/modules/esd.c' || echo '$(srcdir)/'`src/libout123/modules/esd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_esd_la-esd.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_esd_la-esd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/esd.c' object='src/libout123/modules/src_libout123_modules_output_esd_la-esd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_esd_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_esd_la-esd.lo `test -f 'src/libout123/modules/esd.c' || echo '$(srcdir)/'`src/libout123/modules/esd.c + +src/libout123/modules/src_libout123_modules_output_hp_la-hp.lo: src/libout123/modules/hp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_hp_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_hp_la-hp.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_hp_la-hp.Tpo -c -o src/libout123/modules/src_libout123_modules_output_hp_la-hp.lo `test -f 'src/libout123/modules/hp.c' || echo '$(srcdir)/'`src/libout123/modules/hp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_hp_la-hp.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_hp_la-hp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/hp.c' object='src/libout123/modules/src_libout123_modules_output_hp_la-hp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_hp_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_hp_la-hp.lo `test -f 'src/libout123/modules/hp.c' || echo '$(srcdir)/'`src/libout123/modules/hp.c + +src/libout123/modules/src_libout123_modules_output_jack_la-jack.lo: src/libout123/modules/jack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_jack_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_jack_la-jack.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_jack_la-jack.Tpo -c -o src/libout123/modules/src_libout123_modules_output_jack_la-jack.lo `test -f 'src/libout123/modules/jack.c' || echo '$(srcdir)/'`src/libout123/modules/jack.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_jack_la-jack.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_jack_la-jack.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/jack.c' object='src/libout123/modules/src_libout123_modules_output_jack_la-jack.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_jack_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_jack_la-jack.lo `test -f 'src/libout123/modules/jack.c' || echo '$(srcdir)/'`src/libout123/modules/jack.c + +src/libout123/modules/src_libout123_modules_output_mint_la-mint.lo: src/libout123/modules/mint.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_mint_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_mint_la-mint.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_mint_la-mint.Tpo -c -o src/libout123/modules/src_libout123_modules_output_mint_la-mint.lo `test -f 'src/libout123/modules/mint.c' || echo '$(srcdir)/'`src/libout123/modules/mint.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_mint_la-mint.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_mint_la-mint.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/mint.c' object='src/libout123/modules/src_libout123_modules_output_mint_la-mint.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_mint_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_mint_la-mint.lo `test -f 'src/libout123/modules/mint.c' || echo '$(srcdir)/'`src/libout123/modules/mint.c + +src/libout123/modules/src_libout123_modules_output_nas_la-nas.lo: src/libout123/modules/nas.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_nas_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_nas_la-nas.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_nas_la-nas.Tpo -c -o src/libout123/modules/src_libout123_modules_output_nas_la-nas.lo `test -f 'src/libout123/modules/nas.c' || echo '$(srcdir)/'`src/libout123/modules/nas.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_nas_la-nas.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_nas_la-nas.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/nas.c' object='src/libout123/modules/src_libout123_modules_output_nas_la-nas.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_nas_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_nas_la-nas.lo `test -f 'src/libout123/modules/nas.c' || echo '$(srcdir)/'`src/libout123/modules/nas.c + +src/libout123/modules/src_libout123_modules_output_openal_la-openal.lo: src/libout123/modules/openal.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_openal_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_openal_la-openal.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_openal_la-openal.Tpo -c -o src/libout123/modules/src_libout123_modules_output_openal_la-openal.lo `test -f 'src/libout123/modules/openal.c' || echo '$(srcdir)/'`src/libout123/modules/openal.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_openal_la-openal.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_openal_la-openal.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/openal.c' object='src/libout123/modules/src_libout123_modules_output_openal_la-openal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_openal_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_openal_la-openal.lo `test -f 'src/libout123/modules/openal.c' || echo '$(srcdir)/'`src/libout123/modules/openal.c + +src/libout123/modules/src_libout123_modules_output_os2_la-os2.lo: src/libout123/modules/os2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_os2_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_os2_la-os2.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_os2_la-os2.Tpo -c -o src/libout123/modules/src_libout123_modules_output_os2_la-os2.lo `test -f 'src/libout123/modules/os2.c' || echo '$(srcdir)/'`src/libout123/modules/os2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_os2_la-os2.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_os2_la-os2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/os2.c' object='src/libout123/modules/src_libout123_modules_output_os2_la-os2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_os2_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_os2_la-os2.lo `test -f 'src/libout123/modules/os2.c' || echo '$(srcdir)/'`src/libout123/modules/os2.c + +src/libout123/modules/src_libout123_modules_output_oss_la-oss.lo: src/libout123/modules/oss.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_oss_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_oss_la-oss.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_oss_la-oss.Tpo -c -o src/libout123/modules/src_libout123_modules_output_oss_la-oss.lo `test -f 'src/libout123/modules/oss.c' || echo '$(srcdir)/'`src/libout123/modules/oss.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_oss_la-oss.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_oss_la-oss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/oss.c' object='src/libout123/modules/src_libout123_modules_output_oss_la-oss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_oss_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_oss_la-oss.lo `test -f 'src/libout123/modules/oss.c' || echo '$(srcdir)/'`src/libout123/modules/oss.c + +src/libout123/modules/src_libout123_modules_output_portaudio_la-portaudio.lo: src/libout123/modules/portaudio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_portaudio_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_portaudio_la-portaudio.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_portaudio_la-portaudio.Tpo -c -o src/libout123/modules/src_libout123_modules_output_portaudio_la-portaudio.lo `test -f 'src/libout123/modules/portaudio.c' || echo '$(srcdir)/'`src/libout123/modules/portaudio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_portaudio_la-portaudio.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_portaudio_la-portaudio.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/portaudio.c' object='src/libout123/modules/src_libout123_modules_output_portaudio_la-portaudio.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_portaudio_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_portaudio_la-portaudio.lo `test -f 'src/libout123/modules/portaudio.c' || echo '$(srcdir)/'`src/libout123/modules/portaudio.c + +src/libout123/modules/src_libout123_modules_output_pulse_la-pulse.lo: src/libout123/modules/pulse.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_pulse_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_pulse_la-pulse.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_pulse_la-pulse.Tpo -c -o src/libout123/modules/src_libout123_modules_output_pulse_la-pulse.lo `test -f 'src/libout123/modules/pulse.c' || echo '$(srcdir)/'`src/libout123/modules/pulse.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_pulse_la-pulse.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_pulse_la-pulse.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/pulse.c' object='src/libout123/modules/src_libout123_modules_output_pulse_la-pulse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_pulse_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_pulse_la-pulse.lo `test -f 'src/libout123/modules/pulse.c' || echo '$(srcdir)/'`src/libout123/modules/pulse.c + +src/libout123/modules/src_libout123_modules_output_qsa_la-qsa.lo: src/libout123/modules/qsa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_qsa_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_qsa_la-qsa.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_qsa_la-qsa.Tpo -c -o src/libout123/modules/src_libout123_modules_output_qsa_la-qsa.lo `test -f 'src/libout123/modules/qsa.c' || echo '$(srcdir)/'`src/libout123/modules/qsa.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_qsa_la-qsa.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_qsa_la-qsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/qsa.c' object='src/libout123/modules/src_libout123_modules_output_qsa_la-qsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_qsa_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_qsa_la-qsa.lo `test -f 'src/libout123/modules/qsa.c' || echo '$(srcdir)/'`src/libout123/modules/qsa.c + +src/libout123/modules/src_libout123_modules_output_sdl_la-sdl.lo: src/libout123/modules/sdl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_sdl_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_sdl_la-sdl.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sdl_la-sdl.Tpo -c -o src/libout123/modules/src_libout123_modules_output_sdl_la-sdl.lo `test -f 'src/libout123/modules/sdl.c' || echo '$(srcdir)/'`src/libout123/modules/sdl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sdl_la-sdl.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sdl_la-sdl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/sdl.c' object='src/libout123/modules/src_libout123_modules_output_sdl_la-sdl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_sdl_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_sdl_la-sdl.lo `test -f 'src/libout123/modules/sdl.c' || echo '$(srcdir)/'`src/libout123/modules/sdl.c + +src/libout123/modules/src_libout123_modules_output_sgi_la-sgi.lo: src/libout123/modules/sgi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_sgi_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_sgi_la-sgi.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sgi_la-sgi.Tpo -c -o src/libout123/modules/src_libout123_modules_output_sgi_la-sgi.lo `test -f 'src/libout123/modules/sgi.c' || echo '$(srcdir)/'`src/libout123/modules/sgi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sgi_la-sgi.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sgi_la-sgi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/sgi.c' object='src/libout123/modules/src_libout123_modules_output_sgi_la-sgi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_sgi_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_sgi_la-sgi.lo `test -f 'src/libout123/modules/sgi.c' || echo '$(srcdir)/'`src/libout123/modules/sgi.c + +src/libout123/modules/src_libout123_modules_output_sndio_la-sndio.lo: src/libout123/modules/sndio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_sndio_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_sndio_la-sndio.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sndio_la-sndio.Tpo -c -o src/libout123/modules/src_libout123_modules_output_sndio_la-sndio.lo `test -f 'src/libout123/modules/sndio.c' || echo '$(srcdir)/'`src/libout123/modules/sndio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sndio_la-sndio.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sndio_la-sndio.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/sndio.c' object='src/libout123/modules/src_libout123_modules_output_sndio_la-sndio.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_sndio_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_sndio_la-sndio.lo `test -f 'src/libout123/modules/sndio.c' || echo '$(srcdir)/'`src/libout123/modules/sndio.c + +src/libout123/modules/src_libout123_modules_output_sun_la-sun.lo: src/libout123/modules/sun.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_sun_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_sun_la-sun.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sun_la-sun.Tpo -c -o src/libout123/modules/src_libout123_modules_output_sun_la-sun.lo `test -f 'src/libout123/modules/sun.c' || echo '$(srcdir)/'`src/libout123/modules/sun.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sun_la-sun.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_sun_la-sun.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/sun.c' object='src/libout123/modules/src_libout123_modules_output_sun_la-sun.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_sun_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_sun_la-sun.lo `test -f 'src/libout123/modules/sun.c' || echo '$(srcdir)/'`src/libout123/modules/sun.c + +src/libout123/modules/src_libout123_modules_output_tinyalsa_la-tinyalsa.lo: src/libout123/modules/tinyalsa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_tinyalsa_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_tinyalsa_la-tinyalsa.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_tinyalsa_la-tinyalsa.Tpo -c -o src/libout123/modules/src_libout123_modules_output_tinyalsa_la-tinyalsa.lo `test -f 'src/libout123/modules/tinyalsa.c' || echo '$(srcdir)/'`src/libout123/modules/tinyalsa.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_tinyalsa_la-tinyalsa.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_tinyalsa_la-tinyalsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/tinyalsa.c' object='src/libout123/modules/src_libout123_modules_output_tinyalsa_la-tinyalsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_tinyalsa_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_tinyalsa_la-tinyalsa.lo `test -f 'src/libout123/modules/tinyalsa.c' || echo '$(srcdir)/'`src/libout123/modules/tinyalsa.c + +src/libout123/modules/src_libout123_modules_output_win32_la-win32.lo: src/libout123/modules/win32.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_win32_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_win32_la-win32.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_win32_la-win32.Tpo -c -o src/libout123/modules/src_libout123_modules_output_win32_la-win32.lo `test -f 'src/libout123/modules/win32.c' || echo '$(srcdir)/'`src/libout123/modules/win32.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_win32_la-win32.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_win32_la-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/win32.c' object='src/libout123/modules/src_libout123_modules_output_win32_la-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_win32_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_win32_la-win32.lo `test -f 'src/libout123/modules/win32.c' || echo '$(srcdir)/'`src/libout123/modules/win32.c + +src/libout123/modules/src_libout123_modules_output_win32_wasapi_la-win32_wasapi.lo: src/libout123/modules/win32_wasapi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_win32_wasapi_la_CFLAGS) $(CFLAGS) -MT src/libout123/modules/src_libout123_modules_output_win32_wasapi_la-win32_wasapi.lo -MD -MP -MF src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_win32_wasapi_la-win32_wasapi.Tpo -c -o src/libout123/modules/src_libout123_modules_output_win32_wasapi_la-win32_wasapi.lo `test -f 'src/libout123/modules/win32_wasapi.c' || echo '$(srcdir)/'`src/libout123/modules/win32_wasapi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_win32_wasapi_la-win32_wasapi.Tpo src/libout123/modules/$(DEPDIR)/src_libout123_modules_output_win32_wasapi_la-win32_wasapi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libout123/modules/win32_wasapi.c' object='src/libout123/modules/src_libout123_modules_output_win32_wasapi_la-win32_wasapi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_libout123_modules_output_win32_wasapi_la_CFLAGS) $(CFLAGS) -c -o src/libout123/modules/src_libout123_modules_output_win32_wasapi_la-win32_wasapi.lo `test -f 'src/libout123/modules/win32_wasapi.c' || echo '$(srcdir)/'`src/libout123/modules/win32_wasapi.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs + -rm -rf src/.libs src/_libs + -rm -rf src/compat/.libs src/compat/_libs + -rm -rf src/libmpg123/.libs src/libmpg123/_libs + -rm -rf src/libout123/.libs src/libout123/_libs + -rm -rf src/libout123/modules/.libs src/libout123/modules/_libs + -rm -rf src/tests/.libs src/tests/_libs distclean-libtool: -rm -f libtool config.lt @@ -573,87 +3630,58 @@ uninstall-pkgconfigDATA: @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + 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)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) +install-nodist_includeHEADERS: $(nodist_include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + 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)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done -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: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +uninstall-nodist_includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - 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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -665,15 +3693,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(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; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -682,18 +3706,16 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" - cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) - clean-cscope: -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-am -cscope.files: clean-cscope cscopelist-recursive cscopelist - -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -711,19 +3733,6 @@ distclean-tags: -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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'`; \ @@ -755,31 +3764,6 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ @@ -788,7 +3772,7 @@ distdir: $(DISTFILES) ! -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 + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -804,11 +3788,17 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -826,7 +3816,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -836,22 +3826,23 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(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" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -905,22 +3896,24 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am -check: check-recursive -all-am: Makefile $(MANS) $(DATA) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)"; do \ +check: check-am +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(PROGRAMS) $(MANS) \ + $(DATA) $(HEADERS) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive +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-recursive +installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ @@ -934,109 +3927,157 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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 src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/$(am__dirstamp) + -rm -f src/compat/$(DEPDIR)/$(am__dirstamp) + -rm -f src/compat/$(am__dirstamp) + -rm -f src/libmpg123/$(DEPDIR)/$(am__dirstamp) + -rm -f src/libmpg123/$(am__dirstamp) + -rm -f src/libout123/$(DEPDIR)/$(am__dirstamp) + -rm -f src/libout123/$(am__dirstamp) + -rm -f src/libout123/modules/$(DEPDIR)/$(am__dirstamp) + -rm -f src/libout123/modules/$(am__dirstamp) + -rm -f src/tests/$(DEPDIR)/$(am__dirstamp) + -rm -f src/tests/$(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-recursive +@HAVE_MODULES_FALSE@install-exec-hook: +@HAVE_MODULES_FALSE@uninstall-hook: +clean: clean-am -clean-am: clean-generic clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ + clean-pkglibLTLIBRARIES mostlyclean-am -distclean: distclean-recursive +distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf src/$(DEPDIR) src/compat/$(DEPDIR) src/libmpg123/$(DEPDIR) src/libout123/$(DEPDIR) src/libout123/modules/$(DEPDIR) src/tests/$(DEPDIR) -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags -dvi: dvi-recursive +dvi: dvi-am dvi-am: -html: html-recursive +html: html-am html-am: -info: info-recursive +info: info-am info-am: -install-data-am: install-man install-pkgconfigDATA +install-data-am: install-includeHEADERS install-man \ + install-nodist_includeHEADERS install-pkgconfigDATA -install-dvi: install-dvi-recursive +install-dvi: install-dvi-am install-dvi-am: -install-exec-am: - -install-html: install-html-recursive +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \ + install-pkglibLTLIBRARIES + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-am install-html-am: -install-info: install-info-recursive +install-info: install-info-am install-info-am: install-man: install-man1 -install-pdf: install-pdf-recursive +install-pdf: install-pdf-am install-pdf-am: -install-ps: install-ps-recursive +install-ps: install-ps-am install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-recursive +maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf src/$(DEPDIR) src/compat/$(DEPDIR) src/libmpg123/$(DEPDIR) src/libout123/$(DEPDIR) src/libout123/modules/$(DEPDIR) src/tests/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-recursive +mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-generic mostlyclean-libtool +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool -pdf: pdf-recursive +pdf: pdf-am pdf-am: -ps: ps-recursive +ps: ps-am ps-am: -uninstall-am: uninstall-man uninstall-pkgconfigDATA - +uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES uninstall-man \ + uninstall-nodist_includeHEADERS uninstall-pkgconfigDATA \ + uninstall-pkglibLTLIBRARIES + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ - cscopelist-recursive ctags-recursive install-am install-strip \ - tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-cscope \ - clean-generic clean-libtool cscope cscopelist \ - cscopelist-recursive ctags ctags-recursive dist dist-all \ - dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am 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-man \ - install-man1 install-pdf install-pdf-am install-pkgconfigDATA \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-man uninstall-man1 \ - uninstall-pkgconfigDATA +.MAKE: install-am install-exec-am install-strip uninstall-am + +.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ + clean-binPROGRAMS clean-cscope clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-noinstLIBRARIES \ + clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool 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-exec-hook install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-man install-man1 \ + install-nodist_includeHEADERS install-pdf install-pdf-am \ + install-pkgconfigDATA install-pkglibLTLIBRARIES 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 tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-hook \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-man uninstall-man1 uninstall-nodist_includeHEADERS \ + uninstall-pkgconfigDATA uninstall-pkglibLTLIBRARIES + +.PRECIOUS: Makefile + + +@USE_YASM_FOR_AVX_TRUE@$(AVX_OBJS): %.@OBJEXT@: %.S $(ASM_DEPS) +@USE_YASM_FOR_AVX_TRUE@ $(CPP) $(DEFAULT_INCLUDES) $(INCLUDES) -DASMALIGN_BALIGN $< | @YASM@ - @YASMFLAGS@ @YASM_FORMAT@ -o $@ + +@USE_YASM_FOR_AVX_TRUE@$(AVX_OBJS:.@OBJEXT@=.lo): %.lo: %.@OBJEXT@ +@USE_YASM_FOR_AVX_TRUE@ @echo "# Generated by ltmain.sh (GNU libtool)" >$@ +@USE_YASM_FOR_AVX_TRUE@ @echo "pic_object='`basename $<`'" >>$@ +@USE_YASM_FOR_AVX_TRUE@ @echo "non_pic_object='`basename $<`'" >>$@ +# Get rid of .la files, at least _after_ install. +@HAVE_MODULES_TRUE@install-exec-hook: +@HAVE_MODULES_TRUE@ cd $(DESTDIR)$(pkglibdir) && rm -f @output_modules_la@ +# The above breaks uninstall of module .so files? +@HAVE_MODULES_TRUE@uninstall-hook: +@HAVE_MODULES_TRUE@ for m in @output_modules_la@; do eval $$(grep dlname= src/libout123/modules/$$m) && rm -f $(DESTDIR)$(pkglibdir)/$$dlname; done # 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. diff --git a/deps/mpg123/NEWS b/deps/mpg123/NEWS index 556885b..35216bc 100644 --- a/deps/mpg123/NEWS +++ b/deps/mpg123/NEWS @@ -1,288 +1,1011 @@ -1.14.4 ---- +1.25.10 +------- -Who reworks a parsing and data mangling without really making sure that things still work like before? I hope I won't do so in future. Not again. +- libout123: Fix error messages beginning from OUT123_ARG_ERROR (bug 261). -- Fix resync logic to properly work again (used to prematurely end stream on bad headers). A regression again, this sucks, but at least we got a regression test for that now. -- Fix aeon-old regression (since 1.11.0) about short seeks: Bit reservoir was reset also for short seeks that did not break continuity. -- Another damned regression got fixed: Sample-accurate seek for files without full gapless info. +1.25.9 +------ +- mpg123: Fix --icy-interval handling to work with stream from stdin. + (curl | mpg123 --icy-interval=n -) +- libmpg123: Fix another invalid read and segfault on damaged (fuzzed) + files with part2_3_length == 0 (set maxband=1, pulled from upcoming 1.26.0). -1.14.3 ---- -- Fix regression from 1.14.1 in parsing of bad free format streams, avoiding apparently endless loops (just very slow reading, in fact). +1.25.8 +------ +- mpg123: +-- Also disable cursor/video games for empty TERM (not just unset and dumb). +- libmpg123: +-- Accept changing mode extension bits when looking for next header for + detecting free-format streams (bug 257). +-- Fix compute_bpf() for free format streams (needed to estimate track + length and working fuzzy seeking in absence of an Info tag). + +1.25.7 +------ +- mpg123: +-- Do not play with cursor and inverse video for progress bar + when TERM=dumb. +-- Fix parsing of host port for numerical IPv6 addresses (just did + not work before, only for textual host names). +- libmpg123: +-- Proper fix for the xrpnt overflow problems by correctly + initialising certain tables for MPEG 2.x layer III. The checks that + catch the resulting overflow are still in place, but likely superfluous + now. Note that this means certain valid files would have been misdecoded + before, if anyone actually produced them. Thanks to Robert Hegemann for + the fix! +-- Silently handle granules with part2_3_length == 0, but + scalefac_compress != 0 (ignore the latter). + +1.25.6 +------ +- Hotfix for bug 255: Overflow reading frame data bits in layer II decoding. + Now, all-zero data is returned if the frame data is exhausted. This might + have a slight impact on performance, but not easily measurable so far. -1.14.2 ---- -- Fix writing of WAV to stdout. - It is still not the best of ideas to do so, though. At least make sure to fix rate and channels. +1.25.5 +------ +- Avoid another buffer read overflow in the ID3 parser on 32 bit platforms + (bug 254). -1.14.1 ---- -- Fix subtle bug that could trigger failure to detect a format change on resync when using libmpg123's feeder API. - That bug has been there since ages but was neutralized by other (buggy) behaviour of the parser before the little overhaul. The Law of an Even Number of Bugs. +1.25.4 +------ +- Better configure checks for i?86-apple-darwin (bug 253). +- libmpg123: +-- Prevent harmless call to memcpy(NULL, NULL, 0). +-- More early checking of ID3v2 encoding values to avoid bogus text being + stored. + +1.25.3 +------ +- libmpg123: +-- Better checks for xrpnt overflow in III_dequantize_sample() before each + use, avoiding false positives and catching cases that were rendered + harmless by alignment-enlarged buffers. -1.14.0 +1.25.2 +------ +- libmpg123: +-- Extend pow tables for layer III to properly handle files with i-stereo and + 5-bit scalefactors. Never observed them for real, just as fuzzed input to + trigger the read overflow. Note: This one goes on record as CVE-2017-11126, + calling remote denial of service. While the accesses are out of bounds for + the pow tables, they still are safely within libmpg123's memory (other + static tables). Just wrong values are used for computation, no actual crash + unless you use something like GCC's AddressSanitizer, nor any information + disclosure. +-- Avoid left-shifts of negative integers in layer I decoding. + +1.25.1: Hot Fuzz +------- +- libmpg123: +-- Avoid memset(NULL, 0, 0) to calm down the paranoid. +-- Fix bug 252, invalid read of size 1 in ID3v2 parser due to forgotten + offset from the frame flag bytes (unnoticed in practice for a long + time). Fuzzers are in the house again. This one got CVE-2017-10683. +-- Avoid a mostly harmless conditional jump depending on uninitialised + fr->lay in compute_bpf() (mpg123_position()) when track is not ready yet. +-- Fix undefined shifts on signed long mask in layer3.c (worked in practice, + never right in theory). Code might be a bit faster now, even. + Thanks to Agostino Sarubbo for reporting. + +1.25.0: MP3 now patent-free worldwide! +------- +- Silence test for artsc-config if it is not there. +- Make sure -static-libgcc from LDFLAGS gets through libtool, + fixing 32 bit Windows builds (depend on libgcc DLL otherwise). +- Fix build with non-GNU make by using plain rm -f instead of silly $(RM) + in libout123/modules makefile fragment. +- Make build work on iOS, including coreaudio backend. +- libmpg123: +-- Finally provide position-independent code for x86 with assembly + optimisations.The textrels are gone thanks to Won Kyu Park and Taihei Momma. +-- Clarify some license language in files descending from the original MMX + optimisation. +-- Fix return value overflow check for MPG123_BUFFERFILL. +-- Introduced mpg123_getformat2() to enable the FORMAT command + for the generic control not stealing MPG123_NEW_FORMAT from the main + playback loop. The sequence LOADPAUSED-FORMAT-PAUSE (play) is supposed + to work now. +-- Enable aarch64 optimisations on *BSD by default, too. You can always + override that stupid OS whitelist using --with-optimization, anyway. +-- Use of the i486 decoder is now discouraged more prominently, in configure + output. +- out123: Fix stupid crash with verbose mode and tone generation (print + the string if the pointer is non-null, not if it is null). +- libout123: More consistent error messages for dynamic and legacy + (built-in) modules. Namely, you get a hint how if you choose a different + module than the built-in ones for a static libout123. + +1.24.0: +------- +- Avoid repeating genre in metadata printout for specifications like + (144)Thrash Metal. +- In remote control mode, only enforce --quiet if no verbosity was required. +- Prevent --loop and --shuffle or --random from messing with the remote + control LOADLIST command (printout of the list would loop without reason). +- Fix the mpg123 command (esp. our provided binaries on Windows) to now find + modules again relative to the executable directory, not the current working + directory. This was a regression in 1.23 and might be security-relevant if + you called mpg123 in working directories with untrusted content. + Note that mpg123 1.23 looked for modules relative to the current working + directory only if the installation prefix for modules did not exist. + So, usage on an intact installation (with /usr/lib/mpg123 or the like) was + safe. Nevertheless this new version fixes the search to be relative to the + binary path as it was with 1.22 and before. +- At least consistent behaviour of playlist code in the face of looping. + Looping is about individual tracks, always. They are looped also in random + mode. Jumping (prev/next keys) is between tracks and resets the loop counter. + The display of currently playing track in the playlist is fixed for random + and looped play now (bug 198). +- Looping is now mentioned for a to-be-repeated track with --verbose. +- Move some compiler nagging from --enable-debug to --enable-nagging, fix up + some new build failures by adding some pesky feature test macros. +- Try not to pollute the terminal buffer with old progress bars in inverse + video. Only the currently live one shall be seen. That one is pretty. The + others are not. +- Using plain dlopen()/LoadLibrary() for opening modules instead of libltdl. + This also means that --with-module-suffix is gone in configure. +- Windows builds only work when Unicode support is there (older than Windows + 2000/XP will definitely not work anymore). +- The out123 tool now features tone generation, with a mix of differing + wave patterns. Makes sense to be able to test the audio output by itself, + and it's fun. See --wave-freq and related parameters. +- libmpg123 version 43: +-- Add flags MPG123_NO_PEEK_END and MPG123_FORCE_SEEKABLE, as suggested + by Bent Bisballe Nyeng. +-- Build fix for MSVC (consistent definition of ssize_t, spotted by manx, + bug 243). +-- Build fix for --with-cpu=ppc_nofpu (thanks to Michael Kostylev, bug 244). +-- Add asm optimized MSVC++ Win32|x64 and UWP|x64 builds +-- Remove old, broken MSVC++ builds +- libout123 version 2: +-- Added OUT123_BINDIR. +-- New search order for output plugin directory: MPG123_MODDIR, or (relative + to executable directory OUT123_BINDIR) ../lib/mpg123, plugins + libout123/modules/.libs, libout123/modules, ../libout123/modules/.libs, + ../libout123/modules, and at last the installation prefix $libdir/mpg213/. + This shall ensure that a build inside a source tree does not try to use old + modules from the system prefix. The normal libtool wrapper deals with the + shared libout123 or libmpg123 only, not modules. + Note that if you set MPG123_MODDIR to a non-existing directory, no modules + will be found (earlier versions fell back to other choices). +-- The OUT123_NAME parameter is now copied by out123_param_from(), as is + the newly added OUT123_BINDIR. +-- Coreaudio: Use AudioComponents API on OSX >= 10.6 (thanks to Michael Weiser). +-- Coreaudio: Fix behaviour of out123_drop(), not killing the output anymore + without re-opening the device (bug 236, thanks to Taihei for the fix). + +1.23.8 +------ +- Fix long-standing bad memory read (via integer underflow) in ID3 parser + for crafted ID3v2 tags with tiny size information (bug 240). Thanks to + Han Lee & Jerold Hoong for the detailed report. + +1.23.7 +------ +- Fix the bad RPM spec file (broken since out123 addition, thanks + to Srikanth Rao for noticing). +- More out123_pause() in generic control mode, working around + bug 236. The coreaudio output needs to be more robust, though. +- Do not undef MPG123_EXPORT in the headers, rather be prepared for it + being defined already. This fixes MSVC builds, broken since 1.23.0 + (bug 239). + +1.23.6 +------ +- call out123_pause() instead of out123_stop() in remote control STOP + command, fixing the regression in 1.23.x of not being able to resume + playback with another LOAD unless the new track has differing audio + format (bug 234) + +1.23.5 +------ +- libout123: +-- fix build of portaudio and SDL on win32 (too many parentheses, + thanks to Sandro Cumerlato for pointing it out) +-- make out123_errcode() return OUT123_BAD_HANDLE as documented + (adding that value to the error enum, was documented but missing), + again thanks to Sandro +- fix windows-builds.sh (shell quoting in copying stage) and add some + bits to shipped header to make it directly usable in MSVC (define ssize_t, + bug 232) +- no overwriting of LIBS in Makefile (build system regression in 1.23, + thanks to Peter Korsgaard for reporting that one) +- no printing of message in response to SIGPIPE, as that could trigger + a hang if stderr itself is the piped culprit (regression from 1.22, bug 233) + +1.23.4 +------ +- mpg123: Fix logic of prebuffering small bits for glitch-free start of + playback. The logic as introduced in 1.23.0 actually introduced stuttering! + The fix for this is really minimal and I urge everyone to at least include + that one. It is the changeset of rev. 4041. +- libout123: +-- Actually make OUT123_KEEP_PLAYING on by default, as documented. +-- Fix buffer logic with regard to draining, use common device writing + code to handle resuming from pause. This fixes sdl output with buffer, + possibly other sfifo-based outputs like CoreAudio (those were poorly + tested with buffer, as the combination is indeed unusual, see bug 230). +-- Buffer pauses devices for prebuffering, to avoid underruns. +-- More reliable playback with SDL, Portaudio and CoreAudio outputs. + This includes FIFO draining on close to avoid dropping of the end. + It should fix parts of bug 230. +-- Fixed memory leaks with some outputs where a call to the deinit() + function is necessary during available/working module checking. +- mpg123, out123: Use the default output flags to get OUT123_KEEP_PLAYING. + Without this, there is a good chance to abort on SIGSTOP/CONT while playing. + This is a regression from 1.22 . +- Build fixes (bugs 227 and 228) and some build system hackery. + Gone are libc feature test macros in compat.h . This means always + using our own strdup() implementation. Simpler than being bugged by + feature test macros in strict compiler mode (when _DEFAULT_SOURCE is not + defined). +- ./configure --enable-nagging does something also without --enable-debug, + explictly triggers -std=c89, too (hence the above). +- Some fixup to make things work in pedantic C89 mode again. + It really might be time to swich on some serious C99 for the next release, + since there's a followup standard to _that_ which we can ignore now. +- Update list of renamed internal symbols to reduce conflicts during static + linking of libmpg123 or libout123. +- Internal compatibility functions now handled via libtool convenience + archives, avoiding the hackish code copies. + +1.23.3: +------- +- mpg123: Man page fixes by ESR. +- Actually check for sys/select.h (again?) in configure so that it is used. + Fixes build on a Cygwin install, at least. +- libmpg123: Always default to enabled IEEE 754 hack for rounding on all + platforms, use ./configure --disable-ieeefloat if you do not want it. + As a protection for the exotic machine that does not use IEEE floating + point storage format, mpg123_init() will error out early if the rounding + does not work out. + +1.23.2: +------- +- mpg123: Fix compact ID3 tag printing to take UTF-8 character count + into account again (thoughtless regression in 1.23.0). + +1.23.1: +------- +- libout123: +-- Fix logic to prevent cases of output devices being closed more than once + (stop after pausing triggered multiple close calls, which broke sndio, for + example). +-- Fix JACK output handling of port wishlist, was simply broken for more than + two ports (-o jack -a port1,port2,port3). Now, it is ensured that each + output ports gets some connection to an out123 channel, possibly splitting + one to multiple ports or mixing multiple channels into one port (cyclic + connection scheme). Note that this does only apply for an explicitly given + list of ports. You can still use --stereo to ensure that two output ports + (if found) are used also for mono tracks. +-- Also use jack_free() in JACK output for ports list. +-- And finally, ensure that pthread library is linked to JACK module (would need + hacking to work on non-POSIX, replacing sem_t with equivalent). + +- mpg123: +-- Hide networking-related command-line parameters when disabled. + +1.23.0: +------- +- libmpg123 version 42 +-- This adds mpg123_framelength() and makes mpg123_position() truly obsolete. +-- Equalizer optional now (./configure --disable-equalizer) to save precious + memory +-- Clip decode tables for large amplification with fixed-point decoders. + Without that, high-pitched distortion enters really quickly when + trying to increase volume even if output samples would not be clipped, + weren't it for fixed-point math. +- libout123 version 1: First incarnation of libout123, a basic library to + get audio data written to audio devices (or files) in simple blocking + manner as opposed to callback APIs (which it wraps over). This collects + the output modules of mpg123 and makes them available to the wider + masses. Also, the separate shared memory buffer process (contained + in libout123) got a lot of reworking which should be noticable in the + interaction with terminal control. +-- Some tuning of several output drivers (modules) regarding flexible + buffer size, client names, supported formats. +-- Notably the JACK output got a major overhaul and now does not swallow + audio at the end anymore. Huge latency also reduced and tunable. Encoding + fixed to floating point, so that libmpg123 actually chooses what is + sensible. +- Added mpg123 --no-infoframe. +- Detect terminal on input side and enable control keys automatically. + There is --no-control now to disable terminal control anyway. +- Display stuff: +-- Avoid spillover of status line that caused unwanted terminal scrolling. + If the terminal width is smaller than the full status string, a cut is + made to make it fit. +-- Draw a progress bar on the terminal by inversing colors behind status + line. +-- Rework the format of the status line to be more compact and consistent. +-- Rework smart tag printout for adapting to terminal width. +-- Warning messages also start with a line break now to better fit in with + verbose playback. +-- Doubly-verbose mode now needed for long MPEG header print out. + It is a higher level of verbosity than printing the current position. + The compact header is a better fit. +-- Compact header printout also compacted, example: + MPEG 1.0 L III cbr128 44100 j-s +-- Reporting of clipped samples also includes a line break now. +-- Keep ID3v2 data around for terminal control to be able to print on + demand. That was broken for some time. +- Default for --preload now is 0.2 instead of 1 (fill whole buffer before + playback). The maximum is 0.5 . This is mandated by corrected buffer + interaction in libout123. +- Improved interaction with buffer process in terminal control mode. + Seeking is more transparent now, taking dropped samples from buffer into + account to avoid unintended jumps. Direct seeks with number row do not + pause playback anymore. +- Silently skip APE tags (thanks to Hans de Goede). +- Some reduction in bitrot on AIX (typos in output module, build with + --disable-largefile --with-audio=aix, real test welcome). +- Added '[' and ']' keys to skip to previous/next directory in playlist. +- Added support for Haiku to configure script (thanks to Jerome Duval). +- Remove spurious Frankenstein warning when scanning files that have no + gapless info (the reported value of -1152 gapless sample length should be + a giveaway anyway). +- Fix a bug in the command line parser that was present from the beginning, + apparently, causing certain parameters (--au, --cdr) to kill off parsing + of following ones. Nobody complained in all these years. Astounding. +- Forget content type from HTTP redirects (relate to error pages, not the + stream redirected to), fixes web radio streams that do not send any + content type for the actual stream. +- Accept application/pls+xml for PLS playlists. It happens. Don't ask + mpg123 to actually parse any XML! +- Ignore whitespace after HTTP MIME types (esp. before a ";"). +- Added --name to mpg123 and out123 for providing client name p.ex. for JACK. + There is no default of appending the PID to "mpg123" as client name anymore, + just plain "mpg123" or "out123". +- Added --devbuffer to mpg123 and out123 for influencing device buffer and + possible latency a bit (perhaps more so in future when drivers are adapted + to pay more attention to that). +- Added out123 --channels , --list-encodings, --test-format, + --test-encodings, --query-format. +- Calling ./configure --enable-nagging does not include --enable-debug anymore, + you specify that separately. +- Fix for newer glibc that wants higher POSIX feature test for getaddrinfo() + stuff. + +1.22.4: +------- +- Fix stupid regression introduced with a bugfix in 1.14.1 to make + free format streams work again. It took 3 years for someone to notice. + I added a regression test for that now! + +1.22.3: +------- +- Fix UTF-16 surrogate detection because that used to falsely detect + characters above 0xDFFF as surrogates (bug 216). + +1.22.2: +------- +- Fix buffering for funny sample formats (namely, 24 bit), that do not + fit nicely into 32768 bytes. Effect was a nasty endless loop where + mpg123 needs to be externally killed. + +1.22.1: +------- +- Fix mpg123-id3dump when writing images with funny (manipulated) MIME type. + Stupid mistake in length computation of the fallback file extension caused + junk from memory being appended to the filename if the pointer size + is less than 64 bit. For 64 bit pointers (or longer) it was correct by + accident. +- Fix pedantic build by cleaning up out123 source, also now really showing + the encoding list in --longhelp instead of possibly, again, writing junk + from memory in there. +- Not linking libmpg123 against libltdl anymore (bug 215). +- Update MSVC++ ports a bit to make them work again. + +1.22.0: +------- +- libmpg123 version 41 +- Build fix: Avoid name clash on OSX SDK with "normal" being defined in + an enum already. +- More resilience against folks who do not check errors and rather pass + NULL pointers around (see NEWS.libmpg123). + This changes some return values to MPG123_BAD_HANDLE instead of MPG123_ERR + (always check for != MPG123_OK). +- Fix WAV writing to stdout on Windows (bug 214). +- Rework Xing/Info/Lame tag parsing, also detecting short ones without + the TOC now. + In addition, the warning about file size being off is a _lot_ more + accurate now. + +1.21.0: +------- +- Use LL as shortcut for LOADLIST remote command, L is taken already (bug 210). +- Less namespace pollution (MPG123_EXPORT in header instead of EXPORT, bug 212). + +1.20.1: +------- +- Make feed reader more efficient when skipping junk by early discarding + of data from buffers to avoid re-parsing. + +1.20.0: +------- +- Added NEON optimized decoder for AArch64 (ARM 64bit environment) +-- enabled for --with-cpu=neon64 (NEON only) or --with-cpu=aarch64 (runtime + switch between neon and generic_fpu, like arm_fpu) configuration +-- compatible with aarch64-linux-gnu toolchains (from Ubuntu, debian) + and Xcode 5 +- Added new binary out123 only with the audio output part of mpg123. + This is a precursor to separating out said code into a simple audio + output library. It also allows plugging in some processing in a pipe + before feeding to output. +- Prevent opendir(NULL) for unknown module directory when listing modules. +- some build fixes, among those fixing mpg123-id3dump on Windows + +1.19.0: +------- +- libmpg123 version 40 +- Support float and 32/24 bit integer output also with fixed-point decoders + (conversion from 16 bit precision). +- A-Law output encoding is actually implemented now (Michael introduced + the encoding back in the old days without ever implementing theconversion + table, apparently). +- Added --with-cpu=arm_fpu as decoder choice for runtime switch between + plain fpu code and NEON. +- Fix ARM builds to work properly on debian systems without special CFLAGS + (NEON decoder, specifically). +- Make scripts/benchmark-cpu.pl check the return value instead of delivering + crazy timings for crashed mpg123. +- Trigger track initialization in mpg123_info() to avoid use of uninitialized + variables (watch out for MPG123_NEED_MORE return value!). +- Fix integer code to 32 bit numbers where it would waste 64 bit on + modern systems. +- Add non-executable stack marking also to ARM assembly. + +1.18.1: +------- +- Do not close buffer twice with mpg123 -R (delete outdated code in + control_generic(), fixing bug 207. +- Do not mess around with first command line argument to extract program + name, use a copy instead, fixing bug 205. +- Prevent premature exit on timing of failure to open a track in the + playlist and the user wanting to skip over it (bug 206). +- Fixup of HTTP socket mess, also avoiding unnecessary FILE objects (bug + 204, patch by Rajeev V. Pillai). +- Fix playlist behaviour on slow HTTP streams, jumping back ('d' key) + from first track stays at first track (thanks to Rajeev again, sub-bug of + bug 206). +- Fix Frankenstein check not to stumble over ID3v1 tags. My apologies. As + a bonus, the position of the concerned code in the parser is now far + more logical. + +1.18.0: +------- +- libmpg123 version 39 +- Big version increase for clear distinction regarding the 1.14.x regression + fixes in libmpg123. +- Regression fix: Ensure decoder reinitialization on combination of seek + and resync (buffer overflow bug 201, introduced in 1.14.1). +- Regression fix: Make parsing really end on reaching of junk limit + (introduced in 1.14.4). +- Add check for bad bit allocation value in layer I decoder (removes + audible glitch in bug 201 test file). +- Avoid wrong error message about Frankenstein streams when gapless + decoding disabled. +- Be verbose about big header changes (Frankenstein streams). Note that + changes in samples per frame will confuse the seeking code, but decoding + can get through. +- Actually use the full routine to close tracks. Avoids socket leak when + playing multiple HTTP streams from a playlist (bug 203). +- Send correct host header when connecting through HTTP proxy (bug 202, + figured out by Rajeev V. Pillai). +- The console application now informs about changed major stream properties + (prints out another header line). + +1.17.0: +------- +- mpg123-id3dump --no-scan; for speedup +- hide -C parameter from mpg123 --help when it is not supported +- added tinyalsa Output (by Jarno Lehtinen) +- build system tweaking +- some care for fixing Cygwin builds + +1.16.0: +------- +- Taihei strikes again: +-- New Huffman decoding scheme (configurable, on by default) brings nice + boost to mpg123 to make it the fastest decoder on modern CPUs again. +-- new AVX decoder +-- assembly-optimized DCT36 for SSE and AVX +- added configs for vintage 3DNow(ext) CPUs (AMD K6) utilizing assembly DCT36 +- added configs for vintage SSE CPUs (Pentium M), utilizing C DCT36 +- added FORMAT command to generic control +- added support for ID3v2 APIC frames +- added mpg123-id3dump as official companion to extract meta data + (including writing of album art from APIC to files) +- added mpg123-strip as official companion to strip dirt out of MPEG streams + (including meta data) +- not deleting ID3 data right after printing in generic control +- module loader a bit more flexible with relative MPG123_MODDIR +- Fix chopped-off playback with pulseaudio output: draining the output + now on closing. +- SDL output fixup, a) not chopping off end and b) non-fatal underrun +- Fix obvious errors in win32 output ... does it now play the end of + tracks? Need someone to test this. +- added support for screen and iris-ansi terminals with --title (as prompted + by patch from sf.net user canavan) +- fixes/enhancements for sgi audio output +- libmpg123: proper largefile aliases for proper systems (FreeBSD with + one one-and-only off_t + This enables client software that insists on defining pointless + _FILE_OFFSET_BITS. +- wrapper script src/mpg123-with-modules to ease the pain of running mpg123 + with modules without installation (setting MPG123_MODDIR) +- removed ALSA 0.5 code (unused for longtime, last GPL-only bit) + +1.15.4: +------- +- Writing CDDA data via --cdr works again; had also been broken by attempts + to catch failing writes because of full disk. +- Also, the return values of WAV/CDR writing routines now properly indicate + error to avoid stupid endless loop of "smart" audio writing code that wants + to handle interruptions. Really, --cdr could just go and nobody would miss + it ... +- Fix stupid bug in mpg123_chomp_string() (introduced in 1.15.1), empty + lines were badly treated. Only usage in mpg123 is for parsing HTTP redirect + headers; malicious HTTP servers might exploit that (possibility to zero + bytes in memory). +- some cleanup for nagging mode +- more resync strictness to really catch (all) cases with changing decoder + structure; in practice badly needed when disabling seekbuffer (so it's + your fault, somehow ...) for non-seekable streams, otherwise not really + an issue because of readahead checking + I repeat: This fixes possibly fatal behaviour in the parser when readahead + checking is explicitly disabled (p.ex. via mpg123 --no-seekbuffer on + http streams). By default, readahead checking is _always_ active! +- build system fixed for automake 1.13 (thanks to Nix) + +1.15.3 --- +- Fix WAV writing. AGAIN. People love to decode WAV to stdout in various + ways that started to get broken with me starting to care for people who + like to write to full disks. I frikkin' HATE this rat race! I'm even + starting to SHOUT. Now, the code prefers to write no header at all (when + there is no actual output) instead of possibly writing too many misleading + ones. Getting the blame for breaking dir2ogg repeatedly while trying to + cope with one fatal situation that you cannot really cope with sucks. Big + time. I hope that's it now! + +1.15.2: +------- +- build fix with older shells (== in configure) + +1.15.1: +------- +- libmpg123 API version 37 +- Fix corner case in HTTP communication with missing path in Location header + (bug 187). +- Prevent nasty alignment issues by not guessing about assembler alignment + when .balign is available (bug 188). + +1.15.0: +------- +- Added --continue (also see scripts/conplay). +- Added number row to terminal control keys for 10% jump points (for + navigating long tracks). +- Set xterm title always if asked, disregarding the -q switch (if you want + fully quiet, don't specify --title). +- Enable terminal mode in OS/2 by explicitly checking for and using + os2term library. +- Getting WAV/AU/CDR writing back to a sane state while still catching + out-of-disk when writing headers (none in case of CDR) but removing + that initial test that prevented writing on any non-seekable file (like, + /dev/stdout to a pipe). +- Added native audio output for QNX (thanks to Mike Gorchak), also improving + portability of configure script while at that. +- more robust recovery from ALSA issues (device suspend) +- Fix crash in module loader on *BSD. +- Extend time display to switch to hours above 60 minutes (hh:mm:ss, + ditching the sub-second precision) +- really include dithering in default x86-64 build. +- Fix mpg123_scan() not properly seeking back for all types of files (bug + 3582628 ... it got a different number on sf.net now ... brilliant, folks!). +- Prevent false positives for "Frankenstein!" when using mpg123_scan(). +- Fix printing of negative positions with buffer (bug 186). +- Accept application/x-scpls as additional MIME type. +- Try to handle certain Windows toolchains that miss EOVERFLOW. + +1.14.4: +------- +Who reworks a parsing and data mangling without really making sure that +things still work like before? I hope I won't do so in future. Not again. + +- Fix resync logic to properly work again (used to prematurely end stream + on bad headers). A regression again, this sucks, but at least we got a + regression test for that now. +- Fix aeon-old regression (since 1.11.0) about short seeks: Bit reservoir + was reset also for short seeks that did not break continuity. +- Another damned regression got fixed: Sample-accurate seek for files + without full gapless info. + +1.14.3: +------- +- Fix regression from 1.14.1 in parsing of bad free format streams, + avoiding apparently endless loops (just very slow reading, in fact). + +1.14.2: +------- +- Fix writing of WAV to stdout. + It is still not the best of ideas to do so, though. At least make sure + to fix rate and channels. + +1.14.1: +------- +- Fix subtle bug that could trigger failure to detect a format change on + resync when using libmpg123's feeder API. + That bug has been there since ages but was neutralized by other (buggy) + behaviour of the parser before the little overhaul. The Law of an Even + Number of Bugs. + +1.14.0: +------- - libmpg123 API version 36 (see NEWS.libmpg123) - Add --ignore-streamlength. -- But also deal with concatenated (Frankenstein) streams: Not applying gapless cutting once we're over the announced number of frames. -- Also, gapless cutting is only applied if relevant information is present. Previously, at least the decoder delay has been cut. +- But also deal with concatenated (Frankenstein) streams: Not applying + gapless cutting once we're over the announced number of frames. +- Also, gapless cutting is only applied if relevant information is + present. Previously, at least the decoder delay has been cut. - Add --lyrics for printout of lyrics (from USLT in ID3v2). -- Added handling of SIGUSR1 and SIGUSER2 to terminal control code, configurable via --ctrlusr1 and --ctrlusr2. -- Some low-level API added (mpg123_framedata(), mpg123_framepos(), buffering and resampling control). +- Added handling of SIGUSR1 and SIGUSER2 to terminal control code, + configurable via --ctrlusr1 and --ctrlusr2. +- Some low-level API added (mpg123_framedata(), mpg123_framepos(), buffering + and resampling control). - Added info about input buffer fill to mpg123_getstate(). -- ReplayGain: Try to detect LAME below 3.95 for the different reference level of 83 dB (adding preamp of 6 dB). Version 3.95 itself (not 3.95.1) I cannot detect. User-set gain values are not touched. -- Keep silent about missing bit reservoir when ignoring frames. That is the whole point (mostly;-). -- Add the new/old WRITE_SAMPLE variant from MPlayer that makes the generic decoder faster on older CPUs (x86 at least). Not on x86-64, though (it's not enabled per default there). -- Handle out-of-disk in the file writers (a bit, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=67259) +- ReplayGain: Try to detect LAME below 3.95 for the different reference + level of 83 dB (adding preamp of 6 dB). Version 3.95 itself (not 3.95.1) + I cannot detect. User-set gain values are not touched. +- Keep silent about missing bit reservoir when ignoring frames. That is + the whole point (mostly;-). +- Add the new/old WRITE_SAMPLE variant from MPlayer that makes the generic + decoder faster on older CPUs (x86 at least). Not on x86-64, though (it's + not enabled per default there). +- disable 3DNow and 3DNowExt DCT36, which is slow on modern CPUs +- Handle out-of-disk in the file writers (a bit, see + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=67259) - Added Xcode project files to build libmpg123 on Mac OS and iOS - 32 bit output for sndio output (patch by Brad Smith). - Remote control interface knows LOADLIST command now. - Now freeing meta data memory after printout. - Some documentation cleanup, including manpage fixes by quadrispro. -- Re-enabled wildcard expansion on Windows (been broken by unicode file name support). +- Re-enabled wildcard expansion on Windows (been broken by unicode file + name support). - Fix MMX tabinit syntax (thanks to Marcel Müller for pointing that out). - Fix SGI audio output (been broken since change to modules). -- Fix some fringe behaviour (mpg123_getformat() triggering needless reading of next frame, possibly hitting bogus MPG123_NEED_MORE). -- Resync limit now also serves to increase amount of skipped junk on beginning. -- Better separation of stream end and read error (in case there is no stream opened, even). -- Don't always complain about failed free format header search (only with verbosity level 3). - -1.13.8 ---- +- Fix some fringe behaviour (mpg123_getformat() triggering needless reading + of next frame, possibly hitting bogus MPG123_NEED_MORE). +- Resync limit now also serves to increase amount of skipped junk on + beginning. +- Better separation of stream end and read error (in case there is no + stream opened, even). +- Don't always complain about failed free format header search (only with + verbosity level 3). + +1.13.8: +------- - Fix build for ARM Thumb (incompatible assembly in some macros). -1.13.7 ---- -- Fix endless loop in module loader when starting mpg123 in a directory that does not exist. +1.13.7: +------- +- Fix endless loop in module loader when starting mpg123 in a directory + that does not exist. -1.13.6 ---- -- Fix output of one random character in -vvv mode for ID3v2.2 frames (no buffer overflow, move along, folks;-). +1.13.6: +------- +- Fix output of one random character in -vvv mode for ID3v2.2 frames + (no buffer overflow, move along, folks;-). -1.13.5 ---- +1.13.5: +------- - Fix reading of ReplayGain values from Lame tag (nobody seen this before?!) (both actual values and the distinction between audiophile / radio). - Accept application/octet-stream as input from HTTP. - Update man page with encodings. - Build fixes. -1.13.4 ---- -- Fix bogus error on resync with big offsets (hits systems that have bigger off_t than int), bug 3393801. +1.13.4: +------- +- Fix bogus error on resync with big offsets (hits systems that have bigger + off_t than int), bug 3393801. - Fix windows binary package build script again with plugdir. -1.13.3 ---- +1.13.3: +------- - Fix an endless loop on bad headers, bug 3267863. - Prevent compiler warnings about unused variables with gcc 4.6 . - Fix return value handling of getaddrinfo(), bug 3288333. -- Make decwin size computation work for OPT_ARM and sizeof(long) != 4 (bug 3288360). - -1.13.2 ---- -- Updated .NET wrapper (MPG123_SKIP_ID3V2, encsize and mpg123_strlen functions) by Malcolm Boczek. -- Fix crash when calling mpg123_decoder() before opening a track -- a rare use case since one can choose a decoder with mpg123_new() already. -- Fix format change detection for certain (artificial) concatenated streams (p.ex. MPEG 1 frames following MPEG 2 frames). -- Prevent the nasty of bug 3154889: No change of pitch without a current audio format. No proper solution, but more like earlier behaviour. +- Make decwin size computation work for OPT_ARM and sizeof(long) != 4 + (bug 3288360). + +1.13.2: +------- +- Updated .NET wrapper (MPG123_SKIP_ID3V2, encsize and mpg123_strlen + functions) by Malcolm Boczek. +- Fix crash when calling mpg123_decoder() before opening a track -- a rare + use case since one can choose a decoder with mpg123_new() already. +- Fix format change detection for certain (artificial) concatenated streams + (p.ex. MPEG 1 frames following MPEG 2 frames). +- Prevent the nasty of bug 3154889: No change of pitch without a current + audio format. No proper solution, but more like earlier behaviour. - Fix some compiler warnings. -- Fix a memory leak in the module loader, also some in the examples, for being pedantic. +- Fix a memory leak in the module loader, also some in the examples, + for being pedantic. - More use of AC_LANG_SOURCE to silence autoconf. -1.13.1 ---- -- Fix --float and --8bit (MPG123_FORCE_FLOAT, MPG123_FORCE_8BIT) regression, caused by introduction of 24 bit formats. (bug 3151597). - Btw: The use of specific format choice via `mpg123 -e f32` and friends is encouraged (meaning mpg123_format_none() / mpg123_format() calls in libmpg123 API). -- Loosen the parser restrictions: Allow the private header bit to vary. It is not mpg123's business anyway (finally suggested by Marcel). - -1.13.0 ---- +1.13.1: +------- +- Fix --float and --8bit (MPG123_FORCE_FLOAT, MPG123_FORCE_8BIT) regression, + caused by introduction of 24 bit formats. (bug 3151597). + Btw: The use of specific format choice via `mpg123 -e f32` and friends + is encouraged (meaning mpg123_format_none() / mpg123_format() calls in + libmpg123 API). +- Loosen the parser restrictions: Allow the private header bit to vary. It + is not mpg123's business anyway (finally suggested by Marcel). + +1.13.0: +------- - libmpg123 API version 29 (see NEWS.libmpg123) - New optimization: ARM NEON (Cortex A series) -- kudos to Taihei, again! - Added 24 bit integer output (truncation of 32 bit integer). -- Cleanup of symbols for the static library: Only have global symbols that are actually needed, prefix them with INT123_ to avoid conflicts. +- Cleanup of symbols for the static library: Only have global symbols that + are actually needed, prefix them with INT123_ to avoid conflicts. - Added --streamdump to get a copy of the data libmpg123 used. -- Added --icy-interval and tweaked libmpg123 to make playback of ICY stream dumps possible. -- Added possibility to set module file suffix at build -- to be able to avoid .la files for plugins. +- Added --icy-interval and tweaked libmpg123 to make playback of ICY stream + dumps possible. +- Added possibility to set module file suffix at build -- to be able to + avoid .la files for plugins. - Removed compiler directives for alignment and disable associated tests. The tests don't work on a wide range of compilers anyway, and newer gccs do have force_align_arg_pointer to fix bad stacks. -- There is no ChangeLog file anymore... it was autogenerated from subversion log anyway, so look there if interested. - -1.12.5 ---- -- Fix bug with the new meta data printout of the mpg123 app; embedded null bytes in UTF-8 strings in non-UTF-8 environment would trigger buffer overflow. - Thanks to Jakub Bogusz of PLD Linux for the tip. And yes, shame on Thomas for changing working string handling code. At all. - -1.12.4 ---- +- There is no ChangeLog file anymore... it was autogenerated from subversion + log anyway, so look there if interested. + +1.12.5: +------- +- Fix bug with the new meta data printout of the mpg123 app; embedded + null bytes in UTF-8 strings in non-UTF-8 environment would trigger buffer + overflow. + Thanks to Jakub Bogusz of PLD Linux for the tip. And yes, shame on Thomas + for changing working string handling code. At all. + +1.12.4: +------- - Fix formatting of meta data printout in UTF-8 (string length computing). - As a collorary, ID3v1 data is reduced to ASCII in UTF-8 environment, as we do never know what specific encoding that has. - -1.12.3 ---- -- Fix a long-standing bug that subtly broke http streaming with ICY meta data when reading a bit more quickly, like when using the buffer. - I was a very simple and embarrassing bug, actually ... and it made me wonder how normal streaming still worked rather well, generally:-/ - Thanks to Lint for staying with us and reporting bug 3022850, to finally get a grip on streaming reliability. - -1.12.2 ---- -- Fix for nasty memory corruption on configurations that hand out addresses in the upper half of the memory space (the poiner alignment function broke in that case, bug 2996045). -- Various build and portability fixes (including making some exotic configure switches work (again)). + As a collorary, ID3v1 data is reduced to ASCII in UTF-8 environment, + as we do never know what specific encoding that has. + +1.12.3: +------- +- Fix a long-standing bug that subtly broke http streaming with ICY meta + data when reading a bit more quickly, like when using the buffer. + I was a very simple and embarrassing bug, actually ... and it made + me wonder how normal streaming still worked rather well, generally:-/ + Thanks to Lint for staying with us and reporting bug 3022850, to finally + get a grip on streaming reliability. + +1.12.2: +------- +- Fix for nasty memory corruption on configurations that hand out addresses + in the upper half of the memory space (the poiner alignment function broke + in that case, bug 2996045). +- Various build and portability fixes (including making some exotic + configure switches work (again)). - Add dump_seekindex example - Sync mpg123_clr to 1.12 feature set, patch provided by Malcolm Boczek And actually include it in release tarball! -- Rework mpg123.h logic for large file stuff a bit, clients can control it by defining MPG123_NO_LARGENAME or MPG123_LARGESUFFIX. -- Include dumb wrappers to provide names suffixed with _64 on 64 bit machines and _32 on 32 bit machines, respectively, to help clients that insist on defining _FILE_OFFSET_BITS where it is not needed (or with a non-large value). -- Tuning of the internal buffer code for feeder mode to minimize its performance impact (works in 4K blocks now). -- Workaround for compiler bugs in Open64/PathScale/SunStudio (bug 3004396, suggestion by Doug Gilmore). - Note that Sun Studio is still a tricky fellow, at least when it comes to our preprocessed assembly. - Also, x86-Open64 recently produced another segfault in layer3.c on my box... GNU and intel compilers are what one can use as something stable. +- Rework mpg123.h logic for large file stuff a bit, clients can control + it by defining MPG123_NO_LARGENAME or MPG123_LARGESUFFIX. +- Include dumb wrappers to provide names suffixed with _64 on 64 bit + machines and _32 on 32 bit machines, respectively, to help clients that + insist on defining _FILE_OFFSET_BITS where it is not needed (or with a + non-large value). +- Tuning of the internal buffer code for feeder mode to minimize its + performance impact (works in 4K blocks now). +- Workaround for compiler bugs in Open64/PathScale/SunStudio (bug 3004396, + suggestion by Doug Gilmore). + Note that Sun Studio is still a tricky fellow, at least when it comes + to our preprocessed assembly. + Also, x86-Open64 recently produced another segfault in layer3.c on my + box... GNU and intel compilers are what one can use as something stable. - Make mpg123_getformat() return more error codes (like MPG123_NEED_MORE). -- Fix handle I/O for clients with small file offset (32 bit when libmpg123 has 64 bit). +- Fix handle I/O for clients with small file offset (32 bit when libmpg123 + has 64 bit). - Fix 3DNow(Ext) standalone builds. -1.12.1 ---- - +1.12.1: +------- - Update INSTALL for the dual-mode library. No code changes. -1.12.0 ---- - -Attention: This reverts the big bad libray name change. People did not like libmpg123_64.so at all ... so Thomas went along with proving that being responsible for a open source library package sucks for your life -- he coded large file dual-mode into libmpg123. One library with both APIs, like glibc. +1.12.0: +------- +Attention: This reverts the big bad libray name change. People did not +like libmpg123_64.so at all ... so Thomas went along with proving that +being responsible for a open source library package sucks for your life -- +he coded large file dual-mode into libmpg123. One library with both APIs, +like glibc. - libmpg123 25.0.25: - - The separate libraries are gone again, this one is dual-mode (using ca. 750 lines of not very funny code). - - The library even translates callbacks between large file support modes. - - Introduce handle-based custom I/O in libmpg123. - - The header now defines MPG123_API_VERSION to help compile-time detection of available functions (lib is version 25.0.25 now... MPG123_API_VERSION is 25). -- Make the usage of AI_ADDRCONFIG dependend on a configure check. This flag is not available everywhere. - - -1.11.0 ---- - -Attention: There was a re-release of the source archive, because the initial one missed the actual changes for the library name. +-- The separate libraries are gone again, this one is dual-mode (using + ca. 750 lines of not very funny code). +-- The library even translates callbacks between large file support modes. +-- Introduce handle-based custom I/O in libmpg123. +-- The header now defines MPG123_API_VERSION to help compile-time detection + of available functions (lib is version 25.0.25 now... MPG123_API_VERSION + is 25). +- Make the usage of AI_ADDRCONFIG dependend on a configure check. This + flag is not available everywhere. + + +1.11.0: +------- +Attention: There was a re-release of the source archive, because the +initial one missed the actual changes for the library name. Sorry for the inconvenience:-/ - Big bad libray name change for builds with enabled large file support. - That will break libmpg123 binary compatibility on Linux/x86 when upgrading from mpg123>=1.5.0 with enabled large file support. You need to relink with the new library called libmpg123_64. - If you do not enable large file support, or it is implicit on your platform (x86-64), the library keeps the old name of libmpg123 and everything is fine. + That will break libmpg123 binary compatibility on Linux/x86 when upgrading + from mpg123>=1.5.0 with enabled large file support. You need to relink + with the new library called libmpg123_64. + If you do not enable large file support, or it is implicit on your + platform (x86-64), the library keeps the old name of libmpg123 and + everything is fine. - Assembler cleanup: - - no use of compiler-based stack alignment (for SSE), helping portability - - mostly performance neutral, hint at faster decoding for the dynamic build and slower for static, but small change in any case +-- no use of compiler-based stack alignment (for SSE), helping portability +-- mostly performance neutral, hint at faster decoding for the dynamic + build and slower for static, but small change in any case - Windows networking (access http streams in mingw builds). -- Do not ask for addresses that do not have matching interfaces configured (IPv6 on a IPv4-only host, for example). - That can help with broken DNS servers that choke on IPv6 addresses (T-Online Speedport W502V, for example). -- Fix a potential ICY reading problem were ICY metadata could be read as mp3 data (basically for MPEG frames bigger than the ICY interval). - - -1.10.1 ---- - -- Help multilib setups that boldly assume that headers are invariant by removing the consistency check in mpg123.h and instead just adding a suffix to relevant functions when _FILE_OFFSET_BITS is defined. Invalid setups will now fail at the linking stage instead of the preprocessing stage. +- Do not ask for addresses that do not have matching interfaces configured + (IPv6 on a IPv4-only host, for example). That can help with broken DNS + servers that choke on IPv6 addresses (T-Online Speedport W502V, for example). +- Fix a potential ICY reading problem were ICY metadata could be read as + mp3 data (basically for MPEG frames bigger than the ICY interval). + +1.10.1: +------- +- Help multilib setups that boldly assume that headers are invariant + by removing the consistency check in mpg123.h and instead just adding a + suffix to relevant functions when _FILE_OFFSET_BITS is defined. Invalid + setups will now fail at the linking stage instead of the preprocessing stage. That should cover bug 2934488. - Fixes for gapless decoding: - - Correctly skip padding larger than one MPEG frame (strange, but occurs). - - Bug 2950218 (proper gapless cuts for seeking near the end). -- Make sure the search for the first header aborts after 64K of one-byte reads, as always intended (bug 2951334). - Certain files (or even random data) were able to fool mpg123 sufficiently enough that it basically reads through the whole file in 1-byte steps in search for MPEG data. - The limit of 64K will very likely be configurable in a future mpg123 version. -- Fix subtle bug with seeking in feeder mode: A seek close to the current position (meaning: the needed data offset is already in mpg123's buffer chain) resulted in skipped bytes. -- Improve the feeder mode for handling large amounts of junk at the beginning, including proper passing of the request for more data when trying to determine free format frame size. This also fixes endless looping as reported in bug 2951334. +-- Correctly skip padding larger than one MPEG frame (strange, but occurs). +-- Bug 2950218 (proper gapless cuts for seeking near the end). +- Make sure the search for the first header aborts after 64K of one-byte + reads, as always intended (bug 2951334). + Certain files (or even random data) were able to fool mpg123 sufficiently + enough that it basically reads through the whole file in 1-byte steps + in search for MPEG data. + The limit of 64K will very likely be configurable in a future mpg123 + version. +- Fix subtle bug with seeking in feeder mode: A seek close to the current + position (meaning: the needed data offset is already in mpg123's buffer + chain) resulted in skipped bytes. +- Improve the feeder mode for handling large amounts of junk at the + beginning, including proper passing of the request for more data when trying + to determine free format frame size. This also fixes endless looping as + reported in bug 2951334. - The parser code still needs overhaul. It is not pretty. - Compile fix for OpenAL. -1.10.0 ---- - +1.10.0: +------- - Confirmed/fixed on OS/2 platform. At least a static build works with native audio output and generic decoder. - Make modules work with libtool-2.2.6b . - Added pitch command to control interface. -- HTTP header field and MIME type parsing now case-insensitive (fixes bug 2904736). - Also, the MIME-parsing for non-playlist URLs is done the same way as from playlists now. +- HTTP header field and MIME type parsing now case-insensitive (fixes + bug 2904736). + Also, the MIME-parsing for non-playlist URLs is done the same way as + from playlists now. And, we interpret MIME types only to before a ";" (see bug 2836904). -- There is a build-time option to enable unicode file names on windows now. UNIX (Linux) does not need that, UTF-8 works natively. - An unicode-enabled build of libmpg123 expects file names as UTF-8 strings, opening of non-utf8 strings (by old applications) still works via fallback when the conversion of the string or opening of the file failed. -- Also, on Windows, --realtime now works, along with added granularity of the new --priority parameter. Note that you get the latter functionality through nice/renice on UNIX, no need to add that to mpg123. +- There is a build-time option to enable unicode file names on windows + now. UNIX (Linux) does not need that, UTF-8 works natively. + An unicode-enabled build of libmpg123 expects file names as UTF-8 strings, + opening of non-utf8 strings (by old applications) still works via fallback + when the conversion of the string or opening of the file failed. +- Also, on Windows, --realtime now works, along with added granularity of + the new --priority parameter. Note that you get the latter functionality + through nice/renice on UNIX, no need to add that to mpg123. - Added experimental framebyframe API. -- Added a new Microsoft common language runtime wrapper (aka .NET wrapper) written by Malcolm Boczek. See ports\MSVC++\2008clr\mpg123clr\ReadMe.txt for further information +- Added a new Microsoft common language runtime wrapper (aka .NET wrapper) + written by Malcolm Boczek. See ports\MSVC++\2008clr\mpg123clr\ReadMe.txt + for further information - Added Visual Studio 2010 Beta 2 project files for libmpg123 - Updated autotools machinery, autogen.sh is gone, use `autoreconf -iv`. -1.9.2 ---- -- Fix logic failure in gapless code: The trailing silence was only cut on the first decode. So, seek-back and decode again never was gapless:-( +1.9.2: +------ +- Fix logic failure in gapless code: The trailing silence was only cut on + the first decode. So, seek-back and decode again never was gapless:-( - Fix linker flags on MacOS 10.6 . - Improve portability (mainly for Solaris/x86, possibly others). - Fix reading from standard input in Windows (use binary mode). -1.9.1 ---- +1.9.1: +------ - Fix OpenAL output issue (bug 2840085) -- Fix theoretically possible discarding of some audio samples when getting a new format. -- Fix unwanted verboseness (some error messages from library even when MPG123_QUIET was specified). +- Fix theoretically possible discarding of some audio samples when getting + a new format. +- Fix unwanted verboseness (some error messages from library even when + MPG123_QUIET was specified). - Fix back-to-beginning for feed_skip (fixes bug 2859531). - Fix the CPU creep bug with NtoM decoding. - That one has been nasty on you with large files since bad frame fillup has been introduced. -- Fix regression (since 1.9.0) in ID3 parsing: Now Foobar2000 RVA fields are interpreted again (among others). + That one has been nasty on you with large files since bad frame fillup + has been introduced. +- Fix regression (since 1.9.0) in ID3 parsing: Now Foobar2000 RVA fields + are interpreted again (among others). - Fix some compiler warnings, minor cleanup. -1.9.0 ---- - +1.9.0: +------ - Free format support. - ARM assembly optimizations (yay Taihei again!). -- Dither noise now runtime-generated, thus less bloated binary (thanks Taihei...). +- Dither noise now runtime-generated, thus less bloated binary (thanks + Taihei...). This means that dithered decoding is now included per default. - Please note that work is ongoing to improve the dithering quality, more to come. - For example: Accurate rounding to 16bits is now always used for generic dithered decoder, there are plans to adapt the noise for different sampling frequencies. + Please note that work is ongoing to improve the dithering quality, + more to come. + For example: Accurate rounding to 16bits is now always used for generic + dithered decoder, there are plans to adapt the noise for different + sampling frequencies. - Buffer plays any audio type now. - New output module: OpenAL - Bug fixes: - - Broken frame fillup for non-signed 8 bit formats with correct zero (bug 2805665) - - Crash on invalid UTF-16 in ID3 tags fixed (thanks to Andy Hefner) - - Bad detection of separated UTF-16 strings in ID3 tags (bug 2834636). -- Topic ID3 and UTF: Now we are more tolerant with UTF16, even accepting those broken tags that id3v2 produces (multiple conflicing BOMs). -- Build system allows AltiVec on non-Macs now (don't enforce unsupported gcc flags). +-- Broken frame fillup for non-signed 8 bit formats with correct zero + (bug 2805665) +-- Crash on invalid UTF-16 in ID3 tags fixed (thanks to Andy Hefner) +-- Bad detection of separated UTF-16 strings in ID3 tags (bug 2834636). +- Topic ID3 and UTF: Now we are more tolerant with UTF16, even accepting + those broken tags that id3v2 produces (multiple conflicing BOMs). +- Build system allows AltiVec on non-Macs now (don't enforce unsupported + gcc flags). - Terminal control mode is more verbose (gives hint about pressing 'h'). -- The library now offers a switch and small API to defer translation of ID3 text data until client app wants to do it (or not). +- The library now offers a switch and small API to defer translation of + ID3 text data until client app wants to do it (or not). -1.8.1 ---- +1.8.1: +------ - Include improvements to integer decoder from SVN trunk. - They have been accidentally promised on 1.8.0 release announcements, though they were not there. Here it is: ISO compliant fixed point decoding (speed optimizations are still reserved for next release). + They have been accidentally promised on 1.8.0 release announcements, + though they were not there. Here it is: ISO compliant fixed point decoding + (speed optimizations are still reserved for next release). - Fixed build with ./configure --enable-modules (bug in configure script). - Fix name of binary in help screen when called with path. - Build fix for old gcc with AltiVec code. - Update of Sony PSP build files. -1.8.0 (The Taihei Monmament) ---- - -- New and improved SSE optimizations! For x86-64, too! Also AltiVec! Fast float output! Faster stereo! - Finally, this should put mpg123 into the efficiency-leading position on current hardware! - Thanks go out to Taihei Monma for pushing lots of new assembler code. +1.8.0: (The Taihei Monmament) +------ +- New and improved SSE optimizations! For x86-64, too! Also AltiVec! Fast + float output! Faster stereo! + Finally, this should put mpg123 into the efficiency-leading position on + current hardware! Thanks go out to Taihei Monma for pushing lots of new + assembler code. - Added proper rounding modes to 16bit integer. - - Use ./configure --enable-int-quality to prefer accuracy over speed. - - Accurate code (generic, SSE, 3dnow -- i586 has always been good) delivers ISO compliant quality with 16bit output. - - Uses fast rounding for IEEE754 floats. - - Mpg123 can do fully ISO compliant MPEG audio decoding to 16bits (of course to 32bit float/int, too). +-- Use ./configure --enable-int-quality to prefer accuracy over speed. +-- Accurate code (generic, SSE, 3dnow -- i586 has always been good) + delivers ISO compliant quality with 16bit output. +-- Uses fast rounding for IEEE754 floats. +-- Mpg123 can do fully ISO compliant MPEG audio decoding to 16bits (of + course to 32bit float/int, too). - subtle performance enhancements via broader data alignment - Prefer SSE code over 3DNowExt. - - It can be tight, but generally our new SSE code is better on CPUs that can do both. +-- It can be tight, but generally our new SSE code is better on CPUs that + can do both. - Remove HF cutoff (SFB21), has been introduced in 0.59r . - Fix layer 1 regression (been there since version 1.x). - - Layer 1 ISO compliance test is positive now. +-- Layer 1 ISO compliance test is positive now. - Fix layer 2 regression (false positives header change). - - Layer 2 ISO compliance test is positive now. +-- Layer 2 ISO compliance test is positive now. - more sample-accurateness - - Clear frame buffers before seek. - - Decode 4 frames in advance for layer 3 (2 for layer 1 and 2) per default. - - Number of layer 3 frames to decoded in advance (and fill bit reservoir) is runtime tunable (--preframes). +-- Clear frame buffers before seek. +-- Decode 4 frames in advance for layer 3 (2 for layer 1 and 2) per default. +-- Number of layer 3 frames to decoded in advance (and fill bit reservoir) is + runtime tunable (--preframes). - Do not stop decoding after stray ID3v1 tags in streams (bug 2793677). - Fix handling of negative RVA2 values in ID3v2 (bug 2792417). - Discard bitreservoir of previous frames if a resync is needed. @@ -290,66 +1013,74 @@ Sorry for the inconvenience:-/ - Fix special crash case in UTF16 conversion for ID3v2. - MPG123_MODDIR environment variable for changing module directory at runtime - arts output fixes (bug 2715128) -- win32 output swallowing less buffers at end (but still some audio is lost, bug 2722991) -- tested mpg123 on OS/2; it works, but not the native audio output (SDL works) +- win32 output swallowing less buffers at end (but still some audio is lost, + bug 2722991) +- tested mpg123 on OS/2; it works, but not the native audio output + (SDL works) - WAV output announces supported output formats correctly -- fix buffer startup to make sure the first bits of audio are not discarded (bug 2796802) -- re-enable the --gain parameter (the move to modules disabled that), untested +- fix buffer startup to make sure the first bits of audio are not discarded + (bug 2796802) +- re-enable the --gain parameter (the move to modules disabled that), + untested - Libltdl is _not_ included anymore. - - The host system is expected to provide it, otherwise plugins are not used. - - Our copy does not get in the way anymore. +-- The host system is expected to provide it, otherwise plugins are not used. +-- Our copy does not get in the way anymore. - enhancements of the MSVC++ builds, including optimizations using yasm - general build system fixes - Legacy build system is gone. - code cleanup - - signed/unsigned integer usage, make compilers more happy) - - simplified synth selection code (it is _less_ code now, and does more) -- Fixed behaviour of MPG123_NEW_FORMAT: Now it does not stop you from just continuing decoding without querying the (new) output format, this behaviour regression had been there since somewhen after 1.4.3 . +-- signed/unsigned integer usage, make compilers more happy) +-- simplified synth selection code (it is _less_ code now, and does more) +- Fixed behaviour of MPG123_NEW_FORMAT: Now it does not stop you from + just continuing decoding without querying the (new) output format, this + behaviour regression had been there since somewhen after 1.4.3 . -1.7.3 ---- - - Fix a regression introduced with the --doublespeed fix. Now seeking should be a lot smoother again. +1.7.3: +------ +- Fix a regression introduced with the --doublespeed fix. Now seeking should + be a lot smoother again. -1.7.2 ---- - - Fix a possible vulnerability in the ID3 code (negative encoding values). +1.7.2: +------ +- Fix a possible vulnerability in the ID3 code (negative encoding values). -1.7.1 ---- - - Just one fix for making the RVA switch in terminal and generic control mode work again (instead of plain silence). +1.7.1: +------ +- Just one fix for making the RVA switch in terminal and generic control mode + work again (instead of plain silence). -1.7.0 ---- +1.7.0: +------ - Lots of output format fun! - - now supporting 8, 16, 32 bit signed/unsigned integers, - 32bit float (64bit float can be hacked in quickly) - - optimized decoders use fallback routines for non-optimized - formats transparently - - flexible resampling is automatically chosen when output does - not support standard rates (like a JACK server) - - That meant quite some restructuring in the decoder code... +-- now supporting 8, 16, 32 bit signed/unsigned integers, + 32bit float (64bit float can be hacked in quickly) +-- optimized decoders use fallback routines for non-optimized + formats transparently +-- flexible resampling is automatically chosen when output does + not support standard rates (like a JACK server) +-- That meant quite some restructuring in the decoder code... - Lots of core functionality now optional, enabling small-footprint builds of libmpg123. - - choosing among the MPEG layer codes - - NtoM resampling - - downsampling - - feeder API (mpg123_open_feed()) - - ID3v2 - - String API - - ICY - - output formats - - error/warning message printouts - - ... a layer3-only shared libmpg123 can be just 107K on x86-64 - or 94K on x86 +-- choosing among the MPEG layer codes +-- NtoM resampling +-- downsampling +-- feeder API (mpg123_open_feed()) +-- ID3v2 +-- String API +-- ICY +-- output formats +-- error/warning message printouts +-- ... a layer3-only shared libmpg123 can be just 107K on x86-64 + or 94K on x86 - --preload (tune prefill before playback for buffered mode) - win64 support (one report at least;-), modules working on Windows - Windows/MSVC++: fixed handling of unicode file names, mpg123_topen() now actually working there - - You are obliged to use mpg123_tclose() now! +-- You are obliged to use mpg123_tclose() now! - using "plugins" subdir relative to mpg123 binary (in addition to ../lib/mpg123) - switch to libtool 2.2 and automake 1.10 for the build scripts - - though no update to new libtool 2 API, yet +-- though no update to new libtool 2 API, yet - some portability fixes - prevent user from creating non-working I/O setups (replacing timeout reader, ICY with feeding) @@ -361,471 +1092,572 @@ Sorry for the inconvenience:-/ Along with that, a regression in decoding has been fixed (concerning skipping of frames in general). -1.6.4 ---- +1.6.4: +------ - Fix for consistent NtoM resampled decoding and broken frames fillup. -1.6.3 ---- - -- Fix sf.net bug #2413608: Make sure a new format does not slip through after early close. -- Include equalizer example file and a piece of wrapper code for MSVC++ in the distribution. +1.6.3: +------ +- Fix sf.net bug #2413608: Make sure a new format does not slip through + after early close. +- Include equalizer example file and a piece of wrapper code for MSVC++ + in the distribution. - Do not claim to support unsigned 16 bit encoding (never been the case). - Fix default fifo detection, now it actally activates fifo support! -1.6.2 ---- - -- Fix default IPv6 detection in configure.ac (a typo has been introduced before). - -1.6.1 ---- +1.6.2: +------ +- Fix default IPv6 detection in configure.ac (a typo has been introduced + before). +1.6.1: +------ - Fix printing of largefile offsets in remote control interface. - Some portability fixes (reduced compiler warnings on Solaris, p.ex.). -1.6.0 ---- +1.6.0: +------ - small things inside that I forgot to mention - some new commands for remote control interface: - - SCAN - - SAMPLE - - EQFILE - - SHOWEQ +-- SCAN +-- SAMPLE +-- EQFILE +-- SHOWEQ - added --keep-open command line flag (for remote control) -- fixed equalizer file parsing to really handle comment lines as example file suggests +- fixed equalizer file parsing to really handle comment lines as example file + suggests - more elaborate detection of UTF-8 locale, also --utf8 switch to force it - added --fuzzy to enable inexact seeking (see below) - added --index-size parameter for tuning accurate frame seek index - enabling largefile support via configure - libmpg123 11.0.11: - - added mpg123_geteq(), mpg123_tell_stream() and mpg123_getstate() - - API cleanup (take const char* for mpg123_open()) - - calm down complainling (C++) compilers by completing the mpg123_channels enum - - fixed several possible crashes when user provides NULLs where it isn't appropriate - - workaround for frames that fail decoding (bad frame body, missing bit reservoir): fill up with silence - That also fixes seeking issues related to bad frames since now the fixed relation between frame and sample offsets is restored. - - Finally realized what that the resampling code for integer math (generic_nofpu) was just incomplete! - Now it works, using the defined integer multiplication. - - Detect UTF-8 in ICY conversion (instead of just assuming CP-1252, provided by Torsten Glaser). - - Prevent ugly noise when the bit reservoir is not fully there (p.ex. ignorantly cut mp3 files). - Concerned frames are silenced, but reservoir for following frames is kept. - Thanks to Patrick Dehne for the investigation and patch! - - New option for fuzzy seeking; trading sample accuracy for speed. - With that option, seeks positions are guessed using mean framesize or the Xing VBR TOC is used. - - Feeder streams work with seek index now. - - Seek frame index is runtime tunable. - - more caution with alignment issues for varying library users -- new project files to build/use libmpg123 with MSVC++ 2005 and 2008, provided by Patrick Dehne -- fixed a regression that made the pause/loop mode in terminal control slowly go backwards - -Big note for libmpg123 users: Make sure your application is compiled with the same largefile setting as libmpg123! -If that does not match, you will get unresolved symbols (which is better than weird errors when using a nonmatching off_t in arguments;-). - -1.5.1 ---- - +-- added mpg123_geteq(), mpg123_tell_stream() and mpg123_getstate() +-- API cleanup (take const char* for mpg123_open()) +-- calm down complainling (C++) compilers by completing the mpg123_channels + enum +-- fixed several possible crashes when user provides NULLs where it isn't + appropriate +-- workaround for frames that fail decoding (bad frame body, missing bit + reservoir): fill up with silence + That also fixes seeking issues related to bad frames since now the + fixed relation between frame and sample offsets is restored. +-- Finally realized what that the resampling code for integer math + (generic_nofpu) was just incomplete! + Now it works, using the defined integer multiplication. +-- Detect UTF-8 in ICY conversion (instead of just assuming CP-1252, + provided by Torsten Glaser). +-- Prevent ugly noise when the bit reservoir is not fully there + (p.ex. ignorantly cut mp3 files). + Concerned frames are silenced, but reservoir for following frames + is kept. + Thanks to Patrick Dehne for the investigation and patch! +-- New option for fuzzy seeking; trading sample accuracy for speed. + With that option, seeks positions are guessed using mean framesize or + the Xing VBR TOC is used. +-- Feeder streams work with seek index now. +-- Seek frame index is runtime tunable. +-- more caution with alignment issues for varying library users +- new project files to build/use libmpg123 with MSVC++ 2005 and 2008, + provided by Patrick Dehne +- fixed a regression that made the pause/loop mode in terminal control + slowly go backwards + +Big note for libmpg123 users: Make sure your application is compiled +with the same largefile setting as libmpg123! If that does not match, +you will get unresolved symbols (which is better than weird errors when +using a nonmatching off_t in arguments;-). + +1.5.1: +------ - fix wav/au/cdr writing to stdout (bug #2044423) - add more sensible --no-resync to replace --resync (bug #2044404) - libmpg123 7.0.7 - - fix thread safety of SSE decoder (bug #2053181) - - fix robustness of length handling, added mpg123_set_filesize() (bug #2064322) - -1.5.0 ---- +-- fix thread safety of SSE decoder (bug #2053181) +-- fix robustness of length handling, added mpg123_set_filesize() (bug #2064322) +1.5.0: +------ - libmpg123 6.0.6 - - Floating point decoding back again, (build time choice for now; --with-cpu=generic_float). - - More robust string handling; extended string API. - - fixed an (so far) unnoticed ID3 bug that may have obscured comment fields - - added mpg123_feed() as shortcut; using const input buffer now - - resync is enabled again for ICY streams (the trouble in the past was due to a reader bug, not the streams) - - decode ICY text data to UTF-8 (thanks, Thorsten) - - preserve file flags for timeout mode +-- Floating point decoding back again, (build time choice for now; + --with-cpu=generic_float). +-- More robust string handling; extended string API. +-- fixed an (so far) unnoticed ID3 bug that may have obscured comment fields +-- added mpg123_feed() as shortcut; using const input buffer now +-- resync is enabled again for ICY streams (the trouble in the past was + due to a reader bug, not the streams) +-- decode ICY text data to UTF-8 (thanks, Thorsten) +-- preserve file flags for timeout mode - More elaborate (helpful?) error message for output format problems. - Reworked HTTP code... and added IPv6 support! - Fix the --proxy parameter (has been accidentally ignored before). -- Added --ignore-mime to work with web streams with funny playlist MIME types like "audio/megurl". +- Added --ignore-mime to work with web streams with funny playlist MIME + types like "audio/megurl". - Know MIME audio/mpegurl. - --timeout is now also used for the connection itself (not just reading). - Now trying to resume ALSA device after suspend. - subtle build changes (your CFLAGS rule now) -1.4.3 ---- - -- Fix mpg123_tell() and mpg123_seek() return values with respect to the samples in decoding buffer (bug 1947373). +1.4.3: +------ +- Fix mpg123_tell() and mpg123_seek() return values with respect to the + samples in decoding buffer (bug 1947373). - Fix (bogus) 3DNow detection on IDT C6 (bug 1947982). - Fix mono playback of win32 output (bug 1955157). -- Fix ABI compatibility with compilers that don't align the stack like gcc does (fixing SSE crashes on win32). - -1.4.2 ---- +- Fix ABI compatibility with compilers that don't align the stack like + gcc does (fixing SSE crashes on win32). +1.4.2: +------ - Fix build problems (for Cygwin and Win32, perhaps others, too). -1.4.1 ---- - -- Fix a serious regression of terminal control mode (forgot to remove a term_restore(), bug 1936548). - -1.4.0 ---- +1.4.1: +------ +- Fix a serious regression of terminal control mode (forgot to remove a + term_restore(), bug 1936548). +1.4.0: +------ - Enable runtime check for available and working output modules. - Now mpg123 tries all built modules (or a list specified in mpg123 -o moda,modb,modc) in turn to find a working output. - This minimizes the situation of having to specify a device when default output doesn't work for some reason. - See bug 1910500. + Now mpg123 tries all built modules (or a list specified in + mpg123 -o moda,modb,modc) in turn to find a working output. This minimizes the + situation of having to specify a device when default output doesn't work for + some reason. See bug 1910500. - libmpg123 2.2.2 - - Fixing an endless loop for ICY streams that suddenly end without error (just EOF). - - Further fixes around EOF handling in (buffered/ICY) streams. -- Enable user to interrupt mpg123 when stuck in a loop of failing to open a track (with --loop). +-- Fixing an endless loop for ICY streams that suddenly end without error + (just EOF). +-- Further fixes around EOF handling in (buffered/ICY) streams. +- Enable user to interrupt mpg123 when stuck in a loop of failing to open a + track (with --loop). - This time with correct RPM spec (hopefully... sorry, Michael!). -1.3.1 ---- +1.3.1: +------ - Enable snd_pcm_sw_params_set_xfer_align() for alsa-lib < 1.0.16 (bug 1908603). - libmpg123 2.1.2 (no-op change) -1.3.0 ---- - +1.3.0: +------ This is a _major_ fix release for http streaming! Much more usable than earlier mpg123 1.x versions. - libmpg123 libtool-version 2.0.2 - - Fix nasty bug in ICY reader that failed to account for partial reads from slower network. - - Now non-seekable streams can get peek-ahead for MPEG sync, too, triggered by the MPG123_SEEKBUFFER flag. - - Do not try to resync on streams with ICY metadata, that won't work. - Consequently, if there's unreliable network, use --loop -1 to make mpg123 reconnect to the server on errors. - - Applying a few layer 3 decoder fixes from old mhipp CVS (hail to the creator;-) - That includes the fix for bug 1895025. - - Fix ID3v2 parser with very invalid claimed ID3v2 frame sizes (could have triggered DOS before). - - Oh, and fixed a steady memory leak in ID3 handling. Should mention that;-) +-- Fix nasty bug in ICY reader that failed to account for partial reads + from slower network. +-- Now non-seekable streams can get peek-ahead for MPEG sync, too, triggered + by the MPG123_SEEKBUFFER flag. +-- Do not try to resync on streams with ICY metadata, that won't work. + Consequently, if there's unreliable network, use --loop -1 to make + mpg123 reconnect to the server on errors. +-- Applying a few layer 3 decoder fixes from old mhipp CVS (hail to the + creator;-) That includes the fix for bug 1895025. +-- Fix ID3v2 parser with very invalid claimed ID3v2 frame sizes (could + have triggered DOS before). +-- Oh, and fixed a steady memory leak in ID3 handling. Should mention that;-) - Print ICY-NAME and ICY-URL again, as mpg123-0.6x did. -- Added --smooth option for not flusing buffer between tracks but at program end only. +- Added --smooth option for not flusing buffer between tracks but at program + end only. - Included some contributed ports/bindings of libmpg123 under ports/ . -1.2.1 ----- - +1.2.1: +------ - libmpg123 libtool-version 1.2.1 (coincidence!) - - Earlier check for free format headers to prevent them from screwing up resync (free format still not supported) - - bug 1889051: more flexible resync, not insisting on the format of the first frame (which could have been bogus) +-- Earlier check for free format headers to prevent them from screwing up + resync (free format still not supported) +-- bug 1889051: more flexible resync, not insisting on the format of the + first frame (which could have been bogus) - Add an output write loop to handle SIGSTOP/CONT operation (bug 1890563). - Fixed a bug where playback status for some http streams was not shown. -1.2.0 ----- - +1.2.0: +------ - libmpg123 libtool-version 1.0.1 - - See NEWS.libmpg123 for details. - - This adds --resync-limit parameter to mpg123. +-- See NEWS.libmpg123 for details. +-- This adds --resync-limit parameter to mpg123. - Some build system work, including: - - It is now possible to build a mpg123 rpm from the source tarball via rpmbuild -tb . - - configure: Accept --with-audio=foo,bar,bla (comma-separated list) in addition to --with-audio="foo bar bla". - - autogen.sh included in distribution. - - Include the forgotten i486 files in the distribution (now that's embarrasing...). - Also a little fix for wrong --list-cpu on i486 build. - - Fix build with MinGW32. +-- It is now possible to build a mpg123 rpm from the source tarball via + rpmbuild -tb . +-- configure: Accept --with-audio=foo,bar,bla (comma-separated list) in addition + to --with-audio="foo bar bla". +-- autogen.sh included in distribution. +-- Include the forgotten i486 files in the distribution (now that's embarrasing...). + Also a little fix for wrong --list-cpu on i486 build. +-- Fix build with MinGW32. - Fix -v stat output (time display) for MinGW32 build. -1.1.0 ----- - +1.1.0: +------ - Added arts output. -- More verbosity on lame/xing/info tags (on demand) instead of compile-time debugging switch. +- More verbosity on lame/xing/info tags (on demand) instead of compile-time + debugging switch. - XMMS2 plugin cleanup (submitted to XMMS2 for inclusion) -- Improved ID3v2 robustness (let bad tags not affect playback of the important part). +- Improved ID3v2 robustness (let bad tags not affect playback of the important + part). - Terminal control: - - Key for going to previous track ([d], because it's left of [f] usually... no config file yet for that). - - Key for printing current playlist, [l]. - - Now possible to switch on verbosity also for mpg123 -q -C - - Key for (re)printing ID3 tag info ([t]). - - Key for (re)printing MPEG frame header info ([m]). -- Soften the -q option: Now you are able to increase verbosity after -q again, like mpg123 -q -v (this fixes cplay's progress display). - -1.0.1 ----- - -- Fix module loader to prevent crash in working paths with more than 49 characters length (bug 1859413). - -1.0.0 ----- +-- Key for going to previous track ([d], because it's left of [f] usually... + no config file yet for that). +-- Key for printing current playlist, [l]. +-- Now possible to switch on verbosity also for mpg123 -q -C +-- Key for (re)printing ID3 tag info ([t]). +-- Key for (re)printing MPEG frame header info ([m]). +- Soften the -q option: Now you are able to increase verbosity after -q + again, like mpg123 -q -v (this fixes cplay's progress display). + +1.0.1: +------ +- Fix module loader to prevent crash in working paths with more than 49 + characters length (bug 1859413). +1.0.0: +------ - Fixed Pulseaudio. - Cleaned up configure. - Pushed remote control version to v3. - Updated documentation. - Fix VPATH build for generated mpg123.h . -1.0rc3 ----- - +1.0rc3: +------- - Fixed JACK output. -- Disable buffer when statically building CoreAudio in (MacOSX); with CoreAudio module the buffer works, with static output it doesn't. +- Disable buffer when statically building CoreAudio in (MacOSX); with + CoreAudio module the buffer works, with static output it doesn't. This is the situation because of fork() discrimination by Apple Inc. . - Added verbosity to tell about ID3v2 text encodings (level 4). - minor cleanup -1.0rc2 ----- - -- Fixed some bugs, the ID3v2 interface of libmpg123 is safer now (there were possibly stale pointers in there). -- Buffer mode got vital improvements (yeah, that is sort of feature creep during release process, but worth it) - The improved communication makes it possible to skip tracks in terminal control mode without the hack to immediately restart playback. - To be able to do seeking in terminal mode with buffer properly, buffered playback stops on seek keys. You restart playback after you are done with seeking. -- Support either portaudio v18 or v19 API (v18 works for me, v19 works according to user report). -- Audio output handling got safer and more clean, a byproduct of implementing the above. I stumbled over some things and had to fix it (yeah, feature creep in parts again, but still: Worth it!;-) - Any audio access is now restricted to either that standalone mpg123 process or the buffer process, the output being opened _after_ the fork(). +1.0rc2: +------- +- Fixed some bugs, the ID3v2 interface of libmpg123 is safer now (there + were possibly stale pointers in there). +- Buffer mode got vital improvements (yeah, that is sort of feature creep + during release process, but worth it) + The improved communication makes it possible to skip tracks in terminal + control mode without the hack to immediately restart playback. + To be able to do seeking in terminal mode with buffer properly, buffered + playback stops on seek keys. You restart playback after you are done + with seeking. +- Support either portaudio v18 or v19 API (v18 works for me, v19 works + according to user report). +- Audio output handling got safer and more clean, a byproduct of implementing + the above. I stumbled over some things and had to fix it (yeah, feature + creep in parts again, but still: Worth it!;-) + Any audio access is now restricted to either that standalone mpg123 + process or the buffer process, the output being opened _after_ the fork(). There is hope that this fixes buffered output on MacOSX. -- More feature creep, this time because of something like that was already included in the Debian mpg123: - --delay parameter to issue a pause before each track (does not make sense for file writing outputs, though). -- Even more feature creep: remote control can now give ID3v2 data, also in more raw form via new "tag" command. - This sort of qualifies as bugfix, actually, since it's item 1786430 on the tracker;-) -- Make flexible rate computations more safe (especially on 32bit platforms) by switching to the looping code instead of direct multiplication/division (which blows up with integers). A possible effect was premature track ending with a forced rate. -- Flexible rate mode works _at_all_ again with fixed output support detection code (comparison of -1 with a size_t ended a loop all too early). -- check for error in flushing output (this ends mpg123 for a broken pipe, for example) - -1.0rc1 ----- - +- More feature creep, this time because of something like that was already + included in the Debian mpg123: + --delay parameter to issue a pause before each track (does not make + sense for file writing outputs, though). +- Even more feature creep: remote control can now give ID3v2 data, also + in more raw form via new "tag" command. + This sort of qualifies as bugfix, actually, since it's item 1786430 on + the tracker;-) +- Make flexible rate computations more safe (especially on 32bit platforms) + by switching to the looping code instead of direct multiplication/division + (which blows up with integers). A possible effect was premature track + ending with a forced rate. +- Flexible rate mode works _at_all_ again with fixed output support + detection code (comparison of -1 with a size_t ended a loop all too early). +- check for error in flushing output (this ends mpg123 for a broken pipe, + for example) + +1.0rc1: +------- - In one word: LOTS! - Many small things that happened while migrating to the new setup. -- The decoder is now a library (libmpg123) which can be installed also for other programs to use. - This finally provides a heavily improved replacement for the aged mpglib. We have doxygen API doc, example codes. - You can still choose to compile the decoder statically into the mpg123 binary, though. -- We have a plugin system for audio output! This should be relieving to package maintainers for binary distributions, drastically reducing the number of builds they have to provide. - Here, too, you can choose to build one audio output into the binary like before; you can have your old-school one-piece mpg123 or the hip I-am-legion shared-lib-and-plugin flexible mpg123;-) - One exception: For now, you have to compile without modules in MinGW32/MSYS. -- ID3v2 support has been enhanced and, in the case of specific comments (those with a description), fixed. - The ID3 parsing is part of libmpg123, offering support for virtually all textual information in ID3v2.2, ID3v2.3 and ID3v2.4 tags (along with the usual 128 bytes of ID3v1 or ID3v1.1 in a block). - All tag texts are converted to UTF-8, allowing mpg123 to properly display special chars in an Unicode terminal without fuzz (for non-UTF locales, there is still the ASCII reduction). -- Gapless decoding (of layer 3 streams) is now considered to be a standard feature and is enabled per default both at build- and runtime. +- The decoder is now a library (libmpg123) which can be installed also + for other programs to use. This finally provides a heavily improved + replacement for the aged mpglib. We have doxygen API doc, example codes. + You can still choose to compile the decoder statically into the mpg123 + binary, though. +- We have a plugin system for audio output! This should be relieving to + package maintainers for binary distributions, drastically reducing the + number of builds they have to provide. + Here, too, you can choose to build one audio output into the binary + like before; you can have your old-school one-piece mpg123 or the hip + I-am-legion shared-lib-and-plugin flexible mpg123;-) + One exception: For now, you have to compile without modules in + MinGW32/MSYS. +- ID3v2 support has been enhanced and, in the case of specific comments + (those with a description), fixed. + The ID3 parsing is part of libmpg123, offering support for virtually + all textual information in ID3v2.2, ID3v2.3 and ID3v2.4 tags (along with + the usual 128 bytes of ID3v1 or ID3v1.1 in a block). + All tag texts are converted to UTF-8, allowing mpg123 to properly display + special chars in an Unicode terminal without fuzz (for non-UTF locales, + there is still the ASCII reduction). +- Gapless decoding (of layer 3 streams) is now considered to be a standard + feature and is enabled per default both at build- and runtime. - ... - -0.68 ----- - +0.68: +----- - Fix bug 1807964: distorted playback of MPEG 2.5 files -0.67 ----- - -Thanks go out to the ROM 106.5FM team (http://www.rom.lu/) for supporting this release with a donation on sf.net and a bottle of finest Gewuerztraminer wine from Luxembourg! +0.67: +----- +Thanks go out to the ROM 106.5FM team (http://www.rom.lu/) for supporting +this release with a donation on sf.net and a bottle of finest Gewuerztraminer +wine from Luxembourg! - verified that it builds on SGI IRIX 6.5 for MIPS32 and MIPS64 - enable flexible rate for stdout decoding, too - UTF8 filtering to ASCII finally works thanks to Mika Tiainen, see bug 1745847 - corrected frame offset; -k was off by one - This means now that -k disagrees with mpg123 0.59r on many files because the old version does play a frame of silence when encountering LAME tag instead of dropping it for audio. -- added --timeout : Possibility to end playback on a stream that doesn't give data for seconds. -- added --loop : for ... well... looping playback of a track; motivation was persistent internet streaming with unreliable connection (together with --timeout) + This means now that -k disagrees with mpg123 0.59r on many files because + the old version does play a frame of silence when encountering LAME tag + instead of dropping it for audio. +- added --timeout : Possibility to end playback on a stream that doesn't give + data for seconds. +- added --loop : for ... well... looping playback of a track; motivation was + persistent internet streaming with unreliable connection (together with --timeout) - build fixes -- use movap instruction in SSE assembly when compiler supports the needed alignment (idea from MPlayer) +- use movap instruction in SSE assembly when compiler supports the needed + alignment (idea from MPlayer) - show decoder options in their priority order in --list-cpu/--test-cpu - added Perl script to benchmark each of mpg123's CPU optimizations -- portability enhancements and cleanups along with testing on SunOS 4.1.2 with gcc-2.7.0 +- portability enhancements and cleanups along with testing on SunOS 4.1.2 + with gcc-2.7.0 - workaround for ugly flexible rate for MMX/SSE/3DNowExt code: --with-cpu=mmx also includes i586 code as fallback; similar with the others -0.66 ----- - -- support for a combined build of x86 optimizations and runtime selection among these - The (supposedly) "highest" CPU-supported optimization is chosen by default, - --cpu, --list-cpu and --test-cpu parameters are there for you to take control. -- default build for x86 systems is combined "x86" with generic, i386, i586, MMX, 3DNow, SSE, 3DNowExt; - "x86_dither" also includes the dithering i586 decoder -- no automatic -march compiler flags anymore; - the --with-cpu configure option selects specific assembler code but special CFLAGS are up to you +0.66: +----- +- support for a combined build of x86 optimizations and runtime selection + among these The (supposedly) "highest" CPU-supported optimization is chosen + by default, --cpu, --list-cpu and --test-cpu parameters are there for you to + take control. +- default build for x86 systems is combined "x86" with generic, i386, + i586, MMX, 3DNow, SSE, 3DNowExt; "x86_dither" also includes the dithering + i586 decoder +- no automatic -march compiler flags anymore; the --with-cpu configure option + selects specific assembler code but special CFLAGS are up to you - extended 3DNow and SSE optmizations from MPlayer's mp3lib - x86 assembler optimizations adapted for MacOS X/Intel -- straight support for Windows using MinGW32, reactivated the native WinMM output - Core functionality including assembler optmimizations and WAV writing is there. +- straight support for Windows using MinGW32, reactivated the native + WinMM output. Core functionality including assembler optmimizations + and WAV writing is there. - assembler optimizations also for cygwin - set remote-err automatically when putting audio to stdout - a bit more general portability in the new build system - fix file creation mode for -O -- experimental decoding to 32bit float (raw and WAV file): ./configure --with-cpu=generic_float -- generic control interface (-R) can create and read from a named pipe, parameter --fifo -- audio bugfix: playback of mono file on stereo-only hardware, better error reporting there +- experimental decoding to 32bit float (raw and WAV file): ./configure + --with-cpu=generic_float +- generic control interface (-R) can create and read from a named pipe, + parameter --fifo +- audio bugfix: playback of mono file on stereo-only hardware, better + error reporting there - ALSA output handling underruns -- MMX, SSE and 3DNowExt fallback to i586 and below or 3Dnow for forced sample rate +- MMX, SSE and 3DNowExt fallback to i586 and below or 3Dnow for forced + sample rate - more terminal control: volume, RVA and verbosity controls -0.65 ----- - - - now allow crc bit to vary over stream (fixes files with bad lame tag and some internet streams) - - do not try to parse id3v2.2 (as opposed to 2.3 and 2.4) - - correct id3v2.3 parsing for not expecting syncsafe integers for framesize, 2.4 introduced that - - omit gcc specific compiler flags when gcc is not there - - initital attempt to support sgi/irix with configure (please test) - -0.64 ----- - - - fixing a potential denial of service problem; broken connection to server could trigger an endless loop - -0.63 ----- - - - build fixes, only relevant to developers and people who had problems building - -0.62 ----- - - - JUMP command in generic frontend accepts offsets/positions in seconds (JUMP 4s vs. JUMP 4) - - initial support for ICY meta data in SHOUTcast streams - - a bit of fixing with rva code, added rva and general volume control to generic frontend - - accepting more MIME types for http streaming (application/pls and audio/x-mpeg) - - ID3v2 info output taking less space per default - more resembling the old ID3v1 view for short tags, full view with always one line per item via extra --long-tag switch - - generally less verbosity (i.e. noise on console) per default - - ID3v2 now having some kind of support for unicode; trying to print what's latin1-compatible and prevent messing up of terminal with unknown bytes - - several bug fixes and small improvements +0.65: +----- +- now allow crc bit to vary over stream (fixes files with bad lame tag + and some internet streams) +- do not try to parse id3v2.2 (as opposed to 2.3 and 2.4) +- correct id3v2.3 parsing for not expecting syncsafe integers for framesize, + 2.4 introduced that +- omit gcc specific compiler flags when gcc is not there +- initital attempt to support sgi/irix with configure (please test) + +0.64: +----- +- fixing a potential denial of service problem; broken connection to server + could trigger an endless loop -0.61 +0.63: ----- +- build fixes, only relevant to developers and people who had problems building +0.62: +----- +- JUMP command in generic frontend accepts offsets/positions in seconds + (JUMP 4s vs. JUMP 4) +- initial support for ICY meta data in SHOUTcast streams +- a bit of fixing with rva code, added rva and general volume control to + generic frontend +- accepting more MIME types for http streaming (application/pls and + audio/x-mpeg) +- ID3v2 info output taking less space per default - more resembling the + old ID3v1 view for short tags, full view with always one line per item + via extra --long-tag switch +- generally less verbosity (i.e. noise on console) per default +- ID3v2 now having some kind of support for unicode; trying to print what's + latin1-compatible and prevent messing up of terminal with unknown bytes +- several bug fixes and small improvements + +0.61: +----- - improved AltiVec code from Taihei Monma - an i486 optimization by Petr Salinger - improving interactive experience (terminal, frontends) - -> prevent/lessen bad effect after seeking while paused - -> show targeted position while seeking in terminal mode while paused - -> not messing up terminal on unexpected errors -- decoder robustness - better file sync (weird junk at beginning, some vbr frames) +-- prevent/lessen bad effect after seeking while paused +-- show targeted position while seeking in terminal mode while paused +-- not messing up terminal on unexpected errors +- decoder robustness - better file sync (weird junk at beginning, some vbr + frames) - build system improvements: - -> fixing configure isses on some platforms - -> adding cygwin, kfreebsd +-- fixing configure isses on some platforms +-- adding cygwin, kfreebsd - extended fix for CVE-2006-1655 - generic code should compiling again... -0.60 final (The Team!) ------ - +0.60 final: (The Team!) +----------- - no functional changes -0.60-beta6 (Thomas Orgis) ------ - -- more use of ID3v2 tags, mpg123 now displays both (merged) info from ID3v2 and ID3v1; trying to support both ID3v2.3 and ID3v2.4, but ignoring encoding (UTF8 should still work if your terminal supports it, straight unicode should work except for parsing genre numbers and multiline strings) - -0.60-beta5 (Thomas Orgis) ------ +0.60-beta6: (Thomas Orgis) +----------- +- more use of ID3v2 tags, mpg123 now displays both (merged) info from + ID3v2 and ID3v1; trying to support both ID3v2.3 and ID3v2.4, but ignoring + encoding (UTF8 should still work if your terminal supports it, straight + unicode should work except for parsing genre numbers and multiline strings) +0.60-beta5: (Thomas Orgis) +----------- - more robust playlist support: - -> path/url length not limited to 1023 characters anymore - -> reading in of whole playlist at program start (old operation was not really safe with playlist from http) - -> fixed bug where reading of playlist form stdin caused segfault (introduced with the pls format support) +-- path/url length not limited to 1023 characters anymore +-- reading in of whole playlist at program start (old operation was not + really safe with playlist from http) +-- fixed bug where reading of playlist form stdin caused segfault (introduced + with the pls format support) - smaller cleanups, screen output cosmetics -0.60-beta4 (Nicholas Humfrey & Thomas Orgis) ------ - +0.60-beta4: (Nicholas Humfrey & Thomas Orgis) +----------- - proper seeking, also for VBR streams - real two-way seeking in remote control mode at all -- better estimates of remaining frames (on vbr files), exact if Xing header is found -- Removed libao support (as it is GPL and we aren't - and we don't need it with native Alsa) -- Added ALSA 0.9/1.0 support by Clemens Ladisch (old alsa is in audio_alsa05.c but will most likely vanish soon) +- better estimates of remaining frames (on vbr files), exact if Xing header + is found +- Removed libao support (as it is GPL and we aren't - and we don't need + it with native Alsa) +- Added ALSA 0.9/1.0 support by Clemens Ladisch (old alsa is in + audio_alsa05.c but will most likely vanish soon) - Added PortAudio audio-output support - Added SDL audio-output support - Fixed NAS audio-output support - re-enabled MPEG 2.5, code just seems to work -- improved stream checking; being more willing in general (favor resync instead of bail out) but directly give up if free format stream is obvious -- Whee! Initial Relative Volume Adjustment (buzz) support with reading of ReplayGain values in lame/info tag, the RVA2 frames in ID3v2.4, ID3v2 TXXX tags from foobar2000 (please test, someone!) and custom ID3v2.3 comments entitled RVA / RVA_ALBUM / RVA_AUDIOPHILE / RVA_RADIO / RVA_MIX +- improved stream checking; being more willing in general (favor resync + instead of bail out) but directly give up if free format stream is obvious +- Whee! Initial Relative Volume Adjustment (buzz) support with reading of + ReplayGain values in lame/info tag, the RVA2 frames in ID3v2.4, ID3v2 TXXX + tags from foobar2000 (please test, someone!) and custom ID3v2.3 comments + entitled RVA / RVA_ALBUM / RVA_AUDIOPHILE / RVA_RADIO / RVA_MIX - more persistence in trying to get http streams -0.60-beta3 (Thomas Orgis) ------ - -- fixed bug with segfault in http code on stream from live365.com - bug id 1529266 -- made http request HTTP/1.0 compilant again (tested only without proxy) - bug id 1529319 -- now using http content-type header to check for correct types mpg123 can understand - -> you can now always use -@ for a single http resource (direct stream or playlist) since a stream will be reopened based on MIME type, - though omitting it will save you one http request to the server in the direct stream case... -- now simple parsing of shoutcast pls playlists (how did you people use shoutcast before?) -- playlist mode enhanced with selective playback of one entry in list (--listentry parameter) - - -0.60-beta2 (Thomas Orgis) ------ - -- fixed bug in terminal control mode that caused the f key to quit program isntead of advance to next file (introduced by the first attempt to restore "normal" Ctrl+C behaviour in terminal control mode) - -0.60-beta1 (Thomas Orgis & Nicholas Humfrey) ------ +0.60-beta3: (Thomas Orgis) +----------- +- fixed bug with segfault in http code on stream from live365.com - + bug id 1529266 +- made http request HTTP/1.0 compilant again (tested only without proxy) - + bug id 1529319 +- now using http content-type header to check for correct types mpg123 can + understand +-- you can now always use -@ for a single http resource (direct stream or + playlist) since a stream will be reopened based on MIME type, + though omitting it will save you one http request to the server in the + direct stream case... +- now simple parsing of shoutcast pls playlists (how did you people use + shoutcast before?) +- playlist mode enhanced with selective playback of one entry in list + (--listentry parameter) + +0.60-beta2: (Thomas Orgis) +----------- +- fixed bug in terminal control mode that caused the f key to quit program + isntead of advance to next file (introduced by the first attempt to restore + "normal" Ctrl+C behaviour in terminal control mode) +0.60-beta1: (Thomas Orgis & Nicholas Humfrey) +----------- On the way to the first new offical realease since years! - new license: all LGPL except the old audio_alsa.c - merge with Nicholas' sourceforge package - - autooled configure/make system - - MacOSX, Jack, libao (alsa 0.9/1.x support through that) +-- autooled configure/make system +-- MacOSX, Jack, libao (alsa 0.9/1.x support through that) - experimental gapless playback for layer 3 - merged in MMX and AltiVec optimizations - security bug fix of GLSA 200607-01 and catching possible crashes found by fuzzing - fixed many issues here and there - polished help messages, updated man page... -UNDERGROUND 0.59r-thor7 (well, I'm going to release a _really_ official mpg123 in future) (Thomas Orgis ) ------ - +UNDERGROUND 0.59r-thor7: (Thomas Orgis ) (well, I'm going to +------------------------ release a _really_ official mpg123 in future) - applied relevant stuff from Debian's 22: - - fix for CVE-2006-1655 (buffer overflow in III_i_stereo()) - - strict aliasing hack in WRITE_SAMPLE of decode_i386.c - - fixed http streaming through proxy by actually using the request url... - - buffer resync on Ctrl-C (cleaning, reducing pauses with multiple files) - - removed unused esdserver variable from mpg123.h - - did NOT apply the Debian Makefile/manpage changes (going to rewrite that stuff anyway) +-- fix for CVE-2006-1655 (buffer overflow in III_i_stereo()) +-- strict aliasing hack in WRITE_SAMPLE of decode_i386.c +-- fixed http streaming through proxy by actually using the request url... +-- buffer resync on Ctrl-C (cleaning, reducing pauses with multiple files) +-- removed unused esdserver variable from mpg123.h +-- did NOT apply the Debian Makefile/manpage changes (going to rewrite that + stuff anyway) - made the netbsd-i386 targets visible as netbsd-x86 UNOFFICIAL 0.59r-thor6 (Thomas Orgis ) ------ - -- split nedbsd targets for realtime priority selection code; since one needs -lpthread with it. standard netbsd target doesn't use realtime code -- I won't recommend running mpg123 as root anyway! +---------------------- +- split nedbsd targets for realtime priority selection code; since one + needs -lpthread with it. standard netbsd target doesn't use realtime code -- + I won't recommend running mpg123 as root anyway! UNOFFICIAL 0.59r-thor5 (Thomas Orgis ) ------ - -- Separated the the use of char* equalfile as filename from the use as TRUE/FALSE flag by introducing int have_eq_settings. Compilers kept nagging about assigning and integer (TRUE) to char* ... and it feels more right this way. - -- Made control_generic aware of real being possibly different than float (seq command used to raise an FPE on OSF1 when this assumption was not the case. - -- Fixed the command line arg parsing to work properly on Alpha (32 and 64 bit mixup) +---------------------- +- Separated the the use of char* equalfile as filename from the use as + TRUE/FALSE flag by introducing int have_eq_settings. Compilers kept nagging + about assigning and integer (TRUE) to char* ... and it feels more right + this way. +- Made control_generic aware of real being possibly different than float (seq + command used to raise an FPE on OSF1 when this assumption was not the case. +- Fixed the command line arg parsing to work properly on Alpha (32 and 64 + bit mixup) UNOFFICIAL 0.59r-thor4 (Thomas Orgis ) ------ - -- merged with 0.59r-19 from Debian project (Daniel Kobras ), hopefully fixing all those security vulnerabilities - -> my dirty http_open and open_stream variants now replaced by more proper code - -> still my (rather workloaded) parsing/processing in control_generic, but now including the idea to watch out for \n, \r\n and \r (or \n\r, for that matter;-) - -UNOFFICIAL 0.59r-thor3 (Thomas Orgis ) ------ - -- hacked additional variants of http_open and open_stream that return errors instead of exit()ing; makes more sense when used by a frontend -- further cleanup (and return to using continue instead of nested if(){}else{if()else{}}) in command processing, better error messages there - -UNOFFICIAL 0.59r-ThOr(remote-err,eq,flushing) (Thomas Orgis ) ------ --added audio_flush() calls to various places in control_generic.c to make sure there is nothing left in there that hurts later (not sure if this has effects) --(re?)enabled (?) code for stream info --corrected answer of JUMP (now gives actual reached position, +/- 1 frame since I'll still have to figure out what frame 0 really is...) +---------------------- +- merged with 0.59r-19 from Debian project (Daniel Kobras + ), hopefully fixing all those security vulnerabilities + -> my dirty http_open and open_stream variants now replaced by more + proper code + -> still my (rather workloaded) parsing/processing in control_generic, + but now including the idea to watch out for \n, \r\n and \r (or \n\r, + for that matter;-) + +UNOFFICIAL 0.59r-thor3: (Thomas Orgis ) +----------------------- +- hacked additional variants of http_open and open_stream that return + errors instead of exit()ing; makes more sense when used by a frontend +- further cleanup (and return to using continue instead of nested + if(){}else{if()else{}}) in command processing, better error messages there + +UNOFFICIAL 0.59r-ThOr(remote-err,eq,flushing): (Thomas Orgis ) +---------------------------------------------- +- added audio_flush() calls to various places in control_generic.c to + make sure there is nothing left in there that hurts later (not sure if + this has effects) +- (re?)enabled (?) code for stream info +- corrected answer of JUMP (now gives actual reached position, +/- 1 frame + since I'll still have to figure out what frame 0 really is...) UNOFFICIAL 0.59r-realeq-remoteerr: (Thomas Orgis ) ------ -- applied patch from Cool Feet Audio project (nutcase@dtfm.org, see README.cfa) to use real-time equalizer in remote mode -- applied patch from AMF (amf.sourceforge.net) by Steve Grundell for remote communication not polluting the STDOUT where the audio data is read from (instead using STDERR) ... and faster seeking, maybe - The patches go not cleanly together, but rejects are trivial. Thus, a combined patch with both would makes sense. -- modified (IMHO improved) the control_generic command reading: now always making sure that the full command is read up to a mandatory \n; also reworked the application of the commands afterwards +---------------------------------- +- applied patch from Cool Feet Audio project (nutcase@dtfm.org, see + README.cfa) to use real-time equalizer in remote mode +- applied patch from AMF (amf.sourceforge.net) by Steve Grundell for remote + communication not polluting the STDOUT where the audio data is read from + (instead using STDERR) ... and faster seeking, maybe + The patches go not cleanly together, but rejects are trivial. Thus, + a combined patch with both would makes sense. +- modified (IMHO improved) the control_generic command reading: now + always making sure that the full command is read up to a mandatory \n; + also reworked the application of the commands afterwards - added SEQ command: simple eq with only 3 bands -- added SILENCE command: I don't want the playback messages when I don't read them (since my frontend is reading the STDOUT it knows what is going on) -- added SLJ command: SILENCE-LOAD-JUMP... a hack for my hacked mixplayd... maybe one should remove that again. +- added SILENCE command: I don't want the playback messages when I don't + read them (since my frontend is reading the STDOUT it knows what is going on) +- added SLJ command: SILENCE-LOAD-JUMP... a hack for my hacked + mixplayd... maybe one should remove that again. 0.59r: (MH) ------ +------ - applied audio_alib changes from Ralf Hildebrandt - some 'paetsches' from DK - minor optimizations in layer3 (dequantize/huffman) @@ -900,7 +1732,6 @@ UNOFFICIAL 0.59r-realeq-remoteerr: (Thomas Orgis ) - resync and bitrate correction relaxed - Slightly change verbose output; added countdown - 0.59n: (MH) ------ - fixed shuffle bug @@ -941,7 +1772,6 @@ UNOFFICIAL 0.59r-realeq-remoteerr: (Thomas Orgis ) - added Makefile.win32 - added NAS big endian fix - 0.59l: (MH) ------ - simple equalizer support (to be continued) @@ -950,7 +1780,6 @@ UNOFFICIAL 0.59r-realeq-remoteerr: (Thomas Orgis ) - added pentium optimized decode_i586 from Stefan Bieschewski - fixed a bug in MS dequantize function - 0.59k: (OF) ------ - fixed "Accept" header in httpget.c @@ -966,14 +1795,12 @@ UNOFFICIAL 0.59r-realeq-remoteerr: (Thomas Orgis ) - more compact MPEG header display in non-verbose mode - small fixes in buffer code and elsewhere - 0.59j: (MH) ------ - added sajber jukebox control interface (it's currently a big hack) (see 'JUKEBOX' file for more) - added simple rewind facility .. (only used by sajber interface at the moment) - 0.59i: (MH) ----------- - added front-end (remote) patch from "Brian J. Swetland" @@ -988,17 +1815,14 @@ UNOFFICIAL 0.59r-realeq-remoteerr: (Thomas Orgis ) - added 'http accept' patch from Hur TaeSung - fixed buffer mode bug - 0.59h: (MH) ------ - added '--8bit' option to force 'ULAW 8 BIT' playing - pcm buffer type changed to 'unsigned char *' -- plays 2:1 and 4:1 with the real frequency (ie 11025/22050 instead - of 44100) +- plays 2:1 and 4:1 with the real frequency (ie 11025/22050 instead of 44100) - program (re)sets (changed) frequency for every frame - buffer mode is broken - 0.59g: (MH) ------ - added support for MPEG 2.5 (it's a HACK!) .. mpg123 understands and plays @@ -1008,193 +1832,150 @@ UNOFFICIAL 0.59r-realeq-remoteerr: (Thomas Orgis ) - Tried the new imdct from the maplay1.2+ (version 1.81) package. (but it was slightly slower on my system, currently disabled) - 0.59f: (OF) ------ - HP-UX audio fix (provided by Damien Clermonte) - Buffering (-b option) hopefully fixed. Please test! - 0.59e: ------ - added Audio MPEG 2.0 support (but near untested) (MH) - 0.59d: (MH) ------ - minor modifications to dct64_i386.c - removed duplicated dependency 'dct64.o' in Makefile - 0.59c: (OF) ------ -Another complete rework of the buffer system (-b option) - (normally uses mmap(), but it can also use SYSV-ShMem because - mmap() is broken on linux). +- Another complete rework of the buffer system (-b option) (normally uses + mmap(), but it can also use SYSV-ShMem because mmap() is broken on linux). 0.59: (MH) ----- -extracted dct64() from decode*.c files. -some changes to dct64() and decode*.c to allow auto-increment/decrement -removed bit-counter in getbit-functions. Layer3 part2 now counts it itself. +- extracted dct64() from decode*.c files. +- some changes to dct64() and decode*.c to allow auto-increment/decrement +- removed bit-counter in getbit-functions. Layer3 part2 now counts it itself. 0.58: (OF) ----- -Bugfix: not closing the audio device caused a few samples to be lost. -Bugfix: audio_set_rate() was not called (!?!). -Additional command line options "--doublespeed" and "--halfspeed" - (couldn't find better names). See the manpage. -Complete redesign of command line options. See the manpage. -Changed the buffer algorithm (-b). I'm not sure whether it's better - or worse now. -Supports multiple files on the command line. Pressing Ctrl-C will - skip to the next MPEG file, pressing it twice within one second - will abort mpg123 completely. See the "INTERRUPT" section in the - manpage. -Support for http URLs. See also the -p option in the manpage. -Support for list files. See also the -@ option in the manpage. +- Bugfix: not closing the audio device caused a few samples to be lost. +- Bugfix: audio_set_rate() was not called (!?!). +- Additional command line options "--doublespeed" and "--halfspeed" (couldn't + find better names). See the manpage. +- Complete redesign of command line options. See the manpage. +- Changed the buffer algorithm (-b). I'm not sure whether it's better or worse + now. +- Supports multiple files on the command line. Pressing Ctrl-C will skip to the + next MPEG file, pressing it twice within one second will abort mpg123 + completely. See the "INTERRUPT" section in the manpage. +- Support for http URLs. See also the -p option in the manpage. +- Support for list files. See also the -@ option in the manpage. 0.57: (MH) ----- -Put the downsampling code together with the full - quality decode into one binary. (new options -2to1,-4to1) -Optimizations in the dct12. -Removed the 'int' version. +- Put the downsampling code together with the full quality decode into one + binary. (new options -2to1,-4to1) +- Optimizations in the dct12. +- Removed the 'int' version. 0.56: (OF) ----- -Additional command line option "-rs" to try to resync on - "broken" MPEG streams (now called "--resync" or "-y"). -Additional command line option "-b" to use audio output buffering. - See the manpage for additional information. -Changed a few variable names and some other minor fixes, so the - source compiles more cleanly (without warnings) on most - platforms (for example, the FreeBSD port compiles without - warnings using "-Wall -ansi -pedantic"). -Makefile changes: moved "solaris" to "solaris-gcc", new target - "solaris" (using Sun's SparcWorks cc, faster tha gcc!), new - targets "aix" and "generic". +- Additional command line option "-rs" to try to resync on "broken" MPEG streams + (now called "--resync" or "-y"). +- Additional command line option "-b" to use audio output buffering. See the + manpage for additional information. +- Changed a few variable names and some other minor fixes, so the + source compiles more cleanly (without warnings) on most platforms (for + example, the FreeBSD port compiles without warnings using "-Wall -ansi + -pedantic"). +- Makefile changes: moved "solaris" to "solaris-gcc", new target + "solaris" (using Sun's SparcWorks cc, faster tha gcc!), new targets + "aix" and "generic". 0.55: ----- -removed some obsolete code from layer3.c (MH) -changed scalefac stoing in layer3 (MH) -decode_4to1.c added again. Renamed decode_lp.c to decode_2to1.c (MH) -(both not optimized .. still expterimental) -Minor cleanups and optimizations in layer3. (MH) -Removed some (probable) minor bugs. (MH) -Changed 2**(...) scaling (and omitted a few muls) (MH) -Changed Makefile (OF) -Changed dequantize to reorder with a mapping table - (you can disable this by undefining MAP in layer3.c) (MH) -removed the 'dummy' scale step for mixed mode (MH) -Changed copy policy (MH) -Modified dequant-reorder-mapping (MH) +- removed some obsolete code from layer3.c (MH) +- changed scalefac stoing in layer3 (MH) +- decode_4to1.c added again. Renamed decode_lp.c to decode_2to1.c (MH) + (both not optimized .. still expterimental) +- Minor cleanups and optimizations in layer3. (MH) +- Removed some (probable) minor bugs. (MH) +- Changed 2**(...) scaling (and omitted a few muls) (MH) +- Changed Makefile (OF) +- Changed dequantize to reorder with a mapping table + (you can disable this by undefining MAP in layer3.c) (MH) +- removed the 'dummy' scale step for mixed mode (MH) +- Changed copy policy (MH) +- Modified dequant-reorder-mapping (MH) 0.54: (MH) ----- -Minor changes in the documents .. -huffman.c: x->len,y->len removed .. always '15' for the important cases -audio.c: some additions to the SOLARIS audio code +- Minor changes in the documents .. +- huffman.c: x->len,y->len removed .. always '15' for the important cases +- audio.c: some additions to the SOLARIS audio code 0.53b: (OF) ------ -Makefile: - - Renamed SPARC10 to SUNOS (which is more appropriate). - Tested with SunOS 4.1.4 on a SPARCstation SLC, 20 MHz - (322% CPU, so no realtime decoding). - Added SOLARIS. Tested with Solaris 2.5.1 on an Ultra 1, - 167 MHz (14% CPU), a SPARCstation 5, 110 MHz (47% CPU), - and a SPARCstation 10, 33 MHz (68% CPU). - Added FreeBSD. Tested with 2.1.7 on a Pentium-90 (38% CPU) - and 2.2 on a Pentium-166 (20% CPU). - Added Digital Unix. Tested with DU 3.2 on a DEC 3000/500 - (Alpha AXP 150 MHz, 33% CPU). Does not support DEC's - audio interface ("AudioFile"), decodes to stdout only. - Improved "clean" target to remove core files and editor - backup files. - Added "install" target. - Added "dist" target to create a .tar.gz file of the source - directory. - - In the distributed Makefile, all system sections are - commented out. When you type "make" without uncommenting - one of the sections, an appropriate error message will - be displayed. - -audio.c - - Fixed problem when opening /dev/audio on Solaris: - I had to remove O_NDELAY, because writing to /dev/audio - didn't block until the requested number of samples - could be written, but instead it wrote only as much - samples as it was able too. Sounded funny. Removing - O_NDELAY fixed the problem. I don't think that it - hurts SunOS either, so I didn't make another #ifdef. - -common.c - - Fixed bug by adding function finish_output(): - The decoder writes the audio samples into a buffer, and - each time the buffer is full, it is written to the - audio device (or to stdout). But when the decoding is - done, there are some samples left in the buffer which - aren't written yet -- they were just discarded. - This additional function fixes the problem by writing - the remaining samples from the buffer. It is called - immediately after the main frame loop in mpg123.c. - -decode*.c - - Fixed compiler warning on symbol "div": - Some compilers issue warnings because the symbol div is - already used for something else (see "man div"), so I - changed it to "divv". - -layer*.c - - Functions do_layer*: - Moved the declaration for audio_play_samples into - mpg123.h. Makes the code cleaner. - - I moved the variables pcm_samples and pcm_point to - common.c, so they are shared between all modules. This - was necessary because the finish_output() function - (see common.c above) needs to access them. - - Renamed loop variables "i" and "j" to "k" in order to - fix compiler warnings for duplicate/hidden symbols - (similar to "div" in decode*.c, see above). - - Changed the preprocessor symbol AUDIOBUFSIZE into a - global variable "audiobufsize". This makes it possible - to change it by a command line option. - -layer1.c - - Fixed error in function I_step_one, second parameter: - unsigned int scale_index[2][] --> ...[2][SBLIMIT] - This caused an error with the DU compiler (which is ok, - because [2][] is incorrect according to ANSI). I don't - know whether [2][SBLIMIT] actually works correctly (I - have no layer-1 streams to test it), but at least it - compiles without error, and it appears to be correct - (looking at the rest of the source). Heaven knows why - gcc doesn't issue an error, and what it actually makes - from it. - -mpg123.1 - - A simple manual page. Type "nroff -man mpg123.1 | more" - to view it, or install it in /usr/local/man/man1 (this is - done automatically by "make install"). - -mpg123.c - - New boolean variable "quiet": - If this variable is set to TRUE (command line option - -q), no messages are printed. - -*** - +- Makefile: +-- Renamed SPARC10 to SUNOS (which is more appropriate). + Tested with SunOS 4.1.4 on a SPARCstation SLC, 20 MHz (322% CPU, + so no realtime decoding). +-- Added SOLARIS. Tested with Solaris 2.5.1 on an Ultra 1, 167 MHz (14% + CPU), a SPARCstation 5, 110 MHz (47% CPU), and a SPARCstation 10, 33 MHz + (68% CPU). +-- Added FreeBSD. Tested with 2.1.7 on a Pentium-90 (38% CPU) and 2.2 on a + Pentium-166 (20% CPU). +-- Added Digital Unix. Tested with DU 3.2 on a DEC 3000/500 (Alpha AXP + 150 MHz, 33% CPU). Does not support DEC's audio interface ("AudioFile"), + decodes to stdout only. +-- Improved "clean" target to remove core files and editor backup files. +-- Added "install" target. +-- Added "dist" target to create a .tar.gz file of the source directory. +-- In the distributed Makefile, all system sections are commented out. When + you type "make" without uncommenting one of the sections, an appropriate + error message will be displayed. +- audio.c + Fixed problem when opening /dev/audio on Solaris: I had to remove O_NDELAY, + because writing to /dev/audio didn't block until the requested number of + samples could be written, but instead it wrote only as much samples as + it was able too. Sounded funny. Removing O_NDELAY fixed the problem. + I don't think that it hurts SunOS either, so I didn't make another #ifdef. +- common.c + Fixed bug by adding function finish_output(): The decoder writes the audio + samples into a buffer, and each time the buffer is full, it is written + to the audio device (or to stdout). But when the decoding is done, + there are some samples left in the buffer which aren't written yet -- + they were just discarded. This additional function fixes the problem by + writing the remaining samples from the buffer. It is called immediately + after the main frame loop in mpg123.c. +- decode*.c + Fixed compiler warning on symbol "div": Some compilers issue warnings + because the symbol div is already used for something else (see "man div"), + so I changed it to "divv". +- layer*.c Functions do_layer*: +-- Moved the declaration for audio_play_samples into mpg123.h. Makes the + code cleaner. +-- I moved the variables pcm_samples and pcm_point to common.c, so they are + shared between all modules. This was necessary because the finish_output() + function (see common.c above) needs to access them. +-- Renamed loop variables "i" and "j" to "k" in order to fix compiler warnings + for duplicate/hidden symbols (similar to "div" in decode*.c, see above). + Changed the preprocessor symbol AUDIOBUFSIZE into a global variable + "audiobufsize". This makes it possible to change it by a command + line option. +- layer1.c + Fixed error in function I_step_one, second parameter: unsigned int + scale_index[2][] --> ...[2][SBLIMIT] This caused an error with the DU + compiler (which is ok, because [2][] is incorrect according to ANSI). + I don't know whether [2][SBLIMIT] actually works correctly (I have no + layer-1 streams to test it), but at least it compiles without error, and + it appears to be correct (looking at the rest of the source). Heaven knows + why gcc doesn't issue an error, and what it actually makes from it. +- mpg123.1 + A simple manual page. Type "nroff -man mpg123.1 | more" to view it, or + install it in /usr/local/man/man1 (this is done automatically by "make + install"). +- mpg123.c + New boolean variable "quiet": If this variable is set to TRUE (command line + option -q), no messages are printed. diff --git a/deps/mpg123/NEWS.libmpg123 b/deps/mpg123/NEWS.libmpg123 index 67ce8cd..ae33d99 100644 --- a/deps/mpg123/NEWS.libmpg123 +++ b/deps/mpg123/NEWS.libmpg123 @@ -1,5 +1,70 @@ Changes in libmpg123 libtool interface versions... +44.0.44 + - added mpg123_getformat2() + +43.0.43 + - added MPG123_NO_PEEK_END and MPG123_FORCE_SEEKABLE + +42.0.42 + - added mpg123_framelength() + Now mpg123_position() is truly obsolete! + - hardened string API to not crash if given NULL pointers + (except mpg123_init_string()) + - equalizer feature optional + +41.0.41 + - Add checks for NULL handles in some API functions that missed that, changed return value in others to MPG123_BAD_HANDLE where appropriate: + - mpg123_format_none(NULL) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_format_all(NULL) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_format(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_reset_eq(NULL) == MPG123_BAD_HANDLE (was: undefined) + - mpg123_replace_buffer(NULL, ...) == MPG123_BAD_HANDLE (was: undefined) + - mpg123_framedata(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_decoder(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_param(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_getparam(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_getstate(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_eq(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_open(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_open_handle(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_open_feed(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_replace_reader(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_replace_reader_handle(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_decode_frame(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_feed(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_decode(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_info(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_getformat(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_set_filesize(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_scan(NULL) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_id3(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_icy(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_index(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_set_index(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - mpg123_close(NULL, ...) == MPG123_BAD_HANDLE (was: MPG123_ERR) + - Changed return value of mpg123_geteq() to 0 for NULL handle to be consistent with itself. + + +40.0.40 + - Bump for marking the first actual implementation of A-Law encoding. + Not that it matters to anyone, though --- I wonder why not even the + Asterisk users wanted this. It's for telephony, dammit! + - Added arm_fpu decoder for runtime switch between NEON and generic fpu. + +39.2.39 + - Added more elaborate post-processing to enable 32 and 24 bit output also with low-precision decoder (16 bit, fixed-point). + +39.0.39 + - Added MPG123_FRESH_DECODER. + - Also containing several regression fixes. + +38.0.38 + - Added MPG123_PICTURE and associated addition to mpg123_id3v2 struct. + +37.0.37 + - Added mpg123_chomp_string. + 36.0.36 - Extended MPG123_RESYNC_LIMIT to initial header search. - Not cutting decoder delay unconditionally anymore (only in combination with known encoder delay / padding). diff --git a/deps/mpg123/TODO b/deps/mpg123/TODO index ec4de61..04fa639 100644 --- a/deps/mpg123/TODO +++ b/deps/mpg123/TODO @@ -1,3 +1,8 @@ +BEFORE 1.23 RELEASE: + +- add client name as libout123 parameter, to be used by jack backend + PID still needed? JACK handles possibly non-unique names. + Things that need to be done... ... as always, mostly outdated. @@ -33,6 +38,3 @@ That being said, in the "normal" case, there is no leak. 5. What's about SINGLE_MIX? Check what is _really_ happening there, make some test file... - -6. Ensure proper operation of free format with the feeder. -MPG123_NEED_MORE needs to be propagated from the freeformat framesize guesser. diff --git a/deps/mpg123/aclocal.m4 b/deps/mpg123/aclocal.m4 index 713f790..9c57264 100644 --- a/deps/mpg123/aclocal.m4 +++ b/deps/mpg123/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.12.2 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -11,6 +11,7 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, @@ -19,7 +20,918 @@ 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'.])]) +# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- +# +# Copyright (C) 1999-2008, 2011-2015 Free Software Foundation, Inc. +# Written by Thomas Tanner, 1999 +# +# 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 20 LTDL_INIT + +# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) +# ------------------------------------------ +# DIRECTORY contains the libltdl sources. It is okay to call this +# function multiple times, as long as the same DIRECTORY is always given. +AC_DEFUN([LT_CONFIG_LTDL_DIR], +[AC_BEFORE([$0], [LTDL_INIT]) +_$0($*) +])# LT_CONFIG_LTDL_DIR + +# We break this out into a separate macro, so that we can call it safely +# internally without being caught accidentally by the sed scan in libtoolize. +m4_defun([_LT_CONFIG_LTDL_DIR], +[dnl remove trailing slashes +m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$])) +m4_case(_LTDL_DIR, + [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply '.' + m4_if(_ARG_DIR, [.], + [], + [m4_define([_LTDL_DIR], _ARG_DIR) + _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])], + [m4_if(_ARG_DIR, _LTDL_DIR, + [], + [m4_fatal([multiple libltdl directories: ']_LTDL_DIR[', ']_ARG_DIR['])])]) +m4_popdef([_ARG_DIR]) +])# _LT_CONFIG_LTDL_DIR + +# Initialise: +m4_define([_LTDL_DIR], []) + + +# _LT_BUILD_PREFIX +# ---------------- +# If Autoconf is new enough, expand to '$(top_build_prefix)', otherwise +# to '$(top_builddir)/'. +m4_define([_LT_BUILD_PREFIX], +[m4_ifdef([AC_AUTOCONF_VERSION], + [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]), + [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX], + [$(top_build_prefix)], + [$(top_builddir)/])], + [$(top_build_prefix)])], + [$(top_builddir)/])[]dnl +]) + + +# LTDL_CONVENIENCE +# ---------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with +# '$(top_build_prefix)' if available, otherwise with '$(top_builddir)/', +# and LTDLINCL will be prefixed with '$(top_srcdir)/' (note the single +# quotes!). If your package is not flat and you're not using automake, +# define top_build_prefix, top_builddir, and top_srcdir appropriately +# in your Makefiles. +AC_DEFUN([LTDL_CONVENIENCE], +[AC_BEFORE([$0], [LTDL_INIT])dnl +dnl Although the argument is deprecated and no longer documented, +dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one +dnl here make sure it is the same as any other declaration of libltdl's +dnl location! This also ensures lt_ltdl_dir is set when configure.ac is +dnl not yet using an explicit LT_CONFIG_LTDL_DIR. +m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl +_$0() +])# LTDL_CONVENIENCE + +# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools, +# now we have LT_CONFIG_LTDL_DIR: +AU_DEFUN([AC_LIBLTDL_CONVENIENCE], +[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) +_LTDL_CONVENIENCE]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], []) + + +# _LTDL_CONVENIENCE +# ----------------- +# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]). +m4_defun([_LTDL_CONVENIENCE], +[case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; +esac +LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la" +LTDLDEPS=$LIBLTDL +LTDLINCL='-I$(top_srcdir)'"${lt_ltdl_dir+/$lt_ltdl_dir}" + +AC_SUBST([LIBLTDL]) +AC_SUBST([LTDLDEPS]) +AC_SUBST([LTDLINCL]) + +# For backwards non-gettext consistent compatibility... +INCLTDL=$LTDLINCL +AC_SUBST([INCLTDL]) +])# _LTDL_CONVENIENCE + + +# LTDL_INSTALLABLE +# ---------------- +# sets LIBLTDL to the link flags for the libltdl installable library +# and LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl +# is not found, LIBLTDL will be prefixed with '$(top_build_prefix)' if +# available, otherwise with '$(top_builddir)/', and LTDLINCL will be +# prefixed with '$(top_srcdir)/' (note the single quotes!). If your +# package is not flat and you're not using automake, define top_build_prefix, +# top_builddir, and top_srcdir appropriately in your Makefiles. +# In the future, this macro may have to be called after LT_INIT. +AC_DEFUN([LTDL_INSTALLABLE], +[AC_BEFORE([$0], [LTDL_INIT])dnl +dnl Although the argument is deprecated and no longer documented, +dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one +dnl here make sure it is the same as any other declaration of libltdl's +dnl location! This also ensures lt_ltdl_dir is set when configure.ac is +dnl not yet using an explicit LT_CONFIG_LTDL_DIR. +m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl +_$0() +])# LTDL_INSTALLABLE + +# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools, +# now we have LT_CONFIG_LTDL_DIR: +AU_DEFUN([AC_LIBLTDL_INSTALLABLE], +[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) +_LTDL_INSTALLABLE]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], []) + + +# _LTDL_INSTALLABLE +# ----------------- +# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]). +m4_defun([_LTDL_INSTALLABLE], +[if test -f "$prefix/lib/libltdl.la"; then + lt_save_LDFLAGS=$LDFLAGS + LDFLAGS="-L$prefix/lib $LDFLAGS" + AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes]) + LDFLAGS=$lt_save_LDFLAGS + if test yes = "${lt_lib_ltdl-no}"; then + if test yes != "$enable_ltdl_install"; then + # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install + AC_MSG_WARN([not overwriting libltdl at $prefix, force with '--enable-ltdl-install']) + enable_ltdl_install=no + fi + elif test no = "$enable_ltdl_install"; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + fi +fi + +# If configure.ac declared an installable ltdl, and the user didn't override +# with --disable-ltdl-install, we will install the shipped libltdl. +case $enable_ltdl_install in + no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL=-lltdl + LTDLDEPS= + LTDLINCL= + ;; + *) enable_ltdl_install=yes + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la" + LTDLDEPS=$LIBLTDL + LTDLINCL='-I$(top_srcdir)'"${lt_ltdl_dir+/$lt_ltdl_dir}" + ;; +esac + +AC_SUBST([LIBLTDL]) +AC_SUBST([LTDLDEPS]) +AC_SUBST([LTDLINCL]) + +# For backwards non-gettext consistent compatibility... +INCLTDL=$LTDLINCL +AC_SUBST([INCLTDL]) +])# LTDL_INSTALLABLE + + +# _LTDL_MODE_DISPATCH +# ------------------- +m4_define([_LTDL_MODE_DISPATCH], +[dnl If _LTDL_DIR is '.', then we are configuring libltdl itself: +m4_if(_LTDL_DIR, [], + [], + dnl if _LTDL_MODE was not set already, the default value is 'subproject': + [m4_case(m4_default(_LTDL_MODE, [subproject]), + [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR) + _LT_SHELL_INIT([lt_dlopen_dir=$lt_ltdl_dir])], + [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir=$lt_ltdl_dir; lt_libobj_prefix=$lt_ltdl_dir/])], + [recursive], [], + [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl +dnl Be careful not to expand twice: +m4_define([$0], []) +])# _LTDL_MODE_DISPATCH + + +# _LT_LIBOBJ(MODULE_NAME) +# ----------------------- +# Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead +# of into LIBOBJS. +AC_DEFUN([_LT_LIBOBJ], [ + m4_pattern_allow([^_LT_LIBOBJS$]) + _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" +])# _LT_LIBOBJS + + +# LTDL_INIT([OPTIONS]) +# -------------------- +# Clients of libltdl can use this macro to allow the installer to +# choose between a shipped copy of the ltdl sources or a preinstalled +# version of the library. If the shipped ltdl sources are not in a +# subdirectory named libltdl, the directory name must be given by +# LT_CONFIG_LTDL_DIR. +AC_DEFUN([LTDL_INIT], +[dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +dnl We need to keep our own list of libobjs separate from our parent project, +dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while +dnl we look for our own LIBOBJs. +m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) +m4_pushdef([AC_LIBSOURCES]) + +dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: +m4_if(_LTDL_MODE, [], + [m4_define([_LTDL_MODE], m4_default([$2], [subproject])) + m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])], + [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])]) + +AC_ARG_WITH([included_ltdl], + [AS_HELP_STRING([--with-included-ltdl], + [use the GNU ltdl sources included here])]) + +if test yes != "$with_included_ltdl"; then + # We are not being forced to use the included libltdl sources, so + # decide whether there is a useful installed version we can use. + AC_CHECK_HEADER([ltdl.h], + [AC_CHECK_DECL([lt_dlinterface_register], + [AC_CHECK_LIB([ltdl], [lt_dladvise_preload], + [with_included_ltdl=no], + [with_included_ltdl=yes])], + [with_included_ltdl=yes], + [AC_INCLUDES_DEFAULT + #include ])], + [with_included_ltdl=yes], + [AC_INCLUDES_DEFAULT] + ) +fi + +dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE +dnl was called yet, then for old times' sake, we assume libltdl is in an +dnl eponymous directory: +AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])]) + +AC_ARG_WITH([ltdl_include], + [AS_HELP_STRING([--with-ltdl-include=DIR], + [use the ltdl headers installed in DIR])]) + +if test -n "$with_ltdl_include"; then + if test -f "$with_ltdl_include/ltdl.h"; then : + else + AC_MSG_ERROR([invalid ltdl include directory: '$with_ltdl_include']) + fi +else + with_ltdl_include=no +fi + +AC_ARG_WITH([ltdl_lib], + [AS_HELP_STRING([--with-ltdl-lib=DIR], + [use the libltdl.la installed in DIR])]) + +if test -n "$with_ltdl_lib"; then + if test -f "$with_ltdl_lib/libltdl.la"; then : + else + AC_MSG_ERROR([invalid ltdl library directory: '$with_ltdl_lib']) + fi +else + with_ltdl_lib=no +fi + +case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in + ,yes,no,no,) + m4_case(m4_default(_LTDL_TYPE, [convenience]), + [convenience], [_LTDL_CONVENIENCE], + [installable], [_LTDL_INSTALLABLE], + [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)]) + ;; + ,no,no,no,) + # If the included ltdl is not to be used, then use the + # preinstalled libltdl we found. + AC_DEFINE([HAVE_LTDL], [1], + [Define this if a modern libltdl is already installed]) + LIBLTDL=-lltdl + LTDLDEPS= + LTDLINCL= + ;; + ,no*,no,*) + AC_MSG_ERROR(['--with-ltdl-include' and '--with-ltdl-lib' options must be used together]) + ;; + *) with_included_ltdl=no + LIBLTDL="-L$with_ltdl_lib -lltdl" + LTDLDEPS= + LTDLINCL=-I$with_ltdl_include + ;; +esac +INCLTDL=$LTDLINCL + +# Report our decision... +AC_MSG_CHECKING([where to find libltdl headers]) +AC_MSG_RESULT([$LTDLINCL]) +AC_MSG_CHECKING([where to find libltdl library]) +AC_MSG_RESULT([$LIBLTDL]) + +_LTDL_SETUP + +dnl restore autoconf definition. +m4_popdef([AC_LIBOBJ]) +m4_popdef([AC_LIBSOURCES]) + +AC_CONFIG_COMMANDS_PRE([ + _ltdl_libobjs= + _ltdl_ltlibobjs= + if test -n "$_LT_LIBOBJS"; then + # Remove the extension. + _lt_sed_drop_objext='s/\.o$//;s/\.obj$//' + for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do + _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext" + _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo" + done + fi + AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs]) + AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs]) +]) + +# Only expand once: +m4_define([LTDL_INIT]) +])# LTDL_INIT + +# Old names: +AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)]) +AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)]) +AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIB_LTDL], []) +dnl AC_DEFUN([AC_WITH_LTDL], []) +dnl AC_DEFUN([LT_WITH_LTDL], []) + + +# _LTDL_SETUP +# ----------- +# Perform all the checks necessary for compilation of the ltdl objects +# -- including compiler checks and header checks. This is a public +# interface mainly for the benefit of libltdl's own configure.ac, most +# other users should call LTDL_INIT instead. +AC_DEFUN([_LTDL_SETUP], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_SYS_MODULE_EXT])dnl +AC_REQUIRE([LT_SYS_MODULE_PATH])dnl +AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl +AC_REQUIRE([LT_LIB_DLLOAD])dnl +AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl +AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl +AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl +AC_REQUIRE([LT_FUNC_ARGZ])dnl + +m4_require([_LT_CHECK_OBJDIR])dnl +m4_require([_LT_HEADER_DLFCN])dnl +m4_require([_LT_CHECK_DLPREOPEN])dnl +m4_require([_LT_DECL_SED])dnl + +dnl Don't require this, or it will be expanded earlier than the code +dnl that sets the variables it relies on: +_LT_ENABLE_INSTALL + +dnl _LTDL_MODE specific code must be called at least once: +_LTDL_MODE_DISPATCH + +# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS +# the user used. This is so that ltdl.h can pick up the parent projects +# config.h file, The first file in AC_CONFIG_HEADERS must contain the +# definitions required by ltdl.c. +# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility). +AC_CONFIG_COMMANDS_PRE([dnl +m4_pattern_allow([^LT_CONFIG_H$])dnl +m4_ifset([AH_HEADER], + [LT_CONFIG_H=AH_HEADER], + [m4_ifset([AC_LIST_HEADERS], + [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's|^[[ ]]*||;s|[[ :]].*$||'`], + [])])]) +AC_SUBST([LT_CONFIG_H]) + +AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h], + [], [], [AC_INCLUDES_DEFAULT]) + +AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) +AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) + +m4_pattern_allow([LT_LIBEXT])dnl +AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) + +name= +eval "lt_libprefix=\"$libname_spec\"" +m4_pattern_allow([LT_LIBPREFIX])dnl +AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix]) + +name=ltdl +eval "LTDLOPEN=\"$libname_spec\"" +AC_SUBST([LTDLOPEN]) +])# _LTDL_SETUP + + +# _LT_ENABLE_INSTALL +# ------------------ +m4_define([_LT_ENABLE_INSTALL], +[AC_ARG_ENABLE([ltdl-install], + [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])]) + +case ,$enable_ltdl_install,$enable_ltdl_convenience in + *yes*) ;; + *) enable_ltdl_convenience=yes ;; +esac + +m4_ifdef([AM_CONDITIONAL], +[AM_CONDITIONAL(INSTALL_LTDL, test no != "${enable_ltdl_install-no}") + AM_CONDITIONAL(CONVENIENCE_LTDL, test no != "${enable_ltdl_convenience-no}")]) +])# _LT_ENABLE_INSTALL + + +# LT_SYS_DLOPEN_DEPLIBS +# --------------------- +AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_CACHE_CHECK([whether deplibs are loaded by dlopen], + [lt_cv_sys_dlopen_deplibs], + [# PORTME does your system automatically load deplibs for dlopen? + # or its logical equivalent (e.g. shl_load for HP-UX < 11) + # For now, we just catch OSes we know something about -- in the + # future, we'll try test this programmatically. + lt_cv_sys_dlopen_deplibs=unknown + case $host_os in + aix3*|aix4.1.*|aix4.2.*) + # Unknown whether this is true for these versions of AIX, but + # we want this 'case' here to explicitly catch those versions. + lt_cv_sys_dlopen_deplibs=unknown + ;; + aix[[4-9]]*) + lt_cv_sys_dlopen_deplibs=yes + ;; + amigaos*) + case $host_cpu in + powerpc) + lt_cv_sys_dlopen_deplibs=no + ;; + esac + ;; + bitrig*) + lt_cv_sys_dlopen_deplibs=yes + ;; + darwin*) + # Assuming the user has installed a libdl from somewhere, this is true + # If you are looking for one http://www.opendarwin.org/projects/dlcompat + lt_cv_sys_dlopen_deplibs=yes + ;; + freebsd* | dragonfly*) + lt_cv_sys_dlopen_deplibs=yes + ;; + gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu) + # GNU and its variants, using gnu ld.so (Glibc) + lt_cv_sys_dlopen_deplibs=yes + ;; + hpux10*|hpux11*) + lt_cv_sys_dlopen_deplibs=yes + ;; + interix*) + lt_cv_sys_dlopen_deplibs=yes + ;; + irix[[12345]]*|irix6.[[01]]*) + # Catch all versions of IRIX before 6.2, and indicate that we don't + # know how it worked for any of those versions. + lt_cv_sys_dlopen_deplibs=unknown + ;; + irix*) + # The case above catches anything before 6.2, and it's known that + # at 6.2 and later dlopen does load deplibs. + lt_cv_sys_dlopen_deplibs=yes + ;; + netbsd*) + lt_cv_sys_dlopen_deplibs=yes + ;; + openbsd*) + lt_cv_sys_dlopen_deplibs=yes + ;; + osf[[1234]]*) + # dlopen did load deplibs (at least at 4.x), but until the 5.x series, + # it did *not* use an RPATH in a shared library to find objects the + # library depends on, so we explicitly say 'no'. + lt_cv_sys_dlopen_deplibs=no + ;; + osf5.0|osf5.0a|osf5.1) + # dlopen *does* load deplibs and with the right loader patch applied + # it even uses RPATH in a shared library to search for shared objects + # that the library depends on, but there's no easy way to know if that + # patch is installed. Since this is the case, all we can really + # say is unknown -- it depends on the patch being installed. If + # it is, this changes to 'yes'. Without it, it would be 'no'. + lt_cv_sys_dlopen_deplibs=unknown + ;; + osf*) + # the two cases above should catch all versions of osf <= 5.1. Read + # the comments above for what we know about them. + # At > 5.1, deplibs are loaded *and* any RPATH in a shared library + # is used to find them so we can finally say 'yes'. + lt_cv_sys_dlopen_deplibs=yes + ;; + qnx*) + lt_cv_sys_dlopen_deplibs=yes + ;; + solaris*) + lt_cv_sys_dlopen_deplibs=yes + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + esac + ]) +if test yes != "$lt_cv_sys_dlopen_deplibs"; then + AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], + [Define if the OS needs help to load dependent libraries for dlopen().]) +fi +])# LT_SYS_DLOPEN_DEPLIBS + +# Old name: +AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], []) + + +# LT_SYS_MODULE_EXT +# ----------------- +AC_DEFUN([LT_SYS_MODULE_EXT], +[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl +AC_CACHE_CHECK([what extension is used for runtime loadable modules], + [libltdl_cv_shlibext], +[ +module=yes +eval libltdl_cv_shlibext=$shrext_cmds +module=no +eval libltdl_cv_shrext=$shrext_cmds + ]) +if test -n "$libltdl_cv_shlibext"; then + m4_pattern_allow([LT_MODULE_EXT])dnl + AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"], + [Define to the extension used for runtime loadable modules, say, ".so".]) +fi +if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then + m4_pattern_allow([LT_SHARED_EXT])dnl + AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"], + [Define to the shared library suffix, say, ".dylib".]) +fi +if test -n "$shared_archive_member_spec"; then + m4_pattern_allow([LT_SHARED_LIB_MEMBER])dnl + AC_DEFINE_UNQUOTED([LT_SHARED_LIB_MEMBER], ["($shared_archive_member_spec.o)"], + [Define to the shared archive member specification, say "(shr.o)".]) +fi +])# LT_SYS_MODULE_EXT + +# Old name: +AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LTDL_SHLIBEXT], []) + + +# LT_SYS_MODULE_PATH +# ------------------ +AC_DEFUN([LT_SYS_MODULE_PATH], +[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl +AC_CACHE_CHECK([what variable specifies run-time module search path], + [lt_cv_module_path_var], [lt_cv_module_path_var=$shlibpath_var]) +if test -n "$lt_cv_module_path_var"; then + m4_pattern_allow([LT_MODULE_PATH_VAR])dnl + AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"], + [Define to the name of the environment variable that determines the run-time module search path.]) +fi +])# LT_SYS_MODULE_PATH + +# Old name: +AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LTDL_SHLIBPATH], []) + + +# LT_SYS_DLSEARCH_PATH +# -------------------- +AC_DEFUN([LT_SYS_DLSEARCH_PATH], +[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl +AC_CACHE_CHECK([for the default library search path], + [lt_cv_sys_dlsearch_path], + [lt_cv_sys_dlsearch_path=$sys_lib_dlsearch_path_spec]) +if test -n "$lt_cv_sys_dlsearch_path"; then + sys_dlsearch_path= + for dir in $lt_cv_sys_dlsearch_path; do + if test -z "$sys_dlsearch_path"; then + sys_dlsearch_path=$dir + else + sys_dlsearch_path=$sys_dlsearch_path$PATH_SEPARATOR$dir + fi + done + m4_pattern_allow([LT_DLSEARCH_PATH])dnl + AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"], + [Define to the system default library search path.]) +fi +])# LT_SYS_DLSEARCH_PATH + +# Old name: +AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], []) + + +# _LT_CHECK_DLPREOPEN +# ------------------- +m4_defun([_LT_CHECK_DLPREOPEN], +[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], + [libltdl_cv_preloaded_symbols], + [if test -n "$lt_cv_sys_global_symbol_pipe"; then + libltdl_cv_preloaded_symbols=yes + else + libltdl_cv_preloaded_symbols=no + fi + ]) +if test yes = "$libltdl_cv_preloaded_symbols"; then + AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1], + [Define if libtool can extract symbol lists from object files.]) +fi +])# _LT_CHECK_DLPREOPEN + + +# LT_LIB_DLLOAD +# ------------- +AC_DEFUN([LT_LIB_DLLOAD], +[m4_pattern_allow([^LT_DLLOADERS$]) +LT_DLLOADERS= +AC_SUBST([LT_DLLOADERS]) + +AC_LANG_PUSH([C]) +lt_dlload_save_LIBS=$LIBS + +LIBADD_DLOPEN= +AC_SEARCH_LIBS([dlopen], [dl], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + if test "$ac_cv_search_dlopen" != "none required"; then + LIBADD_DLOPEN=-ldl + fi + libltdl_cv_lib_dl_dlopen=yes + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H +# include +#endif + ]], [[dlopen(0, 0);]])], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + libltdl_cv_func_dlopen=yes + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], + [AC_CHECK_LIB([svld], [dlopen], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + LIBADD_DLOPEN=-lsvld libltdl_cv_func_dlopen=yes + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])]) +if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen" +then + lt_save_LIBS=$LIBS + LIBS="$LIBS $LIBADD_DLOPEN" + AC_CHECK_FUNCS([dlerror]) + LIBS=$lt_save_LIBS +fi +AC_SUBST([LIBADD_DLOPEN]) + +LIBADD_SHL_LOAD= +AC_CHECK_FUNC([shl_load], + [AC_DEFINE([HAVE_SHL_LOAD], [1], + [Define if you have the shl_load function.]) + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"], + [AC_CHECK_LIB([dld], [shl_load], + [AC_DEFINE([HAVE_SHL_LOAD], [1], + [Define if you have the shl_load function.]) + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" + LIBADD_SHL_LOAD=-ldld])]) +AC_SUBST([LIBADD_SHL_LOAD]) + +case $host_os in +darwin[[1567]].*) +# We only want this for pre-Mac OS X 10.4. + AC_CHECK_FUNC([_dyld_func_lookup], + [AC_DEFINE([HAVE_DYLD], [1], + [Define if you have the _dyld_func_lookup function.]) + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"]) + ;; +beos*) + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" + ;; +cygwin* | mingw* | pw32*) + AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include ]]) + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" + ;; +esac + +AC_CHECK_LIB([dld], [dld_link], + [AC_DEFINE([HAVE_DLD], [1], + [Define if you have the GNU dld library.]) + LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"]) +AC_SUBST([LIBADD_DLD_LINK]) + +m4_pattern_allow([^LT_DLPREOPEN$]) +LT_DLPREOPEN= +if test -n "$LT_DLLOADERS" +then + for lt_loader in $LT_DLLOADERS; do + LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader " + done + AC_DEFINE([HAVE_LIBDLLOADER], [1], + [Define if libdlloader will be built on this platform]) +fi +AC_SUBST([LT_DLPREOPEN]) + +dnl This isn't used anymore, but set it for backwards compatibility +LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD" +AC_SUBST([LIBADD_DL]) + +LIBS=$lt_dlload_save_LIBS +AC_LANG_POP +])# LT_LIB_DLLOAD + +# Old name: +AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LTDL_DLLIB], []) + + +# LT_SYS_SYMBOL_USCORE +# -------------------- +# does the compiler prefix global symbols with an underscore? +AC_DEFUN([LT_SYS_SYMBOL_USCORE], +[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +AC_CACHE_CHECK([for _ prefix in compiled symbols], + [lt_cv_sys_symbol_underscore], + [lt_cv_sys_symbol_underscore=no + cat > conftest.$ac_ext <<_LT_EOF +void nm_test_func(){} +int main(){nm_test_func;return 0;} +_LT_EOF + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + ac_nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then + # See whether the symbols have a leading underscore. + if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then + lt_cv_sys_symbol_underscore=yes + else + if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then + : + else + echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD + fi + fi + else + echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.c >&AS_MESSAGE_LOG_FD + fi + rm -rf conftest* + ]) + sys_symbol_underscore=$lt_cv_sys_symbol_underscore + AC_SUBST([sys_symbol_underscore]) +])# LT_SYS_SYMBOL_USCORE + +# Old name: +AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], []) + + +# LT_FUNC_DLSYM_USCORE +# -------------------- +AC_DEFUN([LT_FUNC_DLSYM_USCORE], +[AC_REQUIRE([_LT_COMPILER_PIC])dnl for lt_prog_compiler_wl +AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl for lt_cv_sys_symbol_underscore +AC_REQUIRE([LT_SYS_MODULE_EXT])dnl for libltdl_cv_shlibext +if test yes = "$lt_cv_sys_symbol_underscore"; then + if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen"; then + AC_CACHE_CHECK([whether we have to add an underscore for dlsym], + [libltdl_cv_need_uscore], + [libltdl_cv_need_uscore=unknown + dlsym_uscore_save_LIBS=$LIBS + LIBS="$LIBS $LIBADD_DLOPEN" + libname=conftmod # stay within 8.3 filename limits! + cat >$libname.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif +int fnord () { return 42; }] +_LT_EOF + + # ltfn_module_cmds module_cmds + # Execute tilde-delimited MODULE_CMDS with environment primed for + # $module_cmds or $archive_cmds type content. + ltfn_module_cmds () + {( # subshell avoids polluting parent global environment + module_cmds_save_ifs=$IFS; IFS='~' + for cmd in @S|@1; do + IFS=$module_cmds_save_ifs + libobjs=$libname.$ac_objext; lib=$libname$libltdl_cv_shlibext + rpath=/not-exists; soname=$libname$libltdl_cv_shlibext; output_objdir=. + major=; versuffix=; verstring=; deplibs= + ECHO=echo; wl=$lt_prog_compiler_wl; allow_undefined_flag= + eval $cmd + done + IFS=$module_cmds_save_ifs + )} + + # Compile a loadable module using libtool macro expansion results. + $CC $pic_flag -c $libname.$ac_ext + ltfn_module_cmds "${module_cmds:-$archive_cmds}" + + # Try to fetch fnord with dlsym(). + libltdl_dlunknown=0; libltdl_dlnouscore=1; libltdl_dluscore=2 + cat >conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" +#if HAVE_DLFCN_H +#include +#endif +#include +#ifndef RTLD_GLOBAL +# ifdef DL_GLOBAL +# define RTLD_GLOBAL DL_GLOBAL +# else +# define RTLD_GLOBAL 0 +# endif +#endif +#ifndef RTLD_NOW +# ifdef DL_NOW +# define RTLD_NOW DL_NOW +# else +# define RTLD_NOW 0 +# endif +#endif +int main () { + void *handle = dlopen ("`pwd`/$libname$libltdl_cv_shlibext", RTLD_GLOBAL|RTLD_NOW); + int status = $libltdl_dlunknown; + if (handle) { + if (dlsym (handle, "fnord")) + status = $libltdl_dlnouscore; + else { + if (dlsym (handle, "_fnord")) + status = $libltdl_dluscore; + else + puts (dlerror ()); + } + dlclose (handle); + } 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 + libltdl_status=$? + case x$libltdl_status in + x$libltdl_dlnouscore) libltdl_cv_need_uscore=no ;; + x$libltdl_dluscore) libltdl_cv_need_uscore=yes ;; + x*) libltdl_cv_need_uscore=unknown ;; + esac + fi + rm -rf conftest* $libname* + LIBS=$dlsym_uscore_save_LIBS + ]) + fi +fi + +if test yes = "$libltdl_cv_need_uscore"; then + AC_DEFINE([NEED_USCORE], [1], + [Define if dlsym() requires a leading underscore in symbol names.]) +fi +])# LT_FUNC_DLSYM_USCORE + +# Old name: +AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], []) + # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # @@ -46,8 +958,12 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -60,7 +976,6 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi - fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -69,21 +984,20 @@ fi[]dnl # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) + m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) - # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], @@ -91,7 +1005,8 @@ m4_define([_PKG_CONFIG], pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried @@ -136,16 +1051,17 @@ and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - ifelse([$4], , [AC_MSG_ERROR(dnl + m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -153,46 +1069,98 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) +_PKG_TEXT])[]dnl + ]) elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT -To get pkg-config, see .])], - [$4]) +To get pkg-config, see .])[]dnl + ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) + $3 fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002-2012 Free Software Foundation, Inc. + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR + +# Copyright (C) 2002-2017 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 8 - # 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.12' +[am__api_version='1.15' 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.12.2], [], +m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -208,21 +1176,19 @@ m4_define([_AM_AUTOCONF_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.12.2])dnl +[AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 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_PROG_AS # ---------- AC_DEFUN([AM_PROG_AS], @@ -237,14 +1203,12 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 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 - # 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/../..'. @@ -284,22 +1248,19 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl # 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` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 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 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. @@ -325,13 +1286,12 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 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 17 # 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, @@ -517,19 +1477,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 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_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf 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 @@ -558,7 +1517,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 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 + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the @@ -592,30 +1551,23 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996-2012 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 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 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 19 - # 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. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -628,7 +1580,7 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # 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 +[AC_PREREQ([2.65])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 @@ -658,8 +1610,7 @@ AC_SUBST([CYGPATH_W]) dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], -[$0: two- and three-arguments forms are deprecated. For more info, see: -http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) + [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], @@ -692,8 +1643,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). 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 @@ -713,21 +1664,63 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -dnl Support for Objective C++ was only introduced in Autoconf 2.65, -dnl but we still cater to Autoconf 2.62. -m4_ifdef([AC_PROG_OBJCXX], -[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])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_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro 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 + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -736,7 +1729,6 @@ 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. @@ -758,20 +1750,18 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 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 8 - # 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 +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -781,14 +1771,12 @@ if test x"${install_sh}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2012 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 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], @@ -804,14 +1792,12 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 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_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -856,14 +1842,12 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 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 7 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -871,11 +1855,10 @@ AC_DEFUN([AM_MISSING_PROG], $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. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, 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 @@ -888,8 +1871,8 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) @@ -898,14 +1881,12 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 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_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], @@ -929,15 +1910,77 @@ AC_DEFUN([_AM_SET_OPTIONS], 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) 1999-2017 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. -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2017 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_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2017 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_SANITY_CHECK # --------------- @@ -1014,13 +2057,71 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 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_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2017 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 # --------------------- @@ -1044,14 +2145,12 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2012 Free Software Foundation, Inc. +# Copyright (C) 2006-2017 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 3 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -1065,14 +2164,12 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2017 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 3 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. @@ -1086,76 +2183,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # 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. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} 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. + +# We'll 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 +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + 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 - # 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]) + # 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 - 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_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/deps/mpg123/config/linux/arm/config.h b/deps/mpg123/config/linux/arm/config.h index cb6b816..fd9dbb7 100644 --- a/deps/mpg123/config/linux/arm/config.h +++ b/deps/mpg123/config/linux/arm/config.h @@ -74,6 +74,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_CULIB_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 diff --git a/deps/mpg123/config/linux/arm64/config.h b/deps/mpg123/config/linux/arm64/config.h new file mode 100644 index 0000000..fbd6adb --- /dev/null +++ b/deps/mpg123/config/linux/arm64/config.h @@ -0,0 +1,478 @@ +/* src/config.h. Generated from config.h.in by configure. */ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if your architecture wants/needs/can use attribute_align_arg and + alignment checks. It is for 32bit x86... */ +/* #undef ABI_ALIGN_FUN */ + +/* Define to use proper rounding. */ +/* #undef ACCURATE_ROUNDING */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define if .balign is present. */ +#define ASMALIGN_BALIGN 1 + +/* Define if .align just takes byte count. */ +/* #undef ASMALIGN_BYTE */ + +/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */ +/* #undef ASMALIGN_EXP */ + +/* Define if __attribute__((aligned(16))) shall be used */ +#define CCALIGN 1 + +/* Define if debugging is enabled. */ +/* #undef DEBUG */ + +/* The default audio output module(s) to use */ +#define DEFAULT_OUTPUT_MODULE "oss" + +/* Define if building with dynamcally linked libmpg123 */ +#define DYNAMIC_BUILD 1 + +/* Use EFBIG as substitude for EOVERFLOW, mingw.org may lack the latter */ +/* #undef EOVERFLOW */ + +/* Define if FIFO support is enabled. */ +#define FIFO 1 + +/* Define if frame index should be used. */ +#define FRAME_INDEX 1 + +/* Define if gapless is enabled. */ +#define GAPLESS 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ALC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ALIB_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AL_ALC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AL_AL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ASM_AUDIOIO_H */ + +/* Define to 1 if you have the `atoll' function. */ +#define HAVE_ATOLL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AUDIOS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CORESERVICES_CORESERVICES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CULIB_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the `dlclose' function. */ +#define HAVE_DLCLOSE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `dlopen' function. */ +#define HAVE_DLOPEN 1 + +/* Define to 1 if you have the `dlsym' function. */ +#define HAVE_DLSYM 1 + +/* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */ +#define HAVE_GAI_ADDRCONFIG 1 + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LANGINFO_H 1 + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the `mx' library (-lmx). */ +/* #undef HAVE_LIBMX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LINUX_SOUNDCARD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_SOUNDCARD_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkfifo' function. */ +#define HAVE_MKFIFO 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_TCP_H */ + +/* Define to 1 if you have the `nl_langinfo' function. */ +#define HAVE_NL_LANGINFO 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OPENAL_ALC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OPENAL_AL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OS2ME_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OS2_H */ + +/* Define to 1 if you have the `random' function. */ +#define HAVE_RANDOM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SCHED_H 1 + +/* Define to 1 if you have the `sched_setscheduler' function. */ +#define HAVE_SCHED_SETSCHEDULER 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `setpriority' function. */ +#define HAVE_SETPRIORITY 1 + +/* Define to 1 if you have the `setuid' function. */ +#define HAVE_SETUID 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SNDIO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SUN_AUDIOIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_AUDIOIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_AUDIO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SIGNAL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOUNDCARD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define this if you have the POSIX termios library */ +#define HAVE_TERMIOS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Define to indicate that float storage follows IEEE754. */ +#define IEEE_FLOAT 1 + +/* size of the frame index seek table */ +#define INDEX_SIZE 1000 + +/* Define if IPV6 support is enabled. */ +#define IPV6 1 + +/* Define this to the size of native offset type in bits, used for LFS alias + functions. */ +#define LFS_ALIAS_BITS 64 + +/* Define to the extension used for runtime loadable modules, say, ".so". */ +#define LT_MODULE_EXT ".so" + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to the shared library suffix, say, ".dylib". */ +/* #undef LT_SHARED_EXT */ + +/* Define to the shared archive member specification, say "(shr.o)". */ +/* #undef LT_SHARED_LIB_MEMBER */ + +/* Define if network support is enabled. */ +#define NETWORK 1 + +/* Define to disable 16 bit integer output. */ +/* #undef NO_16BIT */ + +/* Define to disable 32 bit and 24 bit integer output. */ +/* #undef NO_32BIT */ + +/* Define to disable 8 bit integer output. */ +/* #undef NO_8BIT */ + +/* Define to disable downsampled decoding. */ +/* #undef NO_DOWNSAMPLE */ + +/* Define to disable equalizer. */ +/* #undef NO_EQUALIZER */ + +/* Define to disable error messages in combination with a return value (the + return is left intact). */ +/* #undef NO_ERETURN */ + +/* Define to disable error messages. */ +/* #undef NO_ERRORMSG */ + +/* Define to disable feeder and buffered readers. */ +/* #undef NO_FEEDER */ + +/* Define to disable ICY handling. */ +/* #undef NO_ICY */ + +/* Define to disable ID3v2 parsing. */ +/* #undef NO_ID3V2 */ + +/* Define to disable layer I. */ +/* #undef NO_LAYER1 */ + +/* Define to disable layer II. */ +/* #undef NO_LAYER2 */ + +/* Define to disable layer III. */ +/* #undef NO_LAYER3 */ + +/* Define to disable ntom resampling. */ +/* #undef NO_NTOM */ + +/* Define to disable real output. */ +/* #undef NO_REAL */ + +/* Define to disable string functions. */ +/* #undef NO_STRING */ + +/* Define for post-processed 32 bit formats. */ +/* #undef NO_SYNTH32 */ + +/* Define to disable warning messages. */ +/* #undef NO_WARNING */ + +/* Name of package */ +#define PACKAGE "mpg123" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "maintainer@mpg123.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "mpg123" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "mpg123 1.25.10" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "mpg123" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.25.10" + +/* Define if portaudio v18 API is wanted. */ +/* #undef PORTAUDIO18 */ + +/* The size of `int32_t', as computed by sizeof. */ +#define SIZEOF_INT32_T 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `off_t', as computed by sizeof. */ +#define SIZEOF_OFF_T 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + +/* The size of `ssize_t', as computed by sizeof. */ +#define SIZEOF_SSIZE_T 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if modules are enabled */ +/* #undef USE_MODULES */ + +/* Define for new Huffman decoding scheme. */ +#define USE_NEW_HUFFTABLE 1 + +/* Define to use yasm for assemble AVX sources. */ +/* #undef USE_YASM_FOR_AVX */ + +/* Version number of package */ +#define VERSION "1.25.10" + +/* Define to use Win32 named pipes */ +/* #undef WANT_WIN32_FIFO */ + +/* Define to use Win32 sockets */ +/* #undef WANT_WIN32_SOCKETS */ + +/* Define to use Unicode for Windows */ +/* #undef WANT_WIN32_UNICODE */ + +/* WinXP and above for ipv6 */ +/* #undef WINVER */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* WinXP and above for ipv6 */ +/* #undef _WIN32_WINNT */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `short' if does not define. */ +/* #undef int16_t */ + +/* Define to `int' if does not define. */ +/* #undef int32_t */ + +/* Define to `long long' if does not define. */ +/* #undef int64_t */ + +/* Define to the native offset type (long or actually off_t). */ +#define lfs_alias_t off_t + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `unsigned long' if does not define. */ +/* #undef size_t */ + +/* Define to `long' if does not define. */ +/* #undef ssize_t */ + +/* Define to `unsigned short' if does not define. */ +/* #undef uint16_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef uint32_t */ + +/* Define to `unsigned long' if does not define. */ +/* #undef uintptr_t */ diff --git a/deps/mpg123/config/linux/arm64/mpg123.h b/deps/mpg123/config/linux/arm64/mpg123.h new file mode 100644 index 0000000..1a3cd10 --- /dev/null +++ b/deps/mpg123/config/linux/arm64/mpg123.h @@ -0,0 +1,1441 @@ +/* + libmpg123: MPEG Audio Decoder library (version 1.25.10) + + copyright 1995-2015 by the mpg123 project + free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org +*/ + +#ifndef MPG123_LIB_H +#define MPG123_LIB_H + +#include + +/** \file mpg123.h The header file for the libmpg123 MPEG Audio decoder */ + +/** A macro to check at compile time which set of API functions to expect. + * This should be incremented at least each time a new symbol is added + * to the header. + */ +#define MPG123_API_VERSION 44 + +#ifndef MPG123_EXPORT +/** Defines needed for MS Visual Studio(tm) DLL builds. + * Every public function must be prefixed with MPG123_EXPORT. When building + * the DLL ensure to define BUILD_MPG123_DLL. This makes the function accessible + * for clients and includes it in the import library which is created together + * with the DLL. When consuming the DLL ensure to define LINK_MPG123_DLL which + * imports the functions from the DLL. + */ +#ifdef BUILD_MPG123_DLL +/* The dll exports. */ +#define MPG123_EXPORT __declspec(dllexport) +#else +#ifdef LINK_MPG123_DLL +/* The exe imports. */ +#define MPG123_EXPORT __declspec(dllimport) +#else +/* Nothing on normal/UNIX builds */ +#define MPG123_EXPORT +#endif +#endif +#endif + +/* This is for Visual Studio, so this header works as distributed in the binary downloads */ +#if defined(_MSC_VER) && !defined(MPG123_DEF_SSIZE_T) +#define MPG123_DEF_SSIZE_T +#include +typedef ptrdiff_t ssize_t; +#endif + +#ifndef MPG123_NO_CONFIGURE /* Enable use of this file without configure. */ +#include +#include + +/* Simplified large file handling. + I used to have a check here that prevents building for a library with conflicting large file setup + (application that uses 32 bit offsets with library that uses 64 bits). + While that was perfectly fine in an environment where there is one incarnation of the library, + it hurt GNU/Linux and Solaris systems with multilib where the distribution fails to provide the + correct header matching the 32 bit library (where large files need explicit support) or + the 64 bit library (where there is no distinction). + + New approach: When the app defines _FILE_OFFSET_BITS, it wants non-default large file support, + and thus functions with added suffix (mpg123_open_64). + Any mismatch will be caught at link time because of the _FILE_OFFSET_BITS setting used when + building libmpg123. Plus, there's dual mode large file support in mpg123 since 1.12 now. + Link failure is not the expected outcome of any half-sane usage anymore. + + More complication: What about client code defining _LARGEFILE64_SOURCE? It might want direct access to the _64 functions, along with the ones without suffix. Well, that's possible now via defining MPG123_NO_LARGENAME and MPG123_LARGESUFFIX, respectively, for disabling or enforcing the suffix names. +*/ + +/* + Now, the renaming of large file aware functions. + By default, it appends underscore _FILE_OFFSET_BITS (so, mpg123_seek_64 for mpg123_seek), if _FILE_OFFSET_BITS is defined. You can force a different suffix via MPG123_LARGESUFFIX (that must include the underscore), or you can just disable the whole mess by defining MPG123_NO_LARGENAME. +*/ +#if (!defined MPG123_NO_LARGENAME) && ((defined _FILE_OFFSET_BITS) || (defined MPG123_LARGESUFFIX)) + +/* Need some trickery to concatenate the value(s) of the given macro(s). */ +#define MPG123_MACROCAT_REALLY(a, b) a ## b +#define MPG123_MACROCAT(a, b) MPG123_MACROCAT_REALLY(a, b) +#ifndef MPG123_LARGESUFFIX +#define MPG123_LARGESUFFIX MPG123_MACROCAT(_, _FILE_OFFSET_BITS) +#endif +#define MPG123_LARGENAME(func) MPG123_MACROCAT(func, MPG123_LARGESUFFIX) + +#define mpg123_open MPG123_LARGENAME(mpg123_open) +#define mpg123_open_fd MPG123_LARGENAME(mpg123_open_fd) +#define mpg123_open_handle MPG123_LARGENAME(mpg123_open_handle) +#define mpg123_framebyframe_decode MPG123_LARGENAME(mpg123_framebyframe_decode) +#define mpg123_decode_frame MPG123_LARGENAME(mpg123_decode_frame) +#define mpg123_tell MPG123_LARGENAME(mpg123_tell) +#define mpg123_tellframe MPG123_LARGENAME(mpg123_tellframe) +#define mpg123_tell_stream MPG123_LARGENAME(mpg123_tell_stream) +#define mpg123_seek MPG123_LARGENAME(mpg123_seek) +#define mpg123_feedseek MPG123_LARGENAME(mpg123_feedseek) +#define mpg123_seek_frame MPG123_LARGENAME(mpg123_seek_frame) +#define mpg123_timeframe MPG123_LARGENAME(mpg123_timeframe) +#define mpg123_index MPG123_LARGENAME(mpg123_index) +#define mpg123_set_index MPG123_LARGENAME(mpg123_set_index) +#define mpg123_position MPG123_LARGENAME(mpg123_position) +#define mpg123_length MPG123_LARGENAME(mpg123_length) +#define mpg123_framelength MPG123_LARGENAME(mpg123_framelength) +#define mpg123_set_filesize MPG123_LARGENAME(mpg123_set_filesize) +#define mpg123_replace_reader MPG123_LARGENAME(mpg123_replace_reader) +#define mpg123_replace_reader_handle MPG123_LARGENAME(mpg123_replace_reader_handle) +#define mpg123_framepos MPG123_LARGENAME(mpg123_framepos) + +#endif /* largefile hackery */ + +#endif /* MPG123_NO_CONFIGURE */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** \defgroup mpg123_init mpg123 library and handle setup + * + * Functions to initialise and shutdown the mpg123 library and handles. + * The parameters of handles have workable defaults, you only have to tune them when you want to tune something;-) + * Tip: Use a RVA setting... + * + * @{ + */ + +/** Opaque structure for the libmpg123 decoder handle. */ +struct mpg123_handle_struct; + +/** Opaque structure for the libmpg123 decoder handle. + * Most functions take a pointer to a mpg123_handle as first argument and operate on its data in an object-oriented manner. + */ +typedef struct mpg123_handle_struct mpg123_handle; + +/** Function to initialise the mpg123 library. + * This function is not thread-safe. Call it exactly once per process, before any other (possibly threaded) work with the library. + * + * \return MPG123_OK if successful, otherwise an error number. + */ +MPG123_EXPORT int mpg123_init(void); + +/** Function to close down the mpg123 library. + * This function is not thread-safe. Call it exactly once per process, before any other (possibly threaded) work with the library. */ +MPG123_EXPORT void mpg123_exit(void); + +/** Create a handle with optional choice of decoder (named by a string, see mpg123_decoders() or mpg123_supported_decoders()). + * and optional retrieval of an error code to feed to mpg123_plain_strerror(). + * Optional means: Any of or both the parameters may be NULL. + * + * \param decoder optional choice of decoder variant (NULL for default) + * \param error optional address to store error codes + * \return Non-NULL pointer to fresh handle when successful. + */ +MPG123_EXPORT mpg123_handle *mpg123_new(const char* decoder, int *error); + +/** Delete handle, mh is either a valid mpg123 handle or NULL. + * \param mh handle + */ +MPG123_EXPORT void mpg123_delete(mpg123_handle *mh); + +/** Enumeration of the parameters types that it is possible to set/get. */ +enum mpg123_parms +{ + MPG123_VERBOSE = 0, /**< set verbosity value for enabling messages to stderr, >= 0 makes sense (integer) */ + MPG123_FLAGS, /**< set all flags, p.ex val = MPG123_GAPLESS|MPG123_MONO_MIX (integer) */ + MPG123_ADD_FLAGS, /**< add some flags (integer) */ + MPG123_FORCE_RATE, /**< when value > 0, force output rate to that value (integer) */ + MPG123_DOWN_SAMPLE, /**< 0=native rate, 1=half rate, 2=quarter rate (integer) */ + MPG123_RVA, /**< one of the RVA choices above (integer) */ + MPG123_DOWNSPEED, /**< play a frame N times (integer) */ + MPG123_UPSPEED, /**< play every Nth frame (integer) */ + MPG123_START_FRAME, /**< start with this frame (skip frames before that, integer) */ + MPG123_DECODE_FRAMES, /**< decode only this number of frames (integer) */ + MPG123_ICY_INTERVAL, /**< stream contains ICY metadata with this interval (integer) */ + MPG123_OUTSCALE, /**< the scale for output samples (amplitude - integer or float according to mpg123 output format, normally integer) */ + MPG123_TIMEOUT, /**< timeout for reading from a stream (not supported on win32, integer) */ + MPG123_REMOVE_FLAGS, /**< remove some flags (inverse of MPG123_ADD_FLAGS, integer) */ + MPG123_RESYNC_LIMIT, /**< Try resync on frame parsing for that many bytes or until end of stream (<0 ... integer). This can enlarge the limit for skipping junk on beginning, too (but not reduce it). */ + MPG123_INDEX_SIZE /**< Set the frame index size (if supported). Values <0 mean that the index is allowed to grow dynamically in these steps (in positive direction, of course) -- Use this when you really want a full index with every individual frame. */ + ,MPG123_PREFRAMES /**< Decode/ignore that many frames in advance for layer 3. This is needed to fill bit reservoir after seeking, for example (but also at least one frame in advance is needed to have all "normal" data for layer 3). Give a positive integer value, please.*/ + ,MPG123_FEEDPOOL /**< For feeder mode, keep that many buffers in a pool to avoid frequent malloc/free. The pool is allocated on mpg123_open_feed(). If you change this parameter afterwards, you can trigger growth and shrinkage during decoding. The default value could change any time. If you care about this, then set it. (integer) */ + ,MPG123_FEEDBUFFER /**< Minimal size of one internal feeder buffer, again, the default value is subject to change. (integer) */ +}; + +/** Flag bits for MPG123_FLAGS, use the usual binary or to combine. */ +enum mpg123_param_flags +{ + MPG123_FORCE_MONO = 0x7 /**< 0111 Force some mono mode: This is a test bitmask for seeing if any mono forcing is active. */ + ,MPG123_MONO_LEFT = 0x1 /**< 0001 Force playback of left channel only. */ + ,MPG123_MONO_RIGHT = 0x2 /**< 0010 Force playback of right channel only. */ + ,MPG123_MONO_MIX = 0x4 /**< 0100 Force playback of mixed mono. */ + ,MPG123_FORCE_STEREO = 0x8 /**< 1000 Force stereo output. */ + ,MPG123_FORCE_8BIT = 0x10 /**< 00010000 Force 8bit formats. */ + ,MPG123_QUIET = 0x20 /**< 00100000 Suppress any printouts (overrules verbose). */ + ,MPG123_GAPLESS = 0x40 /**< 01000000 Enable gapless decoding (default on if libmpg123 has support). */ + ,MPG123_NO_RESYNC = 0x80 /**< 10000000 Disable resync stream after error. */ + ,MPG123_SEEKBUFFER = 0x100 /**< 000100000000 Enable small buffer on non-seekable streams to allow some peek-ahead (for better MPEG sync). */ + ,MPG123_FUZZY = 0x200 /**< 001000000000 Enable fuzzy seeks (guessing byte offsets or using approximate seek points from Xing TOC) */ + ,MPG123_FORCE_FLOAT = 0x400 /**< 010000000000 Force floating point output (32 or 64 bits depends on mpg123 internal precision). */ + ,MPG123_PLAIN_ID3TEXT = 0x800 /**< 100000000000 Do not translate ID3 text data to UTF-8. ID3 strings will contain the raw text data, with the first byte containing the ID3 encoding code. */ + ,MPG123_IGNORE_STREAMLENGTH = 0x1000 /**< 1000000000000 Ignore any stream length information contained in the stream, which can be contained in a 'TLEN' frame of an ID3v2 tag or a Xing tag */ + ,MPG123_SKIP_ID3V2 = 0x2000 /**< 10 0000 0000 0000 Do not parse ID3v2 tags, just skip them. */ + ,MPG123_IGNORE_INFOFRAME = 0x4000 /**< 100 0000 0000 0000 Do not parse the LAME/Xing info frame, treat it as normal MPEG data. */ + ,MPG123_AUTO_RESAMPLE = 0x8000 /**< 1000 0000 0000 0000 Allow automatic internal resampling of any kind (default on if supported). Especially when going lowlevel with replacing output buffer, you might want to unset this flag. Setting MPG123_DOWNSAMPLE or MPG123_FORCE_RATE will override this. */ + ,MPG123_PICTURE = 0x10000 /**< 17th bit: Enable storage of pictures from tags (ID3v2 APIC). */ + ,MPG123_NO_PEEK_END = 0x20000 /**< 18th bit: Do not seek to the end of + * the stream in order to probe + * the stream length and search for the id3v1 field. This also means + * the file size is unknown unless set using mpg123_set_filesize() and + * the stream is assumed as non-seekable unless overridden. + */ + ,MPG123_FORCE_SEEKABLE = 0x40000 /**< 19th bit: Force the stream to be seekable. */ +}; + +/** choices for MPG123_RVA */ +enum mpg123_param_rva +{ + MPG123_RVA_OFF = 0 /**< RVA disabled (default). */ + ,MPG123_RVA_MIX = 1 /**< Use mix/track/radio gain. */ + ,MPG123_RVA_ALBUM = 2 /**< Use album/audiophile gain */ + ,MPG123_RVA_MAX = MPG123_RVA_ALBUM /**< The maximum RVA code, may increase in future. */ +}; + +/** Set a specific parameter, for a specific mpg123_handle, using a parameter + * type key chosen from the mpg123_parms enumeration, to the specified value. + * \param mh handle + * \param type parameter choice + * \param value integer value + * \param fvalue floating point value + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_param( mpg123_handle *mh +, enum mpg123_parms type, long value, double fvalue ); + +/** Get a specific parameter, for a specific mpg123_handle. + * See the mpg123_parms enumeration for a list of available parameters. + * \param mh handle + * \param type parameter choice + * \param value integer value return address + * \param fvalue floating point value return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getparam( mpg123_handle *mh +, enum mpg123_parms type, long *value, double *fvalue ); + +/** Feature set available for query with mpg123_feature. */ +enum mpg123_feature_set +{ + MPG123_FEATURE_ABI_UTF8OPEN = 0 /**< mpg123 expects path names to be given in UTF-8 encoding instead of plain native. */ + ,MPG123_FEATURE_OUTPUT_8BIT /**< 8bit output */ + ,MPG123_FEATURE_OUTPUT_16BIT /**< 16bit output */ + ,MPG123_FEATURE_OUTPUT_32BIT /**< 32bit output */ + ,MPG123_FEATURE_INDEX /**< support for building a frame index for accurate seeking */ + ,MPG123_FEATURE_PARSE_ID3V2 /**< id3v2 parsing */ + ,MPG123_FEATURE_DECODE_LAYER1 /**< mpeg layer-1 decoder enabled */ + ,MPG123_FEATURE_DECODE_LAYER2 /**< mpeg layer-2 decoder enabled */ + ,MPG123_FEATURE_DECODE_LAYER3 /**< mpeg layer-3 decoder enabled */ + ,MPG123_FEATURE_DECODE_ACCURATE /**< accurate decoder rounding */ + ,MPG123_FEATURE_DECODE_DOWNSAMPLE /**< downsample (sample omit) */ + ,MPG123_FEATURE_DECODE_NTOM /**< flexible rate decoding */ + ,MPG123_FEATURE_PARSE_ICY /**< ICY support */ + ,MPG123_FEATURE_TIMEOUT_READ /**< Reader with timeout (network). */ + ,MPG123_FEATURE_EQUALIZER /**< tunable equalizer */ +}; + +/** Query libmpg123 features. + * \param key feature selection + * \return 1 for success, 0 for unimplemented functions + */ +MPG123_EXPORT int mpg123_feature(const enum mpg123_feature_set key); + +/* @} */ + + +/** \defgroup mpg123_error mpg123 error handling + * + * Functions to get text version of the error numbers and an enumeration + * of the error codes returned by libmpg123. + * + * Most functions operating on a mpg123_handle simply return MPG123_OK (0) + * on success and MPG123_ERR (-1) on failure, setting the internal error + * variable of the handle to the specific error code. If there was not a valid + * (non-NULL) handle provided to a function operating on one, MPG123_BAD_HANDLE + * may be returned if this can not be confused with a valid positive return + * value. + * Meaning: A function expected to return positive integers on success will + * always indicate error or a special condition by returning a negative one. + * + * Decoding/seek functions may also return message codes MPG123_DONE, + * MPG123_NEW_FORMAT and MPG123_NEED_MORE (all negative, see below on how to + * react). Note that calls to those can be nested, so generally watch out + * for these codes after initial handle setup. + * Especially any function that needs information about the current stream + * to work will try to at least parse the beginning if that did not happen + * yet. + * + * On a function that is supposed to return MPG123_OK on success and + * MPG123_ERR on failure, make sure you check for != MPG123_OK, not + * == MPG123_ERR, as the error code could get more specific in future, + * or there is just a special message from a decoding routine as indicated + * above. + * + * @{ + */ + +/** Enumeration of the message and error codes and returned by libmpg123 functions. */ +enum mpg123_errors +{ + MPG123_DONE=-12, /**< Message: Track ended. Stop decoding. */ + MPG123_NEW_FORMAT=-11, /**< Message: Output format will be different on next call. Note that some libmpg123 versions between 1.4.3 and 1.8.0 insist on you calling mpg123_getformat() after getting this message code. Newer verisons behave like advertised: You have the chance to call mpg123_getformat(), but you can also just continue decoding and get your data. */ + MPG123_NEED_MORE=-10, /**< Message: For feed reader: "Feed me more!" (call mpg123_feed() or mpg123_decode() with some new input data). */ + MPG123_ERR=-1, /**< Generic Error */ + MPG123_OK=0, /**< Success */ + MPG123_BAD_OUTFORMAT, /**< Unable to set up output format! */ + MPG123_BAD_CHANNEL, /**< Invalid channel number specified. */ + MPG123_BAD_RATE, /**< Invalid sample rate specified. */ + MPG123_ERR_16TO8TABLE, /**< Unable to allocate memory for 16 to 8 converter table! */ + MPG123_BAD_PARAM, /**< Bad parameter id! */ + MPG123_BAD_BUFFER, /**< Bad buffer given -- invalid pointer or too small size. */ + MPG123_OUT_OF_MEM, /**< Out of memory -- some malloc() failed. */ + MPG123_NOT_INITIALIZED, /**< You didn't initialize the library! */ + MPG123_BAD_DECODER, /**< Invalid decoder choice. */ + MPG123_BAD_HANDLE, /**< Invalid mpg123 handle. */ + MPG123_NO_BUFFERS, /**< Unable to initialize frame buffers (out of memory?). */ + MPG123_BAD_RVA, /**< Invalid RVA mode. */ + MPG123_NO_GAPLESS, /**< This build doesn't support gapless decoding. */ + MPG123_NO_SPACE, /**< Not enough buffer space. */ + MPG123_BAD_TYPES, /**< Incompatible numeric data types. */ + MPG123_BAD_BAND, /**< Bad equalizer band. */ + MPG123_ERR_NULL, /**< Null pointer given where valid storage address needed. */ + MPG123_ERR_READER, /**< Error reading the stream. */ + MPG123_NO_SEEK_FROM_END,/**< Cannot seek from end (end is not known). */ + MPG123_BAD_WHENCE, /**< Invalid 'whence' for seek function.*/ + MPG123_NO_TIMEOUT, /**< Build does not support stream timeouts. */ + MPG123_BAD_FILE, /**< File access error. */ + MPG123_NO_SEEK, /**< Seek not supported by stream. */ + MPG123_NO_READER, /**< No stream opened. */ + MPG123_BAD_PARS, /**< Bad parameter handle. */ + MPG123_BAD_INDEX_PAR, /**< Bad parameters to mpg123_index() and mpg123_set_index() */ + MPG123_OUT_OF_SYNC, /**< Lost track in bytestream and did not try to resync. */ + MPG123_RESYNC_FAIL, /**< Resync failed to find valid MPEG data. */ + MPG123_NO_8BIT, /**< No 8bit encoding possible. */ + MPG123_BAD_ALIGN, /**< Stack aligmnent error */ + MPG123_NULL_BUFFER, /**< NULL input buffer with non-zero size... */ + MPG123_NO_RELSEEK, /**< Relative seek not possible (screwed up file offset) */ + MPG123_NULL_POINTER, /**< You gave a null pointer somewhere where you shouldn't have. */ + MPG123_BAD_KEY, /**< Bad key value given. */ + MPG123_NO_INDEX, /**< No frame index in this build. */ + MPG123_INDEX_FAIL, /**< Something with frame index went wrong. */ + MPG123_BAD_DECODER_SETUP, /**< Something prevents a proper decoder setup */ + MPG123_MISSING_FEATURE /**< This feature has not been built into libmpg123. */ + ,MPG123_BAD_VALUE /**< A bad value has been given, somewhere. */ + ,MPG123_LSEEK_FAILED /**< Low-level seek failed. */ + ,MPG123_BAD_CUSTOM_IO /**< Custom I/O not prepared. */ + ,MPG123_LFS_OVERFLOW /**< Offset value overflow during translation of large file API calls -- your client program cannot handle that large file. */ + ,MPG123_INT_OVERFLOW /**< Some integer overflow. */ +}; + +/** Look up error strings given integer code. + * \param errcode integer error code + * \return string describing what that error error code means + */ +MPG123_EXPORT const char* mpg123_plain_strerror(int errcode); + +/** Give string describing what error has occured in the context of handle mh. + * When a function operating on an mpg123 handle returns MPG123_ERR, you should check for the actual reason via + * char *errmsg = mpg123_strerror(mh) + * This function will catch mh == NULL and return the message for MPG123_BAD_HANDLE. + * \param mh handle + * \return error message + */ +MPG123_EXPORT const char* mpg123_strerror(mpg123_handle *mh); + +/** Return the plain errcode intead of a string. + * \param mh handle + * \return error code recorded in handle or MPG123_BAD_HANDLE + */ +MPG123_EXPORT int mpg123_errcode(mpg123_handle *mh); + +/*@}*/ + + +/** \defgroup mpg123_decoder mpg123 decoder selection + * + * Functions to list and select the available decoders. + * Perhaps the most prominent feature of mpg123: You have several (optimized) decoders to choose from (on x86 and PPC (MacOS) systems, that is). + * + * @{ + */ + +/** Get available decoder list. + * \return NULL-terminated array of generally available decoder names (plain 8bit ASCII) + */ +MPG123_EXPORT const char **mpg123_decoders(void); + +/** Get supported decoder list. + * \return NULL-terminated array of the decoders supported by the CPU (plain 8bit ASCII) + */ +MPG123_EXPORT const char **mpg123_supported_decoders(void); + +/** Set the active decoder. + * \param mh handle + * \param decoder_name name of decoder + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_decoder(mpg123_handle *mh, const char* decoder_name); + +/** Get the currently active decoder name. + * The active decoder engine can vary depening on output constraints, + * mostly non-resampling, integer output is accelerated via 3DNow & Co. but for + * other modes a fallback engine kicks in. + * Note that this can return a decoder that is only active in the hidden and not + * available as decoder choice from the outside. + * \param mh handle + * \return The decoder name or NULL on error. + */ +MPG123_EXPORT const char* mpg123_current_decoder(mpg123_handle *mh); + +/*@}*/ + + +/** \defgroup mpg123_output mpg123 output audio format + * + * Functions to get and select the format of the decoded audio. + * + * Before you dive in, please be warned that you might get confused by this. This seems to happen a lot, therefore I am trying to explain in advance. + * + * The mpg123 library decides what output format to use when encountering the first frame in a stream, or actually any frame that is still valid but differs from the frames before in the prompted output format. At such a deciding point, an internal table of allowed encodings, sampling rates and channel setups is consulted. According to this table, an output format is chosen and the decoding engine set up accordingly (including optimized routines for different output formats). This might seem unusual but it just follows from the non-existence of "MPEG audio files" with defined overall properties. There are streams, streams are concatenations of (semi) independent frames. We store streams on disk and call them "MPEG audio files", but that does not change their nature as the decoder is concerned (the LAME/Xing header for gapless decoding makes things interesting again). + * + * To get to the point: What you do with mpg123_format() and friends is to fill the internal table of allowed formats before it is used. That includes removing support for some formats or adding your forced sample rate (see MPG123_FORCE_RATE) that will be used with the crude internal resampler. Also keep in mind that the sample encoding is just a question of choice -- the MPEG frames do only indicate their native sampling rate and channel count. If you want to decode to integer or float samples, 8 or 16 bit ... that is your decision. In a "clean" world, libmpg123 would always decode to 32 bit float and let you handle any sample conversion. But there are optimized routines that work faster by directly decoding to the desired encoding / accuracy. We prefer efficiency over conceptual tidyness. + * + * People often start out thinking that mpg123_format() should change the actual decoding format on the fly. That is wrong. It only has effect on the next natural change of output format, when libmpg123 will consult its format table again. To make life easier, you might want to call mpg123_format_none() before any thing else and then just allow one desired encoding and a limited set of sample rates / channel choices that you actually intend to deal with. You can force libmpg123 to decode everything to 44100 KHz, stereo, 16 bit integer ... it will duplicate mono channels and even do resampling if needed (unless that feature is disabled in the build, same with some encodings). But I have to stress that the resampling of libmpg123 is very crude and doesn't even contain any kind of "proper" interpolation. + * + * In any case, watch out for MPG123_NEW_FORMAT as return message from decoding routines and call mpg123_getformat() to get the currently active output format. + * + * @{ + */ + +/** They can be combined into one number (3) to indicate mono and stereo... */ +enum mpg123_channelcount +{ + MPG123_MONO = 1 /**< mono */ + ,MPG123_STEREO = 2 /**< stereo */ +}; + +/** An array of supported standard sample rates + * These are possible native sample rates of MPEG audio files. + * You can still force mpg123 to resample to a different one, but by default you will only get audio in one of these samplings. + * \param list Store a pointer to the sample rates array there. + * \param number Store the number of sample rates there. */ +MPG123_EXPORT void mpg123_rates(const long **list, size_t *number); + +/** An array of supported audio encodings. + * An audio encoding is one of the fully qualified members of mpg123_enc_enum (MPG123_ENC_SIGNED_16, not MPG123_SIGNED). + * \param list Store a pointer to the encodings array there. + * \param number Store the number of encodings there. */ +MPG123_EXPORT void mpg123_encodings(const int **list, size_t *number); + +/** Return the size (in bytes) of one mono sample of the named encoding. + * \param encoding The encoding value to analyze. + * \return positive size of encoding in bytes, 0 on invalid encoding. */ +MPG123_EXPORT int mpg123_encsize(int encoding); + +/** Configure a mpg123 handle to accept no output format at all, + * use before specifying supported formats with mpg123_format + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_format_none(mpg123_handle *mh); + +/** Configure mpg123 handle to accept all formats + * (also any custom rate you may set) -- this is default. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_format_all(mpg123_handle *mh); + +/** Set the audio format support of a mpg123_handle in detail: + * \param mh handle + * \param rate The sample rate value (in Hertz). + * \param channels A combination of MPG123_STEREO and MPG123_MONO. + * \param encodings A combination of accepted encodings for rate and channels, p.ex MPG123_ENC_SIGNED16 | MPG123_ENC_ULAW_8 (or 0 for no support). Please note that some encodings may not be supported in the library build and thus will be ignored here. + * \return MPG123_OK on success, MPG123_ERR if there was an error. */ +MPG123_EXPORT int mpg123_format( mpg123_handle *mh +, long rate, int channels, int encodings ); + +/** Check to see if a specific format at a specific rate is supported + * by mpg123_handle. + * \param mh handle + * \param rate sampling rate + * \param encoding encoding + * \return 0 for no support (that includes invalid parameters), MPG123_STEREO, + * MPG123_MONO or MPG123_STEREO|MPG123_MONO. */ +MPG123_EXPORT int mpg123_format_support( mpg123_handle *mh +, long rate, int encoding ); + +/** Get the current output format written to the addresses given. + * If the stream is freshly loaded, this will try to parse enough + * of it to give you the format to come. This clears the flag that + * would otherwise make the first decoding call return + * MPG123_NEW_FORMAT. + * \param mh handle + * \param rate sampling rate return address + * \param channels channel count return address + * \param encoding encoding return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getformat( mpg123_handle *mh +, long *rate, int *channels, int *encoding ); + +/** Get the current output format written to the addresses given. + * This differs from plain mpg123_getformat() in that you can choose + * _not_ to clear the flag that would trigger the next decoding call + * to return MPG123_NEW_FORMAT in case of a new format arriving. + * \param mh handle + * \param rate sampling rate return address + * \param channels channel count return address + * \param encoding encoding return address + * \param clear_flag if true, clear internal format flag + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getformat2( mpg123_handle *mh +, long *rate, int *channels, int *encoding, int clear_flag ); + +/*@}*/ + + +/** \defgroup mpg123_input mpg123 file input and decoding + * + * Functions for input bitstream and decoding operations. + * Decoding/seek functions may also return message codes MPG123_DONE, MPG123_NEW_FORMAT and MPG123_NEED_MORE (please read up on these on how to react!). + * @{ + */ + +/* reading samples / triggering decoding, possible return values: */ +/** Enumeration of the error codes returned by libmpg123 functions. */ + +/** Open and prepare to decode the specified file by filesystem path. + * This does not open HTTP urls; libmpg123 contains no networking code. + * If you want to decode internet streams, use mpg123_open_fd() or mpg123_open_feed(). + * \param mh handle + * \param path filesystem path + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open(mpg123_handle *mh, const char *path); + +/** Use an already opened file descriptor as the bitstream input + * mpg123_close() will _not_ close the file descriptor. + * \param mh handle + * \param fd file descriptor + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open_fd(mpg123_handle *mh, int fd); + +/** Use an opaque handle as bitstream input. This works only with the + * replaced I/O from mpg123_replace_reader_handle()! + * mpg123_close() will call the cleanup callback for your handle (if you gave one). + * \param mh handle + * \param iohandle your handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open_handle(mpg123_handle *mh, void *iohandle); + +/** Open a new bitstream and prepare for direct feeding + * This works together with mpg123_decode(); you are responsible for reading and feeding the input bitstream. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open_feed(mpg123_handle *mh); + +/** Closes the source, if libmpg123 opened it. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_close(mpg123_handle *mh); + +/** Read from stream and decode up to outmemsize bytes. + * \param mh handle + * \param outmemory address of output buffer to write to + * \param outmemsize maximum number of bytes to write + * \param done address to store the number of actually decoded bytes to + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_read(mpg123_handle *mh +, unsigned char *outmemory, size_t outmemsize, size_t *done ); + +/** Feed data for a stream that has been opened with mpg123_open_feed(). + * It's give and take: You provide the bytestream, mpg123 gives you the decoded samples. + * \param mh handle + * \param in input buffer + * \param size number of input bytes + * \return MPG123_OK or error/message code. + */ +MPG123_EXPORT int mpg123_feed( mpg123_handle *mh +, const unsigned char *in, size_t size ); + +/** Decode MPEG Audio from inmemory to outmemory. + * This is very close to a drop-in replacement for old mpglib. + * When you give zero-sized output buffer the input will be parsed until + * decoded data is available. This enables you to get MPG123_NEW_FORMAT (and query it) + * without taking decoded data. + * Think of this function being the union of mpg123_read() and mpg123_feed() (which it actually is, sort of;-). + * You can actually always decide if you want those specialized functions in separate steps or one call this one here. + * \param mh handle + * \param inmemory input buffer + * \param inmemsize number of input bytes + * \param outmemory output buffer + * \param outmemsize maximum number of output bytes + * \param done address to store the number of actually decoded bytes to + * \return error/message code (watch out especially for MPG123_NEED_MORE) + */ +MPG123_EXPORT int mpg123_decode( mpg123_handle *mh +, const unsigned char *inmemory, size_t inmemsize +, unsigned char *outmemory, size_t outmemsize, size_t *done ); + +/** Decode next MPEG frame to internal buffer + * or read a frame and return after setting a new format. + * \param mh handle + * \param num current frame offset gets stored there + * \param audio This pointer is set to the internal buffer to read the decoded audio from. + * \param bytes number of output bytes ready in the buffer + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_decode_frame( mpg123_handle *mh +, off_t *num, unsigned char **audio, size_t *bytes ); + +/** Decode current MPEG frame to internal buffer. + * Warning: This is experimental API that might change in future releases! + * Please watch mpg123 development closely when using it. + * \param mh handle + * \param num last frame offset gets stored there + * \param audio this pointer is set to the internal buffer to read the decoded audio from. + * \param bytes number of output bytes ready in the buffer + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_framebyframe_decode( mpg123_handle *mh +, off_t *num, unsigned char **audio, size_t *bytes ); + +/** Find, read and parse the next mp3 frame + * Warning: This is experimental API that might change in future releases! + * Please watch mpg123 development closely when using it. + * \param mh handle + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_framebyframe_next(mpg123_handle *mh); + +/** Get access to the raw input data for the last parsed frame. + * This gives you a direct look (and write access) to the frame body data. + * Together with the raw header, you can reconstruct the whole raw MPEG stream without junk and meta data, or play games by actually modifying the frame body data before decoding this frame (mpg123_framebyframe_decode()). + * A more sane use would be to use this for CRC checking (see mpg123_info() and MPG123_CRC), the first two bytes of the body make up the CRC16 checksum, if present. + * You can provide NULL for a parameter pointer when you are not interested in the value. + * + * \param mh handle + * \param header the 4-byte MPEG header + * \param bodydata pointer to the frame body stored in the handle (without the header) + * \param bodybytes size of frame body in bytes (without the header) + * \return MPG123_OK if there was a yet un-decoded frame to get the + * data from, MPG123_BAD_HANDLE or MPG123_ERR otherwise (without further + * explanation, the error state of the mpg123_handle is not modified by + * this function). + */ +MPG123_EXPORT int mpg123_framedata( mpg123_handle *mh +, unsigned long *header, unsigned char **bodydata, size_t *bodybytes ); + +/** Get the input position (byte offset in stream) of the last parsed frame. + * This can be used for external seek index building, for example. + * It just returns the internally stored offset, regardless of validity -- + * you ensure that a valid frame has been parsed before! + * \param mh handle + * \return byte offset in stream + */ +MPG123_EXPORT off_t mpg123_framepos(mpg123_handle *mh); + +/*@}*/ + + +/** \defgroup mpg123_seek mpg123 position and seeking + * + * Functions querying and manipulating position in the decoded audio bitstream. + * The position is measured in decoded audio samples, or MPEG frame offset for the specific functions. + * If gapless code is in effect, the positions are adjusted to compensate the skipped padding/delay - meaning, you should not care about that at all and just use the position defined for the samples you get out of the decoder;-) + * The general usage is modelled after stdlib's ftell() and fseek(). + * Especially, the whence parameter for the seek functions has the same meaning as the one for fseek() and needs the same constants from stdlib.h: + * - SEEK_SET: set position to (or near to) specified offset + * - SEEK_CUR: change position by offset from now + * - SEEK_END: set position to offset from end + * + * Note that sample-accurate seek only works when gapless support has been enabled at compile time; seek is frame-accurate otherwise. + * Also, really sample-accurate seeking (meaning that you get the identical sample value after seeking compared to plain decoding up to the position) is only guaranteed when you do not mess with the position code by using MPG123_UPSPEED, MPG123_DOWNSPEED or MPG123_START_FRAME. The first two mainly should cause trouble with NtoM resampling, but in any case with these options in effect, you have to keep in mind that the sample offset is not the same as counting the samples you get from decoding since mpg123 counts the skipped samples, too (or the samples played twice only once)! + * Short: When you care about the sample position, don't mess with those parameters;-) + * Also, seeking is not guaranteed to work for all streams (underlying stream may not support it). + * And yet another caveat: If the stream is concatenated out of differing pieces (Frankenstein stream), seeking may suffer, too. + * + * @{ + */ + +/** Returns the current position in samples. + * On the next successful read, you'd get that sample. + * \param mh handle + * \return sample offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tell(mpg123_handle *mh); + +/** Returns the frame number that the next read will give you data from. + * \param mh handle + * \return frame offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tellframe(mpg123_handle *mh); + +/** Returns the current byte offset in the input stream. + * \param mh handle + * \return byte offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tell_stream(mpg123_handle *mh); + +/** Seek to a desired sample offset. + * Usage is modelled afer the standard lseek(). + * \param mh handle + * \param sampleoff offset in PCM samples + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END + * \return The resulting offset >= 0 or error/message code + */ +MPG123_EXPORT off_t mpg123_seek( mpg123_handle *mh +, off_t sampleoff, int whence ); + +/** Seek to a desired sample offset in data feeding mode. + * This just prepares things to be right only if you ensure that the next chunk of input data will be from input_offset byte position. + * \param mh handle + * \param sampleoff offset in PCM samples + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END + * \param input_offset The position it expects to be at the + * next time data is fed to mpg123_decode(). + * \return The resulting offset >= 0 or error/message code */ +MPG123_EXPORT off_t mpg123_feedseek( mpg123_handle *mh +, off_t sampleoff, int whence, off_t *input_offset ); + +/** Seek to a desired MPEG frame offset. + * Usage is modelled afer the standard lseek(). + * \param mh handle + * \param frameoff offset in MPEG frames + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END + * \return The resulting offset >= 0 or error/message code */ +MPG123_EXPORT off_t mpg123_seek_frame( mpg123_handle *mh +, off_t frameoff, int whence ); + +/** Return a MPEG frame offset corresponding to an offset in seconds. + * This assumes that the samples per frame do not change in the file/stream, which is a good assumption for any sane file/stream only. + * \return frame offset >= 0 or error/message code */ +MPG123_EXPORT off_t mpg123_timeframe(mpg123_handle *mh, double sec); + +/** Give access to the frame index table that is managed for seeking. + * You are asked not to modify the values... Use mpg123_set_index to set the + * seek index + * \param mh handle + * \param offsets pointer to the index array + * \param step one index byte offset advances this many MPEG frames + * \param fill number of recorded index offsets; size of the array + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_index( mpg123_handle *mh +, off_t **offsets, off_t *step, size_t *fill ); + +/** Set the frame index table + * Setting offsets to NULL and fill > 0 will allocate fill entries. Setting offsets + * to NULL and fill to 0 will clear the index and free the allocated memory used by the index. + * \param mh handle + * \param offsets pointer to the index array + * \param step one index byte offset advances this many MPEG frames + * \param fill number of recorded index offsets; size of the array + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_set_index( mpg123_handle *mh +, off_t *offsets, off_t step, size_t fill ); + +/** An old crutch to keep old mpg123 binaries happy. + * WARNING: This function is there only to avoid runtime linking errors with + * standalone mpg123 before version 1.23.0 (if you strangely update the + * library but not the end-user program) and actually is broken + * for various cases (p.ex. 24 bit output). Do never use. It might eventually + * be purged from the library. + */ +MPG123_EXPORT int mpg123_position( mpg123_handle *mh, off_t frame_offset, off_t buffered_bytes, off_t *current_frame, off_t *frames_left, double *current_seconds, double *seconds_left); + +/*@}*/ + + +/** \defgroup mpg123_voleq mpg123 volume and equalizer + * + * @{ + */ + +/** another channel enumeration, for left/right choice */ +enum mpg123_channels +{ + MPG123_LEFT=0x1 /**< The Left Channel. */ + ,MPG123_RIGHT=0x2 /**< The Right Channel. */ + ,MPG123_LR=0x3 /**< Both left and right channel; same as MPG123_LEFT|MPG123_RIGHT */ +}; + +/** Set the 32 Band Audio Equalizer settings. + * \param mh handle + * \param channel Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for both. + * \param band The equaliser band to change (from 0 to 31) + * \param val The (linear) adjustment factor. + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_eq( mpg123_handle *mh +, enum mpg123_channels channel, int band, double val ); + +/** Get the 32 Band Audio Equalizer settings. + * \param mh handle + * \param channel Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for (arithmetic mean of) both. + * \param band The equaliser band to change (from 0 to 31) + * \return The (linear) adjustment factor (zero for pad parameters) */ +MPG123_EXPORT double mpg123_geteq(mpg123_handle *mh + , enum mpg123_channels channel, int band); + +/** Reset the 32 Band Audio Equalizer settings to flat + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_reset_eq(mpg123_handle *mh); + +/** Set the absolute output volume including the RVA setting, + * vol<0 just applies (a possibly changed) RVA setting. + * \param mh handle + * \param vol volume value (linear factor) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_volume(mpg123_handle *mh, double vol); + +/** Adjust output volume including the RVA setting by chosen amount + * \param mh handle + * \param change volume value (linear factor increment) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_volume_change(mpg123_handle *mh, double change); + +/** Return current volume setting, the actual value due to RVA, and the RVA + * adjustment itself. It's all as double float value to abstract the sample + * format. The volume values are linear factors / amplitudes (not percent) + * and the RVA value is in decibels. + * \param mh handle + * \param base return address for base volume (linear factor) + * \param really return address for actual volume (linear factor) + * \param rva_db return address for RVA value (decibels) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getvolume(mpg123_handle *mh, double *base, double *really, double *rva_db); + +/* TODO: Set some preamp in addition / to replace internal RVA handling? */ + +/*@}*/ + + +/** \defgroup mpg123_status mpg123 status and information + * + * @{ + */ + +/** Enumeration of the mode types of Variable Bitrate */ +enum mpg123_vbr { + MPG123_CBR=0, /**< Constant Bitrate Mode (default) */ + MPG123_VBR, /**< Variable Bitrate Mode */ + MPG123_ABR /**< Average Bitrate Mode */ +}; + +/** Enumeration of the MPEG Versions */ +enum mpg123_version { + MPG123_1_0=0, /**< MPEG Version 1.0 */ + MPG123_2_0, /**< MPEG Version 2.0 */ + MPG123_2_5 /**< MPEG Version 2.5 */ +}; + + +/** Enumeration of the MPEG Audio mode. + * Only the mono mode has 1 channel, the others have 2 channels. */ +enum mpg123_mode { + MPG123_M_STEREO=0, /**< Standard Stereo. */ + MPG123_M_JOINT, /**< Joint Stereo. */ + MPG123_M_DUAL, /**< Dual Channel. */ + MPG123_M_MONO /**< Single Channel. */ +}; + + +/** Enumeration of the MPEG Audio flag bits */ +enum mpg123_flags { + MPG123_CRC=0x1, /**< The bitstream is error protected using 16-bit CRC. */ + MPG123_COPYRIGHT=0x2, /**< The bitstream is copyrighted. */ + MPG123_PRIVATE=0x4, /**< The private bit has been set. */ + MPG123_ORIGINAL=0x8 /**< The bitstream is an original, not a copy. */ +}; + +/** Data structure for storing information about a frame of MPEG Audio */ +struct mpg123_frameinfo +{ + enum mpg123_version version; /**< The MPEG version (1.0/2.0/2.5). */ + int layer; /**< The MPEG Audio Layer (MP1/MP2/MP3). */ + long rate; /**< The sampling rate in Hz. */ + enum mpg123_mode mode; /**< The audio mode (Mono, Stereo, Joint-stero, Dual Channel). */ + int mode_ext; /**< The mode extension bit flag. */ + int framesize; /**< The size of the frame (in bytes, including header). */ + enum mpg123_flags flags; /**< MPEG Audio flag bits. Just now I realize that it should be declared as int, not enum. It's a bitwise combination of the enum values. */ + int emphasis; /**< The emphasis type. */ + int bitrate; /**< Bitrate of the frame (kbps). */ + int abr_rate; /**< The target average bitrate. */ + enum mpg123_vbr vbr; /**< The VBR mode. */ +}; + +/** Get frame information about the MPEG audio bitstream and store it in a mpg123_frameinfo structure. + * \param mh handle + * \param mi address of existing frameinfo structure to write to + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_info(mpg123_handle *mh, struct mpg123_frameinfo *mi); + +/** Get the safe output buffer size for all cases + * (when you want to replace the internal buffer) + * \return safe buffer size + */ +MPG123_EXPORT size_t mpg123_safe_buffer(void); + +/** Make a full parsing scan of each frame in the file. ID3 tags are found. An + * accurate length value is stored. Seek index will be filled. A seek back to + * current position is performed. At all, this function refuses work when + * stream is not seekable. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_scan(mpg123_handle *mh); + +/** Return, if possible, the full (expected) length of current track in frames. + * \param mh handle + * \return length >= 0 or MPG123_ERR if there is no length guess possible. + */ +MPG123_EXPORT off_t mpg123_framelength(mpg123_handle *mh); + +/** Return, if possible, the full (expected) length of current track in samples. + * \param mh handle + * \return length >= 0 or MPG123_ERR if there is no length guess possible. + */ +MPG123_EXPORT off_t mpg123_length(mpg123_handle *mh); + +/** Override the value for file size in bytes. + * Useful for getting sensible track length values in feed mode or for HTTP streams. + * \param mh handle + * \param size file size in bytes + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_set_filesize(mpg123_handle *mh, off_t size); + +/** Get MPEG frame duration in seconds. + * \param mh handle + * \return frame duration in seconds, <0 on error + */ +MPG123_EXPORT double mpg123_tpf(mpg123_handle *mh); + +/** Get MPEG frame duration in samples. + * \param mh handle + * \return samples per frame for the most recently parsed frame; <0 on errors + */ +MPG123_EXPORT int mpg123_spf(mpg123_handle *mh); + +/** Get and reset the clip count. + * \param mh handle + * \return count of clipped samples + */ +MPG123_EXPORT long mpg123_clip(mpg123_handle *mh); + + +/** The key values for state information from mpg123_getstate(). */ +enum mpg123_state +{ + MPG123_ACCURATE = 1 /**< Query if positons are currently accurate (integer value, 0 if false, 1 if true). */ + ,MPG123_BUFFERFILL /**< Get fill of internal (feed) input buffer as integer byte count returned as long and as double. An error is returned on integer overflow while converting to (signed) long, but the returned floating point value shold still be fine. */ + ,MPG123_FRANKENSTEIN /**< Stream consists of carelessly stitched together files. Seeking may yield unexpected results (also with MPG123_ACCURATE, it may be confused). */ + ,MPG123_FRESH_DECODER /**< Decoder structure has been updated, possibly indicating changed stream (integer value, 0 if false, 1 if true). Flag is cleared after retrieval. */ +}; + +/** Get various current decoder/stream state information. + * \param mh handle + * \param key the key to identify the information to give. + * \param val the address to return (long) integer values to + * \param fval the address to return floating point values to + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getstate( mpg123_handle *mh +, enum mpg123_state key, long *val, double *fval ); + +/*@}*/ + + +/** \defgroup mpg123_metadata mpg123 metadata handling + * + * Functions to retrieve the metadata from MPEG Audio files and streams. + * Also includes string handling functions. + * + * @{ + */ + +/** Data structure for storing strings in a safer way than a standard C-String. + * Can also hold a number of null-terminated strings. */ +typedef struct +{ + char* p; /**< pointer to the string data */ + size_t size; /**< raw number of bytes allocated */ + size_t fill; /**< number of used bytes (including closing zero byte) */ +} mpg123_string; + +/** Create and allocate memory for a new mpg123_string + * \param sb string handle (address of existing structure on your side) + */ +MPG123_EXPORT void mpg123_init_string(mpg123_string* sb); + +/** Free-up mempory for an existing mpg123_string + * \param sb string handle + */ +MPG123_EXPORT void mpg123_free_string(mpg123_string* sb); + +/** Change the size of a mpg123_string + * \param sb string handle + * \param news new size in bytes + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_resize_string(mpg123_string* sb, size_t news); + +/** Increase size of a mpg123_string if necessary (it may stay larger). + * Note that the functions for adding and setting in current libmpg123 + * use this instead of mpg123_resize_string(). + * That way, you can preallocate memory and safely work afterwards with + * pieces. + * \param sb string handle + * \param news new minimum size + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_grow_string(mpg123_string* sb, size_t news); + +/** Copy the contents of one mpg123_string string to another. + * Yes the order of arguments is reversed compated to memcpy(). + * \param from string handle + * \param to string handle + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_copy_string(mpg123_string* from, mpg123_string* to); + +/** Append a C-String to an mpg123_string + * \param sb string handle + * \param stuff to append + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_add_string(mpg123_string* sb, const char* stuff); + +/** Append a C-substring to an mpg123 string + * \param sb string handle + * \param stuff content to copy + * \param from offset to copy from + * \param count number of characters to copy (a null-byte is always appended) + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_add_substring( mpg123_string *sb +, const char *stuff, size_t from, size_t count ); + +/** Set the content of a mpg123_string to a C-string + * \param sb string handle + * \param stuff content to copy + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_set_string(mpg123_string* sb, const char* stuff); + +/** Set the content of a mpg123_string to a C-substring + * \param sb string handle + * \param stuff the future content + * \param from offset to copy from + * \param count number of characters to copy (a null-byte is always appended) + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_set_substring( mpg123_string *sb +, const char *stuff, size_t from, size_t count ); + +/** Count characters in a mpg123 string (non-null bytes or UTF-8 characters). + * Even with the fill property, the character count is not obvious as there could be multiple trailing null bytes. + * \param sb string handle + * \param utf8 a flag to tell if the string is in utf8 encoding + * \return character count +*/ +MPG123_EXPORT size_t mpg123_strlen(mpg123_string *sb, int utf8); + +/** Remove trailing \\r and \\n, if present. + * \param sb string handle + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_chomp_string(mpg123_string *sb); + +/** The mpg123 text encodings. This contains encodings we encounter in ID3 tags or ICY meta info. */ +enum mpg123_text_encoding +{ + mpg123_text_unknown = 0 /**< Unkown encoding... mpg123_id3_encoding can return that on invalid codes. */ + ,mpg123_text_utf8 = 1 /**< UTF-8 */ + ,mpg123_text_latin1 = 2 /**< ISO-8859-1. Note that sometimes latin1 in ID3 is abused for totally different encodings. */ + ,mpg123_text_icy = 3 /**< ICY metadata encoding, usually CP-1252 but we take it as UTF-8 if it qualifies as such. */ + ,mpg123_text_cp1252 = 4 /**< Really CP-1252 without any guessing. */ + ,mpg123_text_utf16 = 5 /**< Some UTF-16 encoding. The last of a set of leading BOMs (byte order mark) rules. + * When there is no BOM, big endian ordering is used. Note that UCS-2 qualifies as UTF-8 when + * you don't mess with the reserved code points. If you want to decode little endian data + * without BOM you need to prepend 0xff 0xfe yourself. */ + ,mpg123_text_utf16bom = 6 /**< Just an alias for UTF-16, ID3v2 has this as distinct code. */ + ,mpg123_text_utf16be = 7 /**< Another alias for UTF16 from ID3v2. Note, that, because of the mess that is reality, + * BOMs are used if encountered. There really is not much distinction between the UTF16 types for mpg123 + * One exception: Since this is seen in ID3v2 tags, leading null bytes are skipped for all other UTF16 + * types (we expect a BOM before real data there), not so for utf16be!*/ + ,mpg123_text_max = 7 /**< Placeholder for the maximum encoding value. */ +}; + +/** The encoding byte values from ID3v2. */ +enum mpg123_id3_enc +{ + mpg123_id3_latin1 = 0 /**< Note: This sometimes can mean anything in practice... */ + ,mpg123_id3_utf16bom = 1 /**< UTF16, UCS-2 ... it's all the same for practical purposes. */ + ,mpg123_id3_utf16be = 2 /**< Big-endian UTF-16, BOM see note for mpg123_text_utf16be. */ + ,mpg123_id3_utf8 = 3 /**< Our lovely overly ASCII-compatible 8 byte encoding for the world. */ + ,mpg123_id3_enc_max = 3 /**< Placeholder to check valid range of encoding byte. */ +}; + +/** Convert ID3 encoding byte to mpg123 encoding index. + * \param id3_enc_byte the ID3 encoding code + * \return the mpg123 encoding index + */ + +MPG123_EXPORT enum mpg123_text_encoding mpg123_enc_from_id3(unsigned char id3_enc_byte); + +/** Store text data in string, after converting to UTF-8 from indicated encoding + * A prominent error can be that you provided an unknown encoding value, or this build of libmpg123 lacks support for certain encodings (ID3 or ICY stuff missing). + * Also, you might want to take a bit of care with preparing the data; for example, strip leading zeroes (I have seen that). + * \param sb target string + * \param enc mpg123 text encoding value + * \param source source buffer with plain unsigned bytes (you might need to cast from signed char) + * \param source_size number of bytes in the source buffer + * \return 0 on error, 1 on success (on error, mpg123_free_string is called on sb) + */ +MPG123_EXPORT int mpg123_store_utf8(mpg123_string *sb, enum mpg123_text_encoding enc, const unsigned char *source, size_t source_size); + +/** Sub data structure for ID3v2, for storing various text fields (including comments). + * This is for ID3v2 COMM, TXXX and all the other text fields. + * Only COMM and TXXX have a description, only COMM and USLT have a language. + * You should consult the ID3v2 specification for the use of the various text fields ("frames" in ID3v2 documentation, I use "fields" here to separate from MPEG frames). */ +typedef struct +{ + char lang[3]; /**< Three-letter language code (not terminated). */ + char id[4]; /**< The ID3v2 text field id, like TALB, TPE2, ... (4 characters, no string termination). */ + mpg123_string description; /**< Empty for the generic comment... */ + mpg123_string text; /**< ... */ +} mpg123_text; + +/** The picture type values from ID3v2. */ +enum mpg123_id3_pic_type +{ + mpg123_id3_pic_other = 0 /**< see ID3v2 docs */ + ,mpg123_id3_pic_icon = 1 /**< see ID3v2 docs */ + ,mpg123_id3_pic_other_icon = 2 /**< see ID3v2 docs */ + ,mpg123_id3_pic_front_cover = 3 /**< see ID3v2 docs */ + ,mpg123_id3_pic_back_cover = 4 /**< see ID3v2 docs */ + ,mpg123_id3_pic_leaflet = 5 /**< see ID3v2 docs */ + ,mpg123_id3_pic_media = 6 /**< see ID3v2 docs */ + ,mpg123_id3_pic_lead = 7 /**< see ID3v2 docs */ + ,mpg123_id3_pic_artist = 8 /**< see ID3v2 docs */ + ,mpg123_id3_pic_conductor = 9 /**< see ID3v2 docs */ + ,mpg123_id3_pic_orchestra = 10 /**< see ID3v2 docs */ + ,mpg123_id3_pic_composer = 11 /**< see ID3v2 docs */ + ,mpg123_id3_pic_lyricist = 12 /**< see ID3v2 docs */ + ,mpg123_id3_pic_location = 13 /**< see ID3v2 docs */ + ,mpg123_id3_pic_recording = 14 /**< see ID3v2 docs */ + ,mpg123_id3_pic_performance = 15 /**< see ID3v2 docs */ + ,mpg123_id3_pic_video = 16 /**< see ID3v2 docs */ + ,mpg123_id3_pic_fish = 17 /**< see ID3v2 docs */ + ,mpg123_id3_pic_illustration = 18 /**< see ID3v2 docs */ + ,mpg123_id3_pic_artist_logo = 19 /**< see ID3v2 docs */ + ,mpg123_id3_pic_publisher_logo = 20 /**< see ID3v2 docs */ +}; + +/** Sub data structure for ID3v2, for storing picture data including comment. + * This is for the ID3v2 APIC field. You should consult the ID3v2 specification + * for the use of the APIC field ("frames" in ID3v2 documentation, I use "fields" + * here to separate from MPEG frames). */ +typedef struct +{ + char type; /**< mpg123_id3_pic_type value */ + mpg123_string description; /**< description string */ + mpg123_string mime_type; /**< MIME type */ + size_t size; /**< size in bytes */ + unsigned char* data; /**< pointer to the image data */ +} mpg123_picture; + +/** Data structure for storing IDV3v2 tags. + * This structure is not a direct binary mapping with the file contents. + * The ID3v2 text frames are allowed to contain multiple strings. + * So check for null bytes until you reach the mpg123_string fill. + * All text is encoded in UTF-8. */ +typedef struct +{ + unsigned char version; /**< 3 or 4 for ID3v2.3 or ID3v2.4. */ + mpg123_string *title; /**< Title string (pointer into text_list). */ + mpg123_string *artist; /**< Artist string (pointer into text_list). */ + mpg123_string *album; /**< Album string (pointer into text_list). */ + mpg123_string *year; /**< The year as a string (pointer into text_list). */ + mpg123_string *genre; /**< Genre String (pointer into text_list). The genre string(s) may very well need postprocessing, esp. for ID3v2.3. */ + mpg123_string *comment; /**< Pointer to last encountered comment text with empty description. */ + /* Encountered ID3v2 fields are appended to these lists. + There can be multiple occurences, the pointers above always point to the last encountered data. */ + mpg123_text *comment_list; /**< Array of comments. */ + size_t comments; /**< Number of comments. */ + mpg123_text *text; /**< Array of ID3v2 text fields (including USLT) */ + size_t texts; /**< Numer of text fields. */ + mpg123_text *extra; /**< The array of extra (TXXX) fields. */ + size_t extras; /**< Number of extra text (TXXX) fields. */ + mpg123_picture *picture; /**< Array of ID3v2 pictures fields (APIC). */ + size_t pictures; /**< Number of picture (APIC) fields. */ +} mpg123_id3v2; + +/** Data structure for ID3v1 tags (the last 128 bytes of a file). + * Don't take anything for granted (like string termination)! + * Also note the change ID3v1.1 did: comment[28] = 0; comment[29] = track_number + * It is your task to support ID3v1 only or ID3v1.1 ...*/ +typedef struct +{ + char tag[3]; /**< Always the string "TAG", the classic intro. */ + char title[30]; /**< Title string. */ + char artist[30]; /**< Artist string. */ + char album[30]; /**< Album string. */ + char year[4]; /**< Year string. */ + char comment[30]; /**< Comment string. */ + unsigned char genre; /**< Genre index. */ +} mpg123_id3v1; + +#define MPG123_ID3 0x3 /**< 0011 There is some ID3 info. Also matches 0010 or NEW_ID3. */ +#define MPG123_NEW_ID3 0x1 /**< 0001 There is ID3 info that changed since last call to mpg123_id3. */ +#define MPG123_ICY 0xc /**< 1100 There is some ICY info. Also matches 0100 or NEW_ICY.*/ +#define MPG123_NEW_ICY 0x4 /**< 0100 There is ICY info that changed since last call to mpg123_icy. */ + +/** Query if there is (new) meta info, be it ID3 or ICY (or something new in future). + * \param mh handle + * \return combination of flags, 0 on error (same as "nothing new") + */ +MPG123_EXPORT int mpg123_meta_check(mpg123_handle *mh); + +/** Clean up meta data storage (ID3v2 and ICY), freeing memory. + * \param mh handle + */ +MPG123_EXPORT void mpg123_meta_free(mpg123_handle *mh); + +/** Point v1 and v2 to existing data structures wich may change on any next read/decode function call. + * v1 and/or v2 can be set to NULL when there is no corresponding data. + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_id3( mpg123_handle *mh +, mpg123_id3v1 **v1, mpg123_id3v2 **v2 ); + +/** Point icy_meta to existing data structure wich may change on any next read/decode function call. + * \param mh handle + * \param icy_meta return address for ICY meta string (set to NULL if nothing there) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_icy(mpg123_handle *mh, char **icy_meta); + +/** Decode from windows-1252 (the encoding ICY metainfo used) to UTF-8. + * Note that this is very similar to mpg123_store_utf8(&sb, mpg123_text_icy, icy_text, strlen(icy_text+1)) . + * \param icy_text The input data in ICY encoding + * \return pointer to newly allocated buffer with UTF-8 data (You free() it!) */ +MPG123_EXPORT char* mpg123_icy2utf8(const char* icy_text); + + +/* @} */ + + +/** \defgroup mpg123_advpar mpg123 advanced parameter API + * + * Direct access to a parameter set without full handle around it. + * Possible uses: + * - Influence behaviour of library _during_ initialization of handle (MPG123_VERBOSE). + * - Use one set of parameters for multiple handles. + * + * The functions for handling mpg123_pars (mpg123_par() and mpg123_fmt() + * family) directly return a fully qualified mpg123 error code, the ones + * operating on full handles normally MPG123_OK or MPG123_ERR, storing the + * specific error code itseld inside the handle. + * + * @{ + */ + +/** Opaque structure for the libmpg123 decoder parameters. */ +struct mpg123_pars_struct; + +/** Opaque structure for the libmpg123 decoder parameters. */ +typedef struct mpg123_pars_struct mpg123_pars; + +/** Create a handle with preset parameters. + * \param mp parameter handle + * \param decoder decoder choice + * \param error error code return address + * \return mpg123 handle + */ +MPG123_EXPORT mpg123_handle *mpg123_parnew( mpg123_pars *mp +, const char* decoder, int *error ); + +/** Allocate memory for and return a pointer to a new mpg123_pars + * \param error error code return address + * \return new parameter handle + */ +MPG123_EXPORT mpg123_pars *mpg123_new_pars(int *error); + +/** Delete and free up memory used by a mpg123_pars data structure + * \param mp parameter handle + */ +MPG123_EXPORT void mpg123_delete_pars(mpg123_pars* mp); + +/** Configure mpg123 parameters to accept no output format at all, + * use before specifying supported formats with mpg123_format + * \param mp parameter handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_fmt_none(mpg123_pars *mp); + +/** Configure mpg123 parameters to accept all formats + * (also any custom rate you may set) -- this is default. + * \param mp parameter handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_fmt_all(mpg123_pars *mp); + +/** Set the audio format support of a mpg123_pars in detail: + * \param mp parameter handle + * \param rate The sample rate value (in Hertz). + * \param channels A combination of MPG123_STEREO and MPG123_MONO. + * \param encodings A combination of accepted encodings for rate and channels, + * p.ex MPG123_ENC_SIGNED16|MPG123_ENC_ULAW_8 (or 0 for no + * support). + * \return MPG123_OK on success +*/ +MPG123_EXPORT int mpg123_fmt(mpg123_pars *mp +, long rate, int channels, int encodings); + +/** Check to see if a specific format at a specific rate is supported + * by mpg123_pars. + * \param mp parameter handle + * \param rate sampling rate + * \param encoding encoding + * \return 0 for no support (that includes invalid parameters), MPG123_STEREO, + * MPG123_MONO or MPG123_STEREO|MPG123_MONO. */ +MPG123_EXPORT int mpg123_fmt_support(mpg123_pars *mp, long rate, int encoding); + +/** Set a specific parameter, for a specific mpg123_pars, using a parameter + * type key chosen from the mpg123_parms enumeration, to the specified value. + * \param mp parameter handle + * \param type parameter choice + * \param value integer value + * \param fvalue floating point value + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_par( mpg123_pars *mp +, enum mpg123_parms type, long value, double fvalue ); + +/** Get a specific parameter, for a specific mpg123_pars. + * See the mpg123_parms enumeration for a list of available parameters. + * \param mp parameter handle + * \param type parameter choice + * \param value integer value return address + * \param fvalue floating point value return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getpar( mpg123_pars *mp +, enum mpg123_parms type, long *value, double *fvalue); + +/* @} */ + + +/** \defgroup mpg123_lowio mpg123 low level I/O + * You may want to do tricky stuff with I/O that does not work with mpg123's default file access or you want to make it decode into your own pocket... + * + * @{ */ + +/** Replace default internal buffer with user-supplied buffer. + * Instead of working on it's own private buffer, mpg123 will directly use the one you provide for storing decoded audio. + * Note that the required buffer size could be bigger than expected from output + * encoding if libmpg123 has to convert from primary decoder output (p.ex. 32 bit + * storage for 24 bit output). + * \param mh handle + * \param data pointer to user buffer + * \param size of buffer in bytes + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_buffer(mpg123_handle *mh +, unsigned char *data, size_t size); + +/** The max size of one frame's decoded output with current settings. + * Use that to determine an appropriate minimum buffer size for decoding one frame. + * \param mh handle + * \return maximum decoded data size in bytes + */ +MPG123_EXPORT size_t mpg123_outblock(mpg123_handle *mh); + +/** Replace low-level stream access functions; read and lseek as known in POSIX. + * You can use this to make any fancy file opening/closing yourself, + * using mpg123_open_fd() to set the file descriptor for your read/lseek + * (doesn't need to be a "real" file descriptor...). + * Setting a function to NULL means that the default internal read is + * used (active from next mpg123_open call on). + * Note: As it would be troublesome to mess with this while having a file open, + * this implies mpg123_close(). + * \param mh handle + * \param r_read callback for reading (behaviour like POSIX read) + * \param r_lseek callback for seeking (like POSIX lseek) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_reader( mpg123_handle *mh +, ssize_t (*r_read) (int, void *, size_t) +, off_t (*r_lseek)(int, off_t, int) +); + +/** Replace I/O functions with your own ones operating on some kind of + * handle instead of integer descriptors. + * The handle is a void pointer, so you can pass any data you want... + * mpg123_open_handle() is the call you make to use the I/O defined here. + * There is no fallback to internal read/seek here. + * Note: As it would be troublesome to mess with this while having a file open, + * this mpg123_close() is implied here. + * \param mh handle + * \param r_read callback for reading (behaviour like POSIX read) + * \param r_lseek callback for seeking (like POSIX lseek) + * \param cleanup A callback to clean up an I/O handle on mpg123_close, + * can be NULL for none (you take care of cleaning your handles). + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_reader_handle( mpg123_handle *mh +, ssize_t (*r_read) (void *, void *, size_t) +, off_t (*r_lseek)(void *, off_t, int) +, void (*cleanup)(void*) ); + +/* @} */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/deps/mpg123/config/linux/ia32/config.h b/deps/mpg123/config/linux/ia32/config.h index 7732b08..8e89b02 100644 --- a/deps/mpg123/config/linux/ia32/config.h +++ b/deps/mpg123/config/linux/ia32/config.h @@ -74,6 +74,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_CULIB_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 diff --git a/deps/mpg123/config/linux/x64/config.h b/deps/mpg123/config/linux/x64/config.h index 95878c4..c90c2bb 100644 --- a/deps/mpg123/config/linux/x64/config.h +++ b/deps/mpg123/config/linux/x64/config.h @@ -11,6 +11,9 @@ /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ +/* Define if .balign is present. */ +#define ASMALIGN_BALIGN 1 + /* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */ /* #undef ASMALIGN_EXP */ @@ -74,6 +77,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_CULIB_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 diff --git a/deps/mpg123/config/linux/x87/config.h b/deps/mpg123/config/linux/x87/config.h index 7732b08..8e89b02 100644 --- a/deps/mpg123/config/linux/x87/config.h +++ b/deps/mpg123/config/linux/x87/config.h @@ -74,6 +74,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_CULIB_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 diff --git a/deps/mpg123/config/mac/arm64/config.h b/deps/mpg123/config/mac/arm64/config.h new file mode 100644 index 0000000..fbd6adb --- /dev/null +++ b/deps/mpg123/config/mac/arm64/config.h @@ -0,0 +1,478 @@ +/* src/config.h. Generated from config.h.in by configure. */ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if your architecture wants/needs/can use attribute_align_arg and + alignment checks. It is for 32bit x86... */ +/* #undef ABI_ALIGN_FUN */ + +/* Define to use proper rounding. */ +/* #undef ACCURATE_ROUNDING */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define if .balign is present. */ +#define ASMALIGN_BALIGN 1 + +/* Define if .align just takes byte count. */ +/* #undef ASMALIGN_BYTE */ + +/* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */ +/* #undef ASMALIGN_EXP */ + +/* Define if __attribute__((aligned(16))) shall be used */ +#define CCALIGN 1 + +/* Define if debugging is enabled. */ +/* #undef DEBUG */ + +/* The default audio output module(s) to use */ +#define DEFAULT_OUTPUT_MODULE "oss" + +/* Define if building with dynamcally linked libmpg123 */ +#define DYNAMIC_BUILD 1 + +/* Use EFBIG as substitude for EOVERFLOW, mingw.org may lack the latter */ +/* #undef EOVERFLOW */ + +/* Define if FIFO support is enabled. */ +#define FIFO 1 + +/* Define if frame index should be used. */ +#define FRAME_INDEX 1 + +/* Define if gapless is enabled. */ +#define GAPLESS 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ALC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ALIB_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AL_ALC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AL_AL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ASM_AUDIOIO_H */ + +/* Define to 1 if you have the `atoll' function. */ +#define HAVE_ATOLL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AUDIOS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AUDIOTOOLBOX_AUDIOTOOLBOX_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_AUDIOUNIT_AUDIOUNIT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CORESERVICES_CORESERVICES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CULIB_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the `dlclose' function. */ +#define HAVE_DLCLOSE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `dlopen' function. */ +#define HAVE_DLOPEN 1 + +/* Define to 1 if you have the `dlsym' function. */ +#define HAVE_DLSYM 1 + +/* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */ +#define HAVE_GAI_ADDRCONFIG 1 + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LANGINFO_H 1 + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the `mx' library (-lmx). */ +/* #undef HAVE_LIBMX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LINUX_SOUNDCARD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_SOUNDCARD_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkfifo' function. */ +#define HAVE_MKFIFO 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_TCP_H */ + +/* Define to 1 if you have the `nl_langinfo' function. */ +#define HAVE_NL_LANGINFO 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OPENAL_ALC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OPENAL_AL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OS2ME_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OS2_H */ + +/* Define to 1 if you have the `random' function. */ +#define HAVE_RANDOM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SCHED_H 1 + +/* Define to 1 if you have the `sched_setscheduler' function. */ +#define HAVE_SCHED_SETSCHEDULER 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `setpriority' function. */ +#define HAVE_SETPRIORITY 1 + +/* Define to 1 if you have the `setuid' function. */ +#define HAVE_SETUID 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SNDIO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SUN_AUDIOIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_AUDIOIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_AUDIO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SIGNAL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOUNDCARD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define this if you have the POSIX termios library */ +#define HAVE_TERMIOS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Define to indicate that float storage follows IEEE754. */ +#define IEEE_FLOAT 1 + +/* size of the frame index seek table */ +#define INDEX_SIZE 1000 + +/* Define if IPV6 support is enabled. */ +#define IPV6 1 + +/* Define this to the size of native offset type in bits, used for LFS alias + functions. */ +#define LFS_ALIAS_BITS 64 + +/* Define to the extension used for runtime loadable modules, say, ".so". */ +#define LT_MODULE_EXT ".so" + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to the shared library suffix, say, ".dylib". */ +/* #undef LT_SHARED_EXT */ + +/* Define to the shared archive member specification, say "(shr.o)". */ +/* #undef LT_SHARED_LIB_MEMBER */ + +/* Define if network support is enabled. */ +#define NETWORK 1 + +/* Define to disable 16 bit integer output. */ +/* #undef NO_16BIT */ + +/* Define to disable 32 bit and 24 bit integer output. */ +/* #undef NO_32BIT */ + +/* Define to disable 8 bit integer output. */ +/* #undef NO_8BIT */ + +/* Define to disable downsampled decoding. */ +/* #undef NO_DOWNSAMPLE */ + +/* Define to disable equalizer. */ +/* #undef NO_EQUALIZER */ + +/* Define to disable error messages in combination with a return value (the + return is left intact). */ +/* #undef NO_ERETURN */ + +/* Define to disable error messages. */ +/* #undef NO_ERRORMSG */ + +/* Define to disable feeder and buffered readers. */ +/* #undef NO_FEEDER */ + +/* Define to disable ICY handling. */ +/* #undef NO_ICY */ + +/* Define to disable ID3v2 parsing. */ +/* #undef NO_ID3V2 */ + +/* Define to disable layer I. */ +/* #undef NO_LAYER1 */ + +/* Define to disable layer II. */ +/* #undef NO_LAYER2 */ + +/* Define to disable layer III. */ +/* #undef NO_LAYER3 */ + +/* Define to disable ntom resampling. */ +/* #undef NO_NTOM */ + +/* Define to disable real output. */ +/* #undef NO_REAL */ + +/* Define to disable string functions. */ +/* #undef NO_STRING */ + +/* Define for post-processed 32 bit formats. */ +/* #undef NO_SYNTH32 */ + +/* Define to disable warning messages. */ +/* #undef NO_WARNING */ + +/* Name of package */ +#define PACKAGE "mpg123" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "maintainer@mpg123.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "mpg123" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "mpg123 1.25.10" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "mpg123" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.25.10" + +/* Define if portaudio v18 API is wanted. */ +/* #undef PORTAUDIO18 */ + +/* The size of `int32_t', as computed by sizeof. */ +#define SIZEOF_INT32_T 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `off_t', as computed by sizeof. */ +#define SIZEOF_OFF_T 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + +/* The size of `ssize_t', as computed by sizeof. */ +#define SIZEOF_SSIZE_T 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if modules are enabled */ +/* #undef USE_MODULES */ + +/* Define for new Huffman decoding scheme. */ +#define USE_NEW_HUFFTABLE 1 + +/* Define to use yasm for assemble AVX sources. */ +/* #undef USE_YASM_FOR_AVX */ + +/* Version number of package */ +#define VERSION "1.25.10" + +/* Define to use Win32 named pipes */ +/* #undef WANT_WIN32_FIFO */ + +/* Define to use Win32 sockets */ +/* #undef WANT_WIN32_SOCKETS */ + +/* Define to use Unicode for Windows */ +/* #undef WANT_WIN32_UNICODE */ + +/* WinXP and above for ipv6 */ +/* #undef WINVER */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* WinXP and above for ipv6 */ +/* #undef _WIN32_WINNT */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `short' if does not define. */ +/* #undef int16_t */ + +/* Define to `int' if does not define. */ +/* #undef int32_t */ + +/* Define to `long long' if does not define. */ +/* #undef int64_t */ + +/* Define to the native offset type (long or actually off_t). */ +#define lfs_alias_t off_t + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `unsigned long' if does not define. */ +/* #undef size_t */ + +/* Define to `long' if does not define. */ +/* #undef ssize_t */ + +/* Define to `unsigned short' if does not define. */ +/* #undef uint16_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef uint32_t */ + +/* Define to `unsigned long' if does not define. */ +/* #undef uintptr_t */ diff --git a/deps/mpg123/config/mac/arm64/mpg123.h b/deps/mpg123/config/mac/arm64/mpg123.h new file mode 100644 index 0000000..1a3cd10 --- /dev/null +++ b/deps/mpg123/config/mac/arm64/mpg123.h @@ -0,0 +1,1441 @@ +/* + libmpg123: MPEG Audio Decoder library (version 1.25.10) + + copyright 1995-2015 by the mpg123 project + free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org +*/ + +#ifndef MPG123_LIB_H +#define MPG123_LIB_H + +#include + +/** \file mpg123.h The header file for the libmpg123 MPEG Audio decoder */ + +/** A macro to check at compile time which set of API functions to expect. + * This should be incremented at least each time a new symbol is added + * to the header. + */ +#define MPG123_API_VERSION 44 + +#ifndef MPG123_EXPORT +/** Defines needed for MS Visual Studio(tm) DLL builds. + * Every public function must be prefixed with MPG123_EXPORT. When building + * the DLL ensure to define BUILD_MPG123_DLL. This makes the function accessible + * for clients and includes it in the import library which is created together + * with the DLL. When consuming the DLL ensure to define LINK_MPG123_DLL which + * imports the functions from the DLL. + */ +#ifdef BUILD_MPG123_DLL +/* The dll exports. */ +#define MPG123_EXPORT __declspec(dllexport) +#else +#ifdef LINK_MPG123_DLL +/* The exe imports. */ +#define MPG123_EXPORT __declspec(dllimport) +#else +/* Nothing on normal/UNIX builds */ +#define MPG123_EXPORT +#endif +#endif +#endif + +/* This is for Visual Studio, so this header works as distributed in the binary downloads */ +#if defined(_MSC_VER) && !defined(MPG123_DEF_SSIZE_T) +#define MPG123_DEF_SSIZE_T +#include +typedef ptrdiff_t ssize_t; +#endif + +#ifndef MPG123_NO_CONFIGURE /* Enable use of this file without configure. */ +#include +#include + +/* Simplified large file handling. + I used to have a check here that prevents building for a library with conflicting large file setup + (application that uses 32 bit offsets with library that uses 64 bits). + While that was perfectly fine in an environment where there is one incarnation of the library, + it hurt GNU/Linux and Solaris systems with multilib where the distribution fails to provide the + correct header matching the 32 bit library (where large files need explicit support) or + the 64 bit library (where there is no distinction). + + New approach: When the app defines _FILE_OFFSET_BITS, it wants non-default large file support, + and thus functions with added suffix (mpg123_open_64). + Any mismatch will be caught at link time because of the _FILE_OFFSET_BITS setting used when + building libmpg123. Plus, there's dual mode large file support in mpg123 since 1.12 now. + Link failure is not the expected outcome of any half-sane usage anymore. + + More complication: What about client code defining _LARGEFILE64_SOURCE? It might want direct access to the _64 functions, along with the ones without suffix. Well, that's possible now via defining MPG123_NO_LARGENAME and MPG123_LARGESUFFIX, respectively, for disabling or enforcing the suffix names. +*/ + +/* + Now, the renaming of large file aware functions. + By default, it appends underscore _FILE_OFFSET_BITS (so, mpg123_seek_64 for mpg123_seek), if _FILE_OFFSET_BITS is defined. You can force a different suffix via MPG123_LARGESUFFIX (that must include the underscore), or you can just disable the whole mess by defining MPG123_NO_LARGENAME. +*/ +#if (!defined MPG123_NO_LARGENAME) && ((defined _FILE_OFFSET_BITS) || (defined MPG123_LARGESUFFIX)) + +/* Need some trickery to concatenate the value(s) of the given macro(s). */ +#define MPG123_MACROCAT_REALLY(a, b) a ## b +#define MPG123_MACROCAT(a, b) MPG123_MACROCAT_REALLY(a, b) +#ifndef MPG123_LARGESUFFIX +#define MPG123_LARGESUFFIX MPG123_MACROCAT(_, _FILE_OFFSET_BITS) +#endif +#define MPG123_LARGENAME(func) MPG123_MACROCAT(func, MPG123_LARGESUFFIX) + +#define mpg123_open MPG123_LARGENAME(mpg123_open) +#define mpg123_open_fd MPG123_LARGENAME(mpg123_open_fd) +#define mpg123_open_handle MPG123_LARGENAME(mpg123_open_handle) +#define mpg123_framebyframe_decode MPG123_LARGENAME(mpg123_framebyframe_decode) +#define mpg123_decode_frame MPG123_LARGENAME(mpg123_decode_frame) +#define mpg123_tell MPG123_LARGENAME(mpg123_tell) +#define mpg123_tellframe MPG123_LARGENAME(mpg123_tellframe) +#define mpg123_tell_stream MPG123_LARGENAME(mpg123_tell_stream) +#define mpg123_seek MPG123_LARGENAME(mpg123_seek) +#define mpg123_feedseek MPG123_LARGENAME(mpg123_feedseek) +#define mpg123_seek_frame MPG123_LARGENAME(mpg123_seek_frame) +#define mpg123_timeframe MPG123_LARGENAME(mpg123_timeframe) +#define mpg123_index MPG123_LARGENAME(mpg123_index) +#define mpg123_set_index MPG123_LARGENAME(mpg123_set_index) +#define mpg123_position MPG123_LARGENAME(mpg123_position) +#define mpg123_length MPG123_LARGENAME(mpg123_length) +#define mpg123_framelength MPG123_LARGENAME(mpg123_framelength) +#define mpg123_set_filesize MPG123_LARGENAME(mpg123_set_filesize) +#define mpg123_replace_reader MPG123_LARGENAME(mpg123_replace_reader) +#define mpg123_replace_reader_handle MPG123_LARGENAME(mpg123_replace_reader_handle) +#define mpg123_framepos MPG123_LARGENAME(mpg123_framepos) + +#endif /* largefile hackery */ + +#endif /* MPG123_NO_CONFIGURE */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** \defgroup mpg123_init mpg123 library and handle setup + * + * Functions to initialise and shutdown the mpg123 library and handles. + * The parameters of handles have workable defaults, you only have to tune them when you want to tune something;-) + * Tip: Use a RVA setting... + * + * @{ + */ + +/** Opaque structure for the libmpg123 decoder handle. */ +struct mpg123_handle_struct; + +/** Opaque structure for the libmpg123 decoder handle. + * Most functions take a pointer to a mpg123_handle as first argument and operate on its data in an object-oriented manner. + */ +typedef struct mpg123_handle_struct mpg123_handle; + +/** Function to initialise the mpg123 library. + * This function is not thread-safe. Call it exactly once per process, before any other (possibly threaded) work with the library. + * + * \return MPG123_OK if successful, otherwise an error number. + */ +MPG123_EXPORT int mpg123_init(void); + +/** Function to close down the mpg123 library. + * This function is not thread-safe. Call it exactly once per process, before any other (possibly threaded) work with the library. */ +MPG123_EXPORT void mpg123_exit(void); + +/** Create a handle with optional choice of decoder (named by a string, see mpg123_decoders() or mpg123_supported_decoders()). + * and optional retrieval of an error code to feed to mpg123_plain_strerror(). + * Optional means: Any of or both the parameters may be NULL. + * + * \param decoder optional choice of decoder variant (NULL for default) + * \param error optional address to store error codes + * \return Non-NULL pointer to fresh handle when successful. + */ +MPG123_EXPORT mpg123_handle *mpg123_new(const char* decoder, int *error); + +/** Delete handle, mh is either a valid mpg123 handle or NULL. + * \param mh handle + */ +MPG123_EXPORT void mpg123_delete(mpg123_handle *mh); + +/** Enumeration of the parameters types that it is possible to set/get. */ +enum mpg123_parms +{ + MPG123_VERBOSE = 0, /**< set verbosity value for enabling messages to stderr, >= 0 makes sense (integer) */ + MPG123_FLAGS, /**< set all flags, p.ex val = MPG123_GAPLESS|MPG123_MONO_MIX (integer) */ + MPG123_ADD_FLAGS, /**< add some flags (integer) */ + MPG123_FORCE_RATE, /**< when value > 0, force output rate to that value (integer) */ + MPG123_DOWN_SAMPLE, /**< 0=native rate, 1=half rate, 2=quarter rate (integer) */ + MPG123_RVA, /**< one of the RVA choices above (integer) */ + MPG123_DOWNSPEED, /**< play a frame N times (integer) */ + MPG123_UPSPEED, /**< play every Nth frame (integer) */ + MPG123_START_FRAME, /**< start with this frame (skip frames before that, integer) */ + MPG123_DECODE_FRAMES, /**< decode only this number of frames (integer) */ + MPG123_ICY_INTERVAL, /**< stream contains ICY metadata with this interval (integer) */ + MPG123_OUTSCALE, /**< the scale for output samples (amplitude - integer or float according to mpg123 output format, normally integer) */ + MPG123_TIMEOUT, /**< timeout for reading from a stream (not supported on win32, integer) */ + MPG123_REMOVE_FLAGS, /**< remove some flags (inverse of MPG123_ADD_FLAGS, integer) */ + MPG123_RESYNC_LIMIT, /**< Try resync on frame parsing for that many bytes or until end of stream (<0 ... integer). This can enlarge the limit for skipping junk on beginning, too (but not reduce it). */ + MPG123_INDEX_SIZE /**< Set the frame index size (if supported). Values <0 mean that the index is allowed to grow dynamically in these steps (in positive direction, of course) -- Use this when you really want a full index with every individual frame. */ + ,MPG123_PREFRAMES /**< Decode/ignore that many frames in advance for layer 3. This is needed to fill bit reservoir after seeking, for example (but also at least one frame in advance is needed to have all "normal" data for layer 3). Give a positive integer value, please.*/ + ,MPG123_FEEDPOOL /**< For feeder mode, keep that many buffers in a pool to avoid frequent malloc/free. The pool is allocated on mpg123_open_feed(). If you change this parameter afterwards, you can trigger growth and shrinkage during decoding. The default value could change any time. If you care about this, then set it. (integer) */ + ,MPG123_FEEDBUFFER /**< Minimal size of one internal feeder buffer, again, the default value is subject to change. (integer) */ +}; + +/** Flag bits for MPG123_FLAGS, use the usual binary or to combine. */ +enum mpg123_param_flags +{ + MPG123_FORCE_MONO = 0x7 /**< 0111 Force some mono mode: This is a test bitmask for seeing if any mono forcing is active. */ + ,MPG123_MONO_LEFT = 0x1 /**< 0001 Force playback of left channel only. */ + ,MPG123_MONO_RIGHT = 0x2 /**< 0010 Force playback of right channel only. */ + ,MPG123_MONO_MIX = 0x4 /**< 0100 Force playback of mixed mono. */ + ,MPG123_FORCE_STEREO = 0x8 /**< 1000 Force stereo output. */ + ,MPG123_FORCE_8BIT = 0x10 /**< 00010000 Force 8bit formats. */ + ,MPG123_QUIET = 0x20 /**< 00100000 Suppress any printouts (overrules verbose). */ + ,MPG123_GAPLESS = 0x40 /**< 01000000 Enable gapless decoding (default on if libmpg123 has support). */ + ,MPG123_NO_RESYNC = 0x80 /**< 10000000 Disable resync stream after error. */ + ,MPG123_SEEKBUFFER = 0x100 /**< 000100000000 Enable small buffer on non-seekable streams to allow some peek-ahead (for better MPEG sync). */ + ,MPG123_FUZZY = 0x200 /**< 001000000000 Enable fuzzy seeks (guessing byte offsets or using approximate seek points from Xing TOC) */ + ,MPG123_FORCE_FLOAT = 0x400 /**< 010000000000 Force floating point output (32 or 64 bits depends on mpg123 internal precision). */ + ,MPG123_PLAIN_ID3TEXT = 0x800 /**< 100000000000 Do not translate ID3 text data to UTF-8. ID3 strings will contain the raw text data, with the first byte containing the ID3 encoding code. */ + ,MPG123_IGNORE_STREAMLENGTH = 0x1000 /**< 1000000000000 Ignore any stream length information contained in the stream, which can be contained in a 'TLEN' frame of an ID3v2 tag or a Xing tag */ + ,MPG123_SKIP_ID3V2 = 0x2000 /**< 10 0000 0000 0000 Do not parse ID3v2 tags, just skip them. */ + ,MPG123_IGNORE_INFOFRAME = 0x4000 /**< 100 0000 0000 0000 Do not parse the LAME/Xing info frame, treat it as normal MPEG data. */ + ,MPG123_AUTO_RESAMPLE = 0x8000 /**< 1000 0000 0000 0000 Allow automatic internal resampling of any kind (default on if supported). Especially when going lowlevel with replacing output buffer, you might want to unset this flag. Setting MPG123_DOWNSAMPLE or MPG123_FORCE_RATE will override this. */ + ,MPG123_PICTURE = 0x10000 /**< 17th bit: Enable storage of pictures from tags (ID3v2 APIC). */ + ,MPG123_NO_PEEK_END = 0x20000 /**< 18th bit: Do not seek to the end of + * the stream in order to probe + * the stream length and search for the id3v1 field. This also means + * the file size is unknown unless set using mpg123_set_filesize() and + * the stream is assumed as non-seekable unless overridden. + */ + ,MPG123_FORCE_SEEKABLE = 0x40000 /**< 19th bit: Force the stream to be seekable. */ +}; + +/** choices for MPG123_RVA */ +enum mpg123_param_rva +{ + MPG123_RVA_OFF = 0 /**< RVA disabled (default). */ + ,MPG123_RVA_MIX = 1 /**< Use mix/track/radio gain. */ + ,MPG123_RVA_ALBUM = 2 /**< Use album/audiophile gain */ + ,MPG123_RVA_MAX = MPG123_RVA_ALBUM /**< The maximum RVA code, may increase in future. */ +}; + +/** Set a specific parameter, for a specific mpg123_handle, using a parameter + * type key chosen from the mpg123_parms enumeration, to the specified value. + * \param mh handle + * \param type parameter choice + * \param value integer value + * \param fvalue floating point value + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_param( mpg123_handle *mh +, enum mpg123_parms type, long value, double fvalue ); + +/** Get a specific parameter, for a specific mpg123_handle. + * See the mpg123_parms enumeration for a list of available parameters. + * \param mh handle + * \param type parameter choice + * \param value integer value return address + * \param fvalue floating point value return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getparam( mpg123_handle *mh +, enum mpg123_parms type, long *value, double *fvalue ); + +/** Feature set available for query with mpg123_feature. */ +enum mpg123_feature_set +{ + MPG123_FEATURE_ABI_UTF8OPEN = 0 /**< mpg123 expects path names to be given in UTF-8 encoding instead of plain native. */ + ,MPG123_FEATURE_OUTPUT_8BIT /**< 8bit output */ + ,MPG123_FEATURE_OUTPUT_16BIT /**< 16bit output */ + ,MPG123_FEATURE_OUTPUT_32BIT /**< 32bit output */ + ,MPG123_FEATURE_INDEX /**< support for building a frame index for accurate seeking */ + ,MPG123_FEATURE_PARSE_ID3V2 /**< id3v2 parsing */ + ,MPG123_FEATURE_DECODE_LAYER1 /**< mpeg layer-1 decoder enabled */ + ,MPG123_FEATURE_DECODE_LAYER2 /**< mpeg layer-2 decoder enabled */ + ,MPG123_FEATURE_DECODE_LAYER3 /**< mpeg layer-3 decoder enabled */ + ,MPG123_FEATURE_DECODE_ACCURATE /**< accurate decoder rounding */ + ,MPG123_FEATURE_DECODE_DOWNSAMPLE /**< downsample (sample omit) */ + ,MPG123_FEATURE_DECODE_NTOM /**< flexible rate decoding */ + ,MPG123_FEATURE_PARSE_ICY /**< ICY support */ + ,MPG123_FEATURE_TIMEOUT_READ /**< Reader with timeout (network). */ + ,MPG123_FEATURE_EQUALIZER /**< tunable equalizer */ +}; + +/** Query libmpg123 features. + * \param key feature selection + * \return 1 for success, 0 for unimplemented functions + */ +MPG123_EXPORT int mpg123_feature(const enum mpg123_feature_set key); + +/* @} */ + + +/** \defgroup mpg123_error mpg123 error handling + * + * Functions to get text version of the error numbers and an enumeration + * of the error codes returned by libmpg123. + * + * Most functions operating on a mpg123_handle simply return MPG123_OK (0) + * on success and MPG123_ERR (-1) on failure, setting the internal error + * variable of the handle to the specific error code. If there was not a valid + * (non-NULL) handle provided to a function operating on one, MPG123_BAD_HANDLE + * may be returned if this can not be confused with a valid positive return + * value. + * Meaning: A function expected to return positive integers on success will + * always indicate error or a special condition by returning a negative one. + * + * Decoding/seek functions may also return message codes MPG123_DONE, + * MPG123_NEW_FORMAT and MPG123_NEED_MORE (all negative, see below on how to + * react). Note that calls to those can be nested, so generally watch out + * for these codes after initial handle setup. + * Especially any function that needs information about the current stream + * to work will try to at least parse the beginning if that did not happen + * yet. + * + * On a function that is supposed to return MPG123_OK on success and + * MPG123_ERR on failure, make sure you check for != MPG123_OK, not + * == MPG123_ERR, as the error code could get more specific in future, + * or there is just a special message from a decoding routine as indicated + * above. + * + * @{ + */ + +/** Enumeration of the message and error codes and returned by libmpg123 functions. */ +enum mpg123_errors +{ + MPG123_DONE=-12, /**< Message: Track ended. Stop decoding. */ + MPG123_NEW_FORMAT=-11, /**< Message: Output format will be different on next call. Note that some libmpg123 versions between 1.4.3 and 1.8.0 insist on you calling mpg123_getformat() after getting this message code. Newer verisons behave like advertised: You have the chance to call mpg123_getformat(), but you can also just continue decoding and get your data. */ + MPG123_NEED_MORE=-10, /**< Message: For feed reader: "Feed me more!" (call mpg123_feed() or mpg123_decode() with some new input data). */ + MPG123_ERR=-1, /**< Generic Error */ + MPG123_OK=0, /**< Success */ + MPG123_BAD_OUTFORMAT, /**< Unable to set up output format! */ + MPG123_BAD_CHANNEL, /**< Invalid channel number specified. */ + MPG123_BAD_RATE, /**< Invalid sample rate specified. */ + MPG123_ERR_16TO8TABLE, /**< Unable to allocate memory for 16 to 8 converter table! */ + MPG123_BAD_PARAM, /**< Bad parameter id! */ + MPG123_BAD_BUFFER, /**< Bad buffer given -- invalid pointer or too small size. */ + MPG123_OUT_OF_MEM, /**< Out of memory -- some malloc() failed. */ + MPG123_NOT_INITIALIZED, /**< You didn't initialize the library! */ + MPG123_BAD_DECODER, /**< Invalid decoder choice. */ + MPG123_BAD_HANDLE, /**< Invalid mpg123 handle. */ + MPG123_NO_BUFFERS, /**< Unable to initialize frame buffers (out of memory?). */ + MPG123_BAD_RVA, /**< Invalid RVA mode. */ + MPG123_NO_GAPLESS, /**< This build doesn't support gapless decoding. */ + MPG123_NO_SPACE, /**< Not enough buffer space. */ + MPG123_BAD_TYPES, /**< Incompatible numeric data types. */ + MPG123_BAD_BAND, /**< Bad equalizer band. */ + MPG123_ERR_NULL, /**< Null pointer given where valid storage address needed. */ + MPG123_ERR_READER, /**< Error reading the stream. */ + MPG123_NO_SEEK_FROM_END,/**< Cannot seek from end (end is not known). */ + MPG123_BAD_WHENCE, /**< Invalid 'whence' for seek function.*/ + MPG123_NO_TIMEOUT, /**< Build does not support stream timeouts. */ + MPG123_BAD_FILE, /**< File access error. */ + MPG123_NO_SEEK, /**< Seek not supported by stream. */ + MPG123_NO_READER, /**< No stream opened. */ + MPG123_BAD_PARS, /**< Bad parameter handle. */ + MPG123_BAD_INDEX_PAR, /**< Bad parameters to mpg123_index() and mpg123_set_index() */ + MPG123_OUT_OF_SYNC, /**< Lost track in bytestream and did not try to resync. */ + MPG123_RESYNC_FAIL, /**< Resync failed to find valid MPEG data. */ + MPG123_NO_8BIT, /**< No 8bit encoding possible. */ + MPG123_BAD_ALIGN, /**< Stack aligmnent error */ + MPG123_NULL_BUFFER, /**< NULL input buffer with non-zero size... */ + MPG123_NO_RELSEEK, /**< Relative seek not possible (screwed up file offset) */ + MPG123_NULL_POINTER, /**< You gave a null pointer somewhere where you shouldn't have. */ + MPG123_BAD_KEY, /**< Bad key value given. */ + MPG123_NO_INDEX, /**< No frame index in this build. */ + MPG123_INDEX_FAIL, /**< Something with frame index went wrong. */ + MPG123_BAD_DECODER_SETUP, /**< Something prevents a proper decoder setup */ + MPG123_MISSING_FEATURE /**< This feature has not been built into libmpg123. */ + ,MPG123_BAD_VALUE /**< A bad value has been given, somewhere. */ + ,MPG123_LSEEK_FAILED /**< Low-level seek failed. */ + ,MPG123_BAD_CUSTOM_IO /**< Custom I/O not prepared. */ + ,MPG123_LFS_OVERFLOW /**< Offset value overflow during translation of large file API calls -- your client program cannot handle that large file. */ + ,MPG123_INT_OVERFLOW /**< Some integer overflow. */ +}; + +/** Look up error strings given integer code. + * \param errcode integer error code + * \return string describing what that error error code means + */ +MPG123_EXPORT const char* mpg123_plain_strerror(int errcode); + +/** Give string describing what error has occured in the context of handle mh. + * When a function operating on an mpg123 handle returns MPG123_ERR, you should check for the actual reason via + * char *errmsg = mpg123_strerror(mh) + * This function will catch mh == NULL and return the message for MPG123_BAD_HANDLE. + * \param mh handle + * \return error message + */ +MPG123_EXPORT const char* mpg123_strerror(mpg123_handle *mh); + +/** Return the plain errcode intead of a string. + * \param mh handle + * \return error code recorded in handle or MPG123_BAD_HANDLE + */ +MPG123_EXPORT int mpg123_errcode(mpg123_handle *mh); + +/*@}*/ + + +/** \defgroup mpg123_decoder mpg123 decoder selection + * + * Functions to list and select the available decoders. + * Perhaps the most prominent feature of mpg123: You have several (optimized) decoders to choose from (on x86 and PPC (MacOS) systems, that is). + * + * @{ + */ + +/** Get available decoder list. + * \return NULL-terminated array of generally available decoder names (plain 8bit ASCII) + */ +MPG123_EXPORT const char **mpg123_decoders(void); + +/** Get supported decoder list. + * \return NULL-terminated array of the decoders supported by the CPU (plain 8bit ASCII) + */ +MPG123_EXPORT const char **mpg123_supported_decoders(void); + +/** Set the active decoder. + * \param mh handle + * \param decoder_name name of decoder + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_decoder(mpg123_handle *mh, const char* decoder_name); + +/** Get the currently active decoder name. + * The active decoder engine can vary depening on output constraints, + * mostly non-resampling, integer output is accelerated via 3DNow & Co. but for + * other modes a fallback engine kicks in. + * Note that this can return a decoder that is only active in the hidden and not + * available as decoder choice from the outside. + * \param mh handle + * \return The decoder name or NULL on error. + */ +MPG123_EXPORT const char* mpg123_current_decoder(mpg123_handle *mh); + +/*@}*/ + + +/** \defgroup mpg123_output mpg123 output audio format + * + * Functions to get and select the format of the decoded audio. + * + * Before you dive in, please be warned that you might get confused by this. This seems to happen a lot, therefore I am trying to explain in advance. + * + * The mpg123 library decides what output format to use when encountering the first frame in a stream, or actually any frame that is still valid but differs from the frames before in the prompted output format. At such a deciding point, an internal table of allowed encodings, sampling rates and channel setups is consulted. According to this table, an output format is chosen and the decoding engine set up accordingly (including optimized routines for different output formats). This might seem unusual but it just follows from the non-existence of "MPEG audio files" with defined overall properties. There are streams, streams are concatenations of (semi) independent frames. We store streams on disk and call them "MPEG audio files", but that does not change their nature as the decoder is concerned (the LAME/Xing header for gapless decoding makes things interesting again). + * + * To get to the point: What you do with mpg123_format() and friends is to fill the internal table of allowed formats before it is used. That includes removing support for some formats or adding your forced sample rate (see MPG123_FORCE_RATE) that will be used with the crude internal resampler. Also keep in mind that the sample encoding is just a question of choice -- the MPEG frames do only indicate their native sampling rate and channel count. If you want to decode to integer or float samples, 8 or 16 bit ... that is your decision. In a "clean" world, libmpg123 would always decode to 32 bit float and let you handle any sample conversion. But there are optimized routines that work faster by directly decoding to the desired encoding / accuracy. We prefer efficiency over conceptual tidyness. + * + * People often start out thinking that mpg123_format() should change the actual decoding format on the fly. That is wrong. It only has effect on the next natural change of output format, when libmpg123 will consult its format table again. To make life easier, you might want to call mpg123_format_none() before any thing else and then just allow one desired encoding and a limited set of sample rates / channel choices that you actually intend to deal with. You can force libmpg123 to decode everything to 44100 KHz, stereo, 16 bit integer ... it will duplicate mono channels and even do resampling if needed (unless that feature is disabled in the build, same with some encodings). But I have to stress that the resampling of libmpg123 is very crude and doesn't even contain any kind of "proper" interpolation. + * + * In any case, watch out for MPG123_NEW_FORMAT as return message from decoding routines and call mpg123_getformat() to get the currently active output format. + * + * @{ + */ + +/** They can be combined into one number (3) to indicate mono and stereo... */ +enum mpg123_channelcount +{ + MPG123_MONO = 1 /**< mono */ + ,MPG123_STEREO = 2 /**< stereo */ +}; + +/** An array of supported standard sample rates + * These are possible native sample rates of MPEG audio files. + * You can still force mpg123 to resample to a different one, but by default you will only get audio in one of these samplings. + * \param list Store a pointer to the sample rates array there. + * \param number Store the number of sample rates there. */ +MPG123_EXPORT void mpg123_rates(const long **list, size_t *number); + +/** An array of supported audio encodings. + * An audio encoding is one of the fully qualified members of mpg123_enc_enum (MPG123_ENC_SIGNED_16, not MPG123_SIGNED). + * \param list Store a pointer to the encodings array there. + * \param number Store the number of encodings there. */ +MPG123_EXPORT void mpg123_encodings(const int **list, size_t *number); + +/** Return the size (in bytes) of one mono sample of the named encoding. + * \param encoding The encoding value to analyze. + * \return positive size of encoding in bytes, 0 on invalid encoding. */ +MPG123_EXPORT int mpg123_encsize(int encoding); + +/** Configure a mpg123 handle to accept no output format at all, + * use before specifying supported formats with mpg123_format + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_format_none(mpg123_handle *mh); + +/** Configure mpg123 handle to accept all formats + * (also any custom rate you may set) -- this is default. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_format_all(mpg123_handle *mh); + +/** Set the audio format support of a mpg123_handle in detail: + * \param mh handle + * \param rate The sample rate value (in Hertz). + * \param channels A combination of MPG123_STEREO and MPG123_MONO. + * \param encodings A combination of accepted encodings for rate and channels, p.ex MPG123_ENC_SIGNED16 | MPG123_ENC_ULAW_8 (or 0 for no support). Please note that some encodings may not be supported in the library build and thus will be ignored here. + * \return MPG123_OK on success, MPG123_ERR if there was an error. */ +MPG123_EXPORT int mpg123_format( mpg123_handle *mh +, long rate, int channels, int encodings ); + +/** Check to see if a specific format at a specific rate is supported + * by mpg123_handle. + * \param mh handle + * \param rate sampling rate + * \param encoding encoding + * \return 0 for no support (that includes invalid parameters), MPG123_STEREO, + * MPG123_MONO or MPG123_STEREO|MPG123_MONO. */ +MPG123_EXPORT int mpg123_format_support( mpg123_handle *mh +, long rate, int encoding ); + +/** Get the current output format written to the addresses given. + * If the stream is freshly loaded, this will try to parse enough + * of it to give you the format to come. This clears the flag that + * would otherwise make the first decoding call return + * MPG123_NEW_FORMAT. + * \param mh handle + * \param rate sampling rate return address + * \param channels channel count return address + * \param encoding encoding return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getformat( mpg123_handle *mh +, long *rate, int *channels, int *encoding ); + +/** Get the current output format written to the addresses given. + * This differs from plain mpg123_getformat() in that you can choose + * _not_ to clear the flag that would trigger the next decoding call + * to return MPG123_NEW_FORMAT in case of a new format arriving. + * \param mh handle + * \param rate sampling rate return address + * \param channels channel count return address + * \param encoding encoding return address + * \param clear_flag if true, clear internal format flag + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getformat2( mpg123_handle *mh +, long *rate, int *channels, int *encoding, int clear_flag ); + +/*@}*/ + + +/** \defgroup mpg123_input mpg123 file input and decoding + * + * Functions for input bitstream and decoding operations. + * Decoding/seek functions may also return message codes MPG123_DONE, MPG123_NEW_FORMAT and MPG123_NEED_MORE (please read up on these on how to react!). + * @{ + */ + +/* reading samples / triggering decoding, possible return values: */ +/** Enumeration of the error codes returned by libmpg123 functions. */ + +/** Open and prepare to decode the specified file by filesystem path. + * This does not open HTTP urls; libmpg123 contains no networking code. + * If you want to decode internet streams, use mpg123_open_fd() or mpg123_open_feed(). + * \param mh handle + * \param path filesystem path + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open(mpg123_handle *mh, const char *path); + +/** Use an already opened file descriptor as the bitstream input + * mpg123_close() will _not_ close the file descriptor. + * \param mh handle + * \param fd file descriptor + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open_fd(mpg123_handle *mh, int fd); + +/** Use an opaque handle as bitstream input. This works only with the + * replaced I/O from mpg123_replace_reader_handle()! + * mpg123_close() will call the cleanup callback for your handle (if you gave one). + * \param mh handle + * \param iohandle your handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open_handle(mpg123_handle *mh, void *iohandle); + +/** Open a new bitstream and prepare for direct feeding + * This works together with mpg123_decode(); you are responsible for reading and feeding the input bitstream. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open_feed(mpg123_handle *mh); + +/** Closes the source, if libmpg123 opened it. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_close(mpg123_handle *mh); + +/** Read from stream and decode up to outmemsize bytes. + * \param mh handle + * \param outmemory address of output buffer to write to + * \param outmemsize maximum number of bytes to write + * \param done address to store the number of actually decoded bytes to + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_read(mpg123_handle *mh +, unsigned char *outmemory, size_t outmemsize, size_t *done ); + +/** Feed data for a stream that has been opened with mpg123_open_feed(). + * It's give and take: You provide the bytestream, mpg123 gives you the decoded samples. + * \param mh handle + * \param in input buffer + * \param size number of input bytes + * \return MPG123_OK or error/message code. + */ +MPG123_EXPORT int mpg123_feed( mpg123_handle *mh +, const unsigned char *in, size_t size ); + +/** Decode MPEG Audio from inmemory to outmemory. + * This is very close to a drop-in replacement for old mpglib. + * When you give zero-sized output buffer the input will be parsed until + * decoded data is available. This enables you to get MPG123_NEW_FORMAT (and query it) + * without taking decoded data. + * Think of this function being the union of mpg123_read() and mpg123_feed() (which it actually is, sort of;-). + * You can actually always decide if you want those specialized functions in separate steps or one call this one here. + * \param mh handle + * \param inmemory input buffer + * \param inmemsize number of input bytes + * \param outmemory output buffer + * \param outmemsize maximum number of output bytes + * \param done address to store the number of actually decoded bytes to + * \return error/message code (watch out especially for MPG123_NEED_MORE) + */ +MPG123_EXPORT int mpg123_decode( mpg123_handle *mh +, const unsigned char *inmemory, size_t inmemsize +, unsigned char *outmemory, size_t outmemsize, size_t *done ); + +/** Decode next MPEG frame to internal buffer + * or read a frame and return after setting a new format. + * \param mh handle + * \param num current frame offset gets stored there + * \param audio This pointer is set to the internal buffer to read the decoded audio from. + * \param bytes number of output bytes ready in the buffer + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_decode_frame( mpg123_handle *mh +, off_t *num, unsigned char **audio, size_t *bytes ); + +/** Decode current MPEG frame to internal buffer. + * Warning: This is experimental API that might change in future releases! + * Please watch mpg123 development closely when using it. + * \param mh handle + * \param num last frame offset gets stored there + * \param audio this pointer is set to the internal buffer to read the decoded audio from. + * \param bytes number of output bytes ready in the buffer + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_framebyframe_decode( mpg123_handle *mh +, off_t *num, unsigned char **audio, size_t *bytes ); + +/** Find, read and parse the next mp3 frame + * Warning: This is experimental API that might change in future releases! + * Please watch mpg123 development closely when using it. + * \param mh handle + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_framebyframe_next(mpg123_handle *mh); + +/** Get access to the raw input data for the last parsed frame. + * This gives you a direct look (and write access) to the frame body data. + * Together with the raw header, you can reconstruct the whole raw MPEG stream without junk and meta data, or play games by actually modifying the frame body data before decoding this frame (mpg123_framebyframe_decode()). + * A more sane use would be to use this for CRC checking (see mpg123_info() and MPG123_CRC), the first two bytes of the body make up the CRC16 checksum, if present. + * You can provide NULL for a parameter pointer when you are not interested in the value. + * + * \param mh handle + * \param header the 4-byte MPEG header + * \param bodydata pointer to the frame body stored in the handle (without the header) + * \param bodybytes size of frame body in bytes (without the header) + * \return MPG123_OK if there was a yet un-decoded frame to get the + * data from, MPG123_BAD_HANDLE or MPG123_ERR otherwise (without further + * explanation, the error state of the mpg123_handle is not modified by + * this function). + */ +MPG123_EXPORT int mpg123_framedata( mpg123_handle *mh +, unsigned long *header, unsigned char **bodydata, size_t *bodybytes ); + +/** Get the input position (byte offset in stream) of the last parsed frame. + * This can be used for external seek index building, for example. + * It just returns the internally stored offset, regardless of validity -- + * you ensure that a valid frame has been parsed before! + * \param mh handle + * \return byte offset in stream + */ +MPG123_EXPORT off_t mpg123_framepos(mpg123_handle *mh); + +/*@}*/ + + +/** \defgroup mpg123_seek mpg123 position and seeking + * + * Functions querying and manipulating position in the decoded audio bitstream. + * The position is measured in decoded audio samples, or MPEG frame offset for the specific functions. + * If gapless code is in effect, the positions are adjusted to compensate the skipped padding/delay - meaning, you should not care about that at all and just use the position defined for the samples you get out of the decoder;-) + * The general usage is modelled after stdlib's ftell() and fseek(). + * Especially, the whence parameter for the seek functions has the same meaning as the one for fseek() and needs the same constants from stdlib.h: + * - SEEK_SET: set position to (or near to) specified offset + * - SEEK_CUR: change position by offset from now + * - SEEK_END: set position to offset from end + * + * Note that sample-accurate seek only works when gapless support has been enabled at compile time; seek is frame-accurate otherwise. + * Also, really sample-accurate seeking (meaning that you get the identical sample value after seeking compared to plain decoding up to the position) is only guaranteed when you do not mess with the position code by using MPG123_UPSPEED, MPG123_DOWNSPEED or MPG123_START_FRAME. The first two mainly should cause trouble with NtoM resampling, but in any case with these options in effect, you have to keep in mind that the sample offset is not the same as counting the samples you get from decoding since mpg123 counts the skipped samples, too (or the samples played twice only once)! + * Short: When you care about the sample position, don't mess with those parameters;-) + * Also, seeking is not guaranteed to work for all streams (underlying stream may not support it). + * And yet another caveat: If the stream is concatenated out of differing pieces (Frankenstein stream), seeking may suffer, too. + * + * @{ + */ + +/** Returns the current position in samples. + * On the next successful read, you'd get that sample. + * \param mh handle + * \return sample offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tell(mpg123_handle *mh); + +/** Returns the frame number that the next read will give you data from. + * \param mh handle + * \return frame offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tellframe(mpg123_handle *mh); + +/** Returns the current byte offset in the input stream. + * \param mh handle + * \return byte offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tell_stream(mpg123_handle *mh); + +/** Seek to a desired sample offset. + * Usage is modelled afer the standard lseek(). + * \param mh handle + * \param sampleoff offset in PCM samples + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END + * \return The resulting offset >= 0 or error/message code + */ +MPG123_EXPORT off_t mpg123_seek( mpg123_handle *mh +, off_t sampleoff, int whence ); + +/** Seek to a desired sample offset in data feeding mode. + * This just prepares things to be right only if you ensure that the next chunk of input data will be from input_offset byte position. + * \param mh handle + * \param sampleoff offset in PCM samples + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END + * \param input_offset The position it expects to be at the + * next time data is fed to mpg123_decode(). + * \return The resulting offset >= 0 or error/message code */ +MPG123_EXPORT off_t mpg123_feedseek( mpg123_handle *mh +, off_t sampleoff, int whence, off_t *input_offset ); + +/** Seek to a desired MPEG frame offset. + * Usage is modelled afer the standard lseek(). + * \param mh handle + * \param frameoff offset in MPEG frames + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END + * \return The resulting offset >= 0 or error/message code */ +MPG123_EXPORT off_t mpg123_seek_frame( mpg123_handle *mh +, off_t frameoff, int whence ); + +/** Return a MPEG frame offset corresponding to an offset in seconds. + * This assumes that the samples per frame do not change in the file/stream, which is a good assumption for any sane file/stream only. + * \return frame offset >= 0 or error/message code */ +MPG123_EXPORT off_t mpg123_timeframe(mpg123_handle *mh, double sec); + +/** Give access to the frame index table that is managed for seeking. + * You are asked not to modify the values... Use mpg123_set_index to set the + * seek index + * \param mh handle + * \param offsets pointer to the index array + * \param step one index byte offset advances this many MPEG frames + * \param fill number of recorded index offsets; size of the array + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_index( mpg123_handle *mh +, off_t **offsets, off_t *step, size_t *fill ); + +/** Set the frame index table + * Setting offsets to NULL and fill > 0 will allocate fill entries. Setting offsets + * to NULL and fill to 0 will clear the index and free the allocated memory used by the index. + * \param mh handle + * \param offsets pointer to the index array + * \param step one index byte offset advances this many MPEG frames + * \param fill number of recorded index offsets; size of the array + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_set_index( mpg123_handle *mh +, off_t *offsets, off_t step, size_t fill ); + +/** An old crutch to keep old mpg123 binaries happy. + * WARNING: This function is there only to avoid runtime linking errors with + * standalone mpg123 before version 1.23.0 (if you strangely update the + * library but not the end-user program) and actually is broken + * for various cases (p.ex. 24 bit output). Do never use. It might eventually + * be purged from the library. + */ +MPG123_EXPORT int mpg123_position( mpg123_handle *mh, off_t frame_offset, off_t buffered_bytes, off_t *current_frame, off_t *frames_left, double *current_seconds, double *seconds_left); + +/*@}*/ + + +/** \defgroup mpg123_voleq mpg123 volume and equalizer + * + * @{ + */ + +/** another channel enumeration, for left/right choice */ +enum mpg123_channels +{ + MPG123_LEFT=0x1 /**< The Left Channel. */ + ,MPG123_RIGHT=0x2 /**< The Right Channel. */ + ,MPG123_LR=0x3 /**< Both left and right channel; same as MPG123_LEFT|MPG123_RIGHT */ +}; + +/** Set the 32 Band Audio Equalizer settings. + * \param mh handle + * \param channel Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for both. + * \param band The equaliser band to change (from 0 to 31) + * \param val The (linear) adjustment factor. + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_eq( mpg123_handle *mh +, enum mpg123_channels channel, int band, double val ); + +/** Get the 32 Band Audio Equalizer settings. + * \param mh handle + * \param channel Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for (arithmetic mean of) both. + * \param band The equaliser band to change (from 0 to 31) + * \return The (linear) adjustment factor (zero for pad parameters) */ +MPG123_EXPORT double mpg123_geteq(mpg123_handle *mh + , enum mpg123_channels channel, int band); + +/** Reset the 32 Band Audio Equalizer settings to flat + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_reset_eq(mpg123_handle *mh); + +/** Set the absolute output volume including the RVA setting, + * vol<0 just applies (a possibly changed) RVA setting. + * \param mh handle + * \param vol volume value (linear factor) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_volume(mpg123_handle *mh, double vol); + +/** Adjust output volume including the RVA setting by chosen amount + * \param mh handle + * \param change volume value (linear factor increment) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_volume_change(mpg123_handle *mh, double change); + +/** Return current volume setting, the actual value due to RVA, and the RVA + * adjustment itself. It's all as double float value to abstract the sample + * format. The volume values are linear factors / amplitudes (not percent) + * and the RVA value is in decibels. + * \param mh handle + * \param base return address for base volume (linear factor) + * \param really return address for actual volume (linear factor) + * \param rva_db return address for RVA value (decibels) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getvolume(mpg123_handle *mh, double *base, double *really, double *rva_db); + +/* TODO: Set some preamp in addition / to replace internal RVA handling? */ + +/*@}*/ + + +/** \defgroup mpg123_status mpg123 status and information + * + * @{ + */ + +/** Enumeration of the mode types of Variable Bitrate */ +enum mpg123_vbr { + MPG123_CBR=0, /**< Constant Bitrate Mode (default) */ + MPG123_VBR, /**< Variable Bitrate Mode */ + MPG123_ABR /**< Average Bitrate Mode */ +}; + +/** Enumeration of the MPEG Versions */ +enum mpg123_version { + MPG123_1_0=0, /**< MPEG Version 1.0 */ + MPG123_2_0, /**< MPEG Version 2.0 */ + MPG123_2_5 /**< MPEG Version 2.5 */ +}; + + +/** Enumeration of the MPEG Audio mode. + * Only the mono mode has 1 channel, the others have 2 channels. */ +enum mpg123_mode { + MPG123_M_STEREO=0, /**< Standard Stereo. */ + MPG123_M_JOINT, /**< Joint Stereo. */ + MPG123_M_DUAL, /**< Dual Channel. */ + MPG123_M_MONO /**< Single Channel. */ +}; + + +/** Enumeration of the MPEG Audio flag bits */ +enum mpg123_flags { + MPG123_CRC=0x1, /**< The bitstream is error protected using 16-bit CRC. */ + MPG123_COPYRIGHT=0x2, /**< The bitstream is copyrighted. */ + MPG123_PRIVATE=0x4, /**< The private bit has been set. */ + MPG123_ORIGINAL=0x8 /**< The bitstream is an original, not a copy. */ +}; + +/** Data structure for storing information about a frame of MPEG Audio */ +struct mpg123_frameinfo +{ + enum mpg123_version version; /**< The MPEG version (1.0/2.0/2.5). */ + int layer; /**< The MPEG Audio Layer (MP1/MP2/MP3). */ + long rate; /**< The sampling rate in Hz. */ + enum mpg123_mode mode; /**< The audio mode (Mono, Stereo, Joint-stero, Dual Channel). */ + int mode_ext; /**< The mode extension bit flag. */ + int framesize; /**< The size of the frame (in bytes, including header). */ + enum mpg123_flags flags; /**< MPEG Audio flag bits. Just now I realize that it should be declared as int, not enum. It's a bitwise combination of the enum values. */ + int emphasis; /**< The emphasis type. */ + int bitrate; /**< Bitrate of the frame (kbps). */ + int abr_rate; /**< The target average bitrate. */ + enum mpg123_vbr vbr; /**< The VBR mode. */ +}; + +/** Get frame information about the MPEG audio bitstream and store it in a mpg123_frameinfo structure. + * \param mh handle + * \param mi address of existing frameinfo structure to write to + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_info(mpg123_handle *mh, struct mpg123_frameinfo *mi); + +/** Get the safe output buffer size for all cases + * (when you want to replace the internal buffer) + * \return safe buffer size + */ +MPG123_EXPORT size_t mpg123_safe_buffer(void); + +/** Make a full parsing scan of each frame in the file. ID3 tags are found. An + * accurate length value is stored. Seek index will be filled. A seek back to + * current position is performed. At all, this function refuses work when + * stream is not seekable. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_scan(mpg123_handle *mh); + +/** Return, if possible, the full (expected) length of current track in frames. + * \param mh handle + * \return length >= 0 or MPG123_ERR if there is no length guess possible. + */ +MPG123_EXPORT off_t mpg123_framelength(mpg123_handle *mh); + +/** Return, if possible, the full (expected) length of current track in samples. + * \param mh handle + * \return length >= 0 or MPG123_ERR if there is no length guess possible. + */ +MPG123_EXPORT off_t mpg123_length(mpg123_handle *mh); + +/** Override the value for file size in bytes. + * Useful for getting sensible track length values in feed mode or for HTTP streams. + * \param mh handle + * \param size file size in bytes + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_set_filesize(mpg123_handle *mh, off_t size); + +/** Get MPEG frame duration in seconds. + * \param mh handle + * \return frame duration in seconds, <0 on error + */ +MPG123_EXPORT double mpg123_tpf(mpg123_handle *mh); + +/** Get MPEG frame duration in samples. + * \param mh handle + * \return samples per frame for the most recently parsed frame; <0 on errors + */ +MPG123_EXPORT int mpg123_spf(mpg123_handle *mh); + +/** Get and reset the clip count. + * \param mh handle + * \return count of clipped samples + */ +MPG123_EXPORT long mpg123_clip(mpg123_handle *mh); + + +/** The key values for state information from mpg123_getstate(). */ +enum mpg123_state +{ + MPG123_ACCURATE = 1 /**< Query if positons are currently accurate (integer value, 0 if false, 1 if true). */ + ,MPG123_BUFFERFILL /**< Get fill of internal (feed) input buffer as integer byte count returned as long and as double. An error is returned on integer overflow while converting to (signed) long, but the returned floating point value shold still be fine. */ + ,MPG123_FRANKENSTEIN /**< Stream consists of carelessly stitched together files. Seeking may yield unexpected results (also with MPG123_ACCURATE, it may be confused). */ + ,MPG123_FRESH_DECODER /**< Decoder structure has been updated, possibly indicating changed stream (integer value, 0 if false, 1 if true). Flag is cleared after retrieval. */ +}; + +/** Get various current decoder/stream state information. + * \param mh handle + * \param key the key to identify the information to give. + * \param val the address to return (long) integer values to + * \param fval the address to return floating point values to + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getstate( mpg123_handle *mh +, enum mpg123_state key, long *val, double *fval ); + +/*@}*/ + + +/** \defgroup mpg123_metadata mpg123 metadata handling + * + * Functions to retrieve the metadata from MPEG Audio files and streams. + * Also includes string handling functions. + * + * @{ + */ + +/** Data structure for storing strings in a safer way than a standard C-String. + * Can also hold a number of null-terminated strings. */ +typedef struct +{ + char* p; /**< pointer to the string data */ + size_t size; /**< raw number of bytes allocated */ + size_t fill; /**< number of used bytes (including closing zero byte) */ +} mpg123_string; + +/** Create and allocate memory for a new mpg123_string + * \param sb string handle (address of existing structure on your side) + */ +MPG123_EXPORT void mpg123_init_string(mpg123_string* sb); + +/** Free-up mempory for an existing mpg123_string + * \param sb string handle + */ +MPG123_EXPORT void mpg123_free_string(mpg123_string* sb); + +/** Change the size of a mpg123_string + * \param sb string handle + * \param news new size in bytes + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_resize_string(mpg123_string* sb, size_t news); + +/** Increase size of a mpg123_string if necessary (it may stay larger). + * Note that the functions for adding and setting in current libmpg123 + * use this instead of mpg123_resize_string(). + * That way, you can preallocate memory and safely work afterwards with + * pieces. + * \param sb string handle + * \param news new minimum size + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_grow_string(mpg123_string* sb, size_t news); + +/** Copy the contents of one mpg123_string string to another. + * Yes the order of arguments is reversed compated to memcpy(). + * \param from string handle + * \param to string handle + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_copy_string(mpg123_string* from, mpg123_string* to); + +/** Append a C-String to an mpg123_string + * \param sb string handle + * \param stuff to append + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_add_string(mpg123_string* sb, const char* stuff); + +/** Append a C-substring to an mpg123 string + * \param sb string handle + * \param stuff content to copy + * \param from offset to copy from + * \param count number of characters to copy (a null-byte is always appended) + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_add_substring( mpg123_string *sb +, const char *stuff, size_t from, size_t count ); + +/** Set the content of a mpg123_string to a C-string + * \param sb string handle + * \param stuff content to copy + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_set_string(mpg123_string* sb, const char* stuff); + +/** Set the content of a mpg123_string to a C-substring + * \param sb string handle + * \param stuff the future content + * \param from offset to copy from + * \param count number of characters to copy (a null-byte is always appended) + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_set_substring( mpg123_string *sb +, const char *stuff, size_t from, size_t count ); + +/** Count characters in a mpg123 string (non-null bytes or UTF-8 characters). + * Even with the fill property, the character count is not obvious as there could be multiple trailing null bytes. + * \param sb string handle + * \param utf8 a flag to tell if the string is in utf8 encoding + * \return character count +*/ +MPG123_EXPORT size_t mpg123_strlen(mpg123_string *sb, int utf8); + +/** Remove trailing \\r and \\n, if present. + * \param sb string handle + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_chomp_string(mpg123_string *sb); + +/** The mpg123 text encodings. This contains encodings we encounter in ID3 tags or ICY meta info. */ +enum mpg123_text_encoding +{ + mpg123_text_unknown = 0 /**< Unkown encoding... mpg123_id3_encoding can return that on invalid codes. */ + ,mpg123_text_utf8 = 1 /**< UTF-8 */ + ,mpg123_text_latin1 = 2 /**< ISO-8859-1. Note that sometimes latin1 in ID3 is abused for totally different encodings. */ + ,mpg123_text_icy = 3 /**< ICY metadata encoding, usually CP-1252 but we take it as UTF-8 if it qualifies as such. */ + ,mpg123_text_cp1252 = 4 /**< Really CP-1252 without any guessing. */ + ,mpg123_text_utf16 = 5 /**< Some UTF-16 encoding. The last of a set of leading BOMs (byte order mark) rules. + * When there is no BOM, big endian ordering is used. Note that UCS-2 qualifies as UTF-8 when + * you don't mess with the reserved code points. If you want to decode little endian data + * without BOM you need to prepend 0xff 0xfe yourself. */ + ,mpg123_text_utf16bom = 6 /**< Just an alias for UTF-16, ID3v2 has this as distinct code. */ + ,mpg123_text_utf16be = 7 /**< Another alias for UTF16 from ID3v2. Note, that, because of the mess that is reality, + * BOMs are used if encountered. There really is not much distinction between the UTF16 types for mpg123 + * One exception: Since this is seen in ID3v2 tags, leading null bytes are skipped for all other UTF16 + * types (we expect a BOM before real data there), not so for utf16be!*/ + ,mpg123_text_max = 7 /**< Placeholder for the maximum encoding value. */ +}; + +/** The encoding byte values from ID3v2. */ +enum mpg123_id3_enc +{ + mpg123_id3_latin1 = 0 /**< Note: This sometimes can mean anything in practice... */ + ,mpg123_id3_utf16bom = 1 /**< UTF16, UCS-2 ... it's all the same for practical purposes. */ + ,mpg123_id3_utf16be = 2 /**< Big-endian UTF-16, BOM see note for mpg123_text_utf16be. */ + ,mpg123_id3_utf8 = 3 /**< Our lovely overly ASCII-compatible 8 byte encoding for the world. */ + ,mpg123_id3_enc_max = 3 /**< Placeholder to check valid range of encoding byte. */ +}; + +/** Convert ID3 encoding byte to mpg123 encoding index. + * \param id3_enc_byte the ID3 encoding code + * \return the mpg123 encoding index + */ + +MPG123_EXPORT enum mpg123_text_encoding mpg123_enc_from_id3(unsigned char id3_enc_byte); + +/** Store text data in string, after converting to UTF-8 from indicated encoding + * A prominent error can be that you provided an unknown encoding value, or this build of libmpg123 lacks support for certain encodings (ID3 or ICY stuff missing). + * Also, you might want to take a bit of care with preparing the data; for example, strip leading zeroes (I have seen that). + * \param sb target string + * \param enc mpg123 text encoding value + * \param source source buffer with plain unsigned bytes (you might need to cast from signed char) + * \param source_size number of bytes in the source buffer + * \return 0 on error, 1 on success (on error, mpg123_free_string is called on sb) + */ +MPG123_EXPORT int mpg123_store_utf8(mpg123_string *sb, enum mpg123_text_encoding enc, const unsigned char *source, size_t source_size); + +/** Sub data structure for ID3v2, for storing various text fields (including comments). + * This is for ID3v2 COMM, TXXX and all the other text fields. + * Only COMM and TXXX have a description, only COMM and USLT have a language. + * You should consult the ID3v2 specification for the use of the various text fields ("frames" in ID3v2 documentation, I use "fields" here to separate from MPEG frames). */ +typedef struct +{ + char lang[3]; /**< Three-letter language code (not terminated). */ + char id[4]; /**< The ID3v2 text field id, like TALB, TPE2, ... (4 characters, no string termination). */ + mpg123_string description; /**< Empty for the generic comment... */ + mpg123_string text; /**< ... */ +} mpg123_text; + +/** The picture type values from ID3v2. */ +enum mpg123_id3_pic_type +{ + mpg123_id3_pic_other = 0 /**< see ID3v2 docs */ + ,mpg123_id3_pic_icon = 1 /**< see ID3v2 docs */ + ,mpg123_id3_pic_other_icon = 2 /**< see ID3v2 docs */ + ,mpg123_id3_pic_front_cover = 3 /**< see ID3v2 docs */ + ,mpg123_id3_pic_back_cover = 4 /**< see ID3v2 docs */ + ,mpg123_id3_pic_leaflet = 5 /**< see ID3v2 docs */ + ,mpg123_id3_pic_media = 6 /**< see ID3v2 docs */ + ,mpg123_id3_pic_lead = 7 /**< see ID3v2 docs */ + ,mpg123_id3_pic_artist = 8 /**< see ID3v2 docs */ + ,mpg123_id3_pic_conductor = 9 /**< see ID3v2 docs */ + ,mpg123_id3_pic_orchestra = 10 /**< see ID3v2 docs */ + ,mpg123_id3_pic_composer = 11 /**< see ID3v2 docs */ + ,mpg123_id3_pic_lyricist = 12 /**< see ID3v2 docs */ + ,mpg123_id3_pic_location = 13 /**< see ID3v2 docs */ + ,mpg123_id3_pic_recording = 14 /**< see ID3v2 docs */ + ,mpg123_id3_pic_performance = 15 /**< see ID3v2 docs */ + ,mpg123_id3_pic_video = 16 /**< see ID3v2 docs */ + ,mpg123_id3_pic_fish = 17 /**< see ID3v2 docs */ + ,mpg123_id3_pic_illustration = 18 /**< see ID3v2 docs */ + ,mpg123_id3_pic_artist_logo = 19 /**< see ID3v2 docs */ + ,mpg123_id3_pic_publisher_logo = 20 /**< see ID3v2 docs */ +}; + +/** Sub data structure for ID3v2, for storing picture data including comment. + * This is for the ID3v2 APIC field. You should consult the ID3v2 specification + * for the use of the APIC field ("frames" in ID3v2 documentation, I use "fields" + * here to separate from MPEG frames). */ +typedef struct +{ + char type; /**< mpg123_id3_pic_type value */ + mpg123_string description; /**< description string */ + mpg123_string mime_type; /**< MIME type */ + size_t size; /**< size in bytes */ + unsigned char* data; /**< pointer to the image data */ +} mpg123_picture; + +/** Data structure for storing IDV3v2 tags. + * This structure is not a direct binary mapping with the file contents. + * The ID3v2 text frames are allowed to contain multiple strings. + * So check for null bytes until you reach the mpg123_string fill. + * All text is encoded in UTF-8. */ +typedef struct +{ + unsigned char version; /**< 3 or 4 for ID3v2.3 or ID3v2.4. */ + mpg123_string *title; /**< Title string (pointer into text_list). */ + mpg123_string *artist; /**< Artist string (pointer into text_list). */ + mpg123_string *album; /**< Album string (pointer into text_list). */ + mpg123_string *year; /**< The year as a string (pointer into text_list). */ + mpg123_string *genre; /**< Genre String (pointer into text_list). The genre string(s) may very well need postprocessing, esp. for ID3v2.3. */ + mpg123_string *comment; /**< Pointer to last encountered comment text with empty description. */ + /* Encountered ID3v2 fields are appended to these lists. + There can be multiple occurences, the pointers above always point to the last encountered data. */ + mpg123_text *comment_list; /**< Array of comments. */ + size_t comments; /**< Number of comments. */ + mpg123_text *text; /**< Array of ID3v2 text fields (including USLT) */ + size_t texts; /**< Numer of text fields. */ + mpg123_text *extra; /**< The array of extra (TXXX) fields. */ + size_t extras; /**< Number of extra text (TXXX) fields. */ + mpg123_picture *picture; /**< Array of ID3v2 pictures fields (APIC). */ + size_t pictures; /**< Number of picture (APIC) fields. */ +} mpg123_id3v2; + +/** Data structure for ID3v1 tags (the last 128 bytes of a file). + * Don't take anything for granted (like string termination)! + * Also note the change ID3v1.1 did: comment[28] = 0; comment[29] = track_number + * It is your task to support ID3v1 only or ID3v1.1 ...*/ +typedef struct +{ + char tag[3]; /**< Always the string "TAG", the classic intro. */ + char title[30]; /**< Title string. */ + char artist[30]; /**< Artist string. */ + char album[30]; /**< Album string. */ + char year[4]; /**< Year string. */ + char comment[30]; /**< Comment string. */ + unsigned char genre; /**< Genre index. */ +} mpg123_id3v1; + +#define MPG123_ID3 0x3 /**< 0011 There is some ID3 info. Also matches 0010 or NEW_ID3. */ +#define MPG123_NEW_ID3 0x1 /**< 0001 There is ID3 info that changed since last call to mpg123_id3. */ +#define MPG123_ICY 0xc /**< 1100 There is some ICY info. Also matches 0100 or NEW_ICY.*/ +#define MPG123_NEW_ICY 0x4 /**< 0100 There is ICY info that changed since last call to mpg123_icy. */ + +/** Query if there is (new) meta info, be it ID3 or ICY (or something new in future). + * \param mh handle + * \return combination of flags, 0 on error (same as "nothing new") + */ +MPG123_EXPORT int mpg123_meta_check(mpg123_handle *mh); + +/** Clean up meta data storage (ID3v2 and ICY), freeing memory. + * \param mh handle + */ +MPG123_EXPORT void mpg123_meta_free(mpg123_handle *mh); + +/** Point v1 and v2 to existing data structures wich may change on any next read/decode function call. + * v1 and/or v2 can be set to NULL when there is no corresponding data. + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_id3( mpg123_handle *mh +, mpg123_id3v1 **v1, mpg123_id3v2 **v2 ); + +/** Point icy_meta to existing data structure wich may change on any next read/decode function call. + * \param mh handle + * \param icy_meta return address for ICY meta string (set to NULL if nothing there) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_icy(mpg123_handle *mh, char **icy_meta); + +/** Decode from windows-1252 (the encoding ICY metainfo used) to UTF-8. + * Note that this is very similar to mpg123_store_utf8(&sb, mpg123_text_icy, icy_text, strlen(icy_text+1)) . + * \param icy_text The input data in ICY encoding + * \return pointer to newly allocated buffer with UTF-8 data (You free() it!) */ +MPG123_EXPORT char* mpg123_icy2utf8(const char* icy_text); + + +/* @} */ + + +/** \defgroup mpg123_advpar mpg123 advanced parameter API + * + * Direct access to a parameter set without full handle around it. + * Possible uses: + * - Influence behaviour of library _during_ initialization of handle (MPG123_VERBOSE). + * - Use one set of parameters for multiple handles. + * + * The functions for handling mpg123_pars (mpg123_par() and mpg123_fmt() + * family) directly return a fully qualified mpg123 error code, the ones + * operating on full handles normally MPG123_OK or MPG123_ERR, storing the + * specific error code itseld inside the handle. + * + * @{ + */ + +/** Opaque structure for the libmpg123 decoder parameters. */ +struct mpg123_pars_struct; + +/** Opaque structure for the libmpg123 decoder parameters. */ +typedef struct mpg123_pars_struct mpg123_pars; + +/** Create a handle with preset parameters. + * \param mp parameter handle + * \param decoder decoder choice + * \param error error code return address + * \return mpg123 handle + */ +MPG123_EXPORT mpg123_handle *mpg123_parnew( mpg123_pars *mp +, const char* decoder, int *error ); + +/** Allocate memory for and return a pointer to a new mpg123_pars + * \param error error code return address + * \return new parameter handle + */ +MPG123_EXPORT mpg123_pars *mpg123_new_pars(int *error); + +/** Delete and free up memory used by a mpg123_pars data structure + * \param mp parameter handle + */ +MPG123_EXPORT void mpg123_delete_pars(mpg123_pars* mp); + +/** Configure mpg123 parameters to accept no output format at all, + * use before specifying supported formats with mpg123_format + * \param mp parameter handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_fmt_none(mpg123_pars *mp); + +/** Configure mpg123 parameters to accept all formats + * (also any custom rate you may set) -- this is default. + * \param mp parameter handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_fmt_all(mpg123_pars *mp); + +/** Set the audio format support of a mpg123_pars in detail: + * \param mp parameter handle + * \param rate The sample rate value (in Hertz). + * \param channels A combination of MPG123_STEREO and MPG123_MONO. + * \param encodings A combination of accepted encodings for rate and channels, + * p.ex MPG123_ENC_SIGNED16|MPG123_ENC_ULAW_8 (or 0 for no + * support). + * \return MPG123_OK on success +*/ +MPG123_EXPORT int mpg123_fmt(mpg123_pars *mp +, long rate, int channels, int encodings); + +/** Check to see if a specific format at a specific rate is supported + * by mpg123_pars. + * \param mp parameter handle + * \param rate sampling rate + * \param encoding encoding + * \return 0 for no support (that includes invalid parameters), MPG123_STEREO, + * MPG123_MONO or MPG123_STEREO|MPG123_MONO. */ +MPG123_EXPORT int mpg123_fmt_support(mpg123_pars *mp, long rate, int encoding); + +/** Set a specific parameter, for a specific mpg123_pars, using a parameter + * type key chosen from the mpg123_parms enumeration, to the specified value. + * \param mp parameter handle + * \param type parameter choice + * \param value integer value + * \param fvalue floating point value + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_par( mpg123_pars *mp +, enum mpg123_parms type, long value, double fvalue ); + +/** Get a specific parameter, for a specific mpg123_pars. + * See the mpg123_parms enumeration for a list of available parameters. + * \param mp parameter handle + * \param type parameter choice + * \param value integer value return address + * \param fvalue floating point value return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getpar( mpg123_pars *mp +, enum mpg123_parms type, long *value, double *fvalue); + +/* @} */ + + +/** \defgroup mpg123_lowio mpg123 low level I/O + * You may want to do tricky stuff with I/O that does not work with mpg123's default file access or you want to make it decode into your own pocket... + * + * @{ */ + +/** Replace default internal buffer with user-supplied buffer. + * Instead of working on it's own private buffer, mpg123 will directly use the one you provide for storing decoded audio. + * Note that the required buffer size could be bigger than expected from output + * encoding if libmpg123 has to convert from primary decoder output (p.ex. 32 bit + * storage for 24 bit output). + * \param mh handle + * \param data pointer to user buffer + * \param size of buffer in bytes + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_buffer(mpg123_handle *mh +, unsigned char *data, size_t size); + +/** The max size of one frame's decoded output with current settings. + * Use that to determine an appropriate minimum buffer size for decoding one frame. + * \param mh handle + * \return maximum decoded data size in bytes + */ +MPG123_EXPORT size_t mpg123_outblock(mpg123_handle *mh); + +/** Replace low-level stream access functions; read and lseek as known in POSIX. + * You can use this to make any fancy file opening/closing yourself, + * using mpg123_open_fd() to set the file descriptor for your read/lseek + * (doesn't need to be a "real" file descriptor...). + * Setting a function to NULL means that the default internal read is + * used (active from next mpg123_open call on). + * Note: As it would be troublesome to mess with this while having a file open, + * this implies mpg123_close(). + * \param mh handle + * \param r_read callback for reading (behaviour like POSIX read) + * \param r_lseek callback for seeking (like POSIX lseek) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_reader( mpg123_handle *mh +, ssize_t (*r_read) (int, void *, size_t) +, off_t (*r_lseek)(int, off_t, int) +); + +/** Replace I/O functions with your own ones operating on some kind of + * handle instead of integer descriptors. + * The handle is a void pointer, so you can pass any data you want... + * mpg123_open_handle() is the call you make to use the I/O defined here. + * There is no fallback to internal read/seek here. + * Note: As it would be troublesome to mess with this while having a file open, + * this mpg123_close() is implied here. + * \param mh handle + * \param r_read callback for reading (behaviour like POSIX read) + * \param r_lseek callback for seeking (like POSIX lseek) + * \param cleanup A callback to clean up an I/O handle on mpg123_close, + * can be NULL for none (you take care of cleaning your handles). + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_reader_handle( mpg123_handle *mh +, ssize_t (*r_read) (void *, void *, size_t) +, off_t (*r_lseek)(void *, off_t, int) +, void (*cleanup)(void*) ); + +/* @} */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/deps/mpg123/config/mac/x64/config.h b/deps/mpg123/config/mac/x64/config.h index 053818c..63737dd 100644 --- a/deps/mpg123/config/mac/x64/config.h +++ b/deps/mpg123/config/mac/x64/config.h @@ -74,6 +74,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_CULIB_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 diff --git a/deps/mpg123/configure b/deps/mpg123/configure index 20155ee..9114a9f 100755 --- a/deps/mpg123/configure +++ b/deps/mpg123/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for mpg123 1.14.4. +# Generated by GNU Autoconf 2.69 for mpg123 1.25.10. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -275,10 +275,10 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: mpg123-devel@lists.sourceforge.net about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." +$0: maintainer@mpg123.org about your system, including any +$0: error possibly output before this message. Then install +$0: a modern shell, or manually run the script under such a +$0: shell if you do have one." fi exit 1 fi @@ -590,9 +590,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='mpg123' PACKAGE_TARNAME='mpg123' -PACKAGE_VERSION='1.14.4' -PACKAGE_STRING='mpg123 1.14.4' -PACKAGE_BUGREPORT='mpg123-devel@lists.sourceforge.net' +PACKAGE_VERSION='1.25.10' +PACKAGE_STRING='mpg123 1.25.10' +PACKAGE_BUGREPORT='maintainer@mpg123.org' PACKAGE_URL='' ac_unique_file="src/mpg123.c" @@ -640,11 +640,58 @@ LTLIBOBJS LIBOBJS WIN32_CODES_FALSE WIN32_CODES_TRUE -OUTPUT_LDFLAGS -OUTPUT_LIBS -OUTPUT_CFLAGS -OUTPUT_MOD -OUTPUT_OBJ +BUILD_BUFFER_FALSE +BUILD_BUFFER_TRUE +BUILD_OPENAL_FALSE +BUILD_OPENAL_TRUE +BUILD_MINT_FALSE +BUILD_MINT_TRUE +BUILD_SGI_FALSE +BUILD_SGI_TRUE +BUILD_OS2_FALSE +BUILD_OS2_TRUE +BUILD_HP_FALSE +BUILD_HP_TRUE +BUILD_ARTS_FALSE +BUILD_ARTS_TRUE +BUILD_ALIB_FALSE +BUILD_ALIB_TRUE +BUILD_AIX_FALSE +BUILD_AIX_TRUE +BUILD_WIN32_WASAPI_FALSE +BUILD_WIN32_WASAPI_TRUE +BUILD_WIN32_FALSE +BUILD_WIN32_TRUE +BUILD_SUN_FALSE +BUILD_SUN_TRUE +BUILD_SNDIO_FALSE +BUILD_SNDIO_TRUE +BUILD_SDL_FALSE +BUILD_SDL_TRUE +BUILD_PULSE_FALSE +BUILD_PULSE_TRUE +BUILD_PORTAUDIO_FALSE +BUILD_PORTAUDIO_TRUE +BUILD_OSS_FALSE +BUILD_OSS_TRUE +BUILD_NAS_FALSE +BUILD_NAS_TRUE +BUILD_JACK_FALSE +BUILD_JACK_TRUE +BUILD_ESD_FALSE +BUILD_ESD_TRUE +BUILD_COREAUDIO_FALSE +BUILD_COREAUDIO_TRUE +BUILD_QSA_FALSE +BUILD_QSA_TRUE +BUILD_ALSA_FALSE +BUILD_ALSA_TRUE +BUILD_TINYALSA_FALSE +BUILD_TINYALSA_TRUE +BUILD_DUMMY_FALSE +BUILD_DUMMY_TRUE +output_modules_la +output_modules HAVE_DUMMY_FALSE HAVE_DUMMY_TRUE DUMMY_CFLAGS @@ -712,6 +759,11 @@ JACK_LDFLAGS HAVE_ESD_FALSE HAVE_ESD_TRUE ESD_LDFLAGS +HAVE_WIN32_WASAPI_FALSE +HAVE_WIN32_WASAPI_TRUE +WIN32_WASAPI_CFLAGS +WIN32_WASAPI_LDFLAGS +WIN32_WASAPI_LIBS HAVE_WIN32_FALSE HAVE_WIN32_TRUE WIN32_CFLAGS @@ -737,11 +789,21 @@ HAVE_OSS_TRUE OSS_CFLAGS OSS_LDFLAGS OSS_LIBS +HAVE_QSA_FALSE +HAVE_QSA_TRUE +QSA_CFLAGS +QSA_LDFLAGS +QSA_LIBS HAVE_ALSA_FALSE HAVE_ALSA_TRUE ALSA_CFLAGS ALSA_LDFLAGS ALSA_LIBS +HAVE_TINYALSA_FALSE +HAVE_TINYALSA_TRUE +TINYALSA_CFLAGS +TINYALSA_LDFLAGS +TINYALSA_LIBS SDL_LIBS SDL_CFLAGS ESD_LIBS @@ -750,18 +812,25 @@ PULSE_LIBS PULSE_CFLAGS JACK_LIBS JACK_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH PKG_CONFIG DECODER_LOBJ DECODER_OBJ +YASM_FORMAT +USE_YASM_FOR_AVX_FALSE +USE_YASM_FOR_AVX_TRUE INCLUDE_SYS_TYPE_H INCLUDE_STDLIB_H INCLUDE_STDIO_H LFS_LOBJ +YASMFLAGS +YASM EXEC_LT_LDFLAGS LT_LDFLAGS -MODULE_OBJ HAVE_MODULES_FALSE HAVE_MODULES_TRUE +LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO @@ -784,6 +853,7 @@ DLLTOOL AS EGREP GREP +LIBM CPP am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE @@ -807,6 +877,10 @@ CPPFLAGS LDFLAGS CFLAGS CC +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -838,6 +912,8 @@ build_os build_vendor build_cpu build +OUTAPI_VERSION +LIBOUT123_VERSION API_VERSION LIBMPG123_VERSION target_alias @@ -881,12 +957,14 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules enable_dependency_tracking enable_modules enable_static enable_shared with_pic enable_fast_install +with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock @@ -903,12 +981,16 @@ enable_ntom enable_downsample enable_feeder enable_messages +enable_new_huffman enable_int_quality enable_16bit enable_8bit enable_32bit enable_real +enable_equalizer with_cpu +enable_yasm +enable_ieeefloat enable_buffer enable_newoldwritesample enable_layer1 @@ -918,7 +1000,6 @@ with_audio with_default_audio with_optimization with_seektable -with_module_suffix enable_largefile enable_lfs_alias enable_feature_report @@ -934,7 +1015,10 @@ CPPFLAGS CCAS CCASFLAGS CPP +LT_SYS_LIBRARY_PATH PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR JACK_CFLAGS JACK_LIBS PULSE_CFLAGS @@ -1483,7 +1567,7 @@ 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 mpg123 1.14.4 to adapt to many kinds of systems. +\`configure' configures mpg123 1.25.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1553,7 +1637,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of mpg123 1.14.4:";; + short | recursive ) echo "Configuration of mpg123 1.25.10:";; esac cat <<\_ACEOF @@ -1561,6 +1645,8 @@ 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] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking @@ -1572,7 +1658,7 @@ Optional Features: optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug=no/yes turn on debugging - --enable-nagging=no/yes turn on GCC's pedantic nagging with error on warnings, also enables debugging + --enable-nagging=no/yes turn on GCC's pedantic nagging with error on warnings, does not include --enable-debug anymore --enable-gapless=no/yes turn on gapless (enabled per default) --enable-fifo=no/yes FIFO support for control interface (auto-enabled on linux) --enable-ipv6=no/yes IPv6 support (actually any protocol your libc does with getaddrinfo) @@ -1584,18 +1670,22 @@ Optional Features: --disable-downsample=no/yes no downsampled decoding --disable-feeder=no/yes no feeder decoding, no buffered readers --disable-messages=no/yes no error/warning messages on the console + --enable-new-huffman=yes/no use new huffman decoding scheme by Taihei (faster on modern CPUs at least, so on by default) --enable-int-quality=yes/no use rounding instead of fast truncation for integer output, where possible --disable-16bit=no/yes no 16 bit integer output --disable-8bit=no/yes no 8 bit integer output --disable-32bit=no/yes no 32 bit integer output (also 24 bit) --disable-real=no/yes no real (floating point) output + --disable-equalizer=no/yes no equalizer support + --enable-yasm=no/yes enforce yasm instad of default assembler for some optimizations (AVX, currently) + --enable-ieeefloat=yes/no use special hackery relying on IEEE 754 floating point storage format (to accurately round to 16 bit integer at bit more efficiently in generic decoder, enabled by default, disable in case you have a very special computer) --enable-buffer=yes/no disable audio buffer code (default uses system whitelist... proper checks later) --enable-newoldwritesample=no/yes enable new/old WRITE_SAMPLE macro for non-accurate 16 bit output, faster on certain CPUs (default on on x86-32) --disable-layer1=no/yes no layer I decoding --disable-layer2=no/yes no layer II decoding --disable-layer3=no/yes no layer III decoding --disable-largefile omit support for large files - --disable-lfs-alias disable alias wrappers for largefile bitness (mpg123_seek_32 in addition to mpg123_seek, mpg123_seek_64 as alias on x86-64) + --disable-lfs-alias disable alias wrappers for largefile bitness (mpg123_seek_32 or mpg123_seek_64 in addition to mpg123_seek, or the other way around; It is a mess, do not play with this!) --disable-feature_report Disable feature report function Optional Packages: @@ -1603,57 +1693,70 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). + --with-sysroot[=DIR] Search for dependent libraries within DIR (or the + compiler's sysroot if not specified). - --with-cpu=generic_fpu Use generic processor code with floating point arithmetic + --with-cpu=generic[_fpu] Use generic processor code with floating point arithmetic --with-cpu=generic_float Plain alias to generic_fpu now... float output is a normal runtime option! - --with-cpu=generic_nofpu Use generic processor code with fixed point arithmetic (p.ex. ARM, experimental) + --with-cpu=generic_nofpu Use generic processor code with fixed point arithmetic (p.ex. ARM) --with-cpu=generic_dither Use generic processor code with floating point arithmetic and dithering for 1to1 16bit decoding. - --with-cpu=i386_fpu Use code optimized for i386 processors with floating point arithmetic - --with-cpu=i386_nofpu Use code optimized for i386 processors with fixed point arithmetic (experimental) + --with-cpu=i386[_fpu] Use code optimized for i386 processors with floating point arithmetic + --with-cpu=i386_nofpu Use code optimized for i386 processors with fixed point arithmetic --with-cpu=i486 Use code optimized for i486 processors (only usable alone!) --with-cpu=i586 Use code optimized for i586 processors --with-cpu=i586_dither Use code optimized for i586 processors with dithering (noise shaping), adds 256K to binary size - --with-cpu=3dnow Use code optimized for 3DNow processors - --with-cpu=3dnowext Use code optimized for 3DNowExt processors (K6-3+, Athlon) + --with-cpu=3dnow Use code optimized for 3DNow processors + --with-cpu=3dnow_vintage Use code optimized for older 3DNow processors (K6 family) + --with-cpu=3dnowext Use code optimized for 3DNowExt processors (K6-3+, Athlon) --with-cpu=3dnowext_alone Really only 3DNowExt decoder, without 3DNow fallback for flexible rate + --with-cpu=3dnow_vintage Use code optimized for older extended 3DNow processors (like K6-III+) --with-cpu=mmx Use code optimized for MMX processors --with-cpu=mmx_alone Really only MMX decoder, without i586 fallback for flexible rate --with-cpu=sse Use code optimized for SSE processors + --with-cpu=sse_vintage Use code optimized for older SSE processors (plain C DCT36) --with-cpu=sse_alone Really only SSE decoder, without i586 fallback for flexible rate + --with-cpu=avx Use code optimized for x86-64 with AVX processors --with-cpu=x86 Pack all x86 opts into one binary (excluding i486, including dither) - --with-cpu=x86-64 Use code optimized for x86-64 processors (AMD64 and Intel64, including dithered generic) + --with-cpu=x86-64 Use code optimized for x86-64 processors (AMD64 and Intel64, including AVX and dithered generic) --with-cpu=altivec Use code optimized for Altivec processors (PowerPC G4 and G5) - --with-cpu=ppc_nofpu Use code optimized for PowerPC processors with fixed point arithmetic (experimental) + --with-cpu=ppc_nofpu Use code optimized for PowerPC processors with fixed point arithmetic --with-cpu=neon Use code optimized for ARM NEON SIMD engine (Cortex-A series) - --with-cpu=arm_nofpu Use code optimized for ARM processors with fixed point arithmetic (experimental) + --with-cpu=arm_fpu Pack neon and generic[_dither] decoders, for ARM processors with FPU and/or NEON + --with-cpu=arm_nofpu Use code optimized for ARM processors with fixed point arithmetic + --with-cpu=neon64 Use code optimized for AArch64 NEON SIMD engine + --with-cpu=aarch64 Pack neon64 and generic[_dither] decoders, for 64bit ARM processors --with-audio= Select a list (or only one) of audio output modules (comma or space separated list). - --with-default-audio=aix Use AIX as default audio output sub-system - --with-default-audio=alib Use Alib as default audio output sub-system (for HPUX) - --with-default-audio=alsa Use ALSA as default audio output sub-system - --with-default-audio=arts Use aRts as default audio output sub-system (KDE sound server) - --with-default-audio=dummy Use dummy as default audio (when no sound card is available) - --with-default-audio=esd Use ESoundD as default audio output sub-system - --with-default-audio=hp Use HP as default audio output sub-system - --with-default-audio=jack Use JACK as default low-latency audio server - --with-default-audio=coreaudio Use Mac OS X as default audio output sub-system (CoreAudio) - --with-default-audio=mint Use MinT as default audio output sub-system (Atari) - --with-default-audio=nas Use NAS as default audio output (Network Audio System) - --with-default-audio=os2 Use OS2 as default audio output sub-system - --with-default-audio=oss Use OSS as default audio output sub-system (/dev/dsp) - --with-default-audio=portaudio Use PortAudio as default audio output sub-system - --with-default-audio=pulse Use Pulse audio server as default audio output sub-system - --with-default-audio=sdl Use SDL as default audio output sub-system (Simple DirectMedia Layer) - --with-default-audio=sgi Use SGI as default audio output sub-system (IRIX) - --with-default-audio=sndio Use OpenBSD's sndio as default audio output sub-system - --with-default-audio=sun Use Sun as default audio output sub-system (/dev/audio) - --with-default-audio=win32 Use Win32 audio as default audio output sub-system + --with-default-audio=aix Use AIX as default audio output sub-system + --with-default-audio=alib Use Alib as default audio output sub-system (for HPUX) + --with-default-audio=alsa Use ALSA as default audio output sub-system (libasound) + --with-default-audio=tinyalsa Use ALSA as default audio output sub-system (tinyalsa) + --with-default-audio=arts Use aRts as default audio output sub-system (KDE sound server) + --with-default-audio=dummy Use dummy as default audio (when no sound card is available) + --with-default-audio=esd Use ESoundD as default audio output sub-system + --with-default-audio=hp Use HP as default audio output sub-system + --with-default-audio=jack Use JACK as default low-latency audio server + --with-default-audio=coreaudio Use Mac OS X as default audio output sub-system (CoreAudio) + --with-default-audio=mint Use MinT as default audio output sub-system (Atari) + --with-default-audio=nas Use NAS as default audio output (Network Audio System) + --with-default-audio=os2 Use OS2 as default audio output sub-system + --with-default-audio=oss Use OSS as default audio output sub-system (/dev/dsp) + --with-default-audio=portaudio Use PortAudio as default audio output sub-system + --with-default-audio=pulse Use Pulse audio server as default audio output sub-system + --with-default-audio=qsa Use QSA as default audio output sub-system + --with-default-audio=sdl Use SDL as default audio output sub-system (Simple DirectMedia Layer) + --with-default-audio=sgi Use SGI as default audio output sub-system (IRIX) + --with-default-audio=sndio Use OpenBSD's sndio as default audio output sub-system + --with-default-audio=sun Use Sun as default audio output sub-system (/dev/audio) + --with-default-audio=win32 Use Win32 audio as default audio output sub-system + --with-default-audio=win32_wasapi Use Win32 wasapi audio as default audio output sub-system --with-optimization=0 No Optimization @@ -1666,10 +1769,6 @@ Optional Packages: --with-seektable= choose size of seek index table (0 disables it), default 1000 - --with-module-suffix=.la (default) Use libtool's .la files for loading modules. - --with-module-suffix=.so|.dll|... Specify the native module file suffix to bypass .la files. - - Some influential environment variables: CC C compiler command CFLAGS C compiler flags @@ -1681,7 +1780,13 @@ Some influential environment variables: CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) CPP C preprocessor + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path JACK_CFLAGS C compiler flags for JACK, overriding pkg-config JACK_LIBS linker flags for JACK, overriding pkg-config PULSE_CFLAGS @@ -1695,7 +1800,7 @@ Some influential environment variables: 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 . +Report bugs to . _ACEOF ac_status=$? fi @@ -1758,7 +1863,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -mpg123 configure 1.14.4 +mpg123 configure 1.25.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1847,6 +1952,52 @@ fi } # ac_fn_c_try_cpp +# 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 || + 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; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes @@ -1920,52 +2071,6 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_header_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 || - 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; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using @@ -2036,9 +2141,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------------------- ## -## Report this to mpg123-devel@lists.sourceforge.net ## -## ------------------------------------------------- ##" +( $as_echo "## ------------------------------------ ## +## Report this to maintainer@mpg123.org ## +## ------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -2364,7 +2469,7 @@ 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 mpg123 $as_me 1.14.4, which was +It was created by mpg123 $as_me 1.25.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2715,9 +2820,18 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -API_VERSION=36 -LIB_PATCHLEVEL=6 + +API_VERSION=44 +LIB_PATCHLEVEL=8 + +OUTAPI_VERSION=2 +OUTLIB_PATCHLEVEL=2 + LIBMPG123_VERSION=$API_VERSION:$LIB_PATCHLEVEL:$API_VERSION +LIBOUT123_VERSION=$OUTAPI_VERSION:$OUTLIB_PATCHLEVEL:$OUTAPI_VERSION + + + @@ -2825,7 +2939,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -am__api_version='1.12' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2997,8 +3111,8 @@ test "$program_suffix" != NONE && 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` +# 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 @@ -3009,15 +3123,15 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " 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 +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -3250,6 +3364,45 @@ else fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3272,7 +3425,7 @@ fi # Define the identity of the package. PACKAGE='mpg123' - VERSION='1.14.4' + VERSION='1.25.10' cat >>confdefs.h <<_ACEOF @@ -3306,18 +3459,65 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + ac_config_headers="$ac_config_headers src/config.h" @@ -3352,6 +3552,7 @@ LT_LDFLAGS=-export-dynamic EXEC_LT_LDFLAGS= be_static=no all_static=no +lib_static=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you are up to something totally static with LDFLAGS/CFLAGS" >&5 $as_echo_n "checking if you are up to something totally static with LDFLAGS/CFLAGS... " >&6; } for f in $LDFLAGS $CFLAGS @@ -3360,9 +3561,14 @@ do -all-static) be_static=yes all_static=yes + lib_static=yes ;; -static) be_static=yes + lib_static=yes + ;; + -static-libgcc) + lib_static=yes ;; esac done @@ -4232,6 +4438,65 @@ 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_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 whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +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 @@ -5032,6 +5297,65 @@ 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_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 whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +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 @@ -5160,6 +5484,7 @@ else fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5298,65 +5623,199 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $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 ${ac_cv_path_GREP+:} false; 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" - as_fn_executable_p "$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 +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 +$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } +if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_path_GREP=$GREP -fi + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +/* 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 _mwvalidcheckl (); +int +main () +{ +return _mwvalidcheckl (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mw__mwvalidcheckl=yes +else + ac_cv_lib_mw__mwvalidcheckl=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_mw__mwvalidcheckl" >&5 +$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } +if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : + LIBM=-lmw +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $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 cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=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_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + LIBM="$LIBM -lm" +fi + + ;; +*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $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 cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=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_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + LIBM=-lm +fi + + ;; +esac + + + +{ $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 ${ac_cv_path_GREP+:} false; 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" + as_fn_executable_p "$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" @@ -5428,7 +5887,6 @@ $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : @@ -5907,6 +6365,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac +if test "x$lib_static" = xyes; then + CC="$CC -static-libgcc" + CCLD="$CC" + echo "Adding -static-libgcc" +fi + modules=auto OUTPUT_OBJ="module.\$(OBJEXT)" @@ -5940,14 +6404,14 @@ if test "${enable_static+set}" = set; then : *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -5971,14 +6435,14 @@ if test "${enable_shared+set}" = set; then : *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -6003,18 +6467,64 @@ $as_echo "#define DYNAMIC_BUILD 1" >>confdefs.h fi +for ac_header in windows.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" +if test "x$ac_cv_header_windows_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINDOWS_H 1 +_ACEOF + +fi + +done + + if test x"$modules" = xdisabled then - echo "Modules disabled, not checking for libltdl." + echo "Modules disabled, not checking for dynamic loading." +else + have_dl=no + # The dlopen() API is either in libc or in libdl. + if test x$ac_cv_header_windows_h = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LoadLibrary should be used" >&5 +$as_echo_n "checking if LoadLibrary should be used... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __CYGWIN__ +#error Cygwin should use dlopen +#endif + +#include + +int main() { + LoadLibraryW(0); + GetProcAddress(0, 0); + FreeLibrary(0); +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + have_dl=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using LoadLibrary" >&5 +$as_echo "Using LoadLibrary" >&6; } + else - have_ltdl=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5 -$as_echo_n "checking for lt_dlinit in -lltdl... " >&6; } -if ${ac_cv_lib_ltdl_lt_dlinit+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 +$as_echo_n "checking for library containing dlopen... " >&6; } +if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lltdl $LIBS" + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6024,74 +6534,78 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char lt_dlinit (); +char dlopen (); int main () { -return lt_dlinit (); +return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ltdl_lt_dlinit=yes -else - ac_cv_lib_ltdl_lt_dlinit=no +for ac_lib in '' dl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + conftest$ac_exeext + if ${ac_cv_search_dlopen+:} false; then : + break fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5 -$as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; } -if test "x$ac_cv_lib_ltdl_lt_dlinit" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default" -if test "x$ac_cv_header_ltdl_h" = xyes; then : - - have_ltdl=yes - -$as_echo "#define HAVE_LTDL 1" >>confdefs.h - +done +if ${ac_cv_search_dlopen+:} false; then : else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found ltdl library but NOT the header file on your system" >&5 -$as_echo "$as_me: WARNING: Found ltdl library but NOT the header file on your system" >&2;} - + ac_cv_search_dlopen=no fi - - - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ltdl library not found" >&5 -$as_echo "$as_me: WARNING: ltdl library not found" >&2;} - +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 +$as_echo "$ac_cv_search_dlopen" >&6; } +ac_res=$ac_cv_search_dlopen +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi - if test x"$modules" = xenabled -a x"$have_ltdl" = xno; then - as_fn_error $? "Modules enabled but no libltdl found! This will not work..." "$LINENO" 5 - fi - if test x"$modules" = xauto; then - if test x"$have_ltdl" = xyes; then - modules=enabled - echo "We found libltdl: Modules enabled." - else - echo "We did not find libltdl: Modules disabled." - modules=disabled - fi - fi + ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + fi -if test x"$modules" = xdisabled -then - echo "Modules disabled." -else -# Enable module support in source code -$as_echo "#define USE_MODULES 1" >>confdefs.h + for ac_func in dlopen dlsym dlclose +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_dl=yes +fi +done + fi + if test x"$modules" = xenabled -a x"$have_dl" = xno; then + as_fn_error $? "Modules enabled but no runtime loader found! This will not work..." "$LINENO" 5 + fi + if test x"$modules" = xauto; then + if test x"$have_dl" = xyes; then + modules=enabled + echo "We found a runtime loader: Modules enabled." + else + echo "We did not find a runtime loader: Modules disabled." + modules=disabled + fi + fi fi @@ -6406,8 +6920,8 @@ esac -macro_version='2.4.2' -macro_revision='1.3337' +macro_version='2.4.6' +macro_revision='2.4.6' @@ -6421,7 +6935,7 @@ macro_revision='1.3337' -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. @@ -6470,7 +6984,7 @@ func_echo_all () $ECHO "" } -case "$ECHO" in +case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 @@ -6663,19 +7177,19 @@ 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 + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; 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 + # 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` ;; @@ -6689,7 +7203,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } 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" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -6700,7 +7214,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -6711,32 +7225,32 @@ if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + 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" + 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; } @@ -6779,33 +7293,38 @@ if ${lt_cv_path_NM+:} false; then : else if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + 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 + 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" + 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 + 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: + # 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'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -6816,15 +7335,15 @@ else esac fi done - IFS="$lt_save_ifs" + 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" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : @@ -6930,9 +7449,9 @@ esac fi fi - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -6940,8 +7459,8 @@ fi esac fi - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -6992,7 +7511,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -7032,7 +7551,7 @@ else lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # 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` @@ -7082,22 +7601,23 @@ else ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$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 + 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"`env echo "$teststring$teststring" 2>/dev/null` \ + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -7115,7 +7635,7 @@ else fi -if test -n $lt_cv_sys_max_cmd_len ; then +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 @@ -7133,30 +7653,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${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%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && 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 @@ -7279,13 +7775,13 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then + if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -7410,13 +7906,13 @@ 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. +# '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. +# that 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]*) @@ -7443,8 +7939,7 @@ 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. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + 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 @@ -7480,10 +7975,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -7522,7 +8013,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -7544,8 +8035,8 @@ newos6*) 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 +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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)$' @@ -7598,6 +8089,9 @@ sysv4 | sysv4.3*) tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac fi @@ -7752,8 +8246,8 @@ else case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -7765,7 +8259,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac @@ -7919,7 +8413,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 @@ -7927,7 +8421,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -7940,7 +8434,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -8157,7 +8651,7 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -8247,7 +8741,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; @@ -8280,14 +8774,44 @@ case `$NM -V 2>&1` in symcode='[ABCDGIRSTW]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # 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'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$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'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -8305,21 +8829,24 @@ for ac_symprfx in "" "_"; do # 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. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported 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};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 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))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,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'" @@ -8367,11 +8894,11 @@ _LT_EOF if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else @@ -8397,7 +8924,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -8417,13 +8944,13 @@ _LT_EOF mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + 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 + test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -8444,7 +8971,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -8486,6 +9013,16 @@ fi + + + + + + + + + + @@ -8509,9 +9046,9 @@ fi lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -8521,8 +9058,8 @@ case ${with_sysroot} in #( no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac @@ -8534,18 +9071,99 @@ $as_echo "${lt_sysroot:-no}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_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 dd; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi + +rm -f conftest.i conftest2.i conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } + + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + # 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 +test no = "$enable_libtool_lock" || 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. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -8554,24 +9172,25 @@ ia64-*-hpux*) test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '#line '$LINENO' "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 + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -8600,9 +9219,50 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "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 + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -8616,9 +9276,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -8637,7 +9307,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -8655,7 +9328,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + 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; } @@ -8695,13 +9368,14 @@ 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 + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -8713,7 +9387,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*) + i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -8722,7 +9396,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" + LD=${LD-ld}_sol2 fi ;; *) @@ -8738,7 +9412,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. @@ -8849,7 +9523,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -9352,7 +10026,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + 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 @@ -9370,7 +10044,7 @@ else cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -9409,7 +10083,7 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 @@ -9438,7 +10112,7 @@ _LT_EOF _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -9451,32 +10125,32 @@ fi $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _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' ;; + _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' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; 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' + if test yes = "$lt_cv_ld_exported_symbols_list"; 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}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -9484,6 +10158,41 @@ $as_echo "$lt_cv_ld_force_load" >&6; } ;; esac +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default @@ -9520,14 +10229,14 @@ if test "${with_pic+set}" = set; then : *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -9535,8 +10244,6 @@ else fi -test -z "$pic_mode" && pic_mode=default - @@ -9552,14 +10259,14 @@ if test "${enable_fast_install+set}" = set; then : *) 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," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -9573,11 +10280,63 @@ fi + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + + + + + + + # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -9626,7 +10385,7 @@ test -z "$LN_S" && LN_S="ln -s" -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -9665,7 +10424,7 @@ 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 + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -9676,14 +10435,14 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# 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" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -9692,15 +10451,8 @@ 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 "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +func_cc_basename $compiler +cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it @@ -9715,22 +10467,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then : else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + 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 + 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" + 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 -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" + 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 : @@ -9753,13 +10505,13 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +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; } @@ -9781,22 +10533,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then : else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + 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 + 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" + 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 -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" + 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 : @@ -9819,13 +10571,13 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +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; } @@ -9846,7 +10598,7 @@ esac # Use C for the default configuration in the libtool script -lt_save_CC="$CC" +lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9908,7 +10660,7 @@ if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; @@ -9924,7 +10676,7 @@ 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" + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # 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 @@ -9954,7 +10706,7 @@ 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 +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : @@ -9972,17 +10724,18 @@ lt_prog_compiler_pic= lt_prog_compiler_static= - if test "$GCC" = yes; then + if test yes = "$GCC"; 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 + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi + lt_prog_compiler_pic='-fPIC' ;; amigaos*) @@ -9993,8 +10746,8 @@ lt_prog_compiler_static= ;; 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'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -10010,6 +10763,11 @@ lt_prog_compiler_static= # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -10080,7 +10838,7 @@ lt_prog_compiler_static= case $host_os in aix*) lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else @@ -10088,10 +10846,29 @@ lt_prog_compiler_static= fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + 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' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -10107,7 +10884,7 @@ lt_prog_compiler_static= ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' + lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -10116,9 +10893,9 @@ lt_prog_compiler_static= lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' @@ -10143,6 +10920,12 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -10240,7 +11023,7 @@ lt_prog_compiler_static= ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi @@ -10269,7 +11052,7 @@ lt_prog_compiler_static= fi case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; @@ -10301,7 +11084,7 @@ 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" + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # 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 @@ -10331,7 +11114,7 @@ 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 +if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; @@ -10363,7 +11146,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" + 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 @@ -10382,13 +11165,13 @@ else fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + 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 +if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= @@ -10508,8 +11291,8 @@ $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 +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; 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; } @@ -10521,9 +11304,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } 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;} + if test no = "$hard_links"; 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 @@ -10566,9 +11349,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # 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'. + # 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 @@ -10583,7 +11366,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # 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 + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -10591,7 +11374,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; esac @@ -10601,7 +11384,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -10623,24 +11406,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + 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' + 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' + 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 + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 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 ... @@ -10653,7 +11436,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 @@ -10672,7 +11455,7 @@ _LT_EOF 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_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -10688,7 +11471,7 @@ _LT_EOF 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' + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi @@ -10698,7 +11481,7 @@ _LT_EOF # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' + export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes @@ -10706,61 +11489,89 @@ _LT_EOF exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' 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' + 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, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; 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 ;; haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + 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' + 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 + if test linux-dietlibc = "$host_os"; 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 + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -10771,42 +11582,47 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$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' + 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 + if test yes = "$supports_anon_versioning"; 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' + 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 + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; xlf* | bgf* | bgxlf* | mpixlf*) # 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='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; 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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -10820,8 +11636,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -10839,8 +11655,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -10852,7 +11668,7 @@ _LT_EOF ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** 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 @@ -10867,9 +11683,9 @@ _LT_EOF # 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' + 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 @@ -10886,15 +11702,15 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $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 + if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= @@ -10910,7 +11726,7 @@ _LT_EOF # 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 + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -10918,34 +11734,57 @@ _LT_EOF ;; aix[4-9]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; 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="" + 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 - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX 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") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { 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' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive 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 + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -10964,13 +11803,21 @@ _LT_EOF hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes - file_list_spec='${wl}-f,' + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; 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` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -10989,35 +11836,42 @@ _LT_EOF ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; 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' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec='${wl}-bexpall' + 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 + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; 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. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -11052,7 +11906,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -11060,17 +11914,17 @@ fi aix_libpath=$lt_cv_aix_libpath_ 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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + 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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; 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' + if test ia64 = "$host_cpu"; 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" + 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. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -11105,7 +11959,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -11113,21 +11967,33 @@ fi aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + 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' - if test "$with_gnu_ld" = yes; then + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi 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' + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -11136,7 +12002,7 @@ fi 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_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -11166,16 +12032,17 @@ fi # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes @@ -11184,18 +12051,18 @@ fi # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -11204,7 +12071,7 @@ fi # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -11223,24 +12090,24 @@ fi hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" + allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - 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}" + 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 @@ -11282,33 +12149,33 @@ fi ;; hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$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' + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + 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' + export_dynamic_flag_spec='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $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' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + 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 @@ -11316,25 +12183,25 @@ fi ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $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' + 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+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) @@ -11346,7 +12213,7 @@ if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -11365,14 +12232,14 @@ else fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $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 @@ -11380,8 +12247,8 @@ fi ;; esac fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in @@ -11392,7 +12259,7 @@ fi *) hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -11403,8 +12270,8 @@ fi ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $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. @@ -11414,8 +12281,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " > if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + 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) { return 0; } @@ -11427,24 +12294,34 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -11459,7 +12336,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } 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_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; @@ -11467,27 +12344,19 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) 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 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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' + 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 + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no @@ -11498,33 +12367,53 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } 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' + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes ;; 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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; 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" && func_echo_all "$wl-set_version $wl$verstring"` $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" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + 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} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $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" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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 "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -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' @@ -11535,24 +12424,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } solaris*) no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $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 $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $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_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' + $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' + 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' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -11562,11 +12451,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } 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 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' + if test yes = "$GCC"; 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 @@ -11576,10 +12465,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; 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' + 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 @@ -11628,43 +12517,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' + 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' + if test yes = "$GCC"; 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' + 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 + # Note: We CANNOT 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' + 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_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' + 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' + if test yes = "$GCC"; 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' + 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 ;; @@ -11679,10 +12568,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' + export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi @@ -11690,7 +12579,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no +test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -11716,7 +12605,7 @@ x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -11931,14 +12820,14 @@ 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 +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -11954,28 +12843,35 @@ if test "$GCC" = yes; then ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # 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` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac 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 + 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" + elif test -n "$lt_multi_os_dir"; then 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; +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; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -11989,7 +12885,7 @@ BEGIN {RS=" "; FS="/|\n";} { # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -11998,7 +12894,7 @@ fi library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -12015,14 +12911,16 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown + + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + 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' + soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) @@ -12030,41 +12928,91 @@ aix[4-9]*) need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + 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 + # 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 + 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 + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot 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 + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # 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 + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' # 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 + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -12074,18 +13022,18 @@ amigaos*) 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}' + 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=`func_echo_all "$lib" | $SED '\''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' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -12093,8 +13041,8 @@ beos*) bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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" @@ -12106,7 +13054,7 @@ bsdi[45]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -12115,8 +13063,8 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc 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'\''`~ + 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~ @@ -12132,17 +13080,17 @@ cygwin* | mingw* | pw32* | cegcc*) 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}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; 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}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -12151,8 +13099,8 @@ cygwin* | mingw* | pw32* | cegcc*) *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -12179,7 +13127,7 @@ cygwin* | mingw* | pw32* | cegcc*) sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -12192,8 +13140,8 @@ cygwin* | mingw* | pw32* | cegcc*) esac # 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'\''`~ + 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' @@ -12206,7 +13154,7 @@ cygwin* | mingw* | pw32* | cegcc*) *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -12219,8 +13167,8 @@ darwin* | rhapsody*) 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' + 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`' @@ -12233,8 +13181,8 @@ dgux*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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 ;; @@ -12252,12 +13200,13 @@ freebsd* | dragonfly*) 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}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -12282,26 +13231,15 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - 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 - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + 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=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -12319,14 +13257,15 @@ hpux9* | hpux10* | hpux11*) 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 + 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -12334,8 +13273,8 @@ hpux9* | hpux10* | hpux11*) 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' + 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 ;; @@ -12344,8 +13283,8 @@ hpux9* | hpux10* | hpux11*) 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' + 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, ... @@ -12358,8 +13297,8 @@ interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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 @@ -12370,7 +13309,7 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -12378,8 +13317,8 @@ irix5* | irix6* | nonstopux*) 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}' + 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= @@ -12398,8 +13337,8 @@ irix5* | irix6* | nonstopux*) 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}" + 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 ;; @@ -12408,13 +13347,33 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # 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 + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' + ;; + # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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 @@ -12458,7 +13417,12 @@ fi # before this can be enabled. hardcode_into_libs=yes - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) 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;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" @@ -12478,12 +13442,12 @@ netbsd*) 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' + 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' + 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 @@ -12493,7 +13457,7 @@ netbsd*) newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + 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 ;; @@ -12502,58 +13466,68 @@ newsos6) 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' + 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*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + 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 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - shlibpath_overrides_runpath=yes + need_version=yes fi + 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 + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + 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' ;; 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}' + 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" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -12564,8 +13538,8 @@ solaris*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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 @@ -12575,11 +13549,11 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + 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 + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -12587,8 +13561,8 @@ sunos4*) sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + 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) @@ -12609,24 +13583,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + 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 + version_type=sco 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' + 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 + if test yes = "$with_gnu_ld"; 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' @@ -12644,7 +13618,7 @@ tpf*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + 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 @@ -12652,8 +13626,8 @@ tpf*) uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + 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 ;; @@ -12663,20 +13637,35 @@ uts4*) 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 +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; 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" +if test set = "${lt_cv_sys_lib_search_path_spec+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" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + @@ -12773,15 +13762,15 @@ $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 + test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && + if test no != "$hardcode_direct" && # 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 + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else @@ -12796,12 +13785,12 @@ 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 +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -12811,7 +13800,7 @@ fi - if test "x$enable_dlopen" != xyes; then + if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -12821,23 +13810,23 @@ else case $host_os in beos*) - lt_cv_dlopen="load_add_on" + 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=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # 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 ${ac_cv_lib_dl_dlopen+:} false; then : @@ -12875,10 +13864,10 @@ 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" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else - lt_cv_dlopen="dyld" + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes @@ -12886,10 +13875,18 @@ fi ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" + 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; } @@ -12928,11 +13925,11 @@ 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" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" + 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" = xyes; then : - lt_cv_dlopen="dlopen" + 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; } @@ -12971,7 +13968,7 @@ 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" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + 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; } @@ -13010,7 +14007,7 @@ 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" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + 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; } @@ -13049,7 +14046,7 @@ 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" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -13070,21 +14067,21 @@ fi ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 @@ -13092,7 +14089,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -13139,9 +14136,9 @@ else # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -13171,7 +14168,7 @@ _LT_EOF (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 + 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 @@ -13191,14 +14188,14 @@ 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 + if test yes = "$lt_cv_dlopen_self"; 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 ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -13245,9 +14242,9 @@ else # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -13277,7 +14274,7 @@ _LT_EOF (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 + 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 @@ -13298,9 +14295,9 @@ fi $as_echo "$lt_cv_dlopen_self_static" >&6; } fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -13344,7 +14341,7 @@ else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -13372,7 +14369,7 @@ fi - # Report which library types will actually be built + # Report what 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 @@ -13380,13 +14377,13 @@ $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 + test no = "$can_build_shared" && 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 + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -13394,8 +14391,12 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } ;; aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -13405,7 +14406,7 @@ $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 + test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -13419,7 +14420,7 @@ 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" +CC=$lt_save_CC @@ -13446,20 +14447,57 @@ CC="$lt_save_CC" if test x"$modules" = xdisabled then - echo "Modules still disabled..." - MODULE_OBJ="legacy_module.\$(OBJEXT)" + echo "Modules disabled." else - MODULE_OBJ="module.\$(OBJEXT)" -fi + # Enable module support in source code - if test "x$modules" = xenabled ; then - HAVE_MODULES_TRUE= - HAVE_MODULES_FALSE='#' -else - HAVE_MODULES_TRUE='#' - HAVE_MODULES_FALSE= -fi +$as_echo "#define USE_MODULES 1" >>confdefs.h + # Export the module file suffix as LT_MODULE_EXT + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what extension is used for runtime loadable modules" >&5 +$as_echo_n "checking what extension is used for runtime loadable modules... " >&6; } +if ${libltdl_cv_shlibext+:} false; then : + $as_echo_n "(cached) " >&6 +else + +module=yes +eval libltdl_cv_shlibext=$shrext_cmds +module=no +eval libltdl_cv_shrext=$shrext_cmds + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_shlibext" >&5 +$as_echo "$libltdl_cv_shlibext" >&6; } +if test -n "$libltdl_cv_shlibext"; then + +cat >>confdefs.h <<_ACEOF +#define LT_MODULE_EXT "$libltdl_cv_shlibext" +_ACEOF + +fi +if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then + +cat >>confdefs.h <<_ACEOF +#define LT_SHARED_EXT "$libltdl_cv_shrext" +_ACEOF + +fi +if test -n "$shared_archive_member_spec"; then + +cat >>confdefs.h <<_ACEOF +#define LT_SHARED_LIB_MEMBER "($shared_archive_member_spec.o)" +_ACEOF + +fi + +fi + if test "x$modules" = xenabled ; then + HAVE_MODULES_TRUE= + HAVE_MODULES_FALSE='#' +else + HAVE_MODULES_TRUE='#' + HAVE_MODULES_FALSE= +fi @@ -13488,7 +14526,6 @@ if test "${enable_nagging+set}" = set; then : if test "x$enableval" = xyes then nagging="enabled" - debugging="enabled" else nagging="disabled" fi @@ -13726,6 +14763,24 @@ $as_echo "#define NO_ERETURN 1" >>confdefs.h fi +newhuff=enabled +# Check whether --enable-new-huffman was given. +if test "${enable_new_huffman+set}" = set; then : + enableval=$enable_new_huffman; + if test "x$enableval" = xno; then + newhuff=disabled + fi + + +fi + + +if test "x$newhuff" = "xenabled"; then + +$as_echo "#define USE_NEW_HUFFTABLE 1" >>confdefs.h + +fi + integers=fast # Check whether --enable-int-quality was given. if test "${enable_int_quality+set}" = set; then : @@ -13784,6 +14839,18 @@ if test "${enable_real+set}" = set; then : fi +equalizer=enabled +# Check whether --enable-equalizer was given. +if test "${enable_equalizer+set}" = set; then : + enableval=$enable_equalizer; + if test "x$enableval" = xno; then + equalizer="disabled" + fi + +fi + + + # Check whether --with-cpu was given. if test "${with_cpu+set}" = set; then : @@ -13791,29 +14858,56 @@ if test "${with_cpu+set}" = set; then : fi +use_yasm=auto +# Check whether --enable-yasm was given. +if test "${enable_yasm+set}" = set; then : + enableval=$enable_yasm; + if test "x$enableval" = xyes; then + use_yasm="enabled" + else + use_yasm="disabled" + fi -# opt-in for IEEE754 floating point action -# We want to make sure not to apply hacks relying on IEEE754 storage format on platforms where we did not make sure that this actually is valid. -# It _should_ be fine for about all computers still out there, but we play safe. -ieee=no -case $host in - i?86-*|x86_64-*|powerpc*|sparc*) - ieee=yes - ;; -esac -if test "x$ieee" = xyes; then +fi + + +# Check whether --enable-ieeefloat was given. +if test "${enable_ieeefloat+set}" = set; then : + enableval=$enable_ieeefloat; + if test "x$enableval" = xyes; then + ieee=enabled + else + ieee=disabled + fi + +else + ieee=enabled +fi + + +if test "x$ieee" = xenabled; then echo "We assume IEEE754 floating point format." $as_echo "#define IEEE_FLOAT 1" >>confdefs.h fi +sys_cppflags= newoldwritesample=disabled case $host in + aarch64-*linux*|arm64-*linux*|aarch64-*bsd*|arm64-*bsd*|aarch64-apple-darwin*|arm64-apple-darwin*) + cpu_type="aarch64" + ;; + arm*-*-linux*-*eabihf|armv7hl*-*-linux*) + cpu_type="arm_fpu" + ;; arm*-*-linux*) # check that... perhaps we are better off on arm with kernel math emulation cpu_type="arm_nofpu" ;; + armv7*-apple-darwin*) + cpu_type="arm_fpu" + ;; i386-*-linux*|i386-*-kfreebsd*-gnu) cpu_type="i386_fpu" newoldwritesample=enabled @@ -13831,19 +14925,19 @@ case $host in newoldwritesample=enabled ;; x86_64-*-linux*|x86_64-*-kfreebsd*-gnu) - cpu_type="x86-64_all" + cpu_type="x86-64" ;; *-*-linux*|*-*-kfreebsd*-gnu) cpu_type="generic_fpu" ;; - i386-apple-darwin10*) + i?86-apple-darwin10*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CPU type supports x86-64" >&5 $as_echo_n "checking if CPU type supports x86-64... " >&6; } case `sysctl -n hw.optional.x86_64` in 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - cpu_type="x86-64_all" + cpu_type="x86-64" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -13853,12 +14947,12 @@ $as_echo "no" >&6; } ;; esac ;; - i386-apple-darwin*) + i?86-apple-darwin*) cpu_type="x86" newoldwritesample=enabled ;; x86_64-apple-darwin*) - cpu_type="x86-64_all" + cpu_type="x86-64" ;; *-apple-darwin*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CPU type supports AltiVec" >&5 @@ -13876,12 +14970,12 @@ $as_echo "no" >&6; } ;; esac ;; - i?86-*-dragonfly* | i?86-*-freebsd* | i?86-*-midnightbsd* | i?86-*-mirbsd* | i?86-*-netbsd* | i?86-*-openbsd*) + i?86-*-dragonfly* | i?86-*-freebsd* | i?86-*-midnightbsd* | i?86-*-mirbsd* | i?86-*-netbsd* | i?86-*-openbsd* | i?86-*-haiku*) cpu_type="x86" newoldwritesample=enabled ;; - x86_64-*-dragonfly* | x86_64-*-freebsd* | x86_64-*-midnightbsd* | x86_64-*-mirbsd* | x86_64-*-netbsd* | x86_64-*-openbsd*) - cpu_type="x86-64_all" + x86_64-*-dragonfly* | x86_64-*-freebsd* | x86_64-*-midnightbsd* | x86_64-*-mirbsd* | x86_64-*-netbsd* | x86_64-*-openbsd* | x86_64-*-haiku*) + cpu_type="x86-64" ;; *-*-dragonfly* | *-*-freebsd* | *-*-midnightbsd* | *-*-mirbsd* | *-*-netbsd* | *-*-openbsd*) cpu_type="generic_fpu" @@ -13891,7 +14985,7 @@ $as_echo "no" >&6; } newoldwritesample=enabled ;; x86_64-*-solaris*) - cpu_type=x86-64_all + cpu_type=x86-64 ;; *-*-solaris*) cpu_type="generic_fpu" @@ -13912,26 +15006,26 @@ $as_echo "no" >&6; } *-dec-osf*) cpu_type="generic_fpu" ;; - x86_64-pc-cygwin*) - cpu_type="x86-64_all" + x86_64-*-cygwin*) + cpu_type="x86-64" ;; - i686-pc-cygwin*) + i686-*-cygwin*) cpu_type="x86" newoldwritesample=enabled ;; - i586-pc-cygwin*) + i586-*-cygwin*) cpu_type="x86" newoldwritesample=enabled ;; - i486-pc-cygwin*) + i486-*-cygwin*) cpu_type="i486" newoldwritesample=enabled ;; - i386-pc-cygwin*) + i386-*-cygwin*) cpu_type="i386" newoldwritesample=enabled ;; - *-pc-cygwin*) + *-cygwin*) cpu_type="generic_fpu" ;; i[3-7]86-*-mingw32*) @@ -13944,13 +15038,25 @@ $as_echo "no" >&6; } LIBS="$LIBS" buffer=disabled cpu_type="x86-64" + ;; + i386-*-nto-qnx*) + cpu_type="x86" + newoldwritesample=enabled + ;; + *-ibm-aix*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: AIX system detected. You might want to --disable-largefile when trouble about conflicting types for lseek64 and friends occurs." >&5 +$as_echo "$as_me: WARNING: AIX system detected. You might want to --disable-largefile when trouble about conflicting types for lseek64 and friends occurs." >&2;} + # Altivec instead? It is developed for MacOS ... + cpu_type=generic_fpu + # no struct winsize without _ALL_SOURCE + sys_cppflags=-D_ALL_SOURCE ;; i386-*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown host operating system" >&5 $as_echo "$as_me: WARNING: Unknown host operating system" >&2;} cpu_type="i386" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC newoldwritesample=enabled ;; i486-*) @@ -13958,7 +15064,7 @@ $as_echo "$as_me: WARNING: Unknown host operating system" >&2;} $as_echo "$as_me: WARNING: Unknown host operating system" >&2;} cpu_type="i486" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC newoldwritesample=enabled ;; i586-*) @@ -13966,7 +15072,7 @@ $as_echo "$as_me: WARNING: Unknown host operating system" >&2;} $as_echo "$as_me: WARNING: Unknown host operating system" >&2;} cpu_type="x86" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC newoldwritesample=enabled ;; i686-*) @@ -13974,22 +15080,22 @@ $as_echo "$as_me: WARNING: Unknown host operating system" >&2;} $as_echo "$as_me: WARNING: Unknown host operating system" >&2;} cpu_type="x86" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC newoldwritesample=enabled ;; x86_64-*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown host operating system" >&5 $as_echo "$as_me: WARNING: Unknown host operating system" >&2;} - cpu_type="x86-64_all" + cpu_type="x86-64" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown host operating system" >&5 $as_echo "$as_me: WARNING: Unknown host operating system" >&2;} cpu_type="generic_fpu" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC ;; esac @@ -14022,31 +15128,22 @@ if test "${enable_newoldwritesample+set}" = set; then : fi - - if test "x$with_cpu" != "x"; then cpu_type=$with_cpu fi -if test "x$cpu_type" = "xgeneric_nofpu"; then - real=disabled - int32=disabled -fi - -if test "x$cpu_type" = "xi386_nofpu"; then - real=disabled - int32=disabled -fi +# Flag for 32 bit synth output or post-processing. +case "$cpu_type" in +*_nofpu) + synth32=false -if test "x$cpu_type" = "xppc_nofpu"; then - real=disabled - int32=disabled -fi +$as_echo "#define NO_SYNTH32 1" >>confdefs.h -if test "x$cpu_type" = "xarm_nofpu"; then - real=disabled - int32=disabled -fi +;; +*) + synth32=true +;; +esac if test "x$int16" = "xdisabled"; then @@ -14075,7 +15172,9 @@ if test "x$int32" = "xdisabled"; then $as_echo "#define NO_32BIT 1" >>confdefs.h else - s_fpu="$s_fpu synth_s32" + if $synth32; then + s_fpu="$s_fpu synth_s32" + fi fi if test "x$real" = "xdisabled"; then @@ -14083,10 +15182,16 @@ if test "x$real" = "xdisabled"; then $as_echo "#define NO_REAL 1" >>confdefs.h else - s_fpu="$s_fpu synth_real" + if $synth32; then + s_fpu="$s_fpu synth_real" + fi fi +if test "x$equalizer" = "xdisabled"; then +$as_echo "#define NO_EQUALIZER 1" >>confdefs.h + +fi layer1=enabled # Check whether --enable-layer1 was given. @@ -14184,24 +15289,25 @@ fi # Dummy audio output module is always supported output_modules="dummy" -# Decide on module file suffix. Setting it != .la allows removal of .la files. -# Check whether --with-module-suffix was given. -if test "${with_module_suffix+set}" = set; then : - withval=$with_module_suffix; -fi +# based on posting from John Dalgliesh on ffmpeg (LGPL) mailing list +# extended to use balign if present +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if .balign is present" >&5 +$as_echo_n "checking if .balign is present... " >&6; } +echo '.balign 4' > conftest.s +if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then -if test x"$with_module_suffix" = x; then - with_module_suffix=.la -fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -cat >>confdefs.h <<_ACEOF -#define MODULE_FILE_SUFFIX "$with_module_suffix" -_ACEOF +$as_echo "#define ASMALIGN_BALIGN 1" >>confdefs.h +else + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -# based on posting from John Dalgliesh on ffmpeg (LGPL) mailing list # find if .align arg is power-of-two or not asmalign_exp="unknown" if test x"$asmalign_exp" = xunknown; then @@ -14223,6 +15329,12 @@ if test x"$asmalign_exp" = xyes; then $as_echo "#define ASMALIGN_EXP 1" >>confdefs.h +else + +$as_echo "#define ASMALIGN_BYTE 1" >>confdefs.h + +fi + fi ccalign="unknown" @@ -14243,6 +15355,109 @@ $as_echo "no" >&6; } fi +avx_support="unknown" +if test x"$avx_support" = xunknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler supports AVX instructions" >&5 +$as_echo_n "checking if assembler supports AVX instructions... " >&6; } + avx_support="no" + echo '.text' > conftest.s + echo 'vaddps %ymm0,%ymm0,%ymm0' >> conftest.s + if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then + avx_support="yes" + { $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 + rm -f conftest.o conftest.s +fi + +check_yasm=no +if test x"$avx_support" = xno || test x"$use_yasm" = xenabled; then + check_yasm=yes +fi +if test x"$use_yasm" = xdisabled; then + check_yasm=no +fi + +if test x"$check_yasm" = xyes; then + for ac_prog in yasm +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 ${ac_cv_prog_YASM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$YASM"; then + ac_cv_prog_YASM="$YASM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_YASM="$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 +YASM=$ac_cv_prog_YASM +if test -n "$YASM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YASM" >&5 +$as_echo "$YASM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$YASM" && break +done +test -n "$YASM" || YASM="no" + + if test x"$YASM" != xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $YASM supports GAS syntax and AVX instructions" >&5 +$as_echo_n "checking if $YASM supports GAS syntax and AVX instructions... " >&6; } + echo '.text' > conftest.s + echo 'vaddps %ymm0,%ymm0,%ymm0' >> conftest.s + if $YASM -pgas -rcpp -o conftest.o conftest.s 1>/dev/null 2>&1; then + avx_support="yes" + YASMFLAGS="-pgas -rgas -mamd64" + { $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 + rm -f conftest.o conftest.s + else + if test x"$use_yasm" = xenabled; then + as_fn_error $? "Yasm enforced but not found!" "$LINENO" 5 + fi + fi +else + YASM="no" +fi + +if test "x$cpu_type" = "xavx"; then + if test "x$avx_support" != "xyes"; then + as_fn_error $? "Assembler doesn't understand AVX instructions." "$LINENO" 5 + fi +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } @@ -14356,7 +15571,7 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi -for ac_header in stdio.h stdlib.h string.h unistd.h sched.h sys/ioctl.h sys/types.h stdint.h limits.h inttypes.h sys/time.h sys/wait.h sys/resource.h sys/signal.h signal.h +for ac_header in stdio.h stdlib.h string.h unistd.h sched.h sys/ioctl.h sys/types.h stdint.h limits.h inttypes.h sys/time.h sys/wait.h sys/resource.h sys/signal.h signal.h sys/select.h dirent.h sys/stat.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -14574,9 +15789,11 @@ fi if test "x$ac_cv_sys_file_offset_bits" = x || echo "$ac_cv_sys_file_offset_bits" | $GREP '[^0-9]' > /dev/null; then LFS_LOBJ= + largefile_sensitive=no else # Add dual-mode wrapper code. LFS_LOBJ=lfs_wrap.lo + largefile_sensitive=yes fi # Using the lower level macros instead of AC_TYPE_* for compatibility with not freshest autoconf. @@ -14635,6 +15852,17 @@ _ACEOF fi +ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default" +if test "x$ac_cv_type_int64_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define int64_t long long +_ACEOF + +fi + ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default" if test "x$ac_cv_type_uint32_t" = xyes; then : @@ -14834,12 +16062,23 @@ _ACEOF -# The alias functions want to know the native off_t bits. -# "Native" also means large file offsets, if enabled, it's what is native to the mpg123 library. -if test "x$ac_cv_sizeof_long" = "x"; then - as_fn_error $? "Cannot determine sizeof(long)?" "$LINENO" 5 +if test "x$largefile_sensitive" = xyes; then + lfs_alias_type=long + lfs_alias_size=$ac_cv_sizeof_long +else + lfs_alias_type=off_t + lfs_alias_size=$ac_cv_sizeof_off_t +fi + +if test "x$lfs_alias_size" = "x"; then + as_fn_error $? "Cannot determine sizeof(lfs_alias_t)?" "$LINENO" 5 else - LFS_ALIAS_BITS=`expr "$ac_cv_sizeof_long" "*" "8"` + LFS_ALIAS_BITS=`expr "$lfs_alias_size" "*" "8"` + +cat >>confdefs.h <<_ACEOF +#define lfs_alias_t $lfs_alias_type +_ACEOF + cat >>confdefs.h <<_ACEOF #define LFS_ALIAS_BITS $LFS_ALIAS_BITS @@ -14880,6 +16119,8 @@ else $as_echo "no" >&6; } fi +# Again, prepend path for non-recursive make. +LFS_LOBJ=`for i in $LFS_LOBJ; do printf ' src/libmpg123/%s' $i; done` @@ -15193,19 +16434,6 @@ fi done -for ac_func in strdup -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - for ac_func in atoll do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -15298,7 +16526,7 @@ return gethostbyname (); return 0; } _ACEOF -for ac_lib in '' nsl socket; do +for ac_lib in '' nsl socket network; do if test -z "$ac_lib"; then ac_res="none required" else @@ -15585,26 +16813,68 @@ fi # do not assume gcc here, so no flags by default ADD_CFLAGS="" -ADD_CPPFLAGS="" +ADD_CPPFLAGS="$sys_cppflags" ADD_LDFLAGS="" LIBS="$LIBS" +# Consider moving that stuff. ac_fn_c_check_header_mongrel "$LINENO" "os2.h" "ac_cv_header_os2_h" "$ac_includes_default" if test "x$ac_cv_header_os2_h" = xyes; then : ADD_CPPFLAGS="$ADD_CPPFLAGS -DOS2" fi +# On OS/2, we need to link to os2term to make terminal control actually work. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcsetattr in -los2term" >&5 +$as_echo_n "checking for tcsetattr in -los2term... " >&6; } +if ${ac_cv_lib_os2term_tcsetattr+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-los2term $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 tcsetattr (); +int +main () +{ +return tcsetattr (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_os2term_tcsetattr=yes +else + ac_cv_lib_os2term_tcsetattr=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_os2term_tcsetattr" >&5 +$as_echo "$ac_cv_lib_os2term_tcsetattr" >&6; } +if test "x$ac_cv_lib_os2term_tcsetattr" = xyes; then : + ADD_LDFLAGS="$ADD_LDFLAGS -los2term" +fi + -# If debugging is enabled then make warnings errors +# If debugging is enabled, just enable debugging symbols. +# All other stuff enters nagging territory. if test x"$debugging" = xenabled; then ADD_CFLAGS="-g" - # gcc specific... - if test x"$GCC" = xyes; then - ADD_CFLAGS="$ADD_CFLAGS -Wall -fno-strict-aliasing" - if test x"$nagging" = xenabled; then - ADD_CFLAGS="$ADD_CFLAGS -Werror -pedantic -DPLAIN_C89" - fi +fi +# gcc specific... +if test x"$GCC" = xyes; then + if test x"$nagging" = xenabled; then + ADD_CFLAGS="$ADD_CFLAGS -Wall -Werror -std=c89 -pedantic -DPLAIN_C89" fi fi @@ -15623,29 +16893,45 @@ s_i586="$s_i386 synth_i586" s_i586d="$s_i386 synth_i586_dither" s_3dnow="$s_i386 synth_3dnow dct64_3dnow equalizer_3dnow" s_3dnowext="$s_i386 dct64_3dnowext tabinit_mmx synth_3dnowext" +s_3dnow_vintage=$s_3dnow +s_3dnowext_vintage=$s_3dnowext if test "x$layer3" = "xenabled"; then - s_3dnow="$s_3dnow dct36_3dnow" - s_3dnowext="$s_3dnowext dct36_3dnowext" + s_3dnow_vintage="$s_3dnow_vintage dct36_3dnow" + s_3dnowext_vintage="$s_3dnowext_vintage dct36_3dnowext" fi s_mmx="$s_i386 dct64_mmx tabinit_mmx synth_mmx" -s_sse="$s_i386 tabinit_mmx dct64_sse dct64_sse_float synth_sse_float synth_stereo_sse_float synth_sse_s32 synth_stereo_sse_s32 " -s_x86_64="dct64_x86_64 dct64_x86_64_float synth_x86_64_float synth_x86_64_s32 synth_stereo_x86_64_float synth_stereo_x86_64_s32" +s_sse_vintage="$s_i386 tabinit_mmx dct64_sse_float synth_sse_float synth_stereo_sse_float synth_sse_s32 synth_stereo_sse_s32 " +s_sse="$s_sse_vintage dct36_sse" +s_x86_64="dct36_x86_64 dct64_x86_64_float synth_x86_64_float synth_x86_64_s32 synth_stereo_x86_64_float synth_stereo_x86_64_s32" +s_x86_64_mono_synths="synth_x86_64_float synth_x86_64_s32" +s_x86_64_avx="dct36_avx dct64_avx_float synth_stereo_avx_float synth_stereo_avx_s32" s_x86multi="getcpuflags" +s_x86_64_multi="getcpuflags_x86_64" s_dither="dither" -s_neon="dct64_neon dct64_neon_float synth_neon_float synth_neon_s32 synth_stereo_neon_float synth_stereo_neon_s32" +s_neon="dct36_neon dct64_neon_float synth_neon_float synth_neon_s32 synth_stereo_neon_float synth_stereo_neon_s32" +s_neon64="dct36_neon64 dct64_neon64_float synth_neon64_float synth_neon64_s32 synth_stereo_neon64_float synth_stereo_neon64_s32" +s_arm_multi="getcpuflags_arm check_neon" # choose optimized 16bit decoder for SSE, quality or fast # note: supporting deactivation of output formats for these decoders would need more logic here if test "x$integers" = "xquality"; then s_sse="$s_sse synth_sse_accurate synth_stereo_sse_accurate" + s_sse_vintage="$s_sse_vintage synth_sse_accurate synth_stereo_sse_accurate" s_x86_64="$s_x86_64 synth_x86_64_accurate synth_stereo_x86_64_accurate" + s_x86_64_mono_synths="$s_x86_64_mono_synths synth_x86_64_accurate" + s_x86_64_avx="$s_x86_64_avx synth_stereo_avx_accurate" s_arm="synth_arm_accurate" s_neon="$s_neon synth_neon_accurate synth_stereo_neon_accurate" + s_neon64="$s_neon64 synth_neon64_accurate synth_stereo_neon64_accurate" else - s_sse="$s_sse synth_sse" # no stereo - s_x86_64="$s_x86_64 synth_x86_64 synth_stereo_x86_64" + s_sse="$s_sse dct64_sse synth_sse" # no stereo + s_sse_vintage="$s_sse_vintage dct64_sse synth_sse" # no stereo + s_x86_64="$s_x86_64 synth_x86_64 dct64_x86_64 synth_stereo_x86_64" + s_x86_64_mono_synths="$s_x86_64_mono_synths synth_x86_64" + s_x86_64_avx="$s_x86_64_avx dct64_avx synth_stereo_avx" s_arm="synth_arm" - s_neon="$s_neon synth_neon synth_stereo_neon" + s_neon="$s_neon dct64_neon synth_neon synth_stereo_neon" + s_neon64="$s_neon64 dct64_neon64 synth_neon64 synth_stereo_neon64" fi case $cpu_type in @@ -15670,7 +16956,7 @@ case $cpu_type in ccalign=no ;; ppc_nofpu) - ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_PPC -DREAL_IS_FIXED" + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_GENERIC -DOPT_PPC -DREAL_IS_FIXED" more_sources= ccalign=no ;; @@ -15700,6 +16986,18 @@ $as_echo "no" >&6; } ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_NEON -DREAL_IS_FLOAT" more_sources="$s_neon $s_fpu" ;; + arm_fpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_NEON -DREAL_IS_FLOAT" + more_sources="$s_neon $s_fpu $s_dither $s_arm_multi" + ;; + neon64) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_NEON64 -DREAL_IS_FLOAT" + more_sources="$s_neon64 $s_fpu" + ;; + aarch64) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_NEON64 -DREAL_IS_FLOAT" + more_sources="$s_neon64 $s_fpu $s_dither $s_arm_multi" + ;; i386) ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I386 -DREAL_IS_FLOAT" more_sources="$s_fpu $s_i386" @@ -15733,6 +17031,10 @@ $as_echo "no" >&6; } ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_I586 -DOPT_3DNOW -DREAL_IS_FLOAT" more_sources="$s_fpu $s_i586 $s_3dnow $s_x86multi " ;; + 3dnow_vintage) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_I586 -DOPT_3DNOW_VINTAGE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i586 $s_3dnow_vintage $s_x86multi " + ;; 3dnow_alone) ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_3DNOW -DREAL_IS_FLOAT" more_sources="$s_fpu $s_3dnow" @@ -15741,6 +17043,10 @@ $as_echo "no" >&6; } ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_3DNOWEXT -DREAL_IS_FLOAT" more_sources="$s_fpu $s_3dnowext" ;; + 3dnowext_vintage) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_3DNOW -DOPT_3DNOWEXT_VINTAGE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_3dnowext_vintage $s_3dnow $s_x86multi" + ;; 3dnowext) ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_3DNOW -DOPT_3DNOWEXT -DREAL_IS_FLOAT" more_sources="$s_fpu $s_3dnowext $s_3dnow $s_x86multi" @@ -15753,37 +17059,71 @@ $as_echo "no" >&6; } ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_SSE -DREAL_IS_FLOAT" more_sources="$s_fpu $s_sse" ;; + sse_vintage) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_SSE_VINTAGE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_sse_vintage" + ;; + avx) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_AVX -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_x86_64_avx $s_x86_64_mono_synths" + if test "x$YASM" != "xno"; then + use_yasm_for_avx="yes" + fi + ;; x86|x86_dither) - ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_I386 -DOPT_I586 -DOPT_I586_DITHER -DOPT_MMX -DOPT_3DNOW -DOPT_3DNOWEXT -DOPT_SSE -DREAL_IS_FLOAT" - more_sources="$s_fpu $s_i386 $s_i586 $s_i586d $s_mmx $s_3dnow $s_3dnowext $s_sse $s_x86multi $s_dither" + # plain C dct36 always there, for vintage/non-vintage + # Selection of non-/vintage sources implies that + # $s_3dnow_vintage contains $s_3dnow, + # $s_sse contains $s_sse_vintage. + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_I386 -DOPT_I586 -DOPT_I586_DITHER -DOPT_MMX -DOPT_3DNOW -DOPT_3DNOW_VINTAGE -DOPT_3DNOWEXT -DOPT_3DNOWEXT_VINTAGE -DOPT_SSE -DOPT_SSE_VINTAGE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i386 $s_i586 $s_i586d $s_mmx $s_3dnow_vintage $s_3dnowext_vintage $s_sse $s_x86multi $s_dither" ;; - x86-64) + x86-64_alone) ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_X86_64 -DREAL_IS_FLOAT" more_sources="$s_fpu $s_x86_64" ;; - x86-64_all|x86-64_dither) + x86-64|x86-64_all|x86-64_dither) ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_X86_64 -DOPT_GENERIC -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT" - more_sources="$s_fpu $s_x86_64 $s_dither" + more_sources="$s_fpu $s_x86_64 $s_dither $s_x86_64_multi" + if test "x$avx_support" = "xyes"; then + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_AVX" + more_sources="$more_sources $s_x86_64_avx" + if test "x$YASM" != "xno"; then + use_yasm_for_avx="yes" + fi + fi ;; *) as_fn_error $? "Unknown CPU type '$cpu_type'" "$LINENO" 5 ;; esac -# Mac OS X specific linker flags -case $cpu_type in - 3dnow|3dnow_alone|3dnowext|3dnowext_alone|mmx|mmx_alone|sse|sse_alone|x86|x86_dither) - case $host in - i386-apple-darwin8*|*-apple-darwin10*) - ADD_LDFLAGS="$ADD_LDFLAGS -Wl,-read_only_relocs,suppress" - ;; - i386-apple-darwin9*) - ADD_CFLAGS="$ADD_CFLAGS -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" - ADD_LDFLAGS="$ADD_LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -Wl,-classic_linker -Wl,-read_only_relocs,suppress" - ;; - esac - ;; -esac +# Use yasm instead of the default assembler for AVX sources +if test "x$use_yasm_for_avx" = "xyes"; then + case $host_os in + *cygwin*|*mingw*) + YASM_FORMAT="-f win64" + ;; + *darwin*) + YASM_FORMAT="-f macho" + ;; + *) + YASM_FORMAT="-f elf" + ;; + esac + +$as_echo "#define USE_YASM_FOR_AVX 1" >>confdefs.h + +fi + if test "x$use_yasm_for_avx" = xyes ; then + USE_YASM_FOR_AVX_TRUE= + USE_YASM_FOR_AVX_FALSE='#' +else + USE_YASM_FOR_AVX_TRUE='#' + USE_YASM_FOR_AVX_FALSE= +fi + + # Check if we want feature report function. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want feature report function" >&5 @@ -15811,13 +17151,35 @@ if test "x$feature_report" = xenabled; then more_sources="$more_sources feature" fi +# Return 0 if first arg appears in list of following arguments. +# Return 1 otherwise. +word_in_list() { + word=$1 + shift + # Avoid naming conflict with the outside! + # Is local not POSIX sh? + for given_word in "$@" + do + if test "x$word" = "x$given_word"; then + return 0 + fi + done + return 1 +} + for i in $more_sources do - # Echo make sure every file is only once in the list. - echo "$DECODER_OBJ" | $GREP -v -w "$i\.\$(OBJEXT)" > /dev/null && DECODER_OBJ="$DECODER_OBJ $i.\$(OBJEXT)" - echo "$DECODER_LOBJ" | $GREP -v -w "$i\.lo" > /dev/null && DECODER_LOBJ="$DECODER_LOBJ $i.lo" + # Make sure every file is only once in the list. + word_in_list "$i.\$(OBJEXT)" $DECODER_OBJ || DECODER_OBJ="$DECODER_OBJ $i.\$(OBJEXT)" + word_in_list "$i.lo" $DECODER_LOBJ || DECODER_LOBJ="$DECODER_LOBJ $i.lo" done +# Another preprocessing step: Append prefix for non-recursive make. +# Just because $(addprefix ...) is a GNU extension. + +DECODER_OBJ=`for i in $DECODER_OBJ; do printf ' src/libmpg123/%s' $i; done` +DECODER_LOBJ=`for i in $DECODER_LOBJ; do printf ' src/libmpg123/%s' $i; done` + @@ -15830,7 +17192,15 @@ fi # The full list of supported modules to check, first come, first serve. -check_modules="alsa oss coreaudio sndio sun win32 os2 esd jack portaudio pulse sdl nas arts openal dummy" +check_modules="alsa tinyalsa oss coreaudio sndio sun win32 win32_wasapi os2 esd jack portaudio pulse sdl nas arts openal dummy" +# Only check qsa before all else on QNX. +# It would mask ALSA otherwise. +case $host in + *-nto-qnx*) + check_modules="qsa $check_modules" + ;; +esac + # The final list. output_modules= @@ -15844,6 +17214,11 @@ fi + + + + + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -15956,7 +17331,6 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi - fi # Now go through the modules to check and do the chores. @@ -15995,7 +17369,70 @@ done check_failed=yes fi ;; + tinyalsa) + TINYALSA_LIBS="-ltinyalsa" + # Check for ALSA + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcm_open in -ltinyalsa" >&5 +$as_echo_n "checking for pcm_open in -ltinyalsa... " >&6; } +if ${ac_cv_lib_tinyalsa_pcm_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltinyalsa $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 pcm_open (); +int +main () +{ +return pcm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_tinyalsa_pcm_open=yes +else + ac_cv_lib_tinyalsa_pcm_open=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_tinyalsa_pcm_open" >&5 +$as_echo "$ac_cv_lib_tinyalsa_pcm_open" >&6; } +if test "x$ac_cv_lib_tinyalsa_pcm_open" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "tinyalsa/asoundlib.h" "ac_cv_header_tinyalsa_asoundlib_h" "$ac_includes_default" +if test "x$ac_cv_header_tinyalsa_asoundlib_h" = xyes; then : + output_modules="$output_modules tinyalsa" HAVE_TINYALSA="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found TINYALSA library but NOT header files on your system" >&5 +$as_echo "$as_me: WARNING: Found TINYALSA library but NOT header files on your system" >&2;} +fi + + + + +fi + + if test "x$HAVE_TINYALSA" != xyes; then + check_failed=yes + fi + ;; + # QSA and ALSA are not distinguishable in these tests, need to block + # each other and play with test order depending on platform. alsa) + if test "x$HAVE_QSA" = xyes; then + HAVE_ALSA=no + else + ALSA_LIBS="-lasound" # Check for ALSA { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5 @@ -16051,8 +17488,111 @@ fi if test "x$HAVE_ALSA" != xyes; then check_failed=yes fi + + fi # HAVE_QSA + ;; + qsa) + if test "x$HAVE_ALSA" = xyes; then + HAVE_QSA=no + else + + QSA_LIBS="-lasound" + # Check for QSA + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5 +$as_echo_n "checking for snd_pcm_open in -lasound... " >&6; } +if ${ac_cv_lib_asound_snd_pcm_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lasound $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 snd_pcm_open (); +int +main () +{ +return snd_pcm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_asound_snd_pcm_open=yes +else + ac_cv_lib_asound_snd_pcm_open=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_asound_snd_pcm_open" >&5 +$as_echo "$ac_cv_lib_asound_snd_pcm_open" >&6; } +if test "x$ac_cv_lib_asound_snd_pcm_open" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "sys/asoundlib.h" "ac_cv_header_sys_asoundlib_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_asoundlib_h" = xyes; then : + output_modules="$output_modules qsa" HAVE_QSA="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found QSA library but NOT header files on your system" >&5 +$as_echo "$as_me: WARNING: Found QSA library but NOT header files on your system" >&2;} +fi + + + + +fi + + if test "x$HAVE_QSA" != xyes; then + check_failed=yes + fi + + fi # HAVE_ALSA ;; jack) + # JACK module uses semaphores, hence -lpthread. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_post in -lpthread" >&5 +$as_echo_n "checking for sem_post in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_sem_post+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $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 sem_post (); +int +main () +{ +return sem_post (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_sem_post=yes +else + ac_cv_lib_pthread_sem_post=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_pthread_sem_post" >&5 +$as_echo "$ac_cv_lib_pthread_sem_post" >&6; } +if test "x$ac_cv_lib_pthread_sem_post" = xyes; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK" >&5 @@ -16068,6 +17608,7 @@ if test -n "$JACK_CFLAGS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_JACK_CFLAGS=`$PKG_CONFIG --cflags "jack" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -16084,6 +17625,7 @@ if test -n "$JACK_LIBS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_JACK_LIBS=`$PKG_CONFIG --libs "jack" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -16094,6 +17636,8 @@ fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -16101,25 +17645,35 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "jack" 2>&1` + JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "jack" 2>&1` else - JACK_PKG_ERRORS=`$PKG_CONFIG --print-errors "jack" 2>&1` + JACK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "jack" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$JACK_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - HAVE_JACK="no" check_failed=yes + HAVE_JACK="no" check_failed=yes elif test $pkg_failed = untried; then - HAVE_JACK="no" check_failed=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_JACK="no" check_failed=yes else JACK_CFLAGS=$pkg_cv_JACK_CFLAGS JACK_LIBS=$pkg_cv_JACK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - output_modules="$output_modules jack" HAVE_JACK="yes" + + output_modules="$output_modules jack" + HAVE_JACK="yes" + JACK_LIBS="$JACK_LIBS -lpthread" + +fi + +else + HAVE_JACK=no check_failed=yes + fi + ;; pulse) @@ -16137,6 +17691,7 @@ if test -n "$PULSE_CFLAGS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PULSE_CFLAGS=`$PKG_CONFIG --cflags "libpulse-simple" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -16153,6 +17708,7 @@ if test -n "$PULSE_LIBS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PULSE_LIBS=`$PKG_CONFIG --libs "libpulse-simple" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -16163,6 +17719,8 @@ fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -16170,17 +17728,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PULSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpulse-simple" 2>&1` + PULSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpulse-simple" 2>&1` else - PULSE_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpulse-simple" 2>&1` + PULSE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpulse-simple" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PULSE_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - HAVE_PULSE="no" check_failed=yes + HAVE_PULSE="no" check_failed=yes elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } HAVE_PULSE="no" check_failed=yes else PULSE_CFLAGS=$pkg_cv_PULSE_CFLAGS @@ -16206,6 +17764,7 @@ if test -n "$ESD_CFLAGS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ESD_CFLAGS=`$PKG_CONFIG --cflags "esound" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -16222,6 +17781,7 @@ if test -n "$ESD_LIBS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ESD_LIBS=`$PKG_CONFIG --libs "esound" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -16232,6 +17792,8 @@ fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -16239,17 +17801,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - ESD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "esound" 2>&1` + ESD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "esound" 2>&1` else - ESD_PKG_ERRORS=`$PKG_CONFIG --print-errors "esound" 2>&1` + ESD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "esound" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$ESD_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - HAVE_ESD="no" check_failed=yes + HAVE_ESD="no" check_failed=yes elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } HAVE_ESD="no" check_failed=yes else ESD_CFLAGS=$pkg_cv_ESD_CFLAGS @@ -16441,6 +18003,7 @@ if test -n "$SDL_CFLAGS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -16457,6 +18020,7 @@ if test -n "$SDL_LIBS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -16467,6 +18031,8 @@ fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -16474,17 +18040,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sdl" 2>&1` else - SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sdl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - HAVE_SDL="no" check_failed=yes + HAVE_SDL="no" check_failed=yes elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } HAVE_SDL="no" check_failed=yes else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS @@ -16555,20 +18121,59 @@ fi # Does not work... instead just check for header # AC_CHECK_LIB( [winmm], [waveOutOpen] ) WIN32_LIBS=-lwinmm - for ac_header in windows.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" -if test "x$ac_cv_header_windows_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WINDOWS_H 1 + if test x$ac_cv_header_windows_h = xyes; then + output_modules="$output_modules win32" + HAVE_WIN32=yes + else + HAVE_WIN32=no + check_failed=yes + fi + ;; + win32_wasapi) + # Check for windows ... and win32 wasapi audio + # Does not work... instead just check for header + # AC_CHECK_LIB( [avrt], [] ) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have wasapi headers" >&5 +$as_echo_n "checking if we have wasapi headers... " >&6; } + OLD_LIBS=$LIBS + LIBS="$LIBS -lole32 -lavrt" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define COBJMACROS 1 +#define _WIN32_WINNT 0x601 +#include +#include +#include +#include +int main(){ + /* UUID Checks */ + GUID *IDs = { + &CLSID_MMDeviceEnumerator, + &IID_IMMDeviceEnumerator, + &IID_IAudioClient, + &IID_IAudioRenderClient + }; + return 0; +} + _ACEOF - output_modules="$output_modules win32" HAVE_WIN32=yes +if ac_fn_c_try_link "$LINENO"; then : + HAVE_WIN32_WASAPI=yes else - HAVE_WIN32=no check_failed=yes + HAVE_WIN32_WASAPI=no fi - -done - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$OLD_LIBS + WIN32_WASAPI_LIBS="-lole32 -lavrt" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_WIN32_WASAPI" >&5 +$as_echo "$HAVE_WIN32_WASAPI" >&6; } + if test "x$HAVE_WIN32_WASAPI" = xyes; then + output_modules="$output_modules win32_wasapi" + else + check_failed=yes + fi ;; sndio) SNDIO_LIBS=-lsndio @@ -16654,8 +18259,8 @@ done fi ;; coreaudio) - COREAUDIO_LIBS="-framework AudioToolbox -framework AudioUnit -framework CoreServices" - for ac_header in AudioUnit/AudioUnit.h CoreServices/CoreServices.h AudioToolbox/AudioToolbox.h + COREAUDIO_LIBS="-framework AudioToolbox" + for ac_header in AudioUnit/AudioUnit.h AudioToolbox/AudioToolbox.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -16669,9 +18274,48 @@ fi done if test "x${ac_cv_header_AudioUnit_AudioUnit_h}" = "xyes" \ - -a "x${ac_cv_header_CoreServices_CoreServices_h}" = "xyes" \ -a "x${ac_cv_header_AudioToolbox_AudioToolbox_h}" = "xyes"; then + OLD_LIBS=$LIBS + LIBS="$LIBS $COREAUDIO_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if AudioUnit functions are available within AudioToolbox" >&5 +$as_echo_n "checking if AudioUnit functions are available within AudioToolbox... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +AudioUnitInitialize(NULL); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; 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" >&5 +$as_echo "no" >&6; } + COREAUDIO_LIBS="$COREAUDIO_LIBS -framework AudioUnit" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$OLD_LIBS + for ac_header in CoreServices/CoreServices.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "CoreServices/CoreServices.h" "ac_cv_header_CoreServices_CoreServices_h" "$ac_includes_default" +if test "x$ac_cv_header_CoreServices_CoreServices_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CORESERVICES_CORESERVICES_H 1 +_ACEOF + COREAUDIO_LIBS="$COREAUDIO_LIBS -framework CoreServices" + +fi + +done + if test x"$modules" = xdisabled; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling buffer because of directly linked CoreAudio! Use the module if you need the buffer." >&5 $as_echo "$as_me: WARNING: Disabling buffer because of directly linked CoreAudio! Use the module if you need the buffer." >&2;} @@ -16686,7 +18330,7 @@ $as_echo "$as_me: WARNING: Disabling buffer because of directly linked CoreAudio arts) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for artsc" >&5 $as_echo_n "checking for artsc... " >&6; } - if artsc-config; then + if artsc-config > /dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } output_modules="$output_modules arts" @@ -16891,7 +18535,8 @@ if test "x$check_forced" = xyes -a "x$check_failed" = "xyes"; then fi # When you extend check_modules, you should extend this: -#for i in alsa oss coreaudio sndio sun win32 esd jack portaudio pulse sdl nas aix alib arts hp os2 sgi mint openal dummy; do echo $i; done | +#for i in alsa qsa oss coreaudio sndio sun win32 win32_wasapi esd jack portaudio pulse sdl nas aix alib arts hp os2 sgi mint openal dummy +#do echo $i; done | #perl -ne 'chomp; $big = uc($_); print <>confdefs.h <<_ACEOF -#define HAVE_WINDOWS_H 1 -_ACEOF - win32_specific_codes=enabled -fi - -done - -if test "x$win32_specific_codes" = xenabled && test "x$host_os" != "xcygwin"; then +if test "x$win32_specific_codes" = xenabled; then #### Check for Wide functions ac_fn_c_check_func "$LINENO" "_wopen" "ac_cv_func__wopen" if test "x$ac_cv_func__wopen" = xyes; then : @@ -17399,6 +19156,8 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want Unicode File Open for Win32" >&5 $as_echo_n "checking if we want Unicode File Open for Win32... " >&6; } if test "x$win32_unicode" = xenabled; then + oldlibs=$LIBS + LIBS="$LIBS -lshlwapi" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Unicode functions working" >&5 @@ -17407,11 +19166,13 @@ $as_echo_n "checking if Unicode functions working... " >&6; } /* end confdefs.h. */ #include + #include #include int main() { MultiByteToWideChar (0, 0, NULL, 0, NULL, 0); WideCharToMultiByte (0, 0, NULL, 0, NULL, 0, NULL, NULL); + PathCombineW(0,0,0); return 0; } @@ -17430,11 +19191,13 @@ rm -f core conftest.err conftest.$ac_objext \ #define WINVER 0x501 #define _WIN32_WINNT 0x501 #include + #include #include int main() { MultiByteToWideChar (0, 0, NULL, 0, NULL, 0); WideCharToMultiByte (0, 0, NULL, 0, NULL, 0, NULL, NULL); + PathCombineW(0,0,0); return 0; } @@ -17454,10 +19217,12 @@ $as_echo "yes" >&6; } $as_echo "#define WANT_WIN32_UNICODE 1" >>confdefs.h + else + LIBS=$oldlibs + as_fn_error $? "Unicode support for Win32 not working" "$LINENO" 5 fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unicode File Open for Win32 disabled" >&5 -$as_echo "$as_me: WARNING: Unicode File Open for Win32 disabled" >&2;} + as_fn_error $? "Unicode File Open for Win32 not available" "$LINENO" 5 fi #### Check for Network functions @@ -17635,6 +19400,32 @@ fi fi #END OF WIN32 CHECKS +#### Check mingw.org for EOVERFLOW +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have EOVERFLOW macro" >&5 +$as_echo_n "checking if we have EOVERFLOW macro... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int i = (EOVERFLOW) + 0; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eoverflow_present=yes +else + eoverflow_present=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $eoverflow_present" >&5 +$as_echo "$eoverflow_present" >&6; } +if test "x$eoverflow_present" = "xyes"; then : + +else + +$as_echo "#define EOVERFLOW EFBIG" >>confdefs.h + +fi + #### Use Win32 support codes if test "x$win32_specific_codes" = xenabled ; then WIN32_CODES_TRUE= @@ -17700,12 +19491,7 @@ $as_echo "$as_me: WARNING: You forced IPv6 code while I think there is no getad fi -# Do that here to prevent the above tests usign -lltdl... -if test "x$modules" = xenabled; then - LIBS="-lltdl $LIBS" -fi - -ac_config_files="$ac_config_files Makefile libmpg123.pc mpg123.spec doc/Makefile src/Makefile src/output/Makefile src/libmpg123/Makefile src/libmpg123/mpg123.h" +ac_config_files="$ac_config_files Makefile libmpg123.pc libout123.pc mpg123.spec src/libmpg123/mpg123.h src/libout123/out123.h" cat >confcache <<\_ACEOF @@ -17854,10 +19640,22 @@ if test -z "${HAVE_MODULES_TRUE}" && test -z "${HAVE_MODULES_FALSE}"; then as_fn_error $? "conditional \"HAVE_MODULES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${USE_YASM_FOR_AVX_TRUE}" && test -z "${USE_YASM_FOR_AVX_FALSE}"; then + as_fn_error $? "conditional \"USE_YASM_FOR_AVX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_TINYALSA_TRUE}" && test -z "${HAVE_TINYALSA_FALSE}"; then + as_fn_error $? "conditional \"HAVE_TINYALSA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_ALSA_TRUE}" && test -z "${HAVE_ALSA_FALSE}"; then as_fn_error $? "conditional \"HAVE_ALSA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_QSA_TRUE}" && test -z "${HAVE_QSA_FALSE}"; then + as_fn_error $? "conditional \"HAVE_QSA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_OSS_TRUE}" && test -z "${HAVE_OSS_FALSE}"; then as_fn_error $? "conditional \"HAVE_OSS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -17878,6 +19676,10 @@ if test -z "${HAVE_WIN32_TRUE}" && test -z "${HAVE_WIN32_FALSE}"; then as_fn_error $? "conditional \"HAVE_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_WIN32_WASAPI_TRUE}" && test -z "${HAVE_WIN32_WASAPI_FALSE}"; then + as_fn_error $? "conditional \"HAVE_WIN32_WASAPI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_ESD_TRUE}" && test -z "${HAVE_ESD_FALSE}"; then as_fn_error $? "conditional \"HAVE_ESD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -17938,6 +19740,106 @@ if test -z "${HAVE_DUMMY_TRUE}" && test -z "${HAVE_DUMMY_FALSE}"; then as_fn_error $? "conditional \"HAVE_DUMMY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BUILD_DUMMY_TRUE}" && test -z "${BUILD_DUMMY_FALSE}"; then + as_fn_error $? "conditional \"BUILD_DUMMY\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_TINYALSA_TRUE}" && test -z "${BUILD_TINYALSA_FALSE}"; then + as_fn_error $? "conditional \"BUILD_TINYALSA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ALSA_TRUE}" && test -z "${BUILD_ALSA_FALSE}"; then + as_fn_error $? "conditional \"BUILD_ALSA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_QSA_TRUE}" && test -z "${BUILD_QSA_FALSE}"; then + as_fn_error $? "conditional \"BUILD_QSA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_COREAUDIO_TRUE}" && test -z "${BUILD_COREAUDIO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_COREAUDIO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ESD_TRUE}" && test -z "${BUILD_ESD_FALSE}"; then + as_fn_error $? "conditional \"BUILD_ESD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_JACK_TRUE}" && test -z "${BUILD_JACK_FALSE}"; then + as_fn_error $? "conditional \"BUILD_JACK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_NAS_TRUE}" && test -z "${BUILD_NAS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_NAS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_OSS_TRUE}" && test -z "${BUILD_OSS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_OSS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_PORTAUDIO_TRUE}" && test -z "${BUILD_PORTAUDIO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_PORTAUDIO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_PULSE_TRUE}" && test -z "${BUILD_PULSE_FALSE}"; then + as_fn_error $? "conditional \"BUILD_PULSE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SDL_TRUE}" && test -z "${BUILD_SDL_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SNDIO_TRUE}" && test -z "${BUILD_SNDIO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SNDIO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SUN_TRUE}" && test -z "${BUILD_SUN_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SUN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_WIN32_TRUE}" && test -z "${BUILD_WIN32_FALSE}"; then + as_fn_error $? "conditional \"BUILD_WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_WIN32_WASAPI_TRUE}" && test -z "${BUILD_WIN32_WASAPI_FALSE}"; then + as_fn_error $? "conditional \"BUILD_WIN32_WASAPI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_AIX_TRUE}" && test -z "${BUILD_AIX_FALSE}"; then + as_fn_error $? "conditional \"BUILD_AIX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ALIB_TRUE}" && test -z "${BUILD_ALIB_FALSE}"; then + as_fn_error $? "conditional \"BUILD_ALIB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ARTS_TRUE}" && test -z "${BUILD_ARTS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_ARTS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_HP_TRUE}" && test -z "${BUILD_HP_FALSE}"; then + as_fn_error $? "conditional \"BUILD_HP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_OS2_TRUE}" && test -z "${BUILD_OS2_FALSE}"; then + as_fn_error $? "conditional \"BUILD_OS2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_SGI_TRUE}" && test -z "${BUILD_SGI_FALSE}"; then + as_fn_error $? "conditional \"BUILD_SGI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MINT_TRUE}" && test -z "${BUILD_MINT_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MINT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_OPENAL_TRUE}" && test -z "${BUILD_OPENAL_FALSE}"; then + as_fn_error $? "conditional \"BUILD_OPENAL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_BUFFER_TRUE}" && test -z "${BUILD_BUFFER_FALSE}"; then + as_fn_error $? "conditional \"BUILD_BUFFER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WIN32_CODES_TRUE}" && test -z "${WIN32_CODES_FALSE}"; then as_fn_error $? "conditional \"WIN32_CODES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -18339,7 +20241,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mpg123 $as_me 1.14.4, which was +This file was extended by mpg123 $as_me 1.25.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18399,13 +20301,13 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +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="\\ -mpg123 config.status 1.14.4 +mpg123 config.status 1.25.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -18543,6 +20445,7 @@ macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' @@ -18590,10 +20493,13 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' @@ -18658,7 +20564,8 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' @@ -18710,9 +20617,12 @@ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ nm_file_list_spec \ +lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ @@ -18747,7 +20657,7 @@ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -18774,10 +20684,11 @@ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -18786,19 +20697,16 @@ sys_lib_dlsearch_path_spec; do done 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 +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' @@ -18818,12 +20726,10 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "libmpg123.pc") CONFIG_FILES="$CONFIG_FILES libmpg123.pc" ;; + "libout123.pc") CONFIG_FILES="$CONFIG_FILES libout123.pc" ;; "mpg123.spec") CONFIG_FILES="$CONFIG_FILES mpg123.spec" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "src/output/Makefile") CONFIG_FILES="$CONFIG_FILES src/output/Makefile" ;; - "src/libmpg123/Makefile") CONFIG_FILES="$CONFIG_FILES src/libmpg123/Makefile" ;; "src/libmpg123/mpg123.h") CONFIG_FILES="$CONFIG_FILES src/libmpg123/mpg123.h" ;; + "src/libout123/out123.h") CONFIG_FILES="$CONFIG_FILES src/libout123/out123.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -19420,7 +21326,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} 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 + # Older Autoconf 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 @@ -19471,7 +21377,7 @@ $as_echo X"$mf" | 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 + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the @@ -19514,55 +21420,53 @@ $as_echo X"$file" | ;; "libtool":C) - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + 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 +# Generated automatically by $as_me ($PACKAGE) $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. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 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 of the License, or +# (at your option) any later version. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 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. +# 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 +# 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. +# along with this program. If not, see . # The names of the tagged configurations supported by this script. -available_tags="" +available_tags='' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG @@ -19591,6 +21495,9 @@ pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + # Shell to use when invoking shell scripts. SHELL=$lt_SHELL @@ -19702,18 +21609,27 @@ 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 into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + # 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 lister interface. +nm_interface=$lt_lt_cv_nm_interface + # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec -# The root where to search for dependent libraries,and in which our libraries should be installed. +# The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -19804,8 +21720,11 @@ 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 +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen @@ -19898,13 +21817,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # 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 +# 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 +# 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 +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -19954,6 +21873,65 @@ hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + _LT_EOF case $host_os in @@ -19962,7 +21940,7 @@ _LT_EOF # 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 +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -19971,7 +21949,7 @@ _LT_EOF esac -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if @@ -19981,165 +21959,6 @@ ltmain="$ac_aux_dir/ltmain.sh" sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -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}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -20208,20 +22027,15 @@ else echo " The lib will (try to) support default offset size, too." fi echo " LFS alias symbols ....... $lfs_alias ($LFS_ALIAS_BITS)" - -echo " Alignment checks ........ $aligncheck" -if test x"$aligncheck" = xenabled; then - if test x"$ccalign" != xyes; then - echo " (without effect since special alignment is not employed)" - fi - if test x"$GCC" = xyes; then - echo " (note that newer gcc 4.x versions do not use/need the align check)" - fi +echo " LFS alias type .......... $lfs_alias_type" +if test x"$use_yasm_for_avx" = xyes; then + echo " Use yasm (for AVX only) . enabled" +else + echo " Use yasm (for AVX only) . disabled" fi -echo -n " + +echo " Core libmpg123 features: - Integer conversion ...... $integers - New/old WRITE_SAMPLE .... $newoldwritesample Layer I ................. $layer1 Layer II ................ $layer2 Layer III ............... $layer3 @@ -20239,14 +22053,18 @@ echo -n " 16 bit integer .......... $int16 32/24 bit integer ....... $int32 real (32 bit float) ..... $real + Equalizer ............... $equalizer + Optimization detail: + Integer conversion ...... $integers + IEEE 754 hackery ........ $ieee + New/old WRITE_SAMPLE .... $newoldwritesample + new Huffman scheme ...... $newhuff -Note: Disabling core features is not commonly done and some combinations might not build/work. If you encounter such a case, help yourself (and provide a patch) or just poke the maintainers. -" +Note: Disabling core features is not commonly done and some combinations might not build/work. If you encounter such a case, help yourself (and provide a patch) or just poke the maintainers." # just an empty line echo echo " Modules ................. $modules" -echo " Module suffix ........... $with_module_suffix" echo " Checked audio modules ... $check_modules Detected audio support ..$output_modules Default output module ... $default_output_module @@ -20259,9 +22077,18 @@ if test x"$with_optimization" = x0; then echo "No optimization flags chosen, make sure you have something basic in your CFLAGS at least... " fi -if test x"$debugging" = xenabled; then - echo "CFLAGS='$CFLAGS'" - echo "LIBS='$LIBS'" -else - echo "Next type 'make' and then 'make install'." + +if test x"$cpu_type" = xi486; then + echo "WARNING: You selected the i486 decoder. This is not recommened for regular use." + echo "It was designed for actual i486 CPUs a long time ago. Generic C code is likely" + echo "to perform better nowadays. Also, the decoder misses features like volume" + echo "scaling and has clipping issues. Continue if you are into software archeology" + echo "only." fi + +echo +echo " CPPFLAGS='$CPPFLAGS'" +echo " CFLAGS='$CFLAGS'" +echo " LIBS='$LIBS'" +echo +echo "Next type 'make' and then 'make install'." diff --git a/deps/mpg123/configure.ac b/deps/mpg123/configure.ac index f4badf5..6216d4f 100644 --- a/deps/mpg123/configure.ac +++ b/deps/mpg123/configure.ac @@ -7,16 +7,26 @@ dnl initially written by Nicholas J. Humfrey dnl Require autoconf version >= 2.57 AC_PREREQ(2.57) - dnl ############# Initialisation -AC_INIT([mpg123], [1.14.4], [mpg123-devel@lists.sourceforge.net]) +AC_INIT([mpg123], [1.25.10], [maintainer@mpg123.org]) dnl Increment API_VERSION when the API gets changes (new functions). -API_VERSION=36 -LIB_PATCHLEVEL=6 + +dnl libmpg123 +API_VERSION=44 +LIB_PATCHLEVEL=8 + +dnl libout123 +OUTAPI_VERSION=2 +OUTLIB_PATCHLEVEL=2 + dnl Since we want to be backwards compatible, both sides get set to API_VERSION. LIBMPG123_VERSION=$API_VERSION:$LIB_PATCHLEVEL:$API_VERSION +LIBOUT123_VERSION=$OUTAPI_VERSION:$OUTLIB_PATCHLEVEL:$OUTAPI_VERSION AC_SUBST(LIBMPG123_VERSION) AC_SUBST(API_VERSION) +AC_SUBST(LIBOUT123_VERSION) +AC_SUBST(OUTAPI_VERSION) + AC_CONFIG_SRCDIR(src/mpg123.c) AC_CONFIG_AUX_DIR(build) @@ -25,8 +35,10 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_HOST dnl Version 1.7 of automake is recommended -AM_INIT_AUTOMAKE(1.7) -AM_CONFIG_HEADER(src/config.h) +dnl Not sure what minimal version does not choke on sub directories. +dnl Testing with 1.14. +AM_INIT_AUTOMAKE([subdir-objects]) +AC_CONFIG_HEADERS([src/config.h]) # You get strange symptoms like jack module build failing because the AC_C_CONST failed to detect the working const support. @@ -52,6 +64,7 @@ LT_LDFLAGS=-export-dynamic EXEC_LT_LDFLAGS= be_static=no all_static=no +lib_static=no AC_MSG_CHECKING([if you are up to something totally static with LDFLAGS/CFLAGS]) for f in $LDFLAGS $CFLAGS do @@ -59,9 +72,14 @@ do -all-static) be_static=yes all_static=yes + lib_static=yes ;; -static) be_static=yes + lib_static=yes + ;; + -static-libgcc) + lib_static=yes ;; esac done @@ -78,14 +96,23 @@ fi AM_PROG_AS AC_PROG_CC +AM_PROG_CC_C_O AC_PROG_CPP AC_PROG_INSTALL +AC_CHECK_LIBM +AC_SUBST(LIBM) dnl "Checking for egrep is broken after removal of libltdl stuff... checks use $EGREP, so searching it here." AC_PROG_EGREP AC_C_CONST AC_INLINE AC_C_BIGENDIAN +if test "x$lib_static" = xyes; then + CC="$CC -static-libgcc" + CCLD="$CC" + echo "Adding -static-libgcc" +fi + dnl ############# Use Libtool for dynamic module loading modules=auto @@ -119,45 +146,52 @@ else AC_DEFINE(DYNAMIC_BUILD, 1, [ Define if building with dynamcally linked libmpg123]) fi -if test x"$modules" = xdisabled -then - echo "Modules disabled, not checking for libltdl." -else - have_ltdl=no - AC_CHECK_LIB( [ltdl], [lt_dlinit], - [ AC_CHECK_HEADER( [ltdl.h], - [ - have_ltdl=yes - AC_DEFINE(HAVE_LTDL, 1, [ Define if libltdl is available ]) - ], - [ - AC_MSG_WARN([Found ltdl library but NOT the header file on your system]) - ] ) - ], - [ - AC_MSG_WARN([ltdl library not found]) - ] - ) - if test x"$modules" = xenabled -a x"$have_ltdl" = xno; then - AC_MSG_ERROR([Modules enabled but no libltdl found! This will not work...]) - fi - if test x"$modules" = xauto; then - if test x"$have_ltdl" = xyes; then - modules=enabled - echo "We found libltdl: Modules enabled." - else - echo "We did not find libltdl: Modules disabled." - modules=disabled - fi - fi -fi +dnl We need the windows header also for checking the module mechanism. +AC_CHECK_HEADERS([windows.h]) if test x"$modules" = xdisabled then - echo "Modules disabled." + echo "Modules disabled, not checking for dynamic loading." else -# Enable module support in source code -AC_DEFINE( USE_MODULES, 1, [Define if modules are enabled] ) + have_dl=no + # The dlopen() API is either in libc or in libdl. + if test x$ac_cv_header_windows_h = xyes; then + AC_MSG_CHECKING([if LoadLibrary should be used]) + AC_LINK_IFELSE([AC_LANG_SOURCE([ + +#ifdef __CYGWIN__ +#error Cygwin should use dlopen +#endif + +#include + +int main() { + LoadLibraryW(0); + GetProcAddress(0, 0); + FreeLibrary(0); +} + ])], [ + have_dl=yes + AC_MSG_RESULT([Using LoadLibrary]) + ], + [AC_MSG_RESULT([no])]) + else + AC_SEARCH_LIBS(dlopen, dl) + AC_CHECK_HEADER(dlfcn.h) + AC_CHECK_FUNCS(dlopen dlsym dlclose, [ have_dl=yes ]) + fi + if test x"$modules" = xenabled -a x"$have_dl" = xno; then + AC_MSG_ERROR([Modules enabled but no runtime loader found! This will not work...]) + fi + if test x"$modules" = xauto; then + if test x"$have_dl" = xyes; then + modules=enabled + echo "We found a runtime loader: Modules enabled." + else + echo "We did not find a runtime loader: Modules disabled." + modules=disabled + fi + fi fi dnl Configure libtool @@ -167,15 +201,15 @@ AM_PROG_LIBTOOL if test x"$modules" = xdisabled then - echo "Modules still disabled..." - MODULE_OBJ="legacy_module.\$(OBJEXT)" + echo "Modules disabled." else - MODULE_OBJ="module.\$(OBJEXT)" + # Enable module support in source code + AC_DEFINE( USE_MODULES, 1, [Define if modules are enabled] ) + # Export the module file suffix as LT_MODULE_EXT + LT_SYS_MODULE_EXT fi - AM_CONDITIONAL( [HAVE_MODULES], [test "x$modules" = xenabled] ) -AC_SUBST(MODULE_OBJ) AC_SUBST(LT_LDFLAGS) AC_SUBST(EXEC_LT_LDFLAGS) @@ -195,12 +229,11 @@ AC_ARG_ENABLE(debug, ) AC_ARG_ENABLE(nagging, - [ --enable-nagging=[no/yes] turn on GCC's pedantic nagging with error on warnings, also enables debugging ], + [ --enable-nagging=[no/yes] turn on GCC's pedantic nagging with error on warnings, does not include --enable-debug anymore ], [ if test "x$enableval" = xyes then nagging="enabled" - debugging="enabled" else nagging="disabled" fi @@ -387,6 +420,20 @@ if test "x$messages" = "xdisabled"; then AC_DEFINE(NO_ERETURN, 1, [ Define to disable error messages in combination with a return value (the return is left intact). ]) fi +newhuff=enabled +AC_ARG_ENABLE(new-huffman, +[ --enable-new-huffman=[yes/no] use new huffman decoding scheme by Taihei (faster on modern CPUs at least, so on by default) ], +[ + if test "x$enableval" = xno; then + newhuff=disabled + fi +] +, []) + +if test "x$newhuff" = "xenabled"; then + AC_DEFINE(USE_NEW_HUFFTABLE, 1, [ Define for new Huffman decoding scheme. ]) +fi + integers=fast AC_ARG_ENABLE(int-quality, [ --enable-int-quality=[yes/no] use rounding instead of fast truncation for integer output, where possible ], @@ -433,52 +480,90 @@ AC_ARG_ENABLE(real, fi ], []) +equalizer=enabled +AC_ARG_ENABLE(equalizer, + [ --disable-equalizer=[no/yes] no equalizer support ], + [ + if test "x$enableval" = xno; then + equalizer="disabled" + fi + ], []) + + AC_ARG_WITH([cpu], [ - --with-cpu=generic[_fpu] Use generic processor code with floating point arithmetic + --with-cpu=generic[[_fpu]] Use generic processor code with floating point arithmetic --with-cpu=generic_float Plain alias to generic_fpu now... float output is a normal runtime option! - --with-cpu=generic_nofpu Use generic processor code with fixed point arithmetic (p.ex. ARM, experimental) + --with-cpu=generic_nofpu Use generic processor code with fixed point arithmetic (p.ex. ARM) --with-cpu=generic_dither Use generic processor code with floating point arithmetic and dithering for 1to1 16bit decoding. - --with-cpu=i386[_fpu] Use code optimized for i386 processors with floating point arithmetic - --with-cpu=i386_nofpu Use code optimized for i386 processors with fixed point arithmetic (experimental) + --with-cpu=i386[[_fpu]] Use code optimized for i386 processors with floating point arithmetic + --with-cpu=i386_nofpu Use code optimized for i386 processors with fixed point arithmetic --with-cpu=i486 Use code optimized for i486 processors (only usable alone!) --with-cpu=i586 Use code optimized for i586 processors --with-cpu=i586_dither Use code optimized for i586 processors with dithering (noise shaping), adds 256K to binary size - --with-cpu=3dnow Use code optimized for 3DNow processors - --with-cpu=3dnowext Use code optimized for 3DNowExt processors (K6-3+, Athlon) + --with-cpu=3dnow Use code optimized for 3DNow processors + --with-cpu=3dnow_vintage Use code optimized for older 3DNow processors (K6 family) + --with-cpu=3dnowext Use code optimized for 3DNowExt processors (K6-3+, Athlon) --with-cpu=3dnowext_alone Really only 3DNowExt decoder, without 3DNow fallback for flexible rate + --with-cpu=3dnow_vintage Use code optimized for older extended 3DNow processors (like K6-III+) --with-cpu=mmx Use code optimized for MMX processors --with-cpu=mmx_alone Really only MMX decoder, without i586 fallback for flexible rate --with-cpu=sse Use code optimized for SSE processors + --with-cpu=sse_vintage Use code optimized for older SSE processors (plain C DCT36) --with-cpu=sse_alone Really only SSE decoder, without i586 fallback for flexible rate + --with-cpu=avx Use code optimized for x86-64 with AVX processors --with-cpu=x86 Pack all x86 opts into one binary (excluding i486, including dither) - --with-cpu=x86-64 Use code optimized for x86-64 processors (AMD64 and Intel64, including dithered generic) + --with-cpu=x86-64 Use code optimized for x86-64 processors (AMD64 and Intel64, including AVX and dithered generic) --with-cpu=altivec Use code optimized for Altivec processors (PowerPC G4 and G5) - --with-cpu=ppc_nofpu Use code optimized for PowerPC processors with fixed point arithmetic (experimental) + --with-cpu=ppc_nofpu Use code optimized for PowerPC processors with fixed point arithmetic --with-cpu=neon Use code optimized for ARM NEON SIMD engine (Cortex-A series) - --with-cpu=arm_nofpu Use code optimized for ARM processors with fixed point arithmetic (experimental) + --with-cpu=arm_fpu Pack neon and generic[[_dither]] decoders, for ARM processors with FPU and/or NEON + --with-cpu=arm_nofpu Use code optimized for ARM processors with fixed point arithmetic + --with-cpu=neon64 Use code optimized for AArch64 NEON SIMD engine + --with-cpu=aarch64 Pack neon64 and generic[[_dither]] decoders, for 64bit ARM processors ]) +use_yasm=auto +AC_ARG_ENABLE(yasm, + [ --enable-yasm=[no/yes] enforce yasm instad of default assembler for some optimizations (AVX, currently) ], + [ + if test "x$enableval" = xyes; then + use_yasm="enabled" + else + use_yasm="disabled" + fi + ], []) + +AC_ARG_ENABLE(ieeefloat, + [ --enable-ieeefloat=[yes/no] use special hackery relying on IEEE 754 floating point storage format (to accurately round to 16 bit integer at bit more efficiently in generic decoder, enabled by default, disable in case you have a very special computer) ], + [ + if test "x$enableval" = xyes; then + ieee=enabled + else + ieee=disabled + fi + ], [ ieee=enabled ]) -# opt-in for IEEE754 floating point action -# We want to make sure not to apply hacks relying on IEEE754 storage format on platforms where we did not make sure that this actually is valid. -# It _should_ be fine for about all computers still out there, but we play safe. -ieee=no -case $host in - i?86-*|x86_64-*|powerpc*|sparc*) - ieee=yes - ;; -esac -if test "x$ieee" = xyes; then +if test "x$ieee" = xenabled; then echo "We assume IEEE754 floating point format." AC_DEFINE(IEEE_FLOAT, 1, [ Define to indicate that float storage follows IEEE754. ]) fi +sys_cppflags= newoldwritesample=disabled case $host in + aarch64-*linux*|arm64-*linux*|aarch64-*bsd*|arm64-*bsd*|aarch64-apple-darwin*|arm64-apple-darwin*) + cpu_type="aarch64" + ;; + arm*-*-linux*-*eabihf|armv7hl*-*-linux*) + cpu_type="arm_fpu" + ;; arm*-*-linux*) # check that... perhaps we are better off on arm with kernel math emulation cpu_type="arm_nofpu" ;; + armv7*-apple-darwin*) + cpu_type="arm_fpu" + ;; i386-*-linux*|i386-*-kfreebsd*-gnu) cpu_type="i386_fpu" newoldwritesample=enabled @@ -496,17 +581,17 @@ case $host in newoldwritesample=enabled ;; x86_64-*-linux*|x86_64-*-kfreebsd*-gnu) - cpu_type="x86-64_all" + cpu_type="x86-64" ;; *-*-linux*|*-*-kfreebsd*-gnu) cpu_type="generic_fpu" ;; - i386-apple-darwin10*) + i?86-apple-darwin10*) AC_MSG_CHECKING([if CPU type supports x86-64]) case `sysctl -n hw.optional.x86_64` in 1) AC_MSG_RESULT([yes]) - cpu_type="x86-64_all" + cpu_type="x86-64" ;; *) AC_MSG_RESULT([no]) @@ -515,12 +600,12 @@ case $host in ;; esac ;; - i386-apple-darwin*) + i?86-apple-darwin*) cpu_type="x86" newoldwritesample=enabled ;; x86_64-apple-darwin*) - cpu_type="x86-64_all" + cpu_type="x86-64" ;; *-apple-darwin*) AC_MSG_CHECKING([if CPU type supports AltiVec]) @@ -535,12 +620,12 @@ case $host in ;; esac ;; - i?86-*-dragonfly* | i?86-*-freebsd* | i?86-*-midnightbsd* | i?86-*-mirbsd* | i?86-*-netbsd* | i?86-*-openbsd*) + i?86-*-dragonfly* | i?86-*-freebsd* | i?86-*-midnightbsd* | i?86-*-mirbsd* | i?86-*-netbsd* | i?86-*-openbsd* | i?86-*-haiku*) cpu_type="x86" newoldwritesample=enabled ;; - x86_64-*-dragonfly* | x86_64-*-freebsd* | x86_64-*-midnightbsd* | x86_64-*-mirbsd* | x86_64-*-netbsd* | x86_64-*-openbsd*) - cpu_type="x86-64_all" + x86_64-*-dragonfly* | x86_64-*-freebsd* | x86_64-*-midnightbsd* | x86_64-*-mirbsd* | x86_64-*-netbsd* | x86_64-*-openbsd* | x86_64-*-haiku*) + cpu_type="x86-64" ;; *-*-dragonfly* | *-*-freebsd* | *-*-midnightbsd* | *-*-mirbsd* | *-*-netbsd* | *-*-openbsd*) cpu_type="generic_fpu" @@ -550,7 +635,7 @@ case $host in newoldwritesample=enabled ;; x86_64-*-solaris*) - cpu_type=x86-64_all + cpu_type=x86-64 ;; *-*-solaris*) cpu_type="generic_fpu" @@ -571,26 +656,26 @@ case $host in *-dec-osf*) cpu_type="generic_fpu" ;; - x86_64-pc-cygwin*) - cpu_type="x86-64_all" + x86_64-*-cygwin*) + cpu_type="x86-64" ;; - i686-pc-cygwin*) + i686-*-cygwin*) cpu_type="x86" newoldwritesample=enabled ;; - i586-pc-cygwin*) + i586-*-cygwin*) cpu_type="x86" newoldwritesample=enabled ;; - i486-pc-cygwin*) + i486-*-cygwin*) cpu_type="i486" newoldwritesample=enabled ;; - i386-pc-cygwin*) + i386-*-cygwin*) cpu_type="i386" newoldwritesample=enabled ;; - *-pc-cygwin*) + *-cygwin*) cpu_type="generic_fpu" ;; i@<:@3-7@:>@86-*-mingw32*) @@ -603,46 +688,57 @@ case $host in LIBS="$LIBS" buffer=disabled cpu_type="x86-64" + ;; + i386-*-nto-qnx*) + cpu_type="x86" + newoldwritesample=enabled + ;; + *-ibm-aix*) + AC_MSG_WARN([AIX system detected. You might want to --disable-largefile when trouble about conflicting types for lseek64 and friends occurs.]) + # Altivec instead? It is developed for MacOS ... + cpu_type=generic_fpu + # no struct winsize without _ALL_SOURCE + sys_cppflags=-D_ALL_SOURCE ;; i386-*) AC_MSG_WARN([Unknown host operating system]) cpu_type="i386" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC newoldwritesample=enabled ;; i486-*) AC_MSG_WARN([Unknown host operating system]) cpu_type="i486" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC newoldwritesample=enabled ;; i586-*) AC_MSG_WARN([Unknown host operating system]) cpu_type="x86" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC newoldwritesample=enabled ;; i686-*) AC_MSG_WARN([Unknown host operating system]) cpu_type="x86" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC newoldwritesample=enabled ;; x86_64-*) AC_MSG_WARN([Unknown host operating system]) - cpu_type="x86-64_all" + cpu_type="x86-64" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC ;; *) AC_MSG_WARN([Unknown host operating system]) cpu_type="generic_fpu" buffer=disabled - ADD_CPPFLAGS="-DGENERIC $ADD_CPPFLAGS" + sys_cppflags=-DGENERIC ;; esac @@ -671,32 +767,21 @@ AC_ARG_ENABLE(newoldwritesample, fi ]) - - dnl Did user choose other CPU type ? if test "x$with_cpu" != "x"; then cpu_type=$with_cpu fi -if test "x$cpu_type" = "xgeneric_nofpu"; then - real=disabled - int32=disabled -fi - -if test "x$cpu_type" = "xi386_nofpu"; then - real=disabled - int32=disabled -fi - -if test "x$cpu_type" = "xppc_nofpu"; then - real=disabled - int32=disabled -fi - -if test "x$cpu_type" = "xarm_nofpu"; then - real=disabled - int32=disabled -fi +# Flag for 32 bit synth output or post-processing. +case "$cpu_type" in +*_nofpu) + synth32=false + AC_DEFINE(NO_SYNTH32, 1, [ Define for post-processed 32 bit formats. ]) +;; +*) + synth32=true +;; +esac if test "x$int16" = "xdisabled"; then AC_DEFINE(NO_16BIT, 1, [ Define to disable 16 bit integer output. ]) @@ -719,16 +804,22 @@ fi if test "x$int32" = "xdisabled"; then AC_DEFINE(NO_32BIT, 1, [ Define to disable 32 bit and 24 bit integer output. ]) else - s_fpu="$s_fpu synth_s32" + if $synth32; then + s_fpu="$s_fpu synth_s32" + fi fi if test "x$real" = "xdisabled"; then AC_DEFINE(NO_REAL, 1, [ Define to disable real output. ]) else - s_fpu="$s_fpu synth_real" + if $synth32; then + s_fpu="$s_fpu synth_real" + fi fi - +if test "x$equalizer" = "xdisabled"; then + AC_DEFINE(NO_EQUALIZER, 1, [ Define to disable equalizer. ]) +fi layer1=enabled AC_ARG_ENABLE(layer1, @@ -786,26 +877,29 @@ AC_ARG_WITH([audio], [ --with-audio= Select a list (or only one) of audio output modules (comma or space separated list). ]) AC_ARG_WITH([default-audio], [ - --with-default-audio=aix Use AIX as default audio output sub-system - --with-default-audio=alib Use Alib as default audio output sub-system (for HPUX) - --with-default-audio=alsa Use ALSA as default audio output sub-system - --with-default-audio=arts Use aRts as default audio output sub-system (KDE sound server) - --with-default-audio=dummy Use dummy as default audio (when no sound card is available) - --with-default-audio=esd Use ESoundD as default audio output sub-system - --with-default-audio=hp Use HP as default audio output sub-system - --with-default-audio=jack Use JACK as default low-latency audio server - --with-default-audio=coreaudio Use Mac OS X as default audio output sub-system (CoreAudio) - --with-default-audio=mint Use MinT as default audio output sub-system (Atari) - --with-default-audio=nas Use NAS as default audio output (Network Audio System) - --with-default-audio=os2 Use OS2 as default audio output sub-system - --with-default-audio=oss Use OSS as default audio output sub-system (/dev/dsp) - --with-default-audio=portaudio Use PortAudio as default audio output sub-system - --with-default-audio=pulse Use Pulse audio server as default audio output sub-system - --with-default-audio=sdl Use SDL as default audio output sub-system (Simple DirectMedia Layer) - --with-default-audio=sgi Use SGI as default audio output sub-system (IRIX) - --with-default-audio=sndio Use OpenBSD's sndio as default audio output sub-system - --with-default-audio=sun Use Sun as default audio output sub-system (/dev/audio) - --with-default-audio=win32 Use Win32 audio as default audio output sub-system + --with-default-audio=aix Use AIX as default audio output sub-system + --with-default-audio=alib Use Alib as default audio output sub-system (for HPUX) + --with-default-audio=alsa Use ALSA as default audio output sub-system (libasound) + --with-default-audio=tinyalsa Use ALSA as default audio output sub-system (tinyalsa) + --with-default-audio=arts Use aRts as default audio output sub-system (KDE sound server) + --with-default-audio=dummy Use dummy as default audio (when no sound card is available) + --with-default-audio=esd Use ESoundD as default audio output sub-system + --with-default-audio=hp Use HP as default audio output sub-system + --with-default-audio=jack Use JACK as default low-latency audio server + --with-default-audio=coreaudio Use Mac OS X as default audio output sub-system (CoreAudio) + --with-default-audio=mint Use MinT as default audio output sub-system (Atari) + --with-default-audio=nas Use NAS as default audio output (Network Audio System) + --with-default-audio=os2 Use OS2 as default audio output sub-system + --with-default-audio=oss Use OSS as default audio output sub-system (/dev/dsp) + --with-default-audio=portaudio Use PortAudio as default audio output sub-system + --with-default-audio=pulse Use Pulse audio server as default audio output sub-system + --with-default-audio=qsa Use QSA as default audio output sub-system + --with-default-audio=sdl Use SDL as default audio output sub-system (Simple DirectMedia Layer) + --with-default-audio=sgi Use SGI as default audio output sub-system (IRIX) + --with-default-audio=sndio Use OpenBSD's sndio as default audio output sub-system + --with-default-audio=sun Use Sun as default audio output sub-system (/dev/audio) + --with-default-audio=win32 Use Win32 audio as default audio output sub-system + --with-default-audio=win32_wasapi Use Win32 wasapi audio as default audio output sub-system ]) AC_ARG_WITH([optimization], [ @@ -826,19 +920,21 @@ dnl ############## Modules # Dummy audio output module is always supported output_modules="dummy" -# Decide on module file suffix. Setting it != .la allows removal of .la files. -AC_ARG_WITH([module-suffix], [ - --with-module-suffix=.la (default) Use libtool's .la files for loading modules. - --with-module-suffix=[.so|.dll|...] Specify the native module file suffix to bypass .la files. -]) -if test x"$with_module_suffix" = x; then - with_module_suffix=.la -fi -AC_DEFINE_UNQUOTED( MODULE_FILE_SUFFIX, "$with_module_suffix", [The suffix for module files.] ) - dnl ############## Assembler, compiler properties # based on posting from John Dalgliesh on ffmpeg (LGPL) mailing list +# extended to use balign if present +AC_MSG_CHECKING([if .balign is present]) +echo '.balign 4' > conftest.s +if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then + + AC_MSG_RESULT([yes]) + AC_DEFINE(ASMALIGN_BALIGN, 1, [ Define if .balign is present. ]) + +else + +AC_MSG_RESULT([no]) + # find if .align arg is power-of-two or not asmalign_exp="unknown" if test x"$asmalign_exp" = xunknown; then @@ -855,6 +951,10 @@ if test x"$asmalign_exp" = xunknown; then fi if test x"$asmalign_exp" = xyes; then AC_DEFINE(ASMALIGN_EXP, 1, [ Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. ]) +else + AC_DEFINE(ASMALIGN_BYTE, 1, [ Define if .align just takes byte count. ]) +fi + fi ccalign="unknown" @@ -874,11 +974,66 @@ fi dnl We apply alignment hints only to cpus that need it. dnl See further below for the definition of CCALIGN +avx_support="unknown" +if test x"$avx_support" = xunknown; then + AC_MSG_CHECKING([if assembler supports AVX instructions]) + avx_support="no" + echo '.text' > conftest.s + echo 'vaddps %ymm0,%ymm0,%ymm0' >> conftest.s + if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then + avx_support="yes" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + rm -f conftest.o conftest.s +fi + +check_yasm=no +if test x"$avx_support" = xno || test x"$use_yasm" = xenabled; then + check_yasm=yes +fi +if test x"$use_yasm" = xdisabled; then + check_yasm=no +fi + +if test x"$check_yasm" = xyes; then + AC_CHECK_PROGS(YASM,[yasm],no) + if test x"$YASM" != xno; then + AC_MSG_CHECKING([if $YASM supports GAS syntax and AVX instructions]) + echo '.text' > conftest.s + echo 'vaddps %ymm0,%ymm0,%ymm0' >> conftest.s + if $YASM -pgas -rcpp -o conftest.o conftest.s 1>/dev/null 2>&1; then + avx_support="yes" + YASMFLAGS="-pgas -rgas -mamd64" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + rm -f conftest.o conftest.s + else + if test x"$use_yasm" = xenabled; then + AC_MSG_ERROR([Yasm enforced but not found!]) + fi + fi +else + YASM="no" +fi + +if test "x$cpu_type" = "xavx"; then + if test "x$avx_support" != "xyes"; then + AC_MSG_ERROR([Assembler doesn't understand AVX instructions.]) + fi +fi + +AC_SUBST(YASM) +AC_SUBST(YASMFLAGS) + dnl ############## Really basic headers, needed for other checks. AC_HEADER_STDC dnl Is it too paranoid to specifically check for stdint.h and limits.h? -AC_CHECK_HEADERS([stdio.h stdlib.h string.h unistd.h sched.h sys/ioctl.h sys/types.h stdint.h limits.h inttypes.h sys/time.h sys/wait.h sys/resource.h sys/signal.h signal.h]) +AC_CHECK_HEADERS([stdio.h stdlib.h string.h unistd.h sched.h sys/ioctl.h sys/types.h stdint.h limits.h inttypes.h sys/time.h sys/wait.h sys/resource.h sys/signal.h signal.h sys/select.h dirent.h sys/stat.h]) dnl ############## Types @@ -891,12 +1046,16 @@ dnl Using the file_offset_bits variable here is fine for linux (possibly Solaris dnl Others... we'll have to see. dnl Note: I started writing this with with multiline replacements. dnl Does not work. Automake insists on putting these into Makefiles where they break things. +dnl It is also assumed that a system that does not set file offset bits is not +dnl sensitive to largefile changes, i.e. FreeBSD always using 64 bit off_t. if test "x$ac_cv_sys_file_offset_bits" = x || echo "$ac_cv_sys_file_offset_bits" | $GREP '@<:@^0-9@:>@' > /dev/null; then dnl if it has non-numeric chars or is empty... ignore... LFS_LOBJ= + largefile_sensitive=no else # Add dual-mode wrapper code. LFS_LOBJ=lfs_wrap.lo + largefile_sensitive=yes fi # Using the lower level macros instead of AC_TYPE_* for compatibility with not freshest autoconf. @@ -905,6 +1064,7 @@ AC_CHECK_TYPE(uintptr_t, unsigned long) AC_CHECK_TYPE(ssize_t, long) AC_CHECK_TYPE(off_t, long int) AC_CHECK_TYPE(int32_t, int) +AC_CHECK_TYPE(int64_t, long long) AC_CHECK_TYPE(uint32_t, unsigned int) AC_CHECK_TYPE(int16_t, short) AC_CHECK_TYPE(uint16_t, unsigned short) @@ -914,19 +1074,30 @@ AC_CHECK_SIZEOF(off_t,4) AC_CHECK_SIZEOF(int32_t) AC_CHECK_SIZEOF(long,4) -# The alias functions want to know the native off_t bits. -# "Native" also means large file offsets, if enabled, it's what is native to the mpg123 library. -if test "x$ac_cv_sizeof_long" = "x"; then - AC_MSG_ERROR([Cannot determine sizeof(long)?]) +dnl The native type used for aliases is what off_t maps to without any largefile- +dnl enabling switches. So, it's long int if the system is largefile-senstive, +dnl but it is actual plain off_t if the system does not have such switches. +if test "x$largefile_sensitive" = xyes; then + lfs_alias_type=long + lfs_alias_size=$ac_cv_sizeof_long else - LFS_ALIAS_BITS=`expr "$ac_cv_sizeof_long" "*" "8"` + lfs_alias_type=off_t + lfs_alias_size=$ac_cv_sizeof_off_t +fi + +if test "x$lfs_alias_size" = "x"; then + AC_MSG_ERROR([Cannot determine sizeof(lfs_alias_t)?]) +else + LFS_ALIAS_BITS=`expr "$lfs_alias_size" "*" "8"` + AC_DEFINE_UNQUOTED([lfs_alias_t], $lfs_alias_type, + [Define to the native offset type (long or actually off_t).]) AC_DEFINE_UNQUOTED([LFS_ALIAS_BITS], $LFS_ALIAS_BITS, - [Define this to the size of long type in bits, used for LFS small/native alias functions.]) + [Define this to the size of native offset type in bits, used for LFS alias functions.]) fi lfs_alias=enabled AC_ARG_ENABLE(lfs-alias, - [ --disable-lfs-alias disable alias wrappers for largefile bitness (mpg123_seek_32 in addition to mpg123_seek, mpg123_seek_64 as alias on x86-64) ], + [ --disable-lfs-alias disable alias wrappers for largefile bitness (mpg123_seek_32 or mpg123_seek_64 in addition to mpg123_seek, or the other way around; It is a mess, do not play with this!) ], [ if test "x$enableval" = xno; then lfs_alias="disabled" @@ -950,6 +1121,8 @@ else AC_MSG_RESULT([no]) fi +# Again, prepend path for non-recursive make. +LFS_LOBJ=`for i in $LFS_LOBJ; do printf ' src/libmpg123/%s' $i; done` AC_SUBST(LFS_LOBJ) @@ -976,8 +1149,6 @@ AC_CHECK_FUNCS( strerror ) AC_CHECK_FUNCS( setlocale nl_langinfo ) -AC_CHECK_FUNCS( strdup ) - AC_CHECK_FUNCS( atoll ) AC_CHECK_FUNCS( mkfifo, [ have_mkfifo=yes ], [ have_mkfifo=no ] ) @@ -1001,7 +1172,7 @@ else fi dnl trying to get that socket lib settled in one line -AC_SEARCH_LIBS(gethostbyname, nsl socket) +AC_SEARCH_LIBS(gethostbyname, nsl socket network) dnl OK, two lines... Solaris needs -lnsl -lsocket AC_SEARCH_LIBS(socket, socket) @@ -1050,21 +1221,24 @@ dnl ############## Choose compiler flags and CPU # do not assume gcc here, so no flags by default ADD_CFLAGS="" -ADD_CPPFLAGS="" +ADD_CPPFLAGS="$sys_cppflags" ADD_LDFLAGS="" LIBS="$LIBS" +# Consider moving that stuff. AC_CHECK_HEADER([os2.h], [ADD_CPPFLAGS="$ADD_CPPFLAGS -DOS2"]) +# On OS/2, we need to link to os2term to make terminal control actually work. +AC_CHECK_LIB([os2term], [tcsetattr], [ADD_LDFLAGS="$ADD_LDFLAGS -los2term"]) -# If debugging is enabled then make warnings errors +# If debugging is enabled, just enable debugging symbols. +# All other stuff enters nagging territory. if test x"$debugging" = xenabled; then ADD_CFLAGS="-g" - # gcc specific... - if test x"$GCC" = xyes; then - ADD_CFLAGS="$ADD_CFLAGS -Wall -fno-strict-aliasing" - if test x"$nagging" = xenabled; then - ADD_CFLAGS="$ADD_CFLAGS -Werror -pedantic -DPLAIN_C89" - fi +fi +# gcc specific... +if test x"$GCC" = xyes; then + if test x"$nagging" = xenabled; then + ADD_CFLAGS="$ADD_CFLAGS -Wall -Werror -std=c89 -pedantic -DPLAIN_C89" fi fi @@ -1083,29 +1257,45 @@ s_i586="$s_i386 synth_i586" s_i586d="$s_i386 synth_i586_dither" s_3dnow="$s_i386 synth_3dnow dct64_3dnow equalizer_3dnow" s_3dnowext="$s_i386 dct64_3dnowext tabinit_mmx synth_3dnowext" +s_3dnow_vintage=$s_3dnow +s_3dnowext_vintage=$s_3dnowext if test "x$layer3" = "xenabled"; then - s_3dnow="$s_3dnow dct36_3dnow" - s_3dnowext="$s_3dnowext dct36_3dnowext" + s_3dnow_vintage="$s_3dnow_vintage dct36_3dnow" + s_3dnowext_vintage="$s_3dnowext_vintage dct36_3dnowext" fi s_mmx="$s_i386 dct64_mmx tabinit_mmx synth_mmx" -s_sse="$s_i386 tabinit_mmx dct64_sse dct64_sse_float synth_sse_float synth_stereo_sse_float synth_sse_s32 synth_stereo_sse_s32 " -s_x86_64="dct64_x86_64 dct64_x86_64_float synth_x86_64_float synth_x86_64_s32 synth_stereo_x86_64_float synth_stereo_x86_64_s32" +s_sse_vintage="$s_i386 tabinit_mmx dct64_sse_float synth_sse_float synth_stereo_sse_float synth_sse_s32 synth_stereo_sse_s32 " +s_sse="$s_sse_vintage dct36_sse" +s_x86_64="dct36_x86_64 dct64_x86_64_float synth_x86_64_float synth_x86_64_s32 synth_stereo_x86_64_float synth_stereo_x86_64_s32" +s_x86_64_mono_synths="synth_x86_64_float synth_x86_64_s32" +s_x86_64_avx="dct36_avx dct64_avx_float synth_stereo_avx_float synth_stereo_avx_s32" s_x86multi="getcpuflags" +s_x86_64_multi="getcpuflags_x86_64" s_dither="dither" -s_neon="dct64_neon dct64_neon_float synth_neon_float synth_neon_s32 synth_stereo_neon_float synth_stereo_neon_s32" +s_neon="dct36_neon dct64_neon_float synth_neon_float synth_neon_s32 synth_stereo_neon_float synth_stereo_neon_s32" +s_neon64="dct36_neon64 dct64_neon64_float synth_neon64_float synth_neon64_s32 synth_stereo_neon64_float synth_stereo_neon64_s32" +s_arm_multi="getcpuflags_arm check_neon" # choose optimized 16bit decoder for SSE, quality or fast # note: supporting deactivation of output formats for these decoders would need more logic here if test "x$integers" = "xquality"; then s_sse="$s_sse synth_sse_accurate synth_stereo_sse_accurate" + s_sse_vintage="$s_sse_vintage synth_sse_accurate synth_stereo_sse_accurate" s_x86_64="$s_x86_64 synth_x86_64_accurate synth_stereo_x86_64_accurate" + s_x86_64_mono_synths="$s_x86_64_mono_synths synth_x86_64_accurate" + s_x86_64_avx="$s_x86_64_avx synth_stereo_avx_accurate" s_arm="synth_arm_accurate" s_neon="$s_neon synth_neon_accurate synth_stereo_neon_accurate" + s_neon64="$s_neon64 synth_neon64_accurate synth_stereo_neon64_accurate" else - s_sse="$s_sse synth_sse" # no stereo - s_x86_64="$s_x86_64 synth_x86_64 synth_stereo_x86_64" + s_sse="$s_sse dct64_sse synth_sse" # no stereo + s_sse_vintage="$s_sse_vintage dct64_sse synth_sse" # no stereo + s_x86_64="$s_x86_64 synth_x86_64 dct64_x86_64 synth_stereo_x86_64" + s_x86_64_mono_synths="$s_x86_64_mono_synths synth_x86_64" + s_x86_64_avx="$s_x86_64_avx dct64_avx synth_stereo_avx" s_arm="synth_arm" - s_neon="$s_neon synth_neon synth_stereo_neon" + s_neon="$s_neon dct64_neon synth_neon synth_stereo_neon" + s_neon64="$s_neon64 dct64_neon64 synth_neon64 synth_stereo_neon64" fi dnl CPU specific compiler flags and sources @@ -1132,7 +1322,7 @@ dnl Not disabling buffer for float mode... check that this is OK now! ccalign=no ;; ppc_nofpu) - ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_PPC -DREAL_IS_FIXED" + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_GENERIC -DOPT_PPC -DREAL_IS_FIXED" more_sources= ccalign=no ;; @@ -1159,6 +1349,18 @@ dnl Not disabling buffer for float mode... check that this is OK now! ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_NEON -DREAL_IS_FLOAT" more_sources="$s_neon $s_fpu" ;; + arm_fpu) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_NEON -DREAL_IS_FLOAT" + more_sources="$s_neon $s_fpu $s_dither $s_arm_multi" + ;; + neon64) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_NEON64 -DREAL_IS_FLOAT" + more_sources="$s_neon64 $s_fpu" + ;; + aarch64) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_NEON64 -DREAL_IS_FLOAT" + more_sources="$s_neon64 $s_fpu $s_dither $s_arm_multi" + ;; i386) ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_I386 -DREAL_IS_FLOAT" more_sources="$s_fpu $s_i386" @@ -1192,6 +1394,10 @@ dnl Not disabling buffer for float mode... check that this is OK now! ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_I586 -DOPT_3DNOW -DREAL_IS_FLOAT" more_sources="$s_fpu $s_i586 $s_3dnow $s_x86multi " ;; + 3dnow_vintage) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_I586 -DOPT_3DNOW_VINTAGE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i586 $s_3dnow_vintage $s_x86multi " + ;; 3dnow_alone) ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_3DNOW -DREAL_IS_FLOAT" more_sources="$s_fpu $s_3dnow" @@ -1200,6 +1406,10 @@ dnl Not disabling buffer for float mode... check that this is OK now! ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_3DNOWEXT -DREAL_IS_FLOAT" more_sources="$s_fpu $s_3dnowext" ;; + 3dnowext_vintage) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_3DNOW -DOPT_3DNOWEXT_VINTAGE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_3dnowext_vintage $s_3dnow $s_x86multi" + ;; 3dnowext) ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_3DNOW -DOPT_3DNOWEXT -DREAL_IS_FLOAT" more_sources="$s_fpu $s_3dnowext $s_3dnow $s_x86multi" @@ -1212,37 +1422,62 @@ dnl Not disabling buffer for float mode... check that this is OK now! ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_SSE -DREAL_IS_FLOAT" more_sources="$s_fpu $s_sse" ;; - x86|x86_dither) - ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_I386 -DOPT_I586 -DOPT_I586_DITHER -DOPT_MMX -DOPT_3DNOW -DOPT_3DNOWEXT -DOPT_SSE -DREAL_IS_FLOAT" - more_sources="$s_fpu $s_i386 $s_i586 $s_i586d $s_mmx $s_3dnow $s_3dnowext $s_sse $s_x86multi $s_dither" + sse_vintage) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_SSE_VINTAGE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_sse_vintage" + ;; + avx) + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_AVX -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_x86_64_avx $s_x86_64_mono_synths" + if test "x$YASM" != "xno"; then + use_yasm_for_avx="yes" + fi ;; - x86-64) + x86|x86_dither) + # plain C dct36 always there, for vintage/non-vintage + # Selection of non-/vintage sources implies that + # $s_3dnow_vintage contains $s_3dnow, + # $s_sse contains $s_sse_vintage. + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_I386 -DOPT_I586 -DOPT_I586_DITHER -DOPT_MMX -DOPT_3DNOW -DOPT_3DNOW_VINTAGE -DOPT_3DNOWEXT -DOPT_3DNOWEXT_VINTAGE -DOPT_SSE -DOPT_SSE_VINTAGE -DREAL_IS_FLOAT" + more_sources="$s_fpu $s_i386 $s_i586 $s_i586d $s_mmx $s_3dnow_vintage $s_3dnowext_vintage $s_sse $s_x86multi $s_dither" + ;; + x86-64_alone) ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_X86_64 -DREAL_IS_FLOAT" more_sources="$s_fpu $s_x86_64" ;; - x86-64_all|x86-64_dither) + x86-64|x86-64_all|x86-64_dither) ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_MULTI -DOPT_X86_64 -DOPT_GENERIC -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT" - more_sources="$s_fpu $s_x86_64 $s_dither" + more_sources="$s_fpu $s_x86_64 $s_dither $s_x86_64_multi" + if test "x$avx_support" = "xyes"; then + ADD_CPPFLAGS="$ADD_CPPFLAGS -DOPT_AVX" + more_sources="$more_sources $s_x86_64_avx" + if test "x$YASM" != "xno"; then + use_yasm_for_avx="yes" + fi + fi ;; *) AC_MSG_ERROR([Unknown CPU type '$cpu_type']) ;; esac -# Mac OS X specific linker flags -case $cpu_type in - 3dnow|3dnow_alone|3dnowext|3dnowext_alone|mmx|mmx_alone|sse|sse_alone|x86|x86_dither) - case $host in - i386-apple-darwin8*|*-apple-darwin10*) - ADD_LDFLAGS="$ADD_LDFLAGS -Wl,-read_only_relocs,suppress" - ;; - i386-apple-darwin9*) - ADD_CFLAGS="$ADD_CFLAGS -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" - ADD_LDFLAGS="$ADD_LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -Wl,-classic_linker -Wl,-read_only_relocs,suppress" - ;; - esac - ;; -esac +# Use yasm instead of the default assembler for AVX sources +if test "x$use_yasm_for_avx" = "xyes"; then + case $host_os in + *cygwin*|*mingw*) + YASM_FORMAT="-f win64" + ;; + *darwin*) + YASM_FORMAT="-f macho" + ;; + *) + YASM_FORMAT="-f elf" + ;; + esac + AC_DEFINE(USE_YASM_FOR_AVX, 1, [Define to use yasm for assemble AVX sources.]) +fi +AM_CONDITIONAL( [USE_YASM_FOR_AVX], [test "x$use_yasm_for_avx" = xyes] ) +AC_SUBST(YASM_FORMAT) # Check if we want feature report function. AC_MSG_CHECKING([if we want feature report function]) @@ -1263,13 +1498,35 @@ if test "x$feature_report" = xenabled; then more_sources="$more_sources feature" fi +# Return 0 if first arg appears in list of following arguments. +# Return 1 otherwise. +word_in_list() { + word=$1 + shift + # Avoid naming conflict with the outside! + # Is local not POSIX sh? + for given_word in "$@" + do + if test "x$word" = "x$given_word"; then + return 0 + fi + done + return 1 +} + for i in $more_sources do - # Echo make sure every file is only once in the list. - echo "$DECODER_OBJ" | $GREP -v -w "$i\.\$(OBJEXT)" > /dev/null && DECODER_OBJ="$DECODER_OBJ $i.\$(OBJEXT)" - echo "$DECODER_LOBJ" | $GREP -v -w "$i\.lo" > /dev/null && DECODER_LOBJ="$DECODER_LOBJ $i.lo" + # Make sure every file is only once in the list. + word_in_list "$i.\$(OBJEXT)" $DECODER_OBJ || DECODER_OBJ="$DECODER_OBJ $i.\$(OBJEXT)" + word_in_list "$i.lo" $DECODER_LOBJ || DECODER_LOBJ="$DECODER_LOBJ $i.lo" done +# Another preprocessing step: Append prefix for non-recursive make. +# Just because $(addprefix ...) is a GNU extension. + +DECODER_OBJ=`for i in $DECODER_OBJ; do printf ' src/libmpg123/%s' $i; done` +DECODER_LOBJ=`for i in $DECODER_LOBJ; do printf ' src/libmpg123/%s' $i; done` + AC_SUBST(DECODER_OBJ) AC_SUBST(DECODER_LOBJ) @@ -1282,7 +1539,15 @@ fi dnl ############## Output module choice # The full list of supported modules to check, first come, first serve. -check_modules="alsa oss coreaudio sndio sun win32 os2 esd jack portaudio pulse sdl nas arts openal dummy" +check_modules="alsa tinyalsa oss coreaudio sndio sun win32 win32_wasapi os2 esd jack portaudio pulse sdl nas arts openal dummy" +# Only check qsa before all else on QNX. +# It would mask ALSA otherwise. +case $host in + *-nto-qnx*) + check_modules="qsa $check_modules" + ;; +esac + # The final list. output_modules= @@ -1318,7 +1583,26 @@ do check_failed=yes fi ;; + tinyalsa) + TINYALSA_LIBS="-ltinyalsa" + # Check for ALSA + AC_CHECK_LIB( [tinyalsa], [pcm_open], + [ AC_CHECK_HEADER( [tinyalsa/asoundlib.h], + [ output_modules="$output_modules tinyalsa" HAVE_TINYALSA="yes"], + [ AC_MSG_WARN([Found TINYALSA library but NOT header files on your system]) ] ) + ] + ) + if test "x$HAVE_TINYALSA" != xyes; then + check_failed=yes + fi + ;; + # QSA and ALSA are not distinguishable in these tests, need to block + # each other and play with test order depending on platform. alsa) + if test "x$HAVE_QSA" = xyes; then + HAVE_ALSA=no + else + ALSA_LIBS="-lasound" # Check for ALSA AC_CHECK_LIB( [asound], [snd_pcm_open], @@ -1330,9 +1614,40 @@ do if test "x$HAVE_ALSA" != xyes; then check_failed=yes fi + + fi # HAVE_QSA + ;; + qsa) + if test "x$HAVE_ALSA" = xyes; then + HAVE_QSA=no + else + + QSA_LIBS="-lasound" + # Check for QSA + AC_CHECK_LIB( [asound], [snd_pcm_open], + [ AC_CHECK_HEADER( [sys/asoundlib.h], + [ output_modules="$output_modules qsa" HAVE_QSA="yes"], + [ AC_MSG_WARN([Found QSA library but NOT header files on your system]) ] ) + ] + ) + if test "x$HAVE_QSA" != xyes; then + check_failed=yes + fi + + fi # HAVE_ALSA ;; jack) - PKG_CHECK_MODULES(JACK, jack, output_modules="$output_modules jack" HAVE_JACK="yes", HAVE_JACK="no" check_failed=yes) + # JACK module uses semaphores, hence -lpthread. + AC_CHECK_LIB( [pthread], [sem_post], + [ PKG_CHECK_MODULES(JACK, jack, + [ + output_modules="$output_modules jack" + HAVE_JACK="yes" + JACK_LIBS="$JACK_LIBS -lpthread" + ], [ HAVE_JACK="no" check_failed=yes ] ) + ], + [ HAVE_JACK=no check_failed=yes ] + ) ;; pulse) PKG_CHECK_MODULES(PULSE, libpulse-simple, output_modules="$output_modules pulse" HAVE_PULSE="yes", HAVE_PULSE="no" check_failed=yes) @@ -1395,7 +1710,47 @@ do # Does not work... instead just check for header # AC_CHECK_LIB( [winmm], [waveOutOpen] ) WIN32_LIBS=-lwinmm - AC_CHECK_HEADERS([windows.h], output_modules="$output_modules win32" HAVE_WIN32=yes, HAVE_WIN32=no check_failed=yes) + if test x$ac_cv_header_windows_h = xyes; then + output_modules="$output_modules win32" + HAVE_WIN32=yes + else + HAVE_WIN32=no + check_failed=yes + fi + ;; + win32_wasapi) + # Check for windows ... and win32 wasapi audio + # Does not work... instead just check for header + # AC_CHECK_LIB( [avrt], [] ) + AC_MSG_CHECKING([if we have wasapi headers]) + OLD_LIBS=$LIBS + LIBS="$LIBS -lole32 -lavrt" + AC_LINK_IFELSE([AC_LANG_SOURCE([ +#define COBJMACROS 1 +#define _WIN32_WINNT 0x601 +#include +#include +#include +#include +int main(){ + /* UUID Checks */ + GUID *IDs[] = { + &CLSID_MMDeviceEnumerator, + &IID_IMMDeviceEnumerator, + &IID_IAudioClient, + &IID_IAudioRenderClient + }; + return 0; +} + ])], [HAVE_WIN32_WASAPI=yes], [HAVE_WIN32_WASAPI=no]) + LIBS=$OLD_LIBS + WIN32_WASAPI_LIBS="-lole32 -lavrt" + AC_MSG_RESULT([$HAVE_WIN32_WASAPI]) + if test "x$HAVE_WIN32_WASAPI" = xyes; then + output_modules="$output_modules win32_wasapi" + else + check_failed=yes + fi ;; sndio) SNDIO_LIBS=-lsndio @@ -1421,12 +1776,25 @@ do fi ;; coreaudio) - COREAUDIO_LIBS="-framework AudioToolbox -framework AudioUnit -framework CoreServices" - AC_CHECK_HEADERS([AudioUnit/AudioUnit.h CoreServices/CoreServices.h AudioToolbox/AudioToolbox.h]) + COREAUDIO_LIBS="-framework AudioToolbox" + AC_CHECK_HEADERS([AudioUnit/AudioUnit.h AudioToolbox/AudioToolbox.h]) if test "x${ac_cv_header_AudioUnit_AudioUnit_h}" = "xyes" \ - -a "x${ac_cv_header_CoreServices_CoreServices_h}" = "xyes" \ -a "x${ac_cv_header_AudioToolbox_AudioToolbox_h}" = "xyes"; then + OLD_LIBS=$LIBS + LIBS="$LIBS $COREAUDIO_LIBS" + AC_MSG_CHECKING([if AudioUnit functions are available within AudioToolbox]) + AC_TRY_LINK( + [#include ], + [AudioUnitInitialize(NULL);], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + COREAUDIO_LIBS="$COREAUDIO_LIBS -framework AudioUnit"] + ) + LIBS=$OLD_LIBS + AC_CHECK_HEADERS([CoreServices/CoreServices.h], + [COREAUDIO_LIBS="$COREAUDIO_LIBS -framework CoreServices"] + ) if test x"$modules" = xdisabled; then AC_MSG_WARN([Disabling buffer because of directly linked CoreAudio! Use the module if you need the buffer.]) buffer=disabled @@ -1439,7 +1807,7 @@ do ;; arts) AC_MSG_CHECKING([for artsc]) - if artsc-config; then + if artsc-config > /dev/null 2>&1; then AC_MSG_RESULT([yes]) output_modules="$output_modules arts" HAVE_ARTS=yes @@ -1554,7 +1922,8 @@ if test "x$check_forced" = xyes -a "x$check_failed" = "xyes"; then fi # When you extend check_modules, you should extend this: -#for i in alsa oss coreaudio sndio sun win32 esd jack portaudio pulse sdl nas aix alib arts hp os2 sgi mint openal dummy; do echo $i; done | +#for i in alsa qsa oss coreaudio sndio sun win32 win32_wasapi esd jack portaudio pulse sdl nas aix alib arts hp os2 sgi mint openal dummy +#do echo $i; done | #perl -ne 'chomp; $big = uc($_); print < + #include #include int main() { MultiByteToWideChar (0, 0, NULL, 0, NULL, 0); WideCharToMultiByte (0, 0, NULL, 0, NULL, 0, NULL, NULL); + PathCombineW(0,0,0); return 0; } ])], [win32_wide_working=yes], [win32_winver_bump=yes]) @@ -1908,11 +2211,13 @@ if test "x$win32_specific_codes" = xenabled && test "x$host_os" != "xcygwin"; th #define WINVER 0x501 #define _WIN32_WINNT 0x501 #include + #include #include int main() { MultiByteToWideChar (0, 0, NULL, 0, NULL, 0); WideCharToMultiByte (0, 0, NULL, 0, NULL, 0, NULL, NULL); + PathCombineW(0,0,0); return 0; } ])], [win32_wide_working=yes], [AC_MSG_RESULT([no])]) @@ -1920,9 +2225,12 @@ if test "x$win32_specific_codes" = xenabled && test "x$host_os" != "xcygwin"; th if test "x$win32_wide_working" = xyes; then AC_MSG_RESULT([yes]) AC_DEFINE([WANT_WIN32_UNICODE], [1], [ Define to use Unicode for Windows ]) + else + LIBS=$oldlibs + AC_MSG_ERROR([Unicode support for Win32 not working]) fi else - AC_MSG_WARN([Unicode File Open for Win32 disabled]) + AC_MSG_ERROR([Unicode File Open for Win32 not available]) fi #### Check for Network functions @@ -2024,6 +2332,15 @@ fi fi #END OF WIN32 CHECKS +#### Check mingw.org for EOVERFLOW +AC_MSG_CHECKING([if we have EOVERFLOW macro]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#include +int i = (EOVERFLOW) + 0; +])],[eoverflow_present=yes],[eoverflow_present=no]) +AC_MSG_RESULT([$eoverflow_present]) +AS_IF([test "x$eoverflow_present" = "xyes"],[],[AC_DEFINE([EOVERFLOW],[EFBIG],[Use EFBIG as substitude for EOVERFLOW, mingw.org may lack the latter])]) + #### Use Win32 support codes AM_CONDITIONAL([WIN32_CODES], [ test "x$win32_specific_codes" = xenabled ]) @@ -2076,20 +2393,13 @@ fi dnl ############## Final Output -# Do that here to prevent the above tests usign -lltdl... -if test "x$modules" = xenabled; then - LIBS="-lltdl $LIBS" -fi - AC_CONFIG_FILES([ Makefile libmpg123.pc + libout123.pc mpg123.spec - doc/Makefile - src/Makefile - src/output/Makefile - src/libmpg123/Makefile src/libmpg123/mpg123.h + src/libout123/out123.h ]) AC_OUTPUT @@ -2119,20 +2429,15 @@ else echo " The lib will (try to) support default offset size, too." fi echo " LFS alias symbols ....... $lfs_alias ($LFS_ALIAS_BITS)" - -echo " Alignment checks ........ $aligncheck" -if test x"$aligncheck" = xenabled; then - if test x"$ccalign" != xyes; then - echo " (without effect since special alignment is not employed)" - fi - if test x"$GCC" = xyes; then - echo " (note that newer gcc 4.x versions do not use/need the align check)" - fi +echo " LFS alias type .......... $lfs_alias_type" +if test x"$use_yasm_for_avx" = xyes; then + echo " Use yasm (for AVX only) . enabled" +else + echo " Use yasm (for AVX only) . disabled" fi -echo -n " + +echo " Core libmpg123 features: - Integer conversion ...... $integers - New/old WRITE_SAMPLE .... $newoldwritesample Layer I ................. $layer1 Layer II ................ $layer2 Layer III ............... $layer3 @@ -2150,14 +2455,18 @@ echo -n " 16 bit integer .......... $int16 32/24 bit integer ....... $int32 real (32 bit float) ..... $real + Equalizer ............... $equalizer + Optimization detail: + Integer conversion ...... $integers + IEEE 754 hackery ........ $ieee + New/old WRITE_SAMPLE .... $newoldwritesample + new Huffman scheme ...... $newhuff -Note: Disabling core features is not commonly done and some combinations might not build/work. If you encounter such a case, help yourself (and provide a patch) or just poke the maintainers. -" +Note: Disabling core features is not commonly done and some combinations might not build/work. If you encounter such a case, help yourself (and provide a patch) or just poke the maintainers." # just an empty line echo echo " Modules ................. $modules" -echo " Module suffix ........... $with_module_suffix" echo " Checked audio modules ... $check_modules Detected audio support ..$output_modules Default output module ... $default_output_module @@ -2170,9 +2479,18 @@ if test x"$with_optimization" = x0; then echo "No optimization flags chosen, make sure you have something basic in your CFLAGS at least... " fi -if test x"$debugging" = xenabled; then - echo "CFLAGS='$CFLAGS'" - echo "LIBS='$LIBS'" -else - echo "Next type 'make' and then 'make install'." + +if test x"$cpu_type" = xi486; then + echo "WARNING: You selected the i486 decoder. This is not recommened for regular use." + echo "It was designed for actual i486 CPUs a long time ago. Generic C code is likely" + echo "to perform better nowadays. Also, the decoder misses features like volume" + echo "scaling and has clipping issues. Continue if you are into software archeology" + echo "only." fi + +echo +echo " CPPFLAGS='$CPPFLAGS'" +echo " CFLAGS='$CFLAGS'" +echo " LIBS='$LIBS'" +echo +echo "Next type 'make' and then 'make install'." diff --git a/deps/mpg123/doc/README.remote b/deps/mpg123/doc/README.remote index f16932a..c4a77fe 100644 --- a/deps/mpg123/doc/README.remote +++ b/deps/mpg123/doc/README.remote @@ -28,7 +28,7 @@ LOAD/L : load and start playing resource LOADPAUSED/LP : load but do not start playing resource -LOADLIST : load a playlist from given , and display its entries, optionally load and play one of these specificed by the integer (<0: just list, 0: play last track, >0:play track with that position in list) +LOADLIST/LL : load a playlist from given , and display its entries, optionally load and play one of these specificed by the integer (<0: just list, 0: play last track, >0:play track with that position in list) PAUSE/P: pause playback diff --git a/deps/mpg123/doc/TODO b/deps/mpg123/doc/TODO index 63653a7..72eb9f5 100644 --- a/deps/mpg123/doc/TODO +++ b/deps/mpg123/doc/TODO @@ -1,63 +1,8 @@ -We badly need: - - header reorganization (lots of stuff don't belong to mpg123.h) - - integer type safety - STOP using ints where size_t or at least long would be appropriate (expecially stream readers) - - sprintf -> snprintf (maybe with switch to support ancient libc; or replacement by us) - - rewrite httpget.c; that thing has been a can of bugs for years and I understand why when I look at it (way too many cooks) - - really parse ID3V2 tags instead of skipping; done for RVA values... using the string info (just?) needs some Unicode/Locale handling - - check support for fixed point arithmentic; generic_nofpu seems wo work generally, but resampling does not sound nice - -From Nicholas: - - Seperate out MPEG Audio decoder (only) into seperate library - - Allow choice of audio output at runtime, rather than compile time - - Choose processor optimization at runtime, rather than compile time? - From Michael (some time after/around pre-0.59s): - add CRC check. -- add 'free format stream' support. - optimize layer2.c: step_two: fraction as pointer .. process first channel 0 than channel 1 copy channel 0 to channel 1 for: i >= jsbound -- better frame reader .. especially for layer 3 - DONE by a good deal by Thomas - MPEG system stream decoder -- check again layer1 !! (Layer-1 support not heavily tested ..) - Problems with Layer1 fl7 reference stream -- Write a special (optimized) 'single channel' decode. -- optimized dct64 for down sampling modes -- native audio support for AIX and DEC -- update manpage -- optimizations for downsampling modes on layer2 and layer1 - -MORE TODO: (partially done) ---------------------------- - -A few notes on how mpg123 tries to select a 'good' -audio encoding and frequency. (not full implemented yet!!) - -- mpg123 tries to set the settings you specify on the command line - in the order of its appearence (exclusiv .. no fallback then) - (-r , --mono, --stereo, --8bit, etc ) - -- after this, mpg123 tries to set - 1. the number of channels (or fallback to mono if stereo isn't possible) - 2. the audioformat to 16 bit (or fallback to 8bit) - 3. the "best" frequency: (in this order) - - the exact stream frequency or fallback to - - 2:1 frequency or fallback to - - 4:1 frequency or try the - - nearest frequency lower than the frequency of your stream - mpg123 automagically converts the rate. - -So, if you think (or even know), that your hardware supports a higher -frequency only with eg. mono,8bit you must force mpg123 to play mono -and 8bit. ("--8bit -m") etc.... - -If you wanna a constant format eg to output the data to stdout you -must explicit force it with eg: '-r 44100 --stereo' -Else the format will be the format of the mpeg stream. - - - - - diff --git a/deps/mpg123/doc/doxy_examples.c b/deps/mpg123/doc/doxy_examples.c index 6fc851b..a5f5f25 100644 --- a/deps/mpg123/doc/doxy_examples.c +++ b/deps/mpg123/doc/doxy_examples.c @@ -1,7 +1,7 @@ -/** \defgroup mpg123_examples example programs using libmpg123 +/** \defgroup mpg123_examples example programs using libmpg123 and libout123 @{ */ -/** \file mpg123_to_wav.c A simple MPEG audio to WAV converter using libmpg123 (read) and libsndfile (write). +/** \file mpg123_to_out123.c A simple MPEG audio to WAV converter using libmpg123 (read) and libout123 (write). ...an excersize on two simple APIs. */ /** \file mpglib.c Example program mimicking the old mpglib test program. diff --git a/deps/mpg123/doc/doxygen.conf b/deps/mpg123/doc/doxygen.conf index 74616c7..c1bb7e8 100644 --- a/deps/mpg123/doc/doxygen.conf +++ b/deps/mpg123/doc/doxygen.conf @@ -3,13 +3,23 @@ # doxygen (www.doxygen.org) for a project # -PROJECT_NAME = "libmpg123" +PROJECT_NAME = "libmpg123 & libout123" OUTPUT_DIRECTORY = . CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English FULL_PATH_NAMES = NO -INPUT = doxy_examples.c examples/mpg123_to_wav.c examples/mpglib.c examples/scan.c examples/feedseek.c examples/id3dump.c ../src/libmpg123/mpg123.h +INPUT = \ + doxy_examples.c \ + examples/mpg123_to_out123.c \ + examples/mpglib.c \ + examples/scan.c \ + examples/feedseek.c \ + examples/extract_frames.c \ + examples/id3dump.c \ + ../src/libmpg123/mpg123.h \ + ../src/libmpg123/fmt123.h \ + ../src/libout123/out123.h OPTIMIZE_OUTPUT_FOR_C = YES EXTRACT_ALL = NO HIDE_UNDOC_MEMBERS = NO @@ -38,4 +48,5 @@ MAN_LINKS = YES GENERATE_XML = NO HTML_HEADER = doxyhead.xhtml +HTML_FOOTER = doxyfoot.xhtml HTML_FILE_EXTENSION = .shtml diff --git a/deps/mpg123/doc/doxyhead.xhtml b/deps/mpg123/doc/doxyhead.xhtml index 87186f3..d5569d6 100644 --- a/deps/mpg123/doc/doxyhead.xhtml +++ b/deps/mpg123/doc/doxyhead.xhtml @@ -1,12 +1,17 @@ - + $title - + +

API documentation for libmpg123 and libout123

Note: This API doc is automatically generated from the current development version that you can get via Subversion or as a daily snapshot from http://mpg123.org/snapshot. - There may be differences (additions) compared to the latest stable release. See NEWS.libmpg123 and the overall NEWS file on libmpg123 versions and important changes between them.
- Let me emphasize that the policy for libmpg123 is to always stay backwards compatible -- only additions are planned (and it's not yet planned to change the plans;-). + There may be differences (additions) compared to the latest stable release. See + NEWS.libmpg123, + NEWS.libout123, + and the overall NEWS file on libmpg123 versions and important changes between them.
+ Let me emphasize that the policy for libmpg123 and libout123 is to always stay backwards compatible -- only additions are planned (and it's not yet planned to change the plans;-).
+
diff --git a/deps/mpg123/doc/examples/Makefile b/deps/mpg123/doc/examples/Makefile index 52f1b07..1429978 100644 --- a/deps/mpg123/doc/examples/Makefile +++ b/deps/mpg123/doc/examples/Makefile @@ -1,4 +1,13 @@ -targets = feedseek mpg123_to_wav mpg123_to_wav_replaced_io scan id3dump mpglib dump_seekindex extract_frames +targets = \ + mpg123_test \ + feedseek \ + mpg123_to_out123 \ + mpg123_to_wav_replaced_io \ + scan \ + id3dump \ + mpglib \ + dump_seekindex \ + extract_frames all: $(targets) @@ -9,22 +18,24 @@ all: $(targets) ifeq ($(MPG123_PREFIX),) MPG123_CFLAGS := $(shell pkg-config --cflags libmpg123) MPG123_LDFLAGS := $(shell pkg-config --libs libmpg123) + OUT123_CFLAGS := $(shell pkg-config --cflags libout123) + OUT123_LDFLAGS := $(shell pkg-config --libs libout123) else # Yeah, that's with GNU/Linux in mind, at least GNU ld ... MPG123_CFLAGS := -I$(MPG123_PREFIX)/include MPG123_LDFLAGS := -L$(MPG123_PREFIX)/lib -Wl,-rpath $(MPG123_PREFIX)/lib -lmpg123 + OUT123_CFLAGS := -I$(MPG123_PREFIX)/include + OUT123_LDFLAGS := -L$(MPG123_PREFIX)/lib -Wl,-rpath $(MPG123_PREFIX)/lib -lout123 endif -SND_CFLAGS := $(shell pkg-config --cflags sndfile) -SND_LDFLAGS := $(shell pkg-config --libs sndfile) # Oder of libs not that important here... compile = $(CC) $(CPPFLAGS) $(CFLAGS) $(MPG123_CFLAGS) linkflags = $(MPG123_LDFLAGS) $(LDFLAGS) -mpg123_to_wav: mpg123_to_wav.c - $(compile) -o mpg123_to_wav mpg123_to_wav.c $(SND_CFLAGS) $(SND_LDFLAGS) $(linkflags) +mpg123_to_out123: mpg123_to_out123.c + $(compile) -o $@ $< $(OUT123_CFLAGS) $(OUT123_LDFLAGS) $(linkflags) mpg123_to_wav_replaced_io: mpg123_to_wav_replaced_io.c - $(compile) -o $@ $< $(SND_CFLAGS) $(SND_LDFLAGS) $(linkflags) + $(compile) -o $@ $< $(OUT123_CFLAGS) $(OUT123_LDFLAGS) $(linkflags) feedseek: feedseek.c $(compile) -o feedseek feedseek.c $(linkflags) @@ -41,6 +52,9 @@ dump_seekindex: dump_seekindex.c mpglib: mpglib.c $(compile) -o mpglib mpglib.c $(linkflags) +mpg123_test: mpg123_test.c + $(compile) -o $@ $< $(linkflags) + extract_frames: extract_frames.c $(compile) -o $@ $< $(linkflags) diff --git a/deps/mpg123/doc/examples/extract_frames.c b/deps/mpg123/doc/examples/extract_frames.c index 9f5ff73..f5ee58c 100644 --- a/deps/mpg123/doc/examples/extract_frames.c +++ b/deps/mpg123/doc/examples/extract_frames.c @@ -34,7 +34,7 @@ int main(int argc, char **argv) } else { - fprintf(stderr, "I'll take your dirty MPEG audio from standard input and will write the extrated pure MPEG data to stadard output.\n"); + fprintf(stderr, "I'll take your dirty MPEG audio from standard input and will write the extracted pure MPEG data to standard output.\n"); if(argc > 1 && strcmp(argv[1], "--noinfo") == 0) { fprintf(stderr, "Enabling parsing/consuming of the Info frame so that it will not appear in output.\n"); diff --git a/deps/mpg123/m4/libtool.m4 b/deps/mpg123/m4/libtool.m4 index 44e0ecf..a3bc337 100644 --- a/deps/mpg123/m4/libtool.m4 +++ b/deps/mpg123/m4/libtool.m4 @@ -1,8 +1,6 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -10,36 +8,30 @@ # 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, 2009, 2010, 2011 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. +# Copyright (C) 2014 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 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. +# 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 +# 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. +# along with this program. If not, see . ]) -# serial 57 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -67,7 +59,7 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -91,7 +83,7 @@ dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -111,26 +103,43 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) +# _LT_PREPARE_CC_BASENAME +# ----------------------- +m4_defun([_LT_PREPARE_CC_BASENAME], [ +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in @S|@*""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} +])# _LT_PREPARE_CC_BASENAME + + # _LT_CC_BASENAME(CC) # ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, +# but that macro is also expanded into generated libtool script, which +# arranges for $SED and $ECHO to be set by different means. 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 "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +[m4_require([_LT_PREPARE_CC_BASENAME])dnl +AC_REQUIRE([_LT_DECL_SED])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +func_cc_basename $1 +cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} @@ -177,15 +186,16 @@ m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl +m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -198,7 +208,7 @@ 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 + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -209,14 +219,14 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# 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" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -269,14 +279,14 @@ no_glob_subst='s/\*/\\\*/g' # _LT_PROG_LTMAIN # --------------- -# Note that this code is called both from `configure', and `config.status' +# 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, +# '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" +ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN @@ -286,7 +296,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # 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' +# in macros and then make a single call at the end using the 'libtool' # label. @@ -421,8 +431,8 @@ m4_define([_lt_decl_all_varnames], # _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 +# 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 "$][$1" | $SED "$delay_single_quote_subst"`']) @@ -446,7 +456,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], # 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 +available_tags='_LT_TAGS'dnl ]) @@ -474,7 +484,7 @@ 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' +# 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], @@ -500,8 +510,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # 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 +# 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], @@ -547,7 +557,7 @@ for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -560,7 +570,7 @@ for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -576,7 +586,7 @@ _LT_OUTPUT_LIBTOOL_INIT # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this +# '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). @@ -598,7 +608,7 @@ AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl +test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT @@ -621,7 +631,7 @@ exec AS_MESSAGE_LOG_FD>>config.log } >&AS_MESSAGE_LOG_FD lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, +'$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. @@ -643,7 +653,7 @@ Copyright (C) 2011 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 +while test 0 != $[#] do case $[1] in --version | --v* | -V ) @@ -656,10 +666,10 @@ do lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; esac shift done @@ -685,7 +695,7 @@ chmod +x "$CONFIG_LT" # 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. lt_cl_success=: -test "$silent" = yes && +test yes = "$silent" && 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 @@ -705,32 +715,47 @@ m4_defun([_LT_CONFIG], _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 + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + 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 +# Generated automatically by $as_me ($PACKAGE) $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. -# + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + _LT_COPYING _LT_LIBTOOL_TAGS +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +_LT_PREPARE_MUNGE_PATH_LIST +_LT_PREPARE_CC_BASENAME + +# ### END FUNCTIONS SHARED WITH CONFIGURE + _LT_EOF case $host_os in @@ -739,7 +764,7 @@ _LT_EOF # 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 +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -756,8 +781,6 @@ _LT_EOF sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - _LT_PROG_REPLACE_SHELLFNS - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -775,7 +798,6 @@ _LT_EOF [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS @@ -974,7 +996,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 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 + 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 @@ -992,7 +1014,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1010,7 +1032,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], @@ -1032,7 +1054,7 @@ _LT_EOF _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1042,32 +1064,32 @@ _LT_EOF ]) case $host_os in rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _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' ;; + _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' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; 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' + if test yes = "$lt_cv_ld_exported_symbols_list"; 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}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -1087,29 +1109,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - _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}" + _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}" +[ if test yes != "$lt_cv_apple_cc_single_mod"; 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 @@ -1129,7 +1151,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then +if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], @@ -1147,7 +1169,7 @@ else _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) @@ -1167,8 +1189,8 @@ m4_define([_LT_SHELL_INIT], # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). +# of the generated configure script that will find a shell with a builtin +# printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO @@ -1196,10 +1218,10 @@ fi # Invoke $ECHO with all args, space-separated. func_echo_all () { - $ECHO "$*" + $ECHO "$*" } -case "$ECHO" in +case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; @@ -1225,16 +1247,17 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], +[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -1244,14 +1267,14 @@ case ${with_sysroot} in #( no|'') ;; #( *) - AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) +[dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- @@ -1259,31 +1282,33 @@ 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 +test no = "$enable_libtool_lock" || 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. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. 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" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -1312,9 +1337,46 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1324,9 +1386,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1345,7 +1417,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1363,19 +1438,20 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + 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 + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1383,7 +1459,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*) + i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -1392,7 +1468,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" + LD=${LD-ld}_sol2 fi ;; *) @@ -1408,7 +1484,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK @@ -1427,11 +1503,11 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -1439,7 +1515,7 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], ]) ]) -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -1470,7 +1546,7 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -1506,7 +1582,7 @@ 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" + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # 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 @@ -1533,7 +1609,7 @@ AC_CACHE_CHECK([$1], [$2], $RM conftest* ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) @@ -1555,7 +1631,7 @@ AC_DEFUN([_LT_LINKER_OPTION], m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no - save_LDFLAGS="$LDFLAGS" + 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 @@ -1574,10 +1650,10 @@ AC_CACHE_CHECK([$1], [$2], fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) @@ -1598,7 +1674,7 @@ AC_DEFUN([LT_CMD_MAX_LEN], AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -1638,7 +1714,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # 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` @@ -1688,22 +1764,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$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 + 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"`env echo "$teststring$teststring" 2>/dev/null` \ + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -1719,7 +1796,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; esac ]) -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) @@ -1747,7 +1824,7 @@ m4_defun([_LT_HEADER_DLFCN], # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : +if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -1794,9 +1871,9 @@ else # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -1822,7 +1899,7 @@ int main () return status; }] _LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + 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 @@ -1843,7 +1920,7 @@ rm -fr conftest* # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then +if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -1853,44 +1930,52 @@ else case $host_os in beos*) - lt_cv_dlopen="load_add_on" + 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=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # 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=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], + [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], + [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [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"]) + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) @@ -1899,21 +1984,21 @@ else ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], @@ -1923,7 +2008,7 @@ else lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; 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 @@ -1933,9 +2018,9 @@ else ]) fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -2027,8 +2112,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS], 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 +hard_links=nottested +if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; 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 @@ -2038,8 +2123,8 @@ if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != 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]) + if test no = "$hard_links"; then + AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else @@ -2066,8 +2151,8 @@ 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.]) +AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", + [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR @@ -2079,15 +2164,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH], _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 + test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # 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 + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && + test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else @@ -2101,12 +2186,12 @@ else 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 +if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || + test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -2130,7 +2215,7 @@ else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) @@ -2148,6 +2233,47 @@ _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB +# _LT_PREPARE_MUNGE_PATH_LIST +# --------------------------- +# Make sure func_munge_path_list() is defined correctly. +m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], +[[# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x@S|@2 in + x) + ;; + *:) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" + ;; + x:*) + eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" + ;; + *) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + esac +} +]])# _LT_PREPARE_PATH_LIST + + # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics @@ -2158,17 +2284,18 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -2184,28 +2311,35 @@ if test "$GCC" = yes; then ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # 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` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac 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 + 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" + elif test -n "$lt_multi_os_dir"; then 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; +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; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -2219,7 +2353,7 @@ BEGIN {RS=" "; FS="/|\n";} { # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -2228,7 +2362,7 @@ fi]) library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -2245,14 +2379,17 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown +AC_ARG_VAR([LT_SYS_LIBRARY_PATH], +[User-defined run-time library search path.]) + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + 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' + soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) @@ -2260,41 +2397,91 @@ aix[[4-9]]*) need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + 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 + # 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 + 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 + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot 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 + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # 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 + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a[(]lib.so.V[)]' # 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 + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -2304,18 +2491,18 @@ amigaos*) 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}' + 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=`func_echo_all "$lib" | $SED '\''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' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -2323,8 +2510,8 @@ beos*) bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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" @@ -2336,7 +2523,7 @@ bsdi[[45]]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -2345,8 +2532,8 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc 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'\''`~ + 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~ @@ -2362,17 +2549,17 @@ cygwin* | mingw* | pw32* | cegcc*) 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}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; 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}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -2381,8 +2568,8 @@ m4_if([$1], [],[ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -2409,7 +2596,7 @@ m4_if([$1], [],[ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -2422,8 +2609,8 @@ m4_if([$1], [],[ esac # 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'\''`~ + 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' @@ -2436,7 +2623,7 @@ m4_if([$1], [],[ *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -2449,8 +2636,8 @@ darwin* | rhapsody*) 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' + 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`' @@ -2463,8 +2650,8 @@ dgux*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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 ;; @@ -2482,12 +2669,13 @@ freebsd* | dragonfly*) 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}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -2512,26 +2700,15 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - 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 - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + 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=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -2549,14 +2726,15 @@ hpux9* | hpux10* | hpux11*) 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 + 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -2564,8 +2742,8 @@ hpux9* | hpux10* | hpux11*) 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' + 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 ;; @@ -2574,8 +2752,8 @@ hpux9* | hpux10* | hpux11*) 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' + 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, ... @@ -2588,8 +2766,8 @@ interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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 @@ -2600,7 +2778,7 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -2608,8 +2786,8 @@ irix5* | irix6* | nonstopux*) 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}' + 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= @@ -2628,8 +2806,8 @@ irix5* | irix6* | nonstopux*) 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}" + 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 ;; @@ -2638,13 +2816,33 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # 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 + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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 @@ -2669,7 +2867,12 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) # before this can be enabled. hardcode_into_libs=yes - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) 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;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" @@ -2689,12 +2892,12 @@ netbsd*) 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' + 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' + 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 @@ -2704,7 +2907,7 @@ netbsd*) newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + 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 ;; @@ -2713,58 +2916,68 @@ newsos6) 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' + 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*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + 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 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - shlibpath_overrides_runpath=yes + need_version=yes fi + 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 + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + 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' ;; 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}' + 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" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -2775,8 +2988,8 @@ solaris*) version_type=linux # correct to gnu/linux during the next big refactor 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' + 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 @@ -2786,11 +2999,11 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + 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 + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -2798,8 +3011,8 @@ sunos4*) sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + 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) @@ -2820,24 +3033,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + 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 + version_type=sco 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' + 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 + if test yes = "$with_gnu_ld"; 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' @@ -2855,7 +3068,7 @@ tpf*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + 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 @@ -2863,8 +3076,8 @@ tpf*) uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + 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 ;; @@ -2873,20 +3086,30 @@ uts4*) ;; esac AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; 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" +if test set = "${lt_cv_sys_lib_search_path_spec+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" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) @@ -2919,39 +3142,41 @@ _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_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], + [Detected run-time system search path for libraries]) +_LT_DECL([], [configure_time_lt_sys_library_path], [2], + [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- -# find a file program which can recognize shared library +# find a file program that 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_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 + 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" + 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 -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" + 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 : @@ -2974,11 +3199,11 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else @@ -2996,7 +3221,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- -# find a file program which can recognize a shared library +# find a file program that 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 @@ -3023,16 +3248,16 @@ m4_require([_LT_PROG_ECHO_BACKSLASH])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], + [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; 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 + # 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` ;; @@ -3046,7 +3271,7 @@ if test "$GCC" = yes; then 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" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -3057,37 +3282,37 @@ if test "$GCC" = yes; then with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; 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 + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + 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" + 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 conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], +[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi]) +rm -f conftest.i conftest2.i conftest.out]) +])# _LT_PATH_DD + + +# _LT_CMD_TRUNCATE +# ---------------- +# find command to truncate a binary pipe +m4_defun([_LT_CMD_TRUNCATE], +[m4_require([_LT_PATH_DD]) +AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], +[printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) +_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], + [Command to truncate a binary pipe]) +])# _LT_CMD_TRUNCATE + + # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies @@ -3173,13 +3435,13 @@ 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. +# '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. +# that 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]]*) @@ -3206,8 +3468,7 @@ 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. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + 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 @@ -3243,10 +3504,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3285,7 +3542,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -3307,8 +3564,8 @@ newos6*) 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 +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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)$' @@ -3361,6 +3618,9 @@ sysv4 | sysv4.3*) tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac ]) @@ -3401,33 +3661,38 @@ AC_DEFUN([LT_PATH_NM], 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" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + 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 + 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" + 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 + 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: + # 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'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -3438,21 +3703,21 @@ else esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -3460,8 +3725,8 @@ else esac fi AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -3507,8 +3772,8 @@ lt_cv_sharedlib_from_linklib_cmd, case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -3520,7 +3785,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) @@ -3547,13 +3812,28 @@ AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL +# _LT_DLL_DEF_P([FILE]) +# --------------------- +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with func_dll_def_p in the libtool script +AC_DEFUN([_LT_DLL_DEF_P], +[dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +])# _LT_DLL_DEF_P + + # LT_LIB_M # -------- # check for math library @@ -3565,11 +3845,11 @@ case $host in # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) - AC_CHECK_LIB(m, cos, LIBM="-lm") + AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) @@ -3588,7 +3868,7 @@ m4_defun([_LT_COMPILER_NO_RTTI], _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; @@ -3640,7 +3920,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; @@ -3673,14 +3953,44 @@ case `$NM -V 2>&1` in symcode='[[ABCDGIRSTW]]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # 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'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$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'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3698,21 +4008,24 @@ for ac_symprfx in "" "_"; do # 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. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported 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};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 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))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,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'" @@ -3752,11 +4065,11 @@ _LT_EOF if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else @@ -3782,7 +4095,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -3802,9 +4115,9 @@ _LT_EOF mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + 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 + if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -3825,7 +4138,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -3852,12 +4165,16 @@ _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_import], [lt_cv_sys_global_symbol_to_import], [1], + [Transform the output of nm into a list of symbols to manually relocate]) _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_DECL([nm_interface], [lt_cv_nm_interface], [1], + [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3873,17 +4190,18 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then + if test yes = "$GXX"; 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 + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -3894,8 +4212,8 @@ m4_if([$1], [CXX], [ ;; 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'. + # 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 @@ -3911,6 +4229,11 @@ m4_if([$1], [CXX], [ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -3960,7 +4283,7 @@ m4_if([$1], [CXX], [ case $host_os in aix[[4-9]]*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4001,14 +4324,14 @@ m4_if([$1], [CXX], [ 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_static, $1)='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; 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' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -4037,7 +4360,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4045,7 +4368,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. + # 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' @@ -4190,17 +4513,18 @@ m4_if([$1], [CXX], [ fi ], [ - if test "$GCC" = yes; then + if test yes = "$GCC"; 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 + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -4211,8 +4535,8 @@ m4_if([$1], [CXX], [ ;; 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'. + # 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 @@ -4229,6 +4553,11 @@ m4_if([$1], [CXX], [ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -4299,7 +4628,7 @@ m4_if([$1], [CXX], [ case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4307,11 +4636,30 @@ m4_if([$1], [CXX], [ fi ;; + 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' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + 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']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -4327,7 +4675,7 @@ m4_if([$1], [CXX], [ ;; 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' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -4336,9 +4684,9 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # 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' @@ -4363,6 +4711,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny 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)='-static' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -4460,7 +4814,7 @@ m4_if([$1], [CXX], [ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi @@ -4489,7 +4843,7 @@ m4_if([$1], [CXX], [ fi ]) case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; @@ -4555,17 +4909,21 @@ m4_if([$1], [CXX], [ 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 - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX 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") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { 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' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in @@ -4611,9 +4969,9 @@ m4_if([$1], [CXX], [ # 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'. + # 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 @@ -4629,7 +4987,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # 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 + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -4637,7 +4995,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; esac @@ -4647,7 +5005,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -4669,24 +5027,24 @@ dnl Note also adjust exclude_expsyms for C++ above. esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + 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' + _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' + _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 + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 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 ... @@ -4699,7 +5057,7 @@ dnl Note also adjust exclude_expsyms for C++ above. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -4718,7 +5076,7 @@ _LT_EOF 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_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -4734,7 +5092,7 @@ _LT_EOF _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' + _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 @@ -4744,7 +5102,7 @@ _LT_EOF # _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(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -4752,61 +5110,89 @@ _LT_EOF _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 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' + _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, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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 ;; haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + 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' + _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' + _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 + if test linux-dietlibc = "$host_os"; 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 + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -4817,42 +5203,47 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _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; func_echo_all \"$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' + _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 + if test yes = "$supports_anon_versioning"; 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' + 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 + tcc*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' + ;; xlf* | bgf* | bgxlf* | mpixlf*) # 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)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; 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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4866,8 +5257,8 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4885,8 +5276,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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 @@ -4898,7 +5289,7 @@ _LT_EOF _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 +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** 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 @@ -4913,9 +5304,9 @@ _LT_EOF # 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' + _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 @@ -4932,15 +5323,15 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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 + if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= @@ -4956,7 +5347,7 @@ _LT_EOF # 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 + if test yes = "$GCC" && 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 @@ -4964,34 +5355,57 @@ _LT_EOF ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; 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="" + 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 - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX 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") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { 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' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive 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 + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -5010,13 +5424,21 @@ _LT_EOF _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,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; 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` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -5035,61 +5457,80 @@ _LT_EOF ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; 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' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _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 + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; 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([$1]) - _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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; 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' + if test ia64 = "$host_cpu"; 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" + _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([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _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' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _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' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -5098,7 +5539,7 @@ _LT_EOF 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_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -5128,16 +5569,17 @@ _LT_EOF # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -5146,18 +5588,18 @@ _LT_EOF # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -5166,7 +5608,7 @@ _LT_EOF # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -5216,33 +5658,33 @@ _LT_EOF ;; hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$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' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _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' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $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' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$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' + _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 @@ -5250,25 +5692,25 @@ _LT_EOF ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _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 $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $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' + _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+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ @@ -5276,14 +5718,14 @@ _LT_EOF # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -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'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -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' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in @@ -5294,7 +5736,7 @@ _LT_EOF *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _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. @@ -5305,16 +5747,16 @@ _LT_EOF ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $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. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + [save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], @@ -5327,21 +5769,31 @@ _LT_EOF end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + LDFLAGS=$save_LDFLAGS]) + if test yes = "$lt_cv_irix_exported_symbol"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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" && func_echo_all "-set_version $verstring"` -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_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 ;; + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(ld_shlibs, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + netbsd*) 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 @@ -5356,7 +5808,7 @@ _LT_EOF 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_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; @@ -5364,27 +5816,19 @@ _LT_EOF *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) 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 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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' + _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 + _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' fi else _LT_TAGVAR(ld_shlibs, $1)=no @@ -5395,33 +5839,53 @@ _LT_EOF _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' + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; 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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; 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" && func_echo_all "$wl-set_version $wl$verstring"` $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" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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_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} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $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" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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 "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -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' @@ -5432,24 +5896,24 @@ _LT_EOF solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $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 $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $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_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' + $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' + 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' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -5459,11 +5923,11 @@ _LT_EOF 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 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' + if test yes = "$GCC"; 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 @@ -5473,10 +5937,10 @@ _LT_EOF ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; 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' + _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 @@ -5525,43 +5989,43 @@ _LT_EOF ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _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' + if test yes = "$GCC"; 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' + _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 + # Note: We CANNOT 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(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_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' + _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' + if test yes = "$GCC"; 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' + _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 ;; @@ -5576,17 +6040,17 @@ _LT_EOF ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + _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 +test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld @@ -5603,7 +6067,7 @@ x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -5683,12 +6147,12 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], _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 + [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 + [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 + "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 @@ -5729,10 +6193,10 @@ dnl [Compiler flag to generate thread safe objects]) # ------------------------ # 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'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" +lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. @@ -5772,18 +6236,18 @@ if test -n "$compiler"; then LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB - # Report which library types will actually be built + # Report what 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 + test no = "$can_build_shared" && 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 + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -5791,8 +6255,12 @@ if test -n "$compiler"; then ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -5800,13 +6268,13 @@ if test -n "$compiler"; then 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 + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP -CC="$lt_save_CC" +CC=$lt_save_CC ])# _LT_LANG_C_CONFIG @@ -5814,14 +6282,14 @@ CC="$lt_save_CC" # -------------------------- # 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'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then +if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes @@ -5863,7 +6331,7 @@ _LT_TAGVAR(objext, $1)=$objext # 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 +if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" @@ -5905,35 +6373,35 @@ if test "$_lt_caught_CXX_error" != yes; then 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 + if test yes = "$GXX"; 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 + if test yes = "$GXX"; 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 $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + if test yes = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -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' + _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}' + 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' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi @@ -5969,18 +6437,30 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; 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="" + 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. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in @@ -5990,6 +6470,13 @@ if test "$_lt_caught_CXX_error" != yes; then ;; esac done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -6008,13 +6495,21 @@ if test "$_lt_caught_CXX_error" != yes; then _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,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GXX" = yes; then + if test yes = "$GXX"; 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` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -6032,64 +6527,84 @@ if test "$_lt_caught_CXX_error" != yes; then fi esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; 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' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _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 + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; 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' + # The "-G" linker flag allows undefined symbols. + _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; 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' + if test ia64 = "$host_cpu"; 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" + _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([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _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' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _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' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -6099,7 +6614,7 @@ if test "$_lt_caught_CXX_error" != yes; 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' + _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 @@ -6127,57 +6642,58 @@ if test "$_lt_caught_CXX_error" != yes; then # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # g++ # _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(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _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' + _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, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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 @@ -6188,6 +6704,34 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_DARWIN_LINKER_FEATURES($1) ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + dgux*) case $cc_basename in ec++*) @@ -6222,18 +6766,15 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) - ;; - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _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(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 @@ -6245,7 +6786,7 @@ if test "$_lt_caught_CXX_error" != yes; then _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' + _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 "x$output_objdir/$soname" = "x$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. @@ -6254,11 +6795,11 @@ if test "$_lt_caught_CXX_error" != yes; then # 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; func_echo_all "$list"' + 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; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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' + if test yes = "$GXX"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -6268,15 +6809,15 @@ if test "$_lt_caught_CXX_error" != yes; then ;; hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; 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' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi @@ -6302,13 +6843,13 @@ if test "$_lt_caught_CXX_error" != yes; then 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' + _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+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' + _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 @@ -6319,20 +6860,20 @@ if test "$_lt_caught_CXX_error" != yes; then # 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; func_echo_all "$list"' + 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; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; 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' + _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 $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -6347,22 +6888,22 @@ if test "$_lt_caught_CXX_error" != yes; then 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' + _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' + _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" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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 @@ -6371,22 +6912,22 @@ if test "$_lt_caught_CXX_error" != yes; then _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 $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -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_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) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6394,8 +6935,8 @@ if test "$_lt_caught_CXX_error" != yes; then # 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' + _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. @@ -6404,10 +6945,10 @@ if test "$_lt_caught_CXX_error" != yes; then # 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; func_echo_all "$list"' + 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; func_echo_all "$list"' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _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. @@ -6421,59 +6962,59 @@ if test "$_lt_caught_CXX_error" != yes; then # 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' + _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' + _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' + _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 | sort | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $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 | sort | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $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 | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + 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 | sort | $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 | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + 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 | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above 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' + _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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _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; func_echo_all \"$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' + _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' @@ -6487,18 +7028,18 @@ if test "$_lt_caught_CXX_error" != yes; then # 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=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # 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(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 yes = "$supports_anon_versioning"; 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' + 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 ;; *) @@ -6506,10 +7047,10 @@ if test "$_lt_caught_CXX_error" != yes; then *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(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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _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; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on @@ -6567,22 +7108,17 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) + openbsd* | bitrig*) 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' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; 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=func_echo_all else @@ -6598,9 +7134,9 @@ if test "$_lt_caught_CXX_error" != yes; then # 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_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_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using @@ -6618,17 +7154,17 @@ if test "$_lt_caught_CXX_error" != yes; then 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" && func_echo_all "${wl}-set_version $verstring"` -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)=' $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" && func_echo_all "$wl-set_version $verstring"` -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" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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 "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' + 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 "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac @@ -6643,21 +7179,21 @@ if test "$_lt_caught_CXX_error" != yes; then # 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=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + if test yes,no = "$GXX,$with_gnu_ld"; 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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $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_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists @@ -6703,9 +7239,9 @@ if test "$_lt_caught_CXX_error" != yes; then # 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_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' + $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 @@ -6713,7 +7249,7 @@ if test "$_lt_caught_CXX_error" != yes; then solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # 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' ;; @@ -6730,30 +7266,30 @@ if test "$_lt_caught_CXX_error" != yes; then ;; 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' + _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 test yes,no = "$GXX,$with_gnu_ld"; 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 $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $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 $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -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 -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require `-G' NOT `-shared' on this + # 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_cmds, $1)='$CC -G -nostdlib $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' + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -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 @@ -6761,11 +7297,11 @@ if test "$_lt_caught_CXX_error" != yes; then output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + _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' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi @@ -6774,52 +7310,52 @@ if test "$_lt_caught_CXX_error" != yes; then ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _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 -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' + _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 + # Note: We CANNOT 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(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_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' + _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 -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(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" + '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) - _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' + _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 ;; @@ -6850,10 +7386,10 @@ if test "$_lt_caught_CXX_error" != yes; then esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$GXX + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6880,7 +7416,7 @@ if test "$_lt_caught_CXX_error" != yes; then 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 +fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG @@ -6902,13 +7438,14 @@ AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + case @S|@2 in + .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; + *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -6992,13 +7529,13 @@ if AC_TRY_EVAL(ac_compile); then pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in + case $prev$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 + if test x-L = "$p" || + test x-R = "$p"; then prev=$p continue fi @@ -7014,16 +7551,16 @@ if AC_TRY_EVAL(ac_compile); then case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in + if test no = "$pre_test_object_deps_done"; then + case $prev 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}" + _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}" + _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 @@ -7031,9 +7568,9 @@ if AC_TRY_EVAL(ac_compile); then esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" + _LT_TAGVAR(postdeps, $1)=$prev$p else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= @@ -7048,15 +7585,15 @@ if AC_TRY_EVAL(ac_compile); then continue fi - if test "$pre_test_object_deps_done" = no; then + if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" + _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" + _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi @@ -7087,51 +7624,6 @@ interix[[3-9]]*) _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* | sunCC*) - # 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 ]) @@ -7140,7 +7632,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in 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!^ !!'` + _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]) @@ -7160,10 +7652,10 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1], # -------------------------- # 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'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then +if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi @@ -7200,7 +7692,7 @@ _LT_TAGVAR(objext, $1)=$objext # 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 +if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7222,7 +7714,7 @@ if test "$_lt_disable_F77" != yes; then _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} @@ -7236,21 +7728,25 @@ if test "$_lt_disable_F77" != yes; then AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && 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 + test yes = "$enable_shared" && 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 + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7258,11 +7754,11 @@ if test "$_lt_disable_F77" != yes; then 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 + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$G77 + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7279,9 +7775,9 @@ if test "$_lt_disable_F77" != yes; then fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG @@ -7291,11 +7787,11 @@ AC_LANG_POP # ------------------------- # 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'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) -if test -z "$FC" || test "X$FC" = "Xno"; then +if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi @@ -7332,7 +7828,7 @@ _LT_TAGVAR(objext, $1)=$objext # 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 +if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7354,7 +7850,7 @@ if test "$_lt_disable_FC" != yes; then _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} @@ -7370,21 +7866,25 @@ if test "$_lt_disable_FC" != yes; then AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && 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 + test yes = "$enable_shared" && 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 + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7392,11 +7892,11 @@ if test "$_lt_disable_FC" != yes; then 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 + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" + _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 @@ -7416,7 +7916,7 @@ if test "$_lt_disable_FC" != yes; then GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes +fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG @@ -7426,7 +7926,7 @@ AC_LANG_POP # -------------------------- # 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'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE @@ -7460,7 +7960,7 @@ CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. @@ -7497,7 +7997,7 @@ CFLAGS=$lt_save_CFLAGS # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE @@ -7531,7 +8031,7 @@ CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. @@ -7568,7 +8068,7 @@ CFLAGS=$lt_save_CFLAGS # ------------------------- # 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'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE @@ -7584,7 +8084,7 @@ _LT_TAGVAR(objext, $1)=$objext 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" +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 @@ -7594,7 +8094,7 @@ _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= @@ -7623,7 +8123,7 @@ 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" + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) @@ -7734,7 +8234,7 @@ 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 + test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -7751,9 +8251,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do $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 + test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then + if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi @@ -7777,27 +8277,7 @@ dnl AC_DEFUN([LT_AC_PROG_SED], []) # 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%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && 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 +[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false @@ -7821,102 +8301,9 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # 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}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- -# Determine which file name conversion functions should be used by +# Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], diff --git a/deps/mpg123/m4/ltoptions.m4 b/deps/mpg123/m4/ltoptions.m4 index 5d9acd8..94b0829 100644 --- a/deps/mpg123/m4/ltoptions.m4 +++ b/deps/mpg123/m4/ltoptions.m4 @@ -1,14 +1,14 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 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 7 ltoptions.m4 +# serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -29,7 +29,7 @@ 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 + [m4_warning([Unknown $1 option '$2'])])[]dnl ]) @@ -75,13 +75,15 @@ m4_if([$1],[LT_INIT],[ 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 '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_ENABLE_FAST_INSTALL]) + _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], + [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS @@ -112,7 +114,7 @@ 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.]) +put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -148,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL], _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.]) +put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -157,9 +159,9 @@ 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'. +# 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], @@ -172,14 +174,14 @@ AC_ARG_ENABLE([shared], *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) @@ -211,9 +213,9 @@ 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'. +# 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], @@ -226,14 +228,14 @@ AC_ARG_ENABLE([static], *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) @@ -265,9 +267,9 @@ 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'. +# 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], @@ -280,14 +282,14 @@ AC_ARG_ENABLE([fast-install], *) 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," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) @@ -304,14 +306,14 @@ 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.]) +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.]) +the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -319,11 +321,64 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) +# _LT_WITH_AIX_SONAME([DEFAULT]) +# ---------------------------------- +# implement the --with-aix-soname flag, and support the `aix-soname=aix' +# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT +# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. +m4_define([_LT_WITH_AIX_SONAME], +[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl +shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[[5-9]]*,yes) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + AC_ARG_WITH([aix-soname], + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], + [case $withval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --with-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname], + [AC_CACHE_VAL([lt_cv_with_aix_soname], + [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) + with_aix_soname=$lt_cv_with_aix_soname]) + AC_MSG_RESULT([$with_aix_soname]) + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + +_LT_DECL([], [shared_archive_member_spec], [0], + [Shared archive member basename, for filename based shared library versioning on AIX])dnl +])# _LT_WITH_AIX_SONAME + +LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) + + # _LT_WITH_PIC([MODE]) # -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# 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'. +# 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@<:@=PKGS@:>@], @@ -334,19 +389,17 @@ m4_define([_LT_WITH_PIC], *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC @@ -359,7 +412,7 @@ 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.]) +put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: diff --git a/deps/mpg123/m4/ltsugar.m4 b/deps/mpg123/m4/ltsugar.m4 index 9000a05..48bc934 100644 --- a/deps/mpg123/m4/ltsugar.m4 +++ b/deps/mpg123/m4/ltsugar.m4 @@ -1,6 +1,7 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives @@ -33,7 +34,7 @@ m4_define([_lt_join], # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. +# 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])], @@ -44,7 +45,7 @@ m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# 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 diff --git a/deps/mpg123/m4/ltversion.m4 b/deps/mpg123/m4/ltversion.m4 index 07a8602..fa04b52 100644 --- a/deps/mpg123/m4/ltversion.m4 +++ b/deps/mpg123/m4/ltversion.m4 @@ -1,6 +1,6 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3337 ltversion.m4 +# serial 4179 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.2' -macro_revision='1.3337' +[macro_version='2.4.6' +macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/deps/mpg123/m4/lt~obsolete.m4 b/deps/mpg123/m4/lt~obsolete.m4 index c573da9..c6b26f8 100644 --- a/deps/mpg123/m4/lt~obsolete.m4 +++ b/deps/mpg123/m4/lt~obsolete.m4 @@ -1,6 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives @@ -11,7 +12,7 @@ # These exist entirely to fool aclocal when bootstrapping libtool. # -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# 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. # @@ -25,7 +26,7 @@ # 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. +# 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 diff --git a/deps/mpg123/man1/mpg123.1 b/deps/mpg123/man1/mpg123.1 index e9e665e..3e2b396 100644 --- a/deps/mpg123/man1/mpg123.1 +++ b/deps/mpg123/man1/mpg123.1 @@ -1,4 +1,4 @@ -.TH mpg123 1 "31 Jan 2008" +.TH mpg123 1 "29 Feb 2016" .SH NAME mpg123 \- play audio MPEG 1.0/2.0/2.5 stream (layers 1, 2 and 3) .SH SYNOPSIS @@ -6,8 +6,7 @@ mpg123 \- play audio MPEG 1.0/2.0/2.5 stream (layers 1, 2 and 3) [ .B options ] -.IR file " ... | " URL " ... | " -.B \- +.IR file-or-URL ... .SH DESCRIPTION .B mpg123 reads one or more @@ -83,6 +82,14 @@ from the respective servers. See also the HTTP authentication to use when recieving files via HTTP. The format used is user:password. .TP +\fB\-\^\-ignore\-mime +Ignore MIME types given by HTTP server. If you know better and want mpg123 +to decode something the server thinks is image/png, then just do it. +.TP +\fB\-\^\-no\-seekbuffer +Disable the default micro-buffering of non-seekable streams that gives the +parser a safer footing. +.TP \fB\-@ \fIfile\fR, \fB\-\^\-list \fIfile Read filenames and/or URLs of MPEG audio streams from the specified .I file @@ -102,6 +109,11 @@ Of the playlist, play specified entry only. .I n is the number of entry starting at 1. A value of 0 is the default and means playling the whole list, a negative value means showing of the list of titles with their numbers... .TP +\fB\-\^\-continue +Enable playlist continuation mode. This changes frame skipping to apply only to the first track and also continues to play following tracks in playlist after the selected one. Also, the option to play a number of frames only applies to the whole playlist. Basically, this tries to treat the playlist more like one big stream (like, an audio book). +The current track number in list (1-based) and frame number (0-based) are printed at exit (useful if you interrupted playback and want to continue later). +Note that the continuation info is printed to standard output unless the switch for piping audio data to standard out is used. Also, it really makes sense to work with actual playlist files instead of lists of file names as arguments, to keep track positions consistent. +.TP \fB\-\-loop \fItimes\fR for looping track(s) a certain number of times, < 0 means infinite loop (not with \-\-random!). .TP @@ -123,7 +135,7 @@ plays individual songs more than once. \fB\-\^\-no\-icy\-meta Do not accept ICY meta data. .TP -\fB\-i, \-\^-\index +\fB\-i, \-\^-index Index / scan through the track before playback. This fills the index table for seeking (if enabled in libmpg123) and may make the operating system cache the file contents for smoother operating on playback. .TP @@ -171,13 +183,13 @@ is used as file name. You can also use .I --au and .I --cdr -for AU and CDR format, respectively. +for AU and CDR format, respectively. Note that WAV/AU writing to non-seekable files, or redirected stdout, needs some thought. Since 1.16.0, the logic changed to writing the header with the first actual data. This avoids spurious WAV headers in a pipe, for example. The result of decoding nothing to WAV/AU is a file consisting just of the header when it is seekable and really nothing when not (not even a header). Correctly writing data with prophetic headers to stdout is no easy business. .TP \fB\-\^\-au \fIfile Does not play the MPEG file but writes it to .I file in SUN audio format. If \- is used as the filename, the AU file is -written to stdout. +written to stdout. See paragraph about WAV writing for header fun with non-seekable streams. .TP \fB\-\^\-cdr \fIfile Does not play the MPEG file but writes it to @@ -246,7 +258,7 @@ Forces 8bit output \fB\-\^\-float Forces f32 encoding .TP -\fp\-e \fIenc\fR, \fB\-\^\-encoding \fIenc +\fB\-e \fIenc\fR, \fB\-\^\-encoding \fIenc Choose output sample encoding. Possible values look like f32 (32-bit floating point), s32 (32-bit signed integer), u32 (32-bit unsigned integer) and the variants with different numbers of bits (s24, u24, s16, u16, s8, u8) and also special variants like ulaw and alaw 8-bit. See the output of mpg123's longhelp for actually available encodings. .TP @@ -293,6 +305,10 @@ This is enabled per default beginning with mpg123 version 1.0.0 . \fB\-\^\-no\-gapless Disable the gapless code. That gives you MP3 decodings that include encoder delay and padding plus mpg123's decoder delay. .TP +\fB\-\^\-no\-infoframe +Do not parse the Xing/Lame/VBR/Info frame, decode it instead just like a stupid old MP3 hardware player. +This implies disabling of gapless playback as the necessary information is in said metadata frame. +.TP \fB\-D \fIn\fR, \fB\-\-delay \fIn Insert a delay of \fIn\fR seconds before each track. .TP @@ -320,7 +336,11 @@ which turns buffering off. Wait for the buffer to be filled to .I fraction before starting playback (fraction between 0 and 1). You can tune this prebuffering to either get faster sound to your ears or safer uninterrupted web radio. -Default is 1 (wait for full buffer before playback). +Default is 0.2 (wait for 20 % of buffer to be full, changed from 1 in version 1.23). +.TP +\fB\-\^\-devbuffer \fIseconds +Set device buffer in seconds; <= 0 means default value. This is the small buffer between the +application and the audio backend, possibly directly related to hardware buffers. .TP \fB\-\^\-smooth Keep buffer over track boundaries -- meaning, do not empty the buffer between tracks for possibly some added smoothness. @@ -343,14 +363,21 @@ numbers during decoding. Quiet. Suppress diagnostic messages. .TP .BR \-C ", " \-\^\-control -Enable terminal control keys. By default use 's' or the space bar to stop/restart (pause, unpause) playback, 'f' to jump forward to the next song, 'b' to jump back to the +Enable terminal control keys. This is enabled automatically if a terminal is detected. +By default use 's' or the space bar to stop/restart (pause, unpause) playback, 'f' to jump forward to the next song, 'b' to jump back to the beginning of the song, ',' to rewind, '.' to fast forward, and 'q' to quit. Type 'h' for a full list of available controls. .TP +\fB\-\^\-no\-control +Disable terminal control even if terminal is detected. +.TP \fB\-\^\-title -In an xterm, or rxvt (compatible, TERM environment variable is examined), change the window's title to the name of song currently +In an xterm, rxvt, screen, iris-ansi (compatible, TERM environment variable is examined), change the window's title to the name of song currently playing. .TP +\fB\-\^\-name \fIname +Set the name of this instance, possibly used in various places. This sets the client name for JACK output. +.TP \fB\-\^\-long\-tag Display ID3 tag info always in long format with one line per item (artist, title, ...) .TP @@ -368,7 +395,7 @@ Issue ``help'' to get a full list of commands and syntax. Print responses for generic control mode to standard error, not standard out. This is automatically triggered when using .B -s -\fN. +N. .TP \fB\-\-fifo \fIpath Create a fifo / named pipe on the given path and use that for reading commands instead of standard input. @@ -446,9 +473,53 @@ pressing Ctrl-C might not be audible immediately, due to audio data buffering in the audio device. This delay is system dependent, but it is usually not more than one or two seconds. -.SH "SEE ALSO" -.BR wget (1), -.BR sox (1), + +.SH PLAYBACK STATUS LINE +In verbose mode, mpg123 updates a line with various information centering around +the current playback position. On any decent terminal, the line also works +as a progress bar in the current file by reversing video for a fraction of the +line according to the current position. An example for a full line is this: + + > 0291+0955 00:01.68+00:28.22 [00:05.30] mix 100=085 192 kb/s 576 B acc 18 clip p+0.014 + +The information consists of, in order: +.TP +.BR > +single-character playback state (``>'' for playing, ``='' for pausing/looping, ``_'' for stopped) +.TP +.BR 0291+0955 +current frame offset and number of remaining frames after the plus sign +.TP +.BR 00:01.68+00:28.22 +current position from and remaining time in human terms +(hours, minutes, seconds) +.TP +.BR [00:05.30] +fill of the output buffer in terms of playback time, if the buffer is enabled +.TP +.BR mix +selected RVA mode (possible values: mix, alb (album), and \-\^\-\^\- (neutral, off)) +.TP +.BR 100=085 +set volume and the RVA-modified effective volume after the equal sign +.TP +.BR 192\ kb/s +current bitrate +.TP +.BR 576\ B +size of current frame in bytes +.TP +.BR acc +if positions are accurate, possible values are ``acc'' for accurate positions or ``fuz'' for fuzzy +(with guessed byte offsets using mean frame size) +.TP +.BR 18\ clip +amount of clipped samples, non-zero only if decoder reports that +(generic does, some optimized ones not) +.TP +.BR p+0.014 +pitch change (increased/decreased playback sampling rate on user request) + .SH NOTES MPEG audio decoding requires a good deal of CPU performance, especially layer-3. To decode it in realtime, you should @@ -460,14 +531,10 @@ somewhat for layer-3 streams. See also the .BR \-2 " and " \-4 options. .P -If everything else fails, use the -.B \-s -option to decode to standard output, direct it into a file -and then use an appropriate utility to play that file. -You might have to use a tool such as -.BR sox (1) -to convert the output to an audio format suitable for -your audio player. +If everything else fails, have mpg123 decode to a file +and then use an appropriate utility to play that file with less CPU load. +Most probably you can configure mpg123 to produce a format suitable +for your audio device (see above about encodings and sampling rates). .P If your system is generally fast enough to decode in realtime, but there are sometimes periods of heavy @@ -482,26 +549,21 @@ option to use a buffer of reasonable size (at least 1000 Kbytes). Mostly MPEG-1 layer 2 and 3 are tested in real life. Please report any issues and provide test files to help fixing them. .P -Free format streams are not supported, but they could be (there is some code). -.P No CRC error checking is performed. .P Some platforms lack audio hardware support; you may be able to use the .B -s switch to feed the decoded data to a program that can play it on your audio device. -Notably, this includes Tru64 with MME, but you should be able to install and use OSS there (it perhaps will perform better as MME would anyway). .SH AUTHORS .TP -Maintainers: +Maintainer: .br Thomas Orgis , -.br -Nicholas J. Humfrey .TP -Creator: +Original Creator: .br Michael Hipp -.TP +.PP Uses code or ideas from various people, see the AUTHORS file accompanying the source code. .SH LICENSE .B mpg123 diff --git a/deps/mpg123/mpg123.gyp b/deps/mpg123/mpg123.gyp index 0b75a6b..c69e3f0 100644 --- a/deps/mpg123/mpg123.gyp +++ b/deps/mpg123/mpg123.gyp @@ -14,7 +14,7 @@ 'default_configuration': 'Debug', 'configurations': { 'Debug': { - 'defines': [ 'DEBUG', '_DEBUG' ], + 'defines': [ 'DEBUG', '_DEBUG', 'MPG123_INTSYM_H' ], 'msvs_settings': { 'VCCLCompilerTool': { 'RuntimeLibrary': 1, # static debug @@ -22,7 +22,7 @@ }, }, 'Release': { - 'defines': [ 'NDEBUG' ], + 'defines': [ 'NDEBUG', 'MPG123_INTSYM_H' ], 'msvs_settings': { 'VCCLCompilerTool': { 'RuntimeLibrary': 0, # static release @@ -57,6 +57,7 @@ # (I don't think the 64-bit ASM files are compatible with `ml`/`ml64`...) ['OS=="win"', { 'mpg123_cpu%': 'i386_fpu' }, { 'conditions': [ + ['target_arch=="arm64"', { 'mpg123_cpu%': 'arm64' }], ['target_arch=="arm"', { 'mpg123_cpu%': 'arm_nofpu' }], ['target_arch=="ia32"', { 'mpg123_cpu%': 'i386_fpu' }], ['target_arch=="x87"', { 'mpg123_cpu%': 'i386_fpu' }], @@ -65,7 +66,6 @@ ] }, 'sources': [ - 'src/libmpg123/compat.c', 'src/libmpg123/parse.c', 'src/libmpg123/frame.c', 'src/libmpg123/format.c', @@ -87,9 +87,13 @@ 'src/libmpg123/layer2.c', 'src/libmpg123/layer3.c', 'src/libmpg123/feature.c', + 'src/compat/compat.c', + 'src/compat/compat_str.c' ], 'include_dirs': [ 'src/libmpg123', + 'src/compat', + 'src', # platform and arch-specific headers 'config/<(OS)/<(target_arch)', ], @@ -106,6 +110,25 @@ ] }, 'conditions': [ + ['mpg123_cpu=="arm64"', { + 'defines': [ + 'OPT_NEON64', + 'REAL_IS_FLOAT', + ], + 'sources': [ + 'src/libmpg123/dct36_neon64.S', + 'src/libmpg123/dct64_neon64_float.S', + 'src/libmpg123/synth_neon64_float.S', + 'src/libmpg123/synth_neon64_s32.S', + 'src/libmpg123/synth_stereo_neon64_float.S', + 'src/libmpg123/synth_stereo_neon64_s32.S', + 'src/libmpg123/dct64_neon64.S', + 'src/libmpg123/synth_neon64.S', + 'src/libmpg123/synth_stereo_neon64.S', + 'src/libmpg123/synth_s32.c', + 'src/libmpg123/synth_real.c', + ], + }], ['mpg123_cpu=="arm_nofpu"', { 'defines': [ 'OPT_ARM', @@ -136,6 +159,7 @@ 'sources': [ 'src/libmpg123/dct64_x86_64.S', 'src/libmpg123/dct64_x86_64_float.S', + 'src/libmpg123/dct36_x86_64.S', 'src/libmpg123/synth_s32.c', 'src/libmpg123/synth_real.c', 'src/libmpg123/synth_stereo_x86_64.S', diff --git a/deps/mpg123/mpg123.spec.in b/deps/mpg123/mpg123.spec.in index 754b0c8..f8fd94a 100644 --- a/deps/mpg123/mpg123.spec.in +++ b/deps/mpg123/mpg123.spec.in @@ -1,6 +1,5 @@ # This is a generic spec file that should "just work" with rpmbuild on any distro. # Make sure you have appropriate -devel packes installed: -# - the package providing libltdl.so and .la (libtool or libtool-devel) # - devel packages for alsa, sdl, etc... to build the respective output modules. Summary: The fast console mpeg audio decoder/player. Name: @PACKAGE_NAME@ @@ -13,8 +12,6 @@ Packager: Michael Ryzhykh Source: http://www.mpg123.org/download/mpg123-%{version}.tar.bz2 BuildRoot: %_tmppath/%name-%version Prefix: /usr -# That is specific to fedora 4 already. -#BuildPrereq: libtool-ltdl-devel %description This is a console based decoder/player for mono/stereo mpeg audio files, @@ -24,7 +21,7 @@ It can play MPEG1.0/2.0/2.5 layer I, II, II (1, 2, 3;-) files raw data to stdout and different sound systems depending on your platform. %package devel -Summary: Files needed for development with mpg123 +Summary: Files needed for development with libmpg123 or libout123 Group: Development/Libraries %description devel @@ -34,7 +31,7 @@ Libraries and header files for development with mpg123. %setup -q -n %name-%version %build -%configure --with-cpu=x86_dither --enable-shared --enable-static --disable-ltdl-install +%configure --enable-shared --enable-static make %install @@ -49,20 +46,31 @@ make %{_bindir}/* %defattr(644,root,root) %doc %{_mandir}/*/mpg123.1.gz +%doc %{_mandir}/*/out123.1.gz %{_libdir}/libmpg123.so.* -%{_libdir}/mpg123/output_*.la +%{_libdir}/libout123.so.* %{_libdir}/mpg123/output_*.so %files devel %defattr(644,root,root) %{_libdir}/pkgconfig/libmpg123.pc +%{_libdir}/pkgconfig/libout123.pc %{_includedir}/*.h %{_libdir}/libmpg123.a %{_libdir}/libmpg123.la %{_libdir}/libmpg123.so +%{_libdir}/libout123.a +%{_libdir}/libout123.la +%{_libdir}/libout123.so %exclude %{_libdir}/mpg123/output_*.a %changelog +* 2017-02-27 Thomas Orgis +- libltdl and module .la files gone +* Sat Sep 3 2016 Srikanth Rao +- remove junk added in last edit, add out123 manpage +* Much later Thomas Orgis +- some blind update * Tue Jan 1 2008 Michael Ryzhykh - Initial Version. diff --git a/deps/mpg123/ports/MSVC++/config.h b/deps/mpg123/ports/MSVC++/config.h index 4658c7d..ca8733d 100644 --- a/deps/mpg123/ports/MSVC++/config.h +++ b/deps/mpg123/ports/MSVC++/config.h @@ -1,14 +1,23 @@ #define strcasecmp _strcmpi #define strncasecmp _strnicmp -#define strdup _strdup #define HAVE_STRERROR 1 #define HAVE_SYS_TYPES_H 1 +#define HAVE_LIMITS_H 1 #define HAVE_STRDUP #define HAVE_STDLIB_H +#define HAVE_STDINT_H +#define HAVE_INTTYPES_H #define HAVE_STRING_H +#ifdef _M_ARM +#define ASMALIGN_ARMASM 1 +#else +#define ASMALIGN_BALIGN 1 +#endif + + /* We want some frame index, eh? */ #define FRAME_INDEX 1 #define INDEX_SIZE 1000 @@ -30,6 +39,4 @@ #define HAVE_WINDOWS_H /* use the unicode support within libmpg123 */ -#ifdef UNICODE - #define WANT_WIN32_UNICODE -#endif +#define WANT_WIN32_UNICODE diff --git a/deps/mpg123/ports/MSVC++/examples/feedseek.c b/deps/mpg123/ports/MSVC++/examples/feedseek.c index d62337e..80cc3fd 100644 --- a/deps/mpg123/ports/MSVC++/examples/feedseek.c +++ b/deps/mpg123/ports/MSVC++/examples/feedseek.c @@ -229,7 +229,7 @@ int _tmain(int argc, TCHAR **argv) } } - fprintf(stderr, "Finished\n", (unsigned long)inc, (unsigned long)outc); + fprintf(stderr, "Finished read %lu, decoded %lu\n", (unsigned long)inc, (unsigned long)outc); closewav(); fclose(out); diff --git a/deps/mpg123/ports/MSVC++/examples/scan.c b/deps/mpg123/ports/MSVC++/examples/scan.c index 15f46aa..f41dd8a 100644 --- a/deps/mpg123/ports/MSVC++/examples/scan.c +++ b/deps/mpg123/ports/MSVC++/examples/scan.c @@ -20,7 +20,7 @@ int _tmain(int argc, _TCHAR* argv[]) if(argc < 2) { fprintf(stderr, "\nI will give you the estimated and exact sample lengths of MPEG audio files.\n"); - fprintf(stderr, "\nUsage: %s \n\n", argv[0]); + fprintf(stderr, "\nUsage: %ls \n\n", argv[0]); return -1; } mpg123_init(); diff --git a/deps/mpg123/ports/MSVC++/mpg123.h b/deps/mpg123/ports/MSVC++/mpg123.h index 6b8ead3..df3cc14 100644 --- a/deps/mpg123/ports/MSVC++/mpg123.h +++ b/deps/mpg123/ports/MSVC++/mpg123.h @@ -11,18 +11,17 @@ #include #include -typedef long ssize_t; - // Needed for Visual Studio versions before VS 2010. #if (_MSC_VER < 1600) typedef __int32 int32_t; typedef unsigned __int32 uint32_t; +#define PRIiMAX "I64i" +typedef __int64 intmax_t; #else #include +#include #endif -#define PRIiMAX "I64i" -typedef __int64 intmax_t; // ftell returns long, _ftelli64 returns __int64 // off_t is long, not __int64, use ftell #define ftello ftell @@ -36,8 +35,8 @@ extern "C" { // Wrapper around mpg123_open that supports path names with unicode // characters - EXPORT int mpg123_topen(mpg123_handle *fr, const _TCHAR *path); - EXPORT int mpg123_tclose(mpg123_handle *fr); + MPG123_EXPORT int mpg123_topen(mpg123_handle *fr, const _TCHAR *path); + MPG123_EXPORT int mpg123_tclose(mpg123_handle *fr); #ifdef __cplusplus } diff --git a/deps/mpg123/ports/MSVC++/msvc.c b/deps/mpg123/ports/MSVC++/msvc.c index 97b0eec..63ad8ea 100644 --- a/deps/mpg123/ports/MSVC++/msvc.c +++ b/deps/mpg123/ports/MSVC++/msvc.c @@ -16,12 +16,18 @@ #include "debug.h" +/* mpg123_replace_reader expects size_t as count, _read unsigned int */ +static ssize_t read_helper(int handle, void *dest, size_t count) +{ + return _read(handle, dest, (unsigned int) count); +} + int mpg123_topen(mpg123_handle *fr, const _TCHAR *path) { int ret; int filept; /* descriptor of opened file/stream */ - ret = mpg123_replace_reader(fr, _read, _lseek); + ret = mpg123_replace_reader(fr, read_helper, _lseek); if(ret != MPG123_OK) { return ret; diff --git a/deps/mpg123/ports/README b/deps/mpg123/ports/README index f83b0cb..9fcb369 100644 --- a/deps/mpg123/ports/README +++ b/deps/mpg123/ports/README @@ -1,5 +1,15 @@ -This directory contains some (contributed) works covering usage and/or building of mpg123/libmpg123 from different programming environments. -Note that those may be a bit outdated (especially when a file is added/removed in libmpg123 sources); as the team lacks resource to test everything. But in any case, the ports can provide a good starting point on the respective platform, to get it to work with minimal fuzz. +DISCLAIMER: The contents of the ports directory are included for convenience, +but they usually contain files contributed by various people, not the core +mpg123 team. The stuff is not tested by us. In some cases, it's even +impossible to tell what is really inside. Use at your own risk (well, like +all Free Software, actually;-). + +This directory contains some (contributed) works covering usage and/or building +of mpg123/libmpg123 from different programming environments. Note that those +may be a bit outdated (especially when a file is added/removed in libmpg123 +sources); as the team lacks resource to test everything. But in any case, +the ports can provide a good starting point on the respective platform, to get +it to work with minimal fuzz. - Delphi: mpg123_.pas Unit for linking against libmpg123 (Win32, DLL). @@ -11,13 +21,18 @@ Note that those may be a bit outdated (especially when a file is added/removed i project for building libmpg123 with interface class. ...by "Gates Fan" - MSVC++/mpg123.h - A wrapper header over mpg123.h.in (yes, the template file in ../src/libmpg123) to use in MSVC++ projects that link to libmpg123. - - MSVC++/2005 and MSVC++/2008 contain project files for building and using libmpg123 with the corresponding versions of Microsoft Visual C++. - To use it add the project to your solution. Then add a reference to libmpg123 from the project that wants to use it. + A wrapper header over mpg123.h.in (yes, the template file in + ../src/libmpg123) to use in MSVC++ projects that link to libmpg123. + - MSVC++/YYYY contain project files for building and using libmpg123 with + the corresponding versions of Microsoft Visual C++. + To use it add the project to your solution. Then add a reference to + libmpg123 from the project that wants to use it. Also add ports/MSVC++ and src/libmpg123 to the include path. If you want to use the asm build you will need yasm (http://www.tortall.net/projects/yasm/). - Please put yasm.exe into a directory where MSVC++ can find it. Finally switch the libmpg123 project to the - Release_MMX_Dll build using the Visual Studio Configuration Manager. + Please put yasm.exe into a directory where MSVC++ can find it. Finally + switch the libmpg123 project to the + Release_MMX_Dll (outdated! There should be Realease_X86_Dll or similar by now) + build using the Visual Studio Configuration Manager. - Xcode contains the project file for building and using libmpg123 with Xcode for Mac and iOS (arm and simulator builds). Please add the ports/Xcode folder to the header search path of your project so that diff --git a/deps/mpg123/scripts/benchmark-cpu.pl b/deps/mpg123/scripts/benchmark-cpu.pl index b9d3e04..88559bc 100755 --- a/deps/mpg123/scripts/benchmark-cpu.pl +++ b/deps/mpg123/scripts/benchmark-cpu.pl @@ -37,6 +37,8 @@ for(@encs){ print " t_$_/s"; } print "\n"; +my $allret = 0; + foreach my $cpu (@cpus) { print "$cpu"; @@ -44,13 +46,19 @@ { # using user CPU time my @start_time = times(); - system($MPG123_CMD, '-q', '--cpu', $cpu, '-e', $e, '-t', @TEST_FILES ); + my $ret = system($MPG123_CMD, '-q', '--cpu', $cpu, '-e', $e, '-t', @TEST_FILES ); my @end_time = times(); - + my $runtime = $end_time[2] - $start_time[2]; + if($ret) + { + print STDERR "Execution of $MPG123_CMD failed with code $ret!\n"; + $runtime = 0; + $allret = 1; + } # third entry is child user time - printf(" %4.2f", $end_time[2] - $start_time[2]); + printf(" %4.2f", $runtime); } print("\n"); } - +exit($allret); diff --git a/deps/mpg123/src/Makefile.am b/deps/mpg123/src/Makefile.am deleted file mode 100644 index 242a9f0..0000000 --- a/deps/mpg123/src/Makefile.am +++ /dev/null @@ -1,186 +0,0 @@ -## Makefile.am: produce Makefile.in from this - -## copyright by the mpg123 project - free software under the terms of the LGPL 2.1 -## see COPYING and AUTHORS files in distribution or http://mpg123.org -## initially written by Nicholas J. Humfrey - -AM_CPPFLAGS = -DPKGLIBDIR="\"$(pkglibdir)\"" -mpg123_LDADD = $(LIBLTDL) libmpg123/libmpg123.la @MODULE_OBJ@ @OUTPUT_OBJ@ @OUTPUT_LIBS@ -mpg123_LDFLAGS = @EXEC_LT_LDFLAGS@ @OUTPUT_LDFLAGS@ -# Just mpg123_INCLUDES has no effect on build! Trying that before reverting to AM_CPPFLAGS. -INCLUDES = $(LTDLINCL) -I$(top_builddir)/src/libmpg123 -I$(top_srcdir)/src/libmpg123 -# libltdl is not mentioned here... it's not that trivial -mpg123_DEPENDENCIES = @OUTPUT_OBJ@ @MODULE_OBJ@ libmpg123/libmpg123.la - -SUBDIRS = output libmpg123 -EXTRA_DIST = legacy_module.c module.c sfifo.c sfifo.h - - -CLEANFILES = *.a - -bin_PROGRAMS = mpg123 - -EXTRA_PROGRAMS = tests/seek_accuracy tests/seek_whence tests/noise tests/text tests/plain_id3 - -mpg123_SOURCES = \ - audio.c \ - audio.h \ - buffer.c \ - buffer.h \ - common.c \ - common.h \ - libmpg123/compat.c \ - libmpg123/compat.h \ - control_generic.c \ - equalizer.c \ - getlopt.c \ - getlopt.h \ - httpget.c \ - httpget.h \ - resolver.c \ - resolver.h \ - genre.h \ - genre.c \ - module.h \ - mpg123.c \ - mpg123app.h \ - metaprint.c \ - metaprint.h \ - local.h \ - local.c \ - playlist.c \ - playlist.h \ - streamdump.h \ - streamdump.c \ - term.c \ - term.h \ - wav.c \ - win32_support.h \ - wavhead.h \ - xfermem.c \ - xfermem.h - -if WIN32_CODES -mpg123_SOURCES += \ - win32_support.c \ - win32_net.c -endif - -# That is not nice... but it is how I manage to get the dependency on output/alsa.o without error about .deps/output/alsa.Tpo . -# Did I mention that recursive make sucks? -# `%'-style pattern rules are a GNU make extension -#find output/ -name '*.c' | perl -ne 'chomp; $mod=$_; $mod=~s/\.c$/.\$(OBJEXT)/; -#print "$mod: $_ audio.h module.h\n"; -#print "\tcd output && \$(MAKE)\n\n";' - -output/coreaudio.$(OBJEXT): output/coreaudio.c audio.h module.h - cd output && $(MAKE) - -output/win32.$(OBJEXT): output/win32.c audio.h module.h - cd output && $(MAKE) - -output/alsa05.$(OBJEXT): output/alsa05.c audio.h module.h - cd output && $(MAKE) - -output/sdl.$(OBJEXT): output/sdl.c audio.h module.h - cd output && $(MAKE) - -output/dummy.$(OBJEXT): output/dummy.c audio.h module.h - cd output && $(MAKE) - -output/alib.$(OBJEXT): output/alib.c audio.h module.h - cd output && $(MAKE) - -output/libao.$(OBJEXT): output/libao.c audio.h module.h - cd output && $(MAKE) - -output/sun.$(OBJEXT): output/sun.c audio.h module.h - cd output && $(MAKE) - -output/aix.$(OBJEXT): output/aix.c audio.h module.h - cd output && $(MAKE) - -output/oss.$(OBJEXT): output/oss.c audio.h module.h - cd output && $(MAKE) - -output/mint.$(OBJEXT): output/mint.c audio.h module.h - cd output && $(MAKE) - -output/pulse.$(OBJEXT): output/pulse.c audio.h module.h - cd output && $(MAKE) - -output/jack.$(OBJEXT): output/jack.c audio.h module.h - cd output && $(MAKE) - -output/os2.$(OBJEXT): output/os2.c audio.h module.h - cd output && $(MAKE) - -output/nas.$(OBJEXT): output/nas.c audio.h module.h - cd output && $(MAKE) - -output/sgi.$(OBJEXT): output/sgi.c audio.h module.h - cd output && $(MAKE) - -output/portaudio.$(OBJEXT): output/portaudio.c audio.h module.h - cd output && $(MAKE) - -output/arts.$(OBJEXT): output/arts.c audio.h module.h - cd output && $(MAKE) - -output/esd.$(OBJEXT): output/esd.c audio.h module.h - cd output && $(MAKE) - -output/alsa.$(OBJEXT): output/alsa.c audio.h module.h - cd output && $(MAKE) - -output/hp.$(OBJEXT): output/hp.c audio.h module.h - cd output && $(MAKE) - -output/sndio.$(OBJEXT): output/sndio.c audio.h module.h - cd output && $(MAKE) - - -# Would have to mention _all_ source files... Dammit, that's what the libmpg123/Makefile.am does! -# But again, the a make $something here needs that stupid rule... WHY??? -libmpg123/libmpg123.la: config.h libmpg123/mpg123.h - cd libmpg123 && $(MAKE) - -tests_seek_accuracy_SOURCES = \ -tests/seek_accuracy.c \ -libmpg123/compat.h \ -libmpg123/compat.c - -tests_seek_accuracy_DEPENDENCIES = libmpg123/libmpg123.la -tests_seek_accuracy_LDADD = libmpg123/libmpg123.la - -tests_seek_whence_SOURCES = \ -tests/seek_whence.c \ -libmpg123/compat.h \ -libmpg123/compat.c - -tests_seek_whence_DEPENDENCIES = libmpg123/libmpg123.la -tests_seek_whence_LDADD = libmpg123/libmpg123.la - -tests_noise_SOURCES = \ -tests/noise.c \ -libmpg123/compat.h \ -libmpg123/compat.c \ -libmpg123/dither.h \ -libmpg123/dither.c - -tests_text_SOURCES = \ -tests/text.c \ -tests/testtext.h \ -libmpg123/compat.h \ -libmpg123/compat.c - -tests_text_DEPENDENCIES = libmpg123/libmpg123.la -tests_text_LDADD = libmpg123/libmpg123.la - -tests_plain_id3_SOURCES = \ -tests/plain_id3.c \ -libmpg123/compat.h \ -libmpg123/compat.c - -tests_plain_id3_DEPENDENCIES = libmpg123/libmpg123.la -tests_plain_id3_LDADD = libmpg123/libmpg123.la diff --git a/deps/mpg123/src/Makefile.in b/deps/mpg123/src/Makefile.in deleted file mode 100644 index 1ea7495..0000000 --- a/deps/mpg123/src/Makefile.in +++ /dev/null @@ -1,1097 +0,0 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2012 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@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -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 = mpg123$(EXEEXT) -EXTRA_PROGRAMS = tests/seek_accuracy$(EXEEXT) \ - tests/seek_whence$(EXEEXT) tests/noise$(EXEEXT) \ - tests/text$(EXEEXT) tests/plain_id3$(EXEEXT) -@WIN32_CODES_TRUE@am__append_1 = \ -@WIN32_CODES_TRUE@ win32_support.c \ -@WIN32_CODES_TRUE@ win32_net.c - -subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(top_srcdir)/build/depcomp -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/addrconfig.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am__mpg123_SOURCES_DIST = audio.c audio.h buffer.c buffer.h common.c \ - common.h libmpg123/compat.c libmpg123/compat.h \ - control_generic.c equalizer.c getlopt.c getlopt.h httpget.c \ - httpget.h resolver.c resolver.h genre.h genre.c module.h \ - mpg123.c mpg123app.h metaprint.c metaprint.h local.h local.c \ - playlist.c playlist.h streamdump.h streamdump.c term.c term.h \ - wav.c win32_support.h wavhead.h xfermem.c xfermem.h \ - win32_support.c win32_net.c -@WIN32_CODES_TRUE@am__objects_1 = win32_support.$(OBJEXT) \ -@WIN32_CODES_TRUE@ win32_net.$(OBJEXT) -am_mpg123_OBJECTS = audio.$(OBJEXT) buffer.$(OBJEXT) common.$(OBJEXT) \ - compat.$(OBJEXT) control_generic.$(OBJEXT) equalizer.$(OBJEXT) \ - getlopt.$(OBJEXT) httpget.$(OBJEXT) resolver.$(OBJEXT) \ - genre.$(OBJEXT) mpg123.$(OBJEXT) metaprint.$(OBJEXT) \ - local.$(OBJEXT) playlist.$(OBJEXT) streamdump.$(OBJEXT) \ - term.$(OBJEXT) wav.$(OBJEXT) xfermem.$(OBJEXT) \ - $(am__objects_1) -mpg123_OBJECTS = $(am_mpg123_OBJECTS) -mpg123_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(mpg123_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_tests_noise_OBJECTS = noise.$(OBJEXT) compat.$(OBJEXT) \ - dither.$(OBJEXT) -tests_noise_OBJECTS = $(am_tests_noise_OBJECTS) -tests_noise_LDADD = $(LDADD) -am__dirstamp = $(am__leading_dot)dirstamp -am_tests_plain_id3_OBJECTS = plain_id3.$(OBJEXT) compat.$(OBJEXT) -tests_plain_id3_OBJECTS = $(am_tests_plain_id3_OBJECTS) -am_tests_seek_accuracy_OBJECTS = seek_accuracy.$(OBJEXT) \ - compat.$(OBJEXT) -tests_seek_accuracy_OBJECTS = $(am_tests_seek_accuracy_OBJECTS) -am_tests_seek_whence_OBJECTS = seek_whence.$(OBJEXT) compat.$(OBJEXT) -tests_seek_whence_OBJECTS = $(am_tests_seek_whence_OBJECTS) -am_tests_text_OBJECTS = text.$(OBJEXT) compat.$(OBJEXT) -tests_text_OBJECTS = $(am_tests_text_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/build/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -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 = $(mpg123_SOURCES) $(tests_noise_SOURCES) \ - $(tests_plain_id3_SOURCES) $(tests_seek_accuracy_SOURCES) \ - $(tests_seek_whence_SOURCES) $(tests_text_SOURCES) -DIST_SOURCES = $(am__mpg123_SOURCES_DIST) $(tests_noise_SOURCES) \ - $(tests_plain_id3_SOURCES) $(tests_seek_accuracy_SOURCES) \ - $(tests_seek_whence_SOURCES) $(tests_text_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AIX_CFLAGS = @AIX_CFLAGS@ -AIX_LDFLAGS = @AIX_LDFLAGS@ -AIX_LIBS = @AIX_LIBS@ -ALIB_CFLAGS = @ALIB_CFLAGS@ -ALIB_LDFLAGS = @ALIB_LDFLAGS@ -ALIB_LIBS = @ALIB_LIBS@ -ALSA_CFLAGS = @ALSA_CFLAGS@ -ALSA_LDFLAGS = @ALSA_LDFLAGS@ -ALSA_LIBS = @ALSA_LIBS@ -AMTAR = @AMTAR@ -API_VERSION = @API_VERSION@ -AR = @AR@ -ARTS_CFLAGS = @ARTS_CFLAGS@ -ARTS_LDFLAGS = @ARTS_LDFLAGS@ -ARTS_LIBS = @ARTS_LIBS@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COREAUDIO_CFLAGS = @COREAUDIO_CFLAGS@ -COREAUDIO_LDFLAGS = @COREAUDIO_LDFLAGS@ -COREAUDIO_LIBS = @COREAUDIO_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DECODER_LOBJ = @DECODER_LOBJ@ -DECODER_OBJ = @DECODER_OBJ@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMMY_CFLAGS = @DUMMY_CFLAGS@ -DUMMY_LDFLAGS = @DUMMY_LDFLAGS@ -DUMMY_LIBS = @DUMMY_LIBS@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ESD_CFLAGS = @ESD_CFLAGS@ -ESD_LDFLAGS = @ESD_LDFLAGS@ -ESD_LIBS = @ESD_LIBS@ -EXEC_LT_LDFLAGS = @EXEC_LT_LDFLAGS@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HP_CFLAGS = @HP_CFLAGS@ -HP_LDFLAGS = @HP_LDFLAGS@ -HP_LIBS = @HP_LIBS@ -INCLUDE_STDIO_H = @INCLUDE_STDIO_H@ -INCLUDE_STDLIB_H = @INCLUDE_STDLIB_H@ -INCLUDE_SYS_TYPE_H = @INCLUDE_SYS_TYPE_H@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -JACK_CFLAGS = @JACK_CFLAGS@ -JACK_LDFLAGS = @JACK_LDFLAGS@ -JACK_LIBS = @JACK_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LFS_LOBJ = @LFS_LOBJ@ -LIBMPG123_VERSION = @LIBMPG123_VERSION@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_LDFLAGS = @LT_LDFLAGS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MINT_CFLAGS = @MINT_CFLAGS@ -MINT_LDFLAGS = @MINT_LDFLAGS@ -MINT_LIBS = @MINT_LIBS@ -MKDIR_P = @MKDIR_P@ -MODULE_OBJ = @MODULE_OBJ@ -NAS_CFLAGS = @NAS_CFLAGS@ -NAS_LDFLAGS = @NAS_LDFLAGS@ -NAS_LIBS = @NAS_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENAL_CFLAGS = @OPENAL_CFLAGS@ -OPENAL_LDFLAGS = @OPENAL_LDFLAGS@ -OPENAL_LIBS = @OPENAL_LIBS@ -OS2_CFLAGS = @OS2_CFLAGS@ -OS2_LDFLAGS = @OS2_LDFLAGS@ -OS2_LIBS = @OS2_LIBS@ -OSS_CFLAGS = @OSS_CFLAGS@ -OSS_LDFLAGS = @OSS_LDFLAGS@ -OSS_LIBS = @OSS_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -OUTPUT_CFLAGS = @OUTPUT_CFLAGS@ -OUTPUT_LDFLAGS = @OUTPUT_LDFLAGS@ -OUTPUT_LIBS = @OUTPUT_LIBS@ -OUTPUT_MOD = @OUTPUT_MOD@ -OUTPUT_OBJ = @OUTPUT_OBJ@ -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@ -PKG_CONFIG = @PKG_CONFIG@ -PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ -PORTAUDIO_LDFLAGS = @PORTAUDIO_LDFLAGS@ -PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ -PULSE_CFLAGS = @PULSE_CFLAGS@ -PULSE_LDFLAGS = @PULSE_LDFLAGS@ -PULSE_LIBS = @PULSE_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LDFLAGS = @SDL_LDFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SGI_CFLAGS = @SGI_CFLAGS@ -SGI_LDFLAGS = @SGI_LDFLAGS@ -SGI_LIBS = @SGI_LIBS@ -SHELL = @SHELL@ -SNDIO_CFLAGS = @SNDIO_CFLAGS@ -SNDIO_LDFLAGS = @SNDIO_LDFLAGS@ -SNDIO_LIBS = @SNDIO_LIBS@ -STRIP = @STRIP@ -SUN_CFLAGS = @SUN_CFLAGS@ -SUN_LDFLAGS = @SUN_LDFLAGS@ -SUN_LIBS = @SUN_LIBS@ -VERSION = @VERSION@ -WIN32_CFLAGS = @WIN32_CFLAGS@ -WIN32_LDFLAGS = @WIN32_LDFLAGS@ -WIN32_LIBS = @WIN32_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -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@ -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@ -AM_CPPFLAGS = -DPKGLIBDIR="\"$(pkglibdir)\"" -mpg123_LDADD = $(LIBLTDL) libmpg123/libmpg123.la @MODULE_OBJ@ @OUTPUT_OBJ@ @OUTPUT_LIBS@ -mpg123_LDFLAGS = @EXEC_LT_LDFLAGS@ @OUTPUT_LDFLAGS@ -# Just mpg123_INCLUDES has no effect on build! Trying that before reverting to AM_CPPFLAGS. -INCLUDES = $(LTDLINCL) -I$(top_builddir)/src/libmpg123 -I$(top_srcdir)/src/libmpg123 -# libltdl is not mentioned here... it's not that trivial -mpg123_DEPENDENCIES = @OUTPUT_OBJ@ @MODULE_OBJ@ libmpg123/libmpg123.la -SUBDIRS = output libmpg123 -EXTRA_DIST = legacy_module.c module.c sfifo.c sfifo.h -CLEANFILES = *.a -mpg123_SOURCES = audio.c audio.h buffer.c buffer.h common.c common.h \ - libmpg123/compat.c libmpg123/compat.h control_generic.c \ - equalizer.c getlopt.c getlopt.h httpget.c httpget.h resolver.c \ - resolver.h genre.h genre.c module.h mpg123.c mpg123app.h \ - metaprint.c metaprint.h local.h local.c playlist.c playlist.h \ - streamdump.h streamdump.c term.c term.h wav.c win32_support.h \ - wavhead.h xfermem.c xfermem.h $(am__append_1) -tests_seek_accuracy_SOURCES = \ -tests/seek_accuracy.c \ -libmpg123/compat.h \ -libmpg123/compat.c - -tests_seek_accuracy_DEPENDENCIES = libmpg123/libmpg123.la -tests_seek_accuracy_LDADD = libmpg123/libmpg123.la -tests_seek_whence_SOURCES = \ -tests/seek_whence.c \ -libmpg123/compat.h \ -libmpg123/compat.c - -tests_seek_whence_DEPENDENCIES = libmpg123/libmpg123.la -tests_seek_whence_LDADD = libmpg123/libmpg123.la -tests_noise_SOURCES = \ -tests/noise.c \ -libmpg123/compat.h \ -libmpg123/compat.c \ -libmpg123/dither.h \ -libmpg123/dither.c - -tests_text_SOURCES = \ -tests/text.c \ -tests/testtext.h \ -libmpg123/compat.h \ -libmpg123/compat.c - -tests_text_DEPENDENCIES = libmpg123/libmpg123.la -tests_text_LDADD = libmpg123/libmpg123.la -tests_plain_id3_SOURCES = \ -tests/plain_id3.c \ -libmpg123/compat.h \ -libmpg123/compat.c - -tests_plain_id3_DEPENDENCIES = libmpg123/libmpg123.la -tests_plain_id3_LDADD = libmpg123/libmpg123.la -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status src/config.h -$(srcdir)/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - 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 -mpg123$(EXEEXT): $(mpg123_OBJECTS) $(mpg123_DEPENDENCIES) $(EXTRA_mpg123_DEPENDENCIES) - @rm -f mpg123$(EXEEXT) - $(mpg123_LINK) $(mpg123_OBJECTS) $(mpg123_LDADD) $(LIBS) -tests/$(am__dirstamp): - @$(MKDIR_P) tests - @: > tests/$(am__dirstamp) -tests/noise$(EXEEXT): $(tests_noise_OBJECTS) $(tests_noise_DEPENDENCIES) $(EXTRA_tests_noise_DEPENDENCIES) tests/$(am__dirstamp) - @rm -f tests/noise$(EXEEXT) - $(LINK) $(tests_noise_OBJECTS) $(tests_noise_LDADD) $(LIBS) -tests/plain_id3$(EXEEXT): $(tests_plain_id3_OBJECTS) $(tests_plain_id3_DEPENDENCIES) $(EXTRA_tests_plain_id3_DEPENDENCIES) tests/$(am__dirstamp) - @rm -f tests/plain_id3$(EXEEXT) - $(LINK) $(tests_plain_id3_OBJECTS) $(tests_plain_id3_LDADD) $(LIBS) -tests/seek_accuracy$(EXEEXT): $(tests_seek_accuracy_OBJECTS) $(tests_seek_accuracy_DEPENDENCIES) $(EXTRA_tests_seek_accuracy_DEPENDENCIES) tests/$(am__dirstamp) - @rm -f tests/seek_accuracy$(EXEEXT) - $(LINK) $(tests_seek_accuracy_OBJECTS) $(tests_seek_accuracy_LDADD) $(LIBS) -tests/seek_whence$(EXEEXT): $(tests_seek_whence_OBJECTS) $(tests_seek_whence_DEPENDENCIES) $(EXTRA_tests_seek_whence_DEPENDENCIES) tests/$(am__dirstamp) - @rm -f tests/seek_whence$(EXEEXT) - $(LINK) $(tests_seek_whence_OBJECTS) $(tests_seek_whence_LDADD) $(LIBS) -tests/text$(EXEEXT): $(tests_text_OBJECTS) $(tests_text_DEPENDENCIES) $(EXTRA_tests_text_DEPENDENCIES) tests/$(am__dirstamp) - @rm -f tests/text$(EXEEXT) - $(LINK) $(tests_text_OBJECTS) $(tests_text_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control_generic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalizer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genre.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlopt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpget.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/metaprint.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpg123.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/noise.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plain_id3.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/playlist.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolver.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seek_accuracy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seek_whence.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/streamdump.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/term.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wav.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32_net.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32_support.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfermem.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -compat.o: libmpg123/compat.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT compat.o -MD -MP -MF $(DEPDIR)/compat.Tpo -c -o compat.o `test -f 'libmpg123/compat.c' || echo '$(srcdir)/'`libmpg123/compat.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/compat.Tpo $(DEPDIR)/compat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libmpg123/compat.c' object='compat.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o compat.o `test -f 'libmpg123/compat.c' || echo '$(srcdir)/'`libmpg123/compat.c - -compat.obj: libmpg123/compat.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT compat.obj -MD -MP -MF $(DEPDIR)/compat.Tpo -c -o compat.obj `if test -f 'libmpg123/compat.c'; then $(CYGPATH_W) 'libmpg123/compat.c'; else $(CYGPATH_W) '$(srcdir)/libmpg123/compat.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/compat.Tpo $(DEPDIR)/compat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libmpg123/compat.c' object='compat.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o compat.obj `if test -f 'libmpg123/compat.c'; then $(CYGPATH_W) 'libmpg123/compat.c'; else $(CYGPATH_W) '$(srcdir)/libmpg123/compat.c'; fi` - -noise.o: tests/noise.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT noise.o -MD -MP -MF $(DEPDIR)/noise.Tpo -c -o noise.o `test -f 'tests/noise.c' || echo '$(srcdir)/'`tests/noise.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/noise.Tpo $(DEPDIR)/noise.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/noise.c' object='noise.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o noise.o `test -f 'tests/noise.c' || echo '$(srcdir)/'`tests/noise.c - -noise.obj: tests/noise.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT noise.obj -MD -MP -MF $(DEPDIR)/noise.Tpo -c -o noise.obj `if test -f 'tests/noise.c'; then $(CYGPATH_W) 'tests/noise.c'; else $(CYGPATH_W) '$(srcdir)/tests/noise.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/noise.Tpo $(DEPDIR)/noise.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/noise.c' object='noise.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o noise.obj `if test -f 'tests/noise.c'; then $(CYGPATH_W) 'tests/noise.c'; else $(CYGPATH_W) '$(srcdir)/tests/noise.c'; fi` - -dither.o: libmpg123/dither.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dither.o -MD -MP -MF $(DEPDIR)/dither.Tpo -c -o dither.o `test -f 'libmpg123/dither.c' || echo '$(srcdir)/'`libmpg123/dither.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dither.Tpo $(DEPDIR)/dither.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libmpg123/dither.c' object='dither.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dither.o `test -f 'libmpg123/dither.c' || echo '$(srcdir)/'`libmpg123/dither.c - -dither.obj: libmpg123/dither.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dither.obj -MD -MP -MF $(DEPDIR)/dither.Tpo -c -o dither.obj `if test -f 'libmpg123/dither.c'; then $(CYGPATH_W) 'libmpg123/dither.c'; else $(CYGPATH_W) '$(srcdir)/libmpg123/dither.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dither.Tpo $(DEPDIR)/dither.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libmpg123/dither.c' object='dither.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dither.obj `if test -f 'libmpg123/dither.c'; then $(CYGPATH_W) 'libmpg123/dither.c'; else $(CYGPATH_W) '$(srcdir)/libmpg123/dither.c'; fi` - -plain_id3.o: tests/plain_id3.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plain_id3.o -MD -MP -MF $(DEPDIR)/plain_id3.Tpo -c -o plain_id3.o `test -f 'tests/plain_id3.c' || echo '$(srcdir)/'`tests/plain_id3.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/plain_id3.Tpo $(DEPDIR)/plain_id3.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/plain_id3.c' object='plain_id3.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plain_id3.o `test -f 'tests/plain_id3.c' || echo '$(srcdir)/'`tests/plain_id3.c - -plain_id3.obj: tests/plain_id3.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plain_id3.obj -MD -MP -MF $(DEPDIR)/plain_id3.Tpo -c -o plain_id3.obj `if test -f 'tests/plain_id3.c'; then $(CYGPATH_W) 'tests/plain_id3.c'; else $(CYGPATH_W) '$(srcdir)/tests/plain_id3.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/plain_id3.Tpo $(DEPDIR)/plain_id3.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/plain_id3.c' object='plain_id3.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plain_id3.obj `if test -f 'tests/plain_id3.c'; then $(CYGPATH_W) 'tests/plain_id3.c'; else $(CYGPATH_W) '$(srcdir)/tests/plain_id3.c'; fi` - -seek_accuracy.o: tests/seek_accuracy.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT seek_accuracy.o -MD -MP -MF $(DEPDIR)/seek_accuracy.Tpo -c -o seek_accuracy.o `test -f 'tests/seek_accuracy.c' || echo '$(srcdir)/'`tests/seek_accuracy.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/seek_accuracy.Tpo $(DEPDIR)/seek_accuracy.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/seek_accuracy.c' object='seek_accuracy.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o seek_accuracy.o `test -f 'tests/seek_accuracy.c' || echo '$(srcdir)/'`tests/seek_accuracy.c - -seek_accuracy.obj: tests/seek_accuracy.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT seek_accuracy.obj -MD -MP -MF $(DEPDIR)/seek_accuracy.Tpo -c -o seek_accuracy.obj `if test -f 'tests/seek_accuracy.c'; then $(CYGPATH_W) 'tests/seek_accuracy.c'; else $(CYGPATH_W) '$(srcdir)/tests/seek_accuracy.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/seek_accuracy.Tpo $(DEPDIR)/seek_accuracy.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/seek_accuracy.c' object='seek_accuracy.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o seek_accuracy.obj `if test -f 'tests/seek_accuracy.c'; then $(CYGPATH_W) 'tests/seek_accuracy.c'; else $(CYGPATH_W) '$(srcdir)/tests/seek_accuracy.c'; fi` - -seek_whence.o: tests/seek_whence.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT seek_whence.o -MD -MP -MF $(DEPDIR)/seek_whence.Tpo -c -o seek_whence.o `test -f 'tests/seek_whence.c' || echo '$(srcdir)/'`tests/seek_whence.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/seek_whence.Tpo $(DEPDIR)/seek_whence.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/seek_whence.c' object='seek_whence.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o seek_whence.o `test -f 'tests/seek_whence.c' || echo '$(srcdir)/'`tests/seek_whence.c - -seek_whence.obj: tests/seek_whence.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT seek_whence.obj -MD -MP -MF $(DEPDIR)/seek_whence.Tpo -c -o seek_whence.obj `if test -f 'tests/seek_whence.c'; then $(CYGPATH_W) 'tests/seek_whence.c'; else $(CYGPATH_W) '$(srcdir)/tests/seek_whence.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/seek_whence.Tpo $(DEPDIR)/seek_whence.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/seek_whence.c' object='seek_whence.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o seek_whence.obj `if test -f 'tests/seek_whence.c'; then $(CYGPATH_W) 'tests/seek_whence.c'; else $(CYGPATH_W) '$(srcdir)/tests/seek_whence.c'; fi` - -text.o: tests/text.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT text.o -MD -MP -MF $(DEPDIR)/text.Tpo -c -o text.o `test -f 'tests/text.c' || echo '$(srcdir)/'`tests/text.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/text.Tpo $(DEPDIR)/text.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/text.c' object='text.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o text.o `test -f 'tests/text.c' || echo '$(srcdir)/'`tests/text.c - -text.obj: tests/text.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT text.obj -MD -MP -MF $(DEPDIR)/text.Tpo -c -o text.obj `if test -f 'tests/text.c'; then $(CYGPATH_W) 'tests/text.c'; else $(CYGPATH_W) '$(srcdir)/tests/text.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/text.Tpo $(DEPDIR)/text.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/text.c' object='text.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o text.obj `if test -f 'tests/text.c'; then $(CYGPATH_W) 'tests/text.c'; else $(CYGPATH_W) '$(srcdir)/tests/text.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -rm -rf tests/.libs tests/_libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done - -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: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(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: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(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" - -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @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 - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(PROGRAMS) config.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -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 tests/$(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-recursive - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - cscopelist-recursive ctags-recursive install-am install-strip \ - tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool cscopelist cscopelist-recursive \ - ctags ctags-recursive distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distdir 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-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS - - -# That is not nice... but it is how I manage to get the dependency on output/alsa.o without error about .deps/output/alsa.Tpo . -# Did I mention that recursive make sucks? -# `%'-style pattern rules are a GNU make extension -#find output/ -name '*.c' | perl -ne 'chomp; $mod=$_; $mod=~s/\.c$/.\$(OBJEXT)/; -#print "$mod: $_ audio.h module.h\n"; -#print "\tcd output && \$(MAKE)\n\n";' - -output/coreaudio.$(OBJEXT): output/coreaudio.c audio.h module.h - cd output && $(MAKE) - -output/win32.$(OBJEXT): output/win32.c audio.h module.h - cd output && $(MAKE) - -output/alsa05.$(OBJEXT): output/alsa05.c audio.h module.h - cd output && $(MAKE) - -output/sdl.$(OBJEXT): output/sdl.c audio.h module.h - cd output && $(MAKE) - -output/dummy.$(OBJEXT): output/dummy.c audio.h module.h - cd output && $(MAKE) - -output/alib.$(OBJEXT): output/alib.c audio.h module.h - cd output && $(MAKE) - -output/libao.$(OBJEXT): output/libao.c audio.h module.h - cd output && $(MAKE) - -output/sun.$(OBJEXT): output/sun.c audio.h module.h - cd output && $(MAKE) - -output/aix.$(OBJEXT): output/aix.c audio.h module.h - cd output && $(MAKE) - -output/oss.$(OBJEXT): output/oss.c audio.h module.h - cd output && $(MAKE) - -output/mint.$(OBJEXT): output/mint.c audio.h module.h - cd output && $(MAKE) - -output/pulse.$(OBJEXT): output/pulse.c audio.h module.h - cd output && $(MAKE) - -output/jack.$(OBJEXT): output/jack.c audio.h module.h - cd output && $(MAKE) - -output/os2.$(OBJEXT): output/os2.c audio.h module.h - cd output && $(MAKE) - -output/nas.$(OBJEXT): output/nas.c audio.h module.h - cd output && $(MAKE) - -output/sgi.$(OBJEXT): output/sgi.c audio.h module.h - cd output && $(MAKE) - -output/portaudio.$(OBJEXT): output/portaudio.c audio.h module.h - cd output && $(MAKE) - -output/arts.$(OBJEXT): output/arts.c audio.h module.h - cd output && $(MAKE) - -output/esd.$(OBJEXT): output/esd.c audio.h module.h - cd output && $(MAKE) - -output/alsa.$(OBJEXT): output/alsa.c audio.h module.h - cd output && $(MAKE) - -output/hp.$(OBJEXT): output/hp.c audio.h module.h - cd output && $(MAKE) - -output/sndio.$(OBJEXT): output/sndio.c audio.h module.h - cd output && $(MAKE) - -# Would have to mention _all_ source files... Dammit, that's what the libmpg123/Makefile.am does! -# But again, the a make $something here needs that stupid rule... WHY??? -libmpg123/libmpg123.la: config.h libmpg123/mpg123.h - cd libmpg123 && $(MAKE) - -# 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/deps/mpg123/src/audio.c b/deps/mpg123/src/audio.c index 9a3369e..4042d61 100644 --- a/deps/mpg123/src/audio.c +++ b/deps/mpg123/src/audio.c @@ -1,15 +1,17 @@ /* audio: audio output interface - copyright ?-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright ?-2016 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Michael Hipp */ #include #include "mpg123app.h" +#include "audio.h" +#include "out123.h" #include "common.h" -#include "buffer.h" +#include "sysutil.h" #ifdef HAVE_SYS_WAIT_H #include @@ -17,293 +19,26 @@ #include "debug.h" -static int file_write(struct audio_output_struct* ao, unsigned char *bytes, int count) +mpg123_string* audio_enclist(void) { - return (int)write(ao->fn, bytes, count); -} -static int wave_write(struct audio_output_struct* ao, unsigned char *bytes, int count) -{ - return wav_write(bytes, count); -} -static int builtin_get_formats(struct audio_output_struct *ao) -{ - if(param.outmode == DECODE_CDR) - { - if(ao->rate == 44100 && ao->channels == 2) - return MPG123_ENC_SIGNED_16; - else - return 0; - } - else if(param.outmode == DECODE_AU) return MPG123_ENC_SIGNED_16|MPG123_ENC_UNSIGNED_8|MPG123_ENC_ULAW_8; - else if(param.outmode == DECODE_WAV) return MPG123_ENC_SIGNED_16|MPG123_ENC_UNSIGNED_8|MPG123_ENC_FLOAT_32|MPG123_ENC_SIGNED_24|MPG123_ENC_SIGNED_32; - else return MPG123_ENC_ANY; -} -static int builtin_close(struct audio_output_struct *ao) -{ - switch(param.outmode) - { - case DECODE_WAV: - return wav_close(); - break; - case DECODE_AU: - return au_close(); - break; - case DECODE_CDR: - return cdr_close(); - break; - } - return -1; -} -static int builtin_nothingint(struct audio_output_struct *ao){ return 0; } -static void builtin_nothing(struct audio_output_struct *ao){} - -audio_output_t* open_fake_module(void) -{ - audio_output_t *ao = NULL; - ao = alloc_audio_output(); - if(ao == NULL) - { - error("Cannot allocate memory for audio output data."); - return NULL; - } - ao->module = NULL; - ao->open = builtin_nothingint; - ao->flush = builtin_nothing; - ao->get_formats = builtin_get_formats; - ao->write = wave_write; - ao->close = builtin_close; - ao->device = param.filename; - ao->is_open = FALSE; - switch(param.outmode) - { - case DECODE_FILE: - ao->fn = OutputDescriptor; - ao->write = file_write; - break; - case DECODE_WAV: - ao->open = wav_open; - break; - case DECODE_CDR: - ao->open = cdr_open; - break; - case DECODE_AU: - ao->open = au_open; - break; - case DECODE_TEST: - break; - } - - return ao; -} - -/* Open an audio output module, trying modules in list (comma-separated). */ -audio_output_t* open_output_module( const char* names ) -{ - mpg123_module_t *module = NULL; - audio_output_t *ao = NULL; - int result = 0; - char *curname, *modnames; - - if(param.usebuffer || names==NULL) return NULL; - - /* Use internal code. */ - if(param.outmode != DECODE_AUDIO) return open_fake_module(); - - modnames = strdup(names); - if(modnames == NULL) - { - error("Error allocating memory for module names."); - return NULL; - } - /* Now loop over the list of possible modules to find one that works. */ - curname = strtok(modnames, ","); - while(curname != NULL) - { - char* name = curname; - curname = strtok(NULL, ","); - if(param.verbose > 1) fprintf(stderr, "Trying output module %s.\n", name); - /* Open the module, initial check for availability+libraries. */ - module = open_module( "output", name ); - if(module == NULL) continue; - /* Check if module supports output */ - if(module->init_output == NULL) - { - error1("Module '%s' does not support audio output.", name); - close_module(module); - continue; /* Try next one. */ - } - /* Allocation+initialization of memory for audio output type. */ - ao = alloc_audio_output(); - if(ao==NULL) - { - error("Failed to allocate audio output structure."); - close_module(module); - break; /* This is fatal. */ - } - - /* Call the init function */ - ao->device = param.output_device; - ao->flags = param.output_flags; - /* Should I do funny stuff with stderr file descriptor instead? */ - if(curname == NULL) - { - if(param.verbose > 1) - fprintf(stderr, "Note: %s is the last output option... showing you any error messages now.\n", name); - } - else ao->auxflags |= MPG123_OUT_QUIET; /* Probing, so don't spill stderr with errors. */ - ao->is_open = FALSE; - ao->module = module; /* Need that to close module later. */ - result = module->init_output(ao); - if(result == 0) - { /* Try to open the device. I'm only interested in actually working modules. */ - result = open_output(ao); - close_output(ao); - } - else error2("Module '%s' init failed: %i", name, result); - - if(result!=0) - { /* Try next one... */ - close_module(module); - free(ao); - ao = NULL; - } - else - { /* All good, leave the loop. */ - if(param.verbose > 1) fprintf(stderr, "Output module '%s' chosen.\n", name); - - ao->auxflags &= ~MPG123_OUT_QUIET; - break; - } - } - - free(modnames); - if(ao==NULL) error1("Unable to find a working output module in this list: %s", names); - - return ao; -} - - - -/* Close the audio output and close the module */ -void close_output_module( audio_output_t* ao ) -{ - if (!ao) return; /* That covers buffer mode, too (ao == NULL there). */ - - debug("closing output module"); - /* Close the audio output */ - if(ao->is_open && ao->close != NULL) ao->close(ao); - - /* Deinitialise the audio output */ - if (ao->deinit) ao->deinit( ao ); - - /* Unload the module */ - if (ao->module) close_module( ao->module ); - - /* Free up memory */ - free( ao ); -} - - - -/* allocate and initialise memory */ -audio_output_t* alloc_audio_output() -{ - audio_output_t* ao = malloc( sizeof( audio_output_t ) ); - if (ao==NULL) error( "Failed to allocate memory for audio_output_t." ); - - /* Initialise variables */ - ao->fn = -1; - ao->rate = -1; - ao->gain = param.gain; - ao->userptr = NULL; - ao->device = NULL; - ao->channels = -1; - ao->format = -1; - ao->flags = 0; - ao->auxflags = 0; - - /*ao->module = NULL;*/ - - /* Set the callbacks to NULL */ - ao->open = NULL; - ao->get_formats = NULL; - ao->write = NULL; - ao->flush = NULL; - ao->close = NULL; - ao->deinit = NULL; - - return ao; -} - -/* -static void audio_output_dump(audio_output_t *ao) -{ - fprintf(stderr, "ao->fn=%d\n", ao->fn); - fprintf(stderr, "ao->userptr=%p\n", ao->userptr); - fprintf(stderr, "ao->rate=%ld\n", ao->rate); - fprintf(stderr, "ao->gain=%ld\n", ao->gain); - fprintf(stderr, "ao->device='%s'\n", ao->device); - fprintf(stderr, "ao->channels=%d\n", ao->channels); - fprintf(stderr, "ao->format=%d\n", ao->format); -} -*/ - -struct enc_desc -{ - int code; /* MPG123_ENC_SOMETHING */ - const char *longname; /* signed bla bla */ - const char *name; /* sXX, short name */ - const unsigned char nlen; /* significant characters in short name */ -}; - -static const struct enc_desc encdesc[] = -{ - { MPG123_ENC_SIGNED_16, "signed 16 bit", "s16 ", 3 }, - { MPG123_ENC_UNSIGNED_16, "unsigned 16 bit", "u16 ", 3 }, - { MPG123_ENC_UNSIGNED_8, "unsigned 8 bit", "u8 ", 2 }, - { MPG123_ENC_SIGNED_8, "signed 8 bit", "s8 ", 2 }, - { MPG123_ENC_ULAW_8, "mu-law (8 bit)", "ulaw ", 4 }, - { MPG123_ENC_ALAW_8, "a-law (8 bit)", "alaw ", 4 }, - { MPG123_ENC_FLOAT_32, "float (32 bit)", "f32 ", 3 }, - { MPG123_ENC_SIGNED_32, "signed 32 bit", "s32 ", 3 }, - { MPG123_ENC_UNSIGNED_32, "unsigned 32 bit", "u32 ", 3 }, - { MPG123_ENC_SIGNED_24, "signed 24 bit", "s24 ", 3 }, - { MPG123_ENC_UNSIGNED_24, "unsigned 24 bit", "u24 ", 3 } -}; -#define KNOWN_ENCS (sizeof(encdesc)/sizeof(struct enc_desc)) - -void audio_enclist(char** list) -{ - size_t length = 0; int i; - *list = NULL; - for(i=0;i0) (*list)[off++] = ' '; - memcpy(*list+off, encdesc[i].name, encdesc[i].nlen); - off += encdesc[i].nlen; - } + if(i>0) + mpg123_add_string(list, " "); + mpg123_add_string(list, out123_enc_name(enc_codes[i])); } -} - -/* Safer as function... */ -const char* audio_encoding_name(const int encoding, const int longer) -{ - const char *name = longer ? "unknown" : "???"; - int i; - for(i=0;imodule ? ao->module->name : "file/raw/test"; - if(ao->device != NULL) dev = ao->device; - } + char *name; + char *dev; + out123_driver_info(ao, &name, &dev); mpg123_rates(&rates, &num_rates); mpg123_encodings(&encs, &num_encs); fprintf(stderr,"\nAudio driver: %s\nAudio device: %s\nAudio capabilities:\n(matrix of [S]tereo or [M]ono support for sample format and rate in Hz)\n |", name, dev); - for(e=0;e 2) fprintf(stderr, "Note: forcing encoding code 0x%x\n", force_fmt); + else if(param.verbose > 2) + fprintf(stderr, "Note: forcing encoding code 0x%x (%s)\n" + , force_fmt, out123_enc_name(force_fmt)); } + /* Lots of preparation of rate lists. */ rlimit = param.force_rate > 0 ? num_rates+1 : num_rates; - for(channels=1; channels<=2; channels++) - for(ri = 0;ri 2) fprintf(stderr, "Note: checking support for %liHz/%ich.\n", rate, channels); -#ifndef NOXFERMEM - if(param.usebuffer) - { /* Ask the buffer process. It is waiting for this. */ - buffermem->rate = rate; - buffermem->channels = channels; - buffermem->format = 0; /* Just have it initialized safely. */ - debug2("asking for formats for %liHz/%ich", rate, channels); - xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_AUDIOCAP); - xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE); - fmts = buffermem->format; - } - else -#endif - { /* Check myself. */ - ao->rate = rate; - ao->channels = channels; - fmts = ao->get_formats(ao); - } - if(param.verbose > 2) fprintf(stderr, "Note: result 0x%x\n", fmts); - if(force_fmt) - { /* Filter for forced encoding. */ - if((fmts & force_fmt) == force_fmt) fmts = force_fmt; - else fmts = 0; /* Nothing else! */ - - if(param.verbose > 2) fprintf(stderr, "Note: after forcing 0x%x\n", fmts); - } - - if(fmts < 0) continue; - else mpg123_format(mh, decode_rate, channels, fmts); + if(!param.quiet) + error("DOOM"); + return; } - -#ifndef NOXFERMEM - /* Buffer loop shall start normal operation now. */ - if(param.usebuffer) + for(ri = 0; rifd[XF_WRITER], XF_CMD_WAKEUP); - xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE); - } -#endif - - if(param.verbose > 1) print_capabilities(ao, mh); -} - -#if !defined(WIN32) && !defined(GENERIC) -#ifndef NOXFERMEM -static void catch_child(void) -{ - while (waitpid(-1, NULL, WNOHANG) > 0); -} -#endif -#endif - - -/* FIXME: Old output initialization code that needs updating */ - -int init_output(audio_output_t **ao) -{ - static int init_done = FALSE; - - if (init_done) return 1; - init_done = TRUE; - -#ifndef NOXFERMEM - if (param.usebuffer) - { - unsigned int bufferbytes; - sigset_t newsigset, oldsigset; - bufferbytes = (param.usebuffer * 1024); - if (bufferbytes < bufferblock) - { - bufferbytes = 2*bufferblock; - if(!param.quiet) fprintf(stderr, "Note: raising buffer to minimal size %liKiB\n", (unsigned long) bufferbytes>>10); - } - bufferbytes -= bufferbytes % bufferblock; - /* No +1024 for NtoM rounding problems anymore! */ - xfermem_init (&buffermem, bufferbytes ,0,0); - sigemptyset (&newsigset); - /* ThOr: I'm not quite sure why we need to block that signal here. */ - sigaddset (&newsigset, SIGUSR1); - sigprocmask (SIG_BLOCK, &newsigset, &oldsigset); -#if !defined(WIN32) && !defined(GENERIC) - catchsignal (SIGCHLD, catch_child); -#endif - switch ((buffer_pid = fork())) - { - case -1: /* error */ - error("cannot fork!"); - return -1; - case 0: /* child */ - { - /* Buffer process handles all audio stuff itself. */ - audio_output_t *bao = NULL; /* To be clear: That's the buffer's pointer. */ - param.usebuffer = 0; /* The buffer doesn't use the buffer. */ - /* Open audio output module */ - bao = open_output_module(param.output_module); - if(!bao) - { - error("Failed to open audio output module."); - exit(1); /* communicate failure? */ - } - if(open_output(bao) < 0) - { - error("Unable to open audio output."); - close_output_module(bao); - exit(2); - } - xfermem_init_reader (buffermem); - buffer_loop(bao, &oldsigset); /* Here the work happens. */ - xfermem_done_reader (buffermem); - xfermem_done (buffermem); - close_output(bao); - close_output_module(bao); - exit(0); - } - default: /* parent */ - xfermem_init_writer (buffermem); - } - /* ThOr: I want that USR1 signal back for control. */ - sigprocmask(SIG_UNBLOCK, &newsigset, NULL); - } -#else - if(param.usebuffer) - { - error("Buffer not available in this build!"); - return -1; - } -#endif - if(!param.usebuffer) - { /* Only if I handle audio device output: Get that module. */ - *ao = open_output_module(param.output_module); - if(!(*ao)) - { - error("Failed to open audio output module"); - return -1; - } - } - else *ao = NULL; /* That ensures we won't try to free it later... */ -#ifndef NOXFERMEM - if(param.usebuffer) - { /* Check if buffer is alive. */ - int res = xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE); - if(res < 0) + decode_rate = ri < num_rates ? rates[ri] : param.force_rate; + outrates[ri] = pitch_rate(decode_rate); + unpitch[ri].a = outrates[ri]; + unpitch[ri].b = decode_rate; + } + /* Actually query formats possible with given rates. */ + fmtcount = out123_formats(ao, outrates, rlimit, 1, 2, &outfmts); + free(outrates); + if(fmtcount > 0) + { + int fi; + int unpitch_i = 0; + if(param.verbose > 1 && outfmts[0].encoding > 0) { - error("Buffer process didn't initialize!"); - return -1; + const char *encname = out123_enc_name(outfmts[0].encoding); + fprintf(stderr, "Note: default format %li Hz, %i channels, %s\n" + , outfmts[0].rate, outfmts[0].channels + , encname ? encname : "???" ); } - } -#endif - /* This has internal protection for buffer mode. */ - if(open_output(*ao) < 0) return -1; - - return 0; -} - -void exit_output(audio_output_t *ao, int rude) -{ - debug("exit output"); -#ifndef NOXFERMEM - if (param.usebuffer) - { - debug("ending buffer"); - buffer_stop(); /* Puts buffer into waiting-for-command mode. */ - buffer_end(rude); /* Gives command to end operation. */ - xfermem_done_writer(buffermem); - waitpid (buffer_pid, NULL, 0); - xfermem_done (buffermem); - } -#endif - /* Close the output... doesn't matter if buffer handled it, that's taken care of. */ - close_output(ao); - close_output_module(ao); -} - -void output_pause(audio_output_t *ao) -{ - if(param.usebuffer) buffer_stop(); - else ao->flush(ao); -} - -void output_unpause(audio_output_t *ao) -{ - if(param.usebuffer) buffer_start(); -} - -int flush_output(audio_output_t *ao, unsigned char *bytes, size_t count) -{ - if(count) - { - /* Error checks? */ -#ifndef NOXFERMEM - if(param.usebuffer){ if(xfermem_write(buffermem, bytes, count)) return -1; } - else -#endif - if(param.outmode != DECODE_TEST) + for(fi=1; fiwrite(ao, bytes, (int)count); - if(written >= 0){ sum+=written; count -= written; } - else error1("Error in writing audio (%s?)!", strerror(errno)); - } while(count>0 && written>=0); - return sum; - } - } - return (int)count; /* That is for DECODE_TEST */ -} - -int open_output(audio_output_t *ao) -{ - if(param.usebuffer) return 0; - - if(ao == NULL) - { - error("ao should not be NULL here!"); - exit(110); - } - - switch(param.outmode) - { - case DECODE_AUDIO: - case DECODE_WAV: - case DECODE_AU: - case DECODE_CDR: - case DECODE_FILE: - debug("opening normal audio/file"); - ao->is_open = ao->open(ao) < 0 ? FALSE : TRUE; - if(!ao->is_open) - { - if(!AOQUIET) error("failed to open audio device"); - return -1; + int fmts = outfmts[fi].encoding; + if(param.verbose > 2) + fprintf( stderr + , "Note: output support for %li Hz, %i channels: 0x%x\n" + , outfmts[fi].rate, outfmts[fi].channels, outfmts[fi].encoding ); + if(force_fmt) + { /* Filter for forced encoding. */ + if((fmts & force_fmt) == force_fmt) + fmts = force_fmt; + else /* Nothing else! */ + fmts = 0; } - else return 0; - break; - case DECODE_TEST: - debug("decoding to nowhere"); - return 0; - break; - } - debug("nothing"); - return -1; /* That's an error ... unknown outmode? */ -} - -/* is this used? */ -void close_output(audio_output_t *ao) -{ - if(param.usebuffer) return; - - debug("closing output"); - switch(param.outmode) - { - case DECODE_AUDIO: - case DECODE_WAV: - case DECODE_AU: - case DECODE_CDR: - /* Guard that close call; could be nasty. */ - if(ao->is_open) - { - ao->is_open = FALSE; - if(ao->close != NULL) ao->close(ao); + mpg123_format( mh + , brate(unpitch, outfmts[fi].rate, rlimit, &unpitch_i) + , outfmts[fi].channels, fmts ); } - break; } -} + free(outfmts); + free(unpitch); -/* Also for WAV decoding? */ -int reset_output(audio_output_t *ao) -{ - if(!param.usebuffer) - { - close_output(ao); - return open_output(ao); - } - else return 0; + if(param.verbose > 1) print_capabilities(ao, mh); } -int set_pitch(mpg123_handle *fr, audio_output_t *ao, double new_pitch) +int set_pitch(mpg123_handle *fr, out123_handle *ao, double new_pitch) { - int ret = 1; double old_pitch = param.pitch; long rate; int channels, format; @@ -690,19 +219,13 @@ int set_pitch(mpg123_handle *fr, audio_output_t *ao, double new_pitch) return 0; } - if(param.usebuffer) - { - error("No runtime pitch change with output buffer, sorry."); - return 0; - } - param.pitch = new_pitch; if(param.pitch < -0.99) param.pitch = -0.99; if(channels == 1) smode = MPG123_MONO; if(channels == 2) smode = MPG123_STEREO; - output_pause(ao); + out123_stop(ao); /* Remember: This takes param.pitch into account. */ audio_capabilities(ao, fr); if(!(mpg123_format_support(fr, rate, format) & smode)) @@ -713,13 +236,6 @@ int set_pitch(mpg123_handle *fr, audio_output_t *ao, double new_pitch) error("Reached a hardware limit there with pitch!"); param.pitch = old_pitch; audio_capabilities(ao, fr); - ret = 0; } - ao->format = format; - ao->channels = channels; - ao->rate = pitch_rate(rate); - reset_output(ao); - output_unpause(ao); - return ret; + return out123_start(ao, pitch_rate(rate), channels, format); } - diff --git a/deps/mpg123/src/audio.h b/deps/mpg123/src/audio.h index 6fff8cd..724f00e 100644 --- a/deps/mpg123/src/audio.h +++ b/deps/mpg123/src/audio.h @@ -1,7 +1,9 @@ /* audio: audio output interface - copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 + This is what is left after separating out libout123. + + copyright ?-2015 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Michael Hipp */ @@ -16,91 +18,21 @@ #include "compat.h" #include "mpg123.h" -#include "module.h" - -#define AUDIO_OUT_HEADPHONES 0x01 -#define AUDIO_OUT_INTERNAL_SPEAKER 0x02 -#define AUDIO_OUT_LINE_OUT 0x04 - -enum { - DECODE_TEST, - DECODE_AUDIO, - DECODE_FILE, - DECODE_BUFFER, - DECODE_WAV, - DECODE_AU, - DECODE_CDR, - DECODE_AUDIOFILE -}; - -/* 3% rate tolerance */ -#define AUDIO_RATE_TOLERANCE 3 - -typedef struct audio_output_struct -{ - int fn; /* filenumber */ - void *userptr; /* driver specific pointer */ - - /* Callbacks */ - int (*open)(struct audio_output_struct *); - int (*get_formats)(struct audio_output_struct *); - int (*write)(struct audio_output_struct *, unsigned char *,int); - void (*flush)(struct audio_output_struct *); - int (*close)(struct audio_output_struct *); - int (*deinit)(struct audio_output_struct *); - - /* the module this belongs to */ - mpg123_module_t *module; - - char *device; /* device name */ - int flags; /* some bits; namely headphone/speaker/line */ - long rate; /* sample rate */ - long gain; /* output gain */ - int channels; /* number of channels */ - int format; /* format flags */ - int is_open; /* something opened? */ -#define MPG123_OUT_QUIET 1 - int auxflags; /* For now just one: quiet mode (for probing). */ -} audio_output_t; - -/* Lazy. */ -#define AOQUIET (ao->auxflags & MPG123_OUT_QUIET) - -struct audio_format_name { - int val; - char *name; - char *sname; -}; +#include "out123.h" #define pitch_rate(rate) (param.pitch == 0 ? (rate) : (long) ((param.pitch+1.0)*(rate))) -/* ------ Declarations from "audio.c" ------ */ - -audio_output_t* open_output_module( const char* name ); -void close_output_module( audio_output_t* ao ); -audio_output_t* alloc_audio_output(); -void audio_capabilities(audio_output_t *ao, mpg123_handle *mh); -int audio_fit_capabilities(audio_output_t *ao,int c,int r); -const char* audio_encoding_name(const int encoding, const int longer); -void print_capabilities(audio_output_t *ao, mpg123_handle *mh); - -int init_output(audio_output_t **ao); -void exit_output(audio_output_t *ao, int rude); -int flush_output(audio_output_t *ao, unsigned char *bytes, size_t count); -int open_output(audio_output_t *ao); -void close_output(audio_output_t *ao ); -int reset_output(audio_output_t *ao); -void output_pause(audio_output_t *ao); /* Prepare output for inactivity. */ -void output_unpause(audio_output_t *ao); /* Reactivate output (buffer process). */ +mpg123_string* audio_enclist(void); -void audio_enclist(char** list); /* Make a string of encoding names. */ +void audio_capabilities(out123_handle *ao, mpg123_handle *mh); +void print_capabilities(out123_handle *ao, mpg123_handle *mh); /* Twiddle audio output rate to yield speedup/down (pitch) effect. The actually achieved pitch value is stored in param.pitch. Returns 1 if pitch setting succeeded, 0 otherwise. */ -int set_pitch(mpg123_handle *fr, audio_output_t *ao, double new_pitch); +int set_pitch(mpg123_handle *fr, out123_handle *ao, double new_pitch); #endif diff --git a/deps/mpg123/src/buffer.c b/deps/mpg123/src/buffer.c deleted file mode 100644 index 7a12281..0000000 --- a/deps/mpg123/src/buffer.c +++ /dev/null @@ -1,312 +0,0 @@ -/* - buffer.c: output buffer - - copyright 1997-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Oliver Fromme - - I (ThOr) am reviewing this file at about the same daytime as Oliver's timestamp here: - Mon Apr 14 03:53:18 MET DST 1997 - - dammed night coders;-) -*/ - -#include "mpg123app.h" - -#ifndef NOXFERMEM - -#include "common.h" -#include -#include "debug.h" - -int outburst = 32768; - -static int intflag = FALSE; -static int usr1flag = FALSE; - -static void catch_interrupt (void) -{ - intflag = TRUE; -} - -static void catch_usr1 (void) -{ - usr1flag = TRUE; -} - -/* Interfaces to writer process */ - -extern void buffer_sig(int signal, int block); - -void real_buffer_ignore_lowmem(void) -{ - if (!buffermem) - return; - if(buffermem->wakeme[XF_READER]) - xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_WAKEUP); -} - -void real_buffer_end(int rude) -{ - if (!buffermem) - return; - xfermem_putcmd(buffermem->fd[XF_WRITER], rude ? XF_CMD_ABORT : XF_CMD_TERMINATE); -} - -void real_buffer_resync(void) -{ - if(buffermem->justwait) - { - buffermem->wakeme[XF_WRITER] = TRUE; - xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_RESYNC); - xfermem_getcmd(buffermem->fd[XF_WRITER], TRUE); - } - else buffer_sig(SIGINT, TRUE); -} - -void real_plain_buffer_resync(void) -{ - buffer_sig(SIGINT, FALSE); -} - -void real_buffer_reset(void) -{ - buffer_sig(SIGUSR1, TRUE); -} - -void real_buffer_start(void) -{ - if(buffermem->justwait) - { - debug("ending buffer's waiting"); - buffermem->justwait = FALSE; - xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_WAKEUP); - } -} - -void real_buffer_stop() -{ - buffermem->justwait = TRUE; - buffer_sig(SIGINT, TRUE); -} - -extern int buffer_pid; - -void buffer_sig(int signal, int block) -{ - if (!buffermem) return; - - if (!block) - { /* Just signal, do not wait for anything. */ - kill(buffer_pid, signal); - return; - } - - /* kill() and the waiting needs to be taken care of properly for parallel execution. - Nobody reported issues so far, but I want to be sure. */ - if(xfermem_sigblock(XF_WRITER, buffermem, buffer_pid, signal) != XF_CMD_WAKEUP) - perror("Could not resync/reset buffers"); - return; -} - -void buffer_loop(audio_output_t *ao, sigset_t *oldsigset) -{ - int bytes, outbytes; - int my_fd = buffermem->fd[XF_READER]; - txfermem *xf = buffermem; - int done = FALSE; - int preload; - - catchsignal (SIGINT, catch_interrupt); - catchsignal (SIGUSR1, catch_usr1); - sigprocmask (SIG_SETMASK, oldsigset, NULL); - - xfermem_putcmd(my_fd, XF_CMD_WAKEUP); - - debug("audio output: waiting for cap requests"); - /* wait for audio setup queries */ - while(1) - { - int cmd; - cmd = xfermem_block(XF_READER, xf); - if(cmd == XF_CMD_AUDIOCAP) - { - ao->rate = xf->rate; - ao->channels = xf->channels; - ao->format = ao->get_formats(ao); - debug3("formats for %liHz/%ich: 0x%x", ao->rate, ao->channels, ao->format); - xf->format = ao->format; - xfermem_putcmd(my_fd, XF_CMD_AUDIOCAP); - } - else if(cmd == XF_CMD_WAKEUP) - { - debug("got wakeup... leaving config mode"); - xfermem_putcmd(buffermem->fd[XF_READER], XF_CMD_WAKEUP); - break; - } - else - { - error1("unexpected command %i", cmd); - return; - } - } - - /* Fill complete buffer on first run before starting to play. - * Live mp3 streams constantly approach buffer underrun otherwise. [dk] - */ - preload = (int)(param.preload*xf->size); - if(preload > xf->size) preload = xf->size; - if(preload < 0) preload = 0; - - for (;;) { - if (intflag) { - debug("handle intflag... flushing"); - intflag = FALSE; - ao->flush(ao); - /* Either prepare for waiting or empty buffer now. */ - if(!xf->justwait) xf->readindex = xf->freeindex; - else - { - int cmd; - debug("Prepare for waiting; draining command queue. (There's a lot of wakeup commands pending, usually.)"); - do - { - cmd = xfermem_getcmd(my_fd, FALSE); - /* debug1("drain: %i", cmd); */ - } while(cmd > 0); - } - if(xf->wakeme[XF_WRITER]) xfermem_putcmd(my_fd, XF_CMD_WAKEUP); - } - if (usr1flag) { - debug("handling usr1flag"); - usr1flag = FALSE; - /* close and re-open in order to flush - * the device's internal buffer before - * changing the sample rate. [OF] - */ - /* writer must block when sending SIGUSR1 - * or we will lose all data processed - * in the meantime! [dk] - */ - xf->readindex = xf->freeindex; - /* We've nailed down the new starting location - - * writer is now safe to go on. [dk] - */ - if (xf->wakeme[XF_WRITER]) - xfermem_putcmd(my_fd, XF_CMD_WAKEUP); - ao->rate = xf->rate; - ao->channels = xf->channels; - ao->format = xf->format; - if (reset_output(ao) < 0) { - error1("failed to reset audio: %s", strerror(errno)); - exit(1); - } - } - if ( (bytes = xfermem_get_usedspace(xf)) < outburst ) { - /* if we got a buffer underrun we first - * fill 1/8 of the buffer before continue/start - * playing */ - if (preload < xf->size>>3) - preload = xf->size>>3; - if(preload < outburst) - preload = outburst; - } - debug1("bytes: %i", bytes); - if(xf->justwait || bytes < preload) { - int cmd; - if (done && !bytes) { - break; - } - - if(xf->justwait || !done) { - - /* Don't spill into errno check below. */ - errno = 0; - cmd = xfermem_block(XF_READER, xf); - debug1("got %i", cmd); - switch(cmd) { - - /* More input pending. */ - case XF_CMD_WAKEUP_INFO: - continue; - /* Yes, we know buffer is low but - * know we don't care. - */ - case XF_CMD_WAKEUP: - break; /* Proceed playing. */ - case XF_CMD_ABORT: /* Immediate end, discard buffer contents. */ - return; /* Cleanup happens outside of buffer_loop()*/ - case XF_CMD_TERMINATE: /* Graceful end, playing stuff in buffer and then return. */ - debug("going to terminate"); - done = TRUE; - break; - case XF_CMD_RESYNC: - debug("ordered resync"); - if (param.outmode == DECODE_AUDIO) ao->flush(ao); - - xf->readindex = xf->freeindex; - if (xf->wakeme[XF_WRITER]) xfermem_putcmd(my_fd, XF_CMD_WAKEUP); - continue; - break; - case -1: - if(intflag || usr1flag) /* Got signal, handle it at top of loop... */ - { - debug("buffer interrupted"); - continue; - } - if(errno) - error1("Yuck! Error in buffer handling... or somewhere unexpected: %s", strerror(errno)); - done = TRUE; - xf->readindex = xf->freeindex; - xfermem_putcmd(xf->fd[XF_READER], XF_CMD_TERMINATE); - break; - default: - fprintf(stderr, "\nEh!? Received unknown command 0x%x in buffer process.\n", cmd); - } - } - } - /* Hack! The writer issues XF_CMD_WAKEUP when first adjust - * audio settings. We do not want to lower the preload mark - * just yet! - */ - if (xf->justwait || !bytes) - continue; - preload = outburst; /* set preload to lower mark */ - if (bytes > xf->size - xf->readindex) - bytes = xf->size - xf->readindex; - if (bytes > outburst) - bytes = outburst; - - debug("write"); - outbytes = flush_output(ao, (unsigned char*) xf->data + xf->readindex, bytes); - - if(outbytes < bytes) - { - if(outbytes < 0) outbytes = 0; - if(!intflag && !usr1flag) { - error1("Ouch ... error while writing audio data: %s", strerror(errno)); - /* - * done==TRUE tells writer process to stop - * sending data. There might be some latency - * involved when resetting readindex to - * freeindex so we might need more than one - * cycle to terminate. (The number of cycles - * should be finite unless I managed to mess - * up something. ;-) [dk] - */ - done = TRUE; - xf->readindex = xf->freeindex; - xfermem_putcmd(xf->fd[XF_READER], XF_CMD_TERMINATE); - } - else debug("buffer interrupted"); - } - bytes = outbytes; - - xf->readindex = (xf->readindex + bytes) % xf->size; - if (xf->wakeme[XF_WRITER]) - xfermem_putcmd(my_fd, XF_CMD_WAKEUP); - } -} - -#endif - -/* EOF */ diff --git a/deps/mpg123/src/buffer.h b/deps/mpg123/src/buffer.h deleted file mode 100644 index f0d6ffe..0000000 --- a/deps/mpg123/src/buffer.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - buffer.h: output buffer - - copyright 1999-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Daniel Kobras / Oliver Fromme -*/ - -/* - * Application specific interaction between main and buffer - * process. This is much less generic than the functions in - * xfermem so I chose to put it in buffer.[hc]. - * 01/28/99 [dk] - */ - -#ifndef _MPG123_BUFFER_H_ -#define _MPG123_BUFFER_H_ - -#ifndef NOXFERMEM -void real_buffer_ignore_lowmem(void); -void real_buffer_end(int rude); -void real_buffer_resync(void); -void real_plain_buffer_resync(void); -void real_buffer_reset(void); -void real_buffer_start(void); -void real_buffer_stop(void); -/* Hm, that's funny preprocessor weirdness. */ -#define buffer_start() (param.usebuffer ? real_buffer_start(),0 : 0) -#define buffer_stop() (param.usebuffer ? real_buffer_stop(),0 : 0) -#define buffer_reset() (param.usebuffer ? real_buffer_reset(),0 : 0) -#define buffer_resync() (param.usebuffer ? real_buffer_resync(),0 : 0) -#define plain_buffer_resync() (param.usebuffer ? real_plain_buffer_resync(),0 : 0) -#define buffer_end(a) (param.usebuffer ? real_buffer_end(a),0 : 0) -#define buffer_ignore_lowmem() (param.usebuffer ? real_buffer_ignore_lowmem(),0 : 0) -#else -#define buffer_start() -#define buffer_stop() -#define buffer_reset() -#define buffer_resync() -#define plain_buffer_resync() -#define buffer_end() -#define buffer_ignore_lowmem() -#endif - -#endif diff --git a/deps/mpg123/src/common.c b/deps/mpg123/src/common.c index 9856202..cb0c092 100644 --- a/deps/mpg123/src/common.c +++ b/deps/mpg123/src/common.c @@ -1,21 +1,83 @@ /* common: misc stuff... audio flush, status display... - copyright ?-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright ?-2015 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Michael Hipp */ +/* Need snprintf. */ +#define _DEFAULT_SOURCE +#define _BSD_SOURCE #include "mpg123app.h" +#include "out123.h" #include -#include #include "common.h" +#ifdef __EMX__ +/* Special ways for OS/2 EMX */ +#include +#else +/* POSIX stuff */ +#ifdef HAVE_TERMIOS +#include +#include +#endif +#endif + #include "debug.h" +int stopped = 0; +int paused = 0; +static int term_is_fun = -1; + +int term_have_fun(int fd) +{ + if(term_is_fun > -1) + return term_is_fun; + else + term_is_fun = 0; +#ifdef HAVE_TERMIOS + if(term_width(fd) > 0 && param.term_visual) + { + /* Only play with non-dumb terminals. */ + char *tname = compat_getenv("TERM"); + if(tname) + { + if(strcmp(tname, "") && strcmp(tname, "dumb")) + term_is_fun = 1; + free(tname); + } + } +#endif + return term_is_fun; +} + +/* Also serves as a way to detect if we have an interactive terminal. */ +int term_width(int fd) +{ +#ifdef __EMX__ +/* OS/2 */ + int s[2]; + _scrsize (s); + if (s[0] >= 0) + return s[0]; +#else +#ifdef HAVE_TERMIOS +/* POSIX */ + struct winsize geometry; + geometry.ws_col = 0; + if(ioctl(fd, TIOCGWINSZ, &geometry) >= 0) + return (int)geometry.ws_col; +#endif +#endif + return -1; +} + const char* rva_name[3] = { "off", "mix", "album" }; +static const char* rva_statname[3] = { "---", "mix", "alb" }; static const char *modes[5] = {"Stereo", "Joint-Stereo", "Dual-Channel", "Single-Channel", "Invalid" }; -static const char *smodes[5] = { "stereo", "joint-stereo", "dual-channel", "mono", "invalid" }; +static const char *smodes[5] = { "stereo", "j-s", "dual", "mono", "o.O" }; static const char *layers[4] = { "Unknown" , "I", "II", "III" }; static const char *versions[4] = {"1.0", "2.0", "2.5", "x.x" }; static const int samples_per_frame[4][4] = @@ -26,27 +88,6 @@ static const int samples_per_frame[4][4] = { -1,-1,-1,-1 }, /* Unknown */ }; - -#if (!defined(WIN32) || defined (__CYGWIN__)) && defined(HAVE_SIGNAL_H) -void (*catchsignal(int signum, void(*handler)()))() -{ - struct sigaction new_sa; - struct sigaction old_sa; - -#ifdef DONT_CATCH_SIGNALS - fprintf (stderr, "Not catching any signals.\n"); - return ((void (*)()) -1); -#endif - - new_sa.sa_handler = handler; - sigemptyset(&new_sa.sa_mask); - new_sa.sa_flags = 0; - if (sigaction(signum, &new_sa, &old_sa) == -1) - return ((void (*)()) -1); - return (old_sa.sa_handler); -} -#endif - /* concurring to print_rheader... here for control_generic */ const char* remote_header_help = "S "; void print_remote_header(mpg123_handle *mh) @@ -108,100 +149,91 @@ void print_header_compact(mpg123_handle *mh) if(i.version > 3 || i.version < 0) i.version = 3; if(i.layer > 3 || i.layer < 0) i.layer = 0; - fprintf(stderr,"MPEG %s layer %s, ", versions[i.version], layers[i.layer]); + fprintf(stderr,"MPEG %s L %s ", versions[i.version], layers[i.layer]); switch(i.vbr) { case MPG123_CBR: - if(i.bitrate) fprintf(stderr, "%d kbit/s", i.bitrate); - else fprintf(stderr, "%d kbit/s (free format)", (int)((double)i.framesize*8*i.rate*0.001/samples_per_frame[i.version][i.layer]+0.5)); + if(i.bitrate) fprintf(stderr, "cbr%d", i.bitrate); + else fprintf(stderr, "cbr%d", (int)((double)i.framesize*8*i.rate*0.001/samples_per_frame[i.version][i.layer]+0.5)); break; - case MPG123_VBR: fprintf(stderr, "VBR"); break; - case MPG123_ABR: fprintf(stderr, "%d kbit/s ABR", i.abr_rate); break; + case MPG123_VBR: fprintf(stderr, "vbr"); break; + case MPG123_ABR: fprintf(stderr, "abr%d", i.abr_rate); break; default: fprintf(stderr, "???"); } - fprintf(stderr,", %ld Hz %s\n", i.rate, smodes[i.mode]); + fprintf(stderr," %ld %s\n", i.rate, smodes[i.mode]); } -#if 0 -/* removed the strndup for better portability */ -/* - * Allocate space for a new string containing the first - * "num" characters of "src". The resulting string is - * always zero-terminated. Returns NULL if malloc fails. - */ -char *strndup (const char *src, int num) +unsigned int roundui(double val) { - char *dst; - - if (!(dst = (char *) malloc(num+1))) - return (NULL); - dst[num] = '\0'; - return (strncpy(dst, src, num)); + double base = floor(val); + return (unsigned int) ((val-base) < 0.5 ? base : base + 1 ); } -#endif -/* - * Split "path" into directory and filename components. - * - * Return value is 0 if no directory was specified (i.e. - * "path" does not contain a '/'), OR if the directory - * is the same as on the previous call to this function. - * - * Return value is 1 if a directory was specified AND it - * is different from the previous one (if any). - */ - -int split_dir_file (const char *path, char **dname, char **fname) +/* Split into mm:ss.xx or hh:mm:ss, depending on value. */ +static void settle_time(double tim, unsigned long *times, char *sep) { - static char *lastdir = NULL; - char *slashpos; - - if ((slashpos = strrchr(path, '/'))) { - *fname = slashpos + 1; - *dname = strdup(path); /* , 1 + slashpos - path); */ - if(!(*dname)) { - perror("failed to allocate memory for dir name"); - return 0; - } - (*dname)[1 + slashpos - path] = 0; - if (lastdir && !strcmp(lastdir, *dname)) { - /*** same as previous directory ***/ - free (*dname); - *dname = lastdir; - return 0; - } - else { - /*** different directory ***/ - if (lastdir) - free (lastdir); - lastdir = *dname; - return 1; - } + if(tim >= 3600.) + { + *sep = ':'; + times[0] = (unsigned long) tim/3600; + tim -= times[0]*3600; + times[1] = (unsigned long) tim/60; + tim -= times[1]*60; + times[2] = (unsigned long) tim; } - else { - /*** no directory specified ***/ - if (lastdir) { - free (lastdir); - lastdir = NULL; - }; - *dname = NULL; - *fname = (char *)path; - return 0; + else + { + *sep = '.'; + times[0] = (unsigned long) tim/60; + times[1] = (unsigned long) tim%60; + times[2] = (unsigned long) (tim*100)%100; } } -unsigned int roundui(double val) +/* Print output buffer fill. */ +void print_buf(const char* prefix, out123_handle *ao) { - double base = floor(val); - return (unsigned int) ((val-base) < 0.5 ? base : base + 1 ); + long rate; + int framesize; + double tim; + unsigned long times[3]; + char timesep; + size_t buffsize; + + buffsize = out123_buffered(ao); + if(out123_getformat(ao, &rate, NULL, NULL, &framesize)) + return; + tim = (double)(buffsize/framesize)/rate; + settle_time(tim, times, ×ep); + fprintf( stderr, "\r%s[%02lu:%02lu%c%02lu]" + , prefix, times[0], times[1], timesep, times[2] ); } -void print_stat(mpg123_handle *fr, long offset, long buffsize) + + +/* Note about position info with buffering: + Negative positions mean that the previous track is still playing from the + buffer. It's a countdown. The frame counter always relates to the last + decoded frame, what entered the buffer right now. */ +void print_stat(mpg123_handle *fr, long offset, out123_handle *ao, int draw_bar) { - double tim1,tim2; - off_t rno, no; + size_t buffered; + off_t decoded; + off_t elapsed; + off_t remain; + off_t length; + off_t frame; + off_t frames; + off_t rframes; + int spf; double basevol, realvol; char *icy; + long rate; + int framesize; + struct mpg123_frameinfo mi; + char linebuf[256]; + char *line = NULL; + #ifndef WIN32 #ifndef GENERIC /* Only generate new stat line when stderr is ready... don't overfill... */ @@ -219,22 +251,206 @@ void print_stat(mpg123_handle *fr, long offset, long buffsize) } #endif #endif - if( MPG123_OK == mpg123_position(fr, offset, buffsize, &no, &rno, &tim1, &tim2) - && MPG123_OK == mpg123_getvolume(fr, &basevol, &realvol, NULL) ) + if(out123_getformat(ao, &rate, NULL, NULL, &framesize)) + return; + buffered = out123_buffered(ao)/framesize; + decoded = mpg123_tell(fr); + length = mpg123_length(fr); + frame = mpg123_tellframe(fr); + frames = mpg123_framelength(fr); + spf = mpg123_spf(fr); + if(decoded < 0 || length < 0 || frame < 0 || frames <= 0 || spf <= 0) + return; + /* Apply offset. */ + frame += offset; + if(frame < 0) + frame = 0; + /* Some sensible logic around offsets and time. + Buffering makes the relationships between the numbers non-trivial. */ + rframes = frames-frame; + elapsed = decoded + offset*spf - buffered; /* May be negative, a countdown. */ + remain = elapsed > 0 ? length - elapsed : length; + if( MPG123_OK == mpg123_info(fr, &mi) + && MPG123_OK == mpg123_getvolume(fr, &basevol, &realvol, NULL) ) { - fprintf(stderr, "\rFrame# %5"OFF_P" [%5"OFF_P"], Time: %02lu:%02u.%02u [%02u:%02u.%02u], RVA:%6s, Vol: %3u(%3u)", - (off_p)no, (off_p)rno, - (unsigned long) tim1/60, (unsigned int)tim1%60, (unsigned int)(tim1*100)%100, - (unsigned int)tim2/60, (unsigned int)tim2%60, (unsigned int)(tim2*100)%100, - rva_name[param.rva], roundui(basevol*100), roundui(realvol*100) ); - if(param.usebuffer) fprintf(stderr,", [%8ld] ",(long)buffsize); + char framefmt[10]; + char framestr[2][32]; + int linelen; + int maxlen; + int len; + int ti; + /* Deal with overly long times. */ + double tim[3]; + unsigned long times[3][3]; + char timesep[3]; + char sign[3] = {' ', ' ', ' '}; + + /* 255 is enough for the data I prepare, if there is no terminal width to + fill */ + maxlen = term_width(STDERR_FILENO); + linelen = maxlen > 0 ? maxlen : (sizeof(linebuf)-1); + line = linelen >= sizeof(linebuf) + ? malloc(linelen+1) /* Only malloc if it is a really long line. */ + : linebuf; /* Small buffer on stack is enough. */ + + tim[0] = (double)elapsed/rate; + tim[1] = (double)remain/rate; + tim[2] = (double)buffered/rate; + for(ti=0; ti<3; ++ti) + { + if(tim[ti] < 0.){ sign[ti] = '-'; tim[ti] = -tim[ti]; } + settle_time(tim[ti], times[ti], ×ep[ti]); + } + /* Taking pains to properly size the frame number fields. */ + len = snprintf( framefmt, sizeof(framefmt) + , "%%0%d"OFF_P, (int)log10(frames)+1 ); + if(len < 0 || len >= sizeof(framefmt)) + memcpy(framefmt, "%05"OFF_P, sizeof("%05"OFF_P)); + snprintf( framestr[0], sizeof(framestr[0])-1, framefmt, (off_p)frame); + framestr[0][sizeof(framestr[0])-1] = 0; + snprintf( framestr[1], sizeof(framestr[1])-1, framefmt, (off_p)rframes); + framestr[1][sizeof(framestr[1])-1] = 0; + /* Now start with the state line. */ + memset(line, 0, linelen+1); /* Always one zero more. */ + /* Start with position info. */ + len = snprintf( line, linelen + , "%c %s+%s %c%02lu:%02lu%c%02lu+%02lu:%02lu%c%02lu" + , stopped ? '_' : (paused ? '=' : '>') + , framestr[0], framestr[1] + , sign[0] + , times[0][0], times[0][1], timesep[0], times[0][2] + , times[1][0], times[1][1], timesep[1], times[1][2] + ); + /* Just cut it. */ + if(len >= linelen) + len=linelen; + if(len >= 0 && param.usebuffer && len < linelen ) + { /* Buffer info. */ + int len_add = snprintf( line+len, linelen-len + , " [%02lu:%02lu%c%02lu]" + , times[2][0], times[2][1], timesep[2], times[2][2] ); + if(len_add > 0) + len += len_add; + } + if(len >= 0 && len < linelen) + { /* Volume info. */ + int len_add = snprintf( line+len, linelen-len + , " %s %03u=%03u" + , rva_statname[param.rva], roundui(basevol*100), roundui(realvol*100) + ); + if(len_add > 0) + len += len_add; + } + if(len >= 0 && len < linelen) + { /* Bitrate. */ + int len_add = snprintf( line+len, linelen-len + , " %3d kb/s", mi.bitrate ); + if(len_add > 0) + len += len_add; + } + if(len >= 0 && len < linelen) + { /* Size of frame in bytes. */ + int len_add = snprintf( line+len, linelen-len + , " %4d B", mi.framesize ); + if(len_add > 0) + len += len_add; + } + if(len >= 0 && len < linelen) + { /* Size of frame in bytes. */ + int len_add = 0; + long res = 0; + if(mpg123_getstate(fr, MPG123_ACCURATE, &res, NULL) == MPG123_OK) + len_add = snprintf( line+len, linelen-len + , " %s", res ? "acc" : "fuz" ); + if(len_add > 0) + len += len_add; + } + if(len >= 0 && len < linelen) + { /* Size of frame in bytes. */ + int len_add = 0; + long res = mpg123_clip(fr); + if(res >= 0) + len_add = snprintf( line+len, linelen-len + , " %4ld clip", res ); + if(len_add > 0) + len += len_add; + } + if(len >= 0 && len < linelen) + { /* Size of frame in bytes. */ + int len_add = 0; + len_add = snprintf( line+len, linelen-len + , " p%+.3f", param.pitch ); + if(len_add > 0) + len += len_add; + } + if(len >= 0) + { + if(maxlen > 0 && len > maxlen) + { + /* Emergency cut to avoid terminal scrolling. */ + int i; + /* Blank a word that would have been cut off. */ + for(i=maxlen; i>=0; --i) + { + char old = line[i]; + line[i] = ' '; + if(old == ' ') + break; + } + line[maxlen] = 0; + len = maxlen; + } + /* Ensure that it is filled with spaces if we got some line length. + Shouldn't we always fill to maxlen? */ + if(maxlen > 0) + memset(line+len, ' ', linelen-len); +#ifdef HAVE_TERMIOS + draw_bar = draw_bar && term_have_fun(STDERR_FILENO); + /* Use inverse color to draw a progress bar. */ + if(maxlen > 0 && draw_bar) + { + char old; + int barlen = 0; + if(length > 0 && elapsed > 0) + { + if(elapsed < length) + barlen = (int)((double)elapsed/length * maxlen); + else + barlen = maxlen; + } + old = line[barlen]; + fprintf(stderr, "\x1b[7m"); + line[barlen] = 0; + fprintf(stderr, "\r%s", line); + line[barlen] = old; + fprintf(stderr, "\x1b[0m"); + fprintf(stderr, "%s", line+barlen); + } + else +#endif + fprintf(stderr, "\r%s", line); + } } /* Check for changed tags here too? */ if( mpg123_meta_check(fr) & MPG123_NEW_ICY && MPG123_OK == mpg123_icy(fr, &icy) ) - fprintf(stderr, "\nICY-META: %s\n", icy); + { + if(line) /* Clear the inverse video. */ + fprintf(stderr, "\r%s", line); + fprintf(stderr, "\nICY-META: %s\n", icy); + } + if(line && line != linebuf) + free(line); } void clear_stat() { - fprintf(stderr, "\r \r"); + int len = term_width(STDERR_FILENO); + if(len > 0) + { + char fmt[20]; + int flen; + if( (flen=snprintf(fmt, sizeof(fmt), "\r%%%ds\r", len)) > 0 + && flen < sizeof(fmt) ) + fprintf(stderr, fmt, " "); + } } diff --git a/deps/mpg123/src/common.h b/deps/mpg123/src/common.h index 3f1fba9..f787eb3 100644 --- a/deps/mpg123/src/common.h +++ b/deps/mpg123/src/common.h @@ -10,20 +10,29 @@ #define _MPG123_COMMON_H_ #include "mpg123app.h" +#include "out123.h" -void (*catchsignal(int signum, void(*handler)()))(); +extern int stopped; +extern int paused; + +/* Return non-zero if full terminal fun is desired/possible. */ +int term_have_fun(int fd); + +/* Return width of terminal associated with given descriptor, + -1 when there is none. */ +int term_width(int fd); void print_header(mpg123_handle *); void print_header_compact(mpg123_handle *); -void print_stat(mpg123_handle *fr, long offset, long buffsize); +void print_stat(mpg123_handle *fr, long offset, out123_handle *ao, int draw_bar); +void print_buf(const char* prefix, out123_handle *ao); void clear_stat(); /* for control_generic */ extern const char* remote_header_help; void print_remote_header(mpg123_handle *mh); void generic_sendmsg (const char *fmt, ...); -int split_dir_file(const char *path, char **dname, char **fname); - extern const char* rva_name[3]; + #endif diff --git a/deps/mpg123/src/compat/compat.c b/deps/mpg123/src/compat/compat.c new file mode 100644 index 0000000..675a2da --- /dev/null +++ b/deps/mpg123/src/compat/compat.c @@ -0,0 +1,665 @@ +/* + compat: Some compatibility functions (basic memory & string stuff in separate file) + + The mpg123 code is determined to keep it's legacy. A legacy of old, old UNIX. + So anything possibly somewhat advanced should be considered to be put here, with proper #ifdef;-) + + copyright 2007-2016 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis, Windows Unicode stuff by JonY. +*/ + +#include "config.h" +/* This source file does need _POSIX_SOURCE to get some sigaction. */ +#define _POSIX_SOURCE +#include "compat.h" + +#ifdef _MSC_VER +#include + +#if(defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_APP)) +#define WINDOWS_UWP +#endif + +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_DIRENT_H +# include +#endif + +/* Win32 is only supported with unicode now. These headers also cover + module stuff. The WANT_WIN32_UNICODE macro is synonymous with + "want windows-specific API, and only the unicode variants of which". */ +#ifdef WANT_WIN32_UNICODE +#include +#include +#include +#include +#endif + +#ifdef USE_MODULES +# ifdef HAVE_DLFCN_H +# include +# endif +#endif + +#include "debug.h" + +#ifndef WINDOWS_UWP + +char *compat_getenv(const char* name) +{ + char *ret = NULL; +#ifdef WANT_WIN32_UNICODE + wchar_t *env; + wchar_t *wname = NULL; + if(win32_utf8_wide(name, &wname, NULL) > 0) + { + env = _wgetenv(wname); + free(wname); + if(env) + win32_wide_utf8(env, &ret, NULL); + } +#else + ret = getenv(name); + if(ret) + ret = compat_strdup(ret); +#endif + return ret; +} + +#ifdef WANT_WIN32_UNICODE + +/* Convert unix UTF-8 (or ASCII) paths to Windows wide character paths. */ +static wchar_t* u2wpath(const char *upath) +{ + wchar_t* wpath, *p; + if(!upath || win32_utf8_wide(upath, &wpath, NULL) < 1) + return NULL; + for(p=wpath; *p; ++p) + if(*p == L'/') + *p = L'\\'; + return wpath; +} + +/* Convert Windows wide character paths to unix UTF-8. */ +static char* w2upath(const wchar_t *wpath) +{ + char* upath, *p; + if(!wpath || win32_wide_utf8(wpath, &upath, NULL) < 1) + return NULL; + for(p=upath; *p; ++p) + if(*p == '\\') + *p = '/'; + return upath; +} + +/* An absolute path that is too long and not already marked with + \\?\ can be marked as a long one and still work. */ +static int wpath_need_elongation(wchar_t *wpath) +{ + if( wpath && !PathIsRelativeW(wpath) + && wcslen(wpath) > MAX_PATH-1 + && wcsncmp(L"\\\\?\\", wpath, 4) ) + return 1; + else + return 0; +} + +/* Take any wide windows path and turn it into a path that is allowed + to be longer than MAX_PATH, if it is not already. */ +static wchar_t* wlongpath(wchar_t *wpath) +{ + size_t len, plen; + const wchar_t *prefix = L""; + wchar_t *wlpath = NULL; + if(!wpath) + return NULL; + + /* Absolute paths that do not start with \\?\ get that prepended + to allow them being long. */ + if(!PathIsRelativeW(wpath) && wcsncmp(L"\\\\?\\", wpath, 4)) + { + if(wcslen(wpath) >= 2 && PathIsUNCW(wpath)) + { + /* \\server\path -> \\?\UNC\server\path */ + prefix = L"\\\\?\\UNC"; + ++wpath; /* Skip the first \. */ + } + else /* c:\some/path -> \\?\c:\some\path */ + prefix = L"\\\\?\\"; + } + plen = wcslen(prefix); + len = plen + wcslen(wpath); + wlpath = malloc(len+1*sizeof(wchar_t)); + if(wlpath) + { + /* Brute force memory copying, swprintf is too dandy. */ + memcpy(wlpath, prefix, sizeof(wchar_t)*plen); + memcpy(wlpath+plen, wpath, sizeof(wchar_t)*(len-plen)); + wlpath[len] = 0; + } + return wlpath; +} + +/* Convert unix path to wide windows path, optionally marking + it as long path if necessary. */ +static wchar_t* u2wlongpath(const char *upath) +{ + wchar_t *wpath = NULL; + wchar_t *wlpath = NULL; + wpath = u2wpath(upath); + if(wpath_need_elongation(wpath)) + { + wlpath = wlongpath(wpath); + free(wpath); + wpath = wlpath; + } + return wpath; +} + +#endif + +#else + +static wchar_t* u2wlongpath(const char *upath) +{ + wchar_t* wpath, *p; + if (!upath || win32_utf8_wide(upath, &wpath, NULL) < 1) + return NULL; + for (p = wpath; *p; ++p) + if (*p == L'/') + *p = L'\\'; + return wpath; +} + +#endif + +/* Always add a default permission mask in case of flags|O_CREAT. */ +int compat_open(const char *filename, int flags) +{ + int ret; +#if defined (WANT_WIN32_UNICODE) + wchar_t *frag = NULL; + + frag = u2wlongpath(filename); + /* Fallback to plain open when ucs-2 conversion fails */ + if(!frag) + goto open_fallback; + + /*Try _wopen */ + ret = _wopen(frag, flags|_O_BINARY, _S_IREAD | _S_IWRITE); + if(ret != -1 ) + goto open_ok; /* msdn says -1 means failure */ + +open_fallback: +#endif + +#if (defined(WIN32) && !defined (__CYGWIN__)) + /* MSDN says POSIX function is deprecated beginning in Visual C++ 2005 */ + /* Try plain old _open(), if it fails, do nothing */ + ret = _open(filename, flags|_O_BINARY, _S_IREAD | _S_IWRITE); +#else + ret = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); +#endif + +#if defined (WANT_WIN32_UNICODE) +open_ok: + free(frag); +#endif + + return ret; +} + +/* Moved over from wav.c, logic with fallbacks added from the + example of compat_open(). */ +FILE* compat_fopen(const char *filename, const char *mode) +{ + FILE* stream = NULL; +#ifdef WANT_WIN32_UNICODE + int cnt = 0; + wchar_t *wname = NULL; + wchar_t *wmode = NULL; + + wname = u2wlongpath(filename); + if(!wname) + goto fopen_fallback; + cnt = win32_utf8_wide(mode, &wmode, NULL); + if( (wmode == NULL) || (cnt == 0)) + goto fopen_fallback; + + stream = _wfopen(wname, wmode); + if(stream) goto fopen_ok; + +fopen_fallback: +#endif + stream = fopen(filename, mode); +#ifdef WANT_WIN32_UNICODE + +fopen_ok: + free(wmode); + free(wname); +#endif + return stream; +} + +FILE* compat_fdopen(int fd, const char *mode) +{ + return fdopen(fd, mode); +} + +int compat_close(int infd) +{ +#if (defined(WIN32) && !defined (__CYGWIN__)) /* MSDN says POSIX function is deprecated beginning in Visual C++ 2005 */ + return _close(infd); +#else + return close(infd); +#endif +} + +int compat_fclose(FILE *stream) +{ + return fclose(stream); +} + +/* Windows Unicode stuff */ + +#ifdef WANT_WIN32_UNICODE +int win32_wide_utf8(const wchar_t * const wptr, char **mbptr, size_t * buflen) +{ + size_t len; + char *buf; + int ret = 0; + + len = WideCharToMultiByte(CP_UTF8, 0, wptr, -1, NULL, 0, NULL, NULL); /* Get utf-8 string length */ + buf = calloc(len + 1, sizeof (char)); /* Can we assume sizeof char always = 1? */ + + if(!buf) len = 0; + else { + if (len != 0) ret = WideCharToMultiByte(CP_UTF8, 0, wptr, -1, buf, len, NULL, NULL); /*Do actual conversion*/ + buf[len] = '0'; /* Must terminate */ + } + *mbptr = buf; /* Set string pointer to allocated buffer */ + if(buflen != NULL) *buflen = (len) * sizeof (char); /* Give length of allocated memory if needed. */ + return ret; +} + +int win32_utf8_wide(const char *const mbptr, wchar_t **wptr, size_t *buflen) +{ + size_t len; + wchar_t *buf; + int ret = 0; + + len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, mbptr, -1, NULL, 0); /* Get converted size */ + buf = calloc(len + 1, sizeof (wchar_t)); /* Allocate memory accordingly */ + + if(!buf) len = 0; + else { + if (len != 0) ret = MultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, mbptr, -1, buf, len); /* Do conversion */ + buf[len] = L'0'; /* Must terminate */ + } + *wptr = buf; /* Set string pointer to allocated buffer */ + if (buflen != NULL) *buflen = len * sizeof (wchar_t); /* Give length of allocated memory if needed. */ + return ret; /* Number of characters written */ +} +#endif + +#ifndef WINDOWS_UWP + +/* + The Windows file and path stuff is an extract of jon_y's win32 loader + prototype from the loader_rework branch. It's been divided in to + reusable functons by ThOr in the hope to work out some generic-looking + loader code for both POSIX and Windows. The routines might be + helpful for consistent path work in other parts of mpg123, too. + + This all is about getting some working code on a wide range of + systems while staying somewhat sane. If it does ridiculously inefficient + things with extraneous copies and grabbing of functions that made + it late to some official APIs, that's still fine with us. +*/ + +char* compat_catpath(const char *prefix, const char* path) +{ + char *ret = NULL; +#ifdef WANT_WIN32_UNICODE + wchar_t *wprefix = NULL; /* Wide windows versions of */ + wchar_t *wpath = NULL; /* input arguments. */ + wchar_t *locwret = NULL; /* Tmp return value from LocalAlloc */ + /* + This variation of combinepath can work with long and UNC paths, but + is not officially exposed in any DLLs, It also allocates all its buffers + internally via LocalAlloc, avoiding buffer overflow problems. + ThOr: I presume this hack is for supporting pre-8 Windows, as + from Windows 8 on, this is documented in the API. + */ + HRESULT (__stdcall *mypac)( const wchar_t *in, const wchar_t* more + , unsigned long flags, wchar_t **out ) = NULL; + HMODULE pathcch = NULL; + + if(!prefix && !path) + goto catpath_end; + wprefix = u2wpath(prefix); + wpath = u2wpath(path); + if((prefix && !wprefix) || (path && !wpath)) + goto catpath_end; + + /* Again: I presume this whole fun is to get at PathAllocCombine + even when pathcch.h is not available (like in MinGW32). */ + if( (pathcch = GetModuleHandleA("kernelbase")) ) + mypac = (void *)GetProcAddress(pathcch, "PathAllocCombine"); + if(mypac) /* PATHCCH_ALLOW_LONG_PATH = 1 per API docs */ + { + debug("Actually calling PathAllocCombine!"); + mypac(wprefix, wpath, 1, &locwret); + } + else + { + /* Playing safe, if we'd care much about performance, this would be on + the stack. */ + locwret = LocalAlloc(LPTR, sizeof(wchar_t)*MAX_PATH); + if(locwret) + PathCombineW(locwret, wprefix, wpath); + } + ret = w2upath(locwret); + +catpath_end: + LocalFree(locwret); + free(wprefix); + free(wpath); +#else + size_t len, prelen, patlen; + + if(path && path[0] == '/') + prefix = NULL; /* Absolute path stays as it is. */ + prelen = prefix ? strlen(prefix) : 0; + patlen = path ? strlen(path) : 0; + /* Concatenate the two, put a / in between if both present. */ + len = ((prefix && path) ? 1 : 0) + prelen + patlen; + ret = malloc(len+1); + if(ret) + { + size_t off=0; + memcpy(ret, prefix, prelen); + if(prefix && path) + ret[prelen+(off++)] = '/'; + memcpy(ret+prelen+off, path, patlen); + ret[len] = 0; + } +#endif + return ret; +} + +int compat_isdir(const char *path) +{ + int ret = 0; +#ifdef WANT_WIN32_UNICODE + wchar_t *wpath; + wpath = u2wlongpath(path); + if(wpath) + { + DWORD attr = GetFileAttributesW(wpath); + if(attr != INVALID_FILE_ATTRIBUTES && attr & FILE_ATTRIBUTE_DIRECTORY) + ret=1; + free(wpath); + } +#else + struct stat sb; + if(path && !stat(path, &sb)) + { + if(S_ISDIR(sb.st_mode)) + ret=1; + } +#endif + return ret; +} + +struct compat_dir +{ + char *path; +#ifdef WANT_WIN32_UNICODE + int gotone; /* Got a result stored from FindFirstFileW. */ + WIN32_FIND_DATAW d; + HANDLE ffn; +#else + DIR* dir; +#endif +}; + +struct compat_dir* compat_diropen(char *path) +{ + struct compat_dir *cd; + if(!path) + return NULL; + cd = malloc(sizeof(*cd)); + if(!cd) + return NULL; +#ifdef WANT_WIN32_UNICODE + cd->gotone = 0; + { + char *pattern; + wchar_t *wpattern; + pattern = compat_catpath(path, "*"); + wpattern = u2wlongpath(pattern); + if(wpattern) + { + cd->ffn = FindFirstFileW(wpattern, &(cd->d)); + if(cd->ffn == INVALID_HANDLE_VALUE) + { + /* FindClose() only needed after successful first find, right? */ + free(cd); + cd = NULL; + } + else + cd->gotone = 1; + } + free(wpattern); + free(pattern); + } +#else + cd->dir = opendir(path); + if(!cd->dir) + { + free(cd); + cd = NULL; + } +#endif + if(cd) + { + cd->path = compat_strdup(path); + if(!cd->path) + { + compat_dirclose(cd); + cd = NULL; + } + } + return cd; +} + +void compat_dirclose(struct compat_dir *cd) +{ + if(cd) + { + free(cd->path); +#ifdef WANT_WIN32_UNICODE + FindClose(cd->ffn); +#else + closedir(cd->dir); +#endif + free(cd); + } +} + +char* compat_nextfile(struct compat_dir *cd) +{ + if(!cd) + return NULL; +#ifdef WANT_WIN32_UNICODE + while(cd->gotone || FindNextFileW(cd->ffn, &(cd->d))) + { + cd->gotone = 0; + if(!(cd->d.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) + { + char *ret; + win32_wide_utf8(cd->d.cFileName, &ret, NULL); + return ret; + } + } +#else + { + struct dirent *dp; + while((dp = readdir(cd->dir))) + { + struct stat fst; + char *fullpath = compat_catpath(cd->path, dp->d_name); + if(fullpath && !stat(fullpath, &fst) && S_ISREG(fst.st_mode)) + { + free(fullpath); + return compat_strdup(dp->d_name); + } + free(fullpath); + } + } +#endif + return NULL; +} + +char* compat_nextdir(struct compat_dir *cd) +{ + if(!cd) + return NULL; +#ifdef WANT_WIN32_UNICODE + while(cd->gotone || FindNextFileW(cd->ffn, &(cd->d))) + { + cd->gotone = 0; + if(cd->d.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + char *ret; + win32_wide_utf8(cd->d.cFileName, &ret, NULL); + return ret; + } + } +#else + { + struct dirent *dp; + while((dp = readdir(cd->dir))) + { + struct stat fst; + char *fullpath = compat_catpath(cd->path, dp->d_name); + if(fullpath && !stat(fullpath, &fst) && S_ISDIR(fst.st_mode)) + { + free(fullpath); + return compat_strdup(dp->d_name); + } + free(fullpath); + } + } +#endif + return NULL; +} + +#endif + +#ifdef USE_MODULES +/* + This is what I expected the platform-specific dance for dynamic module + support to be. Little did I know about the peculiarities of (long) + paths and directory/file search on Windows. +*/ + +void *compat_dlopen(const char *path) +{ + void *handle = NULL; +#ifdef WANT_WIN32_UNICODE + wchar_t *wpath; + wpath = u2wlongpath(path); + if(wpath) + handle = LoadLibraryW(wpath); + free(wpath); +#else + handle = dlopen(path, RTLD_NOW); +#endif + return handle; +} + +void *compat_dlsym(void *handle, const char *name) +{ + void *sym = NULL; + if(!handle) + return NULL; +#ifdef WANT_WIN32_UNICODE + sym = GetProcAddress(handle, name); +#else + sym = dlsym(handle, name); +#endif + return sym; +} + +void compat_dlclose(void *handle) +{ + if(!handle) + return; +#ifdef WANT_WIN32_UNICODE + FreeLibrary(handle); +#else + dlclose(handle); +#endif +} + +#endif /* USE_MODULES */ + + +/* This shall survive signals and any return value less than given byte count + is an error */ +size_t unintr_write(int fd, void const *buffer, size_t bytes) +{ + size_t written = 0; + while(bytes) + { + ssize_t part = write(fd, (char*)buffer+written, bytes); + if(part < 0 && errno != EINTR) + break; + bytes -= part; + written += part; + } + return written; +} + +/* Same for reading the data. */ +size_t unintr_read(int fd, void *buffer, size_t bytes) +{ + size_t got = 0; + while(bytes) + { + ssize_t part = read(fd, (char*)buffer+got, bytes); + if(part < 0 && errno != EINTR) + break; + bytes -= part; + got += part; + } + return got; +} + +#ifndef NO_CATCHSIGNAL +#if (!defined(WIN32) || defined (__CYGWIN__)) && defined(HAVE_SIGNAL_H) +void (*catchsignal(int signum, void(*handler)()))() +{ + struct sigaction new_sa; + struct sigaction old_sa; + +#ifdef DONT_CATCH_SIGNALS + fprintf (stderr, "Not catching any signals.\n"); + return ((void (*)()) -1); +#endif + + new_sa.sa_handler = handler; + sigemptyset(&new_sa.sa_mask); + new_sa.sa_flags = 0; + if(sigaction(signum, &new_sa, &old_sa) == -1) + return ((void (*)()) -1); + return (old_sa.sa_handler); +} +#endif +#endif diff --git a/deps/mpg123/src/libmpg123/compat.h b/deps/mpg123/src/compat/compat.h similarity index 54% rename from deps/mpg123/src/libmpg123/compat.h rename to deps/mpg123/src/compat/compat.h index 046d23b..40230ca 100644 --- a/deps/mpg123/src/libmpg123/compat.h +++ b/deps/mpg123/src/compat/compat.h @@ -15,7 +15,17 @@ #define MPG123_COMPAT_H #include "config.h" -#include "intsym.h" +// // #include "intsym.h" + +/* For --nagging compilation with -std=c89, we need + to disable the inline keyword. */ +#ifdef PLAIN_C89 +#ifndef inline +#define inline +#endif +#endif + +#include #ifdef HAVE_STDLIB_H /* realloc, size_t */ @@ -63,6 +73,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #ifdef OS2 #include @@ -76,6 +89,9 @@ #include #endif +/* compat_open makes little sense without */ +#include + /* To parse big numbers... */ #ifdef HAVE_ATOLL #define atobigint atoll @@ -85,15 +101,21 @@ typedef unsigned char byte; +#if defined(_MSC_VER) && !defined(MPG123_DEF_SSIZE_T) +#define MPG123_DEF_SSIZE_T +#include +typedef ptrdiff_t ssize_t; +#endif + /* A safe realloc also for very old systems where realloc(NULL, size) returns NULL. */ void *safe_realloc(void *ptr, size_t size); #ifndef HAVE_STRERROR const char *strerror(int errnum); #endif -#ifndef HAVE_STRDUP -char *strdup(const char *s); -#endif +/* Roll our own strdup() that does not depend on libc feature test macros + and returns NULL on NULL input instead of crashing. */ +char* compat_strdup(const char *s); /* If we have the size checks enabled, try to derive some sane printfs. Simple start: Use max integer type and format if long is not big enough. @@ -122,6 +144,10 @@ typedef intmax_t ssize_p; typedef long ssize_p; #endif +/* Get an environment variable, possibly converted to UTF-8 from wide string. + The return value is a copy that you shall free. */ +char *compat_getenv(const char* name); + /** * Opening a file handle can be different. * This function here is defined to take a path in native encoding (ISO8859 / UTF-8 / ...), or, when MS Windows Unicode support is enabled, an UTF-8 string that will be converted back to native UCS-2 (wide character) before calling the system's open function. @@ -130,6 +156,11 @@ typedef long ssize_p; * @return file descriptor (>=0) or error code. */ int compat_open(const char *filename, int flags); +FILE* compat_fopen(const char *filename, const char *mode); +/** + * Also fdopen to avoid having to define POSIX macros in various source files. + */ +FILE* compat_fdopen(int fd, const char *mode); /** * Closing a file handle can be platform specific. @@ -138,6 +169,7 @@ int compat_open(const char *filename, int flags); * @return 0 if the file was successfully closed. A return value of -1 indicates an error. */ int compat_close(int infd); +int compat_fclose(FILE* stream); /* Those do make sense in a separate file, but I chose to include them in compat.c because that's the one source whose object is shared between mpg123 and libmpg123 -- and both need the functionality internally. */ @@ -170,9 +202,88 @@ int win32_wide_utf8(const wchar_t * const wptr, char **mbptr, size_t * buflen); int win32_utf8_wide(const char *const mbptr, wchar_t **wptr, size_t *buflen); #endif +/* + A little bit of path abstraction: We always work with plain char strings + that usually represent POSIX-ish UTF-8 paths (something like c:/some/file + might appear). For Windows, those are converted to wide strings with \ + instead of / and possible fun is had with prefixes to get around the old + path length limit. Outside of the compat library, that stuff should not + matter, although something like //?/UNC/server/some/file could be thrown + around as UTF-8 string, to be converted to a wide \\?\UNC\server\some\file + just before handing it to Windows API. + + There is a lot of unnecessary memory allocation and string copying because + of this, but this filesystem stuff is not really relevant to mpg123 + performance, so the goal is to keep the code outside the compatibility layer + simple. +*/ + +/* + Concatenate a prefix and a path, one of them alowed to be NULL. + If the path is already absolute, the prefix is ignored. Relative + parts (like /..) are resolved if this is sensible for the platform + (meaning: for Windows), else they are preserved (on POSIX, actual + file system access would be needed because of symlinks). +*/ +char* compat_catpath(const char *prefix, const char* path); + +/* Return 1 if the given path indicates an existing directory, + 0 otherwise. */ +int compat_isdir(const char *path); + +/* + Directory traversal. This talks ASCII/UTF-8 paths externally, converts + to/from wchar_t internally if the platform wants that. Returning NULL + means failure to open/end of listing. + There is no promise about sorting entries. +*/ +struct compat_dir; +/* Returns NULL if either directory failed to open or listing is empty. + Listing can still be empty even if non-NULL, so always rely on the + nextfile/nextdir functions. */ +struct compat_dir* compat_diropen(char *path); +void compat_dirclose(struct compat_dir*); +/* Get the next entry that is a file (or symlink to one). + The returned string is a copy that needs to be freed after use. */ +char* compat_nextfile(struct compat_dir*); +/* Get the next entry that is a directory (or symlink to one). + The returned string is a copy that needs to be freed after use. */ +char* compat_nextdir (struct compat_dir*); + +#ifdef USE_MODULES +/* + For keeping the path mess local, a system-specific dlopen() variant + is contained in here, too. This is very thin wrapping, even sparing + definition of a handle type, just using void pointers. + Use of absolute paths is a good idea if you want to be sure which + file is openend, as default search paths vary. +*/ +void *compat_dlopen (const char *path); +void *compat_dlsym (void *handle, const char* name); +void compat_dlclose(void *handle); +#endif + +/* Blocking write/read of data with signal resilience. + Both continue after being interrupted by signals and always return the + amount of processed data (shortage indicating actual problem or EOF). */ +size_t unintr_write(int fd, void const *buffer, size_t bytes); +size_t unintr_read (int fd, void *buffer, size_t bytes); + /* That one comes from Tellie on OS/2, needed in resolver. */ #ifdef __KLIBC__ typedef int socklen_t; #endif +/* OSX SDK defines an enum with "normal" as value. That clashes with + optimize.h */ +#ifdef __APPLE__ +#define normal mpg123_normal +#endif + +#include "true.h" + +#if (!defined(WIN32) || defined (__CYGWIN__)) && defined(HAVE_SIGNAL_H) +void (*catchsignal(int signum, void(*handler)()))(); +#endif + #endif diff --git a/deps/mpg123/src/compat/compat_str.c b/deps/mpg123/src/compat/compat_str.c new file mode 100644 index 0000000..f58fc23 --- /dev/null +++ b/deps/mpg123/src/compat/compat_str.c @@ -0,0 +1,43 @@ +/* + compat: Some compatibility functions (basic memory and string stuff) + + The mpg123 code is determined to keep it's legacy. A legacy of old, old UNIX. + So anything possibly somewhat advanced should be considered to be put here, with proper #ifdef;-) + + copyright 2007-2016 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis, Windows Unicode stuff by JonY. +*/ + +#include "compat.h" +#include "debug.h" + +/* A safe realloc also for very old systems where realloc(NULL, size) returns NULL. */ +void *safe_realloc(void *ptr, size_t size) +{ + if(ptr == NULL) return malloc(size); + else return realloc(ptr, size); +} + +#ifndef HAVE_STRERROR +const char *strerror(int errnum) +{ + extern int sys_nerr; + extern char *sys_errlist[]; + + return (errnum < sys_nerr) ? sys_errlist[errnum] : ""; +} +#endif + +char* compat_strdup(const char *src) +{ + char *dest = NULL; + if(src) + { + size_t len; + len = strlen(src)+1; + if((dest = malloc(len))) + memcpy(dest, src, len); + } + return dest; +} diff --git a/deps/mpg123/src/config.h.in b/deps/mpg123/src/config.h.in index 249fe27..508c532 100644 --- a/deps/mpg123/src/config.h.in +++ b/deps/mpg123/src/config.h.in @@ -10,6 +10,12 @@ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD +/* Define if .balign is present. */ +#undef ASMALIGN_BALIGN + +/* Define if .align just takes byte count. */ +#undef ASMALIGN_BYTE + /* Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. */ #undef ASMALIGN_EXP @@ -25,6 +31,9 @@ /* Define if building with dynamcally linked libmpg123 */ #undef DYNAMIC_BUILD +/* Use EFBIG as substitude for EOVERFLOW, mingw.org may lack the latter */ +#undef EOVERFLOW + /* Define if FIFO support is enabled. */ #undef FIFO @@ -73,9 +82,21 @@ /* Define to 1 if you have the header file. */ #undef HAVE_CULIB_H +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the `dlclose' function. */ +#undef HAVE_DLCLOSE + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have the `dlopen' function. */ +#undef HAVE_DLOPEN + +/* Define to 1 if you have the `dlsym' function. */ +#undef HAVE_DLSYM + /* Define if getaddrinfo accepts the AI_ADDRCONFIG flag */ #undef HAVE_GAI_ADDRCONFIG @@ -109,9 +130,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H -/* Define if libltdl is available */ -#undef HAVE_LTDL - /* Define to 1 if you have the header file. */ #undef HAVE_MACHINE_SOUNDCARD_H @@ -181,9 +199,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR @@ -211,6 +226,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SIGNAL_H @@ -253,16 +271,21 @@ /* Define if IPV6 support is enabled. */ #undef IPV6 -/* Define this to the size of long type in bits, used for LFS small/native - alias functions. */ +/* Define this to the size of native offset type in bits, used for LFS alias + functions. */ #undef LFS_ALIAS_BITS -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the extension used for runtime loadable modules, say, ".so". */ +#undef LT_MODULE_EXT + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR -/* The suffix for module files. */ -#undef MODULE_FILE_SUFFIX +/* Define to the shared library suffix, say, ".dylib". */ +#undef LT_SHARED_EXT + +/* Define to the shared archive member specification, say "(shr.o)". */ +#undef LT_SHARED_LIB_MEMBER /* Define if network support is enabled. */ #undef NETWORK @@ -279,6 +302,9 @@ /* Define to disable downsampled decoding. */ #undef NO_DOWNSAMPLE +/* Define to disable equalizer. */ +#undef NO_EQUALIZER + /* Define to disable error messages in combination with a return value (the return is left intact). */ #undef NO_ERETURN @@ -313,6 +339,9 @@ /* Define to disable string functions. */ #undef NO_STRING +/* Define for post-processed 32 bit formats. */ +#undef NO_SYNTH32 + /* Define to disable warning messages. */ #undef NO_WARNING @@ -361,6 +390,12 @@ /* Define if modules are enabled */ #undef USE_MODULES +/* Define for new Huffman decoding scheme. */ +#undef USE_NEW_HUFFTABLE + +/* Define to use yasm for assemble AVX sources. */ +#undef USE_YASM_FOR_AVX + /* Version number of package */ #undef VERSION @@ -417,6 +452,12 @@ /* Define to `int' if does not define. */ #undef int32_t +/* Define to `long long' if does not define. */ +#undef int64_t + +/* Define to the native offset type (long or actually off_t). */ +#undef lfs_alias_t + /* Define to `long int' if does not define. */ #undef off_t diff --git a/deps/mpg123/src/control_generic.c b/deps/mpg123/src/control_generic.c index 3620840..61dfa46 100644 --- a/deps/mpg123/src/control_generic.c +++ b/deps/mpg123/src/control_generic.c @@ -7,27 +7,41 @@ reworked by Thomas Orgis - it was the entry point for eventually becoming maintainer... */ +#include "config.h" +/* _BSD_SOURCE needed for setlinebuf, erm, but that's deprecated + so trying _DEFAULT_SOURCE */ +#ifndef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE +#endif +/* Defining that after _DEFAULT_SOURCE seems fine and is still + needed for older glibc. I guess I need a configure check + about setlinebuf()/setvbuf() if I really care about old + systems. */ +#ifndef _BSD_SOURCE +#define _BSD_SOURCE +#endif +#include "compat.h" + #include "mpg123app.h" +#include "out123.h" #include #include #if !defined (WIN32) || defined (__CYGWIN__) #include #include #endif -#include #include #include #include "common.h" -#include "buffer.h" #include "genre.h" #include "playlist.h" +#include "audio.h" #define MODE_STOPPED 0 #define MODE_PLAYING 1 #define MODE_PAUSED 2 -extern int buffer_pid; -extern audio_output_t *ao; +extern out123_handle *ao; #ifdef FIFO #include @@ -101,7 +115,7 @@ void generic_sendstat (mpg123_handle *fr) { off_t current_frame, frames_left; double current_seconds, seconds_left; - if(!mpg123_position(fr, 0, xfermem_get_usedspace(buffermem), ¤t_frame, &frames_left, ¤t_seconds, &seconds_left)) + if(!mpg123_position(fr, 0, out123_buffered(ao), ¤t_frame, &frames_left, ¤t_seconds, &seconds_left)) generic_sendmsg("F %"OFF_P" %"OFF_P" %3.2f %3.2f", (off_p)current_frame, (off_p)frames_left, current_seconds, seconds_left); } @@ -214,11 +228,7 @@ void generic_sendinfo (char *filename) static void generic_load(mpg123_handle *fr, char *arg, int state) { - if(param.usebuffer) - { - buffer_resync(); - if(mode == MODE_PAUSED && state != MODE_PAUSED) buffer_start(); - } + out123_drop(ao); if(mode != MODE_STOPPED) { close_track(); @@ -234,7 +244,6 @@ static void generic_load(mpg123_handle *fr, char *arg, int state) if(mpg123_meta_check(fr) & MPG123_NEW_ID3) { generic_sendinfoid3(fr); - mpg123_meta_free(fr); } else generic_sendinfo(arg); @@ -268,6 +277,8 @@ static void generic_loadlist(mpg123_handle *fr, char *arg) /* Now got the plain playlist path in arg. On to evil manupulation of mpg123's playlist code. */ param.listname = arg; param.listentry = 0; /* The playlist shall not filter. */ + param.loop = 1; + param.shuffle = 0; prepare_playlist(0, NULL); while((file = get_next_file())) { @@ -312,7 +323,7 @@ int control_generic (mpg123_handle *fr) #endif /* the command behaviour is different, so is the ID */ /* now also with version for command availability */ - fprintf(outstream, "@R MPG123 (ThOr) v7\n"); + fprintf(outstream, "@R MPG123 (ThOr) v8\n"); #ifdef FIFO if(param.fifo) { @@ -355,13 +366,13 @@ int control_generic (mpg123_handle *fr) if (n == 0) { if (!play_frame()) { + out123_pause(ao); /* When the track ended, user may want to keep it open (to seek back), so there is a decision between stopping and pausing at the end. */ if(param.keep_open) { mode = MODE_PAUSED; /* Hm, buffer should be stopped already, shouldn't it? */ - if(param.usebuffer) buffer_stop(); generic_sendmsg("P 1"); } else @@ -471,11 +482,11 @@ int control_generic (mpg123_handle *fr) { if (mode == MODE_PLAYING) { mode = MODE_PAUSED; - if(param.usebuffer) buffer_stop(); + out123_pause(ao); generic_sendmsg("P 1"); } else { mode = MODE_PLAYING; - if(param.usebuffer) buffer_start(); + out123_continue(ao); generic_sendmsg("P 2"); } } else generic_sendmsg("P 0"); @@ -485,11 +496,9 @@ int control_generic (mpg123_handle *fr) /* STOP */ if (!strcasecmp(comstr, "S") || !strcasecmp(comstr, "STOP")) { if (mode != MODE_STOPPED) { - if(param.usebuffer) - { - buffer_stop(); - buffer_resync(); - } + /* Do we want to drop here? */ + out123_drop(ao); + out123_pause(ao); close_track(); mode = MODE_STOPPED; generic_sendmsg("P 0"); @@ -533,6 +542,17 @@ int control_generic (mpg123_handle *fr) continue; } + if(!strcasecmp(comstr, "FORMAT")) + { + long rate; + int ch; + int ret = mpg123_getformat2(fr, &rate, &ch, NULL, 0); + /* I need to have portable printf specifiers that do not truncate the type... more autoconf... */ + if(ret < 0) generic_sendmsg("E %s", mpg123_strerror(fr)); + else generic_sendmsg("FORMAT %li %i", rate, ch); + continue; + } + if(!strcasecmp(comstr, "SHOWEQ")) { int i; @@ -569,7 +589,7 @@ int control_generic (mpg123_handle *fr) generic_sendmsg("H HELP/H: command listing (LONG/SHORT forms), command case insensitve"); generic_sendmsg("H LOAD/L : load and start playing resource "); generic_sendmsg("H LOADPAUSED/LP : load but do not start playing resource "); - generic_sendmsg("H LOADLIST : load a playlist from given , and display its entries, optionally load and play one of these specificed by the integer (<0: just list, 0: play last track, >0:play track with that position in list)"); + generic_sendmsg("H LOADLIST/LL : load a playlist from given , and display its entries, optionally load and play one of these specificed by the integer (<0: just list, 0: play last track, >0:play track with that position in list)"); generic_sendmsg("H PAUSE/P: pause playback"); generic_sendmsg("H STOP/S: stop playback (closes file)"); generic_sendmsg("H JUMP/J |<+offset>|<-offset>|<[+|-]seconds>s: jump to mpeg frame or change position by offset, same in seconds if number followed by \"s\""); @@ -581,11 +601,12 @@ int control_generic (mpg123_handle *fr) generic_sendmsg("H SEEK/K |<+offset>|<-offset>: jump to output sample position or change position by offset"); generic_sendmsg("H SCAN: scan through the file, building seek index"); generic_sendmsg("H SAMPLE: print out the sample position and total number of samples"); + generic_sendmsg("H FORMAT: print out sampling rate in Hz and channel count"); generic_sendmsg("H SEQ : simple eq setting..."); generic_sendmsg("H PITCH <[+|-]value>: adjust playback speed (+0.01 is 1 %% faster)"); generic_sendmsg("H SILENCE: be silent during playback (meaning silence in text form)"); generic_sendmsg("H STATE: Print auxiliary state info in several lines (just try it to see what info is there)."); - generic_sendmsg("H TAG/T: Print all available (ID3) tag info, for ID3v2 that gives output of all collected text fields, using the ID3v2.3/4 4-character names."); + generic_sendmsg("H TAG/T: Print all available (ID3) tag info, for ID3v2 that gives output of all collected text fields, using the ID3v2.3/4 4-character names. NOTE: ID3v2 data will be deleted on non-forward seeks."); generic_sendmsg("H The output is multiple lines, begin marked by \"@T {\", end by \"@T }\"."); generic_sendmsg("H ID3v1 data is like in the @I info lines (see below), just with \"@T\" in front."); generic_sendmsg("H An ID3v2 data field is introduced via ([ ... ] means optional):"); @@ -613,6 +634,7 @@ int control_generic (mpg123_handle *fr) if (cmd && strlen(cmd) && arg && strlen(arg)) { +#ifndef NO_EQUALIZER /* Simple EQ: SEQ */ if (!strcasecmp(cmd, "SEQ")) { double b,m,t; @@ -661,11 +683,13 @@ int control_generic (mpg123_handle *fr) continue; } - +#endif /* SEEK to a sample offset */ if(!strcasecmp(cmd, "K") || !strcasecmp(cmd, "SEEK")) { off_t soff; + off_t oldpos; + off_t newpos; char *spos = arg; int whence = SEEK_SET; if(mode == MODE_STOPPED) @@ -673,6 +697,7 @@ int control_generic (mpg123_handle *fr) generic_sendmsg("E No track loaded!"); continue; } + oldpos = mpg123_tell(fr); soff = (off_t) atobigint(spos); if(spos[0] == '-' || spos[0] == '+') whence = SEEK_CUR; @@ -681,15 +706,19 @@ int control_generic (mpg123_handle *fr) generic_sendmsg("E Error while seeking: %s", mpg123_strerror(fr)); mpg123_seek(fr, 0, SEEK_SET); } - if(param.usebuffer) buffer_resync(); + out123_drop(ao); + + newpos = mpg123_tell(fr); + if(newpos <= oldpos) mpg123_meta_free(fr); - generic_sendmsg("K %li", (long)mpg123_tell(fr)); + generic_sendmsg("K %"OFF_P, (off_p)newpos); continue; } /* JUMP */ if (!strcasecmp(cmd, "J") || !strcasecmp(cmd, "JUMP")) { char *spos; off_t offset; + off_t oldpos; double secs; spos = arg; @@ -698,6 +727,7 @@ int control_generic (mpg123_handle *fr) generic_sendmsg("E No track loaded!"); continue; } + oldpos = framenum; if(spos[strlen(spos)-1] == 's' && sscanf(arg, "%lf", &secs) == 1) offset = mpg123_timeframe(fr, secs); else offset = atol(spos); @@ -710,8 +740,9 @@ int control_generic (mpg123_handle *fr) generic_sendmsg("E Error while seeking"); mpg123_seek_frame(fr, 0, SEEK_SET); } - if(param.usebuffer) buffer_resync(); + out123_drop(ao); + if(framenum <= oldpos) mpg123_meta_free(fr); generic_sendmsg("J %d", framenum); continue; } @@ -753,7 +784,7 @@ int control_generic (mpg123_handle *fr) /* LOAD - actually play */ if (!strcasecmp(cmd, "L") || !strcasecmp(cmd, "LOAD")){ generic_load(fr, arg, MODE_PLAYING); continue; } - if (!strcasecmp(cmd, "L") || !strcasecmp(cmd, "LOADLIST")){ generic_loadlist(fr, arg); continue; } + if (!strcasecmp(cmd, "LL") || !strcasecmp(cmd, "LOADLIST")){ generic_loadlist(fr, arg); continue; } /* LOADPAUSED */ if (!strcasecmp(cmd, "LP") || !strcasecmp(cmd, "LOADPAUSED")){ generic_load(fr, arg, MODE_PAUSED); continue; } @@ -785,14 +816,6 @@ int control_generic (mpg123_handle *fr) } /* end main (alive) loop */ debug("going to end"); /* quit gracefully */ -#ifndef NOXFERMEM - if (param.usebuffer) { - kill(buffer_pid, SIGINT); - xfermem_done_writer(buffermem); - waitpid(buffer_pid, NULL, 0); - xfermem_done(buffermem); - } -#endif debug("closing control"); #ifdef FIFO #if WANT_WIN32_FIFO diff --git a/deps/mpg123/src/equalizer.c b/deps/mpg123/src/equalizer.c index ecce78b..f1d08b7 100644 --- a/deps/mpg123/src/equalizer.c +++ b/deps/mpg123/src/equalizer.c @@ -9,9 +9,11 @@ #include "mpg123app.h" /* Load the settings from the path in the global variable equalfile. - If there is no file, restore equalizer defaults. */ + If there is no file, restore equalizer defaults. + If NO_EQUALIZER is defined, it does nothing else that return zero */ int load_equalizer(mpg123_handle *mh) { +#ifndef NO_EQUALIZER if(equalfile != NULL) { /* tst; ThOr: not TRUE or FALSE: allocated or not... */ FILE *fe; @@ -43,6 +45,6 @@ int load_equalizer(mpg123_handle *mh) } } else mpg123_reset_eq(mh); - +#endif return 0; } diff --git a/deps/mpg123/src/getlopt.c b/deps/mpg123/src/getlopt.c index 2296886..36b0cc1 100644 --- a/deps/mpg123/src/getlopt.c +++ b/deps/mpg123/src/getlopt.c @@ -7,10 +7,9 @@ old timestamp: Tue Apr 8 07:15:13 MET DST 1997 */ -#include #include "config.h" -#include "getlopt.h" #include "compat.h" +#include "getlopt.h" #include "debug.h" int loptind = 1; /* index in argv[] */ @@ -34,7 +33,7 @@ topt *findopt (int islong, char *opt, topt *opts) return (0); } -int performoption (int argc, char *argv[], topt *opt) +static int performoption (int argc, char *argv[], topt *opt) { int result = GLO_CONTINUE; /* this really is not supposed to happen, so the exit may be justified to create asap ficing pressure */ @@ -44,6 +43,8 @@ int performoption (int argc, char *argv[], topt *opt) exit(1); \ } + debug2("performoption on %c / %s" + , opt->sname ? opt->sname : '_', opt->lname ? opt->lname : ""); if (!(opt->flags & GLO_ARG)) { /* doesn't take argument */ if (opt->var) { if (opt->flags & GLO_CHAR) /* var is *char */ @@ -66,17 +67,20 @@ int performoption (int argc, char *argv[], topt *opt) debug("casting assignment done"); } +#if 0 /* Oliver: What was this for?! --ThOr */ else result = opt->value ? opt->value : opt->sname; +#endif } else { /* requires argument */ + debug("argument required"); if (loptind >= argc) return (GLO_NOARG); loptarg = argv[loptind++]+loptchr; loptchr = 0; if (opt->var) { if (opt->flags & GLO_CHAR) /* var is *char */ - *((char **) opt->var) = strdup(loptarg); /* valgrind claims lost memory here */ + *((char **) opt->var) = compat_strdup(loptarg); /* valgrind claims lost memory here */ else if(opt->flags & GLO_LONG) *((long *) opt->var) = atol(loptarg); else if(opt->flags & GLO_INT) @@ -85,11 +89,14 @@ int performoption (int argc, char *argv[], topt *opt) *((double *) opt->var) = atof(loptarg); else prog_error(); } +#if 0 /* Oliver: What was this for?! --ThOr */ else result = opt->value ? opt->value : opt->sname; +#endif } if (opt->func) opt->func(loptarg); + debug4("result: %i (%p, %li, %i)", result, opt->var, opt->value, opt->sname); return (result); } diff --git a/deps/mpg123/src/httpget.c b/deps/mpg123/src/httpget.c index 4339858..dd469d6 100644 --- a/deps/mpg123/src/httpget.c +++ b/deps/mpg123/src/httpget.c @@ -7,7 +7,7 @@ old timestamp: Wed Apr 9 20:57:47 MET DST 1997 Thomas' notes: - + ; I used to do GET http://server/path HTTP/1.0 @@ -36,6 +36,8 @@ #include "true.h" #endif +#include + #include "debug.h" void httpdata_init(struct httpdata *e) @@ -80,7 +82,15 @@ static const char* mime_file[] = NULL }; static const char* mime_m3u[] = { "audio/mpegurl", "audio/mpeg-url", "audio/x-mpegurl", NULL }; -static const char* mime_pls[] = { "audio/x-scpls", "audio/scpls", "application/pls", NULL }; +static const char* mime_pls[] = +{ + "audio/x-scpls" +, "audio/scpls" +, "application/pls" +, "application/x-scpls" +, "application/pls+xml" +, NULL +}; static const char** mimes[] = { mime_file, mime_m3u, mime_pls, NULL }; int debunk_mime(const char* mime) @@ -93,13 +103,17 @@ int debunk_mime(const char* mime) aux = strchr(mime, ';'); if(aux != NULL) { - fprintf(stderr, "Warning: additional info in content-type ignored (%s)\n", aux+1); - /* Just compare up to before the ";". */ + if(!param.quiet) + fprintf(stderr, "Warning: additional info in content-type ignored (%s)\n", aux+1); + /* Just compare up to before the ";" */ len = aux-mime; } /* Else, compare the whole string -- including the end. */ else len = strlen(mime)+1; + /* Skip trailing whitespace, to ne nice to strange folks. */ + while(len && isspace(mime[len-1])) --len; + for(i=0; mimes[i] != NULL; ++i) for(j=0; mimes[i][j] != NULL; ++j) if(!strncasecmp(mimes[i][j], mime, len)) goto debunk_result; @@ -146,10 +160,10 @@ static int writestring (int fd, mpg123_string *string) return TRUE; } -static size_t readstring (mpg123_string *string, size_t maxlen, FILE *f) +static size_t readstring (mpg123_string *string, size_t maxlen, int fd) { int err; - debug2("Attempting readstring on %d for %"SIZE_P" bytes", f ? fileno(f) : 0, (size_p)maxlen); + debug2("Attempting readstring on %d for %"SIZE_P" bytes", fd, (size_p)maxlen); string->fill = 0; while(maxlen == 0 || string->fill < maxlen) { @@ -160,7 +174,7 @@ static size_t readstring (mpg123_string *string, size_t maxlen, FILE *f) string->fill = 0; return 0; } - err = read(fileno(f),string->p+string->fill,1); + err = read(fd,string->p+string->fill,1); /* Whoa... reading one byte at a time... one could ensure the line break in another way, but more work. */ if( err == 1) { @@ -497,7 +511,6 @@ int http_open(char* url, struct httpdata *hd) int oom = 0; int relocate, numrelocs = 0; int got_location = FALSE; - FILE *myfile = NULL; /* workaround for http://www.global24music.com/rautemusik/files/extreme/isdn.pls this site's apache gives me a relocation to the same place when I give the port in Host request field @@ -547,14 +560,17 @@ int http_open(char* url, struct httpdata *hd) if(strncasecmp(purl.p, "http://", 7) != 0) mpg123_set_string(&request_url, "http://"); else mpg123_set_string(&request_url, ""); + mpg123_chomp_string(&purl); mpg123_add_string(&request_url, purl.p); + /* Always store the host and port from the URL for correct host header + in the request. Proxy server is used for connection, but never in the + host header! */ + if(!split_url(&purl, NULL, &host, &port, &path)){ oom=1; goto exit; } if (hd->proxystate >= PROXY_HOST) { /* We will connect to proxy, full URL goes into the request. */ - if( !mpg123_copy_string(&hd->proxyhost, &host) - || !mpg123_copy_string(&hd->proxyport, &port) - || !mpg123_set_string(&request, "GET ") + if( !mpg123_set_string(&request, "GET ") || !mpg123_add_string(&request, request_url.p) ) { oom=1; goto exit; @@ -563,7 +579,6 @@ int http_open(char* url, struct httpdata *hd) else { /* We will connect to the host from the URL and only the path goes into the request. */ - if(!split_url(&purl, NULL, &host, &port, &path)){ oom=1; goto exit; } if( !mpg123_set_string(&request, "GET ") || !mpg123_add_string(&request, path.p) ) { @@ -574,6 +589,16 @@ int http_open(char* url, struct httpdata *hd) if(!fill_request(&request, &host, &port, &httpauth1, &try_without_port)){ oom=1; goto exit; } httpauth1.fill = 0; /* We use the auth data from the URL only once. */ + if (hd->proxystate >= PROXY_HOST) + { + /* Only the host:port used for actual connection is replaced by + proxy. */ + if( !mpg123_copy_string(&hd->proxyhost, &host) + || !mpg123_copy_string(&hd->proxyport, &port) ) + { + oom=1; goto exit; + } + } debug2("attempting to open_connection to %s:%s", host.p, port.p); sock = open_connection(&host, &port); if(sock < 0) @@ -585,15 +610,10 @@ int http_open(char* url, struct httpdata *hd) if(param.verbose > 2) fprintf(stderr, "HTTP request:\n%s\n",request.p); if(!writestring(sock, &request)){ http_failure; } - if (!(myfile = fdopen(sock, "rb"))) - { - error1("fdopen: %s", strerror(errno)); - http_failure; - } relocate = FALSE; /* Arbitrary length limit here... */ #define safe_readstring \ - readstring(&response, SIZE_MAX/16, myfile); \ + readstring(&response, SIZE_MAX/16, sock); \ if(response.fill > SIZE_MAX/16) /* > because of appended zero. */ \ { \ error("HTTP response line exceeds max. length"); \ @@ -661,6 +681,15 @@ int http_open(char* url, struct httpdata *hd) } } } while(response.p[0] != '\r' && response.p[0] != '\n'); + if(relocate) + { + close(sock); + sock = -1; + /* Forget content type, might just relate to a displayed error page, + not the resource being redirected to. */ + mpg123_free_string(&hd->content_type); + mpg123_init_string(&hd->content_type); + } } while(relocate && got_location && purl.fill && numrelocs++ < HTTP_MAX_RELOCATIONS); if(relocate) { @@ -692,6 +721,8 @@ int http_open(char* url, struct httpdata *hd) /* stub */ int http_open (char* url, struct httpdata *hd) { + if(!param.quiet) + error("HTTP support not built in."); return -1; } #endif diff --git a/deps/mpg123/src/libmpg123/intsym.h b/deps/mpg123/src/intsym.h similarity index 71% rename from deps/mpg123/src/libmpg123/intsym.h rename to deps/mpg123/src/intsym.h index f4ed46c..74b0388 100644 --- a/deps/mpg123/src/libmpg123/intsym.h +++ b/deps/mpg123/src/intsym.h @@ -1,14 +1,23 @@ -#ifndef MPG123_INTMAP_H -#define MPG123_INTMAP_H -/* Mapping of internal mpg123 symbols to something that is less likely to conflict in case of static linking. */ +#ifndef MPG123_INTSYM_H +#define MPG123_INTSYM_H +/* Mapping of internal mpg123 symbols to something that is less likely to + conflict in case of static linking. */ +#include "config.h" #define COS9 INT123_COS9 #define tfcos36 INT123_tfcos36 #define pnts INT123_pnts +#define catchsignal INT123_catchsignal #define safe_realloc INT123_safe_realloc +#define compat_strdup INT123_compat_strdup #define compat_open INT123_compat_open +#define compat_fopen INT123_compat_fopen +#define compat_fdopen INT123_compat_fdopen #define compat_close INT123_compat_close +#define compat_fclose INT123_compat_fclose #define win32_wide_utf8 INT123_win32_wide_utf8 #define win32_utf8_wide INT123_win32_utf8_wide +#define unintr_write INT123_unintr_write +#define unintr_read INT123_unintr_read #define ntom_set_ntom INT123_ntom_set_ntom #define synth_1to1 INT123_synth_1to1 #define synth_1to1_dither INT123_synth_1to1_dither @@ -24,9 +33,13 @@ #define synth_1to1_stereo_altivec INT123_synth_1to1_stereo_altivec #define synth_1to1_x86_64 INT123_synth_1to1_x86_64 #define synth_1to1_stereo_x86_64 INT123_synth_1to1_stereo_x86_64 +#define synth_1to1_avx INT123_synth_1to1_avx +#define synth_1to1_stereo_avx INT123_synth_1to1_stereo_avx #define synth_1to1_arm INT123_synth_1to1_arm #define synth_1to1_neon INT123_synth_1to1_neon #define synth_1to1_stereo_neon INT123_synth_1to1_stereo_neon +#define synth_1to1_neon64 INT123_synth_1to1_neon64 +#define synth_1to1_stereo_neon64 INT123_synth_1to1_stereo_neon64 #define absynth_1to1_i486 INT123_absynth_1to1_i486 #define synth_1to1_mono INT123_synth_1to1_mono #define synth_1to1_m2s INT123_synth_1to1_m2s @@ -67,10 +80,14 @@ #define synth_1to1_real_stereo_sse INT123_synth_1to1_real_stereo_sse #define synth_1to1_real_x86_64 INT123_synth_1to1_real_x86_64 #define synth_1to1_real_stereo_x86_64 INT123_synth_1to1_real_stereo_x86_64 +#define synth_1to1_real_avx INT123_synth_1to1_real_avx +#define synth_1to1_fltst_avx INT123_synth_1to1_fltst_avx #define synth_1to1_real_altivec INT123_synth_1to1_real_altivec -#define synth_1to1_real_stereo_altivec INT123_synth_1to1_real_stereo_altivec +#define synth_1to1_fltst_altivec INT123_synth_1to1_fltst_altivec #define synth_1to1_real_neon INT123_synth_1to1_real_neon #define synth_1to1_real_stereo_neon INT123_synth_1to1_real_stereo_neon +#define synth_1to1_real_neon64 INT123_synth_1to1_real_neon64 +#define synth_1to1_fltst_neon64 INT123_synth_1to1_fltst_neon64 #define synth_1to1_real_mono INT123_synth_1to1_real_mono #define synth_1to1_real_m2s INT123_synth_1to1_real_m2s #define synth_2to1_real INT123_synth_2to1_real @@ -90,10 +107,14 @@ #define synth_1to1_s32_stereo_sse INT123_synth_1to1_s32_stereo_sse #define synth_1to1_s32_x86_64 INT123_synth_1to1_s32_x86_64 #define synth_1to1_s32_stereo_x86_64 INT123_synth_1to1_s32_stereo_x86_64 +#define synth_1to1_s32_avx INT123_synth_1to1_s32_avx +#define synth_1to1_s32_stereo_avx INT123_synth_1to1_s32_stereo_avx #define synth_1to1_s32_altivec INT123_synth_1to1_s32_altivec #define synth_1to1_s32_stereo_altivec INT123_synth_1to1_s32_stereo_altivec #define synth_1to1_s32_neon INT123_synth_1to1_s32_neon #define synth_1to1_s32_stereo_neon INT123_synth_1to1_s32_stereo_neon +#define synth_1to1_s32_neon64 INT123_synth_1to1_s32_neon64 +#define synth_1to1_s32st_neon64 INT123_synth_1to1_s32st_neon64 #define synth_1to1_s32_mono INT123_synth_1to1_s32_mono #define synth_1to1_s32_m2s INT123_synth_1to1_s32_m2s #define synth_2to1_s32 INT123_synth_2to1_s32 @@ -114,6 +135,11 @@ #define dct36 INT123_dct36 #define dct36_3dnow INT123_dct36_3dnow #define dct36_3dnowext INT123_dct36_3dnowext +#define dct36_x86_64 INT123_dct36_x86_64 +#define dct36_sse INT123_dct36_sse +#define dct36_avx INT123_dct36_avx +#define dct36_neon INT123_dct36_neon +#define dct36_neon64 INT123_dct36_neon64 #define synth_ntom_set_step INT123_synth_ntom_set_step #define ntom_val INT123_ntom_val #define ntom_frame_outsamples INT123_ntom_frame_outsamples @@ -187,8 +213,11 @@ #define double_to_long_rounded INT123_double_to_long_rounded #define scale_rounded INT123_scale_rounded #define decode_update INT123_decode_update +#define decoder_synth_bytes INT123_decoder_synth_bytes #define samples_to_bytes INT123_samples_to_bytes #define bytes_to_samples INT123_bytes_to_samples +#define outblock_bytes INT123_outblock_bytes +#define postprocess_buffer INT123_postprocess_buffer #define frame_cpu_opt INT123_frame_cpu_opt #define set_synth_functions INT123_set_synth_functions #define dectype INT123_dectype @@ -205,6 +234,10 @@ #define compute_bpf INT123_compute_bpf #define time_to_frame INT123_time_to_frame #define get_songlen INT123_get_songlen +#define bc_prepare INT123_bc_prepare +#define bc_cleanup INT123_bc_cleanup +#define bc_poolsize INT123_bc_poolsize +#define bc_fill INT123_bc_fill #define open_stream INT123_open_stream #define open_stream_handle INT123_open_stream_handle #define open_feed INT123_open_feed @@ -212,16 +245,72 @@ #define feed_forget INT123_feed_forget #define feed_set_pos INT123_feed_set_pos #define open_bad INT123_open_bad +#define open_module INT123_open_module +#define close_module INT123_close_module +#define list_modules INT123_list_modules +#define buffer_init INT123_buffer_init +#define buffer_exit INT123_buffer_exit +#define buffer_sync_param INT123_buffer_sync_param +#define buffer_open INT123_buffer_open +#define buffer_encodings INT123_buffer_encodings +#define buffer_formats INT123_buffer_formats +#define buffer_start INT123_buffer_start +#define buffer_ndrain INT123_buffer_ndrain +#define buffer_stop INT123_buffer_stop +#define buffer_close INT123_buffer_close +#define buffer_continue INT123_buffer_continue +#define buffer_ignore_lowmem INT123_buffer_ignore_lowmem +#define buffer_drain INT123_buffer_drain +#define buffer_end INT123_buffer_end +#define buffer_pause INT123_buffer_pause +#define buffer_drop INT123_buffer_drop +#define buffer_write INT123_buffer_write +#define buffer_fill INT123_buffer_fill +#define read_buf INT123_read_buf +#define xfer_write_string INT123_xfer_write_string +#define xfer_read_string INT123_xfer_read_string +#define xfermem_init INT123_xfermem_init +#define xfermem_init_writer INT123_xfermem_init_writer +#define xfermem_init_reader INT123_xfermem_init_reader +#define xfermem_get_freespace INT123_xfermem_get_freespace +#define xfermem_get_usedspace INT123_xfermem_get_usedspace +#define xfermem_getcmd INT123_xfermem_getcmd +#define xfermem_getcmds INT123_xfermem_getcmds +#define xfermem_putcmd INT123_xfermem_putcmd +#define xfermem_writer_block INT123_xfermem_writer_block +#define xfermem_write INT123_xfermem_write +#define xfermem_done INT123_xfermem_done +#define au_open INT123_au_open +#define cdr_open INT123_cdr_open +#define raw_open INT123_raw_open +#define wav_open INT123_wav_open +#define wav_write INT123_wav_write +#define wav_close INT123_wav_close +#define au_close INT123_au_close +#define raw_close INT123_raw_close +#define cdr_formats INT123_cdr_formats +#define au_formats INT123_au_formats +#define raw_formats INT123_raw_formats +#define wav_formats INT123_wav_formats +#define wav_drain INT123_wav_drain +#define write_parameters INT123_write_parameters +#define read_parameters INT123_read_parameters +#define stringlists_add INT123_stringlists_add +#define check_neon INT123_check_neon #define dct64_3dnow INT123_dct64_3dnow #define dct64_3dnowext INT123_dct64_3dnowext +#define dct64_avx INT123_dct64_avx +#define dct64_real_avx INT123_dct64_real_avx #define dct64_mmx INT123_dct64_mmx #define dct64_MMX INT123_dct64_MMX +#define dct64_neon INT123_dct64_neon +#define dct64_neon64 INT123_dct64_neon64 +#define dct64_real_neon64 INT123_dct64_real_neon64 +#define dct64_real_neon INT123_dct64_real_neon #define dct64_sse INT123_dct64_sse #define dct64_real_sse INT123_dct64_real_sse #define dct64_x86_64 INT123_dct64_x86_64 #define dct64_real_x86_64 INT123_dct64_real_x86_64 -#define dct64_neon INT123_dct64_neon -#define dct64_real_neon INT123_dct64_real_neon #define do_equalizer_3dnow INT123_do_equalizer_3dnow #define synth_1to1_3dnow_asm INT123_synth_1to1_3dnow_asm #define synth_1to1_arm_asm INT123_synth_1to1_arm_asm @@ -229,9 +318,29 @@ #define synth_1to1_i586_asm INT123_synth_1to1_i586_asm #define synth_1to1_i586_asm_dither INT123_synth_1to1_i586_asm_dither #define synth_1to1_MMX INT123_synth_1to1_MMX +#define synth_1to1_neon_asm INT123_synth_1to1_neon_asm +#define synth_1to1_neon64_asm INT123_synth_1to1_neon64_asm +#define synth_1to1_neon64_accurate_asm INT123_synth_1to1_neon64_accurate_asm +#define synth_1to1_real_neon64_asm INT123_synth_1to1_real_neon64_asm +#define synth_1to1_s32_neon64_asm INT123_synth_1to1_s32_neon64_asm +#define synth_1to1_neon_accurate_asm INT123_synth_1to1_neon_accurate_asm +#define synth_1to1_real_neon_asm INT123_synth_1to1_real_neon_asm +#define synth_1to1_s32_neon_asm INT123_synth_1to1_s32_neon_asm #define synth_1to1_sse_accurate_asm INT123_synth_1to1_sse_accurate_asm #define synth_1to1_real_sse_asm INT123_synth_1to1_real_sse_asm #define synth_1to1_s32_sse_asm INT123_synth_1to1_s32_sse_asm +#define synth_1to1_s_avx_asm INT123_synth_1to1_s_avx_asm +#define synth_1to1_s_avx_accurate_asm INT123_synth_1to1_s_avx_accurate_asm +#define synth_1to1_real_s_avx_asm INT123_synth_1to1_real_s_avx_asm +#define synth_1to1_s32_s_avx_asm INT123_synth_1to1_s32_s_avx_asm +#define synth_1to1_s_neon_asm INT123_synth_1to1_s_neon_asm +#define synth_1to1_s_neon64_asm INT123_synth_1to1_s_neon64_asm +#define synth_1to1_s_neon64_accurate_asm INT123_synth_1to1_s_neon64_accurate_asm +#define synth_1to1_real_s_neon64_asm INT123_synth_1to1_real_s_neon64_asm +#define synth_1to1_s32_s_neon64_asm INT123_synth_1to1_s32_s_neon64_asm +#define synth_1to1_s_neon_accurate_asm INT123_synth_1to1_s_neon_accurate_asm +#define synth_1to1_real_s_neon_asm INT123_synth_1to1_real_s_neon_asm +#define synth_1to1_s32_s_neon_asm INT123_synth_1to1_s32_s_neon_asm #define synth_1to1_s_sse_accurate_asm INT123_synth_1to1_s_sse_accurate_asm #define synth_1to1_real_s_sse_asm INT123_synth_1to1_real_s_sse_asm #define synth_1to1_s32_s_sse_asm INT123_synth_1to1_s32_s_sse_asm @@ -243,14 +352,9 @@ #define synth_1to1_x86_64_accurate_asm INT123_synth_1to1_x86_64_accurate_asm #define synth_1to1_real_x86_64_asm INT123_synth_1to1_real_x86_64_asm #define synth_1to1_s32_x86_64_asm INT123_synth_1to1_s32_x86_64_asm -#define synth_1to1_neon_asm INT123_synth_1to1_neon_asm -#define synth_1to1_neon_accurate_asm INT123_synth_1to1_neon_accurate_asm -#define synth_1to1_real_neon_asm INT123_synth_1to1_real_neon_asm -#define synth_1to1_s32_neon_asm INT123_synth_1to1_s32_neon_asm -#define synth_1to1_s_neon_asm INT123_synth_1to1_s_neon_asm -#define synth_1to1_s_neon_accurate_asm INT123_synth_1to1_s_neon_accurate_asm -#define synth_1to1_real_s_neon_asm INT123_synth_1to1_real_s_neon_asm -#define synth_1to1_s32_s_neon_asm INT123_synth_1to1_s32_s_neon_asm #define costab_mmxsse INT123_costab_mmxsse #define make_decode_tables_mmx_asm INT123_make_decode_tables_mmx_asm +#ifndef HAVE_STRERROR +#define strerror INT123_strerror +#endif #endif diff --git a/deps/mpg123/src/legacy_module.c b/deps/mpg123/src/legacy_module.c deleted file mode 100644 index 812032d..0000000 --- a/deps/mpg123/src/legacy_module.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - legacy_module.c: dummy interface to modular code loader for legacy build system - - copyright 2008 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Nicholas J Humfrey -*/ - -#include "mpg123app.h" -#include "debug.h" - -/* A single module is staticly compiled in for each type */ -extern mpg123_module_t mpg123_output_module_info; -/* extern mpg123_module_t mpg123_input_module_info; */ - - -/* Open a module */ -mpg123_module_t* -open_module( const char* type, const char* name ) -{ - mpg123_module_t *mod = NULL; - - /* Select the module info structure, based on the desired type */ - if (strcmp(type, "output")==0) { - mod = &mpg123_output_module_info; -/* - } else if (strcmp(type, "input")==0) { - mod = &mpg123_input_module_info; -*/ - } else { - error1("Unable to open module type '%s'.", type); - return NULL; - } - - /* Check the module compiled in is the module requested */ - if (strcmp(name, mod->name)!=0) { - error1("Unable to open requested module '%s'.", name); - error1("The only available statically compiled module is '%s'.", mod->name); - return NULL; - } - - /* Debugging info */ - debug1("Details of static module type '%s':", type); - debug1(" api_version=%d", mod->api_version); - debug1(" name=%s", mod->name); - debug1(" description=%s", mod->description); - debug1(" revision=%s", mod->revision); - debug1(" handle=%p", (void*)mod->handle); - - return mod; -} - - -void close_module( mpg123_module_t* module ) -{ - debug("close_module()"); - - /* Module was never really 'loaded', so nothing to do here. */ -} - - -void list_modules() -{ - debug("list_modules()" ); - - printf("\nmpg123 has been built in legacy mode - dynamic modules are not available.\n"); - - printf("Available modules\n"); - printf("-----------------\n"); - printf("%-15s%s %s\n", mpg123_output_module_info.name, "output", mpg123_output_module_info.description ); - -} - - diff --git a/deps/mpg123/src/libmpg123/Makefile.am b/deps/mpg123/src/libmpg123/Makefile.am deleted file mode 100644 index 22035a1..0000000 --- a/deps/mpg123/src/libmpg123/Makefile.am +++ /dev/null @@ -1,141 +0,0 @@ -## Makefile.am: produce Makefile.in from this - -## copyright by the mpg123 project - free software under the terms of the LGPL 2.1 -## see COPYING and AUTHORS files in distribution or http://mpg123.org -## initially written by Nicholas J. Humfrey - -#AM_CFLAGS = @AUDIO_CFLAGS@ -#AM_LDFLAGS = -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/libmpg123 - -EXTRA_DIST = mpg123.h.in - -EXTRA_PROGRAMS = testcpu -testcpu_dependencies = getcpuflags.$(OBJEXT) -testcpu_sources = testcpu.c -testcpu_LDADD = getcpuflags.$(OBJEXT) - - -CLEANFILES = *.a - - -# The library can have different names, depending on largefile setup. -# Libtool macros think they're smart. Because of that mpg123.la does not work, it must be libmpg123.la . -lib_LTLIBRARIES = libmpg123.la -nodist_include_HEADERS = mpg123.h - -libmpg123_la_LDFLAGS = -no-undefined -version-info @LIBMPG123_VERSION@ -export-symbols-regex '^mpg123_' -libmpg123_la_LIBADD = @DECODER_LOBJ@ @LFS_LOBJ@ -libmpg123_la_DEPENDENCIES = @DECODER_LOBJ@ @LFS_LOBJ@ - -libmpg123_la_SOURCES = \ - intsym.h \ - compat.c \ - compat.h \ - mpeghead.h \ - parse.c \ - parse.h \ - frame.c \ - format.c \ - frame.h \ - reader.h \ - debug.h \ - decode.h \ - sample.h \ - dct64.c \ - synth.h \ - synth_mono.h \ - synth_ntom.h \ - synth_8bit.h \ - synths.h \ - equalizer.c \ - huffman.h \ - icy.h \ - icy2utf8.h \ - id3.h \ - id3.c \ - true.h \ - getbits.h \ - optimize.h \ - optimize.c \ - readers.c \ - tabinit.c \ - libmpg123.c \ - gapless.h \ - mpg123lib_intern.h \ - mangle.h \ - getcpuflags.h \ - index.h \ - index.c - -EXTRA_libmpg123_la_SOURCES = \ - lfs_alias.c \ - lfs_wrap.c \ - icy.c \ - icy2utf8.c \ - l2tables.h \ - layer1.c \ - layer2.c \ - layer3.c \ - dither.h \ - dither.c \ - feature.c \ - dct36_3dnowext.S \ - dct36_3dnow.S \ - dct64_3dnowext.S \ - dct64_3dnow.S \ - dct64_altivec.c \ - dct64_i386.c \ - dct64_i486.c \ - dct64_mmx.S \ - dct64_sse.S \ - dct64_sse_float.S \ - dct64_x86_64.S \ - dct64_x86_64_float.S \ - dct64_neon.S \ - dct64_neon_float.S \ - synth_3dnowext.S \ - synth_3dnow.S \ - synth_altivec.c \ - synth_i486.c \ - synth_i586_dither.S \ - synth_i586.S \ - synth_mmx.S \ - synth_sse3d.h \ - synth_sse.S \ - synth_sse_float.S \ - synth_sse_s32.S \ - synth_sse_accurate.S \ - synth_stereo_sse_float.S \ - synth_stereo_sse_s32.S \ - synth_stereo_sse_accurate.S \ - synth_x86_64.S \ - synth_x86_64_float.S \ - synth_x86_64_s32.S \ - synth_x86_64_accurate.S \ - synth_stereo_x86_64.S \ - synth_stereo_x86_64_float.S \ - synth_stereo_x86_64_s32.S \ - synth_stereo_x86_64_accurate.S \ - synth_arm.S \ - synth_arm_accurate.S \ - synth_neon.S \ - synth_neon_float.S \ - synth_neon_s32.S \ - synth_neon_accurate.S \ - synth_stereo_neon.S \ - synth_stereo_neon_float.S \ - synth_stereo_neon_s32.S \ - synth_stereo_neon_accurate.S \ - ntom.c \ - synth.c \ - synth_8bit.c \ - synth_real.c \ - synth_s32.c \ - equalizer_3dnow.S \ - tabinit_mmx.S \ - stringbuf.c \ - getcpuflags.S \ - l12_integer_tables.h \ - l3_integer_tables.h - diff --git a/deps/mpg123/src/libmpg123/Makefile.in b/deps/mpg123/src/libmpg123/Makefile.in deleted file mode 100644 index a980f10..0000000 --- a/deps/mpg123/src/libmpg123/Makefile.in +++ /dev/null @@ -1,919 +0,0 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2012 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@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -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@ -EXTRA_PROGRAMS = testcpu$(EXEEXT) -subdir = src/libmpg123 -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/mpg123.h.in $(top_srcdir)/build/depcomp -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/addrconfig.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = mpg123.h -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__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -am_libmpg123_la_OBJECTS = compat.lo parse.lo frame.lo format.lo \ - dct64.lo equalizer.lo id3.lo optimize.lo readers.lo tabinit.lo \ - libmpg123.lo index.lo -libmpg123_la_OBJECTS = $(am_libmpg123_la_OBJECTS) -libmpg123_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libmpg123_la_LDFLAGS) $(LDFLAGS) -o $@ -testcpu_SOURCES = testcpu.c -testcpu_OBJECTS = testcpu.$(OBJEXT) -testcpu_DEPENDENCIES = getcpuflags.$(OBJEXT) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -depcomp = $(SHELL) $(top_srcdir)/build/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -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 = $(libmpg123_la_SOURCES) $(EXTRA_libmpg123_la_SOURCES) \ - testcpu.c -DIST_SOURCES = $(libmpg123_la_SOURCES) $(EXTRA_libmpg123_la_SOURCES) \ - testcpu.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -HEADERS = $(nodist_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_CFLAGS = @AIX_CFLAGS@ -AIX_LDFLAGS = @AIX_LDFLAGS@ -AIX_LIBS = @AIX_LIBS@ -ALIB_CFLAGS = @ALIB_CFLAGS@ -ALIB_LDFLAGS = @ALIB_LDFLAGS@ -ALIB_LIBS = @ALIB_LIBS@ -ALSA_CFLAGS = @ALSA_CFLAGS@ -ALSA_LDFLAGS = @ALSA_LDFLAGS@ -ALSA_LIBS = @ALSA_LIBS@ -AMTAR = @AMTAR@ -API_VERSION = @API_VERSION@ -AR = @AR@ -ARTS_CFLAGS = @ARTS_CFLAGS@ -ARTS_LDFLAGS = @ARTS_LDFLAGS@ -ARTS_LIBS = @ARTS_LIBS@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COREAUDIO_CFLAGS = @COREAUDIO_CFLAGS@ -COREAUDIO_LDFLAGS = @COREAUDIO_LDFLAGS@ -COREAUDIO_LIBS = @COREAUDIO_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DECODER_LOBJ = @DECODER_LOBJ@ -DECODER_OBJ = @DECODER_OBJ@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMMY_CFLAGS = @DUMMY_CFLAGS@ -DUMMY_LDFLAGS = @DUMMY_LDFLAGS@ -DUMMY_LIBS = @DUMMY_LIBS@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ESD_CFLAGS = @ESD_CFLAGS@ -ESD_LDFLAGS = @ESD_LDFLAGS@ -ESD_LIBS = @ESD_LIBS@ -EXEC_LT_LDFLAGS = @EXEC_LT_LDFLAGS@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HP_CFLAGS = @HP_CFLAGS@ -HP_LDFLAGS = @HP_LDFLAGS@ -HP_LIBS = @HP_LIBS@ -INCLUDE_STDIO_H = @INCLUDE_STDIO_H@ -INCLUDE_STDLIB_H = @INCLUDE_STDLIB_H@ -INCLUDE_SYS_TYPE_H = @INCLUDE_SYS_TYPE_H@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -JACK_CFLAGS = @JACK_CFLAGS@ -JACK_LDFLAGS = @JACK_LDFLAGS@ -JACK_LIBS = @JACK_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LFS_LOBJ = @LFS_LOBJ@ -LIBMPG123_VERSION = @LIBMPG123_VERSION@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_LDFLAGS = @LT_LDFLAGS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MINT_CFLAGS = @MINT_CFLAGS@ -MINT_LDFLAGS = @MINT_LDFLAGS@ -MINT_LIBS = @MINT_LIBS@ -MKDIR_P = @MKDIR_P@ -MODULE_OBJ = @MODULE_OBJ@ -NAS_CFLAGS = @NAS_CFLAGS@ -NAS_LDFLAGS = @NAS_LDFLAGS@ -NAS_LIBS = @NAS_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENAL_CFLAGS = @OPENAL_CFLAGS@ -OPENAL_LDFLAGS = @OPENAL_LDFLAGS@ -OPENAL_LIBS = @OPENAL_LIBS@ -OS2_CFLAGS = @OS2_CFLAGS@ -OS2_LDFLAGS = @OS2_LDFLAGS@ -OS2_LIBS = @OS2_LIBS@ -OSS_CFLAGS = @OSS_CFLAGS@ -OSS_LDFLAGS = @OSS_LDFLAGS@ -OSS_LIBS = @OSS_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -OUTPUT_CFLAGS = @OUTPUT_CFLAGS@ -OUTPUT_LDFLAGS = @OUTPUT_LDFLAGS@ -OUTPUT_LIBS = @OUTPUT_LIBS@ -OUTPUT_MOD = @OUTPUT_MOD@ -OUTPUT_OBJ = @OUTPUT_OBJ@ -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@ -PKG_CONFIG = @PKG_CONFIG@ -PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ -PORTAUDIO_LDFLAGS = @PORTAUDIO_LDFLAGS@ -PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ -PULSE_CFLAGS = @PULSE_CFLAGS@ -PULSE_LDFLAGS = @PULSE_LDFLAGS@ -PULSE_LIBS = @PULSE_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LDFLAGS = @SDL_LDFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SGI_CFLAGS = @SGI_CFLAGS@ -SGI_LDFLAGS = @SGI_LDFLAGS@ -SGI_LIBS = @SGI_LIBS@ -SHELL = @SHELL@ -SNDIO_CFLAGS = @SNDIO_CFLAGS@ -SNDIO_LDFLAGS = @SNDIO_LDFLAGS@ -SNDIO_LIBS = @SNDIO_LIBS@ -STRIP = @STRIP@ -SUN_CFLAGS = @SUN_CFLAGS@ -SUN_LDFLAGS = @SUN_LDFLAGS@ -SUN_LIBS = @SUN_LIBS@ -VERSION = @VERSION@ -WIN32_CFLAGS = @WIN32_CFLAGS@ -WIN32_LDFLAGS = @WIN32_LDFLAGS@ -WIN32_LIBS = @WIN32_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -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@ -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@ - -#AM_CFLAGS = @AUDIO_CFLAGS@ -#AM_LDFLAGS = -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/libmpg123 -EXTRA_DIST = mpg123.h.in -testcpu_dependencies = getcpuflags.$(OBJEXT) -testcpu_sources = testcpu.c -testcpu_LDADD = getcpuflags.$(OBJEXT) -CLEANFILES = *.a - -# The library can have different names, depending on largefile setup. -# Libtool macros think they're smart. Because of that mpg123.la does not work, it must be libmpg123.la . -lib_LTLIBRARIES = libmpg123.la -nodist_include_HEADERS = mpg123.h -libmpg123_la_LDFLAGS = -no-undefined -version-info @LIBMPG123_VERSION@ -export-symbols-regex '^mpg123_' -libmpg123_la_LIBADD = @DECODER_LOBJ@ @LFS_LOBJ@ -libmpg123_la_DEPENDENCIES = @DECODER_LOBJ@ @LFS_LOBJ@ -libmpg123_la_SOURCES = \ - intsym.h \ - compat.c \ - compat.h \ - mpeghead.h \ - parse.c \ - parse.h \ - frame.c \ - format.c \ - frame.h \ - reader.h \ - debug.h \ - decode.h \ - sample.h \ - dct64.c \ - synth.h \ - synth_mono.h \ - synth_ntom.h \ - synth_8bit.h \ - synths.h \ - equalizer.c \ - huffman.h \ - icy.h \ - icy2utf8.h \ - id3.h \ - id3.c \ - true.h \ - getbits.h \ - optimize.h \ - optimize.c \ - readers.c \ - tabinit.c \ - libmpg123.c \ - gapless.h \ - mpg123lib_intern.h \ - mangle.h \ - getcpuflags.h \ - index.h \ - index.c - -EXTRA_libmpg123_la_SOURCES = \ - lfs_alias.c \ - lfs_wrap.c \ - icy.c \ - icy2utf8.c \ - l2tables.h \ - layer1.c \ - layer2.c \ - layer3.c \ - dither.h \ - dither.c \ - feature.c \ - dct36_3dnowext.S \ - dct36_3dnow.S \ - dct64_3dnowext.S \ - dct64_3dnow.S \ - dct64_altivec.c \ - dct64_i386.c \ - dct64_i486.c \ - dct64_mmx.S \ - dct64_sse.S \ - dct64_sse_float.S \ - dct64_x86_64.S \ - dct64_x86_64_float.S \ - dct64_neon.S \ - dct64_neon_float.S \ - synth_3dnowext.S \ - synth_3dnow.S \ - synth_altivec.c \ - synth_i486.c \ - synth_i586_dither.S \ - synth_i586.S \ - synth_mmx.S \ - synth_sse3d.h \ - synth_sse.S \ - synth_sse_float.S \ - synth_sse_s32.S \ - synth_sse_accurate.S \ - synth_stereo_sse_float.S \ - synth_stereo_sse_s32.S \ - synth_stereo_sse_accurate.S \ - synth_x86_64.S \ - synth_x86_64_float.S \ - synth_x86_64_s32.S \ - synth_x86_64_accurate.S \ - synth_stereo_x86_64.S \ - synth_stereo_x86_64_float.S \ - synth_stereo_x86_64_s32.S \ - synth_stereo_x86_64_accurate.S \ - synth_arm.S \ - synth_arm_accurate.S \ - synth_neon.S \ - synth_neon_float.S \ - synth_neon_s32.S \ - synth_neon_accurate.S \ - synth_stereo_neon.S \ - synth_stereo_neon_float.S \ - synth_stereo_neon_s32.S \ - synth_stereo_neon_accurate.S \ - ntom.c \ - synth.c \ - synth_8bit.c \ - synth_real.c \ - synth_s32.c \ - equalizer_3dnow.S \ - tabinit_mmx.S \ - stringbuf.c \ - getcpuflags.S \ - l12_integer_tables.h \ - l3_integer_tables.h - -all: all-am - -.SUFFIXES: -.SUFFIXES: .S .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libmpg123/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/libmpg123/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -mpg123.h: $(top_builddir)/config.status $(srcdir)/mpg123.h.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @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 " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - 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)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } -libmpg123.la: $(libmpg123_la_OBJECTS) $(libmpg123_la_DEPENDENCIES) $(EXTRA_libmpg123_la_DEPENDENCIES) - $(libmpg123_la_LINK) -rpath $(libdir) $(libmpg123_la_OBJECTS) $(libmpg123_la_LIBADD) $(LIBS) -testcpu$(EXEEXT): $(testcpu_OBJECTS) $(testcpu_DEPENDENCIES) $(EXTRA_testcpu_DEPENDENCIES) - @rm -f testcpu$(EXEEXT) - $(LINK) $(testcpu_OBJECTS) $(testcpu_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct36_3dnow.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct36_3dnowext.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_3dnow.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_3dnowext.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_altivec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_i386.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_i486.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_mmx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_neon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_neon_float.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_sse.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_sse_float.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_x86_64.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct64_x86_64_float.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalizer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalizer_3dnow.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/feature.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/format.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frame.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcpuflags.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icy2utf8.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/index.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layer1.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layer2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layer3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfs_alias.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfs_wrap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpg123.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optimize.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readers.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringbuf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_3dnow.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_3dnowext.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_8bit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_altivec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_arm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_arm_accurate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_i486.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_i586.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_i586_dither.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_mmx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon_accurate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon_float.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_neon_s32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_real.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_s32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse_accurate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse_float.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_sse_s32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon_accurate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon_float.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_neon_s32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_sse_accurate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_sse_float.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_sse_s32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64_accurate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64_float.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_stereo_x86_64_s32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64_accurate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64_float.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synth_x86_64_s32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabinit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabinit_mmx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcpu.Po@am__quote@ - -.S.o: -@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $< - -.S.obj: -@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.S.lo: -@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $< - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-nodist_includeHEADERS: $(nodist_include_HEADERS) - @$(NORMAL_INSTALL) - @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ - fi; \ - 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)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-nodist_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) - -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" - -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @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 -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; 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: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -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) - -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-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-nodist_includeHEADERS - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -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-libLTLIBRARIES uninstall-nodist_includeHEADERS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am 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-nodist_includeHEADERS 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-libLTLIBRARIES \ - uninstall-nodist_includeHEADERS - - -# 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/deps/mpg123/src/libmpg123/abi_align.h b/deps/mpg123/src/libmpg123/abi_align.h new file mode 100644 index 0000000..9ae46f4 --- /dev/null +++ b/deps/mpg123/src/libmpg123/abi_align.h @@ -0,0 +1,41 @@ +/* + abi_align: An attempt to avoid breakage because of mixing + compilers with different alignment. + + copyright 1995-2015 by the mpg123 project + free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + + There used to be code that checks alignment, but it did not really + work anyway. The only straw we have is putting that alignment + attribute to API functions. +*/ + +#ifndef MPG123_H_ABI_ALIGN +#define MPG123_H_ABI_ALIGN + +#include "config.h" + +/* ABI conformance for other compilers. + mpg123 needs 16byte-aligned (or more) stack for SSE and friends. + gcc provides that, but others don't necessarily. */ +#ifdef ABI_ALIGN_FUN + +#ifndef attribute_align_arg + +#if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__>1) +# define attribute_align_arg __attribute__((force_align_arg_pointer)) +/* The gcc that can align the stack does not need the check... nor does it work with gcc 4.3+, anyway. */ +#else +# define attribute_align_arg +#endif + +#endif /* attribute_align_arg */ + +#else /* ABI_ALIGN_FUN */ + +#define attribute_align_arg + +#endif /* ABI_ALIGN_FUN */ + +#endif /* MPG123_H_ABI_ALIGN */ diff --git a/deps/mpg123/src/libmpg123/check_neon.S b/deps/mpg123/src/libmpg123/check_neon.S new file mode 100644 index 0000000..7c76904 --- /dev/null +++ b/deps/mpg123/src/libmpg123/check_neon.S @@ -0,0 +1,35 @@ +/* + check_neon: check NEON availability + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Momma +*/ + +#include "mangle.h" + +#ifndef __aarch64__ +#ifndef _M_ARM + .code 32 +#endif +#ifndef __APPLE__ + .fpu neon +#endif +#endif + + .text + GLOBAL_SYMBOL ASM_NAME(check_neon) +#ifdef __ELF__ + .type ASM_NAME(check_neon), %function +#endif + ALIGN4 +ASM_NAME(check_neon): +#ifdef __aarch64__ + orr v0.16b, v0.16b, v0.16b + ret +#else + vorr d0, d0, d0 + bx lr +#endif + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/compat.c b/deps/mpg123/src/libmpg123/compat.c deleted file mode 100644 index 18ea76e..0000000 --- a/deps/mpg123/src/libmpg123/compat.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - compat: Some compatibility functions. - - The mpg123 code is determined to keep it's legacy. A legacy of old, old UNIX. - So anything possibly somewhat advanced should be considered to be put here, with proper #ifdef;-) - - copyright 2007-8 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Thomas Orgis, Windows Unicode stuff by JonY. -*/ - -#include "config.h" -#include "compat.h" - -#ifdef _MSC_VER -#include -#else -#include -#endif -#include - -#ifdef WANT_WIN32_UNICODE -#include -#include -#include -#endif - -#include "debug.h" - -/* A safe realloc also for very old systems where realloc(NULL, size) returns NULL. */ -void *safe_realloc(void *ptr, size_t size) -{ - if(ptr == NULL) return malloc(size); - else return realloc(ptr, size); -} - -#ifndef HAVE_STRERROR -const char *strerror(int errnum) -{ - extern int sys_nerr; - extern char *sys_errlist[]; - - return (errnum < sys_nerr) ? sys_errlist[errnum] : ""; -} -#endif - -#ifndef HAVE_STRDUP -char *strdup(const char *src) -{ - char *dest; - - if (!(dest = (char *) malloc(strlen(src)+1))) - return NULL; - else - return strcpy(dest, src); -} -#endif - -int compat_open(const char *filename, int flags) -{ - int ret; -#if defined (WANT_WIN32_UNICODE) - wchar_t *frag = NULL; - - ret = win32_utf8_wide(filename, &frag, NULL); - if ((frag == NULL) || (ret == 0)) goto fallback; /* Fallback to plain open when ucs-2 conversion fails */ - - ret = _wopen(frag, flags); /*Try _wopen */ - if (ret != -1 ) goto open_ok; /* msdn says -1 means failure */ - -fallback: -#endif - -#if (defined(WIN32) && !defined (__CYGWIN__)) /* MSDN says POSIX function is deprecated beginning in Visual C++ 2005 */ - ret = _open(filename, flags); /* Try plain old _open(), if it fails, do nothing */ -#else - /* On UNIX, we always add a default permission mask in case flags|O_CREAT. */ - ret = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); -#endif - -#if defined (WANT_WIN32_UNICODE) -open_ok: - free ((void *)frag); /* Freeing a NULL should be OK */ -#endif - - return ret; -} - -int compat_close(int infd) -{ -#if (defined(WIN32) && !defined (__CYGWIN__)) /* MSDN says POSIX function is deprecated beginning in Visual C++ 2005 */ - return _close(infd); -#else - return close(infd); -#endif -} - -/* Windows Unicode stuff */ - -#ifdef WANT_WIN32_UNICODE -int win32_wide_utf8(const wchar_t * const wptr, char **mbptr, size_t * buflen) -{ - size_t len; - char *buf; - int ret = 0; - - len = WideCharToMultiByte(CP_UTF8, 0, wptr, -1, NULL, 0, NULL, NULL); /* Get utf-8 string length */ - buf = calloc(len + 1, sizeof (char)); /* Can we assume sizeof char always = 1? */ - - if(!buf) len = 0; - else { - if (len != 0) ret = WideCharToMultiByte(CP_UTF8, 0, wptr, -1, buf, len, NULL, NULL); /*Do actual conversion*/ - buf[len] = '0'; /* Must terminate */ - } - *mbptr = buf; /* Set string pointer to allocated buffer */ - if(buflen != NULL) *buflen = (len) * sizeof (char); /* Give length of allocated memory if needed. */ - return ret; -} - -int win32_utf8_wide(const char *const mbptr, wchar_t **wptr, size_t *buflen) -{ - size_t len; - wchar_t *buf; - int ret = 0; - - len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, mbptr, -1, NULL, 0); /* Get converted size */ - buf = calloc(len + 1, sizeof (wchar_t)); /* Allocate memory accordingly */ - - if(!buf) len = 0; - else { - if (len != 0) ret = MultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, mbptr, -1, buf, len); /* Do conversion */ - buf[len] = L'0'; /* Must terminate */ - } - *wptr = buf; /* Set string pointer to allocated buffer */ - if (buflen != NULL) *buflen = len * sizeof (wchar_t); /* Give length of allocated memory if needed. */ - return ret; /* Number of characters written */ -} -#endif diff --git a/deps/mpg123/src/libmpg123/dct36_3dnow.S b/deps/mpg123/src/libmpg123/dct36_3dnow.S index 644204f..2d45dc0 100644 --- a/deps/mpg123/src/libmpg123/dct36_3dnow.S +++ b/deps/mpg123/src/libmpg123/dct36_3dnow.S @@ -35,15 +35,32 @@ ASM_NAME(dct36_3dnow): pushl %ebp movl %esp,%ebp - subl $120,%esp +#if defined(PIC) && defined(__APPLE__) + sub $4,%esp +#endif pushl %esi pushl %ebx + + #undef _EBX_ + #define _EBX_ %edi + PREPARE_GOT + GET_GOT +#if defined(PIC) && defined(__APPLE__) + #define _COS9_ 0(%edi) + #define _tfcos36_ 0(%eax) + mov GLOBAL_VAR_PTR(tfcos36), %eax + mov GLOBAL_VAR_PTR(COS9), %edi + mov %eax, -4(%ebp) +#else + #define _COS9_ GLOBAL_VAR(COS9) + #define _tfcos36_ GLOBAL_VAR(tfcos36) +#endif + movl 8(%ebp),%eax movl 12(%ebp),%esi movl 16(%ebp),%ecx movl 20(%ebp),%edx movl 24(%ebp),%ebx - leal -128(%ebp),%esp femms movq (%eax),%mm0 @@ -124,9 +141,9 @@ ASM_NAME(dct36_3dnow): movq 24(%eax),%mm0 movq 48(%eax),%mm1 - movd ASM_NAME(COS9)+12,%mm2 + movd 12+_COS9_,%mm2 punpckldq %mm2,%mm2 - movd ASM_NAME(COS9)+24,%mm3 + movd 24+_COS9_,%mm3 punpckldq %mm3,%mm3 pfmul %mm2,%mm0 pfmul %mm3,%mm1 @@ -136,41 +153,44 @@ ASM_NAME(dct36_3dnow): pi2fd %mm7,%mm7 popl %eax movq 8(%eax),%mm2 - movd ASM_NAME(COS9)+4,%mm3 + movd 4+_COS9_,%mm3 punpckldq %mm3,%mm3 pfmul %mm3,%mm2 pfadd %mm0,%mm2 movq 40(%eax),%mm3 - movd ASM_NAME(COS9)+20,%mm4 + movd 20+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfadd %mm3,%mm2 movq 56(%eax),%mm3 - movd ASM_NAME(COS9)+28,%mm4 + movd 28+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfadd %mm3,%mm2 movq (%eax),%mm3 movq 16(%eax),%mm4 - movd ASM_NAME(COS9)+8,%mm5 + movd 8+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfadd %mm4,%mm3 movq 32(%eax),%mm4 - movd ASM_NAME(COS9)+16,%mm5 + movd 16+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfadd %mm4,%mm3 pfadd %mm1,%mm3 movq 64(%eax),%mm4 - movd ASM_NAME(COS9)+32,%mm5 + movd 32+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfadd %mm4,%mm3 movq %mm2,%mm4 pfadd %mm3,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+0,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov -4(%ebp),%eax +#endif + punpckldq 0+_tfcos36_,%mm5 pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -196,7 +216,10 @@ ASM_NAME(dct36_3dnow): movq %mm3,%mm4 pfsub %mm2,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+32,%mm5 + punpckldq 32+_tfcos36_,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov 8(%ebp),%eax +#endif pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -224,7 +247,7 @@ ASM_NAME(dct36_3dnow): pfsub %mm3,%mm2 movq 56(%eax),%mm3 pfsub %mm3,%mm2 - movd ASM_NAME(COS9)+12,%mm3 + movd 12+_COS9_,%mm3 punpckldq %mm3,%mm3 pfmul %mm3,%mm2 movq 16(%eax),%mm3 @@ -232,7 +255,7 @@ ASM_NAME(dct36_3dnow): pfsub %mm4,%mm3 movq 64(%eax),%mm4 pfsub %mm4,%mm3 - movd ASM_NAME(COS9)+24,%mm4 + movd 24+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 movq 48(%eax),%mm4 @@ -242,7 +265,10 @@ ASM_NAME(dct36_3dnow): movq %mm2,%mm4 pfadd %mm3,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+4,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov -4(%ebp),%eax +#endif + punpckldq 4+_tfcos36_,%mm5 pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -268,7 +294,10 @@ ASM_NAME(dct36_3dnow): movq %mm3,%mm4 pfsub %mm2,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+28,%mm5 + punpckldq 28+_tfcos36_,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov 8(%ebp),%eax +#endif pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -293,41 +322,44 @@ ASM_NAME(dct36_3dnow): movd %mm5,2048(%ebx) movq 8(%eax),%mm2 - movd ASM_NAME(COS9)+20,%mm3 + movd 20+_COS9_,%mm3 punpckldq %mm3,%mm3 pfmul %mm3,%mm2 pfsub %mm0,%mm2 movq 40(%eax),%mm3 - movd ASM_NAME(COS9)+28,%mm4 + movd 28+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfsub %mm3,%mm2 movq 56(%eax),%mm3 - movd ASM_NAME(COS9)+4,%mm4 + movd 4+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfadd %mm3,%mm2 movq (%eax),%mm3 movq 16(%eax),%mm4 - movd ASM_NAME(COS9)+32,%mm5 + movd 32+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfsub %mm4,%mm3 movq 32(%eax),%mm4 - movd ASM_NAME(COS9)+8,%mm5 + movd 8+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfsub %mm4,%mm3 pfadd %mm1,%mm3 movq 64(%eax),%mm4 - movd ASM_NAME(COS9)+16,%mm5 + movd 16+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfadd %mm4,%mm3 movq %mm2,%mm4 pfadd %mm3,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+8,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov -4(%ebp),%eax +#endif + punpckldq 8+_tfcos36_,%mm5 pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -353,7 +385,10 @@ ASM_NAME(dct36_3dnow): movq %mm3,%mm4 pfsub %mm2,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+24,%mm5 + punpckldq 24+_tfcos36_,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov 8(%ebp),%eax +#endif pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -377,41 +412,44 @@ ASM_NAME(dct36_3dnow): psrlq $32,%mm5 movd %mm5,1920(%ebx) movq 8(%eax),%mm2 - movd ASM_NAME(COS9)+28,%mm3 + movd 28+_COS9_,%mm3 punpckldq %mm3,%mm3 pfmul %mm3,%mm2 pfsub %mm0,%mm2 movq 40(%eax),%mm3 - movd ASM_NAME(COS9)+4,%mm4 + movd 4+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfadd %mm3,%mm2 movq 56(%eax),%mm3 - movd ASM_NAME(COS9)+20,%mm4 + movd 20+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfsub %mm3,%mm2 movq (%eax),%mm3 movq 16(%eax),%mm4 - movd ASM_NAME(COS9)+16,%mm5 + movd 16+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfsub %mm4,%mm3 movq 32(%eax),%mm4 - movd ASM_NAME(COS9)+32,%mm5 + movd 32+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfadd %mm4,%mm3 pfadd %mm1,%mm3 movq 64(%eax),%mm4 - movd ASM_NAME(COS9)+8,%mm5 + movd 8+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfsub %mm4,%mm3 movq %mm2,%mm4 pfadd %mm3,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+12,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov -4(%ebp),%eax +#endif + punpckldq 12+_tfcos36_,%mm5 pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -437,7 +475,10 @@ ASM_NAME(dct36_3dnow): movq %mm3,%mm4 pfsub %mm2,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+20,%mm5 + punpckldq 20+_tfcos36_,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov 8(%ebp),%eax +#endif pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -471,7 +512,10 @@ ASM_NAME(dct36_3dnow): movq 64(%eax),%mm3 pfadd %mm3,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+16,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov -4(%ebp),%eax +#endif + punpckldq 16+_tfcos36_,%mm5 pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -496,10 +540,21 @@ ASM_NAME(dct36_3dnow): movd %mm5,1664(%ebx) femms + RESTORE_GOT popl %ebx popl %esi movl %ebp,%esp popl %ebp ret +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__pointers,non_lazy_symbol_pointers +L_tfcos36: + .indirect_symbol ASM_NAME(tfcos36) + .long 0 +L_COS9: + .indirect_symbol ASM_NAME(COS9) + .long 0 +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct36_3dnowext.S b/deps/mpg123/src/libmpg123/dct36_3dnowext.S index 6bfacc2..287b6b9 100644 --- a/deps/mpg123/src/libmpg123/dct36_3dnowext.S +++ b/deps/mpg123/src/libmpg123/dct36_3dnowext.S @@ -48,8 +48,27 @@ ASM_NAME(dct36_3dnowext): pushl %ebp movl %esp, %ebp +#if defined(PIC) && defined(__APPLE__) + sub $4, %esp +#endif pushl %esi pushl %ebx + + #undef _EBX_ + #define _EBX_ %edi + PREPARE_GOT + GET_GOT +#if defined(PIC) && defined(__APPLE__) + #define _COS9_ 0(%edi) + #define _tfcos36_ 0(%eax) + mov GLOBAL_VAR_PTR(tfcos36), %eax + mov GLOBAL_VAR_PTR(COS9), %edi + mov %eax, -4(%ebp) +#else + #define _COS9_ GLOBAL_VAR(COS9) + #define _tfcos36_ GLOBAL_VAR(tfcos36) +#endif + movl 8(%ebp), %eax movl 12(%ebp), %esi movl 16(%ebp), %ecx @@ -133,9 +152,9 @@ ASM_NAME(dct36_3dnowext): movd %mm3,68(%eax) movq 24(%eax),%mm0 movq 48(%eax),%mm1 - movd ASM_NAME(COS9)+12,%mm2 + movd 12+_COS9_,%mm2 punpckldq %mm2,%mm2 - movd ASM_NAME(COS9)+24,%mm3 + movd 24+_COS9_,%mm3 punpckldq %mm3,%mm3 pfmul %mm2,%mm0 pfmul %mm3,%mm1 @@ -145,41 +164,44 @@ ASM_NAME(dct36_3dnowext): pi2fd %mm7,%mm7 popl %eax movq 8(%eax),%mm2 - movd ASM_NAME(COS9)+4,%mm3 + movd 4+_COS9_,%mm3 punpckldq %mm3,%mm3 pfmul %mm3,%mm2 pfadd %mm0,%mm2 movq 40(%eax),%mm3 - movd ASM_NAME(COS9)+20,%mm4 + movd 20+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfadd %mm3,%mm2 movq 56(%eax),%mm3 - movd ASM_NAME(COS9)+28,%mm4 + movd 28+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfadd %mm3,%mm2 movq (%eax),%mm3 movq 16(%eax),%mm4 - movd ASM_NAME(COS9)+8,%mm5 + movd 8+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfadd %mm4,%mm3 movq 32(%eax),%mm4 - movd ASM_NAME(COS9)+16,%mm5 + movd 16+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfadd %mm4,%mm3 pfadd %mm1,%mm3 movq 64(%eax),%mm4 - movd ASM_NAME(COS9)+32,%mm5 + movd 32+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfadd %mm4,%mm3 movq %mm2,%mm4 pfadd %mm3,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+0,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov -4(%ebp),%eax +#endif + punpckldq 0+_tfcos36_,%mm5 pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -204,7 +226,10 @@ ASM_NAME(dct36_3dnowext): movq %mm3,%mm4 pfsub %mm2,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+32,%mm5 + punpckldq 32+_tfcos36_,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov 8(%ebp),%eax +#endif pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -232,7 +257,7 @@ ASM_NAME(dct36_3dnowext): pfsub %mm3,%mm2 movq 56(%eax),%mm3 pfsub %mm3,%mm2 - movd ASM_NAME(COS9)+12,%mm3 + movd 12+_COS9_,%mm3 punpckldq %mm3,%mm3 pfmul %mm3,%mm2 movq 16(%eax),%mm3 @@ -240,7 +265,7 @@ ASM_NAME(dct36_3dnowext): pfsub %mm4,%mm3 movq 64(%eax),%mm4 pfsub %mm4,%mm3 - movd ASM_NAME(COS9)+24,%mm4 + movd 24+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 movq 48(%eax),%mm4 @@ -250,7 +275,10 @@ ASM_NAME(dct36_3dnowext): movq %mm2,%mm4 pfadd %mm3,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+4,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov -4(%ebp),%eax +#endif + punpckldq 4+_tfcos36_,%mm5 pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -276,7 +304,10 @@ ASM_NAME(dct36_3dnowext): movq %mm3,%mm4 pfsub %mm2,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+28,%mm5 + punpckldq 28+_tfcos36_,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov 8(%ebp),%eax +#endif pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -300,41 +331,44 @@ ASM_NAME(dct36_3dnowext): psrlq $32,%mm5 movd %mm5,2048(%ebx) movq 8(%eax),%mm2 - movd ASM_NAME(COS9)+20,%mm3 + movd 20+_COS9_,%mm3 punpckldq %mm3,%mm3 pfmul %mm3,%mm2 pfsub %mm0,%mm2 movq 40(%eax),%mm3 - movd ASM_NAME(COS9)+28,%mm4 + movd 28+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfsub %mm3,%mm2 movq 56(%eax),%mm3 - movd ASM_NAME(COS9)+4,%mm4 + movd 4+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfadd %mm3,%mm2 movq (%eax),%mm3 movq 16(%eax),%mm4 - movd ASM_NAME(COS9)+32,%mm5 + movd 32+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfsub %mm4,%mm3 movq 32(%eax),%mm4 - movd ASM_NAME(COS9)+8,%mm5 + movd 8+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfsub %mm4,%mm3 pfadd %mm1,%mm3 movq 64(%eax),%mm4 - movd ASM_NAME(COS9)+16,%mm5 + movd 16+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfadd %mm4,%mm3 movq %mm2,%mm4 pfadd %mm3,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+8,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov -4(%ebp),%eax +#endif + punpckldq 8+_tfcos36_,%mm5 pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -360,7 +394,10 @@ ASM_NAME(dct36_3dnowext): movq %mm3,%mm4 pfsub %mm2,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+24,%mm5 + punpckldq 24+_tfcos36_,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov 8(%ebp),%eax +#endif pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -384,41 +421,44 @@ ASM_NAME(dct36_3dnowext): psrlq $32,%mm5 movd %mm5,1920(%ebx) movq 8(%eax),%mm2 - movd ASM_NAME(COS9)+28,%mm3 + movd 28+_COS9_,%mm3 punpckldq %mm3,%mm3 pfmul %mm3,%mm2 pfsub %mm0,%mm2 movq 40(%eax),%mm3 - movd ASM_NAME(COS9)+4,%mm4 + movd 4+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfadd %mm3,%mm2 movq 56(%eax),%mm3 - movd ASM_NAME(COS9)+20,%mm4 + movd 20+_COS9_,%mm4 punpckldq %mm4,%mm4 pfmul %mm4,%mm3 pfsub %mm3,%mm2 movq (%eax),%mm3 movq 16(%eax),%mm4 - movd ASM_NAME(COS9)+16,%mm5 + movd 16+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfsub %mm4,%mm3 movq 32(%eax),%mm4 - movd ASM_NAME(COS9)+32,%mm5 + movd 32+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfadd %mm4,%mm3 pfadd %mm1,%mm3 movq 64(%eax),%mm4 - movd ASM_NAME(COS9)+8,%mm5 + movd 8+_COS9_,%mm5 punpckldq %mm5,%mm5 pfmul %mm5,%mm4 pfsub %mm4,%mm3 movq %mm2,%mm4 pfadd %mm3,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+12,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov -4(%ebp),%eax +#endif + punpckldq 12+_tfcos36_,%mm5 pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -444,7 +484,10 @@ ASM_NAME(dct36_3dnowext): movq %mm3,%mm4 pfsub %mm2,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+20,%mm5 + punpckldq 20+_tfcos36_,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov 8(%ebp),%eax +#endif pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -477,7 +520,10 @@ ASM_NAME(dct36_3dnowext): movq 64(%eax),%mm3 pfadd %mm3,%mm4 movq %mm7,%mm5 - punpckldq ASM_NAME(tfcos36)+16,%mm5 +#if defined(PIC) && defined(__APPLE__) + mov -4(%ebp),%eax +#endif + punpckldq 16+_tfcos36_,%mm5 pfmul %mm5,%mm4 movq %mm4,%mm5 pfacc %mm5,%mm5 @@ -503,10 +549,22 @@ ASM_NAME(dct36_3dnowext): femms /* NO_APP */ + RESTORE_GOT + popl %ebx popl %esi leave ret /* .size ASM_NAME(dct36_3dnowext), .-ASM_NAME(dct36_3dnowext) */ +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__pointers,non_lazy_symbol_pointers +L_tfcos36: + .indirect_symbol ASM_NAME(tfcos36) + .long 0 +L_COS9: + .indirect_symbol ASM_NAME(COS9) + .long 0 +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct36_avx.S b/deps/mpg123/src/libmpg123/dct36_avx.S new file mode 100644 index 0000000..e302b6d --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct36_avx.S @@ -0,0 +1,358 @@ +/* + dct36_avx: AVX optimized dct36 for x86-64 + + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifdef IS_MSABI +#define in %rcx +#define out1 %rdx +#define out2 %r8 +#define w %r9 +#define ts %r10 +#define COS9_ %rax +#define tfcos36_ %r11 +#else +#define in %rdi +#define out1 %rsi +#define out2 %rdx +#define w %rcx +#define ts %r8 +#define COS9_ %rax +#define tfcos36_ %r9 +#endif + +/* + void dct36_avx(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf); +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +dct36_avx_COS9: + .long 0x3f5db3d7 + .long 0x3f5db3d7 + .long 0x3f000000 + .long 0x3f000000 + .long 0x3f7c1c5c + .long 0x3f7c1c5c + .long 0x3f708fb2 + .long 0x3f708fb2 + .long 0x3f248dbb + .long 0x3f248dbb + .long 0x3e31d0d4 + .long 0x3e31d0d4 + .long 0x3eaf1d44 + .long 0x3eaf1d44 + .long 0x3f441b7d + .long 0x3f441b7d + ALIGN16 +dct36_avx_tfcos36: + .long 0x3f007d2b + .long 0x3f0483ee + .long 0x3f0d3b7d + .long 0x3f1c4257 + .long 0x40b79454 + .long 0x3ff746ea + .long 0x3f976fd9 + .long 0x3f5f2944 + .long 0x3f3504f3 + ALIGN16 +dct36_avx_sign: + .long 0x80000000,0x80000000,0x80000000,0x80000000 + .text + ALIGN16 + .globl ASM_NAME(dct36_avx) +ASM_NAME(dct36_avx): +#ifdef IS_MSABI + push %rbp + mov %rsp, %rbp + sub $160, %rsp + movaps %xmm6, (%rsp) + movaps %xmm7, 16(%rsp) + movaps %xmm8, 32(%rsp) + movaps %xmm9, 48(%rsp) + movaps %xmm10, 64(%rsp) + movaps %xmm11, 80(%rsp) + movaps %xmm12, 96(%rsp) + movaps %xmm13, 112(%rsp) + movaps %xmm14, 128(%rsp) + movaps %xmm15, 144(%rsp) + movq 48(%rbp), ts +#endif + lea dct36_avx_COS9(%rip), COS9_ + lea dct36_avx_tfcos36(%rip), tfcos36_ + + xorps %xmm4, %xmm4 + movups (in), %xmm0 + movups 16(in), %xmm1 + movups 32(in), %xmm2 + movups 48(in), %xmm3 + movlps 64(in), %xmm4 + vshufps $0x93, %xmm0, %xmm0, %xmm5 + vshufps $0x93, %xmm1, %xmm1, %xmm6 + vshufps $0x93, %xmm2, %xmm2, %xmm7 + vshufps $0x93, %xmm3, %xmm3, %xmm8 + vshufps $0xe1, %xmm4, %xmm4, %xmm9 + movss %xmm8, %xmm9 #[fg--] + addps %xmm9, %xmm4 #[gh--] + movss %xmm7, %xmm8 + addps %xmm8, %xmm3 #[cdef] + movss %xmm6, %xmm7 + addps %xmm7, %xmm2 #[89ab] + movss %xmm5, %xmm6 + addps %xmm6, %xmm1 #[4567] + xorps %xmm6, %xmm6 + movss %xmm6, %xmm5 + addps %xmm5, %xmm0 #[0123] + + vblendps $0x5, %xmm6, %xmm3, %xmm7 + vshufps $0x4e, %xmm4, %xmm3, %xmm4 + addps %xmm7, %xmm4 + vblendps $0x5, %xmm6, %xmm2, %xmm7 + vshufps $0x4e, %xmm3, %xmm2, %xmm3 + addps %xmm7, %xmm3 + vblendps $0x5, %xmm6, %xmm1, %xmm7 + vshufps $0x4e, %xmm2, %xmm1, %xmm2 + addps %xmm7, %xmm2 + vblendps $0x5, %xmm6, %xmm0, %xmm7 + vshufps $0x4e, %xmm1, %xmm0, %xmm1 + addps %xmm7, %xmm1 + vmovlhps %xmm0, %xmm6, %xmm0 + +/* +xmm0 in[-,-,0,1] +xmm1 in[2,3,4,5] +xmm2 in[6,7,8,9] +xmm3 in[10,11,12,13] +xmm4 in[14,15,16,17] +*/ + + vblendps $0xc, %xmm3, %xmm2, %xmm5 + blendps $0xc, %xmm4, %xmm3 + blendps $0xc, %xmm2, %xmm4 + movaps %xmm5, %xmm2 + +/* +xmm2 in[6,7,12,13] +xmm3 in[10,11,16,17] +xmm4 in[14,15,8,9] +*/ + + movaps (COS9_), %xmm15 + movaps 16(COS9_), %xmm6 + movaps 32(COS9_), %xmm7 + movaps 48(COS9_), %xmm8 + vmulps %xmm2, %xmm15, %xmm5 + addps %xmm0, %xmm5 + +/* +xmm5 [ta33,tb33,ta66,tb66] +xmm6 COS9_[1,1,2,2] +xmm7 COS9_[5,5,8,8] +xmm8 COS9_[7,7,4,4] +xmm15 COS9_[3,3,6,6] +*/ + + vmulps %xmm1, %xmm6, %xmm9 + vmulps %xmm3, %xmm7, %xmm12 + vmulps %xmm4, %xmm8, %xmm13 + addps %xmm5, %xmm9 + addps %xmm13, %xmm12 + addps %xmm9, %xmm12 + + vsubps %xmm3, %xmm1, %xmm13 + vshufps $0xe0, %xmm2, %xmm0, %xmm14 + vsubps %xmm14, %xmm0, %xmm14 + subps %xmm4, %xmm13 + mulps %xmm15, %xmm13 + addps %xmm14, %xmm13 + + vmulps %xmm1, %xmm7, %xmm9 + vmulps %xmm3, %xmm8, %xmm15 + vmulps %xmm4, %xmm6, %xmm14 + subps %xmm5, %xmm9 + subps %xmm15, %xmm14 + addps %xmm9, %xmm14 + + mulps %xmm1, %xmm8 + mulps %xmm3, %xmm6 + mulps %xmm4, %xmm7 + subps %xmm5, %xmm8 + subps %xmm7, %xmm6 + vaddps %xmm6, %xmm8, %xmm15 + + movss 32(tfcos36_), %xmm5 + subps %xmm1, %xmm0 + subps %xmm2, %xmm4 + addps %xmm3, %xmm0 + addps %xmm4, %xmm0 + shufps $0xaf, %xmm0, %xmm0 + vmulss %xmm5, %xmm0, %xmm11 + +/* +xmm12 [1a-0,1b-0, 2a-0, 2b-0] +xmm13 [1a-1,1b-1, 2a-1, 2b-1] +xmm14 [1a-2,1b-2,-2a-2,-2b-2] +xmm15 [1a-3,1b-3,-2a-3,-2b-3] +*/ + vunpckhps %xmm13, %xmm12, %xmm5 + vunpcklps %xmm13, %xmm12, %xmm12 + vunpckhps %xmm15, %xmm14, %xmm6 + vunpcklps %xmm15, %xmm14, %xmm14 + xorps dct36_avx_sign(%rip), %xmm6 + +/* +xmm12 [1a-0,1a-1,1b-0,1b-1] +xmm5 [2a-0,2a-1,2b-0,2b-1] +xmm14 [1a-2,1a-3,1b-2,1b-3] +xmm6 [2a-2,2a-3,2b-2,2b-3] +*/ + + vmovlhps %xmm14, %xmm12, %xmm0 + movhlps %xmm12, %xmm14 + vmovlhps %xmm6, %xmm5, %xmm1 + vmovhlps %xmm5, %xmm6, %xmm15 + +/* +xmm0 tmp1a +xmm1 tmp2a +xmm14 tmp1b +xmm15 tmp2b +*/ + + movaps (tfcos36_), %xmm6 + movaps 16(tfcos36_), %xmm7 + vsubps %xmm14, %xmm15, %xmm10 + addps %xmm14, %xmm15 + vsubps %xmm0, %xmm1, %xmm14 + addps %xmm1, %xmm0 + vmulps %xmm6, %xmm15, %xmm1 + mulps %xmm10, %xmm7 + +/* +%xmm0 tmp[0,1,2,3] +%xmm1 tmp[17,16,15,14] +%xmm14 tmp[8,7,6,5] +%xmm7 tmp[9,10,11,12] +%xmm11 tmp[13,-,4,-] +*/ + + movups 108(w), %xmm2 + movups 92(w), %xmm3 + shufps $0x1b, %xmm3, %xmm3 + movups 36(w), %xmm4 + movups 20(w), %xmm5 + shufps $0x1b, %xmm5, %xmm5 + vsubps %xmm1, %xmm0, %xmm6 + addps %xmm1, %xmm0 + mulps %xmm0, %xmm2 + mulps %xmm3, %xmm0 + mulps %xmm6, %xmm4 + mulps %xmm5, %xmm6 + movups 36(out1), %xmm1 + movups 20(out1), %xmm3 + shufps $0x1b, %xmm6, %xmm6 + addps %xmm4, %xmm1 + addps %xmm6, %xmm3 + shufps $0x1b, %xmm0, %xmm0 + movups %xmm2, 36(out2) + movups %xmm0, 20(out2) + movss %xmm1, 32*36(ts) + movss %xmm3, 32*20(ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*44(ts) + movss %xmm4, 32*28(ts) + shufps $0xb1, %xmm1, %xmm1 + shufps $0xb1, %xmm3, %xmm3 + movss %xmm1, 32*40(ts) + movss %xmm3, 32*24(ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*48(ts) + movss %xmm4, 32*32(ts) + + movhlps %xmm11, %xmm0 + movss 124(w), %xmm2 + movss 88(w), %xmm3 + movss 52(w), %xmm4 + movss 16(w), %xmm5 + movss %xmm0, %xmm6 + addss %xmm11, %xmm0 + subss %xmm11, %xmm6 + mulss %xmm0, %xmm2 + mulss %xmm3, %xmm0 + mulss %xmm6, %xmm4 + mulss %xmm5, %xmm6 + addss 52(out1), %xmm4 + addss 16(out1), %xmm6 + movss %xmm2, 52(out2) + movss %xmm0, 16(out2) + movss %xmm4, 32*52(ts) + movss %xmm6, 32*16(ts) + + movaps %xmm14, %xmm0 + movaps %xmm7, %xmm1 + MOVUAPS 128(w), %xmm2 + movups 72(w), %xmm3 + shufps $0x1b, %xmm2, %xmm2 + movlps 56(w), %xmm4 + movhps 64(w), %xmm4 + MOVUAPS (w), %xmm5 + shufps $0x1b, %xmm4, %xmm4 + vsubps %xmm1, %xmm0, %xmm6 + addps %xmm1, %xmm0 + mulps %xmm0, %xmm2 + mulps %xmm3, %xmm0 + mulps %xmm6, %xmm4 + mulps %xmm5, %xmm6 + movlps 56(out1), %xmm1 + movhps 64(out1), %xmm1 + movups (out1), %xmm3 + shufps $0x1b, %xmm4, %xmm4 + addps %xmm6, %xmm3 + addps %xmm4, %xmm1 + shufps $0x1b, %xmm2, %xmm2 + movups %xmm0, (out2) + movlps %xmm2, 56(out2) + movhps %xmm2, 64(out2) + movss %xmm1, 32*56(ts) + movss %xmm3, (ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*64(ts) + movss %xmm4, 32*8(ts) + shufps $0xb1, %xmm1, %xmm1 + shufps $0xb1, %xmm3, %xmm3 + movss %xmm1, 32*60(ts) + movss %xmm3, 32*4(ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*68(ts) + movss %xmm4, 32*12(ts) + +#ifdef IS_MSABI + movaps (%rsp), %xmm6 + movaps 16(%rsp), %xmm7 + movaps 32(%rsp), %xmm8 + movaps 48(%rsp), %xmm9 + movaps 64(%rsp), %xmm10 + movaps 80(%rsp), %xmm11 + movaps 96(%rsp), %xmm12 + movaps 112(%rsp), %xmm13 + movaps 128(%rsp), %xmm14 + movaps 144(%rsp), %xmm15 + mov %rbp, %rsp + pop %rbp +#endif + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct36_neon.S b/deps/mpg123/src/libmpg123/dct36_neon.S new file mode 100644 index 0000000..e7fa3af --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct36_neon.S @@ -0,0 +1,283 @@ +/* + dct36_neon: ARM NEON optimized dct36 + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + + +#include "mangle.h" + +#ifndef _M_ARM + .code 32 +#endif +#ifndef __APPLE__ + .fpu neon +#endif + + .text + ALIGN16 +dct36_neon_COS9: + .word 0x3f5db3d7 + .word 0x3f5db3d7 + .word 0x3f000000 + .word 0x3f000000 + .word 0x3f7c1c5c + .word 0x3f7c1c5c + .word 0x3f708fb2 + .word 0x3f708fb2 + .word 0x3f248dbb + .word 0x3f248dbb + .word 0x3e31d0d4 + .word 0x3e31d0d4 + .word 0x3eaf1d44 + .word 0x3eaf1d44 + .word 0x3f441b7d + .word 0x3f441b7d + .word 0x3f007d2b + .word 0x3f0483ee + .word 0x3f0d3b7d + .word 0x3f1c4257 + .word 0x40b79454 + .word 0x3ff746ea + .word 0x3f976fd9 + .word 0x3f5f2944 + .word 0x3f800000 + .word 0x3f3504f3 + + ALIGN4 + GLOBAL_SYMBOL ASM_NAME(dct36_neon) +#ifdef __ELF__ + .type ASM_NAME(dct36_neon), %function +#endif +ASM_NAME(dct36_neon): + push {r4-r5, lr} + vpush {q4-q7} + ldr r4, [sp, #76] + adr r5, dct36_neon_COS9 + + vceq.i32 q14, q14, q14 + veor q15, q15, q15 + vshl.i64 q14, q14, #32 + vld1.32 {q0, q1}, [r0]! + vld1.32 {q2, q3}, [r0]! + vld1.32 {d8}, [r0] + + vext.8 q5, q15, q0, #12 + vext.8 q6, q0, q1, #12 + vext.8 q7, q1, q2, #12 + vext.8 q8, q2, q3, #12 + vext.8 d18, d7, d8, #4 + vadd.f32 q0, q0, q5 + vadd.f32 q1, q1, q6 + vadd.f32 q2, q2, q7 + vadd.f32 q3, q3, q8 + vadd.f32 d8, d8, d18 + + vext.8 q6, q0, q1, #8 + vext.8 q7, q1, q2, #8 + vext.8 q8, q2, q3, #8 + vext.8 q9, q3, q4, #8 + vand q10, q0, q14 + vext.8 q0, q15, q0, #8 + vand q11, q1, q14 + vand q12, q2, q14 + vand q13, q3, q14 + vadd.f32 q1, q10, q6 + vadd.f32 q2, q11, q7 + vadd.f32 q3, q12, q8 + vadd.f32 q4, q13, q9 + +/* +q0 in[-,-,0,1] +q1 in[2,3,4,5] +q2 in[6,7,8,9] +q3 in[10,11,12,13] +q4 in[14,15,16,17] +*/ + + vswp d5, d7 + vswp d7, d9 + +/* +q2 in[6,7,12,13] +q3 in[10,11,16,17] +q4 in[14,15,8,9] +*/ + + vld1.32 {q5, q6}, [r5, :128]! + vld1.32 {q7, q8}, [r5, :128]! + vmov q9, q0 + vmla.f32 q9, q2, q5 + +/* +q6 COS9_[1,1,2,2] +q7 COS9_[5,5,8,8] +q8 COS9_[7,7,4,4] +q5 COS9_[3,3,6,6] +q9 [ta33,tb33,ta66,tb66] +*/ + + vmov q10, q9 + vmov d26, d0 + vmov d27, d5 + vmul.f32 q12, q1, q6 + vsub.f32 q11, q1, q3 + vmla.f32 q10, q3, q7 + vsub.f32 q13, q0, q13 + vmla.f32 q12, q4, q8 + vsub.f32 q11, q11, q4 + vmul.f32 q14, q1, q7 + vmul.f32 q15, q1, q8 + vadd.f32 q12, q12, q10 + vmov q10, q9 + vmla.f32 q13, q11, q5 + vmla.f32 q10, q3, q8 + vmla.f32 q14, q4, q6 + vmla.f32 q9, q4, q7 + vmla.f32 q15, q3, q6 + vsub.f32 q14, q14, q10 + vsub.f32 q15, q15, q9 + +/* +q12 [1a-0,1b-0, 2a-0, 2b-0] +q13 [1a-1,1b-1, 2a-1, 2b-1] +q14 [1a-2,1b-2,-2a-2,-2b-2] +q15 [1a-3,1b-3,-2a-3,-2b-3] +*/ + + vzip.32 q12, q13 + vzip.32 q14, q15 + vneg.f32 q15, q15 + +/* +q12 [1a-0,1a-1,1b-0,1b-1] +q13 [2a-0,2a-1,2b-0,2b-1] +q14 [1a-2,1a-3,1b-2,1b-3] +q15 [2a-2,2a-3,2b-2,2b-3] +*/ + + vswp d25, d28 + vswp d27, d30 + +/* +q12 tmp1a +q13 tmp2a +q14 tmp1b +q15 tmp2b +*/ + vsub.f32 d1, d1, d3 + vsub.f32 d9, d9, d5 + vld1.32 {q5, q6}, [r5, :128]! + vld1.32 {d0}, [r5, :64] + vadd.f32 q10, q14, q15 + vsub.f32 q8, q15, q14 + vadd.f32 d1, d1, d7 + vadd.f32 q9, q12, q13 + vsub.f32 q7, q13, q12 + vadd.f32 d1, d1, d9 + vmul.f32 q10, q10, q5 + vmul.f32 q8, q8, q6 + vmul.f32 d0, d1, d0 + +/* +q9 tmp[0,1,2,3] +q10 tmp[17,16,15,14] +q7 tmp[8,7,6,5] +q8 tmp[9,10,11,12] +d0 tmp[4,13] +*/ + + add r0, r4, #640 + add r5, r3, #20 + vld1.32 {q1,q2}, [r5] + add r5, r3, #92 + vld1.32 {q3,q4}, [r5] + add r5, r1, #20 + vld1.32 {q5,q6}, [r5] + vadd.f32 q11, q9, q10 + vsub.f32 q12, q9, q10 + vmul.f32 q10, q11, q4 + vmla.f32 q6, q12, q2 + vrev64.32 q11, q11 + vrev64.32 q12, q12 + vswp d22, d23 + vswp d24, d25 + vmul.f32 q9, q11, q3 + vmla.f32 q5, q12, q1 + add r5, r2, #20 + vst1.32 {q9,q10}, [r5] + mov r5, #128 + vst1.32 {d10[0]}, [r0], r5 + vst1.32 {d10[1]}, [r0], r5 + vst1.32 {d11[0]}, [r0], r5 + vst1.32 {d11[1]}, [r0], r5 + vst1.32 {d12[0]}, [r0], r5 + vst1.32 {d12[1]}, [r0], r5 + vst1.32 {d13[0]}, [r0], r5 + vst1.32 {d13[1]}, [r0], r5 + + add r0, r4, #1792 + add r5, r3, #56 + vld1.32 {q1}, [r3] + vld1.32 {q2,q3}, [r5] + add r5, r3, #128 + vld1.32 {q4}, [r5] + add r5, r1, #56 + vld1.32 {q5}, [r1] + vld1.32 {q6}, [r5] + vadd.f32 q9, q7, q8 + vsub.f32 q10, q7, q8 + vmul.f32 q7, q9, q3 + vmla.f32 q5, q10, q1 + vrev64.32 q9, q9 + vrev64.32 q10, q10 + vswp d18, d19 + vswp d20, d21 + vmul.f32 q8, q9, q4 + vmla.f32 q6, q10, q2 + add r5, r2, #56 + vst1.32 {q7}, [r2] + vst1.32 {q8}, [r5] + mov r5, #128 + vst1.32 {d10[0]}, [r4], r5 + vst1.32 {d10[1]}, [r4], r5 + vst1.32 {d11[0]}, [r4], r5 + vst1.32 {d11[1]}, [r4], r5 + vst1.32 {d12[0]}, [r0], r5 + vst1.32 {d12[1]}, [r0], r5 + vst1.32 {d13[0]}, [r0], r5 + vst1.32 {d13[1]}, [r0], r5 + + vtrn.32 d0, d1 + add r5, r3, #16 + vld1.32 {d2}, [r5] + add r5, r3, #52 + vld1.32 {d3}, [r5] + add r5, r3, #88 + vld1.32 {d4}, [r5] + add r3, r3, #124 + vld1.32 {d5}, [r3] + add r5, r1, #16 + vld1.32 {d6}, [r5] + add r1, r1, #52 + vld1.32 {d7}, [r1] + vadd.f32 d8, d0, d1 + vsub.f32 d9, d0, d1 + vmul.f32 d4, d8, d4 + vmul.f32 d5, d8, d5 + vmla.f32 d6, d9, d2 + vmla.f32 d7, d9, d3 + add r2, r2, #16 + vst1.32 {d4[0]}, [r2] + add r2, r2, #36 + vst1.32 {d5[0]}, [r2] + vst1.32 {d6[0]}, [r4] + add r4, r4, #1152 + vst1.32 {d7[0]}, [r4] + + vpop {q4-q7} + pop {r4-r5, pc} + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct36_neon64.S b/deps/mpg123/src/libmpg123/dct36_neon64.S new file mode 100644 index 0000000..89db65a --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct36_neon64.S @@ -0,0 +1,249 @@ +/* + dct36_neon64: NEON optimized dct36 for AArch64 + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +dct36_aarch64_COS9: + .word 0x3f5db3d7 + .word 0x3f5db3d7 + .word 0x3f000000 + .word 0x3f000000 + .word 0x3f7c1c5c + .word 0x3f7c1c5c + .word 0x3f708fb2 + .word 0x3f708fb2 + .word 0x3f248dbb + .word 0x3f248dbb + .word 0x3e31d0d4 + .word 0x3e31d0d4 + .word 0x3eaf1d44 + .word 0x3eaf1d44 + .word 0x3f441b7d + .word 0x3f441b7d + .word 0x3f007d2b + .word 0x3f0483ee + .word 0x3f0d3b7d + .word 0x3f1c4257 + .word 0x40b79454 + .word 0x3ff746ea + .word 0x3f976fd9 + .word 0x3f5f2944 + .word 0x3f800000 + .word 0x3f3504f3 + + .text + ALIGN4 + .globl ASM_NAME(dct36_neon64) +#ifdef __ELF__ + .type ASM_NAME(dct36_neon64), %function +#endif +ASM_NAME(dct36_neon64): + adrp x5, AARCH64_PCREL_HI(dct36_aarch64_COS9) + add x5, x5, AARCH64_PCREL_LO(dct36_aarch64_COS9) + cmeq v28.16b, v28.16b, v28.16b + eor v29.16b, v29.16b, v29.16b + shl v28.2d, v28.2d, #32 + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], #64 + ld1 {v4.2s}, [x0] + + ext v16.16b, v29.16b, v0.16b, #12 + ext v17.16b, v0.16b, v1.16b, #12 + ext v18.16b, v1.16b, v2.16b, #12 + ext v19.16b, v2.16b, v3.16b, #12 + ext v20.16b, v3.16b, v4.16b, #12 + fadd v0.4s, v0.4s, v16.4s + fadd v1.4s, v1.4s, v17.4s + fadd v2.4s, v2.4s, v18.4s + fadd v3.4s, v3.4s, v19.4s + fadd v4.2s, v4.2s, v20.2s + + ext v16.16b, v0.16b, v1.16b, #8 + ext v17.16b, v1.16b, v2.16b, #8 + ext v18.16b, v2.16b, v3.16b, #8 + ext v19.16b, v3.16b, v4.16b, #8 + and v20.16b, v0.16b, v28.16b + ext v0.16b, v29.16b, v0.16b, #8 + and v21.16b, v1.16b, v28.16b + and v22.16b, v2.16b, v28.16b + and v23.16b, v3.16b, v28.16b + fadd v1.4s, v20.4s, v16.4s + fadd v2.4s, v21.4s, v17.4s + fadd v3.4s, v22.4s, v18.4s + fadd v4.4s, v23.4s, v19.4s + +/* +v0 in[-,-,0,1] +v1 in[2,3,4,5] +v2 in[6,7,8,9] +v3 in[10,11,12,13] +v4 in[14,15,16,17] +*/ + + orr v5.16b, v2.16b, v2.16b + ins v2.d[1], v3.d[1] + ins v3.d[1], v4.d[1] + ins v4.d[1], v5.d[1] + +/* +v2 in[6,7,12,13] +v3 in[10,11,16,17] +v4 in[14,15,8,9] +*/ + + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x5], #64 + orr v20.16b, v0.16b, v0.16b + fmla v20.4s, v2.4s, v16.4s + +/* +v17 COS9_[1,1,2,2] +v18 COS9_[5,5,8,8] +v19 COS9_[7,7,4,4] +v16 COS9_[3,3,6,6] +v20 [ta33,tb33,ta66,tb66] +*/ + + orr v21.16b, v20.16b, v20.16b + orr v23.16b, v20.16b, v20.16b + zip2 v25.2d, v29.2d, v2.2d + fsub v22.4s, v1.4s, v3.4s + fmul v24.4s, v1.4s, v17.4s + fmul v26.4s, v1.4s, v18.4s + fmul v27.4s, v1.4s, v19.4s + fmla v21.4s, v3.4s, v18.4s + fmla v23.4s, v3.4s, v19.4s + fmla v20.4s, v4.4s, v18.4s + fsub v25.4s, v0.4s, v25.4s + fsub v22.4s, v22.4s, v4.4s + fmla v24.4s, v4.4s, v19.4s + fmla v26.4s, v4.4s, v17.4s + fmla v27.4s, v3.4s, v17.4s + fmla v25.4s, v22.4s, v16.4s + fadd v24.4s, v24.4s, v21.4s + fsub v26.4s, v26.4s, v23.4s + fsub v27.4s, v27.4s, v20.4s + + zip1 v16.4s, v24.4s, v25.4s + zip2 v17.4s, v24.4s, v25.4s + zip1 v18.4s, v26.4s, v27.4s + zip2 v19.4s, v26.4s, v27.4s + fneg v19.4s, v19.4s + zip1 v20.2d, v16.2d, v18.2d + zip1 v21.2d, v17.2d, v19.2d + zip2 v22.2d, v16.2d, v18.2d + zip2 v23.2d, v17.2d, v19.2d + + ld1 {v5.4s,v6.4s}, [x5], #32 + ld1 {v7.2s}, [x5] + fsub v0.4s, v0.4s, v1.4s + fsub v4.4s, v4.4s, v2.4s + fadd v17.4s, v22.4s, v23.4s + fsub v19.4s, v23.4s, v22.4s + fadd v0.4s, v0.4s, v3.4s + fadd v16.4s, v20.4s, v21.4s + fsub v18.4s, v21.4s, v20.4s + fadd v0.4s, v0.4s, v4.4s + fmul v17.4s, v17.4s, v5.4s + fmul v19.4s, v19.4s, v6.4s + AARCH64_DUP_2D(v0, v0, 1) + fmul v0.2s, v0.2s, v7.2s + +/* +v16 tmp[0,1,2,3] +v17 tmp[17,16,15,14] +v18 tmp[8,7,6,5] +v19 tmp[9,10,11,12] +v0 tmp[4,13] +*/ + + add x0, x4, #640 + add x5, x3, #20 + add x6, x3, #92 + add x7, x1, #20 + ld1 {v1.4s,v2.4s}, [x5] + ld1 {v3.4s,v4.4s}, [x6] + ld1 {v5.4s,v6.4s}, [x7] + fadd v20.4s, v16.4s, v17.4s + fsub v21.4s, v16.4s, v17.4s + fmul v4.4s, v20.4s, v4.4s + fmla v6.4s, v21.4s, v2.4s + rev64 v20.4s, v20.4s + rev64 v21.4s, v21.4s + ext v20.16b, v20.16b, v20.16b, #8 + ext v21.16b, v21.16b, v21.16b, #8 + fmul v3.4s, v20.4s, v3.4s + fmla v5.4s, v21.4s, v1.4s + add x5, x2, #20 + mov x9, #128 + st1 {v3.4s,v4.4s}, [x5] + st1 {v5.s}[0], [x0], x9 + st1 {v5.s}[1], [x0], x9 + st1 {v5.s}[2], [x0], x9 + st1 {v5.s}[3], [x0], x9 + st1 {v6.s}[0], [x0], x9 + st1 {v6.s}[1], [x0], x9 + st1 {v6.s}[2], [x0], x9 + st1 {v6.s}[3], [x0], x9 + + add x0, x4, #1792 + add x5, x3, #56 + add x6, x3, #128 + add x7, x1, #56 + ld1 {v1.4s}, [x3] + ld1 {v2.4s,v3.4s}, [x5] + ld1 {v4.4s}, [x6] + ld1 {v5.4s}, [x1] + ld1 {v6.4s}, [x7] + fadd v20.4s, v18.4s, v19.4s + fsub v21.4s, v18.4s, v19.4s + fmul v3.4s, v20.4s, v3.4s + fmla v5.4s, v21.4s, v1.4s + rev64 v20.4s, v20.4s + rev64 v21.4s, v21.4s + ext v20.16b, v20.16b, v20.16b, #8 + ext v21.16b, v21.16b, v21.16b, #8 + fmul v4.4s, v20.4s, v4.4s + fmla v6.4s, v21.4s, v2.4s + add x5, x2, #56 + st1 {v3.4s}, [x2] + st1 {v4.4s}, [x5] + st1 {v5.s}[0], [x4], x9 + st1 {v5.s}[1], [x4], x9 + st1 {v5.s}[2], [x4], x9 + st1 {v5.s}[3], [x4], x9 + st1 {v6.s}[0], [x0], x9 + st1 {v6.s}[1], [x0], x9 + st1 {v6.s}[2], [x0], x9 + st1 {v6.s}[3], [x0], x9 + + ins v1.s[0], v0.s[1] + ldr s2, [x3, #16] + ldr s3, [x3, #52] + ldr s4, [x3, #88] + ldr s5, [x3, #124] + ldr s6, [x1, #16] + ldr s7, [x1, #52] + fadd s16, s0, s1 + fsub s17, s0, s1 + fmul s4, s16, s4 + fmul s5, s16, s5 + fmadd s6, s17, s2, s6 + fmadd s7, s17, s3, s7 + str s4, [x2, #16] + str s5, [x2, #52] + str s6, [x4] + str s7, [x4, #1152] + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct36_sse.S b/deps/mpg123/src/libmpg123/dct36_sse.S new file mode 100644 index 0000000..fa4c625 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct36_sse.S @@ -0,0 +1,387 @@ +/* + dct36_sse: SSE optimized dct36 + + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#define in %edi +#define out1 %edi +#define out2 %edx +#define w %ecx +#define ts %eax +#define tmp %esi + +/* + void dct36_sse(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf); +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +dct36_sse_COS9: + .long 0x3f5db3d7 + .long 0x3f5db3d7 + .long 0x3f000000 + .long 0x3f000000 + .long 0x3f7c1c5c + .long 0x3f7c1c5c + .long 0x3f708fb2 + .long 0x3f708fb2 + .long 0x3f248dbb + .long 0x3f248dbb + .long 0x3e31d0d4 + .long 0x3e31d0d4 + .long 0x3eaf1d44 + .long 0x3eaf1d44 + .long 0x3f441b7d + .long 0x3f441b7d + ALIGN16 +dct36_sse_tfcos36: + .long 0x3f007d2b + .long 0x3f0483ee + .long 0x3f0d3b7d + .long 0x3f1c4257 + .long 0x40b79454 + .long 0x3ff746ea + .long 0x3f976fd9 + .long 0x3f5f2944 + .long 0x3f3504f3 + ALIGN16 +dct36_sse_mask: + .long 0,0xffffffff,0,0xffffffff + ALIGN16 +dct36_sse_sign: + .long 0x80000000,0x80000000,0x80000000,0x80000000 + .text + ALIGN16 + .globl ASM_NAME(dct36_sse) +ASM_NAME(dct36_sse): + push %ebp + mov %esp, %ebp + and $-16, %esp + sub $80, %esp + push %ebx + push %esi + push %edi + lea 12(%esp), tmp + movl 8(%ebp), in + + GET_GOT + + lea LOCAL_VAR(dct36_sse_COS9), %eax + lea LOCAL_VAR(dct36_sse_tfcos36), %edx + + xorps %xmm0, %xmm0 + xorps %xmm5, %xmm5 + movlps 64(in), %xmm5 + movups 48(in), %xmm4 + movups 32(in), %xmm3 + movups 16(in), %xmm2 + movups (in), %xmm1 + movaps %xmm5, %xmm6 + shufps $0xe1, %xmm6, %xmm6 + movaps %xmm4, %xmm7 + shufps $0x93, %xmm7, %xmm7 + movss %xmm7, %xmm6 + addps %xmm6, %xmm5 + movaps %xmm3, %xmm6 + shufps $0x93, %xmm6, %xmm6 + movss %xmm6, %xmm7 + addps %xmm7, %xmm4 + movaps %xmm2, %xmm7 + shufps $0x93, %xmm7, %xmm7 + movss %xmm7, %xmm6 + addps %xmm6, %xmm3 + movaps %xmm1, %xmm6 + shufps $0x93, %xmm6, %xmm6 + movss %xmm6, %xmm7 + addps %xmm7, %xmm2 + movss %xmm0, %xmm6 + addps %xmm6, %xmm1 + + movaps LOCAL_VAR(dct36_sse_mask), %xmm0 + movaps %xmm4, %xmm6 + shufps $0x4e, %xmm5, %xmm4 + movaps %xmm3, %xmm7 + shufps $0x4e, %xmm6, %xmm3 + andps %xmm0, %xmm6 + addps %xmm6, %xmm4 + movaps %xmm2, %xmm6 + shufps $0x4e, %xmm7, %xmm2 + andps %xmm0, %xmm7 + addps %xmm7, %xmm3 + movaps %xmm1, %xmm7 + shufps $0x4e, %xmm6, %xmm1 + andps %xmm0, %xmm6 + addps %xmm6, %xmm2 + movaps %xmm7, %xmm6 + andps %xmm0, %xmm7 + xorps %xmm0, %xmm0 + addps %xmm7, %xmm1 + movlhps %xmm6, %xmm0 + +/* +xmm0 in[-,-,0,1] +xmm1 in[2,3,4,5] +xmm2 in[6,7,8,9] +xmm3 in[10,11,12,13] +xmm4 in[14,15,16,17] +*/ + + movaps %xmm2, %xmm5 + shufps $0xe4, %xmm3, %xmm5 + shufps $0xe4, %xmm4, %xmm3 + shufps $0xe4, %xmm2, %xmm4 + movaps %xmm5, %xmm2 + +/* +xmm2 in[6,7,12,13] +xmm3 in[10,11,16,17] +xmm4 in[14,15,8,9] +*/ + + mulps (%eax), %xmm5 + addps %xmm0, %xmm5 + + movaps %xmm0, (tmp) + movaps %xmm2, 16(tmp) + +/* +0(tmp) in[-,-,0,1] +xmm5 [ta33,tb33,ta66,tb66] +*/ + + movaps %xmm1, %xmm6 + subps %xmm3, %xmm6 + subps %xmm4, %xmm6 + xorps %xmm7, %xmm7 + shufps $0xe0, %xmm2, %xmm7 + mulps (%eax), %xmm6 + subps %xmm7, %xmm0 + addps %xmm0, %xmm6 + movaps %xmm6, 48(tmp) + + movaps 16(%eax), %xmm2 + + movaps %xmm1, %xmm0 + movaps %xmm3, %xmm6 + movaps %xmm4, %xmm7 + mulps %xmm2, %xmm0 + mulps 32(%eax), %xmm6 + mulps 48(%eax), %xmm7 + addps %xmm5, %xmm0 + addps %xmm7, %xmm6 + addps %xmm6, %xmm0 + movaps %xmm0, 32(tmp) + + movaps %xmm1, %xmm0 + movaps %xmm3, %xmm6 + movaps %xmm4, %xmm7 + mulps 32(%eax), %xmm0 + mulps 48(%eax), %xmm6 + mulps %xmm2, %xmm7 + subps %xmm5, %xmm0 + subps %xmm6, %xmm7 + addps %xmm7, %xmm0 + movaps %xmm0, 64(tmp) + + movaps %xmm1, %xmm6 + movaps %xmm4, %xmm7 + mulps 48(%eax), %xmm6 + mulps %xmm3, %xmm2 + mulps 32(%eax), %xmm7 + subps %xmm5, %xmm6 + subps %xmm7, %xmm2 + addps %xmm2, %xmm6 + + movaps (tmp), %xmm0 + movss 32(%edx), %xmm5 + subps %xmm1, %xmm0 + subps 16(tmp), %xmm4 + addps %xmm3, %xmm0 + addps %xmm4, %xmm0 + shufps $0xaf, %xmm0, %xmm0 + mulss %xmm5, %xmm0 + movaps %xmm0, (tmp) + + movaps 32(tmp), %xmm0 + movaps 48(tmp), %xmm1 + movaps 64(tmp), %xmm2 + +/* +xmm0 [1a-0,1b-0, 2a-0, 2b-0] +xmm1 [1a-1,1b-1, 2a-1, 2b-1] +xmm2 [1a-2,1b-2,-2a-2,-2b-2] +xmm6 [1a-3,1b-3,-2a-3,-2b-3] +*/ + + movaps %xmm0, %xmm3 + unpcklps %xmm1, %xmm0 + unpckhps %xmm1, %xmm3 + movaps %xmm2, %xmm5 + unpcklps %xmm6, %xmm2 + unpckhps %xmm6, %xmm5 + xorps LOCAL_VAR(dct36_sse_sign), %xmm5 + +/* +xmm0 [1a-0,1a-1,1b-0,1b-1] +xmm3 [2a-0,2a-1,2b-0,2b-1] +xmm2 [1a-2,1a-3,1b-2,1b-3] +xmm5 [2a-2,2a-3,2b-2,2b-3] +*/ + + movaps %xmm0, %xmm1 + movlhps %xmm2, %xmm0 + movhlps %xmm1, %xmm2 + movaps %xmm3, %xmm4 + movlhps %xmm5, %xmm3 + movhlps %xmm4, %xmm5 + +/* +xmm0 tmp1a +xmm3 tmp2a +xmm2 tmp1b +xmm5 tmp2b +*/ + + movaps (%edx), %xmm6 + movaps 16(%edx), %xmm7 + movaps %xmm5, %xmm1 + addps %xmm2, %xmm5 + subps %xmm2, %xmm1 + movaps %xmm3, %xmm2 + addps %xmm0, %xmm3 + subps %xmm0, %xmm2 + mulps %xmm6, %xmm5 + mulps %xmm1, %xmm7 + + movaps %xmm2, 16(tmp) + +/* +%xmm3 tmp[0,1,2,3] +%xmm5 tmp[17,16,15,14] +16(tmp) tmp[8,7,6,5] +%xmm7 tmp[9,10,11,12] +0(tmp) tmp[13,-,4,-] +*/ + + movl 12(%ebp), out1 + movl 16(%ebp), out2 + movl 20(%ebp), w + movl 24(%ebp), ts + + movaps %xmm3, %xmm0 + movaps %xmm5, %xmm1 + movups 108(w), %xmm2 + movups 92(w), %xmm3 + shufps $0x1b, %xmm3, %xmm3 + movups 36(w), %xmm4 + movups 20(w), %xmm5 + shufps $0x1b, %xmm5, %xmm5 + movaps %xmm0, %xmm6 + addps %xmm1, %xmm0 + subps %xmm1, %xmm6 + mulps %xmm0, %xmm2 + mulps %xmm3, %xmm0 + mulps %xmm6, %xmm4 + mulps %xmm5, %xmm6 + movups 36(out1), %xmm1 + movups 20(out1), %xmm3 + shufps $0x1b, %xmm6, %xmm6 + addps %xmm4, %xmm1 + addps %xmm6, %xmm3 + shufps $0x1b, %xmm0, %xmm0 + movups %xmm2, 36(out2) + movups %xmm0, 20(out2) + movss %xmm1, 32*36(ts) + movss %xmm3, 32*20(ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*44(ts) + movss %xmm4, 32*28(ts) + shufps $0xb1, %xmm1, %xmm1 + shufps $0xb1, %xmm3, %xmm3 + movss %xmm1, 32*40(ts) + movss %xmm3, 32*24(ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*48(ts) + movss %xmm4, 32*32(ts) + + movss 8(tmp), %xmm0 + movss (tmp), %xmm1 + movss 124(w), %xmm2 + movss 88(w), %xmm3 + movss 52(w), %xmm4 + movss 16(w), %xmm5 + movss %xmm0, %xmm6 + addss %xmm1, %xmm0 + subss %xmm1, %xmm6 + mulss %xmm0, %xmm2 + mulss %xmm3, %xmm0 + mulss %xmm6, %xmm4 + mulss %xmm5, %xmm6 + addss 52(out1), %xmm4 + addss 16(out1), %xmm6 + movss %xmm2, 52(out2) + movss %xmm0, 16(out2) + movss %xmm4, 32*52(ts) + movss %xmm6, 32*16(ts) + + movaps 16(tmp), %xmm0 + movaps %xmm7, %xmm1 + MOVUAPS 128(w), %xmm2 + movups 72(w), %xmm3 + shufps $0x1b, %xmm2, %xmm2 + movlps 56(w), %xmm4 + movhps 64(w), %xmm4 + MOVUAPS (w), %xmm5 + shufps $0x1b, %xmm4, %xmm4 + movaps %xmm0, %xmm6 + addps %xmm1, %xmm0 + subps %xmm1, %xmm6 + mulps %xmm0, %xmm2 + mulps %xmm3, %xmm0 + mulps %xmm6, %xmm4 + mulps %xmm5, %xmm6 + movlps 56(out1), %xmm1 + movhps 64(out1), %xmm1 + movups (out1), %xmm3 + shufps $0x1b, %xmm4, %xmm4 + addps %xmm6, %xmm3 + addps %xmm4, %xmm1 + shufps $0x1b, %xmm2, %xmm2 + movups %xmm0, (out2) + movlps %xmm2, 56(out2) + movhps %xmm2, 64(out2) + movss %xmm1, 32*56(ts) + movss %xmm3, (ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*64(ts) + movss %xmm4, 32*8(ts) + shufps $0xb1, %xmm1, %xmm1 + shufps $0xb1, %xmm3, %xmm3 + movss %xmm1, 32*60(ts) + movss %xmm3, 32*4(ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*68(ts) + movss %xmm4, 32*12(ts) + + pop %edi + pop %esi + pop %ebx + mov %ebp, %esp + pop %ebp + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct36_x86_64.S b/deps/mpg123/src/libmpg123/dct36_x86_64.S new file mode 100644 index 0000000..35676c3 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct36_x86_64.S @@ -0,0 +1,394 @@ +/* + dct36_x86_64: SSE optimized dct36 for x86-64 + + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifdef IS_MSABI +#define in %rcx +#define out1 %rdx +#define out2 %r8 +#define w %r9 +#define ts %r10 +#define COS9_ %rax +#define tfcos36_ %r11 +#else +#define in %rdi +#define out1 %rsi +#define out2 %rdx +#define w %rcx +#define ts %r8 +#define COS9_ %rax +#define tfcos36_ %r9 +#endif + +/* + void dct36_x86_64(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf); +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +dct36_x86_64_COS9: + .long 0x3f5db3d7 + .long 0x3f5db3d7 + .long 0x3f000000 + .long 0x3f000000 + .long 0x3f7c1c5c + .long 0x3f7c1c5c + .long 0x3f708fb2 + .long 0x3f708fb2 + .long 0x3f248dbb + .long 0x3f248dbb + .long 0x3e31d0d4 + .long 0x3e31d0d4 + .long 0x3eaf1d44 + .long 0x3eaf1d44 + .long 0x3f441b7d + .long 0x3f441b7d + ALIGN16 +dct36_x86_64_tfcos36: + .long 0x3f007d2b + .long 0x3f0483ee + .long 0x3f0d3b7d + .long 0x3f1c4257 + .long 0x40b79454 + .long 0x3ff746ea + .long 0x3f976fd9 + .long 0x3f5f2944 + .long 0x3f3504f3 + ALIGN16 +dct36_x86_64_mask: + .long 0,0xffffffff,0,0xffffffff + ALIGN16 +dct36_x86_64_sign: + .long 0x80000000,0x80000000,0x80000000,0x80000000 + .text + ALIGN16 + .globl ASM_NAME(dct36_x86_64) +ASM_NAME(dct36_x86_64): +#ifdef IS_MSABI + push %rbp + mov %rsp, %rbp + sub $160, %rsp + movaps %xmm6, (%rsp) + movaps %xmm7, 16(%rsp) + movaps %xmm8, 32(%rsp) + movaps %xmm9, 48(%rsp) + movaps %xmm10, 64(%rsp) + movaps %xmm11, 80(%rsp) + movaps %xmm12, 96(%rsp) + movaps %xmm13, 112(%rsp) + movaps %xmm14, 128(%rsp) + movaps %xmm15, 144(%rsp) + movq 48(%rbp), ts +#endif + lea dct36_x86_64_COS9(%rip), COS9_ + lea dct36_x86_64_tfcos36(%rip), tfcos36_ + + xorps %xmm5, %xmm5 + movups (in), %xmm1 + movups 16(in), %xmm2 + movups 32(in), %xmm3 + movups 48(in), %xmm4 + movlps 64(in), %xmm5 + xorps %xmm6, %xmm6 + movaps %xmm1, %xmm7 + shufps $0x93, %xmm7, %xmm7 + movaps %xmm2, %xmm8 + shufps $0x93, %xmm8, %xmm8 + movaps %xmm3, %xmm9 + shufps $0x93, %xmm9, %xmm9 + movaps %xmm4, %xmm10 + shufps $0x93, %xmm10, %xmm10 + movaps %xmm5, %xmm11 + shufps $0xe1, %xmm11, %xmm11 + movss %xmm10, %xmm11 + addps %xmm11, %xmm5 + movss %xmm9, %xmm10 + addps %xmm10, %xmm4 + movss %xmm8, %xmm9 + addps %xmm9, %xmm3 + movss %xmm7, %xmm8 + addps %xmm8, %xmm2 + movss %xmm6, %xmm7 + addps %xmm7, %xmm1 + + movaps dct36_x86_64_mask(%rip), %xmm0 + movaps %xmm4, %xmm6 + shufps $0x4e, %xmm5, %xmm4 + movaps %xmm3, %xmm7 + shufps $0x4e, %xmm6, %xmm3 + andps %xmm0, %xmm6 + addps %xmm6, %xmm4 + movaps %xmm2, %xmm6 + shufps $0x4e, %xmm7, %xmm2 + andps %xmm0, %xmm7 + addps %xmm7, %xmm3 + movaps %xmm1, %xmm7 + shufps $0x4e, %xmm6, %xmm1 + andps %xmm0, %xmm6 + addps %xmm6, %xmm2 + movaps %xmm7, %xmm6 + andps %xmm0, %xmm7 + xorps %xmm0, %xmm0 + addps %xmm7, %xmm1 + movlhps %xmm6, %xmm0 + +/* +xmm0 in[-,-,0,1] +xmm1 in[2,3,4,5] +xmm2 in[6,7,8,9] +xmm3 in[10,11,12,13] +xmm4 in[14,15,16,17] +*/ + + movaps %xmm2, %xmm5 + shufps $0xe4, %xmm3, %xmm5 + shufps $0xe4, %xmm4, %xmm3 + shufps $0xe4, %xmm2, %xmm4 + movaps %xmm5, %xmm2 +/* +xmm2 in[6,7,12,13] +xmm3 in[10,11,16,17] +xmm4 in[14,15,8,9] +*/ + + movaps (COS9_), %xmm15 + movaps 16(COS9_), %xmm6 + movaps 32(COS9_), %xmm7 + movaps 48(COS9_), %xmm8 + mulps %xmm15, %xmm5 + addps %xmm0, %xmm5 + +/* +xmm5 [ta33,tb33,ta66,tb66] +xmm6 COS9_[1,1,2,2] +xmm7 COS9_[5,5,8,8] +xmm8 COS9_[7,7,4,4] +xmm15 COS9_[3,3,6,6] +*/ + movaps %xmm6, %xmm9 + movaps %xmm7, %xmm12 + movaps %xmm8, %xmm13 + mulps %xmm1, %xmm9 + mulps %xmm3, %xmm12 + mulps %xmm4, %xmm13 + addps %xmm5, %xmm9 + addps %xmm13, %xmm12 + addps %xmm9, %xmm12 + + movaps %xmm1, %xmm13 + subps %xmm3, %xmm13 + movaps %xmm0, %xmm10 + shufps $0xe0, %xmm2, %xmm10 + movaps %xmm0, %xmm14 + subps %xmm10, %xmm14 + subps %xmm4, %xmm13 + mulps %xmm15, %xmm13 + addps %xmm14, %xmm13 + + movaps %xmm7, %xmm9 + movaps %xmm8, %xmm15 + movaps %xmm6, %xmm14 + mulps %xmm1, %xmm9 + mulps %xmm3, %xmm15 + mulps %xmm4, %xmm14 + subps %xmm5, %xmm9 + subps %xmm15, %xmm14 + addps %xmm9, %xmm14 + + mulps %xmm1, %xmm8 + mulps %xmm3, %xmm6 + mulps %xmm4, %xmm7 + subps %xmm5, %xmm8 + subps %xmm7, %xmm6 + addps %xmm6, %xmm8 + movaps %xmm8, %xmm15 + + movss 32(tfcos36_), %xmm5 + subps %xmm1, %xmm0 + subps %xmm2, %xmm4 + addps %xmm3, %xmm0 + addps %xmm4, %xmm0 + shufps $0xaf, %xmm0, %xmm0 + mulss %xmm5, %xmm0 + movaps %xmm0, %xmm11 + +/* +xmm12 [1a-0,1b-0, 2a-0, 2b-0] +xmm13 [1a-1,1b-1, 2a-1, 2b-1] +xmm14 [1a-2,1b-2,-2a-2,-2b-2] +xmm15 [1a-3,1b-3,-2a-3,-2b-3] +*/ + movaps %xmm12, %xmm5 + unpckhps %xmm13, %xmm5 + unpcklps %xmm13, %xmm12 + movaps %xmm14, %xmm6 + unpckhps %xmm15, %xmm6 + unpcklps %xmm15, %xmm14 + xorps dct36_x86_64_sign(%rip), %xmm6 + +/* +xmm12 [1a-0,1a-1,1b-0,1b-1] +xmm5 [2a-0,2a-1,2b-0,2b-1] +xmm14 [1a-2,1a-3,1b-2,1b-3] +xmm6 [2a-2,2a-3,2b-2,2b-3] +*/ + + movaps %xmm12, %xmm0 + movlhps %xmm14, %xmm12 + movhlps %xmm0, %xmm14 + movaps %xmm5, %xmm0 + movlhps %xmm6, %xmm0 + movhlps %xmm5, %xmm6 + movaps %xmm6, %xmm15 + +/* +xmm12 tmp1a +xmm0 tmp2a +xmm14 tmp1b +xmm15 tmp2b +*/ + + movaps (tfcos36_), %xmm6 + movaps 16(tfcos36_), %xmm7 + movaps %xmm15, %xmm10 + addps %xmm14, %xmm15 + subps %xmm14, %xmm10 + movaps %xmm0, %xmm14 + addps %xmm12, %xmm0 + subps %xmm12, %xmm14 + mulps %xmm6, %xmm15 + mulps %xmm10, %xmm7 + +/* +%xmm0 tmp[0,1,2,3] +%xmm15 tmp[17,16,15,14] +%xmm14 tmp[8,7,6,5] +%xmm7 tmp[9,10,11,12] +%xmm11 tmp[13,-,4,-] +*/ + + movaps %xmm15, %xmm1 + movups 108(w), %xmm2 + movups 92(w), %xmm3 + shufps $0x1b, %xmm3, %xmm3 + movups 36(w), %xmm4 + movups 20(w), %xmm5 + shufps $0x1b, %xmm5, %xmm5 + movaps %xmm0, %xmm6 + addps %xmm1, %xmm0 + subps %xmm1, %xmm6 + mulps %xmm0, %xmm2 + mulps %xmm3, %xmm0 + mulps %xmm6, %xmm4 + mulps %xmm5, %xmm6 + movups 36(out1), %xmm1 + movups 20(out1), %xmm3 + shufps $0x1b, %xmm6, %xmm6 + addps %xmm4, %xmm1 + addps %xmm6, %xmm3 + shufps $0x1b, %xmm0, %xmm0 + movups %xmm2, 36(out2) + movups %xmm0, 20(out2) + movss %xmm1, 32*36(ts) + movss %xmm3, 32*20(ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*44(ts) + movss %xmm4, 32*28(ts) + shufps $0xb1, %xmm1, %xmm1 + shufps $0xb1, %xmm3, %xmm3 + movss %xmm1, 32*40(ts) + movss %xmm3, 32*24(ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*48(ts) + movss %xmm4, 32*32(ts) + + movhlps %xmm11, %xmm0 + movaps %xmm11, %xmm1 + movss 124(w), %xmm2 + movss 88(w), %xmm3 + movss 52(w), %xmm4 + movss 16(w), %xmm5 + movss %xmm0, %xmm6 + addss %xmm1, %xmm0 + subss %xmm1, %xmm6 + mulss %xmm0, %xmm2 + mulss %xmm3, %xmm0 + mulss %xmm6, %xmm4 + mulss %xmm5, %xmm6 + addss 52(out1), %xmm4 + addss 16(out1), %xmm6 + movss %xmm2, 52(out2) + movss %xmm0, 16(out2) + movss %xmm4, 32*52(ts) + movss %xmm6, 32*16(ts) + + movaps %xmm14, %xmm0 + movaps %xmm7, %xmm1 + MOVUAPS 128(w), %xmm2 + movups 72(w), %xmm3 + shufps $0x1b, %xmm2, %xmm2 + movlps 56(w), %xmm4 + movhps 64(w), %xmm4 + MOVUAPS (w), %xmm5 + shufps $0x1b, %xmm4, %xmm4 + movaps %xmm0, %xmm6 + addps %xmm1, %xmm0 + subps %xmm1, %xmm6 + mulps %xmm0, %xmm2 + mulps %xmm3, %xmm0 + mulps %xmm6, %xmm4 + mulps %xmm5, %xmm6 + movlps 56(out1), %xmm1 + movhps 64(out1), %xmm1 + movups (out1), %xmm3 + shufps $0x1b, %xmm4, %xmm4 + addps %xmm6, %xmm3 + addps %xmm4, %xmm1 + shufps $0x1b, %xmm2, %xmm2 + movups %xmm0, (out2) + movlps %xmm2, 56(out2) + movhps %xmm2, 64(out2) + movss %xmm1, 32*56(ts) + movss %xmm3, (ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*64(ts) + movss %xmm4, 32*8(ts) + shufps $0xb1, %xmm1, %xmm1 + shufps $0xb1, %xmm3, %xmm3 + movss %xmm1, 32*60(ts) + movss %xmm3, 32*4(ts) + movhlps %xmm1, %xmm2 + movhlps %xmm3, %xmm4 + movss %xmm2, 32*68(ts) + movss %xmm4, 32*12(ts) + +#ifdef IS_MSABI + movaps (%rsp), %xmm6 + movaps 16(%rsp), %xmm7 + movaps 32(%rsp), %xmm8 + movaps 48(%rsp), %xmm9 + movaps 64(%rsp), %xmm10 + movaps 80(%rsp), %xmm11 + movaps 96(%rsp), %xmm12 + movaps 112(%rsp), %xmm13 + movaps 128(%rsp), %xmm14 + movaps 144(%rsp), %xmm15 + mov %rbp, %rsp + pop %rbp +#endif + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_3dnow.S b/deps/mpg123/src/libmpg123/dct64_3dnow.S index cd6060b..99e6a2c 100644 --- a/deps/mpg123/src/libmpg123/dct64_3dnow.S +++ b/deps/mpg123/src/libmpg123/dct64_3dnow.S @@ -22,6 +22,11 @@ ASM_NAME(dct64_3dnow): pushl %edi pushl %esi pushl %ebx + + #undef _EBX_ + #define _EBX_ %ecx + GET_GOT + leal 16(%esp),%ebx movl 284(%esp),%edi movl 276(%esp),%ebp @@ -31,7 +36,12 @@ ASM_NAME(dct64_3dnow): /* femms */ /* 1 */ - movl ASM_NAME(pnts),%eax +#if defined(PIC) && defined(__APPLE__) + movl GLOBAL_VAR_PTR(pnts),%eax + movl (%eax),%eax +#else + movl GLOBAL_VAR(pnts),%eax +#endif movq 0(%edi),%mm0 movq %mm0,%mm1 movd 124(%edi),%mm2 @@ -130,7 +140,12 @@ ASM_NAME(dct64_3dnow): movd %mm5,64(%ebx) /* 2 */ - movl ASM_NAME(pnts)+4,%eax +#if defined(PIC) && defined(__APPLE__) + movl GLOBAL_VAR_PTR(pnts),%eax + movl 4(%eax),%eax +#else + movl 4+GLOBAL_VAR(pnts),%eax +#endif /* 0,14 */ movq 0(%ebx),%mm0 movq %mm0,%mm1 @@ -233,7 +248,12 @@ ASM_NAME(dct64_3dnow): movd %mm5,96(%esi) /* 3 */ - movl ASM_NAME(pnts)+8,%eax +#if defined(PIC) && defined(__APPLE__) + movl GLOBAL_VAR_PTR(pnts),%eax + movl 8(%eax),%eax +#else + movl 8+GLOBAL_VAR(pnts),%eax +#endif movq 0(%eax),%mm0 movq 8(%eax),%mm1 /* 0,6 */ @@ -334,7 +354,12 @@ ASM_NAME(dct64_3dnow): movd %mm6,112(%ebx) /* 4 */ - movl ASM_NAME(pnts)+12,%eax +#if defined(PIC) && defined(__APPLE__) + movl GLOBAL_VAR_PTR(pnts),%eax + movl 12(%eax),%eax +#else + movl 12+GLOBAL_VAR(pnts),%eax +#endif movq 0(%eax),%mm0 /* 0 */ movq 0(%ebx),%mm1 @@ -444,7 +469,12 @@ ASM_NAME(dct64_3dnow): pi2fd %mm0,%mm0 movd %eax,%mm1 pi2fd %mm1,%mm1 - movl ASM_NAME(pnts)+16,%eax +#if defined(PIC) && defined(__APPLE__) + movl GLOBAL_VAR_PTR(pnts),%eax + movl 16(%eax),%eax +#else + movl 16+GLOBAL_VAR(pnts),%eax +#endif movd 0(%eax),%mm2 /* 1.0 | cos0 */ punpckldq %mm2,%mm1 @@ -709,4 +739,11 @@ ASM_NAME(dct64_3dnow): ret +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__pointers,non_lazy_symbol_pointers +L_pnts: + .indirect_symbol ASM_NAME(pnts) + .long 0 +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_3dnowext.S b/deps/mpg123/src/libmpg123/dct64_3dnowext.S index 1b4c583..69367bf 100644 --- a/deps/mpg123/src/libmpg123/dct64_3dnowext.S +++ b/deps/mpg123/src/libmpg123/dct64_3dnowext.S @@ -45,13 +45,22 @@ ASM_NAME(dct64_3dnowext): pushl %edi pushl %esi pushl %ebx - subl $256, %esp + subl $260, %esp + + GET_GOT +#if defined(OPT_X86) && defined(PIC) + movl _EBX_, (%esp) /* save PIC register */ +#endif /* APP */ movl 16(%ebp),%eax leal 128+-268(%ebp),%edx movl 8(%ebp),%esi movl 12(%ebp),%edi - movl ASM_VALUE(costab_mmxsse),%ebx +#if defined(PIC) && defined(__APPLE__) + movl GLOBAL_VAR_PTR(costab_mmxsse),%ebx +#else + leal GLOBAL_VAR(costab_mmxsse),%ebx +#endif leal -268(%ebp),%ecx movq (%eax), %mm0 movq 8(%eax), %mm4 @@ -344,9 +353,14 @@ ASM_NAME(dct64_3dnowext): pswapd %mm7, %mm7 movq %mm3, 104(%ecx) movq %mm7, 120(%ecx) - movd plus_1f, %mm6 +#if defined(OPT_X86) && defined(PIC) + #undef _EBX_ + #define _EBX_ %eax + movl (%esp), _EBX_ +#endif + movd LOCAL_VAR(plus_1f), %mm6 punpckldq 120(%ebx), %mm6 - movq x_plus_minus_3dnow, %mm7 + movq LOCAL_VAR(x_plus_minus_3dnow), %mm7 movq 32(%ecx), %mm0 movq 64(%ecx), %mm2 movq %mm0, %mm1 @@ -703,7 +717,7 @@ ASM_NAME(dct64_3dnowext): femms /* NO_APP */ - addl $256, %esp + addl $260, %esp popl %ebx popl %esi popl %edi @@ -711,4 +725,11 @@ ASM_NAME(dct64_3dnowext): ret /* .size ASM_NAME(dct64_3dnowext), .-ASM_NAME(dct64_3dnowext) */ +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__pointers,non_lazy_symbol_pointers +L_costab_mmxsse: + .indirect_symbol ASM_NAME(costab_mmxsse) + .long 0 +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_avx.S b/deps/mpg123/src/libmpg123/dct64_avx.S new file mode 100644 index 0000000..3a8468e --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_avx.S @@ -0,0 +1,324 @@ +/* + dct36_sse: AVX optimized dct64 for x86-64 + + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#define samples %rdx +#define costab %rcx +#define out0 %rdi +#define out1 %rsi + +/* + void dct64_avx(short *out0, short *out1, real *samples); +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN32 +costab_avx: + .long 1056974725 + .long 1057056395 + .long 1057223771 + .long 1057485416 + .long 1057855544 + .long 1058356026 + .long 1059019886 + .long 1059897405 + .long 1061067246 + .long 1062657950 + .long 1064892987 + .long 1066774581 + .long 1069414683 + .long 1073984175 + .long 1079645762 + .long 1092815430 + .long 1057005197 + .long 1057342072 + .long 1058087743 + .long 1059427869 + .long 1061799040 + .long 1065862217 + .long 1071413542 + .long 1084439708 + .long 1057128951 + .long 1058664893 + .long 1063675095 + .long 1076102863 + .long 1057655764 + .long 1067924853 + .long 1060439283 + .long 0 + .text + ALIGN16 +.globl ASM_NAME(dct64_avx) +ASM_NAME(dct64_avx): +#ifdef IS_MSABI + push %rbp + mov %rsp, %rbp + sub $112, %rsp + movaps %xmm6, (%rsp) + movaps %xmm7, 16(%rsp) + movaps %xmm8, 32(%rsp) + movaps %xmm9, 48(%rsp) + movaps %xmm10, 64(%rsp) + movaps %xmm11, 80(%rsp) + movaps %xmm12, 96(%rsp) + push %rdi + push %rsi + mov %rcx, %rdi + mov %rdx, %rsi + mov %r8, %rdx +#endif + leaq costab_avx(%rip), costab + + vmovups (samples), %ymm0 # input[0,1,2,3,4,5,6,7] + vmovups 32(samples), %ymm1 # input[8,9,10,11,12,13,14,15] + vperm2f128 $0x23, 64(samples), %ymm2, %ymm2 + vperm2f128 $0x23, 96(samples), %ymm3, %ymm3 + vshufps $0x1b, %ymm2, %ymm2, %ymm2 # input[23,22,21,20,19,18,17,16] + vshufps $0x1b, %ymm3, %ymm3, %ymm3 # input[31,30,29,28,27,26,25,24] + vsubps %ymm2, %ymm1, %ymm6 + vsubps %ymm3, %ymm0, %ymm7 + vaddps %ymm0, %ymm3, %ymm4 # bufs[0,1,2,3,4,5,6,7] + vaddps %ymm1, %ymm2, %ymm5 # bufs[8,9,10,11,12,13,14,15] + vmulps (costab), %ymm7, %ymm7 # bufs[31,30,29,28,27,26,25,24] cos64[0,1,2,3,4,5,6,7] + vmulps 32(costab), %ymm6, %ymm6 # bufs[23,22,21,20,19,18,17,16] cos64[8,9,10,11,12,13,14,15] + + vmovaps 64(costab), %ymm8 # cos32[0,1,2,3,4,5,6,7] + + vshufps $0x1b, %ymm5, %ymm5, %ymm5 + vshufps $0x1b, %ymm6, %ymm6, %ymm6 + vperm2f128 $0x01, %ymm5, %ymm5, %ymm5 # bufs[15,14,13,12,11,10,9,8] + vperm2f128 $0x01, %ymm6, %ymm6, %ymm6 # bufs[16,17,18,19,20,21,22,23] + vsubps %ymm5, %ymm4, %ymm1 + vsubps %ymm6, %ymm7, %ymm3 + vaddps %ymm5, %ymm4, %ymm0 # bufs[32,33,34,35,36,37,38,39] + vaddps %ymm6, %ymm7, %ymm2 # bufs[48,49,50,51,52,53,54,55] + vmulps %ymm1, %ymm8, %ymm1 # bufs[47,46,45,44,43,42,41,40] + vmulps %ymm3, %ymm8, %ymm3 # bufs[63,62,61,60,59,58,57,56] + + vmovaps 96(costab), %ymm8 # cos16[0,1,2,3]:cos8[0,1]:cos4[0]:- + vperm2f128 $0x00, %ymm8, %ymm8, %ymm9 # cos16[0,1,2,3,0,1,2,3] + + vperm2f128 $0x20, %ymm1, %ymm0, %ymm4 # bufs[32,33,34,35,47,46,45,44] + vperm2f128 $0x31, %ymm1, %ymm0, %ymm5 + vshufps $0x1b, %ymm5, %ymm5, %ymm5 # bufs[39,38,37,36,40,41,42,43] + vperm2f128 $0x20, %ymm3, %ymm2, %ymm6 # bufs[48,49,50,51,63,62,61,60] + vperm2f128 $0x31, %ymm3, %ymm2, %ymm7 + vshufps $0x1b, %ymm7, %ymm7, %ymm7 # bufs[55,54,53,52,56,57,58,59] + vsubps %ymm5, %ymm4, %ymm1 + vsubps %ymm7, %ymm6, %ymm3 + vaddps %ymm5, %ymm4, %ymm0 # bufs[0,1,2,3,8,9,10,11] + vaddps %ymm7, %ymm6, %ymm2 # bufs[16,17,18,19,24,25,26,27] + vmulps %ymm1, %ymm9, %ymm1 # bufs[7,6,5,4,15,14,13,12] + vmulps %ymm3, %ymm9, %ymm3 # bufs[23,22,21,20,31,30,29,28] + + vperm2f128 $0x11, %ymm8, %ymm8, %ymm8 # cos8[0,1]:cos4[0]:-:cos8[0,1]:cos4[0]:- + vmovddup %ymm8, %ymm9 # cos8[0,1,0,1,0,1,0,1] + + vunpcklps %ymm1, %ymm0, %ymm4 # bufs[0,7,1,6,8,15,9,14] + vunpckhps %ymm1, %ymm0, %ymm5 # bufs[2,5,3,4,10,13,11,12] + vunpcklps %ymm3, %ymm2, %ymm6 # bufs[16,23,17,22,24,31,25,30] + vunpckhps %ymm3, %ymm2, %ymm7 # bufs[18,21,19,20,26,29,27,28] + vshufps $0xd8, %ymm4, %ymm4, %ymm4 # bufs[0,1,7,6,8,9,15,14] + vshufps $0x72, %ymm5, %ymm5, %ymm5 # bufs[3,2,4,5,11,10,12,13] + vshufps $0xd8, %ymm6, %ymm6, %ymm6 # bufs[16,17,23,22,24,25,31,30] + vshufps $0x72, %ymm7, %ymm7, %ymm7 # bufs[19,18,20,21,27,26,28,29] + vsubps %ymm5, %ymm4, %ymm1 + vsubps %ymm7, %ymm6, %ymm3 + vaddps %ymm5, %ymm4, %ymm0 # bufs[32,33,36,37,40,41,44,45] + vaddps %ymm7, %ymm6, %ymm2 # bufs[48,49,52,53,56,57,60,61] + vmulps %ymm1, %ymm9, %ymm1 # bufs[35,34,39,38,43,42,47,46] + vmulps %ymm3, %ymm9, %ymm3 # bufs[51,50,55,54,59,58,63,62] + + vpermilps $0xaa, %ymm8, %ymm8 # cos4[0,0,0,0,0,0,0,0] + + vshufps $0xd8, %ymm0, %ymm0, %ymm0 # bufs[32,36,33,37,40,44,41,45] + vshufps $0xd8, %ymm1, %ymm1, %ymm1 # bufs[35,39,34,38,43,47,42,46] + vshufps $0xd8, %ymm2, %ymm2, %ymm2 # bufs[48,52,49,53,56,60,57,61] + vshufps $0xd8, %ymm3, %ymm3, %ymm3 # bufs[51,55,50,54,59,63,58,62] + vunpcklps %ymm1, %ymm0, %ymm4 # bufs[32,35,36,39,40,43,44,47] + vunpckhps %ymm1, %ymm0, %ymm5 # bufs[33,34,37,38,41,42,45,46] + vunpcklps %ymm3, %ymm2, %ymm6 # bufs[48,51,52,55,56,59,60,63] + vunpckhps %ymm3, %ymm2, %ymm7 # bufs[49,50,53,54,57,58,61,62] + vsubps %ymm5, %ymm4, %ymm1 + vsubps %ymm7, %ymm6, %ymm3 + vaddps %ymm5, %ymm4, %ymm0 # bufs[0,2,4,6,8,10,12,14] + vaddps %ymm7, %ymm6, %ymm2 # bufs[16,18,20,22,24,26,28,30] + vmulps %ymm1, %ymm8, %ymm1 # bufs[1,3,5,7,9,11,13,15] + vmulps %ymm3, %ymm8, %ymm3 # bufs[17,19,21,23,25,27,29,31] + + vxorps %ymm8, %ymm8, %ymm8 + vblendps $0xaa, %ymm1, %ymm8, %ymm5 + vblendps $0xaa, %ymm3, %ymm8, %ymm6 + vaddps %ymm5, %ymm0, %ymm0 + vaddps %ymm6, %ymm2, %ymm2 + vunpcklps %ymm1, %ymm0, %ymm4 # bufs[0,1,2,3,8,9,10,11] + vunpckhps %ymm1, %ymm0, %ymm5 # bufs[4,5,6,7,12,13,14,15] + vunpcklps %ymm3, %ymm2, %ymm6 # bufs[16,17,18,19,24,25,26,27] + vunpckhps %ymm3, %ymm2, %ymm7 # bufs[20,21,22,23,28,29,30,31] + + vextractf128 $0x1, %ymm4, %xmm0 # bufs[8,9,10,11] + vextractf128 $0x1, %ymm5, %xmm1 # bufs[12,13,14,15] + vextractf128 $0x1, %ymm6, %xmm2 # bufs[24,25,26,27] + vextractf128 $0x1, %ymm7, %xmm3 # bufs[28,29,30,31] + + vshufps $0x1e, %xmm5, %xmm5, %xmm9 # bufs[6,7,5,4] + vshufps $0x1e, %xmm1, %xmm1, %xmm10 # bufs[14,15,13,12] + vshufps $0x1e, %xmm7, %xmm7, %xmm11 # bufs[22,23,21,20] + vshufps $0x1e, %xmm3, %xmm3, %xmm12 # bufs[30,31,29,28] + vblendps $0x7, %xmm9, %xmm8, %xmm9 # bufs[6,7,5,-] + vblendps $0x7, %xmm10, %xmm8, %xmm10 # bufs[14,15,13,-] + vblendps $0x7, %xmm11, %xmm8, %xmm11 # bufs[22,23,21,-] + vblendps $0x7, %xmm12, %xmm8, %xmm12 # bufs[30,31,29,-] + vaddps %xmm5, %xmm9, %xmm5 + vaddps %xmm1, %xmm10, %xmm1 + vaddps %xmm7, %xmm11, %xmm7 + vaddps %xmm3, %xmm12, %xmm3 + + prefetcht0 512(out0) + + vshufps $0x1e, %xmm0, %xmm0, %xmm9 # bufs[10,11,9,8] + vshufps $0x1e, %xmm2, %xmm2, %xmm10 # bufs[26,27,25,24] + vaddps %xmm1, %xmm0, %xmm0 + vaddps %xmm3, %xmm2, %xmm2 + vblendps $0x7, %xmm9, %xmm8, %xmm9 # bufs[10,11,9,-] + vblendps $0x7, %xmm10, %xmm8, %xmm10 # bufs[26,27,25,-] + vaddps %xmm1, %xmm9, %xmm1 + vaddps %xmm3, %xmm10, %xmm3 + + vzeroupper + prefetcht0 512(out1) + + cvtps2dq %xmm4, %xmm4 + cvtps2dq %xmm0, %xmm0 + cvtps2dq %xmm5, %xmm5 + cvtps2dq %xmm1, %xmm1 + packssdw %xmm5, %xmm4 + packssdw %xmm1, %xmm0 + movq %xmm4, %rcx + pshufd $0x4e, %xmm4, %xmm5 + movq %xmm0, %rdx + pshufd $0x4e, %xmm0, %xmm1 + movq %xmm5, %r8 + movq %xmm1, %r9 + + addq $512, out0 + movq $-64, %rax + + movw %cx, (out0) + movw %dx, (out0,%rax,1) + movw %r8w, (out0,%rax,2) + movw %r9w, -64(out0,%rax,2) + leaq (out0,%rax,4), out0 + shr $16, %rcx + shr $16, %rdx + shr $16, %r8 + shr $16, %r9 + movw %cx, (out0,%rax,4) + negq %rax + movw %cx, (out1) + movw %dx, (out1,%rax,1) + movw %r8w, (out1,%rax,2) + movw %r9w, 64(out1,%rax,2) + leaq (out1,%rax,4), out1 + shr $16, %rcx + shr $16, %rdx + shr $16, %r8 + shr $16, %r9 + negq %rax + movw %cx, (out0) + movw %dx, (out0,%rax,1) + movw %r8w, (out0,%rax,2) + movw %r9w, -64(out0,%rax,2) + shr $16, %rcx + shr $16, %rdx + shr $16, %r8 + shr $16, %r9 + negq %rax + movw %cx, (out1) + movw %dx, (out1,%rax,1) + movw %r8w, (out1,%rax,2) + movw %r9w, 64(out1,%rax,2) + + leaq -32(out0,%rax,4), out0 + negq %rax + leaq 32(out1,%rax,4), out1 + + vshufps $0x1e, %xmm6, %xmm6, %xmm0 + vblendps $0x7, %xmm0, %xmm8, %xmm0 + addps %xmm2, %xmm6 + addps %xmm7, %xmm2 + addps %xmm3, %xmm7 + addps %xmm0, %xmm3 + cvtps2dq %xmm6, %xmm6 + cvtps2dq %xmm2, %xmm2 + cvtps2dq %xmm7, %xmm7 + cvtps2dq %xmm3, %xmm3 + packssdw %xmm7, %xmm6 + packssdw %xmm3, %xmm2 + movq %xmm6, %rcx + pshufd $0x4e, %xmm6, %xmm7 + movq %xmm2, %rdx + pshufd $0x4e, %xmm2, %xmm3 + movq %xmm7, %r8 + movq %xmm3, %r9 + + movw %cx, (out0) + movw %dx, (out0,%rax,1) + movw %r8w, (out0,%rax,2) + movw %r9w, -64(out0,%rax,2) + leaq (out0,%rax,4), out0 + shr $16, %rcx + shr $16, %rdx + shr $16, %r8 + shr $16, %r9 + negq %rax + movw %cx, (out1) + movw %dx, (out1,%rax,1) + movw %r8w, (out1,%rax,2) + movw %r9w, 64(out1,%rax,2) + leaq (out1,%rax,4), out1 + shr $16, %rcx + shr $16, %rdx + shr $16, %r8 + shr $16, %r9 + negq %rax + movw %cx, (out0) + movw %dx, (out0,%rax,1) + movw %r8w, (out0,%rax,2) + movw %r9w, -64(out0,%rax,2) + shr $16, %rcx + shr $16, %rdx + shr $16, %r8 + shr $16, %r9 + negq %rax + movw %cx, (out1) + movw %dx, (out1,%rax,1) + movw %r8w, (out1,%rax,2) + movw %r9w, 64(out1,%rax,2) + +#ifdef IS_MSABI + pop %rsi + pop %rdi + movaps (%rsp), %xmm6 + movaps 16(%rsp), %xmm7 + movaps 32(%rsp), %xmm8 + movaps 48(%rsp), %xmm9 + movaps 64(%rsp), %xmm10 + movaps 80(%rsp), %xmm11 + movaps 96(%rsp), %xmm12 + mov %rbp, %rsp + pop %rbp +#endif + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_avx_float.S b/deps/mpg123/src/libmpg123/dct64_avx_float.S new file mode 100644 index 0000000..e4c024e --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_avx_float.S @@ -0,0 +1,294 @@ +/* + dct64_x86_64_float: SSE optimized dct64 for x86-64 (float output version) + + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#define samples %rdx +#define costab %rcx +#define out0 %rdi +#define out1 %rsi + +/* + void dct64_real_avx(real *out0, real *out1, real *samples); +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN32 +costab_avx: + .long 1056974725 + .long 1057056395 + .long 1057223771 + .long 1057485416 + .long 1057855544 + .long 1058356026 + .long 1059019886 + .long 1059897405 + .long 1061067246 + .long 1062657950 + .long 1064892987 + .long 1066774581 + .long 1069414683 + .long 1073984175 + .long 1079645762 + .long 1092815430 + .long 1057005197 + .long 1057342072 + .long 1058087743 + .long 1059427869 + .long 1061799040 + .long 1065862217 + .long 1071413542 + .long 1084439708 + .long 1057128951 + .long 1058664893 + .long 1063675095 + .long 1076102863 + .long 1057655764 + .long 1067924853 + .long 1060439283 + .long 0 + .text + ALIGN16 +.globl ASM_NAME(dct64_real_avx) +ASM_NAME(dct64_real_avx): +#ifdef IS_MSABI + push %rbp + mov %rsp, %rbp + sub $112, %rsp + movaps %xmm6, (%rsp) + movaps %xmm7, 16(%rsp) + movaps %xmm8, 32(%rsp) + movaps %xmm9, 48(%rsp) + movaps %xmm10, 64(%rsp) + movaps %xmm11, 80(%rsp) + movaps %xmm12, 96(%rsp) + push %rdi + push %rsi + mov %rcx, %rdi + mov %rdx, %rsi + mov %r8, %rdx +#endif + leaq costab_avx(%rip), costab + + vmovups (samples), %ymm0 # input[0,1,2,3,4,5,6,7] + vmovups 32(samples), %ymm1 # input[8,9,10,11,12,13,14,15] + vperm2f128 $0x23, 64(samples), %ymm2, %ymm2 + vperm2f128 $0x23, 96(samples), %ymm3, %ymm3 + vshufps $0x1b, %ymm2, %ymm2, %ymm2 # input[23,22,21,20,19,18,17,16] + vshufps $0x1b, %ymm3, %ymm3, %ymm3 # input[31,30,29,28,27,26,25,24] + vsubps %ymm2, %ymm1, %ymm6 + vsubps %ymm3, %ymm0, %ymm7 + vaddps %ymm0, %ymm3, %ymm4 # bufs[0,1,2,3,4,5,6,7] + vaddps %ymm1, %ymm2, %ymm5 # bufs[8,9,10,11,12,13,14,15] + vmulps (costab), %ymm7, %ymm7 # bufs[31,30,29,28,27,26,25,24] cos64[0,1,2,3,4,5,6,7] + vmulps 32(costab), %ymm6, %ymm6 # bufs[23,22,21,20,19,18,17,16] cos64[8,9,10,11,12,13,14,15] + + vmovaps 64(costab), %ymm8 # cos32[0,1,2,3,4,5,6,7] + + vshufps $0x1b, %ymm5, %ymm5, %ymm5 + vshufps $0x1b, %ymm6, %ymm6, %ymm6 + vperm2f128 $0x01, %ymm5, %ymm5, %ymm5 # bufs[15,14,13,12,11,10,9,8] + vperm2f128 $0x01, %ymm6, %ymm6, %ymm6 # bufs[16,17,18,19,20,21,22,23] + vsubps %ymm5, %ymm4, %ymm1 + vsubps %ymm6, %ymm7, %ymm3 + vaddps %ymm5, %ymm4, %ymm0 # bufs[32,33,34,35,36,37,38,39] + vaddps %ymm6, %ymm7, %ymm2 # bufs[48,49,50,51,52,53,54,55] + vmulps %ymm1, %ymm8, %ymm1 # bufs[47,46,45,44,43,42,41,40] + vmulps %ymm3, %ymm8, %ymm3 # bufs[63,62,61,60,59,58,57,56] + + vmovaps 96(costab), %ymm8 # cos16[0,1,2,3]:cos8[0,1]:cos4[0]:- + vperm2f128 $0x00, %ymm8, %ymm8, %ymm9 # cos16[0,1,2,3,0,1,2,3] + + vperm2f128 $0x20, %ymm1, %ymm0, %ymm4 # bufs[32,33,34,35,47,46,45,44] + vperm2f128 $0x31, %ymm1, %ymm0, %ymm5 + vshufps $0x1b, %ymm5, %ymm5, %ymm5 # bufs[39,38,37,36,40,41,42,43] + vperm2f128 $0x20, %ymm3, %ymm2, %ymm6 # bufs[48,49,50,51,63,62,61,60] + vperm2f128 $0x31, %ymm3, %ymm2, %ymm7 + vshufps $0x1b, %ymm7, %ymm7, %ymm7 # bufs[55,54,53,52,56,57,58,59] + vsubps %ymm5, %ymm4, %ymm1 + vsubps %ymm7, %ymm6, %ymm3 + vaddps %ymm5, %ymm4, %ymm0 # bufs[0,1,2,3,8,9,10,11] + vaddps %ymm7, %ymm6, %ymm2 # bufs[16,17,18,19,24,25,26,27] + vmulps %ymm1, %ymm9, %ymm1 # bufs[7,6,5,4,15,14,13,12] + vmulps %ymm3, %ymm9, %ymm3 # bufs[23,22,21,20,31,30,29,28] + + vperm2f128 $0x11, %ymm8, %ymm8, %ymm8 # cos8[0,1]:cos4[0]:-:cos8[0,1]:cos4[0]:- + vmovddup %ymm8, %ymm9 # cos8[0,1,0,1,0,1,0,1] + + vunpcklps %ymm1, %ymm0, %ymm4 # bufs[0,7,1,6,8,15,9,14] + vunpckhps %ymm1, %ymm0, %ymm5 # bufs[2,5,3,4,10,13,11,12] + vunpcklps %ymm3, %ymm2, %ymm6 # bufs[16,23,17,22,24,31,25,30] + vunpckhps %ymm3, %ymm2, %ymm7 # bufs[18,21,19,20,26,29,27,28] + vshufps $0xd8, %ymm4, %ymm4, %ymm4 # bufs[0,1,7,6,8,9,15,14] + vshufps $0x72, %ymm5, %ymm5, %ymm5 # bufs[3,2,4,5,11,10,12,13] + vshufps $0xd8, %ymm6, %ymm6, %ymm6 # bufs[16,17,23,22,24,25,31,30] + vshufps $0x72, %ymm7, %ymm7, %ymm7 # bufs[19,18,20,21,27,26,28,29] + vsubps %ymm5, %ymm4, %ymm1 + vsubps %ymm7, %ymm6, %ymm3 + vaddps %ymm5, %ymm4, %ymm0 # bufs[32,33,36,37,40,41,44,45] + vaddps %ymm7, %ymm6, %ymm2 # bufs[48,49,52,53,56,57,60,61] + vmulps %ymm1, %ymm9, %ymm1 # bufs[35,34,39,38,43,42,47,46] + vmulps %ymm3, %ymm9, %ymm3 # bufs[51,50,55,54,59,58,63,62] + + vpermilps $0xaa, %ymm8, %ymm8 # cos4[0,0,0,0,0,0,0,0] + + vshufps $0xd8, %ymm0, %ymm0, %ymm0 # bufs[32,36,33,37,40,44,41,45] + vshufps $0xd8, %ymm1, %ymm1, %ymm1 # bufs[35,39,34,38,43,47,42,46] + vshufps $0xd8, %ymm2, %ymm2, %ymm2 # bufs[48,52,49,53,56,60,57,61] + vshufps $0xd8, %ymm3, %ymm3, %ymm3 # bufs[51,55,50,54,59,63,58,62] + vunpcklps %ymm1, %ymm0, %ymm4 # bufs[32,35,36,39,40,43,44,47] + vunpckhps %ymm1, %ymm0, %ymm5 # bufs[33,34,37,38,41,42,45,46] + vunpcklps %ymm3, %ymm2, %ymm6 # bufs[48,51,52,55,56,59,60,63] + vunpckhps %ymm3, %ymm2, %ymm7 # bufs[49,50,53,54,57,58,61,62] + vsubps %ymm5, %ymm4, %ymm1 + vsubps %ymm7, %ymm6, %ymm3 + vaddps %ymm5, %ymm4, %ymm0 # bufs[0,2,4,6,8,10,12,14] + vaddps %ymm7, %ymm6, %ymm2 # bufs[16,18,20,22,24,26,28,30] + vmulps %ymm1, %ymm8, %ymm1 # bufs[1,3,5,7,9,11,13,15] + vmulps %ymm3, %ymm8, %ymm3 # bufs[17,19,21,23,25,27,29,31] + + vxorps %ymm8, %ymm8, %ymm8 + vblendps $0xaa, %ymm1, %ymm8, %ymm5 + vblendps $0xaa, %ymm3, %ymm8, %ymm6 + vaddps %ymm5, %ymm0, %ymm0 + vaddps %ymm6, %ymm2, %ymm2 + vunpcklps %ymm1, %ymm0, %ymm4 # bufs[0,1,2,3,8,9,10,11] + vunpckhps %ymm1, %ymm0, %ymm5 # bufs[4,5,6,7,12,13,14,15] + vunpcklps %ymm3, %ymm2, %ymm6 # bufs[16,17,18,19,24,25,26,27] + vunpckhps %ymm3, %ymm2, %ymm7 # bufs[20,21,22,23,28,29,30,31] + + vextractf128 $0x1, %ymm4, %xmm0 # bufs[8,9,10,11] + vextractf128 $0x1, %ymm5, %xmm1 # bufs[12,13,14,15] + vextractf128 $0x1, %ymm6, %xmm2 # bufs[24,25,26,27] + vextractf128 $0x1, %ymm7, %xmm3 # bufs[28,29,30,31] + + vshufps $0x1e, %xmm5, %xmm5, %xmm9 # bufs[6,7,5,4] + vshufps $0x1e, %xmm1, %xmm1, %xmm10 # bufs[14,15,13,12] + vshufps $0x1e, %xmm7, %xmm7, %xmm11 # bufs[22,23,21,20] + vshufps $0x1e, %xmm3, %xmm3, %xmm12 # bufs[30,31,29,28] + vblendps $0x7, %xmm9, %xmm8, %xmm9 # bufs[6,7,5,-] + vblendps $0x7, %xmm10, %xmm8, %xmm10 # bufs[14,15,13,-] + vblendps $0x7, %xmm11, %xmm8, %xmm11 # bufs[22,23,21,-] + vblendps $0x7, %xmm12, %xmm8, %xmm12 # bufs[30,31,29,-] + vaddps %xmm5, %xmm9, %xmm5 + vaddps %xmm1, %xmm10, %xmm1 + vaddps %xmm7, %xmm11, %xmm7 + vaddps %xmm3, %xmm12, %xmm3 + + prefetcht0 1024(out0) + + vshufps $0x1e, %xmm0, %xmm0, %xmm9 # bufs[10,11,9,8] + vshufps $0x1e, %xmm2, %xmm2, %xmm10 # bufs[26,27,25,24] + vaddps %xmm1, %xmm0, %xmm0 + vaddps %xmm3, %xmm2, %xmm2 + vblendps $0x7, %xmm9, %xmm8, %xmm9 # bufs[10,11,9,-] + vblendps $0x7, %xmm10, %xmm8, %xmm10 # bufs[26,27,25,-] + vaddps %xmm1, %xmm9, %xmm1 + vaddps %xmm3, %xmm10, %xmm3 + + vzeroupper + prefetcht0 1024(out1) + + addq $1024, out0 + movq $-128, %rax + movss %xmm4, (out0) + movss %xmm0, (out0,%rax,1) + movss %xmm5, (out0,%rax,2) + movss %xmm1, -128(out0,%rax,2) + leaq (out0,%rax,4), out0 + movhlps %xmm4, %xmm9 + movhlps %xmm0, %xmm10 + movhlps %xmm5, %xmm11 + movhlps %xmm1, %xmm12 + vmovss %xmm9, (out0) + vmovss %xmm10, (out0,%rax,1) + vmovss %xmm11, (out0,%rax,2) + vmovss %xmm12, -128(out0,%rax,2) + leaq (out0,%rax,4), out0 + negq %rax + shufps $0xb1, %xmm4, %xmm4 + shufps $0xb1, %xmm0, %xmm0 + shufps $0xb1, %xmm5, %xmm5 + shufps $0xb1, %xmm1, %xmm1 + movss %xmm4, (out0) + movss %xmm4, (out1) + leaq (out1,%rax,1), out1 + movss %xmm0, (out1) + movss %xmm5, (out1,%rax,1) + movss %xmm1, (out1,%rax,2) + leaq (out1,%rax,4), out1 + movhlps %xmm4, %xmm4 + movhlps %xmm0, %xmm0 + movhlps %xmm5, %xmm5 + movhlps %xmm1, %xmm1 + movss %xmm4, -128(out1) + movss %xmm0, (out1) + movss %xmm5, (out1,%rax,1) + movss %xmm1, (out1,%rax,2) + + leaq -64(out0,%rax,8), out0 + negq %rax + vshufps $0x1e, %xmm6, %xmm6, %xmm0 + vblendps $0x7, %xmm0, %xmm8, %xmm0 + addps %xmm2, %xmm6 + addps %xmm7, %xmm2 + addps %xmm3, %xmm7 + addps %xmm0, %xmm3 + movss %xmm6, (out0) + movss %xmm2, (out0,%rax,1) + movss %xmm7, (out0,%rax,2) + movss %xmm3, -128(out0,%rax,2) + leaq (out0,%rax,4), out0 + movhlps %xmm6, %xmm0 + movhlps %xmm2, %xmm1 + movhlps %xmm7, %xmm4 + movhlps %xmm3, %xmm5 + movss %xmm0, (out0) + movss %xmm1, (out0,%rax,1) + movss %xmm4, (out0,%rax,2) + movss %xmm5, -128(out0,%rax,2) + leaq 64(out1,%rax,4), out1 + negq %rax + shufps $0xb1, %xmm6, %xmm6 + shufps $0xb1, %xmm2, %xmm2 + shufps $0xb1, %xmm7, %xmm7 + shufps $0xb1, %xmm3, %xmm3 + movss %xmm6, -128(out1) + movss %xmm2, (out1) + movss %xmm7, (out1,%rax,1) + movss %xmm3, (out1,%rax,2) + leaq (out1,%rax,4), out1 + movhlps %xmm6, %xmm6 + movhlps %xmm2, %xmm2 + movhlps %xmm7, %xmm7 + movhlps %xmm3, %xmm3 + movss %xmm6, -128(out1) + movss %xmm2, (out1) + movss %xmm7, (out1,%rax,1) + movss %xmm3, (out1,%rax,2) + +#ifdef IS_MSABI + pop %rsi + pop %rdi + movaps (%rsp), %xmm6 + movaps 16(%rsp), %xmm7 + movaps 32(%rsp), %xmm8 + movaps 48(%rsp), %xmm9 + movaps 64(%rsp), %xmm10 + movaps 80(%rsp), %xmm11 + movaps 96(%rsp), %xmm12 + mov %rbp, %rsp + pop %rbp +#endif + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_mmx.S b/deps/mpg123/src/libmpg123/dct64_mmx.S index b700732..ff8d403 100644 --- a/deps/mpg123/src/libmpg123/dct64_mmx.S +++ b/deps/mpg123/src/libmpg123/dct64_mmx.S @@ -21,6 +21,9 @@ ASM_NAME(dct64_MMX): pushl %esi pushl %edi subl $256,%esp + + GET_GOT + movl 280(%esp),%eax flds (%eax) leal 128(%esp),%edx @@ -29,7 +32,11 @@ ASM_NAME(dct64_MMX): fstps (%edx) movl 276(%esp),%edi flds 4(%eax) - movl ASM_VALUE(costab_mmxsse),%ebx +#if defined(PIC) && defined(__APPLE__) + movl GLOBAL_VAR_PTR(costab_mmxsse),%ebx +#else + leal GLOBAL_VAR(costab_mmxsse),%ebx +#endif fadds 120(%eax) orl %ecx,%ecx fstps 4(%edx) @@ -808,4 +815,11 @@ ASM_NAME(dct64_MMX): popl %ebx ret +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__pointers,non_lazy_symbol_pointers +L_costab_mmxsse: + .indirect_symbol ASM_NAME(costab_mmxsse) + .long 0 +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_neon.S b/deps/mpg123/src/libmpg123/dct64_neon.S index a8a3614..de8c363 100644 --- a/deps/mpg123/src/libmpg123/dct64_neon.S +++ b/deps/mpg123/src/libmpg123/dct64_neon.S @@ -8,6 +8,13 @@ #include "mangle.h" +#ifndef _M_ARM + .code 32 +#endif +#ifndef __APPLE__ + .fpu neon +#endif + .text ALIGN16 costab_arm: @@ -43,7 +50,11 @@ costab_arm: .word 1067924853 .word 1060439283 .word 1060439283 - .globl ASM_NAME(dct64_neon) + ALIGN4 + GLOBAL_SYMBOL ASM_NAME(dct64_neon) +#ifdef __ELF__ + .type ASM_NAME(dct64_neon), %function +#endif ASM_NAME(dct64_neon): vpush {q4-q7} @@ -295,3 +306,5 @@ ASM_NAME(dct64_neon): vpop {q4-q7} bx lr + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_neon64.S b/deps/mpg123/src/libmpg123/dct64_neon64.S new file mode 100644 index 0000000..32b8a0b --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_neon64.S @@ -0,0 +1,299 @@ +/* + dct64_neon64: NEON optimized dct64 for AArch64 + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +costab_neon_aarch64: + .word 1056974725 + .word 1057056395 + .word 1057223771 + .word 1057485416 + .word 1057855544 + .word 1058356026 + .word 1059019886 + .word 1059897405 + .word 1061067246 + .word 1062657950 + .word 1064892987 + .word 1066774581 + .word 1069414683 + .word 1073984175 + .word 1079645762 + .word 1092815430 + .word 1057005197 + .word 1057342072 + .word 1058087743 + .word 1059427869 + .word 1061799040 + .word 1065862217 + .word 1071413542 + .word 1084439708 + .word 1057128951 + .word 1058664893 + .word 1063675095 + .word 1076102863 + .word 1057655764 + .word 1067924853 + .word 1060439283 + .word 1060439283 + .text + ALIGN4 + .globl ASM_NAME(dct64_neon64) +#ifdef __ELF__ + .type ASM_NAME(dct64_neon64), %function +#endif +ASM_NAME(dct64_neon64): + add x3, x2, #64 + adrp x4, AARCH64_PCREL_HI(costab_neon_aarch64) + add x4, x4, AARCH64_PCREL_LO(costab_neon_aarch64) + ld1 {v0.4s, v1.4s, v2.4s, v3.4s}, [x2] + ld1 {v16.4s, v17.4s, v18.4s, v19.4s}, [x3] + ld1 {v20.4s, v21.4s, v22.4s, v23.4s}, [x4], #64 + + rev64 v19.4s, v19.4s + rev64 v18.4s, v18.4s + rev64 v17.4s, v17.4s + rev64 v16.4s, v16.4s + ext v4.16b, v19.16b, v19.16b, #8 + ext v5.16b, v18.16b, v18.16b, #8 + ext v6.16b, v17.16b, v17.16b, #8 + ext v7.16b, v16.16b, v16.16b, #8 + + fsub v16.4s, v3.4s, v7.4s + fsub v17.4s, v2.4s, v6.4s + fsub v18.4s, v1.4s, v5.4s + fsub v19.4s, v0.4s, v4.4s + fadd v0.4s, v0.4s, v4.4s /* bs[0,1,2,3] */ + fadd v1.4s, v1.4s, v5.4s /* bs[4,5,6,7] */ + fadd v2.4s, v2.4s, v6.4s /* bs[8,9,10,11] */ + fadd v3.4s, v3.4s, v7.4s /* bs[12,13,14,15] */ + fmul v16.4s, v16.4s, v23.4s /* bs[19,18,17,16] */ + fmul v17.4s, v17.4s, v22.4s /* bs[23,22,21,20] */ + fmul v18.4s, v18.4s, v21.4s /* bs[27,26,25,24] */ + fmul v19.4s, v19.4s, v20.4s /* bs[31,30,29,28] */ + + ld1 {v20.4s, v21.4s}, [x4], #32 + rev64 v22.4s, v3.4s + rev64 v23.4s, v2.4s + rev64 v24.4s, v16.4s + rev64 v25.4s, v17.4s + ext v4.16b, v22.16b, v22.16b, #8 /* bs[15,14,13,12] */ + ext v5.16b, v23.16b, v23.16b, #8 /* bs[11,10,9,8] */ + ext v6.16b, v24.16b, v24.16b, #8 /* bs[16,17,18,19] */ + ext v7.16b, v25.16b, v25.16b, #8 /* bs[20,21,22,23] */ + + fsub v26.4s, v1.4s, v5.4s + fsub v27.4s, v0.4s, v4.4s + fsub v28.4s, v18.4s, v7.4s + fsub v29.4s, v19.4s, v6.4s + fadd v4.4s, v0.4s, v4.4s /* bs[32,33,34,35] */ + fadd v5.4s, v1.4s, v5.4s /* bs[36,37,38,39] */ + fadd v6.4s, v6.4s, v19.4s /* bs[48,49,50,51] */ + fadd v7.4s, v7.4s, v18.4s /* bs[52,53,54,55] */ + fmul v26.4s, v26.4s, v21.4s /* bs[43,42,41,40] */ + fmul v27.4s, v27.4s, v20.4s /* bs[47,46,45,44] */ + fmul v28.4s, v28.4s, v21.4s /* bs[59,58,57,56] */ + fmul v29.4s, v29.4s, v20.4s /* bs[63,62,61,60] */ + + ld1 {v20.4s}, [x4], #16 + rev64 v16.4s, v5.4s + rev64 v17.4s, v26.4s + rev64 v18.4s, v7.4s + rev64 v19.4s, v28.4s + ext v0.16b, v16.16b, v16.16b, #8 /* bs[39,38,37,36] */ + ext v1.16b, v17.16b, v17.16b, #8 /* bs[40,41,42,43] */ + ext v2.16b, v18.16b, v18.16b, #8 /* bs[55,54,53,52] */ + ext v3.16b, v19.16b, v19.16b, #8 /* bs[56,57,58,59] */ + + fsub v16.4s, v4.4s, v0.4s + fsub v17.4s, v27.4s, v1.4s + fsub v18.4s, v6.4s, v2.4s + fsub v19.4s, v29.4s, v3.4s + fadd v0.4s, v4.4s, v0.4s /* bs[0,1,2,3] */ + fadd v1.4s, v1.4s, v27.4s /* bs[8,9,10,11] */ + fadd v2.4s, v6.4s, v2.4s /* bs[16,17,18,19] */ + fadd v3.4s, v3.4s, v29.4s /* bs[24,25,26,27] */ + fmul v16.4s, v16.4s, v20.4s /* bs[7,6,5,4] */ + fmul v17.4s, v17.4s, v20.4s /* bs[15,14,13,12] */ + fmul v18.4s, v18.4s, v20.4s /* bs[23,22,21,20] */ + fmul v19.4s, v19.4s, v20.4s /* bs[31,30,29,28] */ + + ld1 {v28.4s}, [x4] + zip1 v4.2d, v0.2d, v16.2d /* bs[0,1,7,6] */ + zip2 v5.2d, v0.2d, v16.2d /* bs[2,3,5,4] */ + zip1 v6.2d, v1.2d, v17.2d /* bs[8,9,15,14] */ + zip2 v7.2d, v1.2d, v17.2d /* bs[10,11,13,12] */ + zip1 v20.2d, v2.2d, v18.2d /* bs[16,17,23,22] */ + zip2 v21.2d, v2.2d, v18.2d /* bs[18,19,21,20] */ + zip1 v22.2d, v3.2d, v19.2d /* bs[24,25,31,30] */ + zip2 v23.2d, v3.2d, v19.2d /* bs[26,27,29,28] */ + rev64 v5.4s, v5.4s /* bs[3,2,4,5] */ + rev64 v7.4s, v7.4s /* bs[11,10,12,13] */ + rev64 v21.4s, v21.4s /* bs[19,18,20,21] */ + rev64 v23.4s, v23.4s /* bs[27,26,28,29] */ + AARCH64_DUP_2D(v29, v28, 0) + AARCH64_DUP_4S(v28, v28, 2) + + fsub v16.4s, v4.4s, v5.4s + fsub v17.4s, v6.4s, v7.4s + fsub v18.4s, v20.4s, v21.4s + fsub v19.4s, v22.4s, v23.4s + fadd v0.4s, v4.4s, v5.4s /* bs[32,33,36,37] */ + fadd v1.4s, v6.4s, v7.4s /* bs[40,41,44,45] */ + fadd v2.4s, v20.4s, v21.4s /* bs[48,49,52,53] */ + fadd v3.4s, v22.4s, v23.4s /* bs[56,57,60,61] */ + fmul v16.4s, v16.4s, v29.4s /* bs[35,34,39,38] */ + fmul v17.4s, v17.4s, v29.4s /* bs[43,42,47,46] */ + fmul v18.4s, v18.4s, v29.4s /* bs[51,50,55,54] */ + fmul v19.4s, v19.4s, v29.4s /* bs[59,58,63,62] */ + + uzp1 v4.4s, v0.4s, v16.4s /* bs[32,36,35,39] */ + uzp2 v5.4s, v0.4s, v16.4s /* bs[33,37,34,38] */ + uzp1 v6.4s, v1.4s, v17.4s /* bs[40,44,43,47] */ + uzp2 v7.4s, v1.4s, v17.4s /* bs[41,45,42,46] */ + uzp1 v20.4s, v2.4s, v18.4s /* bs[48,52,51,55] */ + uzp2 v21.4s, v2.4s, v18.4s /* bs[49,53,50,54] */ + uzp1 v22.4s, v3.4s, v19.4s /* bs[56,60,59,63] */ + uzp2 v23.4s, v3.4s, v19.4s /* bs[57,61,58,62] */ + + fsub v16.4s, v4.4s, v5.4s + fsub v17.4s, v6.4s, v7.4s + fsub v18.4s, v20.4s, v21.4s + fsub v19.4s, v22.4s, v23.4s + fadd v0.4s, v4.4s, v5.4s /* bs[0,4,2,6] */ + fadd v1.4s, v6.4s, v7.4s /* bs[8,12,10,14] */ + fadd v2.4s, v20.4s, v21.4s /* bs[16,20,18,22] */ + fadd v3.4s, v22.4s, v23.4s /* bs[24,28,26,30] */ + fmul v16.4s, v16.4s, v28.4s /* bs[1,5,3,7] */ + fmul v17.4s, v17.4s, v28.4s /* bs[9,13,11,15] */ + fmul v18.4s, v18.4s, v28.4s /* bs[17,21,19,23] */ + fmul v19.4s, v19.4s, v28.4s /* bs[25,29,27,31] */ + + zip2 v4.2d, v0.2d, v1.2d /* bs[2,6,10,14] */ + zip2 v5.2d, v16.2d, v17.2d /* bs[3,7,11,15] */ + zip2 v6.2d, v2.2d, v3.2d /* bs[18,22,26,30] */ + zip2 v7.2d, v18.2d, v19.2d /* bs[19,23,27,31] */ + fadd v4.4s, v4.4s, v5.4s /* bs[2,6,10,14] */ + fadd v6.4s, v6.4s, v7.4s /* bs[18,22,26,30] */ + ins v0.d[1], v4.d[0] /* bs[0,4,2,6] */ + ins v1.d[1], v4.d[1] /* bs[8,12,10,14] */ + ins v2.d[1], v6.d[0] /* bs[16,20,18,22] */ + ins v3.d[1], v6.d[1] /* bs[24,28,26,30] */ + + eor v31.16b, v31.16b, v31.16b + zip1 v4.4s, v0.4s, v16.4s /* bs[0,1,4,5] */ + zip2 v5.4s, v0.4s, v16.4s /* bs[2,3,6,7] */ + zip1 v6.4s, v1.4s, v17.4s /* bs[8,9,12,13] */ + zip2 v7.4s, v1.4s, v17.4s /* bs[10,11,14,15] */ + zip1 v20.4s, v2.4s, v18.4s /* bs[16,17,20,21] */ + zip2 v21.4s, v2.4s, v18.4s /* bs[18,19,22,23] */ + zip1 v22.4s, v3.4s, v19.4s /* bs[24,25,28,29] */ + zip2 v23.4s, v3.4s, v19.4s /* bs[26,27,30,31] */ + zip1 v0.2d, v4.2d, v5.2d /* bs[0,1,2,3] */ + zip2 v1.2d, v4.2d, v5.2d /* bs[4,5,6,7] */ + zip1 v2.2d, v6.2d, v7.2d /* bs[8,9,10,11] */ + zip2 v3.2d, v6.2d, v7.2d /* bs[12,13,14,15] */ + rev64 v16.4s, v4.4s + rev64 v17.4s, v6.4s + zip1 v24.2d, v7.2d, v17.2d + zip2 v16.2d, v5.2d, v16.2d + zip2 v17.2d, v7.2d, v17.2d + zip1 v4.2d, v20.2d, v21.2d /* bs[16,17,18,19] */ + zip2 v5.2d, v20.2d, v21.2d /* bs[20,21,22,23] */ + zip1 v6.2d, v22.2d, v23.2d /* bs[24,25,26,27] */ + zip2 v7.2d, v22.2d, v23.2d /* bs[28,29,30,31] */ + rev64 v18.4s, v20.4s + rev64 v19.4s, v22.4s + zip1 v25.2d, v23.2d, v19.2d + zip1 v26.2d, v21.2d, v18.2d + zip2 v18.2d, v21.2d, v18.2d + zip2 v19.2d, v23.2d, v19.2d + ins v16.s[3], v31.s[0] /* bs[6,7,5,-] */ + ins v17.s[3], v31.s[0] /* bs[14,15,13,-] */ + ins v18.s[3], v31.s[0] /* bs[22,23,21,-] */ + ins v19.s[3], v31.s[0] /* bs[30,31,29,-] */ + ins v24.s[3], v31.s[0] /* bs[10,11,9,-] */ + ins v25.s[3], v31.s[0] /* bs[26,27,25,-] */ + ins v26.s[3], v31.s[0] /* bs[18,19,17,-] */ + + fadd v1.4s, v1.4s, v16.4s + fadd v3.4s, v3.4s, v17.4s + fadd v5.4s, v5.4s, v18.4s + fadd v7.4s, v7.4s, v19.4s + + fadd v2.4s, v2.4s, v3.4s + fadd v3.4s, v3.4s, v24.4s + fadd v6.4s, v6.4s, v7.4s + fadd v7.4s, v7.4s, v25.4s + + fadd v4.4s, v4.4s, v6.4s + fadd v6.4s, v6.4s, v5.4s + fadd v5.4s, v5.4s, v7.4s + fadd v7.4s, v7.4s, v26.4s + + fcvtns v0.4s, v0.4s + fcvtns v1.4s, v1.4s + fcvtns v2.4s, v2.4s + fcvtns v3.4s, v3.4s + fcvtns v4.4s, v4.4s + fcvtns v5.4s, v5.4s + fcvtns v6.4s, v6.4s + fcvtns v7.4s, v7.4s + sqxtn v0.4h, v0.4s + sqxtn v1.4h, v1.4s + sqxtn v2.4h, v2.4s + sqxtn v3.4h, v3.4s + sqxtn v4.4h, v4.4s + sqxtn v5.4h, v5.4s + sqxtn v6.4h, v6.4s + sqxtn v7.4h, v7.4s + + mov x3, #32 + st1 {v0.h}[1], [x0], x3 + st1 {v7.h}[2], [x0], x3 + st1 {v3.h}[2], [x0], x3 + st1 {v5.h}[2], [x0], x3 + st1 {v1.h}[2], [x0], x3 + st1 {v6.h}[2], [x0], x3 + st1 {v2.h}[2], [x0], x3 + st1 {v4.h}[2], [x0], x3 + st1 {v0.h}[2], [x0], x3 + st1 {v7.h}[0], [x0], x3 + st1 {v3.h}[0], [x0], x3 + st1 {v5.h}[0], [x0], x3 + st1 {v1.h}[0], [x0], x3 + st1 {v6.h}[0], [x0], x3 + st1 {v2.h}[0], [x0], x3 + st1 {v4.h}[0], [x0], x3 + st1 {v0.h}[0], [x0] + st1 {v0.h}[1], [x1], x3 + st1 {v4.h}[1], [x1], x3 + st1 {v2.h}[1], [x1], x3 + st1 {v6.h}[1], [x1], x3 + st1 {v1.h}[1], [x1], x3 + st1 {v5.h}[1], [x1], x3 + st1 {v3.h}[1], [x1], x3 + st1 {v7.h}[1], [x1], x3 + st1 {v0.h}[3], [x1], x3 + st1 {v4.h}[3], [x1], x3 + st1 {v2.h}[3], [x1], x3 + st1 {v6.h}[3], [x1], x3 + st1 {v1.h}[3], [x1], x3 + st1 {v5.h}[3], [x1], x3 + st1 {v3.h}[3], [x1], x3 + st1 {v7.h}[3], [x1] + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_neon64_float.S b/deps/mpg123/src/libmpg123/dct64_neon64_float.S new file mode 100644 index 0000000..0e557e5 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dct64_neon64_float.S @@ -0,0 +1,282 @@ +/* + dct64_neon64_float: NEON optimized dct64 for AArch64 (float output version) + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +costab_neon_aarch64: + .word 1056974725 + .word 1057056395 + .word 1057223771 + .word 1057485416 + .word 1057855544 + .word 1058356026 + .word 1059019886 + .word 1059897405 + .word 1061067246 + .word 1062657950 + .word 1064892987 + .word 1066774581 + .word 1069414683 + .word 1073984175 + .word 1079645762 + .word 1092815430 + .word 1057005197 + .word 1057342072 + .word 1058087743 + .word 1059427869 + .word 1061799040 + .word 1065862217 + .word 1071413542 + .word 1084439708 + .word 1057128951 + .word 1058664893 + .word 1063675095 + .word 1076102863 + .word 1057655764 + .word 1067924853 + .word 1060439283 + .word 1060439283 + .text + ALIGN4 + .globl ASM_NAME(dct64_real_neon64) +#ifdef __ELF__ + .type ASM_NAME(dct64_real_neon64), %function +#endif +ASM_NAME(dct64_real_neon64): + add x3, x2, #64 + adrp x4, AARCH64_PCREL_HI(costab_neon_aarch64) + add x4, x4, AARCH64_PCREL_LO(costab_neon_aarch64) + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x2] + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x3] + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x4], #64 + + rev64 v19.4s, v19.4s + rev64 v18.4s, v18.4s + rev64 v17.4s, v17.4s + rev64 v16.4s, v16.4s + ext v4.16b, v19.16b, v19.16b, #8 + ext v5.16b, v18.16b, v18.16b, #8 + ext v6.16b, v17.16b, v17.16b, #8 + ext v7.16b, v16.16b, v16.16b, #8 + + fsub v16.4s, v3.4s, v7.4s + fsub v17.4s, v2.4s, v6.4s + fsub v18.4s, v1.4s, v5.4s + fsub v19.4s, v0.4s, v4.4s + fadd v0.4s, v0.4s, v4.4s /* bs[0,1,2,3] */ + fadd v1.4s, v1.4s, v5.4s /* bs[4,5,6,7] */ + fadd v2.4s, v2.4s, v6.4s /* bs[8,9,10,11] */ + fadd v3.4s, v3.4s, v7.4s /* bs[12,13,14,15] */ + fmul v16.4s, v16.4s, v23.4s /* bs[19,18,17,16] */ + fmul v17.4s, v17.4s, v22.4s /* bs[23,22,21,20] */ + fmul v18.4s, v18.4s, v21.4s /* bs[27,26,25,24] */ + fmul v19.4s, v19.4s, v20.4s /* bs[31,30,29,28] */ + + ld1 {v20.4s, v21.4s}, [x4], #32 + rev64 v22.4s, v3.4s + rev64 v23.4s, v2.4s + rev64 v24.4s, v16.4s + rev64 v25.4s, v17.4s + ext v4.16b, v22.16b, v22.16b, #8 /* bs[15,14,13,12] */ + ext v5.16b, v23.16b, v23.16b, #8 /* bs[11,10,9,8] */ + ext v6.16b, v24.16b, v24.16b, #8 /* bs[16,17,18,19] */ + ext v7.16b, v25.16b, v25.16b, #8 /* bs[20,21,22,23] */ + + fsub v26.4s, v1.4s, v5.4s + fsub v27.4s, v0.4s, v4.4s + fsub v28.4s, v18.4s, v7.4s + fsub v29.4s, v19.4s, v6.4s + fadd v4.4s, v0.4s, v4.4s /* bs[32,33,34,35] */ + fadd v5.4s, v1.4s, v5.4s /* bs[36,37,38,39] */ + fadd v6.4s, v6.4s, v19.4s /* bs[48,49,50,51] */ + fadd v7.4s, v7.4s, v18.4s /* bs[52,53,54,55] */ + fmul v26.4s, v26.4s, v21.4s /* bs[43,42,41,40] */ + fmul v27.4s, v27.4s, v20.4s /* bs[47,46,45,44] */ + fmul v28.4s, v28.4s, v21.4s /* bs[59,58,57,56] */ + fmul v29.4s, v29.4s, v20.4s /* bs[63,62,61,60] */ + + ld1 {v20.4s}, [x4], #16 + rev64 v16.4s, v5.4s + rev64 v17.4s, v26.4s + rev64 v18.4s, v7.4s + rev64 v19.4s, v28.4s + ext v0.16b, v16.16b, v16.16b, #8 /* bs[39,38,37,36] */ + ext v1.16b, v17.16b, v17.16b, #8 /* bs[40,41,42,43] */ + ext v2.16b, v18.16b, v18.16b, #8 /* bs[55,54,53,52] */ + ext v3.16b, v19.16b, v19.16b, #8 /* bs[56,57,58,59] */ + + fsub v16.4s, v4.4s, v0.4s + fsub v17.4s, v27.4s, v1.4s + fsub v18.4s, v6.4s, v2.4s + fsub v19.4s, v29.4s, v3.4s + fadd v0.4s, v4.4s, v0.4s /* bs[0,1,2,3] */ + fadd v1.4s, v1.4s, v27.4s /* bs[8,9,10,11] */ + fadd v2.4s, v6.4s, v2.4s /* bs[16,17,18,19] */ + fadd v3.4s, v3.4s, v29.4s /* bs[24,25,26,27] */ + fmul v16.4s, v16.4s, v20.4s /* bs[7,6,5,4] */ + fmul v17.4s, v17.4s, v20.4s /* bs[15,14,13,12] */ + fmul v18.4s, v18.4s, v20.4s /* bs[23,22,21,20] */ + fmul v19.4s, v19.4s, v20.4s /* bs[31,30,29,28] */ + + ld1 {v28.4s}, [x4] + zip1 v4.2d, v0.2d, v16.2d /* bs[0,1,7,6] */ + zip2 v5.2d, v0.2d, v16.2d /* bs[2,3,5,4] */ + zip1 v6.2d, v1.2d, v17.2d /* bs[8,9,15,14] */ + zip2 v7.2d, v1.2d, v17.2d /* bs[10,11,13,12] */ + zip1 v20.2d, v2.2d, v18.2d /* bs[16,17,23,22] */ + zip2 v21.2d, v2.2d, v18.2d /* bs[18,19,21,20] */ + zip1 v22.2d, v3.2d, v19.2d /* bs[24,25,31,30] */ + zip2 v23.2d, v3.2d, v19.2d /* bs[26,27,29,28] */ + rev64 v5.4s, v5.4s /* bs[3,2,4,5] */ + rev64 v7.4s, v7.4s /* bs[11,10,12,13] */ + rev64 v21.4s, v21.4s /* bs[19,18,20,21] */ + rev64 v23.4s, v23.4s /* bs[27,26,28,29] */ + AARCH64_DUP_2D(v29, v28, 0) + AARCH64_DUP_4S(v28, v28, 2) + + fsub v16.4s, v4.4s, v5.4s + fsub v17.4s, v6.4s, v7.4s + fsub v18.4s, v20.4s, v21.4s + fsub v19.4s, v22.4s, v23.4s + fadd v0.4s, v4.4s, v5.4s /* bs[32,33,36,37] */ + fadd v1.4s, v6.4s, v7.4s /* bs[40,41,44,45] */ + fadd v2.4s, v20.4s, v21.4s /* bs[48,49,52,53] */ + fadd v3.4s, v22.4s, v23.4s /* bs[56,57,60,61] */ + fmul v16.4s, v16.4s, v29.4s /* bs[35,34,39,38] */ + fmul v17.4s, v17.4s, v29.4s /* bs[43,42,47,46] */ + fmul v18.4s, v18.4s, v29.4s /* bs[51,50,55,54] */ + fmul v19.4s, v19.4s, v29.4s /* bs[59,58,63,62] */ + + uzp1 v4.4s, v0.4s, v16.4s /* bs[32,36,35,39] */ + uzp2 v5.4s, v0.4s, v16.4s /* bs[33,37,34,38] */ + uzp1 v6.4s, v1.4s, v17.4s /* bs[40,44,43,47] */ + uzp2 v7.4s, v1.4s, v17.4s /* bs[41,45,42,46] */ + uzp1 v20.4s, v2.4s, v18.4s /* bs[48,52,51,55] */ + uzp2 v21.4s, v2.4s, v18.4s /* bs[49,53,50,54] */ + uzp1 v22.4s, v3.4s, v19.4s /* bs[56,60,59,63] */ + uzp2 v23.4s, v3.4s, v19.4s /* bs[57,61,58,62] */ + + fsub v16.4s, v4.4s, v5.4s + fsub v17.4s, v6.4s, v7.4s + fsub v18.4s, v20.4s, v21.4s + fsub v19.4s, v22.4s, v23.4s + fadd v0.4s, v4.4s, v5.4s /* bs[0,4,2,6] */ + fadd v1.4s, v6.4s, v7.4s /* bs[8,12,10,14] */ + fadd v2.4s, v20.4s, v21.4s /* bs[16,20,18,22] */ + fadd v3.4s, v22.4s, v23.4s /* bs[24,28,26,30] */ + fmul v16.4s, v16.4s, v28.4s /* bs[1,5,3,7] */ + fmul v17.4s, v17.4s, v28.4s /* bs[9,13,11,15] */ + fmul v18.4s, v18.4s, v28.4s /* bs[17,21,19,23] */ + fmul v19.4s, v19.4s, v28.4s /* bs[25,29,27,31] */ + + zip2 v4.2d, v0.2d, v1.2d /* bs[2,6,10,14] */ + zip2 v5.2d, v16.2d, v17.2d /* bs[3,7,11,15] */ + zip2 v6.2d, v2.2d, v3.2d /* bs[18,22,26,30] */ + zip2 v7.2d, v18.2d, v19.2d /* bs[19,23,27,31] */ + fadd v4.4s, v4.4s, v5.4s /* bs[2,6,10,14] */ + fadd v6.4s, v6.4s, v7.4s /* bs[18,22,26,30] */ + ins v0.d[1], v4.d[0] /* bs[0,4,2,6] */ + ins v1.d[1], v4.d[1] /* bs[8,12,10,14] */ + ins v2.d[1], v6.d[0] /* bs[16,20,18,22] */ + ins v3.d[1], v6.d[1] /* bs[24,28,26,30] */ + + eor v31.16b, v31.16b, v31.16b + zip1 v4.4s, v0.4s, v16.4s /* bs[0,1,4,5] */ + zip2 v5.4s, v0.4s, v16.4s /* bs[2,3,6,7] */ + zip1 v6.4s, v1.4s, v17.4s /* bs[8,9,12,13] */ + zip2 v7.4s, v1.4s, v17.4s /* bs[10,11,14,15] */ + zip1 v20.4s, v2.4s, v18.4s /* bs[16,17,20,21] */ + zip2 v21.4s, v2.4s, v18.4s /* bs[18,19,22,23] */ + zip1 v22.4s, v3.4s, v19.4s /* bs[24,25,28,29] */ + zip2 v23.4s, v3.4s, v19.4s /* bs[26,27,30,31] */ + zip1 v0.2d, v4.2d, v5.2d /* bs[0,1,2,3] */ + zip2 v1.2d, v4.2d, v5.2d /* bs[4,5,6,7] */ + zip1 v2.2d, v6.2d, v7.2d /* bs[8,9,10,11] */ + zip2 v3.2d, v6.2d, v7.2d /* bs[12,13,14,15] */ + rev64 v16.4s, v4.4s + rev64 v17.4s, v6.4s + zip1 v24.2d, v7.2d, v17.2d + zip2 v16.2d, v5.2d, v16.2d + zip2 v17.2d, v7.2d, v17.2d + zip1 v4.2d, v20.2d, v21.2d /* bs[16,17,18,19] */ + zip2 v5.2d, v20.2d, v21.2d /* bs[20,21,22,23] */ + zip1 v6.2d, v22.2d, v23.2d /* bs[24,25,26,27] */ + zip2 v7.2d, v22.2d, v23.2d /* bs[28,29,30,31] */ + rev64 v18.4s, v20.4s + rev64 v19.4s, v22.4s + zip1 v25.2d, v23.2d, v19.2d + zip1 v26.2d, v21.2d, v18.2d + zip2 v18.2d, v21.2d, v18.2d + zip2 v19.2d, v23.2d, v19.2d + ins v16.s[3], v31.s[0] /* bs[6,7,5,-] */ + ins v17.s[3], v31.s[0] /* bs[14,15,13,-] */ + ins v18.s[3], v31.s[0] /* bs[22,23,21,-] */ + ins v19.s[3], v31.s[0] /* bs[30,31,29,-] */ + ins v24.s[3], v31.s[0] /* bs[10,11,9,-] */ + ins v25.s[3], v31.s[0] /* bs[26,27,25,-] */ + ins v26.s[3], v31.s[0] /* bs[18,19,17,-] */ + + fadd v1.4s, v1.4s, v16.4s + fadd v3.4s, v3.4s, v17.4s + fadd v5.4s, v5.4s, v18.4s + fadd v7.4s, v7.4s, v19.4s + + fadd v2.4s, v2.4s, v3.4s + fadd v3.4s, v3.4s, v24.4s + fadd v6.4s, v6.4s, v7.4s + fadd v7.4s, v7.4s, v25.4s + + fadd v4.4s, v4.4s, v6.4s + fadd v6.4s, v6.4s, v5.4s + fadd v5.4s, v5.4s, v7.4s + fadd v7.4s, v7.4s, v26.4s + + mov x3, #64 + st1 {v0.s}[1], [x0], x3 + st1 {v7.s}[2], [x0], x3 + st1 {v3.s}[2], [x0], x3 + st1 {v5.s}[2], [x0], x3 + st1 {v1.s}[2], [x0], x3 + st1 {v6.s}[2], [x0], x3 + st1 {v2.s}[2], [x0], x3 + st1 {v4.s}[2], [x0], x3 + st1 {v0.s}[2], [x0], x3 + st1 {v7.s}[0], [x0], x3 + st1 {v3.s}[0], [x0], x3 + st1 {v5.s}[0], [x0], x3 + st1 {v1.s}[0], [x0], x3 + st1 {v6.s}[0], [x0], x3 + st1 {v2.s}[0], [x0], x3 + st1 {v4.s}[0], [x0], x3 + st1 {v0.s}[0], [x0] + st1 {v0.s}[1], [x1], x3 + st1 {v4.s}[1], [x1], x3 + st1 {v2.s}[1], [x1], x3 + st1 {v6.s}[1], [x1], x3 + st1 {v1.s}[1], [x1], x3 + st1 {v5.s}[1], [x1], x3 + st1 {v3.s}[1], [x1], x3 + st1 {v7.s}[1], [x1], x3 + st1 {v0.s}[3], [x1], x3 + st1 {v4.s}[3], [x1], x3 + st1 {v2.s}[3], [x1], x3 + st1 {v6.s}[3], [x1], x3 + st1 {v1.s}[3], [x1], x3 + st1 {v5.s}[3], [x1], x3 + st1 {v3.s}[3], [x1], x3 + st1 {v7.s}[3], [x1] + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_neon_float.S b/deps/mpg123/src/libmpg123/dct64_neon_float.S index fae43aa..36d640f 100644 --- a/deps/mpg123/src/libmpg123/dct64_neon_float.S +++ b/deps/mpg123/src/libmpg123/dct64_neon_float.S @@ -8,6 +8,13 @@ #include "mangle.h" +#ifndef _M_ARM + .code 32 +#endif +#ifndef __APPLE__ + .fpu neon +#endif + .text ALIGN16 costab_arm: @@ -43,7 +50,11 @@ costab_arm: .word 1067924853 .word 1060439283 .word 1060439283 - .globl ASM_NAME(dct64_real_neon) + ALIGN4 + GLOBAL_SYMBOL ASM_NAME(dct64_real_neon) +#ifdef __ELF__ + .type ASM_NAME(dct64_real_neon), %function +#endif ASM_NAME(dct64_real_neon): vpush {q4-q7} @@ -268,3 +279,5 @@ ASM_NAME(dct64_real_neon): vpop {q4-q7} bx lr + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_sse.S b/deps/mpg123/src/libmpg123/dct64_sse.S index d9abbcd..fdcf969 100644 --- a/deps/mpg123/src/libmpg123/dct64_sse.S +++ b/deps/mpg123/src/libmpg123/dct64_sse.S @@ -44,9 +44,9 @@ ASM_NAME(dct64_sse): andl $-16, %esp /* align the stack at 16 bytes */ subl $128, %esp /* reserve space for temporal store */ pushl %ebx - - movl ARG(0), %ecx - movl ARG(1), %ebx + + GET_GOT + movl ARG(2), %eax MOVUAPS (%eax), %xmm7 @@ -77,10 +77,15 @@ ASM_NAME(dct64_sse): subps %xmm0, %xmm5 subps %xmm1, %xmm4 - mulps ASM_NAME(costab_mmxsse), %xmm7 - mulps ASM_NAME(costab_mmxsse)+16, %xmm6 - mulps ASM_NAME(costab_mmxsse)+32, %xmm5 - mulps ASM_NAME(costab_mmxsse)+48, %xmm4 +#if defined(PIC) && defined(__APPLE__) + mov GLOBAL_VAR_PTR(costab_mmxsse), %ecx +#else + lea GLOBAL_VAR(costab_mmxsse), %ecx +#endif + mulps (%ecx), %xmm7 + mulps 16(%ecx), %xmm6 + mulps 32(%ecx), %xmm5 + mulps 48(%ecx), %xmm4 shufps $0x1b, %xmm2, %xmm2 shufps $0x1b, %xmm3, %xmm3 @@ -100,10 +105,10 @@ ASM_NAME(dct64_sse): subps %xmm4, %xmm7 addps %xmm3, %xmm4 addps %xmm2, %xmm5 - mulps ASM_NAME(costab_mmxsse)+64, %xmm0 - mulps ASM_NAME(costab_mmxsse)+80, %xmm1 - mulps ASM_NAME(costab_mmxsse)+80, %xmm6 - mulps ASM_NAME(costab_mmxsse)+64, %xmm7 + mulps 64(%ecx), %xmm0 + mulps 80(%ecx), %xmm1 + mulps 80(%ecx), %xmm6 + mulps 64(%ecx), %xmm7 movaps TEMP(0), %xmm2 movaps TEMP(1), %xmm3 @@ -125,10 +130,10 @@ ASM_NAME(dct64_sse): subps %xmm6, %xmm7 addps %xmm1, %xmm4 addps %xmm3, %xmm6 - mulps ASM_NAME(costab_mmxsse)+96, %xmm2 - mulps ASM_NAME(costab_mmxsse)+96, %xmm0 - mulps ASM_NAME(costab_mmxsse)+96, %xmm5 - mulps ASM_NAME(costab_mmxsse)+96, %xmm7 + mulps 96(%ecx), %xmm2 + mulps 96(%ecx), %xmm0 + mulps 96(%ecx), %xmm5 + mulps 96(%ecx), %xmm7 movaps %xmm2, TEMP(1) movaps %xmm0, TEMP(3) @@ -144,7 +149,7 @@ ASM_NAME(dct64_sse): subps %xmm5, %xmm3 addps %xmm6, %xmm4 addps %xmm7, %xmm5 - movaps ASM_NAME(costab_mmxsse)+112, %xmm0 + movaps 112(%ecx), %xmm0 movlhps %xmm0, %xmm0 mulps %xmm0, %xmm2 mulps %xmm0, %xmm3 @@ -186,9 +191,9 @@ ASM_NAME(dct64_sse): movaps %xmm5, TEMP(2) movaps %xmm7, TEMP(3) - movss ASM_NAME(costab_mmxsse)+120, %xmm5 + movss 120(%ecx), %xmm5 shufps $0x00, %xmm5, %xmm5 - xorps pnpn, %xmm5 + xorps LOCAL_VAR(pnpn), %xmm5 movaps %xmm4, %xmm0 movaps %xmm6, %xmm1 @@ -294,10 +299,11 @@ ASM_NAME(dct64_sse): shufps $0x1e, %xmm2, %xmm2 shufps $0x1e, %xmm4, %xmm4 shufps $0x1e, %xmm6, %xmm6 - andps mask, %xmm0 - andps mask, %xmm2 - andps mask, %xmm4 - andps mask, %xmm6 + leal LOCAL_VAR(mask), %ecx + andps (%ecx), %xmm0 + andps (%ecx), %xmm2 + andps (%ecx), %xmm4 + andps (%ecx), %xmm6 addps %xmm0, %xmm1 addps %xmm2, %xmm3 addps %xmm4, %xmm5 @@ -309,8 +315,8 @@ ASM_NAME(dct64_sse): movaps %xmm6, %xmm4 shufps $0x1e, %xmm0, %xmm0 shufps $0x1e, %xmm4, %xmm4 - andps mask, %xmm0 - andps mask, %xmm4 + andps (%ecx), %xmm0 + andps (%ecx), %xmm4 addps %xmm3, %xmm2 addps %xmm0, %xmm3 addps %xmm7, %xmm6 @@ -337,6 +343,10 @@ ASM_NAME(dct64_sse): packssdw %mm4, %mm2 packssdw %mm5, %mm3 + mov %ecx, TEMP_BYTE(0) + movl ARG(0), %ecx + movl ARG(1), %ebx + movd %mm0, %eax movd %mm1, %edx movw %ax, 512(%ecx) @@ -378,10 +388,11 @@ ASM_NAME(dct64_sse): movw %ax, 320(%ebx) movw %dx, 448(%ebx) + mov TEMP_BYTE(0), %eax movaps %xmm4, %xmm0 shufps $0x1e, %xmm0, %xmm0 movaps %xmm5, %xmm1 - andps mask, %xmm0 + andps (%eax), %xmm0 addps %xmm6, %xmm4 addps %xmm7, %xmm5 @@ -445,10 +456,17 @@ ASM_NAME(dct64_sse): shrl $16, %edx movw %ax, 416(%ebx) movw %dx, 480(%ebx) - + popl %ebx movl %ebp, %esp popl %ebp ret +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__pointers,non_lazy_symbol_pointers +L_costab_mmxsse: + .indirect_symbol ASM_NAME(costab_mmxsse) + .long 0 +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_sse_float.S b/deps/mpg123/src/libmpg123/dct64_sse_float.S index 40a06bf..3e658e3 100644 --- a/deps/mpg123/src/libmpg123/dct64_sse_float.S +++ b/deps/mpg123/src/libmpg123/dct64_sse_float.S @@ -44,9 +44,9 @@ ASM_NAME(dct64_real_sse): andl $-16, %esp /* align the stack at 16 bytes */ subl $128, %esp /* reserve space for temporal store */ pushl %ebx + + GET_GOT - movl ARG(0), %ecx - movl ARG(1), %ebx movl ARG(2), %eax MOVUAPS (%eax), %xmm7 @@ -77,10 +77,15 @@ ASM_NAME(dct64_real_sse): subps %xmm0, %xmm5 subps %xmm1, %xmm4 - mulps ASM_NAME(costab_mmxsse), %xmm7 - mulps ASM_NAME(costab_mmxsse)+16, %xmm6 - mulps ASM_NAME(costab_mmxsse)+32, %xmm5 - mulps ASM_NAME(costab_mmxsse)+48, %xmm4 +#if defined(PIC) && defined(__APPLE__) + mov GLOBAL_VAR_PTR(costab_mmxsse), %eax +#else + lea GLOBAL_VAR(costab_mmxsse), %eax +#endif + mulps (%eax), %xmm7 + mulps 16(%eax), %xmm6 + mulps 32(%eax), %xmm5 + mulps 48(%eax), %xmm4 shufps $0x1b, %xmm2, %xmm2 shufps $0x1b, %xmm3, %xmm3 @@ -100,10 +105,10 @@ ASM_NAME(dct64_real_sse): subps %xmm4, %xmm7 addps %xmm3, %xmm4 addps %xmm2, %xmm5 - mulps ASM_NAME(costab_mmxsse)+64, %xmm0 - mulps ASM_NAME(costab_mmxsse)+80, %xmm1 - mulps ASM_NAME(costab_mmxsse)+80, %xmm6 - mulps ASM_NAME(costab_mmxsse)+64, %xmm7 + mulps 64(%eax), %xmm0 + mulps 80(%eax), %xmm1 + mulps 80(%eax), %xmm6 + mulps 64(%eax), %xmm7 movaps TEMP(0), %xmm2 movaps TEMP(1), %xmm3 @@ -125,10 +130,10 @@ ASM_NAME(dct64_real_sse): subps %xmm6, %xmm7 addps %xmm1, %xmm4 addps %xmm3, %xmm6 - mulps ASM_NAME(costab_mmxsse)+96, %xmm2 - mulps ASM_NAME(costab_mmxsse)+96, %xmm0 - mulps ASM_NAME(costab_mmxsse)+96, %xmm5 - mulps ASM_NAME(costab_mmxsse)+96, %xmm7 + mulps 96(%eax), %xmm2 + mulps 96(%eax), %xmm0 + mulps 96(%eax), %xmm5 + mulps 96(%eax), %xmm7 movaps %xmm2, TEMP(1) movaps %xmm0, TEMP(3) @@ -144,7 +149,7 @@ ASM_NAME(dct64_real_sse): subps %xmm5, %xmm3 addps %xmm6, %xmm4 addps %xmm7, %xmm5 - movaps ASM_NAME(costab_mmxsse)+112, %xmm0 + movaps 112(%eax), %xmm0 movlhps %xmm0, %xmm0 mulps %xmm0, %xmm2 mulps %xmm0, %xmm3 @@ -186,9 +191,9 @@ ASM_NAME(dct64_real_sse): movaps %xmm5, TEMP(2) movaps %xmm7, TEMP(3) - movss ASM_NAME(costab_mmxsse)+120, %xmm5 + movss 120(%eax), %xmm5 shufps $0x00, %xmm5, %xmm5 - xorps pnpn, %xmm5 + xorps LOCAL_VAR(pnpn), %xmm5 movaps %xmm4, %xmm0 movaps %xmm6, %xmm1 @@ -294,10 +299,11 @@ ASM_NAME(dct64_real_sse): shufps $0x1e, %xmm2, %xmm2 shufps $0x1e, %xmm4, %xmm4 shufps $0x1e, %xmm6, %xmm6 - andps mask, %xmm0 - andps mask, %xmm2 - andps mask, %xmm4 - andps mask, %xmm6 + lea LOCAL_VAR(mask), %eax + andps (%eax), %xmm0 + andps (%eax), %xmm2 + andps (%eax), %xmm4 + andps (%eax), %xmm6 addps %xmm0, %xmm1 addps %xmm2, %xmm3 addps %xmm4, %xmm5 @@ -309,8 +315,8 @@ ASM_NAME(dct64_real_sse): movaps %xmm6, %xmm4 shufps $0x1e, %xmm0, %xmm0 shufps $0x1e, %xmm4, %xmm4 - andps mask, %xmm0 - andps mask, %xmm4 + andps (%eax), %xmm0 + andps (%eax), %xmm4 addps %xmm3, %xmm2 addps %xmm0, %xmm3 addps %xmm7, %xmm6 @@ -319,6 +325,9 @@ ASM_NAME(dct64_real_sse): movaps TEMP_BYTE(0), %xmm0 movaps TEMP_BYTE(64), %xmm4 + movl ARG(0), %ecx + movl ARG(1), %ebx + movss %xmm0, 1024(%ecx) movss %xmm2, 896(%ecx) movss %xmm1, 768(%ecx) @@ -355,7 +364,7 @@ ASM_NAME(dct64_real_sse): movaps %xmm4, %xmm0 shufps $0x1e, %xmm0, %xmm0 movaps %xmm5, %xmm1 - andps mask, %xmm0 + andps (%eax), %xmm0 addps %xmm6, %xmm4 addps %xmm7, %xmm5 @@ -398,4 +407,11 @@ ASM_NAME(dct64_real_sse): popl %ebp ret +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__pointers,non_lazy_symbol_pointers +L_costab_mmxsse: + .indirect_symbol ASM_NAME(costab_mmxsse) + .long 0 +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/dct64_x86_64.S b/deps/mpg123/src/libmpg123/dct64_x86_64.S index 0144039..9d85862 100644 --- a/deps/mpg123/src/libmpg123/dct64_x86_64.S +++ b/deps/mpg123/src/libmpg123/dct64_x86_64.S @@ -8,7 +8,7 @@ #include "mangle.h" -#ifdef _WIN64 +#ifdef IS_MSABI /* short *out0 */ #define ARG0 %r9 /* short *out1 */ @@ -71,7 +71,7 @@ ASM_NAME(costab_x86_64): ALIGN16 .globl ASM_NAME(dct64_x86_64) ASM_NAME(dct64_x86_64): -#ifdef _WIN64 /* should save xmm6-15 */ +#ifdef IS_MSABI /* should save xmm6-15 */ movq %rcx, ARG0 subq $168, %rsp /* stack alignment + 10 xmm registers */ movaps %xmm6, (%rsp) @@ -446,7 +446,7 @@ ASM_NAME(dct64_x86_64): movw %ax, 416(ARG1) movw %cx, 480(ARG1) -#ifdef _WIN64 +#ifdef IS_MSABI movaps (%rsp), %xmm6 movaps 16(%rsp), %xmm7 movaps 32(%rsp), %xmm8 diff --git a/deps/mpg123/src/libmpg123/dct64_x86_64_float.S b/deps/mpg123/src/libmpg123/dct64_x86_64_float.S index 168a321..5197e4c 100644 --- a/deps/mpg123/src/libmpg123/dct64_x86_64_float.S +++ b/deps/mpg123/src/libmpg123/dct64_x86_64_float.S @@ -8,7 +8,7 @@ #include "mangle.h" -#ifdef _WIN64 +#ifdef IS_MSABI /* short *out0 */ #define ARG0 %r9 /* short *out1 */ @@ -71,7 +71,7 @@ ASM_NAME(costab_x86_64): ALIGN16 .globl ASM_NAME(dct64_real_x86_64) ASM_NAME(dct64_real_x86_64): -#ifdef _WIN64 /* should save xmm6-15 */ +#ifdef IS_MSABI /* should save xmm6-15 */ movq %rcx, ARG0 subq $168, %rsp /* stack alignment + 10 xmm registers */ movaps %xmm6, (%rsp) @@ -408,7 +408,7 @@ ASM_NAME(dct64_real_x86_64): movss %xmm2, 832(ARG1) movss %xmm3, 960(ARG1) -#ifdef _WIN64 +#ifdef IS_MSABI movaps (%rsp), %xmm6 movaps 16(%rsp), %xmm7 movaps 32(%rsp), %xmm8 diff --git a/deps/mpg123/src/libmpg123/debug.h b/deps/mpg123/src/libmpg123/debug.h index 32d471c..0d3cf70 100644 --- a/deps/mpg123/src/libmpg123/debug.h +++ b/deps/mpg123/src/libmpg123/debug.h @@ -22,24 +22,31 @@ It's cumbersome to have them all with different names, though... */ +#ifdef ME +#define DBGPRFX ME": " +#else +#define DBGPRFX "" +#endif + #ifdef DEBUG + #include -#define debug(s) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__) -#define debug1(s, a) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a) -#define debug2(s, a, b) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b) -#define debug3(s, a, b, c) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c) -#define debug4(s, a, b, c, d) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d) -#define debug5(s, a, b, c, d, e) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e) -#define debug6(s, a, b, c, d, e, f) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f) -#define debug7(s, a, b, c, d, e, f, g) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g) -#define debug8(s, a, b, c, d, e, f, g, h) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h) -#define debug9(s, a, b, c, d, e, f, g, h, i) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i) -#define debug10(s, a, b, c, d, e, f, g, h, i, j) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j) -#define debug11(s, a, b, c, d, e, f, g, h, i, j, k) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k) -#define debug12(s, a, b, c, d, e, f, g, h, i, j, k, l) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l) -#define debug13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m) -#define debug14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) -#define debug15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) fprintf(stderr, "[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) +#define debug(s) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__) +#define debug1(s, a) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a) +#define debug2(s, a, b) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b) +#define debug3(s, a, b, c) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c) +#define debug4(s, a, b, c, d) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d) +#define debug5(s, a, b, c, d, e) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e) +#define debug6(s, a, b, c, d, e, f) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f) +#define debug7(s, a, b, c, d, e, f, g) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g) +#define debug8(s, a, b, c, d, e, f, g, h) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h) +#define debug9(s, a, b, c, d, e, f, g, h, i) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i) +#define debug10(s, a, b, c, d, e, f, g, h, i, j) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j) +#define debug11(s, a, b, c, d, e, f, g, h, i, j, k) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k) +#define debug12(s, a, b, c, d, e, f, g, h, i, j, k, l) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l) +#define debug13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m) +#define debug14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) +#define debug15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] debug: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #else #define debug(s) #define debug1(s, a) @@ -61,22 +68,22 @@ /* warning macros also here... */ #ifndef NO_WARNING -#define warning(s) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__) -#define warning1(s, a) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a) -#define warning2(s, a, b) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b) -#define warning3(s, a, b, c) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c) -#define warning4(s, a, b, c, d) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d) -#define warning5(s, a, b, c, d, e) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e) -#define warning6(s, a, b, c, d, e, f) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f) -#define warning7(s, a, b, c, d, e, f, g) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g) -#define warning8(s, a, b, c, d, e, f, g, h) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h) -#define warning9(s, a, b, c, d, e, f, g, h, i) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i) -#define warning10(s, a, b, c, d, e, f, g, h, i, j) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j) -#define warning11(s, a, b, c, d, e, f, g, h, i, j, k) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k) -#define warning12(s, a, b, c, d, e, f, g, h, i, j, k, l) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l) -#define warning13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m) -#define warning14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) -#define warning15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) fprintf(stderr, "[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) +#define warning(s) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__) +#define warning1(s, a) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a) +#define warning2(s, a, b) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b) +#define warning3(s, a, b, c) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c) +#define warning4(s, a, b, c, d) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d) +#define warning5(s, a, b, c, d, e) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e) +#define warning6(s, a, b, c, d, e, f) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f) +#define warning7(s, a, b, c, d, e, f, g) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g) +#define warning8(s, a, b, c, d, e, f, g, h) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h) +#define warning9(s, a, b, c, d, e, f, g, h, i) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i) +#define warning10(s, a, b, c, d, e, f, g, h, i, j) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j) +#define warning11(s, a, b, c, d, e, f, g, h, i, j, k) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k) +#define warning12(s, a, b, c, d, e, f, g, h, i, j, k, l) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l) +#define warning13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m) +#define warning14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) +#define warning15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] warning: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #else #define warning(s) #define warning1(s, a) @@ -97,23 +104,23 @@ #endif /* error macros also here... */ -#ifndef NO_ERRORMSG -#define error(s) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__) -#define error1(s, a) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a) -#define error2(s, a, b) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b) -#define error3(s, a, b, c) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c) -#define error4(s, a, b, c, d) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d) -#define error5(s, a, b, c, d, e) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e) -#define error6(s, a, b, c, d, e, f) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f) -#define error7(s, a, b, c, d, e, f, g) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g) -#define error8(s, a, b, c, d, e, f, g, h) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h) -#define error9(s, a, b, c, d, e, f, g, h, i) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i) -#define error10(s, a, b, c, d, e, f, g, h, i, j) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j) -#define error11(s, a, b, c, d, e, f, g, h, i, j, k) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k) -#define error12(s, a, b, c, d, e, f, g, h, i, j, k, l) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l) -#define error13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m) -#define error14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) -#define error15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) fprintf(stderr, "[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) +#ifndef NO_ERROR +#define error(s) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__) +#define error1(s, a) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a) +#define error2(s, a, b) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b) +#define error3(s, a, b, c) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c) +#define error4(s, a, b, c, d) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d) +#define error5(s, a, b, c, d, e) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e) +#define error6(s, a, b, c, d, e, f) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f) +#define error7(s, a, b, c, d, e, f, g) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g) +#define error8(s, a, b, c, d, e, f, g, h) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h) +#define error9(s, a, b, c, d, e, f, g, h, i) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i) +#define error10(s, a, b, c, d, e, f, g, h, i, j) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j) +#define error11(s, a, b, c, d, e, f, g, h, i, j, k) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k) +#define error12(s, a, b, c, d, e, f, g, h, i, j, k, l) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l) +#define error13(s, a, b, c, d, e, f, g, h, i, j, k, l, m) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m) +#define error14(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n) +#define error15(s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] error: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #else #define error(s) #define error1(s, a) @@ -135,22 +142,22 @@ /* ereturn macros also here... */ #ifndef NO_ERETURN -#define ereturn(rv, s) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__); return rv; }while(0) -#define ereturn1(rv, s, a) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a); return rv; }while(0) -#define ereturn2(rv, s, a, b) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b); return rv; }while(0) -#define ereturn3(rv, s, a, b, c) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c); return rv; }while(0) -#define ereturn4(rv, s, a, b, c, d) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d); return rv; }while(0) -#define ereturn5(rv, s, a, b, c, d, e) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e); return rv; }while(0) -#define ereturn6(rv, s, a, b, c, d, e, f) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f); return rv; }while(0) -#define ereturn7(rv, s, a, b, c, d, e, f, g) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g); return rv; }while(0) -#define ereturn8(rv, s, a, b, c, d, e, f, g, h) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h); return rv; }while(0) -#define ereturn9(rv, s, a, b, c, d, e, f, g, h, i) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i); return rv; }while(0) -#define ereturn10(rv, s, a, b, c, d, e, f, g, h, i, j) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j); return rv; }while(0) -#define ereturn11(rv, s, a, b, c, d, e, f, g, h, i, j, k) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k); return rv; }while(0) -#define ereturn12(rv, s, a, b, c, d, e, f, g, h, i, j, k, l) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l); return rv; }while(0) -#define ereturn13(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m); return rv; }while(0) -#define ereturn14(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n); return rv; }while(0) -#define ereturn15(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) do{ fprintf(stderr, "[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); return rv; }while(0) +#define ereturn(rv, s) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__); return rv; }while(0) +#define ereturn1(rv, s, a) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a); return rv; }while(0) +#define ereturn2(rv, s, a, b) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b); return rv; }while(0) +#define ereturn3(rv, s, a, b, c) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c); return rv; }while(0) +#define ereturn4(rv, s, a, b, c, d) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d); return rv; }while(0) +#define ereturn5(rv, s, a, b, c, d, e) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e); return rv; }while(0) +#define ereturn6(rv, s, a, b, c, d, e, f) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f); return rv; }while(0) +#define ereturn7(rv, s, a, b, c, d, e, f, g) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g); return rv; }while(0) +#define ereturn8(rv, s, a, b, c, d, e, f, g, h) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h); return rv; }while(0) +#define ereturn9(rv, s, a, b, c, d, e, f, g, h, i) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i); return rv; }while(0) +#define ereturn10(rv, s, a, b, c, d, e, f, g, h, i, j) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j); return rv; }while(0) +#define ereturn11(rv, s, a, b, c, d, e, f, g, h, i, j, k) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k); return rv; }while(0) +#define ereturn12(rv, s, a, b, c, d, e, f, g, h, i, j, k, l) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l); return rv; }while(0) +#define ereturn13(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m); return rv; }while(0) +#define ereturn14(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m, n) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n); return rv; }while(0) +#define ereturn15(rv, s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) do{ fprintf(stderr, DBGPRFX"[" __FILE__ ":%i] ereturn: " s "\n", __LINE__, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); return rv; }while(0) #else #define ereturn(rv, s) return rv #define ereturn1(rv, s, a) return rv diff --git a/deps/mpg123/src/libmpg123/decode.h b/deps/mpg123/src/libmpg123/decode.h index e2f167e..9ad9a69 100644 --- a/deps/mpg123/src/libmpg123/decode.h +++ b/deps/mpg123/src/libmpg123/decode.h @@ -53,9 +53,13 @@ int synth_1to1_altivec (real*, int, mpg123_handle*, int); int synth_1to1_stereo_altivec(real*, real*, mpg123_handle*); int synth_1to1_x86_64 (real*, int, mpg123_handle*, int); int synth_1to1_stereo_x86_64(real*, real*, mpg123_handle*); +int synth_1to1_avx (real*, int, mpg123_handle*, int); +int synth_1to1_stereo_avx (real*, real*, mpg123_handle*); int synth_1to1_arm (real*, int, mpg123_handle*, int); int synth_1to1_neon (real*, int, mpg123_handle*, int); int synth_1to1_stereo_neon(real*, real*, mpg123_handle*); +int synth_1to1_neon64 (real*, int, mpg123_handle*, int); +int synth_1to1_stereo_neon64(real*, real*, mpg123_handle*); /* This is different, special usage in layer3.c only. Hence, the name... and now forget about it. Never use it outside that special portion of code inside layer3.c! */ @@ -126,10 +130,14 @@ int synth_1to1_real_sse (real*, int, mpg123_handle*, int); int synth_1to1_real_stereo_sse (real*, real*, mpg123_handle*); int synth_1to1_real_x86_64 (real*, int, mpg123_handle*, int); int synth_1to1_real_stereo_x86_64(real*, real*, mpg123_handle*); +int synth_1to1_real_avx (real*, int, mpg123_handle*, int); +int synth_1to1_fltst_avx (real*, real*, mpg123_handle*); int synth_1to1_real_altivec (real*, int, mpg123_handle*, int); -int synth_1to1_real_stereo_altivec(real*, real*, mpg123_handle*); +int synth_1to1_fltst_altivec(real*, real*, mpg123_handle*); int synth_1to1_real_neon (real*, int, mpg123_handle*, int); int synth_1to1_real_stereo_neon(real*, real*, mpg123_handle*); +int synth_1to1_real_neon64 (real*, int, mpg123_handle*, int); +int synth_1to1_fltst_neon64(real*, real*, mpg123_handle*); int synth_1to1_real_mono (real*, mpg123_handle*); int synth_1to1_real_m2s(real*, mpg123_handle*); #ifndef NO_DOWNSAMPLE @@ -157,10 +165,14 @@ int synth_1to1_s32_sse (real*, int, mpg123_handle*, int); int synth_1to1_s32_stereo_sse (real*, real*, mpg123_handle*); int synth_1to1_s32_x86_64 (real*, int, mpg123_handle*, int); int synth_1to1_s32_stereo_x86_64(real*, real*, mpg123_handle*); +int synth_1to1_s32_avx (real*, int, mpg123_handle*, int); +int synth_1to1_s32_stereo_avx (real*, real*, mpg123_handle*); int synth_1to1_s32_altivec (real*, int, mpg123_handle*, int); int synth_1to1_s32_stereo_altivec(real*, real*, mpg123_handle*); int synth_1to1_s32_neon (real*, int, mpg123_handle*, int); int synth_1to1_s32_stereo_neon(real*, real*, mpg123_handle*); +int synth_1to1_s32_neon64 (real*, int, mpg123_handle*, int); +int synth_1to1_s32st_neon64(real*, real*, mpg123_handle*); int synth_1to1_s32_mono (real*, mpg123_handle*); int synth_1to1_s32_m2s(real*, mpg123_handle*); #ifndef NO_DOWNSAMPLE @@ -195,6 +207,11 @@ void dct64_i486(int*, int* , real*); /* Yeah, of no use outside of synth_i486.c void dct36 (real *,real *,real *,real *,real *); void dct36_3dnow (real *,real *,real *,real *,real *); void dct36_3dnowext(real *,real *,real *,real *,real *); +void dct36_x86_64 (real *,real *,real *,real *,real *); +void dct36_sse (real *,real *,real *,real *,real *); +void dct36_avx (real *,real *,real *,real *,real *); +void dct36_neon (real *,real *,real *,real *,real *); +void dct36_neon64 (real *,real *,real *,real *,real *); /* Tools for NtoM resampling synth, defined in ntom.c . */ int synth_ntom_set_step(mpg123_handle *fr); /* prepare ntom decoding */ diff --git a/deps/mpg123/src/libmpg123/dither.c b/deps/mpg123/src/libmpg123/dither.c index 30dbdd1..8bf4400 100644 --- a/deps/mpg123/src/libmpg123/dither.c +++ b/deps/mpg123/src/libmpg123/dither.c @@ -1,119 +1,3 @@ -/* - dither: Generate shaped noise for dithering - - copyright 2009 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Taihei Monma -*/ - -#include "config.h" -#include "compat.h" -#include "dither.h" - -static const uint32_t init_seed = 2463534242UL; - -#define LAP 100 - -/* - xorshift random number generator, with output scaling to [-0.5, 0.5] - This is the white noise... - See http://www.jstatsoft.org/v08/i14/paper on XOR shift random number generators. -*/ -static float rand_xorshift32(uint32_t *seed) -{ - union - { - uint32_t i; - float f; - } fi; - - fi.i = *seed; - fi.i ^= (fi.i<<13); - fi.i ^= (fi.i>>17); - fi.i ^= (fi.i<<5); - *seed = fi.i; - - /* scale the number to [-0.5, 0.5] */ -#ifdef IEEE_FLOAT - fi.i = (fi.i>>9)|0x3f800000; - fi.f -= 1.5f; -#else - fi.f = (double)fi.i / 4294967295.0; - fi.f -= 0.5f; -#endif - return fi.f; -} - -static void white_noise(float *table, size_t count) -{ - size_t i; - uint32_t seed = init_seed; - - for(i=0; i 2*LAP ? LAP : count/2; - - float input_noise; - float xv[9], yv[9]; - - for(i=0;i<9;i++) - { - xv[i] = yv[i] = 0.0f; - } - - for(i=0;i=lap) table[i-lap] = yv[8] * 3.0f; - } -} - -void mpg123_noise(float* table, size_t count, enum mpg123_noise_type noisetype) -{ - switch(noisetype) - { - case mpg123_white_noise: white_noise(table, count); break; - case mpg123_tpdf_noise: tpdf_noise(table, count); break; - case mpg123_highpass_tpdf_noise: - highpass_tpdf_noise(table, count); - break; - } -} - -/* Generate white noise and shape it with a high pass filter. */ -void dither_table_init(float *dithertable) -{ - highpass_tpdf_noise(dithertable, DITHERSIZE); -} +/* Hack to allow building the same code with and without libtool. */ +// #include "intsym.h" +#include "dither_impl.h" diff --git a/deps/mpg123/src/libmpg123/dither_impl.h b/deps/mpg123/src/libmpg123/dither_impl.h new file mode 100644 index 0000000..30dbdd1 --- /dev/null +++ b/deps/mpg123/src/libmpg123/dither_impl.h @@ -0,0 +1,119 @@ +/* + dither: Generate shaped noise for dithering + + copyright 2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "config.h" +#include "compat.h" +#include "dither.h" + +static const uint32_t init_seed = 2463534242UL; + +#define LAP 100 + +/* + xorshift random number generator, with output scaling to [-0.5, 0.5] + This is the white noise... + See http://www.jstatsoft.org/v08/i14/paper on XOR shift random number generators. +*/ +static float rand_xorshift32(uint32_t *seed) +{ + union + { + uint32_t i; + float f; + } fi; + + fi.i = *seed; + fi.i ^= (fi.i<<13); + fi.i ^= (fi.i>>17); + fi.i ^= (fi.i<<5); + *seed = fi.i; + + /* scale the number to [-0.5, 0.5] */ +#ifdef IEEE_FLOAT + fi.i = (fi.i>>9)|0x3f800000; + fi.f -= 1.5f; +#else + fi.f = (double)fi.i / 4294967295.0; + fi.f -= 0.5f; +#endif + return fi.f; +} + +static void white_noise(float *table, size_t count) +{ + size_t i; + uint32_t seed = init_seed; + + for(i=0; i 2*LAP ? LAP : count/2; + + float input_noise; + float xv[9], yv[9]; + + for(i=0;i<9;i++) + { + xv[i] = yv[i] = 0.0f; + } + + for(i=0;i=lap) table[i-lap] = yv[8] * 3.0f; + } +} + +void mpg123_noise(float* table, size_t count, enum mpg123_noise_type noisetype) +{ + switch(noisetype) + { + case mpg123_white_noise: white_noise(table, count); break; + case mpg123_tpdf_noise: tpdf_noise(table, count); break; + case mpg123_highpass_tpdf_noise: + highpass_tpdf_noise(table, count); + break; + } +} + +/* Generate white noise and shape it with a high pass filter. */ +void dither_table_init(float *dithertable) +{ + highpass_tpdf_noise(dithertable, DITHERSIZE); +} diff --git a/deps/mpg123/src/libmpg123/feature.c b/deps/mpg123/src/libmpg123/feature.c index 1972388..03ec676 100644 --- a/deps/mpg123/src/libmpg123/feature.c +++ b/deps/mpg123/src/libmpg123/feature.c @@ -100,6 +100,12 @@ int mpg123_feature(const enum mpg123_feature_set key) #else return 0; #endif + case MPG123_FEATURE_EQUALIZER: +#ifndef NO_EQUALIZER + return 1; +#else + return 0; +#endif default: return 0; } diff --git a/deps/mpg123/src/libmpg123/fmt123.h b/deps/mpg123/src/libmpg123/fmt123.h new file mode 100644 index 0000000..cc30a06 --- /dev/null +++ b/deps/mpg123/src/libmpg123/fmt123.h @@ -0,0 +1,135 @@ +/* + libmpg123: MPEG Audio Decoder library + + separate header just for audio format definitions not tied to + library code + + copyright 1995-2015 by the mpg123 project + free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org +*/ + +#ifndef MPG123_ENC_H +#define MPG123_ENC_H + +/** \file fmt123.h Audio format definitions. */ + +/** \defgroup mpg123_enc mpg123 PCM sample encodings + * These are definitions for audio formats used by libmpg123 and + * libout123. + * + * @{ + */ + +/** An enum over all sample types possibly known to mpg123. + * The values are designed as bit flags to allow bitmasking for encoding + * families. + * This is also why the enum is not used as type for actual encoding variables, + * plain integers (at least 16 bit, 15 bit being used) cover the possible + * combinations of these flags. + * + * Note that (your build of) libmpg123 does not necessarily support all these. + * Usually, you can expect the 8bit encodings and signed 16 bit. + * Also 32bit float will be usual beginning with mpg123-1.7.0 . + * What you should bear in mind is that (SSE, etc) optimized routines may be + * absent for some formats. We do have SSE for 16, 32 bit and float, though. + * 24 bit integer is done via postprocessing of 32 bit output -- just cutting + * the last byte, no rounding, even. If you want better, do it yourself. + * + * All formats are in native byte order. If you need different endinaness, you + * can simply postprocess the output buffers (libmpg123 wouldn't do anything + * else). The macro MPG123_SAMPLESIZE() can be helpful there. + */ +enum mpg123_enc_enum +{ +/* 0000 0000 0000 1111 Some 8 bit integer encoding. */ + MPG123_ENC_8 = 0x00f +/* 0000 0000 0100 0000 Some 16 bit integer encoding. */ +, MPG123_ENC_16 = 0x040 +/* 0100 0000 0000 0000 Some 24 bit integer encoding. */ +, MPG123_ENC_24 = 0x4000 +/* 0000 0001 0000 0000 Some 32 bit integer encoding. */ +, MPG123_ENC_32 = 0x100 +/* 0000 0000 1000 0000 Some signed integer encoding. */ +, MPG123_ENC_SIGNED = 0x080 +/* 0000 1110 0000 0000 Some float encoding. */ +, MPG123_ENC_FLOAT = 0xe00 +/* 0000 0000 1101 0000 signed 16 bit */ +, MPG123_ENC_SIGNED_16 = (MPG123_ENC_16|MPG123_ENC_SIGNED|0x10) +/* 0000 0000 0110 0000 unsigned 16 bit */ +, MPG123_ENC_UNSIGNED_16 = (MPG123_ENC_16|0x20) +/* 0000 0000 0000 0001 unsigned 8 bit */ +, MPG123_ENC_UNSIGNED_8 = 0x01 +/* 0000 0000 1000 0010 signed 8 bit */ +, MPG123_ENC_SIGNED_8 = (MPG123_ENC_SIGNED|0x02) +/* 0000 0000 0000 0100 ulaw 8 bit */ +, MPG123_ENC_ULAW_8 = 0x04 +/* 0000 0000 0000 1000 alaw 8 bit */ +, MPG123_ENC_ALAW_8 = 0x08 +/* 0001 0001 1000 0000 signed 32 bit */ +, MPG123_ENC_SIGNED_32 = MPG123_ENC_32|MPG123_ENC_SIGNED|0x1000 +/* 0010 0001 0000 0000 unsigned 32 bit */ +, MPG123_ENC_UNSIGNED_32 = MPG123_ENC_32|0x2000 +/* 0101 0000 1000 0000 signed 24 bit */ +, MPG123_ENC_SIGNED_24 = MPG123_ENC_24|MPG123_ENC_SIGNED|0x1000 +/* 0110 0000 0000 0000 unsigned 24 bit */ +, MPG123_ENC_UNSIGNED_24 = MPG123_ENC_24|0x2000 +/* 0000 0010 0000 0000 32bit float */ +, MPG123_ENC_FLOAT_32 = 0x200 +/* 0000 0100 0000 0000 64bit float */ +, MPG123_ENC_FLOAT_64 = 0x400 +/* Any possibly known encoding from the list above. */ +, MPG123_ENC_ANY = ( MPG123_ENC_SIGNED_16 | MPG123_ENC_UNSIGNED_16 + | MPG123_ENC_UNSIGNED_8 | MPG123_ENC_SIGNED_8 + | MPG123_ENC_ULAW_8 | MPG123_ENC_ALAW_8 + | MPG123_ENC_SIGNED_32 | MPG123_ENC_UNSIGNED_32 + | MPG123_ENC_SIGNED_24 | MPG123_ENC_UNSIGNED_24 + | MPG123_ENC_FLOAT_32 | MPG123_ENC_FLOAT_64 ) +}; + +/** Get size of one PCM sample with given encoding. + * This is included both in libmpg123 and libout123. Both offer + * an API function to provide the macro results from library + * compile-time, not that of you application. This most likely + * does not matter as I do not expect any fresh PCM sample + * encoding to appear. But who knows? Perhaps the encoding type + * will be abused for funny things in future, not even plain PCM. + * And, by the way: Thomas really likes the ?: operator. + * \param enc the encoding (mpg123_enc_enum value) + * \return size of one sample in bytes + */ +#define MPG123_SAMPLESIZE(enc) ( \ + (enc) & MPG123_ENC_8 \ + ? 1 \ + : ( (enc) & MPG123_ENC_16 \ + ? 2 \ + : ( (enc) & MPG123_ENC_24 \ + ? 3 \ + : ( ( (enc) & MPG123_ENC_32 \ + || (enc) == MPG123_ENC_FLOAT_32 ) \ + ? 4 \ + : ( (enc) == MPG123_ENC_FLOAT_64 \ + ? 8 \ + : 0 \ +) ) ) ) ) + +/** Structure defining an audio format. + * Providing the members as individual function arguments to define a certain + * output format is easy enough. This struct makes is more comfortable to deal + * with a list of formats. + * Negative values for the members might be used to communicate use of default + * values. + */ +struct mpg123_fmt +{ + long rate; /**< sampling rate in Hz */ + int channels; /**< channel count */ + /** encoding code, can be single value or bitwise or of members of + * mpg123_enc_enum */ + int encoding; +}; + +/* @} */ + +#endif + diff --git a/deps/mpg123/src/libmpg123/format.c b/deps/mpg123/src/libmpg123/format.c index 1f4d49e..6a17ce1 100644 --- a/deps/mpg123/src/libmpg123/format.c +++ b/deps/mpg123/src/libmpg123/format.c @@ -1,9 +1,28 @@ /* format:routines to deal with audio (output) format - copyright 2008-9 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 2008-14 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Thomas Orgis, starting with parts of the old audio.c, with only faintly manage to show now + + A Major change from mpg123 <= 1.18 is that all encodings are only really + disabled when done so via specific build configuration. Otherwise, the + missing support of decoders to produce a certain format is augmented by + postprocessing that converts the samples. This means happily creating + data with higher resolution from less accurate decoder output. + + The main point is to still offer float encoding when the decoding core uses + a fixed point representation that has only 16 bit output. Actually, that's + the only point: A fixed-point build needs to create float from 16 bit, also + 32 or 24 bit from the same source. That's all there is to it: Everything else + is covered by fallback synth functions. It may be a further step to check if + there are cases where conversion in postprocessing works well enough to omit + a certain specialized decoder ... but usually, they are justified by some + special way to get from float to integer to begin with. + + I won't cover the case of faking double output with float/s16 decoders here. + Double precision output is a thing for experimental builds anyway. Mostly + theoretical and without a point. */ #include "mpg123lib_intern.h" @@ -42,11 +61,18 @@ static const int enc_float_range[2] = { 6, 8 }; /* same for 8 bit encodings */ static const int enc_8bit_range[2] = { 8, 12 }; -/* Only one type of float is supported. */ -# ifdef REAL_IS_FLOAT -# define MPG123_FLOAT_ENC MPG123_ENC_FLOAT_32 -# else +/* + Only one type of float is supported. + Actually, double is a very special experimental case not occuring in normal + builds. Might actually get rid of it. + + Remember here: Also with REAL_IS_FIXED, I want to be able to produce float + output (f32) via post-processing. +*/ +# ifdef REAL_IS_DOUBLE # define MPG123_FLOAT_ENC MPG123_ENC_FLOAT_64 +# else +# define MPG123_FLOAT_ENC MPG123_ENC_FLOAT_32 # endif /* The list of actually possible encodings. */ @@ -99,18 +125,7 @@ void attribute_align_arg mpg123_encodings(const int **list, size_t *number) int attribute_align_arg mpg123_encsize(int encoding) { - if(encoding & MPG123_ENC_8) - return 1; - else if(encoding & MPG123_ENC_16) - return 2; - else if(encoding & MPG123_ENC_24) - return 3; - else if(encoding & MPG123_ENC_32 || encoding == MPG123_ENC_FLOAT_32) - return 4; - else if(encoding == MPG123_ENC_FLOAT_64) - return 8; - else - return 0; + return MPG123_SAMPLESIZE(encoding); } /* char audio_caps[NUM_CHANNELS][MPG123_RATES+1][MPG123_ENCODINGS]; */ @@ -295,6 +310,36 @@ int frame_output_format(mpg123_handle *fr) fr->err = MPG123_BAD_OUTFORMAT; return -1; } + /* Set up the decoder synth format. Might differ. */ +#ifdef NO_SYNTH32 + /* Without high-precision synths, 16 bit signed is the basis for + everything higher than 8 bit. */ + if(fr->af.encsize > 2) + fr->af.dec_enc = MPG123_ENC_SIGNED_16; + else + { +#endif + switch(fr->af.encoding) + { +#ifndef NO_32BIT + case MPG123_ENC_SIGNED_24: + case MPG123_ENC_UNSIGNED_24: + case MPG123_ENC_UNSIGNED_32: + fr->af.dec_enc = MPG123_ENC_SIGNED_32; + break; +#endif +#ifndef NO_16BIT + case MPG123_ENC_UNSIGNED_16: + fr->af.dec_enc = MPG123_ENC_SIGNED_16; + break; +#endif + default: + fr->af.dec_enc = fr->af.encoding; + } +#ifdef NO_SYNTH32 + } +#endif + fr->af.dec_encsize = mpg123_encsize(fr->af.dec_enc); return 1; } } @@ -302,7 +347,7 @@ int frame_output_format(mpg123_handle *fr) int attribute_align_arg mpg123_format_none(mpg123_handle *mh) { int r; - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; r = mpg123_fmt_none(&mh->p); if(r != MPG123_OK){ mh->err = r; r = MPG123_ERR; } @@ -323,7 +368,7 @@ int attribute_align_arg mpg123_fmt_none(mpg123_pars *mp) int attribute_align_arg mpg123_format_all(mpg123_handle *mh) { int r; - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; r = mpg123_fmt_all(&mh->p); if(r != MPG123_OK){ mh->err = r; r = MPG123_ERR; } @@ -349,7 +394,7 @@ int attribute_align_arg mpg123_fmt_all(mpg123_pars *mp) int attribute_align_arg mpg123_format(mpg123_handle *mh, long rate, int channels, int encodings) { int r; - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; r = mpg123_fmt(&mh->p, rate, channels, encodings); if(r != MPG123_OK){ mh->err = r; r = MPG123_ERR; } @@ -409,15 +454,13 @@ void invalidate_format(struct audioformat *af) af->channels = 0; } -/* Consider 24bit output needing 32bit output as temporary storage. */ -off_t samples_to_storage(mpg123_handle *fr, off_t s) +/* Number of bytes the decoder produces. */ +off_t decoder_synth_bytes(mpg123_handle *fr, off_t s) { - if(fr->af.encoding & MPG123_ENC_24) - return s*4*fr->af.channels; /* 4 bytes per sample */ - else - return samples_to_bytes(fr, s); + return s * fr->af.dec_encsize * fr->af.channels; } +/* Samples/bytes for output buffer after post-processing. */ /* take into account: channels, bytes per sample -- NOT resampling!*/ off_t samples_to_bytes(mpg123_handle *fr , off_t s) { @@ -429,6 +472,16 @@ off_t bytes_to_samples(mpg123_handle *fr , off_t b) return b / fr->af.encsize / fr->af.channels; } +/* Number of bytes needed for decoding _and_ post-processing. */ +off_t outblock_bytes(mpg123_handle *fr, off_t s) +{ + int encsize = (fr->af.encoding & MPG123_ENC_24) + ? 4 /* Intermediate 32 bit. */ + : (fr->af.encsize > fr->af.dec_encsize + ? fr->af.encsize + : fr->af.dec_encsize); + return s * encsize * fr->af.channels; +} #ifndef NO_32BIT /* Remove every fourth byte, facilitating conversion from 32 bit to 24 bit integers. @@ -464,58 +517,167 @@ static void chop_fourth_byte(struct outbuffer *buf) #endif buf->fill = wpos-buf->data; } + +static void conv_s32_to_u32(struct outbuffer *buf) +{ + size_t i; + int32_t *ssamples = (int32_t*) buf->data; + uint32_t *usamples = (uint32_t*) buf->data; + size_t count = buf->fill/sizeof(int32_t); + + for(i=0; i= 0) + usamples[i] = (uint32_t)ssamples[i] + 2147483647+1; + /* The smallest value goes zero. */ + else if(ssamples[i] == ((int32_t)-2147483647-1)) + usamples[i] = 0; + /* Now -value is in the positive range of signed int ... so it's a possible value at all. */ + else + usamples[i] = (uint32_t)2147483647+1 - (uint32_t)(-ssamples[i]); + } +} + #endif -void postprocess_buffer(mpg123_handle *fr) + +/* We always assume that whole numbers are written! + partials will be cut out. */ + +static const char *bufsizeerr = "Fatal: Buffer too small for postprocessing!"; + + +#ifndef NO_16BIT + +static void conv_s16_to_u16(struct outbuffer *buf) +{ + size_t i; + int16_t *ssamples = (int16_t*) buf->data; + uint16_t *usamples = (uint16_t*)buf->data; + size_t count = buf->fill/sizeof(int16_t); + + for(i=0; idata; + float *out = (float*) buf->data; + size_t count = buf->fill/sizeof(int16_t); + /* Does that make any sense? In x86, there is an actual instruction to divide + float by integer ... but then, if we have that FPU, we don't really need + fixed point decoder hacks ...? */ + float scale = 1./SHORT_SCALE; + + if(buf->size < count*sizeof(float)) + { + error1("%s", bufsizeerr); + return; + } + + /* Work from the back since output is bigger. */ + for(i=count-1; i>=0; --i) + out[i] = (float)in[i] * scale; + + buf->fill = count*sizeof(float); +} +#endif + #ifndef NO_32BIT - if(fr->af.encoding == MPG123_ENC_UNSIGNED_32 || fr->af.encoding == MPG123_ENC_UNSIGNED_24) - { /* 32bit signed -> unsigned */ - size_t i; - int32_t *ssamples; - uint32_t *usamples; - ssamples = (int32_t*)fr->buffer.data; - usamples = (uint32_t*)fr->buffer.data; - debug("converting output to unsigned 32 bit integer"); - for(i=0; ibuffer.fill/sizeof(int32_t); ++i) - { - /* Different strategy since we don't have a larger type at hand. - Also watch out for silly +-1 fun because integer constants are signed in C90! */ - if(ssamples[i] >= 0) - usamples[i] = (uint32_t)ssamples[i] + 2147483647+1; - /* The smalles value goes zero. */ - else if(ssamples[i] == ((int32_t)-2147483647-1)) - usamples[i] = 0; - /* Now -value is in the positive range of signed int ... so it's a possible value at all. */ - else - usamples[i] = (uint32_t)2147483647+1 - (uint32_t)(-ssamples[i]); - } - /* Dumb brute force: A second pass for hacking off the last byte. */ - if(fr->af.encoding == MPG123_ENC_UNSIGNED_24) - chop_fourth_byte(&fr->buffer); +static void conv_s16_to_s32(struct outbuffer *buf) +{ + ssize_t i; + int16_t *in = (int16_t*) buf->data; + int32_t *out = (int32_t*) buf->data; + size_t count = buf->fill/sizeof(int16_t); + + if(buf->size < count*sizeof(int32_t)) + { + error1("%s", bufsizeerr); + return; } - else if(fr->af.encoding == MPG123_ENC_SIGNED_24) + + /* Work from the back since output is bigger. */ + for(i=count-1; i>=0; --i) { - /* We got 32 bit signed ... chop off for 24 bit signed. */ - chop_fourth_byte(&fr->buffer); + out[i] = in[i]; + /* Could just shift bytes, but would have to mess with sign bit. */ + out[i] *= S32_RESCALE; } + + buf->fill = count*sizeof(int32_t); +} #endif -#ifndef NO_16BIT - if(fr->af.encoding == MPG123_ENC_UNSIGNED_16) +#endif + + +void postprocess_buffer(mpg123_handle *fr) +{ + /* + This caters for the final output formats that are never produced by + decoder synth directly (wide unsigned and 24 bit formats) or that are + missing because of limited decoder precision (16 bit synth but 32 or + 24 bit output). + */ + switch(fr->af.dec_enc) { - size_t i; - short *ssamples; - unsigned short *usamples; - ssamples = (short*)fr->buffer.data; - usamples = (unsigned short*)fr->buffer.data; - debug("converting output to unsigned 16 bit integer"); - for(i=0; ibuffer.fill/sizeof(short); ++i) +#ifndef NO_32BIT + case MPG123_ENC_SIGNED_32: + switch(fr->af.encoding) { - long tmp = (long)ssamples[i]+32768; - usamples[i] = (unsigned short)tmp; + case MPG123_ENC_UNSIGNED_32: + conv_s32_to_u32(&fr->buffer); + break; + case MPG123_ENC_UNSIGNED_24: + conv_s32_to_u32(&fr->buffer); + chop_fourth_byte(&fr->buffer); + break; + case MPG123_ENC_SIGNED_24: + chop_fourth_byte(&fr->buffer); + break; } - } + break; #endif +#ifndef NO_16BIT + case MPG123_ENC_SIGNED_16: + switch(fr->af.encoding) + { + case MPG123_ENC_UNSIGNED_16: + conv_s16_to_u16(&fr->buffer); + break; +#ifndef NO_REAL + case MPG123_ENC_FLOAT_32: + conv_s16_to_f32(&fr->buffer); + break; +#endif +#ifndef NO_32BIT + case MPG123_ENC_SIGNED_32: + conv_s16_to_s32(&fr->buffer); + break; + case MPG123_ENC_UNSIGNED_32: + conv_s16_to_s32(&fr->buffer); + conv_s32_to_u32(&fr->buffer); + break; + case MPG123_ENC_UNSIGNED_24: + conv_s16_to_s32(&fr->buffer); + conv_s32_to_u32(&fr->buffer); + chop_fourth_byte(&fr->buffer); + break; + case MPG123_ENC_SIGNED_24: + conv_s16_to_s32(&fr->buffer); + chop_fourth_byte(&fr->buffer); + break; +#endif + } + break; +#endif + } } diff --git a/deps/mpg123/src/libmpg123/frame.c b/deps/mpg123/src/libmpg123/frame.c index f18b781..f714fb0 100644 --- a/deps/mpg123/src/libmpg123/frame.c +++ b/deps/mpg123/src/libmpg123/frame.c @@ -1,7 +1,7 @@ /* frame: Heap of routines dealing with the core mpg123 data structure. - copyright 2008-2010 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 2008-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Thomas Orgis */ @@ -167,9 +167,11 @@ void attribute_align_arg mpg123_delete_pars(mpg123_pars* mp) int attribute_align_arg mpg123_reset_eq(mpg123_handle *mh) { int i; + if(mh == NULL) return MPG123_BAD_HANDLE; +#ifndef NO_EQUALIZER mh->have_eq_settings = 0; for(i=0; i < 32; ++i) mh->equalizer[0][i] = mh->equalizer[1][i] = DOUBLE_TO_REAL(1.0); - +#endif return MPG123_OK; } @@ -181,7 +183,7 @@ int frame_outbuffer(mpg123_handle *fr) if(fr->buffer.size < size) { fr->err = MPG123_BAD_BUFFER; - if(NOQUIET) error2("have external buffer of size %"SIZE_P", need %"SIZE_P, (size_p)fr->buffer.size, size); + if(NOQUIET) error2("have external buffer of size %"SIZE_P", need %"SIZE_P, (size_p)fr->buffer.size, (size_p)size); return MPG123_ERR; } @@ -211,6 +213,7 @@ int frame_outbuffer(mpg123_handle *fr) int attribute_align_arg mpg123_replace_buffer(mpg123_handle *mh, unsigned char *data, size_t size) { debug2("replace buffer with %p size %"SIZE_P, data, (size_p)size); + if(mh == NULL) return MPG123_BAD_HANDLE; /* Will accept any size, the error comes later... */ if(data == NULL) { @@ -253,7 +256,8 @@ int frame_index_setup(mpg123_handle *fr) static void frame_decode_buffers_reset(mpg123_handle *fr) { - memset(fr->rawbuffs, 0, fr->rawbuffss); + if(fr->rawbuffs) /* memset(NULL, 0, 0) not desired */ + memset(fr->rawbuffs, 0, fr->rawbuffss); } int frame_buffers(mpg123_handle *fr) @@ -512,6 +516,7 @@ static void frame_fixed_reset(mpg123_handle *fr) fr->clip = 0; fr->oldhead = 0; fr->firsthead = 0; + fr->lay = 0; fr->vbr = MPG123_CBR; fr->abr_rate = 0; fr->track_frames = 0; @@ -530,6 +535,7 @@ static void frame_fixed_reset(mpg123_handle *fr) fr->fsizeold = 0; fr->firstframe = 0; fr->ignoreframe = fr->firstframe-fr->p.preframes; + fr->header_change = 0; fr->lastframe = -1; fr->fresh = 1; fr->new_format = 0; @@ -605,42 +611,9 @@ void frame_exit(mpg123_handle *fr) #endif } -int attribute_align_arg mpg123_info(mpg123_handle *mh, struct mpg123_frameinfo *mi) -{ - if(mh == NULL) return MPG123_ERR; - if(mi == NULL) - { - mh->err = MPG123_ERR_NULL; - return MPG123_ERR; - } - mi->version = mh->mpeg25 ? MPG123_2_5 : (mh->lsf ? MPG123_2_0 : MPG123_1_0); - mi->layer = mh->lay; - mi->rate = frame_freq(mh); - switch(mh->mode) - { - case 0: mi->mode = MPG123_M_STEREO; break; - case 1: mi->mode = MPG123_M_JOINT; break; - case 2: mi->mode = MPG123_M_DUAL; break; - case 3: mi->mode = MPG123_M_MONO; break; - default: error("That mode cannot be!"); - } - mi->mode_ext = mh->mode_ext; - mi->framesize = mh->framesize+4; /* Include header. */ - mi->flags = 0; - if(mh->error_protection) mi->flags |= MPG123_CRC; - if(mh->copyright) mi->flags |= MPG123_COPYRIGHT; - if(mh->extension) mi->flags |= MPG123_PRIVATE; - if(mh->original) mi->flags |= MPG123_ORIGINAL; - mi->emphasis = mh->emphasis; - mi->bitrate = frame_bitrate(mh); - mi->abr_rate = mh->abr_rate; - mi->vbr = mh->vbr; - return MPG123_OK; -} - int attribute_align_arg mpg123_framedata(mpg123_handle *mh, unsigned long *header, unsigned char **bodydata, size_t *bodybytes) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; if(!mh->to_decode) return MPG123_ERR; if(header != NULL) *header = mh->oldhead; @@ -781,7 +754,7 @@ off_t frame_outs(mpg123_handle *fr, off_t num) case 1: case 2: # endif - outs = (spf(fr)>>fr->down_sample)*num; + outs = (fr->spf>>fr->down_sample)*num; break; #ifndef NO_NTOM case 3: outs = ntom_frmouts(fr, num); break; @@ -803,7 +776,7 @@ off_t frame_expect_outsamples(mpg123_handle *fr) case 1: case 2: # endif - outs = spf(fr)>>fr->down_sample; + outs = fr->spf>>fr->down_sample; break; #ifndef NO_NTOM case 3: outs = ntom_frame_outsamples(fr); break; @@ -823,7 +796,7 @@ off_t frame_offset(mpg123_handle *fr, off_t outs) case 1: case 2: # endif - num = outs/(spf(fr)>>fr->down_sample); + num = outs/(fr->spf>>fr->down_sample); break; #ifndef NO_NTOM case 3: num = ntom_frameoff(fr, outs); break; @@ -837,12 +810,12 @@ off_t frame_offset(mpg123_handle *fr, off_t outs) /* input in _input_ samples */ void frame_gapless_init(mpg123_handle *fr, off_t framecount, off_t bskip, off_t eskip) { - debug3("frame_gaples_init: given %"OFF_P" frames, skip %"OFF_P" and %"OFF_P, (off_p)framecount, (off_p)bskip, (off_p)eskip); + debug3("frame_gapless_init: given %"OFF_P" frames, skip %"OFF_P" and %"OFF_P, (off_p)framecount, (off_p)bskip, (off_p)eskip); fr->gapless_frames = framecount; - if(fr->gapless_frames > 0) + if(fr->gapless_frames > 0 && bskip >=0 && eskip >= 0) { fr->begin_s = bskip+GAPLESS_DELAY; - fr->end_s = framecount*spf(fr)-eskip+GAPLESS_DELAY; + fr->end_s = framecount*fr->spf-eskip+GAPLESS_DELAY; } else fr->begin_s = fr->end_s = 0; /* These will get proper values later, from above plus resampling info. */ @@ -856,17 +829,23 @@ void frame_gapless_realinit(mpg123_handle *fr) { fr->begin_os = frame_ins2outs(fr, fr->begin_s); fr->end_os = frame_ins2outs(fr, fr->end_s); - fr->fullend_os = frame_ins2outs(fr, fr->gapless_frames*spf(fr)); - debug2("frame_gapless_realinit: from %"OFF_P" to %"OFF_P" samples", (off_p)fr->begin_os, (off_p)fr->end_os); + if(fr->gapless_frames > 0) + fr->fullend_os = frame_ins2outs(fr, fr->gapless_frames*fr->spf); + else fr->fullend_os = 0; + + debug4("frame_gapless_realinit: from %"OFF_P" to %"OFF_P" samples (%"OFF_P", %"OFF_P")", (off_p)fr->begin_os, (off_p)fr->end_os, (off_p)fr->fullend_os, (off_p)fr->gapless_frames); } /* At least note when there is trouble... */ void frame_gapless_update(mpg123_handle *fr, off_t total_samples) { - off_t gapless_samples = fr->gapless_frames*spf(fr); + off_t gapless_samples = fr->gapless_frames*fr->spf; + if(fr->gapless_frames < 1) return; + debug2("gapless update with new sample count %"OFF_P" as opposed to known %"OFF_P, total_samples, gapless_samples); if(NOQUIET && total_samples != gapless_samples) - fprintf(stderr, "\nWarning: Real sample count differs from given gapless sample count. Frankenstein stream?\n"); + fprintf(stderr, "\nWarning: Real sample count %"OFF_P" differs from given gapless sample count %"OFF_P". Frankenstein stream?\n" + , total_samples, gapless_samples); if(gapless_samples > total_samples) { @@ -893,7 +872,7 @@ static off_t ignoreframe(mpg123_handle *fr) return fr->firstframe - preshift; } -/* The frame seek... This is not simply the seek to fe*spf(fr) samples in output because we think of _input_ frames here. +/* The frame seek... This is not simply the seek to fe*fr->spf samples in output because we think of _input_ frames here. Seek to frame offset 1 may be just seek to 200 samples offset in output since the beginning of first frame is delay/padding. Hm, is that right? OK for the padding stuff, but actually, should the decoder delay be better totally hidden or not? With gapless, even the whole frame position could be advanced further than requested (since Homey don't play dat). */ diff --git a/deps/mpg123/src/libmpg123/frame.h b/deps/mpg123/src/libmpg123/frame.h index 26e086e..1087090 100644 --- a/deps/mpg123/src/libmpg123/frame.h +++ b/deps/mpg123/src/libmpg123/frame.h @@ -47,8 +47,10 @@ struct outbuffer struct audioformat { - int encoding; + int encoding; /* Final encoding, after post-processing. */ int encsize; /* Size of one sample in bytes, plain int should be fine here... */ + int dec_enc; /* Encoding of decoder synth. */ + int dec_encsize; /* Size of one decoder sample. */ int channels; long rate; }; @@ -88,6 +90,7 @@ enum frame_state_flags { FRAME_ACCURATE = 0x1 /**< 0001 Positions are considered accurate. */ ,FRAME_FRANKENSTEIN = 0x2 /**< 0010 This stream is concatenated. */ + ,FRAME_FRESH_DECODER = 0x4 /**< 0100 Decoder is fleshly initialized. */ }; /* There is a lot to condense here... many ints can be merged as flags; though the main space is still consumed by buffers. */ @@ -118,9 +121,10 @@ struct mpg123_handle_struct float *decwin_mmx; float *decwins; #endif +#ifndef NO_EQUALIZER int have_eq_settings; real equalizer[2][32]; - +#endif /* for halfspeed mode */ unsigned char ssave[34]; int halfphase; @@ -158,7 +162,7 @@ struct mpg123_handle_struct #ifdef OPT_MULTI #ifndef NO_LAYER3 -#if (defined OPT_3DNOW || defined OPT_3DNOWEXT) +#if (defined OPT_3DNOW_VINTAGE || defined OPT_3DNOWEXT_VINTAGE || defined OPT_SSE || defined OPT_X86_64 || defined OPT_AVX || defined OPT_NEON || defined OPT_NEON64) void (*the_dct36)(real *,real *,real *,real *,real *); #endif #endif @@ -193,6 +197,7 @@ struct mpg123_handle_struct int down_sample; int header_change; int lay; + long spf; /* cached count of samples per frame */ int (*do_layer)(mpg123_handle *); int error_protection; int bitrate_index; @@ -370,7 +375,6 @@ MPEG 2.5 1152 576 */ -#define spf(fr) ((fr)->lay == 1 ? 384 : ((fr)->lay==2 ? 1152 : ((fr)->lsf || (fr)->mpeg25 ? 576 : 1152))) #ifdef GAPLESS /* well, I take that one for granted... at least layer3 */ diff --git a/deps/mpg123/src/libmpg123/getbits.h b/deps/mpg123/src/libmpg123/getbits.h index 8eff00e..4b452f9 100644 --- a/deps/mpg123/src/libmpg123/getbits.h +++ b/deps/mpg123/src/libmpg123/getbits.h @@ -44,7 +44,11 @@ static unsigned int getbits(mpg123_handle *fr, int number_of_bits) #ifdef DEBUG_GETBITS fprintf(stderr,"g%d",number_of_bits); #endif - + /* Safety catch until we got the nasty code fully figured out. */ + /* No, that catch stays here, even if we think we got it figured out! */ + if( (long)(fr->wordpointer-fr->bsbuf)*8 + + fr->bitindex+number_of_bits > (long)fr->framesize*8 ) + return 0; /* This is actually slow: if(!number_of_bits) return 0; */ diff --git a/deps/mpg123/src/libmpg123/getcpuflags.S b/deps/mpg123/src/libmpg123/getcpuflags.S index 89c0f45..50a9d00 100644 --- a/deps/mpg123/src/libmpg123/getcpuflags.S +++ b/deps/mpg123/src/libmpg123/getcpuflags.S @@ -51,6 +51,7 @@ ASM_NAME(getcpuflags): /* In principle, I would have to check the CPU's identify first to be sure how to interpret the extended flags. */ /* now get the info, first extended */ movl $0x0, 12(%esi) /* clear value */ + movl $0x0, 16(%esi) /* clear value */ /* only if supported... */ movl $0x80000000, %eax cpuid @@ -68,6 +69,15 @@ ASM_NAME(getcpuflags): movl %eax, (%esi) movl %ecx, 4(%esi) movl %edx, 8(%esi) +/* check if xgetbv instruction is available */ + test $0x04000000, %ecx + jz .Lend + test $0x08000000, %ecx + jz .Lend + xor %ecx, %ecx + .byte 0x0f, 0x01, 0xd0 /* xgetbv instruction */ + movl %eax, 16(%esi) + movl (%esi), %eax jmp .Lend ALIGN4 .Lnocpuid: @@ -77,6 +87,7 @@ ASM_NAME(getcpuflags): movl $0, 4(%esi) movl $0, 8(%esi) movl $0, 12(%esi) + movl $0, 16(%esi) ALIGN4 .Lend: /* return value are the id flags, still stored in %eax */ diff --git a/deps/mpg123/src/libmpg123/getcpuflags.h b/deps/mpg123/src/libmpg123/getcpuflags.h index 68dd975..4bcdfca 100644 --- a/deps/mpg123/src/libmpg123/getcpuflags.h +++ b/deps/mpg123/src/libmpg123/getcpuflags.h @@ -12,7 +12,8 @@ /* standard level flags part 1 (ECX)*/ #define FLAG_SSE3 0x00000001 - +#define FLAG_SSSE3 0x00000200 +#define FLAG_AVX 0x1C000000 /* standard level flags part 2 (EDX) */ #define FLAG2_MMX 0x00800000 #define FLAG2_SSE 0x02000000 @@ -22,13 +23,21 @@ #define XFLAG_MMX 0x00800000 #define XFLAG_3DNOW 0x80000000 #define XFLAG_3DNOWEXT 0x40000000 +/* eXtended Control Register 0 */ +#define XCR0FLAG_AVX 0x00000006 + struct cpuflags { +#if defined(OPT_ARM) || defined(OPT_NEON) || defined(OPT_NEON64) + unsigned int has_neon; +#else unsigned int id; unsigned int std; unsigned int std2; unsigned int ext; + unsigned int xcr0_lo; +#endif }; unsigned int getcpuflags(struct cpuflags* cf); @@ -43,5 +52,9 @@ unsigned int getcpuflags(struct cpuflags* cf); #define cpu_sse(s) (FLAG2_SSE & s.std2) #define cpu_sse2(s) (FLAG2_SSE2 & s.std2) #define cpu_sse3(s) (FLAG_SSE3 & s.std) +#define cpu_avx(s) ((FLAG_AVX & s.std) == FLAG_AVX && (XCR0FLAG_AVX & s.xcr0_lo) == XCR0FLAG_AVX) +#define cpu_fast_sse(s) ((((s.id & 0xf00)>>8) == 6 && FLAG_SSSE3 & s.std) /* for Intel/VIA; family 6 CPUs with SSSE3 */ || \ + (((s.id & 0xf00)>>8) == 0xf && (((s.id & 0x0ff00000)>>20) > 0 && ((s.id & 0x0ff00000)>>20) != 5))) /* for AMD; family > 0xF CPUs except Bobcat */ +#define cpu_neon(s) (s.has_neon) #endif diff --git a/deps/mpg123/src/libmpg123/getcpuflags_arm.c b/deps/mpg123/src/libmpg123/getcpuflags_arm.c new file mode 100644 index 0000000..a0bbf43 --- /dev/null +++ b/deps/mpg123/src/libmpg123/getcpuflags_arm.c @@ -0,0 +1,61 @@ +/* + getcpuflags_arm: get cpuflags for ARM + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Momma +*/ + +#include +#include +#include "mpg123lib_intern.h" +#include "getcpuflags.h" + +extern void check_neon(void); + +#ifndef _M_ARM +static sigjmp_buf jmpbuf; +#else +static jmp_buf jmpbuf; +#endif + +static void mpg123_arm_catch_sigill(int sig) +{ +#ifndef _M_ARM + siglongjmp(jmpbuf, 1); +#else + longjmp(jmpbuf, 1); +#endif +} + +unsigned int getcpuflags(struct cpuflags* cf) +{ +#ifndef _M_ARM + struct sigaction act, act_old; + act.sa_handler = mpg123_arm_catch_sigill; + act.sa_flags = SA_RESTART; + sigemptyset(&act.sa_mask); + sigaction(SIGILL, &act, &act_old); + + cf->has_neon = 0; + + if(!sigsetjmp(jmpbuf, 1)) { + check_neon(); + cf->has_neon = 1; + } + + sigaction(SIGILL, &act_old, NULL); +#else + cf->has_neon = 0; + + if (!setjmp(jmpbuf)) { + signal(SIGILL, mpg123_arm_catch_sigill); + check_neon(); + cf->has_neon = 1; + } + + signal(SIGILL, SIG_DFL); +#endif + + return 0; +} diff --git a/deps/mpg123/src/libmpg123/getcpuflags_x86_64.S b/deps/mpg123/src/libmpg123/getcpuflags_x86_64.S new file mode 100644 index 0000000..92fb765 --- /dev/null +++ b/deps/mpg123/src/libmpg123/getcpuflags_x86_64.S @@ -0,0 +1,57 @@ +/* + getcpuflags_x86_64: get cpuflags for x86-64 + + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + + .text + ALIGN4 + .globl ASM_NAME(getcpuflags) +ASM_NAME(getcpuflags): + push %rbp + mov %rsp, %rbp + push %rbx + +#ifdef IS_MSABI + push %rdi + mov %rcx, %rdi +#endif + + movl $0, 12(%rdi) + movl $0, 16(%rdi) + + mov $0x80000000, %eax + cpuid + cmp $0x80000001, %eax + jb 1f + mov $0x80000001, %eax + cpuid + movl %edx, 12(%rdi) +1: + mov $0x00000001, %eax + cpuid + movl %eax, (%rdi) + movl %ecx, 4(%rdi) + movl %edx, 8(%rdi) + test $0x04000000, %ecx + jz 2f + test $0x08000000, %ecx + jz 2f + xor %ecx, %ecx + .byte 0x0f, 0x01, 0xd0 /* xgetbv instruction */ + movl %eax, 16(%rdi) + movl (%rdi), %eax +2: +#ifdef IS_MSABI + pop %rdi +#endif + pop %rbx + mov %rbp, %rsp + pop %rbp + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/icy.c b/deps/mpg123/src/libmpg123/icy.c index dca2c5d..7a6bb21 100644 --- a/deps/mpg123/src/libmpg123/icy.c +++ b/deps/mpg123/src/libmpg123/icy.c @@ -1,11 +1,13 @@ /* icy: Puny code to pretend for a serious ICY data structure. - copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 2007-2015 by the mpg123 project + -= free software under the terms of the LGPL 2.1 =- see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Thomas Orgis */ +// #include "intsym.h" #include "icy.h" void init_icy(struct icy_meta *icy) diff --git a/deps/mpg123/src/libmpg123/icy2utf8.c b/deps/mpg123/src/libmpg123/icy2utf8.c index 4e72162..6b95444 100644 --- a/deps/mpg123/src/libmpg123/icy2utf8.c +++ b/deps/mpg123/src/libmpg123/icy2utf8.c @@ -26,6 +26,8 @@ * Convert from ICY encoding (windows-1252 codepage) to UTF-8 */ +#include "config.h" +// #include "intsym.h" /* Includes string and stdlib headers... */ #include "compat.h" @@ -382,7 +384,7 @@ icy2utf8(const char *src, int force) /* Some funny streams from Apple/iTunes give ICY info in UTF-8 already. So, be prepared and don't try to re-encode such. Unless forced. */ - if(!force && is_utf8(src)) return (strdup(src)); + if(!force && is_utf8(src)) return (compat_strdup(src)); srclen = strlen(src) + 1; /* allocate conservatively */ diff --git a/deps/mpg123/src/libmpg123/id3.c b/deps/mpg123/src/libmpg123/id3.c index a2183aa..eafe004 100644 --- a/deps/mpg123/src/libmpg123/id3.c +++ b/deps/mpg123/src/libmpg123/id3.c @@ -1,7 +1,7 @@ /* id3: ID3v2.3 and ID3v2.4 parsing (a relevant subset) - copyright 2006-2008 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 2006-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Thomas Orgis */ @@ -13,9 +13,9 @@ #ifndef NO_ID3V2 /* Only the main parsing routine will always be there. */ /* We know the usual text frames plus some specifics. */ -#define KNOWN_FRAMES 4 -static const char frame_type[KNOWN_FRAMES][5] = { "COMM", "TXXX", "RVA2", "USLT" }; -enum frame_types { unknown = -2, text = -1, comment, extra, rva2, uslt }; +#define KNOWN_FRAMES 5 +static const char frame_type[KNOWN_FRAMES][5] = { "COMM", "TXXX", "RVA2", "USLT", "APIC" }; +enum frame_types { unknown = -2, text = -1, comment, extra, rva2, uslt, picture }; /* UTF support definitions */ @@ -25,7 +25,7 @@ static void convert_latin1 (mpg123_string *sb, const unsigned char* source, siz static void convert_utf16bom(mpg123_string *sb, const unsigned char* source, size_t len, const int noquiet); static void convert_utf8 (mpg123_string *sb, const unsigned char* source, size_t len, const int noquiet); -static const text_converter text_converters[4] = +static const text_converter text_converters[4] = { convert_latin1, /* We always check for (multiple) BOM in 16bit unicode. Without BOM, UTF16 BE is the default. @@ -59,6 +59,8 @@ void init_id3(mpg123_handle *fr) fr->id3v2.text = NULL; fr->id3v2.extras = 0; fr->id3v2.extra = NULL; + fr->id3v2.pictures = 0; + fr->id3v2.picture = NULL; } /* Managing of the text, comment and extra lists. */ @@ -77,6 +79,15 @@ static void init_mpg123_text(mpg123_text *txt) txt->lang[2] = 0; } +static void init_mpg123_picture(mpg123_picture *pic) +{ + mpg123_init_string(&pic->mime_type); + mpg123_init_string(&pic->description); + pic->type = 0; + pic->size = 0; + pic->data = NULL; +} + /* Free memory of one element. */ static void free_mpg123_text(mpg123_text *txt) { @@ -84,10 +95,19 @@ static void free_mpg123_text(mpg123_text *txt) mpg123_free_string(&txt->description); } +static void free_mpg123_picture(mpg123_picture * pic) +{ + mpg123_free_string(&pic->mime_type); + mpg123_free_string(&pic->description); + if (pic->data != NULL) + free(pic->data); +} + /* Free memory of whole list. */ #define free_comment(mh) free_id3_text(&((mh)->id3v2.comment_list), &((mh)->id3v2.comments)) #define free_text(mh) free_id3_text(&((mh)->id3v2.text), &((mh)->id3v2.texts)) #define free_extra(mh) free_id3_text(&((mh)->id3v2.extra), &((mh)->id3v2.extras)) +#define free_picture(mh) free_id3_picture(&((mh)->id3v2.picture), &((mh)->id3v2.pictures)) static void free_id3_text(mpg123_text **list, size_t *size) { size_t i; @@ -97,11 +117,21 @@ static void free_id3_text(mpg123_text **list, size_t *size) *list = NULL; *size = 0; } +static void free_id3_picture(mpg123_picture **list, size_t *size) +{ + size_t i; + for(i=0; i<*size; ++i) free_mpg123_picture(&((*list)[i])); + + free(*list); + *list = NULL; + *size = 0; +} /* Add items to the list. */ #define add_comment(mh) add_id3_text(&((mh)->id3v2.comment_list), &((mh)->id3v2.comments)) #define add_text(mh) add_id3_text(&((mh)->id3v2.text), &((mh)->id3v2.texts)) #define add_extra(mh) add_id3_text(&((mh)->id3v2.extra), &((mh)->id3v2.extras)) +#define add_picture(mh) add_id3_picture(&((mh)->id3v2.picture), &((mh)->id3v2.pictures)) static mpg123_text *add_id3_text(mpg123_text **list, size_t *size) { mpg123_text *x = safe_realloc(*list, sizeof(mpg123_text)*(*size+1)); @@ -113,11 +143,24 @@ static mpg123_text *add_id3_text(mpg123_text **list, size_t *size) return &((*list)[*size-1]); /* Return pointer to the added text. */ } +static mpg123_picture *add_id3_picture(mpg123_picture **list, size_t *size) +{ + mpg123_picture *x = safe_realloc(*list, sizeof(mpg123_picture)*(*size+1)); + if(x == NULL) return NULL; /* bad */ + + *list = x; + *size += 1; + init_mpg123_picture(&((*list)[*size-1])); + + return &((*list)[*size-1]); /* Return pointer to the added picture. */ +} + /* Remove the last item. */ #define pop_comment(mh) pop_id3_text(&((mh)->id3v2.comment_list), &((mh)->id3v2.comments)) #define pop_text(mh) pop_id3_text(&((mh)->id3v2.text), &((mh)->id3v2.texts)) #define pop_extra(mh) pop_id3_text(&((mh)->id3v2.extra), &((mh)->id3v2.extras)) +#define pop_picture(mh) pop_id3_picture(&((mh)->id3v2.picture), &((mh)->id3v2.pictures)) static void pop_id3_text(mpg123_text **list, size_t *size) { mpg123_text *x; @@ -136,11 +179,30 @@ static void pop_id3_text(mpg123_text **list, size_t *size) *size = 0; } } +static void pop_id3_picture(mpg123_picture **list, size_t *size) +{ + mpg123_picture *x; + if(*size < 1) return; + + free_mpg123_picture(&((*list)[*size-1])); + if(*size > 1) + { + x = safe_realloc(*list, sizeof(mpg123_picture)*(*size-1)); + if(x != NULL){ *list = x; *size -= 1; } + } + else + { + free(*list); + *list = NULL; + *size = 0; + } +} -/* OK, back t the higher level functions. */ +/* OK, back to the higher level functions. */ void exit_id3(mpg123_handle *fr) { + free_picture(fr); free_comment(fr); free_extra(fr); free_text(fr); @@ -186,8 +248,9 @@ void id3_link(mpg123_handle *fr) ID3v2 standard says that there should be one text frame of specific type per tag, and subsequent tags overwrite old values. So, I always replace the text that may be stored already (perhaps with a list of zero-separated strings, though). */ -static void store_id3_text(mpg123_string *sb, char *source, size_t source_size, const int noquiet, const int notranslate) +static void store_id3_text(mpg123_string *sb, unsigned char *source, size_t source_size, const int noquiet, const int notranslate) { + unsigned char encoding; if(!source_size) { debug("Empty id3 data!"); @@ -209,26 +272,29 @@ static void store_id3_text(mpg123_string *sb, char *source, size_t source_size, return; } - id3_to_utf8(sb, ((unsigned char *)source)[0], (unsigned char*)source+1, source_size-1, noquiet); + encoding = source[0]; + if(encoding > mpg123_id3_enc_max) + { + if(noquiet) + error1("Unknown text encoding %u, I take no chances, sorry!", encoding); + + mpg123_free_string(sb); + return; + } + id3_to_utf8(sb, encoding, source+1, source_size-1, noquiet); if(sb->fill) debug1("UTF-8 string (the first one): %s", sb->p); else if(noquiet) error("unable to convert string to UTF-8 (out of memory, junk input?)!"); } /* On error, sb->size is 0. */ +/* Also, encoding has been checked already! */ void id3_to_utf8(mpg123_string *sb, unsigned char encoding, const unsigned char *source, size_t source_size, int noquiet) { unsigned int bwidth; debug1("encoding: %u", encoding); /* A note: ID3v2.3 uses UCS-2 non-variable 16bit encoding, v2.4 uses UTF16. UTF-16 uses a reserved/private range in UCS-2 to add the magic, so we just always treat it as UTF. */ - if(encoding > mpg123_id3_enc_max) - { - if(noquiet) error1("Unknown text encoding %u, I take no chances, sorry!", encoding); - - mpg123_free_string(sb); - return; - } bwidth = encoding_widths[encoding]; /* Hack! I've seen a stray zero byte before BOM. Is that supposed to happen? */ if(encoding != mpg123_id3_utf16be) /* UTF16be _can_ beging with a null byte! */ @@ -247,9 +313,10 @@ void id3_to_utf8(mpg123_string *sb, unsigned char encoding, const unsigned char text_converters[encoding](sb, source, source_size, noquiet); } -static char *next_text(char* prev, int encoding, size_t limit) +/* You have checked encoding to be in the range already. */ +static unsigned char *next_text(unsigned char* prev, unsigned char encoding, size_t limit) { - char *text = prev; + unsigned char *text = prev; size_t width = encoding_widths[encoding]; /* So I go lengths to find zero or double zero... @@ -279,7 +346,7 @@ static char *next_text(char* prev, int encoding, size_t limit) return text; } -static const char *enc_name(int enc) +static const char *enc_name(unsigned char enc) { switch(enc) { @@ -291,7 +358,7 @@ static const char *enc_name(int enc) } } -static void process_text(mpg123_handle *fr, char *realdata, size_t realsize, char *id) +static void process_text(mpg123_handle *fr, unsigned char *realdata, size_t realsize, char *id) { /* Text encoding $xx */ /* The text (encoded) ... */ @@ -307,24 +374,94 @@ static void process_text(mpg123_handle *fr, char *realdata, size_t realsize, cha if(VERBOSE4) fprintf(stderr, "Note: ID3v2 %c%c%c%c text frame: %s\n", id[0], id[1], id[2], id[3], t->text.p); } +static void process_picture(mpg123_handle *fr, unsigned char *realdata, size_t realsize) +{ + unsigned char encoding = realdata[0]; + mpg123_picture *i = NULL; + unsigned char* workpoint; + if(realsize == 0) + { + debug("Empty id3 data!"); + return; + } + if(encoding > mpg123_id3_enc_max) + { + if(NOQUIET) + error1("Unknown text encoding %u, I take no chances, sorry!", encoding); + return; + } + if(VERBOSE4) fprintf(stderr, "Note: Storing picture from APIC frame.\n"); + /* decompose realdata accordingly */ + i = add_picture(fr); + if(i == NULL) + { + if(NOQUIET) error("Unable to attach new picture!"); + return; + } + realdata++; realsize--; + /* get mime type (encoding is always latin-1) */ + workpoint = next_text(realdata, 0, realsize); + if (workpoint == NULL) { + pop_picture(fr); + if (NOQUIET) error("Unable to get mime type for picture; skipping picture."); + return; + } + id3_to_utf8(&i->mime_type, 0, realdata, workpoint - realdata, NOQUIET); + realsize -= workpoint - realdata; + realdata = workpoint; + /* get picture type */ + i->type = realdata[0]; + realdata++; realsize--; + /* get description (encoding is encoding) */ + workpoint = next_text(realdata, encoding, realsize); + if (workpoint == NULL) { + if (NOQUIET) error("Unable to get description for picture; skipping picture."); + pop_picture(fr); + return; + } + id3_to_utf8(&i->description, encoding, realdata, workpoint - realdata, NOQUIET); + realsize -= workpoint - realdata; + if (realsize == 0) { + if (NOQUIET) error("No picture data defined; skipping picture."); + pop_picture(fr); + return; + } + /* store_id3_picture(i, picture, realsize, NOQUIET)) */ + i->data = (unsigned char*)malloc(realsize); + if (i->data == NULL) { + if (NOQUIET) error("Unable to allocate memory for picture; skipping picture"); + pop_picture(fr); + return; + } + memcpy(i->data, workpoint, realsize); + i->size = realsize; + if(VERBOSE4) fprintf(stderr, "Note: ID3v2 APIC picture frame of type: %d\n", i->type); +} + /* Store a new comment that perhaps is a RVA / RVA_ALBUM/AUDIOPHILE / RVA_MIX/RADIO one Special gimmik: It also stores USLT to the texts. Stucture is the same as for comments. */ -static void process_comment(mpg123_handle *fr, enum frame_types tt, char *realdata, size_t realsize, int rva_level, char *id) +static void process_comment(mpg123_handle *fr, enum frame_types tt, unsigned char *realdata, size_t realsize, int rva_level, char *id) { /* Text encoding $xx */ /* Language $xx xx xx */ /* Short description (encoded!) $00 (00) */ /* Then the comment text (encoded) ... */ - char encoding = realdata[0]; - char *lang = realdata+1; /* I'll only use the 3 bytes! */ - char *descr = realdata+4; - char *text = NULL; + unsigned char encoding = realdata[0]; + unsigned char *lang = realdata+1; /* I'll only use the 3 bytes! */ + unsigned char *descr = realdata+4; + unsigned char *text = NULL; mpg123_text *xcom = NULL; mpg123_text localcom; /* UTF-8 variant for local processing. */ - if((int)realsize < descr-realdata) + if(realsize < (size_t)(descr-realdata)) { - if(NOQUIET) error1("Invalid frame size of %lu (too small for anything).", (unsigned long)realsize); + if(NOQUIET) error1("Invalid frame size of %"SIZE_P" (too small for anything).", (size_p)realsize); + return; + } + if(encoding > mpg123_id3_enc_max) + { + if(NOQUIET) + error1("Unknown text encoding %u, I take no chances, sorry!", encoding); return; } xcom = (tt == uslt ? add_text(fr) : add_comment(fr)); @@ -393,14 +530,14 @@ static void process_comment(mpg123_handle *fr, enum frame_types tt, char *realda free_mpg123_text(&localcom); } -static void process_extra(mpg123_handle *fr, char* realdata, size_t realsize, int rva_level, char *id) +static void process_extra(mpg123_handle *fr, unsigned char* realdata, size_t realsize, int rva_level, char *id) { /* Text encoding $xx */ /* Description ... $00 (00) */ /* Text ... */ - char encoding = realdata[0]; - char *descr = realdata+1; /* remember, the encoding is descr[-1] */ - char *text; + unsigned char encoding = realdata[0]; + unsigned char *descr = realdata+1; /* remember, the encoding is descr[-1] */ + unsigned char *text; mpg123_text *xex; mpg123_text localex; @@ -409,6 +546,12 @@ static void process_extra(mpg123_handle *fr, char* realdata, size_t realsize, in if(NOQUIET) error1("Invalid frame size of %lu (too small for anything).", (unsigned long)realsize); return; } + if(encoding > mpg123_id3_enc_max) + { + if(NOQUIET) + error1("Unknown text encoding %u, I take no chances, sorry!", encoding); + return; + } text = next_text(descr, encoding, realsize-(descr-realdata)); if(VERBOSE4) fprintf(stderr, "Note: Storing extra from %s encoding\n", enc_name(realdata[0])); if(text == NULL) @@ -536,6 +679,9 @@ int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes) unsigned char flags = 0; int ret = 1; int ret2; +#ifndef NO_ID3V2 + int skiptag = 0; +#endif unsigned char major = first4bytes & 0xff; debug1("ID3v2: major tag version: %i", major); if(major == 0xff) return 0; /* Invalid... */ @@ -558,6 +704,7 @@ int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes) ,1) \ ) /* id3v2.3 does not store synchsafe frame sizes, but synchsafe tag size - doh! */ + /* Remember: bytes_to_long() can yield ULONG_MAX on 32 bit platforms! */ #define bytes_to_long(buf,res) \ ( \ major == 3 ? \ @@ -573,11 +720,12 @@ int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes) res = (((unsigned long) (buf)[0]) << 16) \ | (((unsigned long) (buf)[1]) << 8) \ | ((unsigned long) (buf)[2]) \ - ,1 \ ) /* length-10 or length-20 (footer present); 4 synchsafe integers == 28 bit number */ /* we have already read 10 bytes, so left are length or length+10 bytes belonging to tag */ + /* Note: This is an 28 bit value in 32 bit storage, plenty of space for */ + /* length+x for reasonable x. */ if(!synchsafe_to_long(buf+2,length)) { if(NOQUIET) error4("Bad tag length (not synchsafe): 0x%02x%02x%02x%02x; You got a bad ID3 tag here.", buf[2],buf[3],buf[4],buf[5]); @@ -587,17 +735,28 @@ int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes) #ifndef NO_ID3V2 if(VERBOSE2) fprintf(stderr,"Note: ID3v2.%i rev %i tag of %lu bytes\n", major, buf[0], length); /* skip if unknown version/scary flags, parse otherwise */ - if(fr->p.flags & MPG123_SKIP_ID3V2 || ((flags & UNKNOWN_FLAGS) || (major > 4) || (major < 2))) + if(fr->p.flags & MPG123_SKIP_ID3V2) + { + if(VERBOSE3) + fprintf(stderr, "Note: Skipping ID3v2 tag per user request.\n"); + skiptag = 1; + } + if((flags & UNKNOWN_FLAGS) || (major > 4) || (major < 2)) { if(NOQUIET) - { - if(fr->p.flags & MPG123_SKIP_ID3V2) - { - if(VERBOSE3) fprintf(stderr, "Note: Skipping ID3v2 tag per user request.\n"); - } - else /* Must be because of scary Tag properties. */ - warning2("ID3v2: Won't parse the ID3v2 tag with major version %u and flags 0x%xu - some extra code may be needed", major, flags); - } + warning2( "ID3v2: Won't parse the ID3v2 tag with major version" + " %u and flags 0x%xu - some extra code may be needed" + , major, flags ); + skiptag = 1; + } + if(length < 10) + { + if(NOQUIET) + warning1("ID3v2: unrealistic small tag lengh %lu, skipping", length); + skiptag = 1; + } + if(skiptag) + { #endif if((ret2 = fr->rd->skip_bytes(fr,length)) < 0) /* will not store data in backbuff! */ ret = ret2; @@ -614,16 +773,25 @@ int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes) if((ret2 = fr->rd->read_frame_body(fr,tagdata,length)) > 0) { unsigned long tagpos = 0; + /* bytes of frame title and of framesize value */ + unsigned int head_part = fr->id3v2.version > 2 ? 4 : 3; + unsigned int flag_part = fr->id3v2.version > 2 ? 2 : 0; + /* The amount of bytes that are unconditionally read for each frame: */ + /* ID, size, flags. */ + unsigned int framebegin = head_part+head_part+flag_part; debug1("ID3v2: have read at all %lu bytes for the tag now", (unsigned long)length+6); /* going to apply strlen for strings inside frames, make sure that it doesn't overflow! */ tagdata[length] = 0; if(flags & EXTHEAD_FLAG) { debug("ID3v2: skipping extended header"); - if(!bytes_to_long(tagdata, tagpos)) + if(!bytes_to_long(tagdata, tagpos) || tagpos >= length) { ret = 0; - if(NOQUIET) error4("Bad (non-synchsafe) tag offset: 0x%02x%02x%02x%02x", tagdata[0], tagdata[1], tagdata[2], tagdata[3]); + if(NOQUIET) + error4( "Bad (non-synchsafe/too large) tag offset:" + "0x%02x%02x%02x%02x" + , tagdata[0], tagdata[1], tagdata[2], tagdata[3] ); } } if(ret > 0) @@ -632,12 +800,14 @@ int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes) unsigned long framesize; unsigned long fflags; /* need 16 bits, actually */ id[4] = 0; - /* pos now advanced after ext head, now a frame has to follow */ - while(tagpos < length-10) /* I want to read at least a full header */ + /* Pos now advanced after ext head, now a frame has to follow. */ + /* Note: tagpos <= length, which is 28 bit integer, so both */ + /* far away from overflow for adding known small values. */ + /* I want to read at least one full header now. */ + while(length >= tagpos+framebegin) { int i = 0; unsigned long pos = tagpos; - int head_part = fr->id3v2.version == 2 ? 3 : 4; /* bytes of frame title and of framesize value */ /* level 1,2,3 - 0 is info from lame/info tag! */ /* rva tags with ascending significance, then general frames */ enum frame_types tt = unknown; @@ -667,12 +837,7 @@ int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes) break; } if(VERBOSE3) fprintf(stderr, "Note: ID3v2 %s frame of size %lu\n", id, framesize); - tagpos += head_part + framesize; /* the important advancement in whole tag */ - if(tagpos > length) - { - if(NOQUIET) error("Whoa! ID3v2 frame claims to be larger than the whole rest of the tag."); - break; - } + tagpos += head_part; pos += head_part; if(fr->id3v2.version > 2) { @@ -681,6 +846,13 @@ int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes) tagpos += 2; } else fflags = 0; + + if(length - tagpos < framesize) + { + if(NOQUIET) error("Whoa! ID3v2 frame claims to be larger than the whole rest of the tag."); + break; + } + tagpos += framesize; /* the important advancement in whole tag */ /* for sanity, after full parsing tagpos should be == pos */ /* debug4("ID3v2: found %s frame, size %lu (as bytes: 0x%08lx), flags 0x%016lx", id, framesize, framesize, fflags); */ /* %0abc0000 %0h00kmnp */ @@ -701,7 +873,7 @@ int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes) if(NOQUIET) warning("ID3v2: skipping invalid/unsupported frame"); continue; } - + for(i = 0; i < KNOWN_FRAMES; ++i) if(!strncmp(frame_type[i], id, 4)){ tt = i; break; } @@ -740,14 +912,16 @@ int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes) debug2("ID3v2: de-unsync made %lu out of %lu bytes", realsize, framesize); } pos = 0; /* now at the beginning again... */ - switch(tt) + /* Avoid reading over boundary, even if there is a */ + /* zero byte of padding for safety. */ + if(realsize) switch(tt) { case comment: case uslt: - process_comment(fr, tt, (char*)realdata, realsize, comment+1, id); + process_comment(fr, tt, realdata, realsize, comment+1, id); break; case extra: /* perhaps foobar2000's work */ - process_extra(fr, (char*)realdata, realsize, extra+1, id); + process_extra(fr, realdata, realsize, extra+1, id); break; case rva2: /* "the" RVA tag */ { @@ -781,8 +955,13 @@ int parse_new_id3(mpg123_handle *fr, unsigned long first4bytes) break; /* non-rva metainfo, simply store... */ case text: - process_text(fr, (char*)realdata, realsize, id); + process_text(fr, realdata, realsize, id); break; + case picture: + if (fr->p.flags & MPG123_PICTURE) + process_picture(fr, realdata, realsize); + + break; default: if(NOQUIET) error1("ID3v2: unknown frame type %i", tt); } if((flags & UNSYNC_FLAG) || (fflags & UNSYNC_FFLAG)) free(realdata); @@ -927,10 +1106,10 @@ static void convert_utf16bom(mpg123_string *sb, const unsigned char* s, size_t l for(i=0; i < n; i+=2) { unsigned long point = ((unsigned long) s[i+high]<<8) + s[i+low]; - if((point & 0xd800) == 0xd800) /* lead surrogate */ + if((point & 0xfc00) == 0xd800) /* lead surrogate */ { unsigned short second = (i+3 < l) ? (s[i+2+high]<<8) + s[i+2+low] : 0; - if((second & 0xdc00) == 0xdc00) /* good... */ + if((second & 0xfc00) == 0xdc00) /* good... */ { point = FULLPOINT(point,second); length += UTF8LEN(point); /* possibly 4 bytes */ @@ -953,7 +1132,7 @@ static void convert_utf16bom(mpg123_string *sb, const unsigned char* s, size_t l for(i=0; i < n; i+=2) { unsigned long codepoint = ((unsigned long) s[i+high]<<8) + s[i+low]; - if((codepoint & 0xd800) == 0xd800) /* lead surrogate */ + if((codepoint & 0xfc00) == 0xd800) /* lead surrogate */ { unsigned short second = (s[i+2+high]<<8) + s[i+2+low]; codepoint = FULLPOINT(codepoint,second); @@ -971,7 +1150,7 @@ static void convert_utf16bom(mpg123_string *sb, const unsigned char* s, size_t l *p++ = 0x80 | ((codepoint>>6) & 0x3f); *p++ = 0x80 | (codepoint & 0x3f); } - else if (codepoint < 0x200000) + else if (codepoint < 0x200000) { *p++ = (unsigned char) (0xf0 | codepoint>>18); *p++ = (unsigned char) (0x80 | ((codepoint>>12) & 0x3f)); diff --git a/deps/mpg123/src/libmpg123/index.c b/deps/mpg123/src/libmpg123/index.c index bb5af32..448b45f 100644 --- a/deps/mpg123/src/libmpg123/index.c +++ b/deps/mpg123/src/libmpg123/index.c @@ -1,11 +1,13 @@ /* index: frame index data structure and functions - copyright 2007-8 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 2007-2015 by the mpg123 project + -= free software under the terms of the LGPL 2.1 =- see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Thomas Orgis */ +// #include "intsym.h" #include "index.h" #include "debug.h" diff --git a/deps/mpg123/src/libmpg123/l12_integer_tables.h b/deps/mpg123/src/libmpg123/l12_integer_tables.h index e306fa9..ad8a956 100644 --- a/deps/mpg123/src/libmpg123/l12_integer_tables.h +++ b/deps/mpg123/src/libmpg123/l12_integer_tables.h @@ -11,7 +11,11 @@ static const real layer12_table[27][64] = { - { + { /* C90 does not like empty initializer. Fill with junk. */ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 + , 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38 + , 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 + , 57, 58, 59, 60, 61, 62, 63, 64 }, { -1431655765,-1136305934,-901886617,-715827883,-568152967,-450943309,-357913941,-284076483, diff --git a/deps/mpg123/src/libmpg123/layer1.c b/deps/mpg123/src/libmpg123/layer1.c index 4b3b418..d8782e0 100644 --- a/deps/mpg123/src/libmpg123/layer1.c +++ b/deps/mpg123/src/libmpg123/layer1.c @@ -10,8 +10,31 @@ #include "mpg123lib_intern.h" #include "getbits.h" +#include "debug.h" -static void I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMIT],mpg123_handle *fr) +/* + Allocation value is not allowed to be 15. Initially, libmad showed me the + error that mpg123 used to ignore. Then, I found a quote on that in + Shlien, S. (1994): Guide to MPEG-1 Audio Standard. + IEEE Transactions on Broadcasting 40, 4 + + "To avoid conflicts with the synchronization code, code '1111' is defined + to be illegal." +*/ +static int check_balloc(mpg123_handle *fr, unsigned int *balloc, unsigned int *end) +{ + unsigned int *ba; + for(ba=balloc; ba != end; ++ba) + if(*ba == 15) + { + if(NOQUIET) error("Illegal bit allocation value."); + return -1; + } + + return 0; +} + +static int I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMIT],mpg123_handle *fr) { unsigned int *ba=balloc; unsigned int *sca = (unsigned int *) scale_index; @@ -21,12 +44,14 @@ static void I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMI int i; int jsbound = fr->jsbound; for(i=0;imuls[n+1][*sca++]); + *f0++ = REAL_MUL_SCALE_LAYER12(DOUBLE_TO_REAL_15(MINUS_SHIFT(n) + (*sample++) + 1), fr->muls[n+1][*sca++]); else *f0++ = DOUBLE_TO_REAL(0.0); if((n=*ba++)) - *f1++ = REAL_MUL_SCALE_LAYER12(DOUBLE_TO_REAL_15( ((-1)<muls[n+1][*sca++]); + *f1++ = REAL_MUL_SCALE_LAYER12(DOUBLE_TO_REAL_15(MINUS_SHIFT(n) + (*sample++) + 1), fr->muls[n+1][*sca++]); else *f1++ = DOUBLE_TO_REAL(0.0); } for(i=jsbound;imuls[n+1][*sca++]); *f1++ = REAL_MUL_SCALE_LAYER12(samp, fr->muls[n+1][*sca++]); } @@ -115,7 +147,7 @@ static void I_step_two(real fraction[2][SBLIMIT],unsigned int balloc[2*SBLIMIT], for(sample=smpb,i=0;imuls[n+1][*sca++]); + *f0++ = REAL_MUL_SCALE_LAYER12(DOUBLE_TO_REAL_15(MINUS_SHIFT(n) + (*sample++) + 1), fr->muls[n+1][*sca++]); else *f0++ = DOUBLE_TO_REAL(0.0); } for(i=fr->down_sample_sblimit;i<32;i++) @@ -137,7 +169,11 @@ int do_layer1(mpg123_handle *fr) if(stereo == 1 || single == SINGLE_MIX) /* I don't see mixing handled here */ single = SINGLE_LEFT; - I_step_one(balloc,scale_index,fr); + if(I_step_one(balloc,scale_index,fr)) + { + if(NOQUIET) error("Aborting layer I decoding after step one.\n"); + return clip; + } for(i=0;ilongDiff; - for(i=0,cb = 0; cb < 8 ; cb++,i+=*bdf++) + switch_idx = (j < 3) ? 8 : 6; + for(i=0,cb = 0; cb < switch_idx ; cb++,i+=*bdf++) { *mp++ = (*bdf) >> 1; *mp++ = i; @@ -456,8 +467,14 @@ static int III_get_side_info(mpg123_handle *fr, struct III_sideinfo *si,int ster } gr_info->pow2gain = fr->gainpow2+256 - getbits_fast(fr, 8) + powdiff; if(ms_stereo) gr_info->pow2gain += 2; - gr_info->scalefac_compress = getbits(fr, tab[4]); + if(gr_info->part2_3_length == 0) + { + if(gr_info->scalefac_compress > 0) + debug1( "scalefac_compress _should_ be zero instead of %i" + , gr_info->scalefac_compress ); + gr_info->scalefac_compress = 0; + } if(get1bit(fr)) { /* window switch flag */ @@ -544,6 +561,14 @@ static int III_get_scale_factors_1(mpg123_handle *fr, int *scf,struct gr_info_s int num0 = slen[0][gr_info->scalefac_compress]; int num1 = slen[1][gr_info->scalefac_compress]; + if(gr_info->part2_3_length == 0) + { + int i; + for(i=0;i<39;i++) + *scf++ = 0; + return 0; + } + if(gr_info->block_type == 2) { int i=18; @@ -658,6 +683,14 @@ static int III_get_scale_factors_2(mpg123_handle *fr, int *scf,struct gr_info_s pnt = stab[n][(slen>>12)&0x7]; + if(gr_info->part2_3_length == 0) + { + int i; + for(i=0;i<39;i++) + *scf++ = 0; + return 0; + } + for(i=0;i<4;i++) { int num = slen & 0x7; @@ -671,7 +704,7 @@ static int III_get_scale_factors_2(mpg123_handle *fr, int *scf,struct gr_info_s else for(j=0;j<(int)(pnt[i]);j++) *scf++ = 0; } - + n = (n << 1) + 1; for(i=0;ipart2_3_length > 0) + { + /* mhipp tree has this split up a bit... */ int num=getbitoffset(fr); - long mask; + MASK_TYPE mask; /* We must split this, because for num==0 the shift is undefined if you do it in one step. */ - mask = ((unsigned long) getbits(fr, num))<= &xr[SBLIMIT][0]) \ +{ \ + if(NOQUIET) \ + error2("attempted xrpnt overflow (%p !< %p)", (void*) xrpnt, (void*) &xr[SBLIMIT][0]); \ + return 1; \ +} + if(gr_info->block_type == 2) { /* decoding with short or mixed mode BandIndex table */ @@ -775,7 +839,7 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in const struct newhuff *h = ht+gr_info->table_select[i]; for(;lp;lp--,mc--) { - register int x,y; + register MASK_STYPE x,y; if( (!mc) ) { mc = *m++; @@ -802,24 +866,38 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in { const short *val = h->table; REFRESH_MASK; +#ifdef USE_NEW_HUFFTABLE + while((y=val[(MASK_UTYPE)mask>>(BITSHIFT+4)])<0) + { + val -= y; + num -= 4; + mask <<= 4; + } + num -= (y >> 8); + mask <<= (y >> 8); + x = (y >> 4) & 0xf; + y &= 0xf; +#else while((y=*val++)<0) { - if (mask < 0) val -= y; + if (MSB_MASK) val -= y; num--; mask <<= 1; } x = y >> 4; y &= 0xf; +#endif } + CHECK_XRPNT; if(x == 15 && h->linbits) { max[lwin] = cb; REFRESH_MASK; - x += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits); + x += ((MASK_UTYPE) mask) >> (BITSHIFT+8-h->linbits); num -= h->linbits+1; mask <<= h->linbits; - if(mask < 0) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); + if(MSB_MASK) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); else *xrpnt = REAL_MUL_SCALE_LAYER3( ispow[x], v, gainpow2_scale_idx); mask <<= 1; @@ -827,7 +905,7 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in else if(x) { max[lwin] = cb; - if(mask < 0) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); + if(MSB_MASK) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); else *xrpnt = REAL_MUL_SCALE_LAYER3( ispow[x], v, gainpow2_scale_idx); num--; @@ -836,14 +914,15 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in else *xrpnt = DOUBLE_TO_REAL(0.0); xrpnt += step; + CHECK_XRPNT; if(y == 15 && h->linbits) { max[lwin] = cb; REFRESH_MASK; - y += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits); + y += ((MASK_UTYPE) mask) >> (BITSHIFT+8-h->linbits); num -= h->linbits+1; mask <<= h->linbits; - if(mask < 0) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); + if(MSB_MASK) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); else *xrpnt = REAL_MUL_SCALE_LAYER3( ispow[y], v, gainpow2_scale_idx); mask <<= 1; @@ -851,7 +930,7 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in else if(y) { max[lwin] = cb; - if(mask < 0) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); + if(MSB_MASK) *xrpnt = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); else *xrpnt = REAL_MUL_SCALE_LAYER3( ispow[y], v, gainpow2_scale_idx); num--; @@ -868,29 +947,14 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in const struct newhuff* h; const short* val; register short a; - /* - This is only a humble hack to prevent a special segfault. - More insight into the real workings is still needed. - Especially why there are (valid?) files that make xrpnt exceed the array with 4 bytes without segfaulting, more seems to be really bad, though. - */ - #ifdef DEBUG - if(!(xrpnt < &xr[SBLIMIT][0])) - { - if(VERBOSE) debug2("attempted soft xrpnt overflow (%p !< %p) ?", (void*) xrpnt, (void*) &xr[SBLIMIT][0]); - } - #endif - if(!(xrpnt < &xr[SBLIMIT][0]+5)) - { - if(NOQUIET) error2("attempted xrpnt overflow (%p !< %p)", (void*) xrpnt, (void*) &xr[SBLIMIT][0]); - return 2; - } + h = htc+gr_info->count1table_select; val = h->table; REFRESH_MASK; while((a=*val++)<0) { - if(mask < 0) val -= a; + if(MSB_MASK) val -= a; num--; mask <<= 1; @@ -930,13 +994,14 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in } mc--; } + CHECK_XRPNT; if( (a & (0x8>>i)) ) { max[lwin] = cb; if(part2remain+num <= 0) break; - if(mask < 0) *xrpnt = -REAL_SCALE_LAYER3(v, gainpow2_scale_idx); + if(MSB_MASK) *xrpnt = -REAL_SCALE_LAYER3(v, gainpow2_scale_idx); else *xrpnt = REAL_SCALE_LAYER3(v, gainpow2_scale_idx); num--; @@ -954,6 +1019,7 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in { for(;mc > 0;mc--) { + CHECK_XRPNT; *xrpnt = DOUBLE_TO_REAL(0.0); xrpnt += 3; /* short band -> step=3 */ *xrpnt = DOUBLE_TO_REAL(0.0); xrpnt += 3; } @@ -999,7 +1065,7 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in for(;lp;lp--,mc--) { - int x,y; + MASK_STYPE x,y; if(!mc) { mc = *m++; @@ -1019,25 +1085,39 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in { const short *val = h->table; REFRESH_MASK; +#ifdef USE_NEW_HUFFTABLE + while((y=val[(MASK_UTYPE)mask>>(BITSHIFT+4)])<0) + { + val -= y; + num -= 4; + mask <<= 4; + } + num -= (y >> 8); + mask <<= (y >> 8); + x = (y >> 4) & 0xf; + y &= 0xf; +#else while((y=*val++)<0) { - if (mask < 0) val -= y; + if (MSB_MASK) val -= y; num--; mask <<= 1; } x = y >> 4; y &= 0xf; +#endif } + CHECK_XRPNT; if(x == 15 && h->linbits) { max = cb; REFRESH_MASK; - x += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits); + x += ((MASK_UTYPE) mask) >> (BITSHIFT+8-h->linbits); num -= h->linbits+1; mask <<= h->linbits; - if(mask < 0) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); + if(MSB_MASK) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); else *xrpnt++ = REAL_MUL_SCALE_LAYER3( ispow[x], v, gainpow2_scale_idx); mask <<= 1; @@ -1045,7 +1125,7 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in else if(x) { max = cb; - if(mask < 0) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); + if(MSB_MASK) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[x], v, gainpow2_scale_idx); else *xrpnt++ = REAL_MUL_SCALE_LAYER3( ispow[x], v, gainpow2_scale_idx); num--; @@ -1053,14 +1133,15 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in } else *xrpnt++ = DOUBLE_TO_REAL(0.0); + CHECK_XRPNT; if(y == 15 && h->linbits) { max = cb; REFRESH_MASK; - y += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits); + y += ((MASK_UTYPE) mask) >> (BITSHIFT+8-h->linbits); num -= h->linbits+1; mask <<= h->linbits; - if(mask < 0) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); + if(MSB_MASK) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); else *xrpnt++ = REAL_MUL_SCALE_LAYER3( ispow[y], v, gainpow2_scale_idx); mask <<= 1; @@ -1068,7 +1149,7 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in else if(y) { max = cb; - if(mask < 0) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); + if(MSB_MASK) *xrpnt++ = REAL_MUL_SCALE_LAYER3(-ispow[y], v, gainpow2_scale_idx); else *xrpnt++ = REAL_MUL_SCALE_LAYER3( ispow[y], v, gainpow2_scale_idx); num--; @@ -1088,7 +1169,7 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in REFRESH_MASK; while((a=*val++)<0) { - if (mask < 0) val -= a; + if (MSB_MASK) val -= a; num--; mask <<= 1; @@ -1121,13 +1202,14 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in } mc--; } + CHECK_XRPNT; if( (a & (0x8>>i)) ) { max = cb; if(part2remain+num <= 0) break; - if(mask < 0) *xrpnt++ = -REAL_SCALE_LAYER3(v, gainpow2_scale_idx); + if(MSB_MASK) *xrpnt++ = -REAL_SCALE_LAYER3(v, gainpow2_scale_idx); else *xrpnt++ = REAL_SCALE_LAYER3(v, gainpow2_scale_idx); num--; @@ -1144,6 +1226,17 @@ static int III_dequantize_sample(mpg123_handle *fr, real xr[SBLIMIT][SSLIMIT],in part2remain += num; backbits(fr, num); num = 0; + } + else + { + part2remain = 0; + /* Not entirely sure what good values are, must be > 0. */ + gr_info->maxband[0] = + gr_info->maxband[1] = + gr_info->maxband[2] = + gr_info->maxbandl = 1; /* sfb=maxband[lwin]*3 + lwin - mixed_block_flag must be >= 0 */ + gr_info->maxb = 1; + } while(xrpnt < &xr[SBLIMIT][0]) *xrpnt++ = DOUBLE_TO_REAL(0.0); diff --git a/deps/mpg123/src/libmpg123/lfs_alias.c b/deps/mpg123/src/libmpg123/lfs_alias.c index 9b018e3..45cb53d 100644 --- a/deps/mpg123/src/libmpg123/lfs_alias.c +++ b/deps/mpg123/src/libmpg123/lfs_alias.c @@ -1,25 +1,39 @@ /* lfs_alias: Aliases to the small/native API functions with the size of long int as suffix. - copyright 2010 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 2010-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Thomas Orgis - Use case: Client code on Linux/x86-64 that defines _FILE_OFFSET_BITS to 64, which is the only choice on that platform anyway. It should be no-op, but prompts the platform-agnostic header of mpg123 to define API calls with the corresponding suffix. - This file provides the names for this case. It's cruft, but glibc does it, too -- so people rely on it. - Oh, and it also caters for the lunatics that define _FILE_OFFSET_BITS=32 on 32 bit platforms. - - There is also the strange case that the mpg123 build itself is configured for unnecessary _FILE_OFFSET_BITS == LFS_ALIAS_BITS =^ sizeof(long). In that case, the "native" function will have the suffix and the alias shall be provided without the suffix. - + Use case: Client code on Linux/x86-64 that defines _FILE_OFFSET_BITS to 64, + which is the only choice on that platform anyway. It should be no-op, but + prompts the platform-agnostic header of mpg123 to define API calls with the + corresponding suffix. This file provides the names for this case. It's cruft, + but glibc does it, too -- so people rely on it. + Oh, and it also caters for the lunatics that define _FILE_OFFSET_BITS=32 on + 32 bit platforms. In addition, it's needed for platforms that always have + off_t /= long, and clients still insisting on defining _FILE_OFFSET_BITS. + + Depending on use case, the aliases map to 32 (small) or 64 bit (large) offset + functions, to the ones from libmpg123 or the ones from lfs_wrap. + So, two basic cases: - 1. mpg123_bla_32 alias for mpg123_bla - 2. mpg123_bla alias for mpg123_bla_32 - Confusing, I know. It sucks. + 1. mpg123_bla_32 alias for mpg123_bla (native) + 2. mpg123_bla alias for mpg123_bla_32 (wrapper) + Same for 64 bits. Confusing, I know. It sucks. + + Note that the mpg123 header is _not_ used here to avoid definition with whacky off_t. + The aliases are always about arguments of native alias_t type. This can be off_t, but + on Linux/x86, this is long int. The off_t declarations in mpg123.h confuse things, + so reproduce definitions for the wrapper functions in that case. The definitions are + pulled by an inline Perl script in any case ... no need to copy anything manually! + As a benefit, one can skip undefining possible largefile namings. */ #include "config.h" -/* Hack for Solaris: Some system headers included from compat.h might force _FILE_OFFSET_BITS. Need to follow that here. */ +/* Hack for Solaris: Some system headers included from compat.h might force _FILE_OFFSET_BITS. Need to follow that here. + Also, want it around to have types defined. */ #include "compat.h" #ifndef LFS_ALIAS_BITS @@ -33,10 +47,6 @@ #if _FILE_OFFSET_BITS+0 == LFS_ALIAS_BITS -/* The native functions are actually _with_ suffix, so let the mpg123 header use large file hackery to define the correct interfaces. */ -#include "mpg123.h" -/* Don't forget to undef the function symbols before usage... */ - /* The native functions have suffix, the aliases not. */ #define NATIVE_SUFFIX MACROCAT(_, _FILE_OFFSET_BITS) #define NATIVE_NAME(func) MACROCAT(func, NATIVE_SUFFIX) @@ -44,10 +54,6 @@ #else -/* Native functions are without suffix... */ -#define MPG123_NO_LARGENAME -#include "mpg123.h" - /* The alias functions have suffix, the native ones not. */ #define ALIAS_SUFFIX MACROCAT(_, LFS_ALIAS_BITS) #define ALIAS_NAME(func) MACROCAT(func, ALIAS_SUFFIX) @@ -55,21 +61,26 @@ #endif -/* Now get the rest of the infrastructure on speed, namely attribute_align_arg, to stay safe. */ -#include "mpg123lib_intern.h" +/* Copy of necessary definitions, actually just forward declarations. */ +struct mpg123_handle_struct; +typedef struct mpg123_handle_struct mpg123_handle; + + +/* Get attribute_align_arg, to stay safe. */ +#include "abi_align.h" /* Extract the list of functions we need wrappers for, pregenerating the wrappers for simple cases (inline script for nedit): perl -ne ' -if(/^\s*EXPORT\s+(\S+)\s+(mpg123_\S+)\((.*)\);\s*$/) +if(/^\s*MPG123_EXPORT\s+(\S+)\s+(mpg123_\S+)\((.*)\);\s*$/) { my $type = $1; my $name = $2; my $args = $3; next unless ($type =~ /off_t/ or $args =~ /off_t/ or ($name =~ /open/ and $name ne mpg123_open_feed)); - $type =~ s/off_t/long/g; + $type =~ s/off_t/lfs_alias_t/g; my @nargs = (); - $args =~ s/off_t/long/g; + $args =~ s/off_t/lfs_alias_t/g; foreach my $a (split(/,/, $args)) { $a =~ s/^.*\s\**([a-z_]+)$/$1/; @@ -79,9 +90,7 @@ if(/^\s*EXPORT\s+(\S+)\s+(mpg123_\S+)\((.*)\);\s*$/) $nargs = "Human: figure me out." if($nargs =~ /\(/); print <err = MPG123_LFS_OVERFLOW; + return MPG123_ERR; + } + return val; +} + #undef mpg123_length /* off_t mpg123_length(mpg123_handle *mh); */ long attribute_align_arg mpg123_length(mpg123_handle *mh) diff --git a/deps/mpg123/src/libmpg123/libmpg123.c b/deps/mpg123/src/libmpg123/libmpg123.c index 59a8a8e..cc77905 100644 --- a/deps/mpg123/src/libmpg123/libmpg123.c +++ b/deps/mpg123/src/libmpg123/libmpg123.c @@ -1,7 +1,7 @@ /* libmpg123: MPEG Audio Decoder library - copyright 1995-2012 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org */ @@ -11,6 +11,9 @@ #include "debug.h" #include "gapless.h" +/* Want accurate rounding function regardless of decoder setup. */ +#define FORCE_ACCURATE +#include "sample.h" #define SEEKFRAME(mh) ((mh)->ignoreframe < 0 ? 0 : (mh)->ignoreframe) @@ -31,6 +34,15 @@ int attribute_align_arg mpg123_init(void) prepare_decode_tables(); check_decoders(); initialized = 1; +#if (defined REAL_IS_FLOAT) && (defined IEEE_FLOAT) + /* This is rather pointless but it eases my mind to check that we did + not enable the special rounding on a VAX or something. */ + if(12346 != REAL_TO_SHORT_ACCURATE(12345.67f)) + { + error("Bad IEEE 754 rounding. Re-build libmpg123 properly."); + return MPG123_ERR; + } +#endif return MPG123_OK; } @@ -79,7 +91,7 @@ int attribute_align_arg mpg123_decoder(mpg123_handle *mh, const char* decoder) { enum optdec dt = dectype(decoder); - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; if(dt == nodec) { @@ -114,7 +126,7 @@ int attribute_align_arg mpg123_param(mpg123_handle *mh, enum mpg123_parms key, l { int r; - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; r = mpg123_par(&mh->p, key, val, fval); if(r != MPG123_OK){ mh->err = r; r = MPG123_ERR; } else @@ -251,7 +263,7 @@ int attribute_align_arg mpg123_getparam(mpg123_handle *mh, enum mpg123_parms key { int r; - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; r = mpg123_getpar(&mh->p, key, val, fval); if(r != MPG123_OK){ mh->err = r; r = MPG123_ERR; } return r; @@ -342,7 +354,7 @@ int attribute_align_arg mpg123_getstate(mpg123_handle *mh, enum mpg123_state key long theval = 0; double thefval = 0.; - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; switch(key) { @@ -357,7 +369,7 @@ int attribute_align_arg mpg123_getstate(mpg123_handle *mh, enum mpg123_state key { size_t sval = bc_fill(&mh->rdat.buffer); theval = (long)sval; - if((size_t)theval != sval) + if(theval < 0 || (size_t)theval != sval) { mh->err = MPG123_INT_OVERFLOW; ret = MPG123_ERR; @@ -368,6 +380,10 @@ int attribute_align_arg mpg123_getstate(mpg123_handle *mh, enum mpg123_state key ret = MPG123_ERR; #endif break; + case MPG123_FRESH_DECODER: + theval = mh->state_flags & FRAME_FRESH_DECODER; + mh->state_flags &= ~FRAME_FRESH_DECODER; + break; default: mh->err = MPG123_BAD_KEY; ret = MPG123_ERR; @@ -378,10 +394,10 @@ int attribute_align_arg mpg123_getstate(mpg123_handle *mh, enum mpg123_state key return ret; } - int attribute_align_arg mpg123_eq(mpg123_handle *mh, enum mpg123_channels channel, int band, double val) { - if(mh == NULL) return MPG123_ERR; +#ifndef NO_EQUALIZER + if(mh == NULL) return MPG123_BAD_HANDLE; if(band < 0 || band > 31){ mh->err = MPG123_BAD_BAND; return MPG123_ERR; } switch(channel) { @@ -395,17 +411,17 @@ int attribute_align_arg mpg123_eq(mpg123_handle *mh, enum mpg123_channels channe return MPG123_ERR; } mh->have_eq_settings = TRUE; +#endif return MPG123_OK; } double attribute_align_arg mpg123_geteq(mpg123_handle *mh, enum mpg123_channels channel, int band) { double ret = 0.; - - if(mh == NULL) return MPG123_ERR; +#ifndef NO_EQUALIZER /* Handle this gracefully. When there is no band, it has no volume. */ - if(band > -1 && band < 32) + if(mh != NULL && band > -1 && band < 32) switch(channel) { case MPG123_LEFT|MPG123_RIGHT: @@ -415,15 +431,14 @@ double attribute_align_arg mpg123_geteq(mpg123_handle *mh, enum mpg123_channels case MPG123_RIGHT: ret = REAL_TO_DOUBLE(mh->equalizer[1][band]); break; /* Default case is already handled: ret = 0 */ } - +#endif return ret; } - /* plain file access, no http! */ int attribute_align_arg mpg123_open(mpg123_handle *mh, const char *path) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; mpg123_close(mh); return open_stream(mh, path, -1); @@ -431,7 +446,7 @@ int attribute_align_arg mpg123_open(mpg123_handle *mh, const char *path) int attribute_align_arg mpg123_open_fd(mpg123_handle *mh, int fd) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; mpg123_close(mh); return open_stream(mh, NULL, fd); @@ -439,7 +454,7 @@ int attribute_align_arg mpg123_open_fd(mpg123_handle *mh, int fd) int attribute_align_arg mpg123_open_handle(mpg123_handle *mh, void *iohandle) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; mpg123_close(mh); if(mh->rdat.r_read_handle == NULL) @@ -452,7 +467,7 @@ int attribute_align_arg mpg123_open_handle(mpg123_handle *mh, void *iohandle) int attribute_align_arg mpg123_open_feed(mpg123_handle *mh) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; mpg123_close(mh); return open_feed(mh); @@ -462,7 +477,7 @@ int attribute_align_arg mpg123_replace_reader( mpg123_handle *mh, ssize_t (*r_read) (int, void *, size_t), off_t (*r_lseek)(int, off_t, int) ) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; mpg123_close(mh); mh->rdat.r_read = r_read; @@ -475,7 +490,7 @@ int attribute_align_arg mpg123_replace_reader_handle( mpg123_handle *mh, off_t (*r_lseek)(void*, off_t, int), void (*cleanup)(void*) ) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; mpg123_close(mh); mh->rdat.r_read_handle = r_read; @@ -501,6 +516,7 @@ int decode_update(mpg123_handle *mh) return MPG123_ERR; } + mh->state_flags |= FRAME_FRESH_DECODER; native_rate = frame_freq(mh); b = frame_output_format(mh); /* Select the new output format based on given constraints. */ @@ -520,7 +536,7 @@ int decode_update(mpg123_handle *mh) case 2: mh->down_sample_sblimit = SBLIMIT>>(mh->down_sample); /* With downsampling I get less samples per frame */ - mh->outblock = samples_to_storage(mh, (spf(mh)>>mh->down_sample)); + mh->outblock = outblock_bytes(mh, (mh->spf>>mh->down_sample)); break; #ifndef NO_NTOM case 3: @@ -532,8 +548,8 @@ int decode_update(mpg123_handle *mh) mh->down_sample_sblimit /= frame_freq(mh); } else mh->down_sample_sblimit = SBLIMIT; - mh->outblock = samples_to_storage(mh, - ( ( NTOM_MUL-1+spf(mh) + mh->outblock = outblock_bytes(mh, + ( ( NTOM_MUL-1+mh->spf * (((size_t)NTOM_MUL*mh->af.rate)/frame_freq(mh)) )/NTOM_MUL )); } @@ -575,10 +591,19 @@ size_t attribute_align_arg mpg123_outblock(mpg123_handle *mh) This includes skipping/ignoring frames, in additon to skipping junk in the parser. */ static int get_next_frame(mpg123_handle *mh) { - /* We have some decoder ready, if the desired decoder has changed, - it is OK to use the old one for ignoring frames and activating - the new one for real (decode_update()) after getting the frame. */ int change = mh->decoder_change; + /* Ensure we got proper decoder for ignoring frames. + Header can be changed from seeking around. But be careful: Only after at + least one frame got read, decoder update makes sense. */ + if(mh->header_change > 1 && mh->num >= 0) + { + change = 1; + mh->header_change = 0; + debug("starting with big header change"); + if(decode_update(mh) < 0) + return MPG123_ERR; + } + do { int b; @@ -616,6 +641,11 @@ static int get_next_frame(mpg123_handle *mh) { debug("big header change"); change = 1; + mh->header_change = 0; + /* Need to update decoder structure right away since frame might need to + be decoded on next loop iteration for properly ignoring its output. */ + if(decode_update(mh) < 0) + return MPG123_ERR; } /* Now some accounting: Look at the numbers and decide if we want this frame. */ ++mh->playnum; @@ -637,11 +667,6 @@ static int get_next_frame(mpg123_handle *mh) All other situations resulted in returns from the loop. */ if(change) { - if(decode_update(mh) < 0) /* dito... */ - return MPG123_ERR; - -debug1("new format: %i", mh->new_format); - mh->decoder_change = 0; if(mh->fresh) { @@ -681,7 +706,7 @@ static int zero_byte(mpg123_handle *fr) */ static void decode_the_frame(mpg123_handle *fr) { - size_t needed_bytes = samples_to_storage(fr, frame_expect_outsamples(fr)); + size_t needed_bytes = decoder_synth_bytes(fr, frame_expect_outsamples(fr)); fr->clip += (fr->do_layer)(fr); /*fprintf(stderr, "frame %"OFF_P": got %"SIZE_P" / %"SIZE_P"\n", fr->num,(size_p)fr->buffer.fill, (size_p)needed_bytes);*/ /* There could be less data than promised. @@ -736,7 +761,7 @@ int attribute_align_arg mpg123_framebyframe_decode(mpg123_handle *mh, off_t *num { if(bytes == NULL) return MPG123_ERR_NULL; if(audio == NULL) return MPG123_ERR_NULL; - if(mh == NULL) return MPG123_BAD_HANDLE; + if(mh == NULL) return MPG123_BAD_HANDLE; if(mh->buffer.size < mh->outblock) return MPG123_NO_SPACE; *bytes = 0; @@ -804,7 +829,7 @@ int attribute_align_arg mpg123_framebyframe_next(mpg123_handle *mh) int attribute_align_arg mpg123_decode_frame(mpg123_handle *mh, off_t *num, unsigned char **audio, size_t *bytes) { if(bytes != NULL) *bytes = 0; - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; if(mh->buffer.size < mh->outblock) return MPG123_NO_SPACE; mh->buffer.fill = 0; /* always start fresh */ while(TRUE) @@ -847,7 +872,7 @@ int attribute_align_arg mpg123_read(mpg123_handle *mh, unsigned char *out, size_ int attribute_align_arg mpg123_feed(mpg123_handle *mh, const unsigned char *in, size_t size) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; #ifndef NO_FEEDER if(size > 0) { @@ -896,7 +921,7 @@ int attribute_align_arg mpg123_decode(mpg123_handle *mh, const unsigned char *in size_t mdone = 0; if(done != NULL) *done = 0; - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; #ifndef NO_FEEDER if(inmemsize > 0 && mpg123_feed(mh, inmemory, inmemsize) != MPG123_OK) { @@ -984,21 +1009,65 @@ static int init_track(mpg123_handle *mh) return 0; } -int attribute_align_arg mpg123_getformat(mpg123_handle *mh, long *rate, int *channels, int *encoding) +int attribute_align_arg mpg123_info(mpg123_handle *mh, struct mpg123_frameinfo *mi) { int b; - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; + if(mi == NULL) + { + mh->err = MPG123_ERR_NULL; + return MPG123_ERR; + } + b = init_track(mh); + if(b < 0) return b; + + mi->version = mh->mpeg25 ? MPG123_2_5 : (mh->lsf ? MPG123_2_0 : MPG123_1_0); + mi->layer = mh->lay; + mi->rate = frame_freq(mh); + switch(mh->mode) + { + case 0: mi->mode = MPG123_M_STEREO; break; + case 1: mi->mode = MPG123_M_JOINT; break; + case 2: mi->mode = MPG123_M_DUAL; break; + case 3: mi->mode = MPG123_M_MONO; break; + default: error("That mode cannot be!"); + } + mi->mode_ext = mh->mode_ext; + mi->framesize = mh->framesize+4; /* Include header. */ + mi->flags = 0; + if(mh->error_protection) mi->flags |= MPG123_CRC; + if(mh->copyright) mi->flags |= MPG123_COPYRIGHT; + if(mh->extension) mi->flags |= MPG123_PRIVATE; + if(mh->original) mi->flags |= MPG123_ORIGINAL; + mi->emphasis = mh->emphasis; + mi->bitrate = frame_bitrate(mh); + mi->abr_rate = mh->abr_rate; + mi->vbr = mh->vbr; + return MPG123_OK; +} + +int attribute_align_arg mpg123_getformat2( mpg123_handle *mh +, long *rate, int *channels, int *encoding, int clear_flag ) +{ + int b; + + if(mh == NULL) return MPG123_BAD_HANDLE; b = init_track(mh); if(b < 0) return b; if(rate != NULL) *rate = mh->af.rate; if(channels != NULL) *channels = mh->af.channels; if(encoding != NULL) *encoding = mh->af.encoding; - mh->new_format = 0; + if(clear_flag) mh->new_format = 0; return MPG123_OK; } +int attribute_align_arg mpg123_getformat(mpg123_handle *mh, long *rate, int *channels, int *encoding) +{ + return mpg123_getformat2(mh, rate, channels, encoding, 1); +} + off_t attribute_align_arg mpg123_timeframe(mpg123_handle *mh, double seconds) { off_t b; @@ -1096,6 +1165,11 @@ static int do_the_seek(mpg123_handle *mh) } #endif b = mh->rd->seek_frame(mh, fnum); + if(mh->header_change > 1) + { + if(decode_update(mh) < 0) return MPG123_ERR; + mh->header_change = 0; + } debug1("seek_frame returned: %i", b); if(b<0) return b; /* Only mh->to_ignore is TRUE. */ @@ -1250,12 +1324,37 @@ off_t attribute_align_arg mpg123_seek_frame(mpg123_handle *mh, off_t offset, int int attribute_align_arg mpg123_set_filesize(mpg123_handle *mh, off_t size) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; mh->rdat.filelen = size; return MPG123_OK; } +off_t attribute_align_arg mpg123_framelength(mpg123_handle *mh) +{ + int b; + if(mh == NULL) + return MPG123_ERR; + b = init_track(mh); + if(b<0) + return b; + if(mh->track_frames > 0) + return mh->track_frames; + if(mh->rdat.filelen > 0) + { /* A bad estimate. Ignoring tags 'n stuff. */ + double bpf = mh->mean_framesize > 0. + ? mh->mean_framesize + : compute_bpf(mh); + return (off_t)((double)(mh->rdat.filelen)/bpf+0.5); + } + /* Last resort: No view of the future, can at least count the frames that + were already parsed. */ + if(mh->num > -1) + return mh->num+1; + /* Giving up. */ + return MPG123_ERR; +} + off_t attribute_align_arg mpg123_length(mpg123_handle *mh) { int b; @@ -1265,12 +1364,12 @@ off_t attribute_align_arg mpg123_length(mpg123_handle *mh) b = init_track(mh); if(b<0) return b; if(mh->track_samples > -1) length = mh->track_samples; - else if(mh->track_frames > 0) length = mh->track_frames*spf(mh); + else if(mh->track_frames > 0) length = mh->track_frames*mh->spf; else if(mh->rdat.filelen > 0) /* Let the case of 0 length just fall through. */ { /* A bad estimate. Ignoring tags 'n stuff. */ double bpf = mh->mean_framesize ? mh->mean_framesize : compute_bpf(mh); - length = (off_t)((double)(mh->rdat.filelen)/bpf*spf(mh)); + length = (off_t)((double)(mh->rdat.filelen)/bpf*mh->spf); } else if(mh->rdat.filelen == 0) return mpg123_tell(mh); /* we could be in feeder mode */ else return MPG123_ERR; /* No length info there! */ @@ -1283,13 +1382,15 @@ off_t attribute_align_arg mpg123_length(mpg123_handle *mh) return length; } + int attribute_align_arg mpg123_scan(mpg123_handle *mh) { int b; - off_t backframe; - int to_decode, to_ignore; + off_t oldpos; + off_t track_frames = 0; + off_t track_samples = 0; - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; if(!(mh->rdat.flags & READER_SEEKABLE)){ mh->err = MPG123_NO_SEEK; return MPG123_ERR; } /* Scan through the _whole_ file, since the current position is no count but computed assuming constant samples per frame. */ /* Also, we can just keep the current buffer and seek settings. Just operate on input frames here. */ @@ -1300,30 +1401,28 @@ int attribute_align_arg mpg123_scan(mpg123_handle *mh) if(b == MPG123_DONE) return MPG123_OK; else return MPG123_ERR; /* Must be error here, NEED_MORE is not for seekable streams. */ } - backframe = mh->num; - to_decode = mh->to_decode; - to_ignore = mh->to_ignore; + oldpos = mpg123_tell(mh); b = mh->rd->seek_frame(mh, 0); if(b<0 || mh->num != 0) return MPG123_ERR; /* One frame must be there now. */ - mh->track_frames = 1; - mh->track_samples = spf(mh); /* Internal samples. */ - debug("TODO: We should disable gapless code when encountering inconsistent spf(mh)!"); + track_frames = 1; + track_samples = mh->spf; /* Internal samples. */ + debug("TODO: We should disable gapless code when encountering inconsistent mh->spf!"); + debug(" ... at least unset MPG123_ACCURATE."); + /* Do not increment mh->track_frames in the loop as tha would confuse Frankenstein detection. */ while(read_frame(mh) == 1) { - ++mh->track_frames; - mh->track_samples += spf(mh); + ++track_frames; + track_samples += mh->spf; } + mh->track_frames = track_frames; + mh->track_samples = track_samples; debug2("Scanning yielded %"OFF_P" track samples, %"OFF_P" frames.", (off_p)mh->track_samples, (off_p)mh->track_frames); #ifdef GAPLESS /* Also, think about usefulness of that extra value track_samples ... it could be used for consistency checking. */ - frame_gapless_update(mh, mh->track_samples); -#endif - b = mh->rd->seek_frame(mh, backframe); - if(b<0 || mh->num != backframe) return MPG123_ERR; - mh->to_decode = to_decode; - mh->to_ignore = to_ignore; - return MPG123_OK; + if(mh->p.flags & MPG123_GAPLESS) frame_gapless_update(mh, mh->track_samples); +#endif + return mpg123_seek(mh, oldpos, SEEK_SET) >= 0 ? MPG123_OK : MPG123_ERR; } int attribute_align_arg mpg123_meta_check(mpg123_handle *mh) @@ -1344,7 +1443,7 @@ int attribute_align_arg mpg123_id3(mpg123_handle *mh, mpg123_id3v1 **v1, mpg123_ { if(v1 != NULL) *v1 = NULL; if(v2 != NULL) *v2 = NULL; - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; if(mh->metaflags & MPG123_ID3) { @@ -1365,7 +1464,7 @@ int attribute_align_arg mpg123_id3(mpg123_handle *mh, mpg123_id3v1 **v1, mpg123_ int attribute_align_arg mpg123_icy(mpg123_handle *mh, char **icy_meta) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; #ifndef NO_ICY if(icy_meta == NULL) { @@ -1461,7 +1560,7 @@ int mpg123_store_utf8(mpg123_string *sb, enum mpg123_text_encoding enc, const un int attribute_align_arg mpg123_index(mpg123_handle *mh, off_t **offsets, off_t *step, size_t *fill) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; if(offsets == NULL || step == NULL || fill == NULL) { mh->err = MPG123_BAD_INDEX_PAR; @@ -1481,7 +1580,7 @@ int attribute_align_arg mpg123_index(mpg123_handle *mh, off_t **offsets, off_t * int attribute_align_arg mpg123_set_index(mpg123_handle *mh, off_t *offsets, off_t step, size_t fill) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; #ifdef FRAME_INDEX if(step == 0) { @@ -1502,7 +1601,7 @@ int attribute_align_arg mpg123_set_index(mpg123_handle *mh, off_t *offsets, off_ int attribute_align_arg mpg123_close(mpg123_handle *mh) { - if(mh == NULL) return MPG123_ERR; + if(mh == NULL) return MPG123_BAD_HANDLE; /* mh->rd is never NULL! */ if(mh->rd->close != NULL) mh->rd->close(mh); diff --git a/deps/mpg123/src/libmpg123/mangle.h b/deps/mpg123/src/libmpg123/mangle.h index 7728e53..97b119d 100644 --- a/deps/mpg123/src/libmpg123/mangle.h +++ b/deps/mpg123/src/libmpg123/mangle.h @@ -11,7 +11,14 @@ #define __MANGLE_H #include "config.h" -#include "intsym.h" +// #include "intsym.h" + +#if (defined OPT_I486) || (defined OPT_I586) || (defined OPT_I586_DITHER) \ + || (defined OPT_MMX) || (defined OPT_SSE) || (defined OPT_3DNOW) || (defined OPT_3DNOWEXT) \ + || (defined OPT_3DNOW_VINTAGE) || (defined OPT_3DNOWEXT_VINTAGE) \ + || (defined OPT_SSE_VINTAGE) +#define OPT_X86 +#endif #ifdef CCALIGN #define MOVUAPS movaps @@ -22,17 +29,45 @@ /* ALIGNX: align to X bytes This differs per compiler/platform in taking the byte count or an exponent for base 2. + A way out is balign, if the assembler supports it (gas extension). */ + +#ifdef ASMALIGN_BALIGN + +#define ALIGN4 .balign 4 +#define ALIGN8 .balign 8 +#define ALIGN16 .balign 16 +#define ALIGN32 .balign 32 +#define ALIGN64 .balign 64 + +#else + #ifdef ASMALIGN_EXP #define ALIGN4 .align 2 #define ALIGN8 .align 3 #define ALIGN16 .align 4 #define ALIGN32 .align 5 +#define ALIGN64 .align 6 #else +#ifdef ASMALIGN_BYTE #define ALIGN4 .align 4 #define ALIGN8 .align 8 #define ALIGN16 .align 16 #define ALIGN32 .align 32 +#define ALIGN64 .align 64 +#else +#ifdef ASMALIGN_ARMASM +#define ALIGN4 ALIGN 4 +#define ALIGN8 ALIGN 8 +#define ALIGN16 ALIGN 16 +#define ALIGN32 ALIGN 32 +#define ALIGN64 ALIGN 64 +#else +#error "Dunno how assembler alignment works. Please specify." +#endif +#endif +#endif + #endif #define MANGLE_MACROCAT_REALLY(a, b) a ## b @@ -41,7 +76,7 @@ #if defined(__USER_LABEL_PREFIX__) #define ASM_NAME(a) MANGLE_MACROCAT(__USER_LABEL_PREFIX__,a) #define ASM_VALUE(a) MANGLE_MACROCAT($,ASM_NAME(a)) -#elif defined(__CYGWIN__) || defined(_WIN32) && !defined (_WIN64) || defined(__OS2__) || \ +#elif defined(__CYGWIN__) || defined(_WIN32) && !defined (_WIN64) && !defined (_M_ARM) || defined(__OS2__) || \ (defined(__OpenBSD__) && !defined(__ELF__)) || defined(__APPLE__) #define ASM_NAME(a) MANGLE_MACROCAT(_,a) #define ASM_VALUE(a) MANGLE_MACROCAT($_,a) @@ -50,6 +85,62 @@ #define ASM_VALUE(a) MANGLE_MACROCAT($,a) #endif +/* Enable position-independent code for certain platforms. */ + +#if defined(OPT_X86) + +#define _EBX_ %ebx + +#if defined(PIC) && defined(__ELF__) + +/* ELF binaries (Unix/Linux) */ +#define LOCAL_VAR(a) a ## @GOTOFF(_EBX_) +#define GLOBAL_VAR(a) ASM_NAME(a) ## @GOTOFF(_EBX_) +#define GLOBAL_VAR_PTR(a) ASM_NAME(a) ## @GOT(_EBX_) +#define FUNC(a) ASM_NAME(a) +#define EXTERNAL_FUNC(a) ASM_NAME(a) ## @PLT +#undef ASM_VALUE +#define ASM_VALUE(a) MANGLE_MACROCAT($,a) ##@GOTOFF +#define GET_GOT \ + call 1f; \ +1: \ + pop _EBX_; \ +2: \ + addl $_GLOBAL_OFFSET_TABLE_ + (2b-1b), _EBX_ +#define PREPARE_GOT pushl _EBX_ +#define RESTORE_GOT popl _EBX_ + +#elif defined(PIC) && defined(__APPLE__) + +/* Mach-O binaries (OSX/iOS) */ +#define LOCAL_VAR(a) a ## - Lpic_base(_EBX_) +#define GLOBAL_VAR(a) #error This ABI cannot access non-local symbols directly. +#define GLOBAL_VAR_PTR(a) L_ ## a ## - Lpic_base(_EBX_) +#define FUNC(a) L_ ## a +#define EXTERNAL_FUNC(a) L_ ## a +#define GET_GOT \ + call Lpic_base; \ +Lpic_base: \ + pop _EBX_ +#define PREPARE_GOT pushl _EBX_ +#define RESTORE_GOT popl _EBX_ + +#else + +/* Dummies for everyone else. */ +#define LOCAL_VAR(a) a +#define GLOBAL_VAR ASM_NAME +#define GLOBAL_VAR_PTR(a) #error Cannot use indirect addressing in non-PIC object. +#define FUNC ASM_NAME +#define EXTERNAL_FUNC ASM_NAME +#define GET_GOT +#define PREPARE_GOT +#define RESTORE_GOT + +#endif /* PIC variants */ + +#endif /* OPT_X86 */ + #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) #define COMM(a,b,c) .comm a,b #else @@ -62,13 +153,47 @@ #define BSS .bss #endif +/* armasm for WIN32 UWP */ +#ifdef _M_ARM +#define GLOBAL_SYMBOL EXPORT +#else +#define GLOBAL_SYMBOL .globl +#endif + /* Mark non-executable stack. It's mainly for GNU on Linux... who else does (not) like this? */ #if !defined(__SUNPRO_C) && defined(__linux__) && defined(__ELF__) +#if defined(__arm__) #define NONEXEC_STACK .section .note.GNU-stack,"",%progbits #else +#define NONEXEC_STACK .section .note.GNU-stack,"",@progbits +#endif +#else #define NONEXEC_STACK #endif +#if (defined(__x86_64__) || defined(_M_X64)) && (defined(_WIN64) || defined (__CYGWIN__)) +#define IS_MSABI 1 /* Not using SYSV */ +#endif + +/* Macros for +-4GiB PC-relative addressing on AArch64 */ +#ifdef __APPLE__ +#define AARCH64_PCREL_HI(label) label@PAGE +#define AARCH64_PCREL_LO(label) label@PAGEOFF +#else +#define AARCH64_PCREL_HI(label) label +#define AARCH64_PCREL_LO(label) :lo12:label +#endif + +#ifdef __APPLE__ +#define AARCH64_DUP_4S(dst, src, elem) dup.4s dst, src[elem] +#define AARCH64_DUP_2D(dst, src, elem) dup.2d dst, src[elem] +#define AARCH64_SQXTN2_8H(dst, src) sqxtn2.8h dst, src +#else +#define AARCH64_DUP_4S(dst, src, elem) dup dst.4s, src.s[elem] +#define AARCH64_DUP_2D(dst, src, elem) dup dst.2d, src.d[elem] +#define AARCH64_SQXTN2_8H(dst, src) sqxtn2 dst.8h, src.4s +#endif + #endif /* !__MANGLE_H */ diff --git a/deps/mpg123/src/libmpg123/mpeghead.h b/deps/mpg123/src/libmpg123/mpeghead.h index 71b520b..7696df7 100644 --- a/deps/mpg123/src/libmpg123/mpeghead.h +++ b/deps/mpg123/src/libmpg123/mpeghead.h @@ -71,12 +71,14 @@ /* A generic mask for telling if a header is somewhat valid for the current stream. Meaning: Most basic info is not allowed to change. - Think: Why do we allow changing channel setup? A change in that means another stream (segment). + Checking of channel count needs to be done, too, though. So, + if channel count matches, frames are decoded the same way: frame buffers and decoding + routines can stay the same, especially frame buffers (think spf * channels!). */ #define HDR_CMPMASK (HDR_SYNC|HDR_VERSION|HDR_LAYER|HDR_SAMPLERATE) /* A stricter mask, for matching free format headers. */ -#define HDR_SAMEMASK (HDR_SYNC|HDR_VERSION|HDR_LAYER|HDR_BITRATE|HDR_SAMPLERATE|HDR_CHANNEL|HDR_CHANEX) +#define HDR_SAMEMASK (HDR_SYNC|HDR_VERSION|HDR_LAYER|HDR_BITRATE|HDR_SAMPLERATE|HDR_CHANNEL) /* Free format headers have zero bitrate value. */ #define HDR_FREE_FORMAT(head) (!(head & HDR_BITRATE)) diff --git a/deps/mpg123/src/libmpg123/mpg123.h b/deps/mpg123/src/libmpg123/mpg123.h new file mode 100644 index 0000000..1a3cd10 --- /dev/null +++ b/deps/mpg123/src/libmpg123/mpg123.h @@ -0,0 +1,1441 @@ +/* + libmpg123: MPEG Audio Decoder library (version 1.25.10) + + copyright 1995-2015 by the mpg123 project + free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org +*/ + +#ifndef MPG123_LIB_H +#define MPG123_LIB_H + +#include + +/** \file mpg123.h The header file for the libmpg123 MPEG Audio decoder */ + +/** A macro to check at compile time which set of API functions to expect. + * This should be incremented at least each time a new symbol is added + * to the header. + */ +#define MPG123_API_VERSION 44 + +#ifndef MPG123_EXPORT +/** Defines needed for MS Visual Studio(tm) DLL builds. + * Every public function must be prefixed with MPG123_EXPORT. When building + * the DLL ensure to define BUILD_MPG123_DLL. This makes the function accessible + * for clients and includes it in the import library which is created together + * with the DLL. When consuming the DLL ensure to define LINK_MPG123_DLL which + * imports the functions from the DLL. + */ +#ifdef BUILD_MPG123_DLL +/* The dll exports. */ +#define MPG123_EXPORT __declspec(dllexport) +#else +#ifdef LINK_MPG123_DLL +/* The exe imports. */ +#define MPG123_EXPORT __declspec(dllimport) +#else +/* Nothing on normal/UNIX builds */ +#define MPG123_EXPORT +#endif +#endif +#endif + +/* This is for Visual Studio, so this header works as distributed in the binary downloads */ +#if defined(_MSC_VER) && !defined(MPG123_DEF_SSIZE_T) +#define MPG123_DEF_SSIZE_T +#include +typedef ptrdiff_t ssize_t; +#endif + +#ifndef MPG123_NO_CONFIGURE /* Enable use of this file without configure. */ +#include +#include + +/* Simplified large file handling. + I used to have a check here that prevents building for a library with conflicting large file setup + (application that uses 32 bit offsets with library that uses 64 bits). + While that was perfectly fine in an environment where there is one incarnation of the library, + it hurt GNU/Linux and Solaris systems with multilib where the distribution fails to provide the + correct header matching the 32 bit library (where large files need explicit support) or + the 64 bit library (where there is no distinction). + + New approach: When the app defines _FILE_OFFSET_BITS, it wants non-default large file support, + and thus functions with added suffix (mpg123_open_64). + Any mismatch will be caught at link time because of the _FILE_OFFSET_BITS setting used when + building libmpg123. Plus, there's dual mode large file support in mpg123 since 1.12 now. + Link failure is not the expected outcome of any half-sane usage anymore. + + More complication: What about client code defining _LARGEFILE64_SOURCE? It might want direct access to the _64 functions, along with the ones without suffix. Well, that's possible now via defining MPG123_NO_LARGENAME and MPG123_LARGESUFFIX, respectively, for disabling or enforcing the suffix names. +*/ + +/* + Now, the renaming of large file aware functions. + By default, it appends underscore _FILE_OFFSET_BITS (so, mpg123_seek_64 for mpg123_seek), if _FILE_OFFSET_BITS is defined. You can force a different suffix via MPG123_LARGESUFFIX (that must include the underscore), or you can just disable the whole mess by defining MPG123_NO_LARGENAME. +*/ +#if (!defined MPG123_NO_LARGENAME) && ((defined _FILE_OFFSET_BITS) || (defined MPG123_LARGESUFFIX)) + +/* Need some trickery to concatenate the value(s) of the given macro(s). */ +#define MPG123_MACROCAT_REALLY(a, b) a ## b +#define MPG123_MACROCAT(a, b) MPG123_MACROCAT_REALLY(a, b) +#ifndef MPG123_LARGESUFFIX +#define MPG123_LARGESUFFIX MPG123_MACROCAT(_, _FILE_OFFSET_BITS) +#endif +#define MPG123_LARGENAME(func) MPG123_MACROCAT(func, MPG123_LARGESUFFIX) + +#define mpg123_open MPG123_LARGENAME(mpg123_open) +#define mpg123_open_fd MPG123_LARGENAME(mpg123_open_fd) +#define mpg123_open_handle MPG123_LARGENAME(mpg123_open_handle) +#define mpg123_framebyframe_decode MPG123_LARGENAME(mpg123_framebyframe_decode) +#define mpg123_decode_frame MPG123_LARGENAME(mpg123_decode_frame) +#define mpg123_tell MPG123_LARGENAME(mpg123_tell) +#define mpg123_tellframe MPG123_LARGENAME(mpg123_tellframe) +#define mpg123_tell_stream MPG123_LARGENAME(mpg123_tell_stream) +#define mpg123_seek MPG123_LARGENAME(mpg123_seek) +#define mpg123_feedseek MPG123_LARGENAME(mpg123_feedseek) +#define mpg123_seek_frame MPG123_LARGENAME(mpg123_seek_frame) +#define mpg123_timeframe MPG123_LARGENAME(mpg123_timeframe) +#define mpg123_index MPG123_LARGENAME(mpg123_index) +#define mpg123_set_index MPG123_LARGENAME(mpg123_set_index) +#define mpg123_position MPG123_LARGENAME(mpg123_position) +#define mpg123_length MPG123_LARGENAME(mpg123_length) +#define mpg123_framelength MPG123_LARGENAME(mpg123_framelength) +#define mpg123_set_filesize MPG123_LARGENAME(mpg123_set_filesize) +#define mpg123_replace_reader MPG123_LARGENAME(mpg123_replace_reader) +#define mpg123_replace_reader_handle MPG123_LARGENAME(mpg123_replace_reader_handle) +#define mpg123_framepos MPG123_LARGENAME(mpg123_framepos) + +#endif /* largefile hackery */ + +#endif /* MPG123_NO_CONFIGURE */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** \defgroup mpg123_init mpg123 library and handle setup + * + * Functions to initialise and shutdown the mpg123 library and handles. + * The parameters of handles have workable defaults, you only have to tune them when you want to tune something;-) + * Tip: Use a RVA setting... + * + * @{ + */ + +/** Opaque structure for the libmpg123 decoder handle. */ +struct mpg123_handle_struct; + +/** Opaque structure for the libmpg123 decoder handle. + * Most functions take a pointer to a mpg123_handle as first argument and operate on its data in an object-oriented manner. + */ +typedef struct mpg123_handle_struct mpg123_handle; + +/** Function to initialise the mpg123 library. + * This function is not thread-safe. Call it exactly once per process, before any other (possibly threaded) work with the library. + * + * \return MPG123_OK if successful, otherwise an error number. + */ +MPG123_EXPORT int mpg123_init(void); + +/** Function to close down the mpg123 library. + * This function is not thread-safe. Call it exactly once per process, before any other (possibly threaded) work with the library. */ +MPG123_EXPORT void mpg123_exit(void); + +/** Create a handle with optional choice of decoder (named by a string, see mpg123_decoders() or mpg123_supported_decoders()). + * and optional retrieval of an error code to feed to mpg123_plain_strerror(). + * Optional means: Any of or both the parameters may be NULL. + * + * \param decoder optional choice of decoder variant (NULL for default) + * \param error optional address to store error codes + * \return Non-NULL pointer to fresh handle when successful. + */ +MPG123_EXPORT mpg123_handle *mpg123_new(const char* decoder, int *error); + +/** Delete handle, mh is either a valid mpg123 handle or NULL. + * \param mh handle + */ +MPG123_EXPORT void mpg123_delete(mpg123_handle *mh); + +/** Enumeration of the parameters types that it is possible to set/get. */ +enum mpg123_parms +{ + MPG123_VERBOSE = 0, /**< set verbosity value for enabling messages to stderr, >= 0 makes sense (integer) */ + MPG123_FLAGS, /**< set all flags, p.ex val = MPG123_GAPLESS|MPG123_MONO_MIX (integer) */ + MPG123_ADD_FLAGS, /**< add some flags (integer) */ + MPG123_FORCE_RATE, /**< when value > 0, force output rate to that value (integer) */ + MPG123_DOWN_SAMPLE, /**< 0=native rate, 1=half rate, 2=quarter rate (integer) */ + MPG123_RVA, /**< one of the RVA choices above (integer) */ + MPG123_DOWNSPEED, /**< play a frame N times (integer) */ + MPG123_UPSPEED, /**< play every Nth frame (integer) */ + MPG123_START_FRAME, /**< start with this frame (skip frames before that, integer) */ + MPG123_DECODE_FRAMES, /**< decode only this number of frames (integer) */ + MPG123_ICY_INTERVAL, /**< stream contains ICY metadata with this interval (integer) */ + MPG123_OUTSCALE, /**< the scale for output samples (amplitude - integer or float according to mpg123 output format, normally integer) */ + MPG123_TIMEOUT, /**< timeout for reading from a stream (not supported on win32, integer) */ + MPG123_REMOVE_FLAGS, /**< remove some flags (inverse of MPG123_ADD_FLAGS, integer) */ + MPG123_RESYNC_LIMIT, /**< Try resync on frame parsing for that many bytes or until end of stream (<0 ... integer). This can enlarge the limit for skipping junk on beginning, too (but not reduce it). */ + MPG123_INDEX_SIZE /**< Set the frame index size (if supported). Values <0 mean that the index is allowed to grow dynamically in these steps (in positive direction, of course) -- Use this when you really want a full index with every individual frame. */ + ,MPG123_PREFRAMES /**< Decode/ignore that many frames in advance for layer 3. This is needed to fill bit reservoir after seeking, for example (but also at least one frame in advance is needed to have all "normal" data for layer 3). Give a positive integer value, please.*/ + ,MPG123_FEEDPOOL /**< For feeder mode, keep that many buffers in a pool to avoid frequent malloc/free. The pool is allocated on mpg123_open_feed(). If you change this parameter afterwards, you can trigger growth and shrinkage during decoding. The default value could change any time. If you care about this, then set it. (integer) */ + ,MPG123_FEEDBUFFER /**< Minimal size of one internal feeder buffer, again, the default value is subject to change. (integer) */ +}; + +/** Flag bits for MPG123_FLAGS, use the usual binary or to combine. */ +enum mpg123_param_flags +{ + MPG123_FORCE_MONO = 0x7 /**< 0111 Force some mono mode: This is a test bitmask for seeing if any mono forcing is active. */ + ,MPG123_MONO_LEFT = 0x1 /**< 0001 Force playback of left channel only. */ + ,MPG123_MONO_RIGHT = 0x2 /**< 0010 Force playback of right channel only. */ + ,MPG123_MONO_MIX = 0x4 /**< 0100 Force playback of mixed mono. */ + ,MPG123_FORCE_STEREO = 0x8 /**< 1000 Force stereo output. */ + ,MPG123_FORCE_8BIT = 0x10 /**< 00010000 Force 8bit formats. */ + ,MPG123_QUIET = 0x20 /**< 00100000 Suppress any printouts (overrules verbose). */ + ,MPG123_GAPLESS = 0x40 /**< 01000000 Enable gapless decoding (default on if libmpg123 has support). */ + ,MPG123_NO_RESYNC = 0x80 /**< 10000000 Disable resync stream after error. */ + ,MPG123_SEEKBUFFER = 0x100 /**< 000100000000 Enable small buffer on non-seekable streams to allow some peek-ahead (for better MPEG sync). */ + ,MPG123_FUZZY = 0x200 /**< 001000000000 Enable fuzzy seeks (guessing byte offsets or using approximate seek points from Xing TOC) */ + ,MPG123_FORCE_FLOAT = 0x400 /**< 010000000000 Force floating point output (32 or 64 bits depends on mpg123 internal precision). */ + ,MPG123_PLAIN_ID3TEXT = 0x800 /**< 100000000000 Do not translate ID3 text data to UTF-8. ID3 strings will contain the raw text data, with the first byte containing the ID3 encoding code. */ + ,MPG123_IGNORE_STREAMLENGTH = 0x1000 /**< 1000000000000 Ignore any stream length information contained in the stream, which can be contained in a 'TLEN' frame of an ID3v2 tag or a Xing tag */ + ,MPG123_SKIP_ID3V2 = 0x2000 /**< 10 0000 0000 0000 Do not parse ID3v2 tags, just skip them. */ + ,MPG123_IGNORE_INFOFRAME = 0x4000 /**< 100 0000 0000 0000 Do not parse the LAME/Xing info frame, treat it as normal MPEG data. */ + ,MPG123_AUTO_RESAMPLE = 0x8000 /**< 1000 0000 0000 0000 Allow automatic internal resampling of any kind (default on if supported). Especially when going lowlevel with replacing output buffer, you might want to unset this flag. Setting MPG123_DOWNSAMPLE or MPG123_FORCE_RATE will override this. */ + ,MPG123_PICTURE = 0x10000 /**< 17th bit: Enable storage of pictures from tags (ID3v2 APIC). */ + ,MPG123_NO_PEEK_END = 0x20000 /**< 18th bit: Do not seek to the end of + * the stream in order to probe + * the stream length and search for the id3v1 field. This also means + * the file size is unknown unless set using mpg123_set_filesize() and + * the stream is assumed as non-seekable unless overridden. + */ + ,MPG123_FORCE_SEEKABLE = 0x40000 /**< 19th bit: Force the stream to be seekable. */ +}; + +/** choices for MPG123_RVA */ +enum mpg123_param_rva +{ + MPG123_RVA_OFF = 0 /**< RVA disabled (default). */ + ,MPG123_RVA_MIX = 1 /**< Use mix/track/radio gain. */ + ,MPG123_RVA_ALBUM = 2 /**< Use album/audiophile gain */ + ,MPG123_RVA_MAX = MPG123_RVA_ALBUM /**< The maximum RVA code, may increase in future. */ +}; + +/** Set a specific parameter, for a specific mpg123_handle, using a parameter + * type key chosen from the mpg123_parms enumeration, to the specified value. + * \param mh handle + * \param type parameter choice + * \param value integer value + * \param fvalue floating point value + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_param( mpg123_handle *mh +, enum mpg123_parms type, long value, double fvalue ); + +/** Get a specific parameter, for a specific mpg123_handle. + * See the mpg123_parms enumeration for a list of available parameters. + * \param mh handle + * \param type parameter choice + * \param value integer value return address + * \param fvalue floating point value return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getparam( mpg123_handle *mh +, enum mpg123_parms type, long *value, double *fvalue ); + +/** Feature set available for query with mpg123_feature. */ +enum mpg123_feature_set +{ + MPG123_FEATURE_ABI_UTF8OPEN = 0 /**< mpg123 expects path names to be given in UTF-8 encoding instead of plain native. */ + ,MPG123_FEATURE_OUTPUT_8BIT /**< 8bit output */ + ,MPG123_FEATURE_OUTPUT_16BIT /**< 16bit output */ + ,MPG123_FEATURE_OUTPUT_32BIT /**< 32bit output */ + ,MPG123_FEATURE_INDEX /**< support for building a frame index for accurate seeking */ + ,MPG123_FEATURE_PARSE_ID3V2 /**< id3v2 parsing */ + ,MPG123_FEATURE_DECODE_LAYER1 /**< mpeg layer-1 decoder enabled */ + ,MPG123_FEATURE_DECODE_LAYER2 /**< mpeg layer-2 decoder enabled */ + ,MPG123_FEATURE_DECODE_LAYER3 /**< mpeg layer-3 decoder enabled */ + ,MPG123_FEATURE_DECODE_ACCURATE /**< accurate decoder rounding */ + ,MPG123_FEATURE_DECODE_DOWNSAMPLE /**< downsample (sample omit) */ + ,MPG123_FEATURE_DECODE_NTOM /**< flexible rate decoding */ + ,MPG123_FEATURE_PARSE_ICY /**< ICY support */ + ,MPG123_FEATURE_TIMEOUT_READ /**< Reader with timeout (network). */ + ,MPG123_FEATURE_EQUALIZER /**< tunable equalizer */ +}; + +/** Query libmpg123 features. + * \param key feature selection + * \return 1 for success, 0 for unimplemented functions + */ +MPG123_EXPORT int mpg123_feature(const enum mpg123_feature_set key); + +/* @} */ + + +/** \defgroup mpg123_error mpg123 error handling + * + * Functions to get text version of the error numbers and an enumeration + * of the error codes returned by libmpg123. + * + * Most functions operating on a mpg123_handle simply return MPG123_OK (0) + * on success and MPG123_ERR (-1) on failure, setting the internal error + * variable of the handle to the specific error code. If there was not a valid + * (non-NULL) handle provided to a function operating on one, MPG123_BAD_HANDLE + * may be returned if this can not be confused with a valid positive return + * value. + * Meaning: A function expected to return positive integers on success will + * always indicate error or a special condition by returning a negative one. + * + * Decoding/seek functions may also return message codes MPG123_DONE, + * MPG123_NEW_FORMAT and MPG123_NEED_MORE (all negative, see below on how to + * react). Note that calls to those can be nested, so generally watch out + * for these codes after initial handle setup. + * Especially any function that needs information about the current stream + * to work will try to at least parse the beginning if that did not happen + * yet. + * + * On a function that is supposed to return MPG123_OK on success and + * MPG123_ERR on failure, make sure you check for != MPG123_OK, not + * == MPG123_ERR, as the error code could get more specific in future, + * or there is just a special message from a decoding routine as indicated + * above. + * + * @{ + */ + +/** Enumeration of the message and error codes and returned by libmpg123 functions. */ +enum mpg123_errors +{ + MPG123_DONE=-12, /**< Message: Track ended. Stop decoding. */ + MPG123_NEW_FORMAT=-11, /**< Message: Output format will be different on next call. Note that some libmpg123 versions between 1.4.3 and 1.8.0 insist on you calling mpg123_getformat() after getting this message code. Newer verisons behave like advertised: You have the chance to call mpg123_getformat(), but you can also just continue decoding and get your data. */ + MPG123_NEED_MORE=-10, /**< Message: For feed reader: "Feed me more!" (call mpg123_feed() or mpg123_decode() with some new input data). */ + MPG123_ERR=-1, /**< Generic Error */ + MPG123_OK=0, /**< Success */ + MPG123_BAD_OUTFORMAT, /**< Unable to set up output format! */ + MPG123_BAD_CHANNEL, /**< Invalid channel number specified. */ + MPG123_BAD_RATE, /**< Invalid sample rate specified. */ + MPG123_ERR_16TO8TABLE, /**< Unable to allocate memory for 16 to 8 converter table! */ + MPG123_BAD_PARAM, /**< Bad parameter id! */ + MPG123_BAD_BUFFER, /**< Bad buffer given -- invalid pointer or too small size. */ + MPG123_OUT_OF_MEM, /**< Out of memory -- some malloc() failed. */ + MPG123_NOT_INITIALIZED, /**< You didn't initialize the library! */ + MPG123_BAD_DECODER, /**< Invalid decoder choice. */ + MPG123_BAD_HANDLE, /**< Invalid mpg123 handle. */ + MPG123_NO_BUFFERS, /**< Unable to initialize frame buffers (out of memory?). */ + MPG123_BAD_RVA, /**< Invalid RVA mode. */ + MPG123_NO_GAPLESS, /**< This build doesn't support gapless decoding. */ + MPG123_NO_SPACE, /**< Not enough buffer space. */ + MPG123_BAD_TYPES, /**< Incompatible numeric data types. */ + MPG123_BAD_BAND, /**< Bad equalizer band. */ + MPG123_ERR_NULL, /**< Null pointer given where valid storage address needed. */ + MPG123_ERR_READER, /**< Error reading the stream. */ + MPG123_NO_SEEK_FROM_END,/**< Cannot seek from end (end is not known). */ + MPG123_BAD_WHENCE, /**< Invalid 'whence' for seek function.*/ + MPG123_NO_TIMEOUT, /**< Build does not support stream timeouts. */ + MPG123_BAD_FILE, /**< File access error. */ + MPG123_NO_SEEK, /**< Seek not supported by stream. */ + MPG123_NO_READER, /**< No stream opened. */ + MPG123_BAD_PARS, /**< Bad parameter handle. */ + MPG123_BAD_INDEX_PAR, /**< Bad parameters to mpg123_index() and mpg123_set_index() */ + MPG123_OUT_OF_SYNC, /**< Lost track in bytestream and did not try to resync. */ + MPG123_RESYNC_FAIL, /**< Resync failed to find valid MPEG data. */ + MPG123_NO_8BIT, /**< No 8bit encoding possible. */ + MPG123_BAD_ALIGN, /**< Stack aligmnent error */ + MPG123_NULL_BUFFER, /**< NULL input buffer with non-zero size... */ + MPG123_NO_RELSEEK, /**< Relative seek not possible (screwed up file offset) */ + MPG123_NULL_POINTER, /**< You gave a null pointer somewhere where you shouldn't have. */ + MPG123_BAD_KEY, /**< Bad key value given. */ + MPG123_NO_INDEX, /**< No frame index in this build. */ + MPG123_INDEX_FAIL, /**< Something with frame index went wrong. */ + MPG123_BAD_DECODER_SETUP, /**< Something prevents a proper decoder setup */ + MPG123_MISSING_FEATURE /**< This feature has not been built into libmpg123. */ + ,MPG123_BAD_VALUE /**< A bad value has been given, somewhere. */ + ,MPG123_LSEEK_FAILED /**< Low-level seek failed. */ + ,MPG123_BAD_CUSTOM_IO /**< Custom I/O not prepared. */ + ,MPG123_LFS_OVERFLOW /**< Offset value overflow during translation of large file API calls -- your client program cannot handle that large file. */ + ,MPG123_INT_OVERFLOW /**< Some integer overflow. */ +}; + +/** Look up error strings given integer code. + * \param errcode integer error code + * \return string describing what that error error code means + */ +MPG123_EXPORT const char* mpg123_plain_strerror(int errcode); + +/** Give string describing what error has occured in the context of handle mh. + * When a function operating on an mpg123 handle returns MPG123_ERR, you should check for the actual reason via + * char *errmsg = mpg123_strerror(mh) + * This function will catch mh == NULL and return the message for MPG123_BAD_HANDLE. + * \param mh handle + * \return error message + */ +MPG123_EXPORT const char* mpg123_strerror(mpg123_handle *mh); + +/** Return the plain errcode intead of a string. + * \param mh handle + * \return error code recorded in handle or MPG123_BAD_HANDLE + */ +MPG123_EXPORT int mpg123_errcode(mpg123_handle *mh); + +/*@}*/ + + +/** \defgroup mpg123_decoder mpg123 decoder selection + * + * Functions to list and select the available decoders. + * Perhaps the most prominent feature of mpg123: You have several (optimized) decoders to choose from (on x86 and PPC (MacOS) systems, that is). + * + * @{ + */ + +/** Get available decoder list. + * \return NULL-terminated array of generally available decoder names (plain 8bit ASCII) + */ +MPG123_EXPORT const char **mpg123_decoders(void); + +/** Get supported decoder list. + * \return NULL-terminated array of the decoders supported by the CPU (plain 8bit ASCII) + */ +MPG123_EXPORT const char **mpg123_supported_decoders(void); + +/** Set the active decoder. + * \param mh handle + * \param decoder_name name of decoder + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_decoder(mpg123_handle *mh, const char* decoder_name); + +/** Get the currently active decoder name. + * The active decoder engine can vary depening on output constraints, + * mostly non-resampling, integer output is accelerated via 3DNow & Co. but for + * other modes a fallback engine kicks in. + * Note that this can return a decoder that is only active in the hidden and not + * available as decoder choice from the outside. + * \param mh handle + * \return The decoder name or NULL on error. + */ +MPG123_EXPORT const char* mpg123_current_decoder(mpg123_handle *mh); + +/*@}*/ + + +/** \defgroup mpg123_output mpg123 output audio format + * + * Functions to get and select the format of the decoded audio. + * + * Before you dive in, please be warned that you might get confused by this. This seems to happen a lot, therefore I am trying to explain in advance. + * + * The mpg123 library decides what output format to use when encountering the first frame in a stream, or actually any frame that is still valid but differs from the frames before in the prompted output format. At such a deciding point, an internal table of allowed encodings, sampling rates and channel setups is consulted. According to this table, an output format is chosen and the decoding engine set up accordingly (including optimized routines for different output formats). This might seem unusual but it just follows from the non-existence of "MPEG audio files" with defined overall properties. There are streams, streams are concatenations of (semi) independent frames. We store streams on disk and call them "MPEG audio files", but that does not change their nature as the decoder is concerned (the LAME/Xing header for gapless decoding makes things interesting again). + * + * To get to the point: What you do with mpg123_format() and friends is to fill the internal table of allowed formats before it is used. That includes removing support for some formats or adding your forced sample rate (see MPG123_FORCE_RATE) that will be used with the crude internal resampler. Also keep in mind that the sample encoding is just a question of choice -- the MPEG frames do only indicate their native sampling rate and channel count. If you want to decode to integer or float samples, 8 or 16 bit ... that is your decision. In a "clean" world, libmpg123 would always decode to 32 bit float and let you handle any sample conversion. But there are optimized routines that work faster by directly decoding to the desired encoding / accuracy. We prefer efficiency over conceptual tidyness. + * + * People often start out thinking that mpg123_format() should change the actual decoding format on the fly. That is wrong. It only has effect on the next natural change of output format, when libmpg123 will consult its format table again. To make life easier, you might want to call mpg123_format_none() before any thing else and then just allow one desired encoding and a limited set of sample rates / channel choices that you actually intend to deal with. You can force libmpg123 to decode everything to 44100 KHz, stereo, 16 bit integer ... it will duplicate mono channels and even do resampling if needed (unless that feature is disabled in the build, same with some encodings). But I have to stress that the resampling of libmpg123 is very crude and doesn't even contain any kind of "proper" interpolation. + * + * In any case, watch out for MPG123_NEW_FORMAT as return message from decoding routines and call mpg123_getformat() to get the currently active output format. + * + * @{ + */ + +/** They can be combined into one number (3) to indicate mono and stereo... */ +enum mpg123_channelcount +{ + MPG123_MONO = 1 /**< mono */ + ,MPG123_STEREO = 2 /**< stereo */ +}; + +/** An array of supported standard sample rates + * These are possible native sample rates of MPEG audio files. + * You can still force mpg123 to resample to a different one, but by default you will only get audio in one of these samplings. + * \param list Store a pointer to the sample rates array there. + * \param number Store the number of sample rates there. */ +MPG123_EXPORT void mpg123_rates(const long **list, size_t *number); + +/** An array of supported audio encodings. + * An audio encoding is one of the fully qualified members of mpg123_enc_enum (MPG123_ENC_SIGNED_16, not MPG123_SIGNED). + * \param list Store a pointer to the encodings array there. + * \param number Store the number of encodings there. */ +MPG123_EXPORT void mpg123_encodings(const int **list, size_t *number); + +/** Return the size (in bytes) of one mono sample of the named encoding. + * \param encoding The encoding value to analyze. + * \return positive size of encoding in bytes, 0 on invalid encoding. */ +MPG123_EXPORT int mpg123_encsize(int encoding); + +/** Configure a mpg123 handle to accept no output format at all, + * use before specifying supported formats with mpg123_format + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_format_none(mpg123_handle *mh); + +/** Configure mpg123 handle to accept all formats + * (also any custom rate you may set) -- this is default. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_format_all(mpg123_handle *mh); + +/** Set the audio format support of a mpg123_handle in detail: + * \param mh handle + * \param rate The sample rate value (in Hertz). + * \param channels A combination of MPG123_STEREO and MPG123_MONO. + * \param encodings A combination of accepted encodings for rate and channels, p.ex MPG123_ENC_SIGNED16 | MPG123_ENC_ULAW_8 (or 0 for no support). Please note that some encodings may not be supported in the library build and thus will be ignored here. + * \return MPG123_OK on success, MPG123_ERR if there was an error. */ +MPG123_EXPORT int mpg123_format( mpg123_handle *mh +, long rate, int channels, int encodings ); + +/** Check to see if a specific format at a specific rate is supported + * by mpg123_handle. + * \param mh handle + * \param rate sampling rate + * \param encoding encoding + * \return 0 for no support (that includes invalid parameters), MPG123_STEREO, + * MPG123_MONO or MPG123_STEREO|MPG123_MONO. */ +MPG123_EXPORT int mpg123_format_support( mpg123_handle *mh +, long rate, int encoding ); + +/** Get the current output format written to the addresses given. + * If the stream is freshly loaded, this will try to parse enough + * of it to give you the format to come. This clears the flag that + * would otherwise make the first decoding call return + * MPG123_NEW_FORMAT. + * \param mh handle + * \param rate sampling rate return address + * \param channels channel count return address + * \param encoding encoding return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getformat( mpg123_handle *mh +, long *rate, int *channels, int *encoding ); + +/** Get the current output format written to the addresses given. + * This differs from plain mpg123_getformat() in that you can choose + * _not_ to clear the flag that would trigger the next decoding call + * to return MPG123_NEW_FORMAT in case of a new format arriving. + * \param mh handle + * \param rate sampling rate return address + * \param channels channel count return address + * \param encoding encoding return address + * \param clear_flag if true, clear internal format flag + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getformat2( mpg123_handle *mh +, long *rate, int *channels, int *encoding, int clear_flag ); + +/*@}*/ + + +/** \defgroup mpg123_input mpg123 file input and decoding + * + * Functions for input bitstream and decoding operations. + * Decoding/seek functions may also return message codes MPG123_DONE, MPG123_NEW_FORMAT and MPG123_NEED_MORE (please read up on these on how to react!). + * @{ + */ + +/* reading samples / triggering decoding, possible return values: */ +/** Enumeration of the error codes returned by libmpg123 functions. */ + +/** Open and prepare to decode the specified file by filesystem path. + * This does not open HTTP urls; libmpg123 contains no networking code. + * If you want to decode internet streams, use mpg123_open_fd() or mpg123_open_feed(). + * \param mh handle + * \param path filesystem path + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open(mpg123_handle *mh, const char *path); + +/** Use an already opened file descriptor as the bitstream input + * mpg123_close() will _not_ close the file descriptor. + * \param mh handle + * \param fd file descriptor + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open_fd(mpg123_handle *mh, int fd); + +/** Use an opaque handle as bitstream input. This works only with the + * replaced I/O from mpg123_replace_reader_handle()! + * mpg123_close() will call the cleanup callback for your handle (if you gave one). + * \param mh handle + * \param iohandle your handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open_handle(mpg123_handle *mh, void *iohandle); + +/** Open a new bitstream and prepare for direct feeding + * This works together with mpg123_decode(); you are responsible for reading and feeding the input bitstream. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_open_feed(mpg123_handle *mh); + +/** Closes the source, if libmpg123 opened it. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_close(mpg123_handle *mh); + +/** Read from stream and decode up to outmemsize bytes. + * \param mh handle + * \param outmemory address of output buffer to write to + * \param outmemsize maximum number of bytes to write + * \param done address to store the number of actually decoded bytes to + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_read(mpg123_handle *mh +, unsigned char *outmemory, size_t outmemsize, size_t *done ); + +/** Feed data for a stream that has been opened with mpg123_open_feed(). + * It's give and take: You provide the bytestream, mpg123 gives you the decoded samples. + * \param mh handle + * \param in input buffer + * \param size number of input bytes + * \return MPG123_OK or error/message code. + */ +MPG123_EXPORT int mpg123_feed( mpg123_handle *mh +, const unsigned char *in, size_t size ); + +/** Decode MPEG Audio from inmemory to outmemory. + * This is very close to a drop-in replacement for old mpglib. + * When you give zero-sized output buffer the input will be parsed until + * decoded data is available. This enables you to get MPG123_NEW_FORMAT (and query it) + * without taking decoded data. + * Think of this function being the union of mpg123_read() and mpg123_feed() (which it actually is, sort of;-). + * You can actually always decide if you want those specialized functions in separate steps or one call this one here. + * \param mh handle + * \param inmemory input buffer + * \param inmemsize number of input bytes + * \param outmemory output buffer + * \param outmemsize maximum number of output bytes + * \param done address to store the number of actually decoded bytes to + * \return error/message code (watch out especially for MPG123_NEED_MORE) + */ +MPG123_EXPORT int mpg123_decode( mpg123_handle *mh +, const unsigned char *inmemory, size_t inmemsize +, unsigned char *outmemory, size_t outmemsize, size_t *done ); + +/** Decode next MPEG frame to internal buffer + * or read a frame and return after setting a new format. + * \param mh handle + * \param num current frame offset gets stored there + * \param audio This pointer is set to the internal buffer to read the decoded audio from. + * \param bytes number of output bytes ready in the buffer + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_decode_frame( mpg123_handle *mh +, off_t *num, unsigned char **audio, size_t *bytes ); + +/** Decode current MPEG frame to internal buffer. + * Warning: This is experimental API that might change in future releases! + * Please watch mpg123 development closely when using it. + * \param mh handle + * \param num last frame offset gets stored there + * \param audio this pointer is set to the internal buffer to read the decoded audio from. + * \param bytes number of output bytes ready in the buffer + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_framebyframe_decode( mpg123_handle *mh +, off_t *num, unsigned char **audio, size_t *bytes ); + +/** Find, read and parse the next mp3 frame + * Warning: This is experimental API that might change in future releases! + * Please watch mpg123 development closely when using it. + * \param mh handle + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_framebyframe_next(mpg123_handle *mh); + +/** Get access to the raw input data for the last parsed frame. + * This gives you a direct look (and write access) to the frame body data. + * Together with the raw header, you can reconstruct the whole raw MPEG stream without junk and meta data, or play games by actually modifying the frame body data before decoding this frame (mpg123_framebyframe_decode()). + * A more sane use would be to use this for CRC checking (see mpg123_info() and MPG123_CRC), the first two bytes of the body make up the CRC16 checksum, if present. + * You can provide NULL for a parameter pointer when you are not interested in the value. + * + * \param mh handle + * \param header the 4-byte MPEG header + * \param bodydata pointer to the frame body stored in the handle (without the header) + * \param bodybytes size of frame body in bytes (without the header) + * \return MPG123_OK if there was a yet un-decoded frame to get the + * data from, MPG123_BAD_HANDLE or MPG123_ERR otherwise (without further + * explanation, the error state of the mpg123_handle is not modified by + * this function). + */ +MPG123_EXPORT int mpg123_framedata( mpg123_handle *mh +, unsigned long *header, unsigned char **bodydata, size_t *bodybytes ); + +/** Get the input position (byte offset in stream) of the last parsed frame. + * This can be used for external seek index building, for example. + * It just returns the internally stored offset, regardless of validity -- + * you ensure that a valid frame has been parsed before! + * \param mh handle + * \return byte offset in stream + */ +MPG123_EXPORT off_t mpg123_framepos(mpg123_handle *mh); + +/*@}*/ + + +/** \defgroup mpg123_seek mpg123 position and seeking + * + * Functions querying and manipulating position in the decoded audio bitstream. + * The position is measured in decoded audio samples, or MPEG frame offset for the specific functions. + * If gapless code is in effect, the positions are adjusted to compensate the skipped padding/delay - meaning, you should not care about that at all and just use the position defined for the samples you get out of the decoder;-) + * The general usage is modelled after stdlib's ftell() and fseek(). + * Especially, the whence parameter for the seek functions has the same meaning as the one for fseek() and needs the same constants from stdlib.h: + * - SEEK_SET: set position to (or near to) specified offset + * - SEEK_CUR: change position by offset from now + * - SEEK_END: set position to offset from end + * + * Note that sample-accurate seek only works when gapless support has been enabled at compile time; seek is frame-accurate otherwise. + * Also, really sample-accurate seeking (meaning that you get the identical sample value after seeking compared to plain decoding up to the position) is only guaranteed when you do not mess with the position code by using MPG123_UPSPEED, MPG123_DOWNSPEED or MPG123_START_FRAME. The first two mainly should cause trouble with NtoM resampling, but in any case with these options in effect, you have to keep in mind that the sample offset is not the same as counting the samples you get from decoding since mpg123 counts the skipped samples, too (or the samples played twice only once)! + * Short: When you care about the sample position, don't mess with those parameters;-) + * Also, seeking is not guaranteed to work for all streams (underlying stream may not support it). + * And yet another caveat: If the stream is concatenated out of differing pieces (Frankenstein stream), seeking may suffer, too. + * + * @{ + */ + +/** Returns the current position in samples. + * On the next successful read, you'd get that sample. + * \param mh handle + * \return sample offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tell(mpg123_handle *mh); + +/** Returns the frame number that the next read will give you data from. + * \param mh handle + * \return frame offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tellframe(mpg123_handle *mh); + +/** Returns the current byte offset in the input stream. + * \param mh handle + * \return byte offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tell_stream(mpg123_handle *mh); + +/** Seek to a desired sample offset. + * Usage is modelled afer the standard lseek(). + * \param mh handle + * \param sampleoff offset in PCM samples + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END + * \return The resulting offset >= 0 or error/message code + */ +MPG123_EXPORT off_t mpg123_seek( mpg123_handle *mh +, off_t sampleoff, int whence ); + +/** Seek to a desired sample offset in data feeding mode. + * This just prepares things to be right only if you ensure that the next chunk of input data will be from input_offset byte position. + * \param mh handle + * \param sampleoff offset in PCM samples + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END + * \param input_offset The position it expects to be at the + * next time data is fed to mpg123_decode(). + * \return The resulting offset >= 0 or error/message code */ +MPG123_EXPORT off_t mpg123_feedseek( mpg123_handle *mh +, off_t sampleoff, int whence, off_t *input_offset ); + +/** Seek to a desired MPEG frame offset. + * Usage is modelled afer the standard lseek(). + * \param mh handle + * \param frameoff offset in MPEG frames + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END + * \return The resulting offset >= 0 or error/message code */ +MPG123_EXPORT off_t mpg123_seek_frame( mpg123_handle *mh +, off_t frameoff, int whence ); + +/** Return a MPEG frame offset corresponding to an offset in seconds. + * This assumes that the samples per frame do not change in the file/stream, which is a good assumption for any sane file/stream only. + * \return frame offset >= 0 or error/message code */ +MPG123_EXPORT off_t mpg123_timeframe(mpg123_handle *mh, double sec); + +/** Give access to the frame index table that is managed for seeking. + * You are asked not to modify the values... Use mpg123_set_index to set the + * seek index + * \param mh handle + * \param offsets pointer to the index array + * \param step one index byte offset advances this many MPEG frames + * \param fill number of recorded index offsets; size of the array + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_index( mpg123_handle *mh +, off_t **offsets, off_t *step, size_t *fill ); + +/** Set the frame index table + * Setting offsets to NULL and fill > 0 will allocate fill entries. Setting offsets + * to NULL and fill to 0 will clear the index and free the allocated memory used by the index. + * \param mh handle + * \param offsets pointer to the index array + * \param step one index byte offset advances this many MPEG frames + * \param fill number of recorded index offsets; size of the array + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_set_index( mpg123_handle *mh +, off_t *offsets, off_t step, size_t fill ); + +/** An old crutch to keep old mpg123 binaries happy. + * WARNING: This function is there only to avoid runtime linking errors with + * standalone mpg123 before version 1.23.0 (if you strangely update the + * library but not the end-user program) and actually is broken + * for various cases (p.ex. 24 bit output). Do never use. It might eventually + * be purged from the library. + */ +MPG123_EXPORT int mpg123_position( mpg123_handle *mh, off_t frame_offset, off_t buffered_bytes, off_t *current_frame, off_t *frames_left, double *current_seconds, double *seconds_left); + +/*@}*/ + + +/** \defgroup mpg123_voleq mpg123 volume and equalizer + * + * @{ + */ + +/** another channel enumeration, for left/right choice */ +enum mpg123_channels +{ + MPG123_LEFT=0x1 /**< The Left Channel. */ + ,MPG123_RIGHT=0x2 /**< The Right Channel. */ + ,MPG123_LR=0x3 /**< Both left and right channel; same as MPG123_LEFT|MPG123_RIGHT */ +}; + +/** Set the 32 Band Audio Equalizer settings. + * \param mh handle + * \param channel Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for both. + * \param band The equaliser band to change (from 0 to 31) + * \param val The (linear) adjustment factor. + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_eq( mpg123_handle *mh +, enum mpg123_channels channel, int band, double val ); + +/** Get the 32 Band Audio Equalizer settings. + * \param mh handle + * \param channel Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for (arithmetic mean of) both. + * \param band The equaliser band to change (from 0 to 31) + * \return The (linear) adjustment factor (zero for pad parameters) */ +MPG123_EXPORT double mpg123_geteq(mpg123_handle *mh + , enum mpg123_channels channel, int band); + +/** Reset the 32 Band Audio Equalizer settings to flat + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_reset_eq(mpg123_handle *mh); + +/** Set the absolute output volume including the RVA setting, + * vol<0 just applies (a possibly changed) RVA setting. + * \param mh handle + * \param vol volume value (linear factor) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_volume(mpg123_handle *mh, double vol); + +/** Adjust output volume including the RVA setting by chosen amount + * \param mh handle + * \param change volume value (linear factor increment) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_volume_change(mpg123_handle *mh, double change); + +/** Return current volume setting, the actual value due to RVA, and the RVA + * adjustment itself. It's all as double float value to abstract the sample + * format. The volume values are linear factors / amplitudes (not percent) + * and the RVA value is in decibels. + * \param mh handle + * \param base return address for base volume (linear factor) + * \param really return address for actual volume (linear factor) + * \param rva_db return address for RVA value (decibels) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getvolume(mpg123_handle *mh, double *base, double *really, double *rva_db); + +/* TODO: Set some preamp in addition / to replace internal RVA handling? */ + +/*@}*/ + + +/** \defgroup mpg123_status mpg123 status and information + * + * @{ + */ + +/** Enumeration of the mode types of Variable Bitrate */ +enum mpg123_vbr { + MPG123_CBR=0, /**< Constant Bitrate Mode (default) */ + MPG123_VBR, /**< Variable Bitrate Mode */ + MPG123_ABR /**< Average Bitrate Mode */ +}; + +/** Enumeration of the MPEG Versions */ +enum mpg123_version { + MPG123_1_0=0, /**< MPEG Version 1.0 */ + MPG123_2_0, /**< MPEG Version 2.0 */ + MPG123_2_5 /**< MPEG Version 2.5 */ +}; + + +/** Enumeration of the MPEG Audio mode. + * Only the mono mode has 1 channel, the others have 2 channels. */ +enum mpg123_mode { + MPG123_M_STEREO=0, /**< Standard Stereo. */ + MPG123_M_JOINT, /**< Joint Stereo. */ + MPG123_M_DUAL, /**< Dual Channel. */ + MPG123_M_MONO /**< Single Channel. */ +}; + + +/** Enumeration of the MPEG Audio flag bits */ +enum mpg123_flags { + MPG123_CRC=0x1, /**< The bitstream is error protected using 16-bit CRC. */ + MPG123_COPYRIGHT=0x2, /**< The bitstream is copyrighted. */ + MPG123_PRIVATE=0x4, /**< The private bit has been set. */ + MPG123_ORIGINAL=0x8 /**< The bitstream is an original, not a copy. */ +}; + +/** Data structure for storing information about a frame of MPEG Audio */ +struct mpg123_frameinfo +{ + enum mpg123_version version; /**< The MPEG version (1.0/2.0/2.5). */ + int layer; /**< The MPEG Audio Layer (MP1/MP2/MP3). */ + long rate; /**< The sampling rate in Hz. */ + enum mpg123_mode mode; /**< The audio mode (Mono, Stereo, Joint-stero, Dual Channel). */ + int mode_ext; /**< The mode extension bit flag. */ + int framesize; /**< The size of the frame (in bytes, including header). */ + enum mpg123_flags flags; /**< MPEG Audio flag bits. Just now I realize that it should be declared as int, not enum. It's a bitwise combination of the enum values. */ + int emphasis; /**< The emphasis type. */ + int bitrate; /**< Bitrate of the frame (kbps). */ + int abr_rate; /**< The target average bitrate. */ + enum mpg123_vbr vbr; /**< The VBR mode. */ +}; + +/** Get frame information about the MPEG audio bitstream and store it in a mpg123_frameinfo structure. + * \param mh handle + * \param mi address of existing frameinfo structure to write to + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_info(mpg123_handle *mh, struct mpg123_frameinfo *mi); + +/** Get the safe output buffer size for all cases + * (when you want to replace the internal buffer) + * \return safe buffer size + */ +MPG123_EXPORT size_t mpg123_safe_buffer(void); + +/** Make a full parsing scan of each frame in the file. ID3 tags are found. An + * accurate length value is stored. Seek index will be filled. A seek back to + * current position is performed. At all, this function refuses work when + * stream is not seekable. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_scan(mpg123_handle *mh); + +/** Return, if possible, the full (expected) length of current track in frames. + * \param mh handle + * \return length >= 0 or MPG123_ERR if there is no length guess possible. + */ +MPG123_EXPORT off_t mpg123_framelength(mpg123_handle *mh); + +/** Return, if possible, the full (expected) length of current track in samples. + * \param mh handle + * \return length >= 0 or MPG123_ERR if there is no length guess possible. + */ +MPG123_EXPORT off_t mpg123_length(mpg123_handle *mh); + +/** Override the value for file size in bytes. + * Useful for getting sensible track length values in feed mode or for HTTP streams. + * \param mh handle + * \param size file size in bytes + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_set_filesize(mpg123_handle *mh, off_t size); + +/** Get MPEG frame duration in seconds. + * \param mh handle + * \return frame duration in seconds, <0 on error + */ +MPG123_EXPORT double mpg123_tpf(mpg123_handle *mh); + +/** Get MPEG frame duration in samples. + * \param mh handle + * \return samples per frame for the most recently parsed frame; <0 on errors + */ +MPG123_EXPORT int mpg123_spf(mpg123_handle *mh); + +/** Get and reset the clip count. + * \param mh handle + * \return count of clipped samples + */ +MPG123_EXPORT long mpg123_clip(mpg123_handle *mh); + + +/** The key values for state information from mpg123_getstate(). */ +enum mpg123_state +{ + MPG123_ACCURATE = 1 /**< Query if positons are currently accurate (integer value, 0 if false, 1 if true). */ + ,MPG123_BUFFERFILL /**< Get fill of internal (feed) input buffer as integer byte count returned as long and as double. An error is returned on integer overflow while converting to (signed) long, but the returned floating point value shold still be fine. */ + ,MPG123_FRANKENSTEIN /**< Stream consists of carelessly stitched together files. Seeking may yield unexpected results (also with MPG123_ACCURATE, it may be confused). */ + ,MPG123_FRESH_DECODER /**< Decoder structure has been updated, possibly indicating changed stream (integer value, 0 if false, 1 if true). Flag is cleared after retrieval. */ +}; + +/** Get various current decoder/stream state information. + * \param mh handle + * \param key the key to identify the information to give. + * \param val the address to return (long) integer values to + * \param fval the address to return floating point values to + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getstate( mpg123_handle *mh +, enum mpg123_state key, long *val, double *fval ); + +/*@}*/ + + +/** \defgroup mpg123_metadata mpg123 metadata handling + * + * Functions to retrieve the metadata from MPEG Audio files and streams. + * Also includes string handling functions. + * + * @{ + */ + +/** Data structure for storing strings in a safer way than a standard C-String. + * Can also hold a number of null-terminated strings. */ +typedef struct +{ + char* p; /**< pointer to the string data */ + size_t size; /**< raw number of bytes allocated */ + size_t fill; /**< number of used bytes (including closing zero byte) */ +} mpg123_string; + +/** Create and allocate memory for a new mpg123_string + * \param sb string handle (address of existing structure on your side) + */ +MPG123_EXPORT void mpg123_init_string(mpg123_string* sb); + +/** Free-up mempory for an existing mpg123_string + * \param sb string handle + */ +MPG123_EXPORT void mpg123_free_string(mpg123_string* sb); + +/** Change the size of a mpg123_string + * \param sb string handle + * \param news new size in bytes + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_resize_string(mpg123_string* sb, size_t news); + +/** Increase size of a mpg123_string if necessary (it may stay larger). + * Note that the functions for adding and setting in current libmpg123 + * use this instead of mpg123_resize_string(). + * That way, you can preallocate memory and safely work afterwards with + * pieces. + * \param sb string handle + * \param news new minimum size + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_grow_string(mpg123_string* sb, size_t news); + +/** Copy the contents of one mpg123_string string to another. + * Yes the order of arguments is reversed compated to memcpy(). + * \param from string handle + * \param to string handle + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_copy_string(mpg123_string* from, mpg123_string* to); + +/** Append a C-String to an mpg123_string + * \param sb string handle + * \param stuff to append + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_add_string(mpg123_string* sb, const char* stuff); + +/** Append a C-substring to an mpg123 string + * \param sb string handle + * \param stuff content to copy + * \param from offset to copy from + * \param count number of characters to copy (a null-byte is always appended) + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_add_substring( mpg123_string *sb +, const char *stuff, size_t from, size_t count ); + +/** Set the content of a mpg123_string to a C-string + * \param sb string handle + * \param stuff content to copy + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_set_string(mpg123_string* sb, const char* stuff); + +/** Set the content of a mpg123_string to a C-substring + * \param sb string handle + * \param stuff the future content + * \param from offset to copy from + * \param count number of characters to copy (a null-byte is always appended) + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_set_substring( mpg123_string *sb +, const char *stuff, size_t from, size_t count ); + +/** Count characters in a mpg123 string (non-null bytes or UTF-8 characters). + * Even with the fill property, the character count is not obvious as there could be multiple trailing null bytes. + * \param sb string handle + * \param utf8 a flag to tell if the string is in utf8 encoding + * \return character count +*/ +MPG123_EXPORT size_t mpg123_strlen(mpg123_string *sb, int utf8); + +/** Remove trailing \\r and \\n, if present. + * \param sb string handle + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_chomp_string(mpg123_string *sb); + +/** The mpg123 text encodings. This contains encodings we encounter in ID3 tags or ICY meta info. */ +enum mpg123_text_encoding +{ + mpg123_text_unknown = 0 /**< Unkown encoding... mpg123_id3_encoding can return that on invalid codes. */ + ,mpg123_text_utf8 = 1 /**< UTF-8 */ + ,mpg123_text_latin1 = 2 /**< ISO-8859-1. Note that sometimes latin1 in ID3 is abused for totally different encodings. */ + ,mpg123_text_icy = 3 /**< ICY metadata encoding, usually CP-1252 but we take it as UTF-8 if it qualifies as such. */ + ,mpg123_text_cp1252 = 4 /**< Really CP-1252 without any guessing. */ + ,mpg123_text_utf16 = 5 /**< Some UTF-16 encoding. The last of a set of leading BOMs (byte order mark) rules. + * When there is no BOM, big endian ordering is used. Note that UCS-2 qualifies as UTF-8 when + * you don't mess with the reserved code points. If you want to decode little endian data + * without BOM you need to prepend 0xff 0xfe yourself. */ + ,mpg123_text_utf16bom = 6 /**< Just an alias for UTF-16, ID3v2 has this as distinct code. */ + ,mpg123_text_utf16be = 7 /**< Another alias for UTF16 from ID3v2. Note, that, because of the mess that is reality, + * BOMs are used if encountered. There really is not much distinction between the UTF16 types for mpg123 + * One exception: Since this is seen in ID3v2 tags, leading null bytes are skipped for all other UTF16 + * types (we expect a BOM before real data there), not so for utf16be!*/ + ,mpg123_text_max = 7 /**< Placeholder for the maximum encoding value. */ +}; + +/** The encoding byte values from ID3v2. */ +enum mpg123_id3_enc +{ + mpg123_id3_latin1 = 0 /**< Note: This sometimes can mean anything in practice... */ + ,mpg123_id3_utf16bom = 1 /**< UTF16, UCS-2 ... it's all the same for practical purposes. */ + ,mpg123_id3_utf16be = 2 /**< Big-endian UTF-16, BOM see note for mpg123_text_utf16be. */ + ,mpg123_id3_utf8 = 3 /**< Our lovely overly ASCII-compatible 8 byte encoding for the world. */ + ,mpg123_id3_enc_max = 3 /**< Placeholder to check valid range of encoding byte. */ +}; + +/** Convert ID3 encoding byte to mpg123 encoding index. + * \param id3_enc_byte the ID3 encoding code + * \return the mpg123 encoding index + */ + +MPG123_EXPORT enum mpg123_text_encoding mpg123_enc_from_id3(unsigned char id3_enc_byte); + +/** Store text data in string, after converting to UTF-8 from indicated encoding + * A prominent error can be that you provided an unknown encoding value, or this build of libmpg123 lacks support for certain encodings (ID3 or ICY stuff missing). + * Also, you might want to take a bit of care with preparing the data; for example, strip leading zeroes (I have seen that). + * \param sb target string + * \param enc mpg123 text encoding value + * \param source source buffer with plain unsigned bytes (you might need to cast from signed char) + * \param source_size number of bytes in the source buffer + * \return 0 on error, 1 on success (on error, mpg123_free_string is called on sb) + */ +MPG123_EXPORT int mpg123_store_utf8(mpg123_string *sb, enum mpg123_text_encoding enc, const unsigned char *source, size_t source_size); + +/** Sub data structure for ID3v2, for storing various text fields (including comments). + * This is for ID3v2 COMM, TXXX and all the other text fields. + * Only COMM and TXXX have a description, only COMM and USLT have a language. + * You should consult the ID3v2 specification for the use of the various text fields ("frames" in ID3v2 documentation, I use "fields" here to separate from MPEG frames). */ +typedef struct +{ + char lang[3]; /**< Three-letter language code (not terminated). */ + char id[4]; /**< The ID3v2 text field id, like TALB, TPE2, ... (4 characters, no string termination). */ + mpg123_string description; /**< Empty for the generic comment... */ + mpg123_string text; /**< ... */ +} mpg123_text; + +/** The picture type values from ID3v2. */ +enum mpg123_id3_pic_type +{ + mpg123_id3_pic_other = 0 /**< see ID3v2 docs */ + ,mpg123_id3_pic_icon = 1 /**< see ID3v2 docs */ + ,mpg123_id3_pic_other_icon = 2 /**< see ID3v2 docs */ + ,mpg123_id3_pic_front_cover = 3 /**< see ID3v2 docs */ + ,mpg123_id3_pic_back_cover = 4 /**< see ID3v2 docs */ + ,mpg123_id3_pic_leaflet = 5 /**< see ID3v2 docs */ + ,mpg123_id3_pic_media = 6 /**< see ID3v2 docs */ + ,mpg123_id3_pic_lead = 7 /**< see ID3v2 docs */ + ,mpg123_id3_pic_artist = 8 /**< see ID3v2 docs */ + ,mpg123_id3_pic_conductor = 9 /**< see ID3v2 docs */ + ,mpg123_id3_pic_orchestra = 10 /**< see ID3v2 docs */ + ,mpg123_id3_pic_composer = 11 /**< see ID3v2 docs */ + ,mpg123_id3_pic_lyricist = 12 /**< see ID3v2 docs */ + ,mpg123_id3_pic_location = 13 /**< see ID3v2 docs */ + ,mpg123_id3_pic_recording = 14 /**< see ID3v2 docs */ + ,mpg123_id3_pic_performance = 15 /**< see ID3v2 docs */ + ,mpg123_id3_pic_video = 16 /**< see ID3v2 docs */ + ,mpg123_id3_pic_fish = 17 /**< see ID3v2 docs */ + ,mpg123_id3_pic_illustration = 18 /**< see ID3v2 docs */ + ,mpg123_id3_pic_artist_logo = 19 /**< see ID3v2 docs */ + ,mpg123_id3_pic_publisher_logo = 20 /**< see ID3v2 docs */ +}; + +/** Sub data structure for ID3v2, for storing picture data including comment. + * This is for the ID3v2 APIC field. You should consult the ID3v2 specification + * for the use of the APIC field ("frames" in ID3v2 documentation, I use "fields" + * here to separate from MPEG frames). */ +typedef struct +{ + char type; /**< mpg123_id3_pic_type value */ + mpg123_string description; /**< description string */ + mpg123_string mime_type; /**< MIME type */ + size_t size; /**< size in bytes */ + unsigned char* data; /**< pointer to the image data */ +} mpg123_picture; + +/** Data structure for storing IDV3v2 tags. + * This structure is not a direct binary mapping with the file contents. + * The ID3v2 text frames are allowed to contain multiple strings. + * So check for null bytes until you reach the mpg123_string fill. + * All text is encoded in UTF-8. */ +typedef struct +{ + unsigned char version; /**< 3 or 4 for ID3v2.3 or ID3v2.4. */ + mpg123_string *title; /**< Title string (pointer into text_list). */ + mpg123_string *artist; /**< Artist string (pointer into text_list). */ + mpg123_string *album; /**< Album string (pointer into text_list). */ + mpg123_string *year; /**< The year as a string (pointer into text_list). */ + mpg123_string *genre; /**< Genre String (pointer into text_list). The genre string(s) may very well need postprocessing, esp. for ID3v2.3. */ + mpg123_string *comment; /**< Pointer to last encountered comment text with empty description. */ + /* Encountered ID3v2 fields are appended to these lists. + There can be multiple occurences, the pointers above always point to the last encountered data. */ + mpg123_text *comment_list; /**< Array of comments. */ + size_t comments; /**< Number of comments. */ + mpg123_text *text; /**< Array of ID3v2 text fields (including USLT) */ + size_t texts; /**< Numer of text fields. */ + mpg123_text *extra; /**< The array of extra (TXXX) fields. */ + size_t extras; /**< Number of extra text (TXXX) fields. */ + mpg123_picture *picture; /**< Array of ID3v2 pictures fields (APIC). */ + size_t pictures; /**< Number of picture (APIC) fields. */ +} mpg123_id3v2; + +/** Data structure for ID3v1 tags (the last 128 bytes of a file). + * Don't take anything for granted (like string termination)! + * Also note the change ID3v1.1 did: comment[28] = 0; comment[29] = track_number + * It is your task to support ID3v1 only or ID3v1.1 ...*/ +typedef struct +{ + char tag[3]; /**< Always the string "TAG", the classic intro. */ + char title[30]; /**< Title string. */ + char artist[30]; /**< Artist string. */ + char album[30]; /**< Album string. */ + char year[4]; /**< Year string. */ + char comment[30]; /**< Comment string. */ + unsigned char genre; /**< Genre index. */ +} mpg123_id3v1; + +#define MPG123_ID3 0x3 /**< 0011 There is some ID3 info. Also matches 0010 or NEW_ID3. */ +#define MPG123_NEW_ID3 0x1 /**< 0001 There is ID3 info that changed since last call to mpg123_id3. */ +#define MPG123_ICY 0xc /**< 1100 There is some ICY info. Also matches 0100 or NEW_ICY.*/ +#define MPG123_NEW_ICY 0x4 /**< 0100 There is ICY info that changed since last call to mpg123_icy. */ + +/** Query if there is (new) meta info, be it ID3 or ICY (or something new in future). + * \param mh handle + * \return combination of flags, 0 on error (same as "nothing new") + */ +MPG123_EXPORT int mpg123_meta_check(mpg123_handle *mh); + +/** Clean up meta data storage (ID3v2 and ICY), freeing memory. + * \param mh handle + */ +MPG123_EXPORT void mpg123_meta_free(mpg123_handle *mh); + +/** Point v1 and v2 to existing data structures wich may change on any next read/decode function call. + * v1 and/or v2 can be set to NULL when there is no corresponding data. + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_id3( mpg123_handle *mh +, mpg123_id3v1 **v1, mpg123_id3v2 **v2 ); + +/** Point icy_meta to existing data structure wich may change on any next read/decode function call. + * \param mh handle + * \param icy_meta return address for ICY meta string (set to NULL if nothing there) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_icy(mpg123_handle *mh, char **icy_meta); + +/** Decode from windows-1252 (the encoding ICY metainfo used) to UTF-8. + * Note that this is very similar to mpg123_store_utf8(&sb, mpg123_text_icy, icy_text, strlen(icy_text+1)) . + * \param icy_text The input data in ICY encoding + * \return pointer to newly allocated buffer with UTF-8 data (You free() it!) */ +MPG123_EXPORT char* mpg123_icy2utf8(const char* icy_text); + + +/* @} */ + + +/** \defgroup mpg123_advpar mpg123 advanced parameter API + * + * Direct access to a parameter set without full handle around it. + * Possible uses: + * - Influence behaviour of library _during_ initialization of handle (MPG123_VERBOSE). + * - Use one set of parameters for multiple handles. + * + * The functions for handling mpg123_pars (mpg123_par() and mpg123_fmt() + * family) directly return a fully qualified mpg123 error code, the ones + * operating on full handles normally MPG123_OK or MPG123_ERR, storing the + * specific error code itseld inside the handle. + * + * @{ + */ + +/** Opaque structure for the libmpg123 decoder parameters. */ +struct mpg123_pars_struct; + +/** Opaque structure for the libmpg123 decoder parameters. */ +typedef struct mpg123_pars_struct mpg123_pars; + +/** Create a handle with preset parameters. + * \param mp parameter handle + * \param decoder decoder choice + * \param error error code return address + * \return mpg123 handle + */ +MPG123_EXPORT mpg123_handle *mpg123_parnew( mpg123_pars *mp +, const char* decoder, int *error ); + +/** Allocate memory for and return a pointer to a new mpg123_pars + * \param error error code return address + * \return new parameter handle + */ +MPG123_EXPORT mpg123_pars *mpg123_new_pars(int *error); + +/** Delete and free up memory used by a mpg123_pars data structure + * \param mp parameter handle + */ +MPG123_EXPORT void mpg123_delete_pars(mpg123_pars* mp); + +/** Configure mpg123 parameters to accept no output format at all, + * use before specifying supported formats with mpg123_format + * \param mp parameter handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_fmt_none(mpg123_pars *mp); + +/** Configure mpg123 parameters to accept all formats + * (also any custom rate you may set) -- this is default. + * \param mp parameter handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_fmt_all(mpg123_pars *mp); + +/** Set the audio format support of a mpg123_pars in detail: + * \param mp parameter handle + * \param rate The sample rate value (in Hertz). + * \param channels A combination of MPG123_STEREO and MPG123_MONO. + * \param encodings A combination of accepted encodings for rate and channels, + * p.ex MPG123_ENC_SIGNED16|MPG123_ENC_ULAW_8 (or 0 for no + * support). + * \return MPG123_OK on success +*/ +MPG123_EXPORT int mpg123_fmt(mpg123_pars *mp +, long rate, int channels, int encodings); + +/** Check to see if a specific format at a specific rate is supported + * by mpg123_pars. + * \param mp parameter handle + * \param rate sampling rate + * \param encoding encoding + * \return 0 for no support (that includes invalid parameters), MPG123_STEREO, + * MPG123_MONO or MPG123_STEREO|MPG123_MONO. */ +MPG123_EXPORT int mpg123_fmt_support(mpg123_pars *mp, long rate, int encoding); + +/** Set a specific parameter, for a specific mpg123_pars, using a parameter + * type key chosen from the mpg123_parms enumeration, to the specified value. + * \param mp parameter handle + * \param type parameter choice + * \param value integer value + * \param fvalue floating point value + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_par( mpg123_pars *mp +, enum mpg123_parms type, long value, double fvalue ); + +/** Get a specific parameter, for a specific mpg123_pars. + * See the mpg123_parms enumeration for a list of available parameters. + * \param mp parameter handle + * \param type parameter choice + * \param value integer value return address + * \param fvalue floating point value return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getpar( mpg123_pars *mp +, enum mpg123_parms type, long *value, double *fvalue); + +/* @} */ + + +/** \defgroup mpg123_lowio mpg123 low level I/O + * You may want to do tricky stuff with I/O that does not work with mpg123's default file access or you want to make it decode into your own pocket... + * + * @{ */ + +/** Replace default internal buffer with user-supplied buffer. + * Instead of working on it's own private buffer, mpg123 will directly use the one you provide for storing decoded audio. + * Note that the required buffer size could be bigger than expected from output + * encoding if libmpg123 has to convert from primary decoder output (p.ex. 32 bit + * storage for 24 bit output). + * \param mh handle + * \param data pointer to user buffer + * \param size of buffer in bytes + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_buffer(mpg123_handle *mh +, unsigned char *data, size_t size); + +/** The max size of one frame's decoded output with current settings. + * Use that to determine an appropriate minimum buffer size for decoding one frame. + * \param mh handle + * \return maximum decoded data size in bytes + */ +MPG123_EXPORT size_t mpg123_outblock(mpg123_handle *mh); + +/** Replace low-level stream access functions; read and lseek as known in POSIX. + * You can use this to make any fancy file opening/closing yourself, + * using mpg123_open_fd() to set the file descriptor for your read/lseek + * (doesn't need to be a "real" file descriptor...). + * Setting a function to NULL means that the default internal read is + * used (active from next mpg123_open call on). + * Note: As it would be troublesome to mess with this while having a file open, + * this implies mpg123_close(). + * \param mh handle + * \param r_read callback for reading (behaviour like POSIX read) + * \param r_lseek callback for seeking (like POSIX lseek) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_reader( mpg123_handle *mh +, ssize_t (*r_read) (int, void *, size_t) +, off_t (*r_lseek)(int, off_t, int) +); + +/** Replace I/O functions with your own ones operating on some kind of + * handle instead of integer descriptors. + * The handle is a void pointer, so you can pass any data you want... + * mpg123_open_handle() is the call you make to use the I/O defined here. + * There is no fallback to internal read/seek here. + * Note: As it would be troublesome to mess with this while having a file open, + * this mpg123_close() is implied here. + * \param mh handle + * \param r_read callback for reading (behaviour like POSIX read) + * \param r_lseek callback for seeking (like POSIX lseek) + * \param cleanup A callback to clean up an I/O handle on mpg123_close, + * can be NULL for none (you take care of cleaning your handles). + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_reader_handle( mpg123_handle *mh +, ssize_t (*r_read) (void *, void *, size_t) +, off_t (*r_lseek)(void *, off_t, int) +, void (*cleanup)(void*) ); + +/* @} */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/deps/mpg123/src/libmpg123/mpg123.h.in b/deps/mpg123/src/libmpg123/mpg123.h.in index f250fd2..40792a3 100644 --- a/deps/mpg123/src/libmpg123/mpg123.h.in +++ b/deps/mpg123/src/libmpg123/mpg123.h.in @@ -1,33 +1,53 @@ /* libmpg123: MPEG Audio Decoder library (version @PACKAGE_VERSION@) - copyright 1995-2010 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2015 by the mpg123 project + free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org */ #ifndef MPG123_LIB_H #define MPG123_LIB_H +#include + /** \file mpg123.h The header file for the libmpg123 MPEG Audio decoder */ -/* A macro to check at compile time which set of API functions to expect. - This should be incremented at least each time a new symbol is added to the header. */ +/** A macro to check at compile time which set of API functions to expect. + * This should be incremented at least each time a new symbol is added + * to the header. + */ #define MPG123_API_VERSION @API_VERSION@ -/* These aren't actually in use... seems to work without using libtool. */ +#ifndef MPG123_EXPORT +/** Defines needed for MS Visual Studio(tm) DLL builds. + * Every public function must be prefixed with MPG123_EXPORT. When building + * the DLL ensure to define BUILD_MPG123_DLL. This makes the function accessible + * for clients and includes it in the import library which is created together + * with the DLL. When consuming the DLL ensure to define LINK_MPG123_DLL which + * imports the functions from the DLL. + */ #ifdef BUILD_MPG123_DLL /* The dll exports. */ -#define EXPORT __declspec(dllexport) +#define MPG123_EXPORT __declspec(dllexport) #else #ifdef LINK_MPG123_DLL /* The exe imports. */ -#define EXPORT __declspec(dllimport) +#define MPG123_EXPORT __declspec(dllimport) #else /* Nothing on normal/UNIX builds */ -#define EXPORT +#define MPG123_EXPORT +#endif #endif #endif +/* This is for Visual Studio, so this header works as distributed in the binary downloads */ +#if defined(_MSC_VER) && !defined(MPG123_DEF_SSIZE_T) +#define MPG123_DEF_SSIZE_T +#include +typedef ptrdiff_t ssize_t; +#endif + #ifndef MPG123_NO_CONFIGURE /* Enable use of this file without configure. */ @INCLUDE_STDLIB_H@ @INCLUDE_SYS_TYPE_H@ @@ -79,6 +99,7 @@ #define mpg123_set_index MPG123_LARGENAME(mpg123_set_index) #define mpg123_position MPG123_LARGENAME(mpg123_position) #define mpg123_length MPG123_LARGENAME(mpg123_length) +#define mpg123_framelength MPG123_LARGENAME(mpg123_framelength) #define mpg123_set_filesize MPG123_LARGENAME(mpg123_set_filesize) #define mpg123_replace_reader MPG123_LARGENAME(mpg123_replace_reader) #define mpg123_replace_reader_handle MPG123_LARGENAME(mpg123_replace_reader_handle) @@ -114,22 +135,26 @@ typedef struct mpg123_handle_struct mpg123_handle; * * \return MPG123_OK if successful, otherwise an error number. */ -EXPORT int mpg123_init(void); +MPG123_EXPORT int mpg123_init(void); /** Function to close down the mpg123 library. * This function is not thread-safe. Call it exactly once per process, before any other (possibly threaded) work with the library. */ -EXPORT void mpg123_exit(void); +MPG123_EXPORT void mpg123_exit(void); /** Create a handle with optional choice of decoder (named by a string, see mpg123_decoders() or mpg123_supported_decoders()). * and optional retrieval of an error code to feed to mpg123_plain_strerror(). * Optional means: Any of or both the parameters may be NULL. * - * \return Non-NULL pointer when successful. + * \param decoder optional choice of decoder variant (NULL for default) + * \param error optional address to store error codes + * \return Non-NULL pointer to fresh handle when successful. */ -EXPORT mpg123_handle *mpg123_new(const char* decoder, int *error); +MPG123_EXPORT mpg123_handle *mpg123_new(const char* decoder, int *error); -/** Delete handle, mh is either a valid mpg123 handle or NULL. */ -EXPORT void mpg123_delete(mpg123_handle *mh); +/** Delete handle, mh is either a valid mpg123 handle or NULL. + * \param mh handle + */ +MPG123_EXPORT void mpg123_delete(mpg123_handle *mh); /** Enumeration of the parameters types that it is possible to set/get. */ enum mpg123_parms @@ -175,6 +200,14 @@ enum mpg123_param_flags ,MPG123_SKIP_ID3V2 = 0x2000 /**< 10 0000 0000 0000 Do not parse ID3v2 tags, just skip them. */ ,MPG123_IGNORE_INFOFRAME = 0x4000 /**< 100 0000 0000 0000 Do not parse the LAME/Xing info frame, treat it as normal MPEG data. */ ,MPG123_AUTO_RESAMPLE = 0x8000 /**< 1000 0000 0000 0000 Allow automatic internal resampling of any kind (default on if supported). Especially when going lowlevel with replacing output buffer, you might want to unset this flag. Setting MPG123_DOWNSAMPLE or MPG123_FORCE_RATE will override this. */ + ,MPG123_PICTURE = 0x10000 /**< 17th bit: Enable storage of pictures from tags (ID3v2 APIC). */ + ,MPG123_NO_PEEK_END = 0x20000 /**< 18th bit: Do not seek to the end of + * the stream in order to probe + * the stream length and search for the id3v1 field. This also means + * the file size is unknown unless set using mpg123_set_filesize() and + * the stream is assumed as non-seekable unless overridden. + */ + ,MPG123_FORCE_SEEKABLE = 0x40000 /**< 19th bit: Force the stream to be seekable. */ }; /** choices for MPG123_RVA */ @@ -186,15 +219,27 @@ enum mpg123_param_rva ,MPG123_RVA_MAX = MPG123_RVA_ALBUM /**< The maximum RVA code, may increase in future. */ }; -/* TODO: Assess the possibilities and troubles of changing parameters during playback. */ - /** Set a specific parameter, for a specific mpg123_handle, using a parameter - * type key chosen from the mpg123_parms enumeration, to the specified value. */ -EXPORT int mpg123_param(mpg123_handle *mh, enum mpg123_parms type, long value, double fvalue); + * type key chosen from the mpg123_parms enumeration, to the specified value. + * \param mh handle + * \param type parameter choice + * \param value integer value + * \param fvalue floating point value + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_param( mpg123_handle *mh +, enum mpg123_parms type, long value, double fvalue ); /** Get a specific parameter, for a specific mpg123_handle. - * See the mpg123_parms enumeration for a list of available parameters. */ -EXPORT int mpg123_getparam(mpg123_handle *mh, enum mpg123_parms type, long *val, double *fval); + * See the mpg123_parms enumeration for a list of available parameters. + * \param mh handle + * \param type parameter choice + * \param value integer value return address + * \param fvalue floating point value return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getparam( mpg123_handle *mh +, enum mpg123_parms type, long *value, double *fvalue ); /** Feature set available for query with mpg123_feature. */ enum mpg123_feature_set @@ -213,10 +258,14 @@ enum mpg123_feature_set ,MPG123_FEATURE_DECODE_NTOM /**< flexible rate decoding */ ,MPG123_FEATURE_PARSE_ICY /**< ICY support */ ,MPG123_FEATURE_TIMEOUT_READ /**< Reader with timeout (network). */ + ,MPG123_FEATURE_EQUALIZER /**< tunable equalizer */ }; -/** Query libmpg123 feature, 1 for success, 0 for unimplemented functions. */ -EXPORT int mpg123_feature(const enum mpg123_feature_set key); +/** Query libmpg123 features. + * \param key feature selection + * \return 1 for success, 0 for unimplemented functions + */ +MPG123_EXPORT int mpg123_feature(const enum mpg123_feature_set key); /* @} */ @@ -226,9 +275,28 @@ EXPORT int mpg123_feature(const enum mpg123_feature_set key); * Functions to get text version of the error numbers and an enumeration * of the error codes returned by libmpg123. * - * Most functions operating on a mpg123_handle simply return MPG123_OK on success and MPG123_ERR on failure (setting the internal error variable of the handle to the specific error code). - * Decoding/seek functions may also return message codes MPG123_DONE, MPG123_NEW_FORMAT and MPG123_NEED_MORE (please read up on these on how to react!). - * The positive range of return values is used for "useful" values when appropriate. + * Most functions operating on a mpg123_handle simply return MPG123_OK (0) + * on success and MPG123_ERR (-1) on failure, setting the internal error + * variable of the handle to the specific error code. If there was not a valid + * (non-NULL) handle provided to a function operating on one, MPG123_BAD_HANDLE + * may be returned if this can not be confused with a valid positive return + * value. + * Meaning: A function expected to return positive integers on success will + * always indicate error or a special condition by returning a negative one. + * + * Decoding/seek functions may also return message codes MPG123_DONE, + * MPG123_NEW_FORMAT and MPG123_NEED_MORE (all negative, see below on how to + * react). Note that calls to those can be nested, so generally watch out + * for these codes after initial handle setup. + * Especially any function that needs information about the current stream + * to work will try to at least parse the beginning if that did not happen + * yet. + * + * On a function that is supposed to return MPG123_OK on success and + * MPG123_ERR on failure, make sure you check for != MPG123_OK, not + * == MPG123_ERR, as the error code could get more specific in future, + * or there is just a special message from a decoding routine as indicated + * above. * * @{ */ @@ -286,17 +354,26 @@ enum mpg123_errors ,MPG123_INT_OVERFLOW /**< Some integer overflow. */ }; -/** Return a string describing that error errcode means. */ -EXPORT const char* mpg123_plain_strerror(int errcode); +/** Look up error strings given integer code. + * \param errcode integer error code + * \return string describing what that error error code means + */ +MPG123_EXPORT const char* mpg123_plain_strerror(int errcode); /** Give string describing what error has occured in the context of handle mh. * When a function operating on an mpg123 handle returns MPG123_ERR, you should check for the actual reason via * char *errmsg = mpg123_strerror(mh) - * This function will catch mh == NULL and return the message for MPG123_BAD_HANDLE. */ -EXPORT const char* mpg123_strerror(mpg123_handle *mh); + * This function will catch mh == NULL and return the message for MPG123_BAD_HANDLE. + * \param mh handle + * \return error message + */ +MPG123_EXPORT const char* mpg123_strerror(mpg123_handle *mh); -/** Return the plain errcode intead of a string. */ -EXPORT int mpg123_errcode(mpg123_handle *mh); +/** Return the plain errcode intead of a string. + * \param mh handle + * \return error code recorded in handle or MPG123_BAD_HANDLE + */ +MPG123_EXPORT int mpg123_errcode(mpg123_handle *mh); /*@}*/ @@ -309,21 +386,33 @@ EXPORT int mpg123_errcode(mpg123_handle *mh); * @{ */ -/** Return a NULL-terminated array of generally available decoder names (plain 8bit ASCII). */ -EXPORT const char **mpg123_decoders(void); - -/** Return a NULL-terminated array of the decoders supported by the CPU (plain 8bit ASCII). */ -EXPORT const char **mpg123_supported_decoders(void); +/** Get available decoder list. + * \return NULL-terminated array of generally available decoder names (plain 8bit ASCII) + */ +MPG123_EXPORT const char **mpg123_decoders(void); -/** Set the chosen decoder to 'decoder_name' */ -EXPORT int mpg123_decoder(mpg123_handle *mh, const char* decoder_name); +/** Get supported decoder list. + * \return NULL-terminated array of the decoders supported by the CPU (plain 8bit ASCII) + */ +MPG123_EXPORT const char **mpg123_supported_decoders(void); -/** Get the currently active decoder engine name. - The active decoder engine can vary depening on output constraints, - mostly non-resampling, integer output is accelerated via 3DNow & Co. but for other modes a fallback engine kicks in. - Note that this can return a decoder that is ony active in the hidden and not available as decoder choice from the outside. - \return The decoder name or NULL on error. */ -EXPORT const char* mpg123_current_decoder(mpg123_handle *mh); +/** Set the active decoder. + * \param mh handle + * \param decoder_name name of decoder + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_decoder(mpg123_handle *mh, const char* decoder_name); + +/** Get the currently active decoder name. + * The active decoder engine can vary depening on output constraints, + * mostly non-resampling, integer output is accelerated via 3DNow & Co. but for + * other modes a fallback engine kicks in. + * Note that this can return a decoder that is only active in the hidden and not + * available as decoder choice from the outside. + * \param mh handle + * \return The decoder name or NULL on error. + */ +MPG123_EXPORT const char* mpg123_current_decoder(mpg123_handle *mh); /*@}*/ @@ -334,7 +423,7 @@ EXPORT const char* mpg123_current_decoder(mpg123_handle *mh); * * Before you dive in, please be warned that you might get confused by this. This seems to happen a lot, therefore I am trying to explain in advance. * - * The mpg123 library decides what output format to use when encountering the first frame in a stream, or actually any frame that is still valid but differs from the frames before in the prompted output format. At such a deciding point, an internal table of allowed encodings, sampling rates and channel setups is consulted. According to this table, an output format is chosen and the decoding engine set up accordingly (including ptimized routines for different output formats). This might seem unusual but it just follows from the non-existence of "MPEG audio files" with defined overall properties. There are streams, streams are concatenations of (semi) independent frames. We store streams on disk and call them "MPEG audio files", but that does not change their nature as the decoder is concerned (the LAME/Xing header for gapless decoding makes things interesting again). + * The mpg123 library decides what output format to use when encountering the first frame in a stream, or actually any frame that is still valid but differs from the frames before in the prompted output format. At such a deciding point, an internal table of allowed encodings, sampling rates and channel setups is consulted. According to this table, an output format is chosen and the decoding engine set up accordingly (including optimized routines for different output formats). This might seem unusual but it just follows from the non-existence of "MPEG audio files" with defined overall properties. There are streams, streams are concatenations of (semi) independent frames. We store streams on disk and call them "MPEG audio files", but that does not change their nature as the decoder is concerned (the LAME/Xing header for gapless decoding makes things interesting again). * * To get to the point: What you do with mpg123_format() and friends is to fill the internal table of allowed formats before it is used. That includes removing support for some formats or adding your forced sample rate (see MPG123_FORCE_RATE) that will be used with the crude internal resampler. Also keep in mind that the sample encoding is just a question of choice -- the MPEG frames do only indicate their native sampling rate and channel count. If you want to decode to integer or float samples, 8 or 16 bit ... that is your decision. In a "clean" world, libmpg123 would always decode to 32 bit float and let you handle any sample conversion. But there are optimized routines that work faster by directly decoding to the desired encoding / accuracy. We prefer efficiency over conceptual tidyness. * @@ -345,53 +434,11 @@ EXPORT const char* mpg123_current_decoder(mpg123_handle *mh); * @{ */ -/** An enum over all sample types possibly known to mpg123. - * The values are designed as bit flags to allow bitmasking for encoding families. - * - * Note that (your build of) libmpg123 does not necessarily support all these. - * Usually, you can expect the 8bit encodings and signed 16 bit. - * Also 32bit float will be usual beginning with mpg123-1.7.0 . - * What you should bear in mind is that (SSE, etc) optimized routines may be absent - * for some formats. We do have SSE for 16, 32 bit and float, though. - * 24 bit integer is done via postprocessing of 32 bit output -- just cutting - * the last byte, no rounding, even. If you want better, do it yourself. - * - * All formats are in native byte order. If you need different endinaness, you - * can simply postprocess the output buffers (libmpg123 wouldn't do anything else). - * mpg123_encsize() can be helpful there. - */ -enum mpg123_enc_enum -{ - MPG123_ENC_8 = 0x00f /**< 0000 0000 1111 Some 8 bit integer encoding. */ - ,MPG123_ENC_16 = 0x040 /**< 0000 0100 0000 Some 16 bit integer encoding. */ - ,MPG123_ENC_24 = 0x4000 /**< 0100 0000 0000 0000 Some 24 bit integer encoding. */ - ,MPG123_ENC_32 = 0x100 /**< 0001 0000 0000 Some 32 bit integer encoding. */ - ,MPG123_ENC_SIGNED = 0x080 /**< 0000 1000 0000 Some signed integer encoding. */ - ,MPG123_ENC_FLOAT = 0xe00 /**< 1110 0000 0000 Some float encoding. */ - ,MPG123_ENC_SIGNED_16 = (MPG123_ENC_16|MPG123_ENC_SIGNED|0x10) /**< 1101 0000 signed 16 bit */ - ,MPG123_ENC_UNSIGNED_16 = (MPG123_ENC_16|0x20) /**< 0110 0000 unsigned 16 bit */ - ,MPG123_ENC_UNSIGNED_8 = 0x01 /**< 0000 0001 unsigned 8 bit */ - ,MPG123_ENC_SIGNED_8 = (MPG123_ENC_SIGNED|0x02) /**< 1000 0010 signed 8 bit */ - ,MPG123_ENC_ULAW_8 = 0x04 /**< 0000 0100 ulaw 8 bit */ - ,MPG123_ENC_ALAW_8 = 0x08 /**< 0000 1000 alaw 8 bit */ - ,MPG123_ENC_SIGNED_32 = MPG123_ENC_32|MPG123_ENC_SIGNED|0x1000 /**< 0001 0001 1000 0000 signed 32 bit */ - ,MPG123_ENC_UNSIGNED_32 = MPG123_ENC_32|0x2000 /**< 0010 0001 0000 0000 unsigned 32 bit */ - ,MPG123_ENC_SIGNED_24 = MPG123_ENC_24|MPG123_ENC_SIGNED|0x1000 /**< 0101 0000 1000 0000 signed 24 bit */ - ,MPG123_ENC_UNSIGNED_24 = MPG123_ENC_24|0x2000 /**< 0110 0000 0000 0000 unsigned 24 bit */ - ,MPG123_ENC_FLOAT_32 = 0x200 /**< 0010 0000 0000 32bit float */ - ,MPG123_ENC_FLOAT_64 = 0x400 /**< 0100 0000 0000 64bit float */ - ,MPG123_ENC_ANY = ( MPG123_ENC_SIGNED_16 | MPG123_ENC_UNSIGNED_16 | MPG123_ENC_UNSIGNED_8 - | MPG123_ENC_SIGNED_8 | MPG123_ENC_ULAW_8 | MPG123_ENC_ALAW_8 - | MPG123_ENC_SIGNED_32 | MPG123_ENC_UNSIGNED_32 - | MPG123_ENC_SIGNED_24 | MPG123_ENC_UNSIGNED_24 - | MPG123_ENC_FLOAT_32 | MPG123_ENC_FLOAT_64 ) /**< Any encoding on the list. */ -}; - /** They can be combined into one number (3) to indicate mono and stereo... */ enum mpg123_channelcount { - MPG123_MONO = 1 - ,MPG123_STEREO = 2 + MPG123_MONO = 1 /**< mono */ + ,MPG123_STEREO = 2 /**< stereo */ }; /** An array of supported standard sample rates @@ -399,43 +446,79 @@ enum mpg123_channelcount * You can still force mpg123 to resample to a different one, but by default you will only get audio in one of these samplings. * \param list Store a pointer to the sample rates array there. * \param number Store the number of sample rates there. */ -EXPORT void mpg123_rates(const long **list, size_t *number); +MPG123_EXPORT void mpg123_rates(const long **list, size_t *number); /** An array of supported audio encodings. * An audio encoding is one of the fully qualified members of mpg123_enc_enum (MPG123_ENC_SIGNED_16, not MPG123_SIGNED). * \param list Store a pointer to the encodings array there. * \param number Store the number of encodings there. */ -EXPORT void mpg123_encodings(const int **list, size_t *number); +MPG123_EXPORT void mpg123_encodings(const int **list, size_t *number); /** Return the size (in bytes) of one mono sample of the named encoding. * \param encoding The encoding value to analyze. * \return positive size of encoding in bytes, 0 on invalid encoding. */ -EXPORT int mpg123_encsize(int encoding); +MPG123_EXPORT int mpg123_encsize(int encoding); /** Configure a mpg123 handle to accept no output format at all, - * use before specifying supported formats with mpg123_format */ -EXPORT int mpg123_format_none(mpg123_handle *mh); + * use before specifying supported formats with mpg123_format + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_format_none(mpg123_handle *mh); /** Configure mpg123 handle to accept all formats - * (also any custom rate you may set) -- this is default. */ -EXPORT int mpg123_format_all(mpg123_handle *mh); + * (also any custom rate you may set) -- this is default. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_format_all(mpg123_handle *mh); /** Set the audio format support of a mpg123_handle in detail: - * \param mh audio decoder handle + * \param mh handle * \param rate The sample rate value (in Hertz). * \param channels A combination of MPG123_STEREO and MPG123_MONO. * \param encodings A combination of accepted encodings for rate and channels, p.ex MPG123_ENC_SIGNED16 | MPG123_ENC_ULAW_8 (or 0 for no support). Please note that some encodings may not be supported in the library build and thus will be ignored here. * \return MPG123_OK on success, MPG123_ERR if there was an error. */ -EXPORT int mpg123_format(mpg123_handle *mh, long rate, int channels, int encodings); +MPG123_EXPORT int mpg123_format( mpg123_handle *mh +, long rate, int channels, int encodings ); /** Check to see if a specific format at a specific rate is supported * by mpg123_handle. + * \param mh handle + * \param rate sampling rate + * \param encoding encoding * \return 0 for no support (that includes invalid parameters), MPG123_STEREO, * MPG123_MONO or MPG123_STEREO|MPG123_MONO. */ -EXPORT int mpg123_format_support(mpg123_handle *mh, long rate, int encoding); - -/** Get the current output format written to the addresses givenr. */ -EXPORT int mpg123_getformat(mpg123_handle *mh, long *rate, int *channels, int *encoding); +MPG123_EXPORT int mpg123_format_support( mpg123_handle *mh +, long rate, int encoding ); + +/** Get the current output format written to the addresses given. + * If the stream is freshly loaded, this will try to parse enough + * of it to give you the format to come. This clears the flag that + * would otherwise make the first decoding call return + * MPG123_NEW_FORMAT. + * \param mh handle + * \param rate sampling rate return address + * \param channels channel count return address + * \param encoding encoding return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getformat( mpg123_handle *mh +, long *rate, int *channels, int *encoding ); + +/** Get the current output format written to the addresses given. + * This differs from plain mpg123_getformat() in that you can choose + * _not_ to clear the flag that would trigger the next decoding call + * to return MPG123_NEW_FORMAT in case of a new format arriving. + * \param mh handle + * \param rate sampling rate return address + * \param channels channel count return address + * \param encoding encoding return address + * \param clear_flag if true, clear internal format flag + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getformat2( mpg123_handle *mh +, long *rate, int *channels, int *encoding, int clear_flag ); /*@}*/ @@ -453,41 +536,61 @@ EXPORT int mpg123_getformat(mpg123_handle *mh, long *rate, int *channels, int *e /** Open and prepare to decode the specified file by filesystem path. * This does not open HTTP urls; libmpg123 contains no networking code. * If you want to decode internet streams, use mpg123_open_fd() or mpg123_open_feed(). + * \param mh handle + * \param path filesystem path + * \return MPG123_OK on success */ -EXPORT int mpg123_open(mpg123_handle *mh, const char *path); +MPG123_EXPORT int mpg123_open(mpg123_handle *mh, const char *path); /** Use an already opened file descriptor as the bitstream input * mpg123_close() will _not_ close the file descriptor. + * \param mh handle + * \param fd file descriptor + * \return MPG123_OK on success */ -EXPORT int mpg123_open_fd(mpg123_handle *mh, int fd); +MPG123_EXPORT int mpg123_open_fd(mpg123_handle *mh, int fd); /** Use an opaque handle as bitstream input. This works only with the * replaced I/O from mpg123_replace_reader_handle()! * mpg123_close() will call the cleanup callback for your handle (if you gave one). + * \param mh handle + * \param iohandle your handle + * \return MPG123_OK on success */ -EXPORT int mpg123_open_handle(mpg123_handle *mh, void *iohandle); +MPG123_EXPORT int mpg123_open_handle(mpg123_handle *mh, void *iohandle); /** Open a new bitstream and prepare for direct feeding * This works together with mpg123_decode(); you are responsible for reading and feeding the input bitstream. + * \param mh handle + * \return MPG123_OK on success */ -EXPORT int mpg123_open_feed(mpg123_handle *mh); +MPG123_EXPORT int mpg123_open_feed(mpg123_handle *mh); -/** Closes the source, if libmpg123 opened it. */ -EXPORT int mpg123_close(mpg123_handle *mh); +/** Closes the source, if libmpg123 opened it. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_close(mpg123_handle *mh); /** Read from stream and decode up to outmemsize bytes. + * \param mh handle * \param outmemory address of output buffer to write to * \param outmemsize maximum number of bytes to write * \param done address to store the number of actually decoded bytes to - * \return error/message code (watch out for MPG123_DONE and friends!) */ -EXPORT int mpg123_read(mpg123_handle *mh, unsigned char *outmemory, size_t outmemsize, size_t *done); + * \return MPG123_OK or error/message code + */ +MPG123_EXPORT int mpg123_read(mpg123_handle *mh +, unsigned char *outmemory, size_t outmemsize, size_t *done ); /** Feed data for a stream that has been opened with mpg123_open_feed(). * It's give and take: You provide the bytestream, mpg123 gives you the decoded samples. + * \param mh handle * \param in input buffer * \param size number of input bytes - * \return error/message code. */ -EXPORT int mpg123_feed(mpg123_handle *mh, const unsigned char *in, size_t size); + * \return MPG123_OK or error/message code. + */ +MPG123_EXPORT int mpg123_feed( mpg123_handle *mh +, const unsigned char *in, size_t size ); /** Decode MPEG Audio from inmemory to outmemory. * This is very close to a drop-in replacement for old mpglib. @@ -496,6 +599,7 @@ EXPORT int mpg123_feed(mpg123_handle *mh, const unsigned char *in, size_t size); * without taking decoded data. * Think of this function being the union of mpg123_read() and mpg123_feed() (which it actually is, sort of;-). * You can actually always decide if you want those specialized functions in separate steps or one call this one here. + * \param mh handle * \param inmemory input buffer * \param inmemsize number of input bytes * \param outmemory output buffer @@ -503,30 +607,40 @@ EXPORT int mpg123_feed(mpg123_handle *mh, const unsigned char *in, size_t size); * \param done address to store the number of actually decoded bytes to * \return error/message code (watch out especially for MPG123_NEED_MORE) */ -EXPORT int mpg123_decode(mpg123_handle *mh, const unsigned char *inmemory, size_t inmemsize, unsigned char *outmemory, size_t outmemsize, size_t *done); +MPG123_EXPORT int mpg123_decode( mpg123_handle *mh +, const unsigned char *inmemory, size_t inmemsize +, unsigned char *outmemory, size_t outmemsize, size_t *done ); /** Decode next MPEG frame to internal buffer * or read a frame and return after setting a new format. + * \param mh handle * \param num current frame offset gets stored there * \param audio This pointer is set to the internal buffer to read the decoded audio from. * \param bytes number of output bytes ready in the buffer + * \return MPG123_OK or error/message code */ -EXPORT int mpg123_decode_frame(mpg123_handle *mh, off_t *num, unsigned char **audio, size_t *bytes); +MPG123_EXPORT int mpg123_decode_frame( mpg123_handle *mh +, off_t *num, unsigned char **audio, size_t *bytes ); /** Decode current MPEG frame to internal buffer. * Warning: This is experimental API that might change in future releases! * Please watch mpg123 development closely when using it. + * \param mh handle * \param num last frame offset gets stored there * \param audio this pointer is set to the internal buffer to read the decoded audio from. * \param bytes number of output bytes ready in the buffer + * \return MPG123_OK or error/message code */ -EXPORT int mpg123_framebyframe_decode(mpg123_handle *mh, off_t *num, unsigned char **audio, size_t *bytes); +MPG123_EXPORT int mpg123_framebyframe_decode( mpg123_handle *mh +, off_t *num, unsigned char **audio, size_t *bytes ); /** Find, read and parse the next mp3 frame * Warning: This is experimental API that might change in future releases! * Please watch mpg123 development closely when using it. + * \param mh handle + * \return MPG123_OK or error/message code */ -EXPORT int mpg123_framebyframe_next(mpg123_handle *mh); +MPG123_EXPORT int mpg123_framebyframe_next(mpg123_handle *mh); /** Get access to the raw input data for the last parsed frame. * This gives you a direct look (and write access) to the frame body data. @@ -534,17 +648,26 @@ EXPORT int mpg123_framebyframe_next(mpg123_handle *mh); * A more sane use would be to use this for CRC checking (see mpg123_info() and MPG123_CRC), the first two bytes of the body make up the CRC16 checksum, if present. * You can provide NULL for a parameter pointer when you are not interested in the value. * + * \param mh handle * \param header the 4-byte MPEG header * \param bodydata pointer to the frame body stored in the handle (without the header) * \param bodybytes size of frame body in bytes (without the header) - * \return MPG123_OK if there was a yet un-decoded frame to get the data from, MPG123_ERR otherwise (without further explanation, the error state of the mpg123_handle is not modified by this function). + * \return MPG123_OK if there was a yet un-decoded frame to get the + * data from, MPG123_BAD_HANDLE or MPG123_ERR otherwise (without further + * explanation, the error state of the mpg123_handle is not modified by + * this function). */ -EXPORT int mpg123_framedata(mpg123_handle *mh, unsigned long *header, unsigned char **bodydata, size_t *bodybytes); +MPG123_EXPORT int mpg123_framedata( mpg123_handle *mh +, unsigned long *header, unsigned char **bodydata, size_t *bodybytes ); /** Get the input position (byte offset in stream) of the last parsed frame. - * This can be used for external seek index building, for example. - * It just returns the internally stored offset, regardless of validity -- you ensure that a valid frame has been parsed before! */ -EXPORT off_t mpg123_framepos(mpg123_handle *mh); + * This can be used for external seek index building, for example. + * It just returns the internally stored offset, regardless of validity -- + * you ensure that a valid frame has been parsed before! + * \param mh handle + * \return byte offset in stream + */ +MPG123_EXPORT off_t mpg123_framepos(mpg123_handle *mh); /*@}*/ @@ -564,65 +687,97 @@ EXPORT off_t mpg123_framepos(mpg123_handle *mh); * Also, really sample-accurate seeking (meaning that you get the identical sample value after seeking compared to plain decoding up to the position) is only guaranteed when you do not mess with the position code by using MPG123_UPSPEED, MPG123_DOWNSPEED or MPG123_START_FRAME. The first two mainly should cause trouble with NtoM resampling, but in any case with these options in effect, you have to keep in mind that the sample offset is not the same as counting the samples you get from decoding since mpg123 counts the skipped samples, too (or the samples played twice only once)! * Short: When you care about the sample position, don't mess with those parameters;-) * Also, seeking is not guaranteed to work for all streams (underlying stream may not support it). + * And yet another caveat: If the stream is concatenated out of differing pieces (Frankenstein stream), seeking may suffer, too. * * @{ */ /** Returns the current position in samples. - * On the next read, you'd get that sample. */ -EXPORT off_t mpg123_tell(mpg123_handle *mh); - -/** Returns the frame number that the next read will give you data from. */ -EXPORT off_t mpg123_tellframe(mpg123_handle *mh); + * On the next successful read, you'd get that sample. + * \param mh handle + * \return sample offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tell(mpg123_handle *mh); -/** Returns the current byte offset in the input stream. */ -EXPORT off_t mpg123_tell_stream(mpg123_handle *mh); +/** Returns the frame number that the next read will give you data from. + * \param mh handle + * \return frame offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tellframe(mpg123_handle *mh); -/** Seek to a desired sample offset. - * Set whence to SEEK_SET, SEEK_CUR or SEEK_END. - * \return The resulting offset >= 0 or error/message code */ -EXPORT off_t mpg123_seek(mpg123_handle *mh, off_t sampleoff, int whence); +/** Returns the current byte offset in the input stream. + * \param mh handle + * \return byte offset or MPG123_ERR (null handle) + */ +MPG123_EXPORT off_t mpg123_tell_stream(mpg123_handle *mh); + +/** Seek to a desired sample offset. + * Usage is modelled afer the standard lseek(). + * \param mh handle + * \param sampleoff offset in PCM samples + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END + * \return The resulting offset >= 0 or error/message code + */ +MPG123_EXPORT off_t mpg123_seek( mpg123_handle *mh +, off_t sampleoff, int whence ); /** Seek to a desired sample offset in data feeding mode. * This just prepares things to be right only if you ensure that the next chunk of input data will be from input_offset byte position. + * \param mh handle + * \param sampleoff offset in PCM samples + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END * \param input_offset The position it expects to be at the * next time data is fed to mpg123_decode(). * \return The resulting offset >= 0 or error/message code */ -EXPORT off_t mpg123_feedseek(mpg123_handle *mh, off_t sampleoff, int whence, off_t *input_offset); - -/** Seek to a desired MPEG frame index. - * Set whence to SEEK_SET, SEEK_CUR or SEEK_END. - * \return The resulting offset >= 0 or error/message code */ -EXPORT off_t mpg123_seek_frame(mpg123_handle *mh, off_t frameoff, int whence); +MPG123_EXPORT off_t mpg123_feedseek( mpg123_handle *mh +, off_t sampleoff, int whence, off_t *input_offset ); + +/** Seek to a desired MPEG frame offset. + * Usage is modelled afer the standard lseek(). + * \param mh handle + * \param frameoff offset in MPEG frames + * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END + * \return The resulting offset >= 0 or error/message code */ +MPG123_EXPORT off_t mpg123_seek_frame( mpg123_handle *mh +, off_t frameoff, int whence ); /** Return a MPEG frame offset corresponding to an offset in seconds. * This assumes that the samples per frame do not change in the file/stream, which is a good assumption for any sane file/stream only. * \return frame offset >= 0 or error/message code */ -EXPORT off_t mpg123_timeframe(mpg123_handle *mh, double sec); +MPG123_EXPORT off_t mpg123_timeframe(mpg123_handle *mh, double sec); /** Give access to the frame index table that is managed for seeking. * You are asked not to modify the values... Use mpg123_set_index to set the * seek index + * \param mh handle * \param offsets pointer to the index array * \param step one index byte offset advances this many MPEG frames - * \param fill number of recorded index offsets; size of the array */ -EXPORT int mpg123_index(mpg123_handle *mh, off_t **offsets, off_t *step, size_t *fill); + * \param fill number of recorded index offsets; size of the array + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_index( mpg123_handle *mh +, off_t **offsets, off_t *step, size_t *fill ); /** Set the frame index table * Setting offsets to NULL and fill > 0 will allocate fill entries. Setting offsets * to NULL and fill to 0 will clear the index and free the allocated memory used by the index. + * \param mh handle * \param offsets pointer to the index array * \param step one index byte offset advances this many MPEG frames - * \param fill number of recorded index offsets; size of the array */ -EXPORT int mpg123_set_index(mpg123_handle *mh, off_t *offsets, off_t step, size_t fill); - -/** Get information about current and remaining frames/seconds. - * WARNING: This function is there because of special usage by standalone mpg123 and may be removed in the final version of libmpg123! - * You provide an offset (in frames) from now and a number of output bytes - * served by libmpg123 but not yet played. You get the projected current frame - * and seconds, as well as the remaining frames/seconds. This does _not_ care - * about skipped samples due to gapless playback. */ -EXPORT int mpg123_position( mpg123_handle *mh, off_t frame_offset, off_t buffered_bytes, off_t *current_frame, off_t *frames_left, double *current_seconds, double *seconds_left); + * \param fill number of recorded index offsets; size of the array + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_set_index( mpg123_handle *mh +, off_t *offsets, off_t step, size_t fill ); + +/** An old crutch to keep old mpg123 binaries happy. + * WARNING: This function is there only to avoid runtime linking errors with + * standalone mpg123 before version 1.23.0 (if you strangely update the + * library but not the end-user program) and actually is broken + * for various cases (p.ex. 24 bit output). Do never use. It might eventually + * be purged from the library. + */ +MPG123_EXPORT int mpg123_position( mpg123_handle *mh, off_t frame_offset, off_t buffered_bytes, off_t *current_frame, off_t *frames_left, double *current_seconds, double *seconds_left); /*@}*/ @@ -632,6 +787,7 @@ EXPORT int mpg123_position( mpg123_handle *mh, off_t frame_offset, off_t buffere * @{ */ +/** another channel enumeration, for left/right choice */ enum mpg123_channels { MPG123_LEFT=0x1 /**< The Left Channel. */ @@ -640,32 +796,55 @@ enum mpg123_channels }; /** Set the 32 Band Audio Equalizer settings. + * \param mh handle * \param channel Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for both. * \param band The equaliser band to change (from 0 to 31) - * \param val The (linear) adjustment factor. */ -EXPORT int mpg123_eq(mpg123_handle *mh, enum mpg123_channels channel, int band, double val); + * \param val The (linear) adjustment factor. + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_eq( mpg123_handle *mh +, enum mpg123_channels channel, int band, double val ); /** Get the 32 Band Audio Equalizer settings. + * \param mh handle * \param channel Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for (arithmetic mean of) both. * \param band The equaliser band to change (from 0 to 31) - * \return The (linear) adjustment factor. */ -EXPORT double mpg123_geteq(mpg123_handle *mh, enum mpg123_channels channel, int band); + * \return The (linear) adjustment factor (zero for pad parameters) */ +MPG123_EXPORT double mpg123_geteq(mpg123_handle *mh + , enum mpg123_channels channel, int band); -/** Reset the 32 Band Audio Equalizer settings to flat */ -EXPORT int mpg123_reset_eq(mpg123_handle *mh); +/** Reset the 32 Band Audio Equalizer settings to flat + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_reset_eq(mpg123_handle *mh); /** Set the absolute output volume including the RVA setting, - * vol<0 just applies (a possibly changed) RVA setting. */ -EXPORT int mpg123_volume(mpg123_handle *mh, double vol); + * vol<0 just applies (a possibly changed) RVA setting. + * \param mh handle + * \param vol volume value (linear factor) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_volume(mpg123_handle *mh, double vol); -/** Adjust output volume including the RVA setting by chosen amount */ -EXPORT int mpg123_volume_change(mpg123_handle *mh, double change); +/** Adjust output volume including the RVA setting by chosen amount + * \param mh handle + * \param change volume value (linear factor increment) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_volume_change(mpg123_handle *mh, double change); /** Return current volume setting, the actual value due to RVA, and the RVA * adjustment itself. It's all as double float value to abstract the sample * format. The volume values are linear factors / amplitudes (not percent) - * and the RVA value is in decibels. */ -EXPORT int mpg123_getvolume(mpg123_handle *mh, double *base, double *really, double *rva_db); + * and the RVA value is in decibels. + * \param mh handle + * \param base return address for base volume (linear factor) + * \param really return address for actual volume (linear factor) + * \param rva_db return address for RVA value (decibels) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getvolume(mpg123_handle *mh, double *base, double *really, double *rva_db); /* TODO: Set some preamp in addition / to replace internal RVA handling? */ @@ -726,54 +905,85 @@ struct mpg123_frameinfo enum mpg123_vbr vbr; /**< The VBR mode. */ }; -/** Get frame information about the MPEG audio bitstream and store it in a mpg123_frameinfo structure. */ -EXPORT int mpg123_info(mpg123_handle *mh, struct mpg123_frameinfo *mi); +/** Get frame information about the MPEG audio bitstream and store it in a mpg123_frameinfo structure. + * \param mh handle + * \param mi address of existing frameinfo structure to write to + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_info(mpg123_handle *mh, struct mpg123_frameinfo *mi); -/** Get the safe output buffer size for all cases (when you want to replace the internal buffer) */ -EXPORT size_t mpg123_safe_buffer(void); +/** Get the safe output buffer size for all cases + * (when you want to replace the internal buffer) + * \return safe buffer size + */ +MPG123_EXPORT size_t mpg123_safe_buffer(void); + +/** Make a full parsing scan of each frame in the file. ID3 tags are found. An + * accurate length value is stored. Seek index will be filled. A seek back to + * current position is performed. At all, this function refuses work when + * stream is not seekable. + * \param mh handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_scan(mpg123_handle *mh); -/** Make a full parsing scan of each frame in the file. ID3 tags are found. An accurate length - * value is stored. Seek index will be filled. A seek back to current position - * is performed. At all, this function refuses work when stream is - * not seekable. - * \return MPG123_OK or MPG123_ERR. +/** Return, if possible, the full (expected) length of current track in frames. + * \param mh handle + * \return length >= 0 or MPG123_ERR if there is no length guess possible. */ -EXPORT int mpg123_scan(mpg123_handle *mh); +MPG123_EXPORT off_t mpg123_framelength(mpg123_handle *mh); /** Return, if possible, the full (expected) length of current track in samples. - * \return length >= 0 or MPG123_ERR if there is no length guess possible. */ -EXPORT off_t mpg123_length(mpg123_handle *mh); + * \param mh handle + * \return length >= 0 or MPG123_ERR if there is no length guess possible. + */ +MPG123_EXPORT off_t mpg123_length(mpg123_handle *mh); /** Override the value for file size in bytes. - * Useful for getting sensible track length values in feed mode or for HTTP streams. - * \return MPG123_OK or MPG123_ERR */ -EXPORT int mpg123_set_filesize(mpg123_handle *mh, off_t size); + * Useful for getting sensible track length values in feed mode or for HTTP streams. + * \param mh handle + * \param size file size in bytes + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_set_filesize(mpg123_handle *mh, off_t size); -/** Returns the time (seconds) per frame; <0 is error. */ -EXPORT double mpg123_tpf(mpg123_handle *mh); +/** Get MPEG frame duration in seconds. + * \param mh handle + * \return frame duration in seconds, <0 on error + */ +MPG123_EXPORT double mpg123_tpf(mpg123_handle *mh); -/** Returns the samples per frame for the most recently parsed frame; <0 is error. */ -EXPORT int mpg123_spf(mpg123_handle *mh); +/** Get MPEG frame duration in samples. + * \param mh handle + * \return samples per frame for the most recently parsed frame; <0 on errors + */ +MPG123_EXPORT int mpg123_spf(mpg123_handle *mh); -/** Get and reset the clip count. */ -EXPORT long mpg123_clip(mpg123_handle *mh); +/** Get and reset the clip count. + * \param mh handle + * \return count of clipped samples + */ +MPG123_EXPORT long mpg123_clip(mpg123_handle *mh); /** The key values for state information from mpg123_getstate(). */ enum mpg123_state { - MPG123_ACCURATE = 1 /**< Query if positons are currently accurate (integer value, 0 if false, 1 if true) */ + MPG123_ACCURATE = 1 /**< Query if positons are currently accurate (integer value, 0 if false, 1 if true). */ ,MPG123_BUFFERFILL /**< Get fill of internal (feed) input buffer as integer byte count returned as long and as double. An error is returned on integer overflow while converting to (signed) long, but the returned floating point value shold still be fine. */ - ,MPG123_FRANKENSTEIN /**< Stream consists of carelessly stitched together files (the leading one featuring gapless info). */ + ,MPG123_FRANKENSTEIN /**< Stream consists of carelessly stitched together files. Seeking may yield unexpected results (also with MPG123_ACCURATE, it may be confused). */ + ,MPG123_FRESH_DECODER /**< Decoder structure has been updated, possibly indicating changed stream (integer value, 0 if false, 1 if true). Flag is cleared after retrieval. */ }; /** Get various current decoder/stream state information. + * \param mh handle * \param key the key to identify the information to give. * \param val the address to return (long) integer values to * \param fval the address to return floating point values to - * \return MPG123_OK or MPG123_ERR for success + * \return MPG123_OK on success */ -EXPORT int mpg123_getstate(mpg123_handle *mh, enum mpg123_state key, long *val, double *fval); +MPG123_EXPORT int mpg123_getstate( mpg123_handle *mh +, enum mpg123_state key, long *val, double *fval ); /*@}*/ @@ -795,53 +1005,89 @@ typedef struct size_t fill; /**< number of used bytes (including closing zero byte) */ } mpg123_string; -/** Create and allocate memory for a new mpg123_string */ -EXPORT void mpg123_init_string(mpg123_string* sb); +/** Create and allocate memory for a new mpg123_string + * \param sb string handle (address of existing structure on your side) + */ +MPG123_EXPORT void mpg123_init_string(mpg123_string* sb); -/** Free-up mempory for an existing mpg123_string */ -EXPORT void mpg123_free_string(mpg123_string* sb); +/** Free-up mempory for an existing mpg123_string + * \param sb string handle + */ +MPG123_EXPORT void mpg123_free_string(mpg123_string* sb); /** Change the size of a mpg123_string - * \return 0 on error, 1 on success */ -EXPORT int mpg123_resize_string(mpg123_string* sb, size_t news); + * \param sb string handle + * \param news new size in bytes + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_resize_string(mpg123_string* sb, size_t news); /** Increase size of a mpg123_string if necessary (it may stay larger). - * Note that the functions for adding and setting in current libmpg123 use this instead of mpg123_resize_string(). - * That way, you can preallocate memory and safely work afterwards with pieces. - * \return 0 on error, 1 on success */ -EXPORT int mpg123_grow_string(mpg123_string* sb, size_t news); + * Note that the functions for adding and setting in current libmpg123 + * use this instead of mpg123_resize_string(). + * That way, you can preallocate memory and safely work afterwards with + * pieces. + * \param sb string handle + * \param news new minimum size + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_grow_string(mpg123_string* sb, size_t news); /** Copy the contents of one mpg123_string string to another. - * \return 0 on error, 1 on success */ -EXPORT int mpg123_copy_string(mpg123_string* from, mpg123_string* to); + * Yes the order of arguments is reversed compated to memcpy(). + * \param from string handle + * \param to string handle + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_copy_string(mpg123_string* from, mpg123_string* to); /** Append a C-String to an mpg123_string - * \return 0 on error, 1 on success */ -EXPORT int mpg123_add_string(mpg123_string* sb, const char* stuff); + * \param sb string handle + * \param stuff to append + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_add_string(mpg123_string* sb, const char* stuff); /** Append a C-substring to an mpg123 string - * \return 0 on error, 1 on success + * \param sb string handle + * \param stuff content to copy * \param from offset to copy from - * \param count number of characters to copy (a null-byte is always appended) */ -EXPORT int mpg123_add_substring(mpg123_string *sb, const char *stuff, size_t from, size_t count); - -/** Set the conents of a mpg123_string to a C-string - * \return 0 on error, 1 on success */ -EXPORT int mpg123_set_string(mpg123_string* sb, const char* stuff); + * \param count number of characters to copy (a null-byte is always appended) + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_add_substring( mpg123_string *sb +, const char *stuff, size_t from, size_t count ); -/** Set the contents of a mpg123_string to a C-substring +/** Set the content of a mpg123_string to a C-string + * \param sb string handle + * \param stuff content to copy * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_set_string(mpg123_string* sb, const char* stuff); + +/** Set the content of a mpg123_string to a C-substring + * \param sb string handle + * \param stuff the future content * \param from offset to copy from - * \param count number of characters to copy (a null-byte is always appended) */ -EXPORT int mpg123_set_substring(mpg123_string *sb, const char *stuff, size_t from, size_t count); + * \param count number of characters to copy (a null-byte is always appended) + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_set_substring( mpg123_string *sb +, const char *stuff, size_t from, size_t count ); /** Count characters in a mpg123 string (non-null bytes or UTF-8 characters). - * \return character count - * \param sb the string - * \param utf8 a flag to tell if the string is in utf8 encoding * Even with the fill property, the character count is not obvious as there could be multiple trailing null bytes. + * \param sb string handle + * \param utf8 a flag to tell if the string is in utf8 encoding + * \return character count */ -EXPORT size_t mpg123_strlen(mpg123_string *sb, int utf8); +MPG123_EXPORT size_t mpg123_strlen(mpg123_string *sb, int utf8); + +/** Remove trailing \\r and \\n, if present. + * \param sb string handle + * \return 0 on error, 1 on success + */ +MPG123_EXPORT int mpg123_chomp_string(mpg123_string *sb); /** The mpg123 text encodings. This contains encodings we encounter in ID3 tags or ICY meta info. */ enum mpg123_text_encoding @@ -873,20 +1119,23 @@ enum mpg123_id3_enc ,mpg123_id3_enc_max = 3 /**< Placeholder to check valid range of encoding byte. */ }; -/** Convert ID3 encoding byte to mpg123 encoding index. */ -EXPORT enum mpg123_text_encoding mpg123_enc_from_id3(unsigned char id3_enc_byte); +/** Convert ID3 encoding byte to mpg123 encoding index. + * \param id3_enc_byte the ID3 encoding code + * \return the mpg123 encoding index + */ + +MPG123_EXPORT enum mpg123_text_encoding mpg123_enc_from_id3(unsigned char id3_enc_byte); /** Store text data in string, after converting to UTF-8 from indicated encoding - * \return 0 on error, 1 on success (on error, mpg123_free_string is called on sb) + * A prominent error can be that you provided an unknown encoding value, or this build of libmpg123 lacks support for certain encodings (ID3 or ICY stuff missing). + * Also, you might want to take a bit of care with preparing the data; for example, strip leading zeroes (I have seen that). * \param sb target string * \param enc mpg123 text encoding value - * \param source source buffer with plain unsigned bytes (you might need to cast from char *) + * \param source source buffer with plain unsigned bytes (you might need to cast from signed char) * \param source_size number of bytes in the source buffer - * - * A prominent error can be that you provided an unknown encoding value, or this build of libmpg123 lacks support for certain encodings (ID3 or ICY stuff missing). - * Also, you might want to take a bit of care with preparing the data; for example, strip leading zeroes (I have seen that). + * \return 0 on error, 1 on success (on error, mpg123_free_string is called on sb) */ -EXPORT int mpg123_store_utf8(mpg123_string *sb, enum mpg123_text_encoding enc, const unsigned char *source, size_t source_size); +MPG123_EXPORT int mpg123_store_utf8(mpg123_string *sb, enum mpg123_text_encoding enc, const unsigned char *source, size_t source_size); /** Sub data structure for ID3v2, for storing various text fields (including comments). * This is for ID3v2 COMM, TXXX and all the other text fields. @@ -900,6 +1149,45 @@ typedef struct mpg123_string text; /**< ... */ } mpg123_text; +/** The picture type values from ID3v2. */ +enum mpg123_id3_pic_type +{ + mpg123_id3_pic_other = 0 /**< see ID3v2 docs */ + ,mpg123_id3_pic_icon = 1 /**< see ID3v2 docs */ + ,mpg123_id3_pic_other_icon = 2 /**< see ID3v2 docs */ + ,mpg123_id3_pic_front_cover = 3 /**< see ID3v2 docs */ + ,mpg123_id3_pic_back_cover = 4 /**< see ID3v2 docs */ + ,mpg123_id3_pic_leaflet = 5 /**< see ID3v2 docs */ + ,mpg123_id3_pic_media = 6 /**< see ID3v2 docs */ + ,mpg123_id3_pic_lead = 7 /**< see ID3v2 docs */ + ,mpg123_id3_pic_artist = 8 /**< see ID3v2 docs */ + ,mpg123_id3_pic_conductor = 9 /**< see ID3v2 docs */ + ,mpg123_id3_pic_orchestra = 10 /**< see ID3v2 docs */ + ,mpg123_id3_pic_composer = 11 /**< see ID3v2 docs */ + ,mpg123_id3_pic_lyricist = 12 /**< see ID3v2 docs */ + ,mpg123_id3_pic_location = 13 /**< see ID3v2 docs */ + ,mpg123_id3_pic_recording = 14 /**< see ID3v2 docs */ + ,mpg123_id3_pic_performance = 15 /**< see ID3v2 docs */ + ,mpg123_id3_pic_video = 16 /**< see ID3v2 docs */ + ,mpg123_id3_pic_fish = 17 /**< see ID3v2 docs */ + ,mpg123_id3_pic_illustration = 18 /**< see ID3v2 docs */ + ,mpg123_id3_pic_artist_logo = 19 /**< see ID3v2 docs */ + ,mpg123_id3_pic_publisher_logo = 20 /**< see ID3v2 docs */ +}; + +/** Sub data structure for ID3v2, for storing picture data including comment. + * This is for the ID3v2 APIC field. You should consult the ID3v2 specification + * for the use of the APIC field ("frames" in ID3v2 documentation, I use "fields" + * here to separate from MPEG frames). */ +typedef struct +{ + char type; /**< mpg123_id3_pic_type value */ + mpg123_string description; /**< description string */ + mpg123_string mime_type; /**< MIME type */ + size_t size; /**< size in bytes */ + unsigned char* data; /**< pointer to the image data */ +} mpg123_picture; + /** Data structure for storing IDV3v2 tags. * This structure is not a direct binary mapping with the file contents. * The ID3v2 text frames are allowed to contain multiple strings. @@ -922,11 +1210,13 @@ typedef struct size_t texts; /**< Numer of text fields. */ mpg123_text *extra; /**< The array of extra (TXXX) fields. */ size_t extras; /**< Number of extra text (TXXX) fields. */ + mpg123_picture *picture; /**< Array of ID3v2 pictures fields (APIC). */ + size_t pictures; /**< Number of picture (APIC) fields. */ } mpg123_id3v2; /** Data structure for ID3v1 tags (the last 128 bytes of a file). * Don't take anything for granted (like string termination)! - * Also note the change ID3v1.1 did: comment[28] = 0; comment[19] = track_number + * Also note the change ID3v1.1 did: comment[28] = 0; comment[29] = track_number * It is your task to support ID3v1 only or ID3v1.1 ...*/ typedef struct { @@ -945,26 +1235,35 @@ typedef struct #define MPG123_NEW_ICY 0x4 /**< 0100 There is ICY info that changed since last call to mpg123_icy. */ /** Query if there is (new) meta info, be it ID3 or ICY (or something new in future). - The check function returns a combination of flags. */ -EXPORT int mpg123_meta_check(mpg123_handle *mh); /* On error (no valid handle) just 0 is returned. */ + * \param mh handle + * \return combination of flags, 0 on error (same as "nothing new") + */ +MPG123_EXPORT int mpg123_meta_check(mpg123_handle *mh); -/** Clean up meta data storage (ID3v2 and ICY), freeing memory. */ -EXPORT void mpg123_meta_free(mpg123_handle *mh); +/** Clean up meta data storage (ID3v2 and ICY), freeing memory. + * \param mh handle + */ +MPG123_EXPORT void mpg123_meta_free(mpg123_handle *mh); /** Point v1 and v2 to existing data structures wich may change on any next read/decode function call. * v1 and/or v2 can be set to NULL when there is no corresponding data. - * \return Return value is MPG123_OK or MPG123_ERR, */ -EXPORT int mpg123_id3(mpg123_handle *mh, mpg123_id3v1 **v1, mpg123_id3v2 **v2); + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_id3( mpg123_handle *mh +, mpg123_id3v1 **v1, mpg123_id3v2 **v2 ); /** Point icy_meta to existing data structure wich may change on any next read/decode function call. - * \return Return value is MPG123_OK or MPG123_ERR, */ -EXPORT int mpg123_icy(mpg123_handle *mh, char **icy_meta); /* same for ICY meta string */ + * \param mh handle + * \param icy_meta return address for ICY meta string (set to NULL if nothing there) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_icy(mpg123_handle *mh, char **icy_meta); /** Decode from windows-1252 (the encoding ICY metainfo used) to UTF-8. * Note that this is very similar to mpg123_store_utf8(&sb, mpg123_text_icy, icy_text, strlen(icy_text+1)) . * \param icy_text The input data in ICY encoding * \return pointer to newly allocated buffer with UTF-8 data (You free() it!) */ -EXPORT char* mpg123_icy2utf8(const char* icy_text); +MPG123_EXPORT char* mpg123_icy2utf8(const char* icy_text); /* @} */ @@ -991,44 +1290,82 @@ struct mpg123_pars_struct; /** Opaque structure for the libmpg123 decoder parameters. */ typedef struct mpg123_pars_struct mpg123_pars; -/** Create a handle with preset parameters. */ -EXPORT mpg123_handle *mpg123_parnew(mpg123_pars *mp, const char* decoder, int *error); +/** Create a handle with preset parameters. + * \param mp parameter handle + * \param decoder decoder choice + * \param error error code return address + * \return mpg123 handle + */ +MPG123_EXPORT mpg123_handle *mpg123_parnew( mpg123_pars *mp +, const char* decoder, int *error ); -/** Allocate memory for and return a pointer to a new mpg123_pars */ -EXPORT mpg123_pars *mpg123_new_pars(int *error); +/** Allocate memory for and return a pointer to a new mpg123_pars + * \param error error code return address + * \return new parameter handle + */ +MPG123_EXPORT mpg123_pars *mpg123_new_pars(int *error); -/** Delete and free up memory used by a mpg123_pars data structure */ -EXPORT void mpg123_delete_pars(mpg123_pars* mp); +/** Delete and free up memory used by a mpg123_pars data structure + * \param mp parameter handle + */ +MPG123_EXPORT void mpg123_delete_pars(mpg123_pars* mp); /** Configure mpg123 parameters to accept no output format at all, - * use before specifying supported formats with mpg123_format */ -EXPORT int mpg123_fmt_none(mpg123_pars *mp); + * use before specifying supported formats with mpg123_format + * \param mp parameter handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_fmt_none(mpg123_pars *mp); /** Configure mpg123 parameters to accept all formats - * (also any custom rate you may set) -- this is default. */ -EXPORT int mpg123_fmt_all(mpg123_pars *mp); + * (also any custom rate you may set) -- this is default. + * \param mp parameter handle + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_fmt_all(mpg123_pars *mp); /** Set the audio format support of a mpg123_pars in detail: - \param rate The sample rate value (in Hertz). - \param channels A combination of MPG123_STEREO and MPG123_MONO. - \param encodings A combination of accepted encodings for rate and channels, p.ex MPG123_ENC_SIGNED16|MPG123_ENC_ULAW_8 (or 0 for no support). - \return 0 on success, -1 if there was an error. / + * \param mp parameter handle + * \param rate The sample rate value (in Hertz). + * \param channels A combination of MPG123_STEREO and MPG123_MONO. + * \param encodings A combination of accepted encodings for rate and channels, + * p.ex MPG123_ENC_SIGNED16|MPG123_ENC_ULAW_8 (or 0 for no + * support). + * \return MPG123_OK on success */ -EXPORT int mpg123_fmt(mpg123_pars *mh, long rate, int channels, int encodings); /* 0 is good, -1 is error */ +MPG123_EXPORT int mpg123_fmt(mpg123_pars *mp +, long rate, int channels, int encodings); -/** Check to see if a specific format at a specific rate is supported +/** Check to see if a specific format at a specific rate is supported * by mpg123_pars. + * \param mp parameter handle + * \param rate sampling rate + * \param encoding encoding * \return 0 for no support (that includes invalid parameters), MPG123_STEREO, * MPG123_MONO or MPG123_STEREO|MPG123_MONO. */ -EXPORT int mpg123_fmt_support(mpg123_pars *mh, long rate, int encoding); +MPG123_EXPORT int mpg123_fmt_support(mpg123_pars *mp, long rate, int encoding); /** Set a specific parameter, for a specific mpg123_pars, using a parameter - * type key chosen from the mpg123_parms enumeration, to the specified value. */ -EXPORT int mpg123_par(mpg123_pars *mp, enum mpg123_parms type, long value, double fvalue); + * type key chosen from the mpg123_parms enumeration, to the specified value. + * \param mp parameter handle + * \param type parameter choice + * \param value integer value + * \param fvalue floating point value + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_par( mpg123_pars *mp +, enum mpg123_parms type, long value, double fvalue ); /** Get a specific parameter, for a specific mpg123_pars. - * See the mpg123_parms enumeration for a list of available parameters. */ -EXPORT int mpg123_getpar(mpg123_pars *mp, enum mpg123_parms type, long *val, double *fval); + * See the mpg123_parms enumeration for a list of available parameters. + * \param mp parameter handle + * \param type parameter choice + * \param value integer value return address + * \param fvalue floating point value return address + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_getpar( mpg123_pars *mp +, enum mpg123_parms type, long *value, double *fvalue); /* @} */ @@ -1039,32 +1376,61 @@ EXPORT int mpg123_getpar(mpg123_pars *mp, enum mpg123_parms type, long *val, dou * @{ */ /** Replace default internal buffer with user-supplied buffer. - * Instead of working on it's own private buffer, mpg123 will directly use the one you provide for storing decoded audio. */ -EXPORT int mpg123_replace_buffer(mpg123_handle *mh, unsigned char *data, size_t size); + * Instead of working on it's own private buffer, mpg123 will directly use the one you provide for storing decoded audio. + * Note that the required buffer size could be bigger than expected from output + * encoding if libmpg123 has to convert from primary decoder output (p.ex. 32 bit + * storage for 24 bit output). + * \param mh handle + * \param data pointer to user buffer + * \param size of buffer in bytes + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_buffer(mpg123_handle *mh +, unsigned char *data, size_t size); /** The max size of one frame's decoded output with current settings. - * Use that to determine an appropriate minimum buffer size for decoding one frame. */ -EXPORT size_t mpg123_outblock(mpg123_handle *mh); + * Use that to determine an appropriate minimum buffer size for decoding one frame. + * \param mh handle + * \return maximum decoded data size in bytes + */ +MPG123_EXPORT size_t mpg123_outblock(mpg123_handle *mh); /** Replace low-level stream access functions; read and lseek as known in POSIX. * You can use this to make any fancy file opening/closing yourself, - * using mpg123_open_fd() to set the file descriptor for your read/lseek (doesn't need to be a "real" file descriptor...). + * using mpg123_open_fd() to set the file descriptor for your read/lseek + * (doesn't need to be a "real" file descriptor...). * Setting a function to NULL means that the default internal read is * used (active from next mpg123_open call on). * Note: As it would be troublesome to mess with this while having a file open, - * this implies mpg123_close(). */ -EXPORT int mpg123_replace_reader(mpg123_handle *mh, ssize_t (*r_read) (int, void *, size_t), off_t (*r_lseek)(int, off_t, int)); + * this implies mpg123_close(). + * \param mh handle + * \param r_read callback for reading (behaviour like POSIX read) + * \param r_lseek callback for seeking (like POSIX lseek) + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_reader( mpg123_handle *mh +, ssize_t (*r_read) (int, void *, size_t) +, off_t (*r_lseek)(int, off_t, int) +); -/** Replace I/O functions with your own ones operating on some kind of handle instead of integer descriptors. +/** Replace I/O functions with your own ones operating on some kind of + * handle instead of integer descriptors. * The handle is a void pointer, so you can pass any data you want... * mpg123_open_handle() is the call you make to use the I/O defined here. * There is no fallback to internal read/seek here. * Note: As it would be troublesome to mess with this while having a file open, * this mpg123_close() is implied here. - * \param r_read The callback for reading (behaviour like posix read). - * \param r_lseek The callback for seeking (like posix lseek). - * \param cleanup A callback to clean up an I/O handle on mpg123_close, can be NULL for none (you take care of cleaning your handles). */ -EXPORT int mpg123_replace_reader_handle(mpg123_handle *mh, ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*)); + * \param mh handle + * \param r_read callback for reading (behaviour like POSIX read) + * \param r_lseek callback for seeking (like POSIX lseek) + * \param cleanup A callback to clean up an I/O handle on mpg123_close, + * can be NULL for none (you take care of cleaning your handles). + * \return MPG123_OK on success + */ +MPG123_EXPORT int mpg123_replace_reader_handle( mpg123_handle *mh +, ssize_t (*r_read) (void *, void *, size_t) +, off_t (*r_lseek)(void *, off_t, int) +, void (*cleanup)(void*) ); /* @} */ diff --git a/deps/mpg123/src/libmpg123/mpg123lib_intern.h b/deps/mpg123/src/libmpg123/mpg123lib_intern.h index bb6a2c6..338743c 100644 --- a/deps/mpg123/src/libmpg123/mpg123lib_intern.h +++ b/deps/mpg123/src/libmpg123/mpg123lib_intern.h @@ -14,31 +14,9 @@ #define MPG123_ENCODINGS 12 #include "config.h" /* Load this before _anything_ */ -#include "intsym.h" /* Prefixing of internal symbols that still are public in a static lib. */ - -/* ABI conformance for other compilers. - mpg123 needs 16byte-aligned stack for SSE and friends. - gcc provides that, but others don't necessarily. */ -#ifdef ABI_ALIGN_FUN -#ifndef attribute_align_arg -#if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__>1) -# define attribute_align_arg __attribute__((force_align_arg_pointer)) -/* The gcc that can align the stack does not need the check... nor does it work with gcc 4.3+, anyway. */ -#else - -# define attribute_align_arg -/* Other compilers get code to catch misaligned stack. - Well, except Sun Studio, which accepts the aligned attribute but does not honor it. */ -#if !defined(__SUNPRO_C) -# define NEED_ALIGNCHECK -#endif +// #include "intsym.h" /* Prefixing of internal symbols that still are public in a static lib. */ -#endif -#endif -#else -#define attribute_align_arg -/* We won't try the align check... */ -#endif +#include "abi_align.h" /* export DLL symbols */ #if defined(WIN32) && defined(DYNAMIC_BUILD) @@ -60,19 +38,15 @@ #define memmove(dst,src,size) bcopy(src,dst,size) #endif -/* some stuff has to go back to mpg123.h */ +/* We don't really do long double... there are 3 options for REAL: + float, long and double. */ + #ifdef REAL_IS_FLOAT # define real float -# define REAL_SCANF "%f" -# define REAL_PRINTF "%f" -#elif defined(REAL_IS_LONG_DOUBLE) -# define real long double -# define REAL_SCANF "%Lf" -# define REAL_PRINTF "%Lf" #elif defined(REAL_IS_FIXED) -/* Disable some output formats for fixed point decoder... */ -# define real long +# define real int32_t +# define dreal int64_t /* for fixed-point decoders, use pre-calculated tables to avoid expensive floating-point maths @@ -83,14 +57,14 @@ # define REAL_RADIX 24 # define REAL_FACTOR 16777216.0 -static inline long double_to_long_rounded(double x, double scalefac) +static inline int32_t double_to_long_rounded(double x, double scalefac) { x *= scalefac; x += (x > 0) ? 0.5 : -0.5; - return (long)x; + return (int32_t)x; } -static inline long scale_rounded(long x, int shift) +static inline int32_t scale_rounded(int32_t x, int shift) { x += (x >> 31); x >>= (shift - 1); @@ -190,7 +164,7 @@ static inline long scale_rounded(long x, int shift) # endif # endif -/* I just changed the (int) to (long) there... seemed right. */ +/* I just changed the (int) to (real) there... seemed right. */ # define DOUBLE_TO_REAL(x) (double_to_long_rounded(x, REAL_FACTOR)) # define DOUBLE_TO_REAL_15(x) (double_to_long_rounded(x, 32768.0)) # define DOUBLE_TO_REAL_POW43(x) (double_to_long_rounded(x, 8192.0)) @@ -202,17 +176,17 @@ static inline long scale_rounded(long x, int shift) # define REAL_MUL_15(x, y) REAL_MUL_ASM(x, y, 15) # define REAL_MUL_SCALE_LAYER12(x, y) REAL_MUL_ASM(x, y, 15 + 30 - REAL_RADIX) # else -# define REAL_MUL(x, y) (((long long)(x) * (long long)(y)) >> REAL_RADIX) -# define REAL_MUL_15(x, y) (((long long)(x) * (long long)(y)) >> 15) -# define REAL_MUL_SCALE_LAYER12(x, y) (((long long)(x) * (long long)(y)) >> (15 + 30 - REAL_RADIX)) +# define REAL_MUL(x, y) (((dreal)(x) * (dreal)(y)) >> REAL_RADIX) +# define REAL_MUL_15(x, y) (((dreal)(x) * (dreal)(y)) >> 15) +# define REAL_MUL_SCALE_LAYER12(x, y) (((dreal)(x) * (dreal)(y)) >> (15 + 30 - REAL_RADIX)) # endif # ifdef REAL_MUL_SCALE_LAYER3_ASM # define REAL_MUL_SCALE_LAYER3(x, y, z) REAL_MUL_SCALE_LAYER3_ASM(x, y, 13 + gainpow2_scale[z] - REAL_RADIX) # else -# define REAL_MUL_SCALE_LAYER3(x, y, z) (((long long)(x) * (long long)(y)) >> (13 + gainpow2_scale[z] - REAL_RADIX)) +# define REAL_MUL_SCALE_LAYER3(x, y, z) (((dreal)(x) * (dreal)(y)) >> (13 + gainpow2_scale[z] - REAL_RADIX)) # endif -# define REAL_SCALE_LAYER12(x) ((long)((x) >> (30 - REAL_RADIX))) -# define REAL_SCALE_LAYER3(x, y) ((long)((x) >> (gainpow2_scale[y] - REAL_RADIX))) +# define REAL_SCALE_LAYER12(x) ((real)((x) >> (30 - REAL_RADIX))) +# define REAL_SCALE_LAYER3(x, y) ((real)((x) >> (gainpow2_scale[y] - REAL_RADIX))) # ifdef ACCURATE_ROUNDING # define REAL_MUL_SYNTH(x, y) REAL_MUL(x, y) # define REAL_SCALE_DCT64(x) (x) @@ -222,13 +196,12 @@ static inline long scale_rounded(long x, int shift) # define REAL_SCALE_DCT64(x) ((x) >> 8) # define REAL_SCALE_WINDOW(x) scale_rounded(x, 16) # endif -# define REAL_SCANF "%ld" -# define REAL_PRINTF "%ld" #else +/* Just define a symbol to make things clear. + Existing code still uses (not (float or fixed)) for that. */ +# define REAL_IS_DOUBLE # define real double -# define REAL_SCANF "%lf" -# define REAL_PRINTF "%f" #endif #ifndef REAL_IS_FIXED @@ -323,9 +296,10 @@ static inline long scale_rounded(long x, int shift) int decode_update(mpg123_handle *mh); /* residing in format.c */ -off_t samples_to_storage(mpg123_handle *fr , off_t s); +off_t decoder_synth_bytes(mpg123_handle *fr , off_t s); off_t samples_to_bytes(mpg123_handle *fr , off_t s); off_t bytes_to_samples(mpg123_handle *fr , off_t b); +off_t outblock_bytes(mpg123_handle *fr, off_t s); /* Postprocessing format conversion of freshly decoded buffer. */ void postprocess_buffer(mpg123_handle *fr); diff --git a/deps/mpg123/src/libmpg123/newhuffman.h b/deps/mpg123/src/libmpg123/newhuffman.h new file mode 100644 index 0000000..4d108a9 --- /dev/null +++ b/deps/mpg123/src/libmpg123/newhuffman.h @@ -0,0 +1,824 @@ +/* + nwehuffman.h: optimized huffman tables (radix-4 lookup) + + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + + +#ifndef _MPG123_NEWHUFFMAN_H_ +#define _MPG123_NEWHUFFMAN_H_ + +struct newhuff +{ + unsigned int linbits; + const short *table; +}; + +static const short tab0_[] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const short tab1_[] = +{ + 0x0311, 0x0311, 0x0301, 0x0301, 0x0210, 0x0210, 0x0210, 0x0210, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, +}; + +static const short tab2_[] = +{ + -16, -32, 0x0311, 0x0311, 0x0301, 0x0301, 0x0310, 0x0310, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, + 0x0222, 0x0222, 0x0222, 0x0222, 0x0202, 0x0202, 0x0202, 0x0202, + 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, + 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, + 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, +}; + +static const short tab3_[] = +{ + -16, -32, 0x0310, 0x0310, 0x0211, 0x0211, 0x0211, 0x0211, + 0x0201, 0x0201, 0x0201, 0x0201, 0x0200, 0x0200, 0x0200, 0x0200, + 0x0222, 0x0222, 0x0222, 0x0222, 0x0202, 0x0202, 0x0202, 0x0202, + 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, + 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, + 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120 +}; + +static const short tab5_[] = +{ + -16, -32, 0x0311, 0x0311, 0x0301, 0x0301, 0x0310, 0x0310, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, + 0x0433, 0x0423, 0x0332, 0x0332, 0x0231, 0x0231, 0x0231, 0x0231, + 0x0313, 0x0313, 0x0303, 0x0303, 0x0330, 0x0330, 0x0322, 0x0322, + 0x0212, 0x0212, 0x0212, 0x0212, 0x0221, 0x0221, 0x0221, 0x0221, + 0x0202, 0x0202, 0x0202, 0x0202, 0x0220, 0x0220, 0x0220, 0x0220, +}; + +static const short tab6_[] = +{ + -16, -32, -48, 0x0412, 0x0421, 0x0420, 0x0301, 0x0301, + 0x0211, 0x0211, 0x0211, 0x0211, 0x0310, 0x0310, 0x0300, 0x0300, + 0x0333, 0x0333, 0x0303, 0x0303, 0x0223, 0x0223, 0x0223, 0x0223, + 0x0232, 0x0232, 0x0232, 0x0232, 0x0230, 0x0230, 0x0230, 0x0230, + 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, + 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, + 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, + 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, +}; + +static const short tab7_[] = +{ + -16, -32, -48, 0x0411, 0x0301, 0x0301, 0x0310, 0x0310, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, + -48, -64, -80, 0x0415, 0x0451, -96, 0x0450, -112, + 0x0424, 0x0442, 0x0314, 0x0314, 0x0341, 0x0341, 0x0340, 0x0340, + 0x0404, 0x0423, 0x0432, 0x0403, 0x0313, 0x0313, 0x0331, 0x0331, + 0x0330, 0x0330, 0x0322, 0x0322, 0x0212, 0x0212, 0x0212, 0x0212, + 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, + 0x0202, 0x0202, 0x0202, 0x0202, 0x0220, 0x0220, 0x0220, 0x0220, + 0x0255, 0x0255, 0x0255, 0x0255, 0x0245, 0x0245, 0x0245, 0x0245, + 0x0254, 0x0254, 0x0254, 0x0254, 0x0253, 0x0253, 0x0253, 0x0253, + 0x0135, 0x0135, 0x0135, 0x0135, 0x0135, 0x0135, 0x0135, 0x0135, + 0x0144, 0x0144, 0x0144, 0x0144, 0x0144, 0x0144, 0x0144, 0x0144, + 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, + 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, + 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, + 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, + 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, + 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, +}; + +static const short tab8_[] = +{ + -16, -32, 0x0412, 0x0421, 0x0211, 0x0211, 0x0211, 0x0211, + 0x0301, 0x0301, 0x0310, 0x0310, 0x0200, 0x0200, 0x0200, 0x0200, + -32, -48, -64, 0x0415, 0x0451, -80, -96, 0x0424, + 0x0442, 0x0414, 0x0341, 0x0341, 0x0404, 0x0440, 0x0423, 0x0432, + 0x0413, 0x0431, 0x0403, 0x0430, 0x0222, 0x0222, 0x0222, 0x0222, + 0x0202, 0x0202, 0x0202, 0x0202, 0x0220, 0x0220, 0x0220, 0x0220, + 0x0355, 0x0355, 0x0354, 0x0354, 0x0245, 0x0245, 0x0245, 0x0245, + 0x0153, 0x0153, 0x0153, 0x0153, 0x0153, 0x0153, 0x0153, 0x0153, + 0x0235, 0x0235, 0x0235, 0x0235, 0x0244, 0x0244, 0x0244, 0x0244, + 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, + 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, + 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, + 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, + 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, + 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, + 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, +}; + +static const short tab9_[] = +{ + -16, -32, -48, -64, -80, 0x0412, 0x0421, 0x0420, + 0x0311, 0x0311, 0x0301, 0x0301, 0x0310, 0x0310, 0x0300, 0x0300, + -80, 0x0435, 0x0453, -96, 0x0444, 0x0425, 0x0452, 0x0415, + 0x0351, 0x0351, 0x0334, 0x0334, 0x0343, 0x0343, 0x0450, 0x0404, + 0x0324, 0x0324, 0x0342, 0x0342, 0x0333, 0x0333, 0x0340, 0x0340, + 0x0214, 0x0214, 0x0214, 0x0214, 0x0241, 0x0241, 0x0241, 0x0241, + 0x0223, 0x0223, 0x0223, 0x0223, 0x0232, 0x0232, 0x0232, 0x0232, + 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, + 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, + 0x0203, 0x0203, 0x0203, 0x0203, 0x0230, 0x0230, 0x0230, 0x0230, + 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, + 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, + 0x0155, 0x0155, 0x0155, 0x0155, 0x0155, 0x0155, 0x0155, 0x0155, + 0x0145, 0x0145, 0x0145, 0x0145, 0x0145, 0x0145, 0x0145, 0x0145, + 0x0154, 0x0154, 0x0154, 0x0154, 0x0154, 0x0154, 0x0154, 0x0154, + 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, +}; + +static const short tab10_[] = +{ + -16, -32, -48, 0x0411, 0x0301, 0x0301, 0x0310, 0x0310, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, + -48, -64, -80, -96, -112, -128, -144, 0x0417, + 0x0471, -160, -176, -192, 0x0416, 0x0461, 0x0460, -208, + -208, -224, 0x0414, 0x0441, 0x0440, 0x0423, 0x0432, 0x0403, + 0x0313, 0x0313, 0x0331, 0x0331, 0x0330, 0x0330, 0x0322, 0x0322, + 0x0212, 0x0212, 0x0212, 0x0212, 0x0221, 0x0221, 0x0221, 0x0221, + 0x0202, 0x0202, 0x0202, 0x0202, 0x0220, 0x0220, 0x0220, 0x0220, + 0x0377, 0x0377, 0x0367, 0x0367, 0x0376, 0x0376, 0x0357, 0x0357, + 0x0375, 0x0375, 0x0366, 0x0366, 0x0247, 0x0247, 0x0247, 0x0247, + 0x0274, 0x0274, 0x0274, 0x0274, 0x0256, 0x0256, 0x0256, 0x0256, + 0x0265, 0x0265, 0x0265, 0x0265, 0x0237, 0x0237, 0x0237, 0x0237, + 0x0273, 0x0273, 0x0273, 0x0273, 0x0246, 0x0246, 0x0246, 0x0246, + 0x0355, 0x0355, 0x0354, 0x0354, 0x0263, 0x0263, 0x0263, 0x0263, + 0x0127, 0x0127, 0x0127, 0x0127, 0x0127, 0x0127, 0x0127, 0x0127, + 0x0172, 0x0172, 0x0172, 0x0172, 0x0172, 0x0172, 0x0172, 0x0172, + 0x0264, 0x0264, 0x0264, 0x0264, 0x0207, 0x0207, 0x0207, 0x0207, + 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, + 0x0162, 0x0162, 0x0162, 0x0162, 0x0162, 0x0162, 0x0162, 0x0162, + 0x0245, 0x0245, 0x0245, 0x0245, 0x0235, 0x0235, 0x0235, 0x0235, + 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, + 0x0253, 0x0253, 0x0253, 0x0253, 0x0244, 0x0244, 0x0244, 0x0244, + 0x0136, 0x0136, 0x0136, 0x0136, 0x0136, 0x0136, 0x0136, 0x0136, + 0x0126, 0x0126, 0x0126, 0x0126, 0x0126, 0x0126, 0x0126, 0x0126, + 0x0225, 0x0225, 0x0225, 0x0225, 0x0252, 0x0252, 0x0252, 0x0252, + 0x0115, 0x0115, 0x0115, 0x0115, 0x0115, 0x0115, 0x0115, 0x0115, + 0x0151, 0x0151, 0x0151, 0x0151, 0x0151, 0x0151, 0x0151, 0x0151, + 0x0234, 0x0234, 0x0234, 0x0234, 0x0243, 0x0243, 0x0243, 0x0243, + 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, + 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, + 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, + 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, + 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, + 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, +}; + +static const short tab11_[] = +{ + -16, -32, -48, -64, 0x0412, -80, 0x0311, 0x0311, + 0x0301, 0x0301, 0x0310, 0x0310, 0x0200, 0x0200, 0x0200, 0x0200, + -80, -96, -112, -128, -144, 0x0427, 0x0472, -160, + 0x0371, 0x0371, 0x0417, 0x0470, 0x0436, 0x0463, 0x0460, -176, + -176, 0x0415, 0x0362, 0x0362, 0x0426, 0x0406, 0x0316, 0x0316, + 0x0361, 0x0361, 0x0451, 0x0434, 0x0450, -192, 0x0424, 0x0442, + 0x0414, 0x0441, 0x0404, 0x0440, 0x0323, 0x0323, 0x0332, 0x0332, + 0x0213, 0x0213, 0x0213, 0x0213, 0x0231, 0x0231, 0x0231, 0x0231, + 0x0303, 0x0303, 0x0330, 0x0330, 0x0222, 0x0222, 0x0222, 0x0222, + 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, + 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, + 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, + 0x0277, 0x0277, 0x0277, 0x0277, 0x0267, 0x0267, 0x0267, 0x0267, + 0x0276, 0x0276, 0x0276, 0x0276, 0x0275, 0x0275, 0x0275, 0x0275, + 0x0266, 0x0266, 0x0266, 0x0266, 0x0247, 0x0247, 0x0247, 0x0247, + 0x0274, 0x0274, 0x0274, 0x0274, 0x0357, 0x0357, 0x0355, 0x0355, + 0x0256, 0x0256, 0x0256, 0x0256, 0x0265, 0x0265, 0x0265, 0x0265, + 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, + 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, + 0x0146, 0x0146, 0x0146, 0x0146, 0x0146, 0x0146, 0x0146, 0x0146, + 0x0245, 0x0245, 0x0245, 0x0245, 0x0254, 0x0254, 0x0254, 0x0254, + 0x0235, 0x0235, 0x0235, 0x0235, 0x0253, 0x0253, 0x0253, 0x0253, + 0x0164, 0x0164, 0x0164, 0x0164, 0x0164, 0x0164, 0x0164, 0x0164, + 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, + 0x0144, 0x0144, 0x0144, 0x0144, 0x0144, 0x0144, 0x0144, 0x0144, + 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, + 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, + 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, + 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, + 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, +}; + +static const short tab12_[] = +{ + -16, -32, -48, -64, -80, -96, 0x0412, 0x0421, + -112, 0x0400, 0x0311, 0x0311, 0x0301, 0x0301, 0x0310, 0x0310, + -112, -128, -144, -160, 0x0456, 0x0437, -176, 0x0427, + 0x0472, 0x0446, 0x0464, 0x0417, 0x0471, -192, 0x0436, 0x0463, + 0x0445, 0x0454, 0x0444, -192, 0x0326, 0x0326, 0x0362, 0x0362, + 0x0361, 0x0361, 0x0416, 0x0460, 0x0435, 0x0453, 0x0425, 0x0452, + 0x0315, 0x0315, 0x0351, 0x0351, 0x0334, 0x0334, 0x0343, 0x0343, + 0x0450, 0x0404, 0x0324, 0x0324, 0x0342, 0x0342, 0x0314, 0x0314, + 0x0233, 0x0233, 0x0233, 0x0233, 0x0241, 0x0241, 0x0241, 0x0241, + 0x0223, 0x0223, 0x0223, 0x0223, 0x0232, 0x0232, 0x0232, 0x0232, + 0x0340, 0x0340, 0x0303, 0x0303, 0x0230, 0x0230, 0x0230, 0x0230, + 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, 0x0113, + 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, 0x0131, + 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, + 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, + 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, + 0x0277, 0x0277, 0x0277, 0x0277, 0x0267, 0x0267, 0x0267, 0x0267, + 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, + 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, + 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, + 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, + 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, + 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, + 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, + 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, + 0x0155, 0x0155, 0x0155, 0x0155, 0x0155, 0x0155, 0x0155, 0x0155, + 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, + 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, + 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, + 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, +}; + +static const short tab13_[] = +{ + -16, -32, -48, -64, 0x0411, 0x0401, 0x0310, 0x0310, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, + -64, -80, -96, -112, -128, -144, -160, -176, + -192, -208, -224, -240, -256, -272, -288, -304, + -304, -320, -336, -352, 0x0481, -368, -384, -400, + -416, -432, 0x0415, 0x0451, -448, -464, -480, 0x0414, + 0x0341, 0x0341, 0x0404, 0x0440, 0x0423, 0x0432, 0x0313, 0x0313, + 0x0331, 0x0331, 0x0303, 0x0303, 0x0330, 0x0330, 0x0322, 0x0322, + 0x0212, 0x0212, 0x0212, 0x0212, 0x0221, 0x0221, 0x0221, 0x0221, + 0x0202, 0x0202, 0x0202, 0x0202, 0x0220, 0x0220, 0x0220, 0x0220, + -448, -464, -480, -496, -512, -528, -544, -560, + -576, -592, -608, -624, -640, -656, 0x041f, 0x04f1, + 0x04f0, -656, -672, -688, 0x04e2, -704, 0x041e, 0x04e1, + -720, -736, -752, -768, -784, -800, 0x04c6, 0x043d, + -800, 0x042d, 0x04d2, 0x041d, 0x04b7, -816, -832, 0x04c3, + -848, 0x044b, 0x03d1, 0x03d1, 0x040d, 0x04d0, 0x048a, 0x04a8, + 0x044c, 0x04c4, 0x046b, 0x04b6, 0x033c, 0x033c, 0x032c, 0x032c, + 0x03c2, 0x03c2, 0x035b, 0x035b, 0x04b5, 0x0489, 0x031c, 0x031c, + 0x03c1, 0x03c1, 0x0498, 0x040c, 0x03c0, 0x03c0, 0x04b4, 0x046a, + 0x04a6, 0x0479, 0x033b, 0x033b, 0x03b3, 0x03b3, 0x0488, 0x045a, + 0x032b, 0x032b, 0x04a5, 0x0469, 0x03a4, 0x03a4, 0x0478, 0x0487, + 0x0394, 0x0394, 0x0477, 0x0476, 0x02b2, 0x02b2, 0x02b2, 0x02b2, + 0x021b, 0x021b, 0x021b, 0x021b, 0x02b1, 0x02b1, 0x02b1, 0x02b1, + 0x030b, 0x030b, 0x03b0, 0x03b0, 0x0396, 0x0396, 0x034a, 0x034a, + 0x033a, 0x033a, 0x03a3, 0x03a3, 0x0359, 0x0359, 0x0395, 0x0395, + 0x022a, 0x022a, 0x022a, 0x022a, 0x02a2, 0x02a2, 0x02a2, 0x02a2, + 0x021a, 0x021a, 0x021a, 0x021a, 0x02a1, 0x02a1, 0x02a1, 0x02a1, + 0x030a, 0x030a, 0x0368, 0x0368, 0x02a0, 0x02a0, 0x02a0, 0x02a0, + 0x0386, 0x0386, 0x0349, 0x0349, 0x0293, 0x0293, 0x0293, 0x0293, + 0x0339, 0x0339, 0x0358, 0x0358, 0x0385, 0x0385, 0x0367, 0x0367, + 0x0229, 0x0229, 0x0229, 0x0229, 0x0292, 0x0292, 0x0292, 0x0292, + 0x0357, 0x0357, 0x0375, 0x0375, 0x0238, 0x0238, 0x0238, 0x0238, + 0x0283, 0x0283, 0x0283, 0x0283, 0x0366, 0x0366, 0x0347, 0x0347, + 0x0374, 0x0374, 0x0356, 0x0356, 0x0365, 0x0365, 0x0373, 0x0373, + 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, + 0x0191, 0x0191, 0x0191, 0x0191, 0x0191, 0x0191, 0x0191, 0x0191, + 0x0209, 0x0209, 0x0209, 0x0209, 0x0290, 0x0290, 0x0290, 0x0290, + 0x0248, 0x0248, 0x0248, 0x0248, 0x0284, 0x0284, 0x0284, 0x0284, + 0x0272, 0x0272, 0x0272, 0x0272, 0x0346, 0x0346, 0x0364, 0x0364, + 0x0128, 0x0128, 0x0128, 0x0128, 0x0128, 0x0128, 0x0128, 0x0128, + 0x0182, 0x0182, 0x0182, 0x0182, 0x0182, 0x0182, 0x0182, 0x0182, + 0x0118, 0x0118, 0x0118, 0x0118, 0x0118, 0x0118, 0x0118, 0x0118, + 0x0237, 0x0237, 0x0237, 0x0237, 0x0227, 0x0227, 0x0227, 0x0227, + 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, + 0x0171, 0x0171, 0x0171, 0x0171, 0x0171, 0x0171, 0x0171, 0x0171, + 0x0255, 0x0255, 0x0255, 0x0255, 0x0207, 0x0207, 0x0207, 0x0207, + 0x0270, 0x0270, 0x0270, 0x0270, 0x0236, 0x0236, 0x0236, 0x0236, + 0x0263, 0x0263, 0x0263, 0x0263, 0x0245, 0x0245, 0x0245, 0x0245, + 0x0254, 0x0254, 0x0254, 0x0254, 0x0226, 0x0226, 0x0226, 0x0226, + 0x0262, 0x0262, 0x0262, 0x0262, 0x0235, 0x0235, 0x0235, 0x0235, + 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, + 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, + 0x0116, 0x0116, 0x0116, 0x0116, 0x0116, 0x0116, 0x0116, 0x0116, + 0x0161, 0x0161, 0x0161, 0x0161, 0x0161, 0x0161, 0x0161, 0x0161, + 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, + 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, + 0x0253, 0x0253, 0x0253, 0x0253, 0x0244, 0x0244, 0x0244, 0x0244, + 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, + 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, + 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, + 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, + 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, + 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, + 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, + 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, + 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, + -448, 0x04ff, 0x04ef, 0x04df, 0x04ee, 0x04cf, 0x04de, 0x04bf, + 0x04fb, 0x04ce, 0x04dc, -464, 0x03ec, 0x03ec, 0x03dd, 0x03dd, + 0x04fa, 0x04cd, 0x03be, 0x03be, 0x03eb, 0x03eb, 0x039f, 0x039f, + 0x03f9, 0x03f9, 0x03ea, 0x03ea, 0x03bd, 0x03bd, 0x03db, 0x03db, + 0x038f, 0x038f, 0x03f8, 0x03f8, 0x03cc, 0x03cc, 0x04ae, 0x049e, + 0x038e, 0x038e, 0x047f, 0x047e, 0x02f7, 0x02f7, 0x02f7, 0x02f7, + 0x02da, 0x02da, 0x02da, 0x02da, 0x03ad, 0x03ad, 0x03bc, 0x03bc, + 0x03cb, 0x03cb, 0x03f6, 0x03f6, 0x026f, 0x026f, 0x026f, 0x026f, + 0x02e8, 0x02e8, 0x02e8, 0x02e8, 0x025f, 0x025f, 0x025f, 0x025f, + 0x029d, 0x029d, 0x029d, 0x029d, 0x02d9, 0x02d9, 0x02d9, 0x02d9, + 0x02f5, 0x02f5, 0x02f5, 0x02f5, 0x02e7, 0x02e7, 0x02e7, 0x02e7, + 0x02ac, 0x02ac, 0x02ac, 0x02ac, 0x02bb, 0x02bb, 0x02bb, 0x02bb, + 0x024f, 0x024f, 0x024f, 0x024f, 0x02f4, 0x02f4, 0x02f4, 0x02f4, + 0x03ca, 0x03ca, 0x03e6, 0x03e6, 0x02f3, 0x02f3, 0x02f3, 0x02f3, + 0x013f, 0x013f, 0x013f, 0x013f, 0x013f, 0x013f, 0x013f, 0x013f, + 0x028d, 0x028d, 0x028d, 0x028d, 0x02d8, 0x02d8, 0x02d8, 0x02d8, + 0x012f, 0x012f, 0x012f, 0x012f, 0x012f, 0x012f, 0x012f, 0x012f, + 0x01f2, 0x01f2, 0x01f2, 0x01f2, 0x01f2, 0x01f2, 0x01f2, 0x01f2, + 0x026e, 0x026e, 0x026e, 0x026e, 0x029c, 0x029c, 0x029c, 0x029c, + 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, + 0x02c9, 0x02c9, 0x02c9, 0x02c9, 0x025e, 0x025e, 0x025e, 0x025e, + 0x01ab, 0x01ab, 0x01ab, 0x01ab, 0x01ab, 0x01ab, 0x01ab, 0x01ab, + 0x027d, 0x027d, 0x027d, 0x027d, 0x02d7, 0x02d7, 0x02d7, 0x02d7, + 0x014e, 0x014e, 0x014e, 0x014e, 0x014e, 0x014e, 0x014e, 0x014e, + 0x02c8, 0x02c8, 0x02c8, 0x02c8, 0x02d6, 0x02d6, 0x02d6, 0x02d6, + 0x013e, 0x013e, 0x013e, 0x013e, 0x013e, 0x013e, 0x013e, 0x013e, + 0x01b9, 0x01b9, 0x01b9, 0x01b9, 0x01b9, 0x01b9, 0x01b9, 0x01b9, + 0x029b, 0x029b, 0x029b, 0x029b, 0x02aa, 0x02aa, 0x02aa, 0x02aa, + 0x01ba, 0x01ba, 0x01ba, 0x01ba, 0x01ba, 0x01ba, 0x01ba, 0x01ba, + 0x01e5, 0x01e5, 0x01e5, 0x01e5, 0x01e5, 0x01e5, 0x01e5, 0x01e5, + 0x01e4, 0x01e4, 0x01e4, 0x01e4, 0x01e4, 0x01e4, 0x01e4, 0x01e4, + 0x018c, 0x018c, 0x018c, 0x018c, 0x018c, 0x018c, 0x018c, 0x018c, + 0x016d, 0x016d, 0x016d, 0x016d, 0x016d, 0x016d, 0x016d, 0x016d, + 0x01e3, 0x01e3, 0x01e3, 0x01e3, 0x01e3, 0x01e3, 0x01e3, 0x01e3, + 0x012e, 0x012e, 0x012e, 0x012e, 0x012e, 0x012e, 0x012e, 0x012e, + 0x010e, 0x010e, 0x010e, 0x010e, 0x010e, 0x010e, 0x010e, 0x010e, + 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, + 0x015d, 0x015d, 0x015d, 0x015d, 0x015d, 0x015d, 0x015d, 0x015d, + 0x01d5, 0x01d5, 0x01d5, 0x01d5, 0x01d5, 0x01d5, 0x01d5, 0x01d5, + 0x017c, 0x017c, 0x017c, 0x017c, 0x017c, 0x017c, 0x017c, 0x017c, + 0x01c7, 0x01c7, 0x01c7, 0x01c7, 0x01c7, 0x01c7, 0x01c7, 0x01c7, + 0x014d, 0x014d, 0x014d, 0x014d, 0x014d, 0x014d, 0x014d, 0x014d, + 0x018b, 0x018b, 0x018b, 0x018b, 0x018b, 0x018b, 0x018b, 0x018b, + 0x01b8, 0x01b8, 0x01b8, 0x01b8, 0x01b8, 0x01b8, 0x01b8, 0x01b8, + 0x01d4, 0x01d4, 0x01d4, 0x01d4, 0x01d4, 0x01d4, 0x01d4, 0x01d4, + 0x019a, 0x019a, 0x019a, 0x019a, 0x019a, 0x019a, 0x019a, 0x019a, + 0x01a9, 0x01a9, 0x01a9, 0x01a9, 0x01a9, 0x01a9, 0x01a9, 0x01a9, + 0x016c, 0x016c, 0x016c, 0x016c, 0x016c, 0x016c, 0x016c, 0x016c, + 0x01d3, 0x01d3, 0x01d3, 0x01d3, 0x01d3, 0x01d3, 0x01d3, 0x01d3, + 0x017b, 0x017b, 0x017b, 0x017b, 0x017b, 0x017b, 0x017b, 0x017b, + 0x015c, 0x015c, 0x015c, 0x015c, 0x015c, 0x015c, 0x015c, 0x015c, + 0x01c5, 0x01c5, 0x01c5, 0x01c5, 0x01c5, 0x01c5, 0x01c5, 0x01c5, + 0x0199, 0x0199, 0x0199, 0x0199, 0x0199, 0x0199, 0x0199, 0x0199, + 0x017a, 0x017a, 0x017a, 0x017a, 0x017a, 0x017a, 0x017a, 0x017a, + 0x01a7, 0x01a7, 0x01a7, 0x01a7, 0x01a7, 0x01a7, 0x01a7, 0x01a7, + 0x0197, 0x0197, 0x0197, 0x0197, 0x0197, 0x0197, 0x0197, 0x0197, + 0x03fe, 0x03fe, 0x03fc, 0x03fc, 0x02fd, 0x02fd, 0x02fd, 0x02fd, + 0x01ed, 0x01ed, 0x01ed, 0x01ed, 0x01ed, 0x01ed, 0x01ed, 0x01ed, + 0x01af, 0x01af, 0x01af, 0x01af, 0x01af, 0x01af, 0x01af, 0x01af, + 0x01e9, 0x01e9, 0x01e9, 0x01e9, 0x01e9, 0x01e9, 0x01e9, 0x01e9, +}; + +static const short tab15_[] = +{ + -16, -32, -48, -64, -80, -96, -112, -128, + -144, -160, 0x0311, 0x0311, 0x0401, 0x0410, 0x0300, 0x0300, + -160, -176, -192, -208, -224, -240, -256, -272, + -288, -304, -320, -336, -352, -368, -384, -400, + -400, -416, -432, -448, -464, -480, -496, -512, + -528, -544, -560, -576, -592, -608, -624, -640, + -640, -656, 0x0491, -672, -688, -704, -720, -736, + 0x0428, 0x0482, 0x0418, 0x0481, -752, -768, -784, -800, + 0x0427, 0x0472, 0x0464, 0x0417, 0x0455, 0x0471, -800, 0x0436, + 0x0463, 0x0445, 0x0454, 0x0426, 0x0462, 0x0416, -816, 0x0435, + 0x0361, 0x0361, 0x0453, 0x0444, 0x0325, 0x0325, 0x0352, 0x0352, + 0x0315, 0x0315, 0x0351, 0x0351, 0x0405, 0x0450, 0x0334, 0x0334, + 0x0343, 0x0343, 0x0324, 0x0324, 0x0342, 0x0342, 0x0333, 0x0333, + 0x0241, 0x0241, 0x0241, 0x0241, 0x0314, 0x0314, 0x0304, 0x0304, + 0x0223, 0x0223, 0x0223, 0x0223, 0x0232, 0x0232, 0x0232, 0x0232, + 0x0340, 0x0340, 0x0303, 0x0303, 0x0213, 0x0213, 0x0213, 0x0213, + 0x0231, 0x0231, 0x0231, 0x0231, 0x0230, 0x0230, 0x0230, 0x0230, + 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, 0x0122, + 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, + 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, + 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, + 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, + -720, -736, 0x04ee, -752, -768, -784, 0x04fb, -800, + 0x04dd, 0x04af, 0x04fa, 0x04be, 0x04eb, 0x04cd, 0x04dc, 0x049f, + 0x04f9, 0x04ea, 0x04bd, 0x04db, 0x048f, 0x04f8, 0x04cc, 0x049e, + 0x04e9, 0x047f, 0x04f7, 0x04ad, 0x04da, 0x04bc, 0x046f, -800, + 0x03cb, 0x03cb, 0x03f6, 0x03f6, 0x048e, 0x04e8, 0x045f, 0x049d, + 0x03f5, 0x03f5, 0x037e, 0x037e, 0x03e7, 0x03e7, 0x03ac, 0x03ac, + 0x03ca, 0x03ca, 0x03bb, 0x03bb, 0x04d9, 0x048d, 0x034f, 0x034f, + 0x03f4, 0x03f4, 0x033f, 0x033f, 0x03f3, 0x03f3, 0x03d8, 0x03d8, + 0x03e6, 0x03e6, 0x032f, 0x032f, 0x03f2, 0x03f2, 0x046e, 0x04f0, + 0x031f, 0x031f, 0x03f1, 0x03f1, 0x039c, 0x039c, 0x03c9, 0x03c9, + 0x035e, 0x035e, 0x03ab, 0x03ab, 0x03ba, 0x03ba, 0x03e5, 0x03e5, + 0x037d, 0x037d, 0x03d7, 0x03d7, 0x034e, 0x034e, 0x03e4, 0x03e4, + 0x038c, 0x038c, 0x03c8, 0x03c8, 0x033e, 0x033e, 0x036d, 0x036d, + 0x03d6, 0x03d6, 0x03e3, 0x03e3, 0x039b, 0x039b, 0x03b9, 0x03b9, + 0x032e, 0x032e, 0x03aa, 0x03aa, 0x03e2, 0x03e2, 0x031e, 0x031e, + 0x03e1, 0x03e1, 0x040e, 0x04e0, 0x035d, 0x035d, 0x03d5, 0x03d5, + 0x037c, 0x037c, 0x03c7, 0x03c7, 0x034d, 0x034d, 0x038b, 0x038b, + 0x02d4, 0x02d4, 0x02d4, 0x02d4, 0x03b8, 0x03b8, 0x039a, 0x039a, + 0x03a9, 0x03a9, 0x036c, 0x036c, 0x03c6, 0x03c6, 0x033d, 0x033d, + 0x02d3, 0x02d3, 0x02d3, 0x02d3, 0x02d2, 0x02d2, 0x02d2, 0x02d2, + 0x032d, 0x032d, 0x030d, 0x030d, 0x021d, 0x021d, 0x021d, 0x021d, + 0x027b, 0x027b, 0x027b, 0x027b, 0x02b7, 0x02b7, 0x02b7, 0x02b7, + 0x02d1, 0x02d1, 0x02d1, 0x02d1, 0x035c, 0x035c, 0x03d0, 0x03d0, + 0x02c5, 0x02c5, 0x02c5, 0x02c5, 0x028a, 0x028a, 0x028a, 0x028a, + 0x02a8, 0x02a8, 0x02a8, 0x02a8, 0x024c, 0x024c, 0x024c, 0x024c, + 0x02c4, 0x02c4, 0x02c4, 0x02c4, 0x026b, 0x026b, 0x026b, 0x026b, + 0x02b6, 0x02b6, 0x02b6, 0x02b6, 0x0399, 0x0399, 0x030c, 0x030c, + 0x023c, 0x023c, 0x023c, 0x023c, 0x02c3, 0x02c3, 0x02c3, 0x02c3, + 0x027a, 0x027a, 0x027a, 0x027a, 0x02a7, 0x02a7, 0x02a7, 0x02a7, + 0x02a6, 0x02a6, 0x02a6, 0x02a6, 0x03c0, 0x03c0, 0x030b, 0x030b, + 0x01c2, 0x01c2, 0x01c2, 0x01c2, 0x01c2, 0x01c2, 0x01c2, 0x01c2, + 0x022c, 0x022c, 0x022c, 0x022c, 0x025b, 0x025b, 0x025b, 0x025b, + 0x02b5, 0x02b5, 0x02b5, 0x02b5, 0x021c, 0x021c, 0x021c, 0x021c, + 0x0289, 0x0289, 0x0289, 0x0289, 0x0298, 0x0298, 0x0298, 0x0298, + 0x02c1, 0x02c1, 0x02c1, 0x02c1, 0x024b, 0x024b, 0x024b, 0x024b, + 0x02b4, 0x02b4, 0x02b4, 0x02b4, 0x026a, 0x026a, 0x026a, 0x026a, + 0x023b, 0x023b, 0x023b, 0x023b, 0x0279, 0x0279, 0x0279, 0x0279, + 0x01b3, 0x01b3, 0x01b3, 0x01b3, 0x01b3, 0x01b3, 0x01b3, 0x01b3, + 0x0297, 0x0297, 0x0297, 0x0297, 0x0288, 0x0288, 0x0288, 0x0288, + 0x022b, 0x022b, 0x022b, 0x022b, 0x025a, 0x025a, 0x025a, 0x025a, + 0x01b2, 0x01b2, 0x01b2, 0x01b2, 0x01b2, 0x01b2, 0x01b2, 0x01b2, + 0x02a5, 0x02a5, 0x02a5, 0x02a5, 0x021b, 0x021b, 0x021b, 0x021b, + 0x01b1, 0x01b1, 0x01b1, 0x01b1, 0x01b1, 0x01b1, 0x01b1, 0x01b1, + 0x02b0, 0x02b0, 0x02b0, 0x02b0, 0x0269, 0x0269, 0x0269, 0x0269, + 0x0296, 0x0296, 0x0296, 0x0296, 0x024a, 0x024a, 0x024a, 0x024a, + 0x02a4, 0x02a4, 0x02a4, 0x02a4, 0x0278, 0x0278, 0x0278, 0x0278, + 0x0287, 0x0287, 0x0287, 0x0287, 0x023a, 0x023a, 0x023a, 0x023a, + 0x01a3, 0x01a3, 0x01a3, 0x01a3, 0x01a3, 0x01a3, 0x01a3, 0x01a3, + 0x0159, 0x0159, 0x0159, 0x0159, 0x0159, 0x0159, 0x0159, 0x0159, + 0x0195, 0x0195, 0x0195, 0x0195, 0x0195, 0x0195, 0x0195, 0x0195, + 0x012a, 0x012a, 0x012a, 0x012a, 0x012a, 0x012a, 0x012a, 0x012a, + 0x01a2, 0x01a2, 0x01a2, 0x01a2, 0x01a2, 0x01a2, 0x01a2, 0x01a2, + 0x011a, 0x011a, 0x011a, 0x011a, 0x011a, 0x011a, 0x011a, 0x011a, + 0x01a1, 0x01a1, 0x01a1, 0x01a1, 0x01a1, 0x01a1, 0x01a1, 0x01a1, + 0x020a, 0x020a, 0x020a, 0x020a, 0x02a0, 0x02a0, 0x02a0, 0x02a0, + 0x0168, 0x0168, 0x0168, 0x0168, 0x0168, 0x0168, 0x0168, 0x0168, + 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, + 0x0149, 0x0149, 0x0149, 0x0149, 0x0149, 0x0149, 0x0149, 0x0149, + 0x0194, 0x0194, 0x0194, 0x0194, 0x0194, 0x0194, 0x0194, 0x0194, + 0x0139, 0x0139, 0x0139, 0x0139, 0x0139, 0x0139, 0x0139, 0x0139, + 0x0193, 0x0193, 0x0193, 0x0193, 0x0193, 0x0193, 0x0193, 0x0193, + 0x0277, 0x0277, 0x0277, 0x0277, 0x0209, 0x0209, 0x0209, 0x0209, + 0x0158, 0x0158, 0x0158, 0x0158, 0x0158, 0x0158, 0x0158, 0x0158, + 0x0185, 0x0185, 0x0185, 0x0185, 0x0185, 0x0185, 0x0185, 0x0185, + 0x0129, 0x0129, 0x0129, 0x0129, 0x0129, 0x0129, 0x0129, 0x0129, + 0x0167, 0x0167, 0x0167, 0x0167, 0x0167, 0x0167, 0x0167, 0x0167, + 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, + 0x0192, 0x0192, 0x0192, 0x0192, 0x0192, 0x0192, 0x0192, 0x0192, + 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, + 0x0190, 0x0190, 0x0190, 0x0190, 0x0190, 0x0190, 0x0190, 0x0190, + 0x0148, 0x0148, 0x0148, 0x0148, 0x0148, 0x0148, 0x0148, 0x0148, + 0x0184, 0x0184, 0x0184, 0x0184, 0x0184, 0x0184, 0x0184, 0x0184, + 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, + 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, + 0x0138, 0x0138, 0x0138, 0x0138, 0x0138, 0x0138, 0x0138, 0x0138, + 0x0183, 0x0183, 0x0183, 0x0183, 0x0183, 0x0183, 0x0183, 0x0183, + 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, + 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, + 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, + 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, + 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, + 0x0156, 0x0156, 0x0156, 0x0156, 0x0156, 0x0156, 0x0156, 0x0156, + 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, + 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, + 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, 0x0173, + 0x0146, 0x0146, 0x0146, 0x0146, 0x0146, 0x0146, 0x0146, 0x0146, + 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, + 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, 0x0170, + 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, + 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, + 0x01ff, 0x01ff, 0x01ff, 0x01ff, 0x01ff, 0x01ff, 0x01ff, 0x01ff, + 0x01ef, 0x01ef, 0x01ef, 0x01ef, 0x01ef, 0x01ef, 0x01ef, 0x01ef, + 0x01fe, 0x01fe, 0x01fe, 0x01fe, 0x01fe, 0x01fe, 0x01fe, 0x01fe, + 0x01df, 0x01df, 0x01df, 0x01df, 0x01df, 0x01df, 0x01df, 0x01df, + 0x01fd, 0x01fd, 0x01fd, 0x01fd, 0x01fd, 0x01fd, 0x01fd, 0x01fd, + 0x01cf, 0x01cf, 0x01cf, 0x01cf, 0x01cf, 0x01cf, 0x01cf, 0x01cf, + 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, 0x01fc, + 0x01de, 0x01de, 0x01de, 0x01de, 0x01de, 0x01de, 0x01de, 0x01de, + 0x01ed, 0x01ed, 0x01ed, 0x01ed, 0x01ed, 0x01ed, 0x01ed, 0x01ed, + 0x01bf, 0x01bf, 0x01bf, 0x01bf, 0x01bf, 0x01bf, 0x01bf, 0x01bf, + 0x01ce, 0x01ce, 0x01ce, 0x01ce, 0x01ce, 0x01ce, 0x01ce, 0x01ce, + 0x01ec, 0x01ec, 0x01ec, 0x01ec, 0x01ec, 0x01ec, 0x01ec, 0x01ec, + 0x01ae, 0x01ae, 0x01ae, 0x01ae, 0x01ae, 0x01ae, 0x01ae, 0x01ae, + 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, +}; + +static const short tab16_[] = +{ + -16, -32, -48, -64, 0x0411, 0x0401, 0x0310, 0x0310, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, + -64, -80, -96, 0x04ff, -112, -128, -144, 0x04f2, + -160, 0x041f, 0x04f1, -176, -192, -208, -224, -240, + -240, -256, -272, -288, -304, -320, -336, -352, + -368, -384, -400, -416, -432, -448, 0x0451, -464, + -464, -480, -496, 0x0414, 0x0441, -512, 0x0423, 0x0432, + 0x0313, 0x0313, 0x0331, 0x0331, 0x0403, 0x0430, 0x0322, 0x0322, + 0x0212, 0x0212, 0x0212, 0x0212, 0x0221, 0x0221, 0x0221, 0x0221, + 0x0202, 0x0202, 0x0202, 0x0202, 0x0220, 0x0220, 0x0220, 0x0220, + 0x03ef, 0x03ef, 0x03fe, 0x03fe, 0x03df, 0x03df, 0x03fd, 0x03fd, + 0x03cf, 0x03cf, 0x03fc, 0x03fc, 0x03bf, 0x03bf, 0x03fb, 0x03fb, + 0x02af, 0x02af, 0x02af, 0x02af, 0x03fa, 0x03fa, 0x039f, 0x039f, + 0x03f9, 0x03f9, 0x03f8, 0x03f8, 0x028f, 0x028f, 0x028f, 0x028f, + 0x027f, 0x027f, 0x027f, 0x027f, 0x02f7, 0x02f7, 0x02f7, 0x02f7, + 0x026f, 0x026f, 0x026f, 0x026f, 0x02f6, 0x02f6, 0x02f6, 0x02f6, + 0x025f, 0x025f, 0x025f, 0x025f, 0x02f5, 0x02f5, 0x02f5, 0x02f5, + 0x014f, 0x014f, 0x014f, 0x014f, 0x014f, 0x014f, 0x014f, 0x014f, + 0x01f4, 0x01f4, 0x01f4, 0x01f4, 0x01f4, 0x01f4, 0x01f4, 0x01f4, + 0x01f3, 0x01f3, 0x01f3, 0x01f3, 0x01f3, 0x01f3, 0x01f3, 0x01f3, + 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0x01f0, + 0x023f, 0x023f, 0x023f, 0x023f, -416, -432, -448, -464, + 0x012f, 0x012f, 0x012f, 0x012f, 0x012f, 0x012f, 0x012f, 0x012f, + 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, + -448, -464, -480, -496, -512, -528, -544, -560, + -576, -592, -608, 0x04e3, -624, -640, -656, -672, + -672, -688, -704, 0x040d, -720, -736, -752, 0x043c, + -768, 0x041c, 0x04c0, -784, 0x03e2, 0x03e2, 0x042e, 0x041e, + 0x04d3, 0x042d, 0x04d2, 0x04d1, 0x043b, -784, 0x031d, 0x031d, + 0x04c4, 0x046b, 0x04c3, 0x04a7, 0x032c, 0x032c, 0x04c2, 0x04b5, + 0x04c1, 0x040c, 0x044b, 0x04b4, 0x046a, 0x04a6, 0x03b3, 0x03b3, + 0x045a, 0x04a5, 0x032b, 0x032b, 0x03b2, 0x03b2, 0x031b, 0x031b, + 0x03b1, 0x03b1, 0x040b, 0x04b0, 0x0469, 0x0496, 0x044a, 0x04a4, + 0x0478, 0x0487, 0x03a3, 0x03a3, 0x043a, 0x0459, 0x032a, 0x032a, + 0x0495, 0x0468, 0x03a1, 0x03a1, 0x0486, 0x0477, 0x0394, 0x0394, + 0x0449, 0x0457, 0x0367, 0x0367, 0x02a2, 0x02a2, 0x02a2, 0x02a2, + 0x021a, 0x021a, 0x021a, 0x021a, 0x030a, 0x030a, 0x03a0, 0x03a0, + 0x0339, 0x0339, 0x0393, 0x0393, 0x0358, 0x0358, 0x0385, 0x0385, + 0x0229, 0x0229, 0x0229, 0x0229, 0x0292, 0x0292, 0x0292, 0x0292, + 0x0376, 0x0376, 0x0309, 0x0309, 0x0219, 0x0219, 0x0219, 0x0219, + 0x0291, 0x0291, 0x0291, 0x0291, 0x0390, 0x0390, 0x0348, 0x0348, + 0x0384, 0x0384, 0x0375, 0x0375, 0x0338, 0x0338, 0x0383, 0x0383, + 0x0366, 0x0366, 0x0328, 0x0328, 0x0282, 0x0282, 0x0282, 0x0282, + 0x0347, 0x0347, 0x0374, 0x0374, 0x0218, 0x0218, 0x0218, 0x0218, + 0x0281, 0x0281, 0x0281, 0x0281, 0x0280, 0x0280, 0x0280, 0x0280, + 0x0308, 0x0308, 0x0356, 0x0356, 0x0237, 0x0237, 0x0237, 0x0237, + 0x0273, 0x0273, 0x0273, 0x0273, 0x0365, 0x0365, 0x0346, 0x0346, + 0x0227, 0x0227, 0x0227, 0x0227, 0x0272, 0x0272, 0x0272, 0x0272, + 0x0364, 0x0364, 0x0355, 0x0355, 0x0207, 0x0207, 0x0207, 0x0207, + 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, + 0x0171, 0x0171, 0x0171, 0x0171, 0x0171, 0x0171, 0x0171, 0x0171, + 0x0270, 0x0270, 0x0270, 0x0270, 0x0236, 0x0236, 0x0236, 0x0236, + 0x0263, 0x0263, 0x0263, 0x0263, 0x0245, 0x0245, 0x0245, 0x0245, + 0x0254, 0x0254, 0x0254, 0x0254, 0x0226, 0x0226, 0x0226, 0x0226, + 0x0162, 0x0162, 0x0162, 0x0162, 0x0162, 0x0162, 0x0162, 0x0162, + 0x0116, 0x0116, 0x0116, 0x0116, 0x0116, 0x0116, 0x0116, 0x0116, + 0x0161, 0x0161, 0x0161, 0x0161, 0x0161, 0x0161, 0x0161, 0x0161, + 0x0206, 0x0206, 0x0206, 0x0206, 0x0260, 0x0260, 0x0260, 0x0260, + 0x0153, 0x0153, 0x0153, 0x0153, 0x0153, 0x0153, 0x0153, 0x0153, + 0x0235, 0x0235, 0x0235, 0x0235, 0x0244, 0x0244, 0x0244, 0x0244, + 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, + 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, 0x0152, + 0x0115, 0x0115, 0x0115, 0x0115, 0x0115, 0x0115, 0x0115, 0x0115, + 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, + 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, 0x0134, + 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, 0x0143, + 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, + 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, 0x0124, + 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, 0x0142, + 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, 0x0133, + 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, + 0x0140, 0x0140, 0x0140, 0x0140, 0x0140, 0x0140, 0x0140, 0x0140, + 0x04ce, -448, 0x03de, 0x03de, 0x03e9, 0x03e9, 0x04ea, 0x04d9, + 0x02ee, 0x02ee, 0x02ee, 0x02ee, 0x03ed, 0x03ed, 0x03eb, 0x03eb, + 0x02be, 0x02be, 0x02be, 0x02be, 0x02cd, 0x02cd, 0x02cd, 0x02cd, + 0x03dc, 0x03dc, 0x03db, 0x03db, 0x02ae, 0x02ae, 0x02ae, 0x02ae, + 0x02cc, 0x02cc, 0x02cc, 0x02cc, 0x03ad, 0x03ad, 0x03da, 0x03da, + 0x037e, 0x037e, 0x03ac, 0x03ac, 0x02ca, 0x02ca, 0x02ca, 0x02ca, + 0x03c9, 0x03c9, 0x037d, 0x037d, 0x025e, 0x025e, 0x025e, 0x025e, + 0x01bd, 0x01bd, 0x01bd, 0x01bd, 0x01bd, 0x01bd, 0x01bd, 0x01bd, + 0x019e, 0x019e, 0x019e, 0x019e, 0x019e, 0x019e, 0x019e, 0x019e, + 0x02bc, 0x02bc, 0x02bc, 0x02bc, 0x02cb, 0x02cb, 0x02cb, 0x02cb, + 0x028e, 0x028e, 0x028e, 0x028e, 0x02e8, 0x02e8, 0x02e8, 0x02e8, + 0x029d, 0x029d, 0x029d, 0x029d, 0x02e7, 0x02e7, 0x02e7, 0x02e7, + 0x02bb, 0x02bb, 0x02bb, 0x02bb, 0x028d, 0x028d, 0x028d, 0x028d, + 0x02d8, 0x02d8, 0x02d8, 0x02d8, 0x026e, 0x026e, 0x026e, 0x026e, + 0x01e6, 0x01e6, 0x01e6, 0x01e6, 0x01e6, 0x01e6, 0x01e6, 0x01e6, + 0x019c, 0x019c, 0x019c, 0x019c, 0x019c, 0x019c, 0x019c, 0x019c, + 0x02ab, 0x02ab, 0x02ab, 0x02ab, 0x02ba, 0x02ba, 0x02ba, 0x02ba, + 0x02e5, 0x02e5, 0x02e5, 0x02e5, 0x02d7, 0x02d7, 0x02d7, 0x02d7, + 0x014e, 0x014e, 0x014e, 0x014e, 0x014e, 0x014e, 0x014e, 0x014e, + 0x02e4, 0x02e4, 0x02e4, 0x02e4, 0x028c, 0x028c, 0x028c, 0x028c, + 0x01c8, 0x01c8, 0x01c8, 0x01c8, 0x01c8, 0x01c8, 0x01c8, 0x01c8, + 0x013e, 0x013e, 0x013e, 0x013e, 0x013e, 0x013e, 0x013e, 0x013e, + 0x016d, 0x016d, 0x016d, 0x016d, 0x016d, 0x016d, 0x016d, 0x016d, + 0x02d6, 0x02d6, 0x02d6, 0x02d6, 0x029b, 0x029b, 0x029b, 0x029b, + 0x02b9, 0x02b9, 0x02b9, 0x02b9, 0x02aa, 0x02aa, 0x02aa, 0x02aa, + 0x01e1, 0x01e1, 0x01e1, 0x01e1, 0x01e1, 0x01e1, 0x01e1, 0x01e1, + 0x01d4, 0x01d4, 0x01d4, 0x01d4, 0x01d4, 0x01d4, 0x01d4, 0x01d4, + 0x02b8, 0x02b8, 0x02b8, 0x02b8, 0x02a9, 0x02a9, 0x02a9, 0x02a9, + 0x017b, 0x017b, 0x017b, 0x017b, 0x017b, 0x017b, 0x017b, 0x017b, + 0x02b7, 0x02b7, 0x02b7, 0x02b7, 0x02d0, 0x02d0, 0x02d0, 0x02d0, + 0x010e, 0x010e, 0x010e, 0x010e, 0x010e, 0x010e, 0x010e, 0x010e, + 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, + 0x015d, 0x015d, 0x015d, 0x015d, 0x015d, 0x015d, 0x015d, 0x015d, + 0x01d5, 0x01d5, 0x01d5, 0x01d5, 0x01d5, 0x01d5, 0x01d5, 0x01d5, + 0x017c, 0x017c, 0x017c, 0x017c, 0x017c, 0x017c, 0x017c, 0x017c, + 0x01c7, 0x01c7, 0x01c7, 0x01c7, 0x01c7, 0x01c7, 0x01c7, 0x01c7, + 0x014d, 0x014d, 0x014d, 0x014d, 0x014d, 0x014d, 0x014d, 0x014d, + 0x018b, 0x018b, 0x018b, 0x018b, 0x018b, 0x018b, 0x018b, 0x018b, + 0x019a, 0x019a, 0x019a, 0x019a, 0x019a, 0x019a, 0x019a, 0x019a, + 0x016c, 0x016c, 0x016c, 0x016c, 0x016c, 0x016c, 0x016c, 0x016c, + 0x01c6, 0x01c6, 0x01c6, 0x01c6, 0x01c6, 0x01c6, 0x01c6, 0x01c6, + 0x013d, 0x013d, 0x013d, 0x013d, 0x013d, 0x013d, 0x013d, 0x013d, + 0x015c, 0x015c, 0x015c, 0x015c, 0x015c, 0x015c, 0x015c, 0x015c, + 0x01c5, 0x01c5, 0x01c5, 0x01c5, 0x01c5, 0x01c5, 0x01c5, 0x01c5, + 0x018a, 0x018a, 0x018a, 0x018a, 0x018a, 0x018a, 0x018a, 0x018a, + 0x01a8, 0x01a8, 0x01a8, 0x01a8, 0x01a8, 0x01a8, 0x01a8, 0x01a8, + 0x0199, 0x0199, 0x0199, 0x0199, 0x0199, 0x0199, 0x0199, 0x0199, + 0x014c, 0x014c, 0x014c, 0x014c, 0x014c, 0x014c, 0x014c, 0x014c, + 0x01b6, 0x01b6, 0x01b6, 0x01b6, 0x01b6, 0x01b6, 0x01b6, 0x01b6, + 0x017a, 0x017a, 0x017a, 0x017a, 0x017a, 0x017a, 0x017a, 0x017a, + 0x015b, 0x015b, 0x015b, 0x015b, 0x015b, 0x015b, 0x015b, 0x015b, + 0x0189, 0x0189, 0x0189, 0x0189, 0x0189, 0x0189, 0x0189, 0x0189, + 0x0198, 0x0198, 0x0198, 0x0198, 0x0198, 0x0198, 0x0198, 0x0198, + 0x0179, 0x0179, 0x0179, 0x0179, 0x0179, 0x0179, 0x0179, 0x0179, + 0x0197, 0x0197, 0x0197, 0x0197, 0x0197, 0x0197, 0x0197, 0x0197, + 0x0188, 0x0188, 0x0188, 0x0188, 0x0188, 0x0188, 0x0188, 0x0188, + 0x01ec, 0x01ec, 0x01ec, 0x01ec, 0x01ec, 0x01ec, 0x01ec, 0x01ec, + 0x01dd, 0x01dd, 0x01dd, 0x01dd, 0x01dd, 0x01dd, 0x01dd, 0x01dd, +}; + +static const short tab24_[] = +{ + -16, -32, -48, 0x04ff, -64, -80, -96, -112, + -128, -144, -160, -176, 0x0411, 0x0401, 0x0410, 0x0400, + 0x04ef, 0x04fe, 0x04df, 0x04fd, 0x04cf, 0x04fc, 0x04bf, 0x04fb, + 0x03fa, 0x03fa, 0x04af, 0x049f, 0x03f9, 0x03f9, 0x03f8, 0x03f8, + 0x048f, 0x047f, 0x03f7, 0x03f7, 0x036f, 0x036f, 0x03f6, 0x03f6, + 0x035f, 0x035f, 0x03f5, 0x03f5, 0x034f, 0x034f, 0x03f4, 0x03f4, + 0x033f, 0x033f, 0x03f3, 0x03f3, 0x032f, 0x032f, 0x03f2, 0x03f2, + 0x03f1, 0x03f1, 0x041f, 0x04f0, -144, -160, -176, -192, + -192, -208, -224, -240, -256, -272, -288, -304, + -320, -336, -352, -368, -384, -400, -416, -432, + -432, -448, -464, -480, -496, -512, -528, -544, + -560, -576, -592, -608, -624, -640, -656, -672, + -672, -688, -704, -720, -736, -752, -768, -784, + -800, -816, -832, -848, -864, 0x0473, -880, 0x0472, + 0x0446, 0x0464, 0x0455, 0x0471, 0x0436, 0x0463, 0x0445, 0x0454, + 0x0426, 0x0462, 0x0416, 0x0461, -880, 0x0435, 0x0453, 0x0444, + 0x0425, 0x0452, 0x0415, -880, 0x0351, 0x0351, 0x0434, 0x0443, + 0x0324, 0x0324, 0x0342, 0x0342, 0x0333, 0x0333, 0x0314, 0x0314, + 0x0341, 0x0341, 0x0404, 0x0440, 0x0323, 0x0323, 0x0332, 0x0332, + 0x0213, 0x0213, 0x0213, 0x0213, 0x0231, 0x0231, 0x0231, 0x0231, + 0x0303, 0x0303, 0x0330, 0x0330, 0x0222, 0x0222, 0x0222, 0x0222, + 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, 0x0112, + 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, 0x0121, + 0x0202, 0x0202, 0x0202, 0x0202, 0x0220, 0x0220, 0x0220, 0x0220, + 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, 0x010f, + 0x03ee, 0x03ee, 0x03de, 0x03de, 0x03ed, 0x03ed, 0x03ce, 0x03ce, + 0x03ec, 0x03ec, 0x03dd, 0x03dd, 0x03be, 0x03be, 0x03eb, 0x03eb, + 0x03cd, 0x03cd, 0x03dc, 0x03dc, 0x03ae, 0x03ae, 0x03ea, 0x03ea, + 0x03bd, 0x03bd, 0x03db, 0x03db, 0x03cc, 0x03cc, 0x039e, 0x039e, + 0x03e9, 0x03e9, 0x03ad, 0x03ad, 0x03da, 0x03da, 0x03bc, 0x03bc, + 0x03cb, 0x03cb, 0x038e, 0x038e, 0x03e8, 0x03e8, 0x039d, 0x039d, + 0x03d9, 0x03d9, 0x037e, 0x037e, 0x03e7, 0x03e7, 0x03ac, 0x03ac, + 0x03ca, 0x03ca, 0x03bb, 0x03bb, 0x038d, 0x038d, 0x03d8, 0x03d8, + 0x040e, 0x04e0, 0x030d, 0x030d, 0x02e6, 0x02e6, 0x02e6, 0x02e6, + 0x036e, 0x036e, 0x039c, 0x039c, 0x02c9, 0x02c9, 0x02c9, 0x02c9, + 0x025e, 0x025e, 0x025e, 0x025e, 0x02ba, 0x02ba, 0x02ba, 0x02ba, + 0x02e5, 0x02e5, 0x02e5, 0x02e5, 0x03ab, 0x03ab, 0x037d, 0x037d, + 0x02d7, 0x02d7, 0x02d7, 0x02d7, 0x02e4, 0x02e4, 0x02e4, 0x02e4, + 0x028c, 0x028c, 0x028c, 0x028c, 0x02c8, 0x02c8, 0x02c8, 0x02c8, + 0x034e, 0x034e, 0x032e, 0x032e, 0x023e, 0x023e, 0x023e, 0x023e, + 0x026d, 0x026d, 0x026d, 0x026d, 0x02d6, 0x02d6, 0x02d6, 0x02d6, + 0x02e3, 0x02e3, 0x02e3, 0x02e3, 0x029b, 0x029b, 0x029b, 0x029b, + 0x02b9, 0x02b9, 0x02b9, 0x02b9, 0x02aa, 0x02aa, 0x02aa, 0x02aa, + 0x02e2, 0x02e2, 0x02e2, 0x02e2, 0x021e, 0x021e, 0x021e, 0x021e, + 0x02e1, 0x02e1, 0x02e1, 0x02e1, 0x025d, 0x025d, 0x025d, 0x025d, + 0x02d5, 0x02d5, 0x02d5, 0x02d5, 0x027c, 0x027c, 0x027c, 0x027c, + 0x02c7, 0x02c7, 0x02c7, 0x02c7, 0x024d, 0x024d, 0x024d, 0x024d, + 0x028b, 0x028b, 0x028b, 0x028b, 0x02b8, 0x02b8, 0x02b8, 0x02b8, + 0x02d4, 0x02d4, 0x02d4, 0x02d4, 0x029a, 0x029a, 0x029a, 0x029a, + 0x02a9, 0x02a9, 0x02a9, 0x02a9, 0x026c, 0x026c, 0x026c, 0x026c, + 0x02c6, 0x02c6, 0x02c6, 0x02c6, 0x023d, 0x023d, 0x023d, 0x023d, + 0x02d3, 0x02d3, 0x02d3, 0x02d3, 0x022d, 0x022d, 0x022d, 0x022d, + 0x02d2, 0x02d2, 0x02d2, 0x02d2, 0x021d, 0x021d, 0x021d, 0x021d, + 0x027b, 0x027b, 0x027b, 0x027b, 0x02b7, 0x02b7, 0x02b7, 0x02b7, + 0x02d1, 0x02d1, 0x02d1, 0x02d1, 0x025c, 0x025c, 0x025c, 0x025c, + 0x02c5, 0x02c5, 0x02c5, 0x02c5, 0x028a, 0x028a, 0x028a, 0x028a, + 0x02a8, 0x02a8, 0x02a8, 0x02a8, 0x0299, 0x0299, 0x0299, 0x0299, + 0x024c, 0x024c, 0x024c, 0x024c, 0x02c4, 0x02c4, 0x02c4, 0x02c4, + 0x026b, 0x026b, 0x026b, 0x026b, 0x02b6, 0x02b6, 0x02b6, 0x02b6, + 0x03d0, 0x03d0, 0x030c, 0x030c, 0x023c, 0x023c, 0x023c, 0x023c, + 0x02c3, 0x02c3, 0x02c3, 0x02c3, 0x027a, 0x027a, 0x027a, 0x027a, + 0x02a7, 0x02a7, 0x02a7, 0x02a7, 0x022c, 0x022c, 0x022c, 0x022c, + 0x02c2, 0x02c2, 0x02c2, 0x02c2, 0x025b, 0x025b, 0x025b, 0x025b, + 0x02b5, 0x02b5, 0x02b5, 0x02b5, 0x021c, 0x021c, 0x021c, 0x021c, + 0x0289, 0x0289, 0x0289, 0x0289, 0x0298, 0x0298, 0x0298, 0x0298, + 0x02c1, 0x02c1, 0x02c1, 0x02c1, 0x024b, 0x024b, 0x024b, 0x024b, + 0x03c0, 0x03c0, 0x030b, 0x030b, 0x023b, 0x023b, 0x023b, 0x023b, + 0x03b0, 0x03b0, 0x030a, 0x030a, 0x021a, 0x021a, 0x021a, 0x021a, + 0x01b4, 0x01b4, 0x01b4, 0x01b4, 0x01b4, 0x01b4, 0x01b4, 0x01b4, + 0x026a, 0x026a, 0x026a, 0x026a, 0x02a6, 0x02a6, 0x02a6, 0x02a6, + 0x0279, 0x0279, 0x0279, 0x0279, 0x0297, 0x0297, 0x0297, 0x0297, + 0x03a0, 0x03a0, 0x0309, 0x0309, 0x0290, 0x0290, 0x0290, 0x0290, + 0x01b3, 0x01b3, 0x01b3, 0x01b3, 0x01b3, 0x01b3, 0x01b3, 0x01b3, + 0x0188, 0x0188, 0x0188, 0x0188, 0x0188, 0x0188, 0x0188, 0x0188, + 0x022b, 0x022b, 0x022b, 0x022b, 0x025a, 0x025a, 0x025a, 0x025a, + 0x01b2, 0x01b2, 0x01b2, 0x01b2, 0x01b2, 0x01b2, 0x01b2, 0x01b2, + 0x02a5, 0x02a5, 0x02a5, 0x02a5, 0x021b, 0x021b, 0x021b, 0x021b, + 0x02b1, 0x02b1, 0x02b1, 0x02b1, 0x0269, 0x0269, 0x0269, 0x0269, + 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, 0x0196, + 0x01a4, 0x01a4, 0x01a4, 0x01a4, 0x01a4, 0x01a4, 0x01a4, 0x01a4, + 0x024a, 0x024a, 0x024a, 0x024a, 0x0278, 0x0278, 0x0278, 0x0278, + 0x0187, 0x0187, 0x0187, 0x0187, 0x0187, 0x0187, 0x0187, 0x0187, + 0x013a, 0x013a, 0x013a, 0x013a, 0x013a, 0x013a, 0x013a, 0x013a, + 0x01a3, 0x01a3, 0x01a3, 0x01a3, 0x01a3, 0x01a3, 0x01a3, 0x01a3, + 0x0159, 0x0159, 0x0159, 0x0159, 0x0159, 0x0159, 0x0159, 0x0159, + 0x0195, 0x0195, 0x0195, 0x0195, 0x0195, 0x0195, 0x0195, 0x0195, + 0x012a, 0x012a, 0x012a, 0x012a, 0x012a, 0x012a, 0x012a, 0x012a, + 0x01a2, 0x01a2, 0x01a2, 0x01a2, 0x01a2, 0x01a2, 0x01a2, 0x01a2, + 0x01a1, 0x01a1, 0x01a1, 0x01a1, 0x01a1, 0x01a1, 0x01a1, 0x01a1, + 0x0168, 0x0168, 0x0168, 0x0168, 0x0168, 0x0168, 0x0168, 0x0168, + 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, 0x0186, + 0x0177, 0x0177, 0x0177, 0x0177, 0x0177, 0x0177, 0x0177, 0x0177, + 0x0149, 0x0149, 0x0149, 0x0149, 0x0149, 0x0149, 0x0149, 0x0149, + 0x0194, 0x0194, 0x0194, 0x0194, 0x0194, 0x0194, 0x0194, 0x0194, + 0x0139, 0x0139, 0x0139, 0x0139, 0x0139, 0x0139, 0x0139, 0x0139, + 0x0193, 0x0193, 0x0193, 0x0193, 0x0193, 0x0193, 0x0193, 0x0193, + 0x0158, 0x0158, 0x0158, 0x0158, 0x0158, 0x0158, 0x0158, 0x0158, + 0x0185, 0x0185, 0x0185, 0x0185, 0x0185, 0x0185, 0x0185, 0x0185, + 0x0129, 0x0129, 0x0129, 0x0129, 0x0129, 0x0129, 0x0129, 0x0129, + 0x0167, 0x0167, 0x0167, 0x0167, 0x0167, 0x0167, 0x0167, 0x0167, + 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, 0x0176, + 0x0192, 0x0192, 0x0192, 0x0192, 0x0192, 0x0192, 0x0192, 0x0192, + 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, 0x0119, + 0x0191, 0x0191, 0x0191, 0x0191, 0x0191, 0x0191, 0x0191, 0x0191, + 0x0148, 0x0148, 0x0148, 0x0148, 0x0148, 0x0148, 0x0148, 0x0148, + 0x0184, 0x0184, 0x0184, 0x0184, 0x0184, 0x0184, 0x0184, 0x0184, + 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, 0x0157, + 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, 0x0175, + 0x0138, 0x0138, 0x0138, 0x0138, 0x0138, 0x0138, 0x0138, 0x0138, + 0x0183, 0x0183, 0x0183, 0x0183, 0x0183, 0x0183, 0x0183, 0x0183, + 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, 0x0166, + 0x0128, 0x0128, 0x0128, 0x0128, 0x0128, 0x0128, 0x0128, 0x0128, + 0x0182, 0x0182, 0x0182, 0x0182, 0x0182, 0x0182, 0x0182, 0x0182, + 0x0118, 0x0118, 0x0118, 0x0118, 0x0118, 0x0118, 0x0118, 0x0118, + 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, 0x0147, + 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, 0x0174, + 0x0181, 0x0181, 0x0181, 0x0181, 0x0181, 0x0181, 0x0181, 0x0181, + 0x0208, 0x0208, 0x0208, 0x0208, 0x0280, 0x0280, 0x0280, 0x0280, + 0x0156, 0x0156, 0x0156, 0x0156, 0x0156, 0x0156, 0x0156, 0x0156, + 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, 0x0165, + 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, 0x0117, + 0x0207, 0x0207, 0x0207, 0x0207, 0x0270, 0x0270, 0x0270, 0x0270, + 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, 0x0137, + 0x0127, 0x0127, 0x0127, 0x0127, 0x0127, 0x0127, 0x0127, 0x0127, + 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, + 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, + 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, + 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, 0x0150, +}; + +static const short tab_c0[] = +{ + -29, -21, -13, -7, -3, -1, 11, 15, -1, 13, 14, -3, -1, 7, 5, + 9, -3, -1, 6, 3, -1, 10, 12, -3, -1, 2, 1, -1, 4, 8, + 0 +}; + +static const short tab_c1[] = +{ + -15, -7, -3, -1, 15, 14, -1, 13, 12, -3, -1, 11, 10, -1, 9, + 8, -7, -3, -1, 7, 6, -1, 5, 4, -3, -1, 3, 2, -1, 1, + 0 +}; + +static const struct newhuff ht[] = +{ + { /* 0 */ 0 , tab0_ } , + { /* 2 */ 0 , tab1_ } , + { /* 3 */ 0 , tab2_ } , + { /* 3 */ 0 , tab3_ } , + { /* 0 */ 0 , tab0_ } , + { /* 4 */ 0 , tab5_ } , + { /* 4 */ 0 , tab6_ } , + { /* 6 */ 0 , tab7_ } , + { /* 6 */ 0 , tab8_ } , + { /* 6 */ 0 , tab9_ } , + { /* 8 */ 0 , tab10_ } , + { /* 8 */ 0 , tab11_ } , + { /* 8 */ 0 , tab12_ } , + { /* 16 */ 0 , tab13_ } , + { /* 0 */ 0 , tab0_ } , + { /* 16 */ 0 , tab15_ } , + + { /* 16 */ 1 , tab16_ } , + { /* 16 */ 2 , tab16_ } , + { /* 16 */ 3 , tab16_ } , + { /* 16 */ 4 , tab16_ } , + { /* 16 */ 6 , tab16_ } , + { /* 16 */ 8 , tab16_ } , + { /* 16 */ 10, tab16_ } , + { /* 16 */ 13, tab16_ } , + { /* 16 */ 4 , tab24_ } , + { /* 16 */ 5 , tab24_ } , + { /* 16 */ 6 , tab24_ } , + { /* 16 */ 7 , tab24_ } , + { /* 16 */ 8 , tab24_ } , + { /* 16 */ 9 , tab24_ } , + { /* 16 */ 11, tab24_ } , + { /* 16 */ 13, tab24_ } +}; + +static const struct newhuff htc[] = +{ + { /* 1 , 1 , */ 0 , tab_c0 } , + { /* 1 , 1 , */ 0 , tab_c1 } +}; + +#endif diff --git a/deps/mpg123/src/libmpg123/ntom.c b/deps/mpg123/src/libmpg123/ntom.c index a30b6c0..196a569 100644 --- a/deps/mpg123/src/libmpg123/ntom.c +++ b/deps/mpg123/src/libmpg123/ntom.c @@ -51,11 +51,11 @@ unsigned long ntom_val(mpg123_handle *fr, off_t frame) ntm = NTOM_MUL>>1; /* for frame 0 */ for(f=0; f 0 */ { - ntm += spf(fr)*fr->ntom_step; + ntm += fr->spf*fr->ntom_step; ntm -= (ntm/NTOM_MUL)*NTOM_MUL; } #else /* Just make one computation with overall sample offset. */ - ntm = (NTOM_MUL>>1) + spf(fr)*frame*fr->ntom_step; + ntm = (NTOM_MUL>>1) + fr->spf*frame*fr->ntom_step; ntm -= (ntm/NTOM_MUL)*NTOM_MUL; #endif return (unsigned long) ntm; @@ -74,7 +74,7 @@ off_t ntom_frame_outsamples(mpg123_handle *fr) { /* The do this before decoding the separate channels, so there is only one common ntom value. */ int ntm = fr->ntom_val[0]; - ntm += spf(fr)*fr->ntom_step; + ntm += fr->spf*fr->ntom_step; return ntm/NTOM_MUL; } @@ -90,12 +90,12 @@ off_t ntom_frmouts(mpg123_handle *fr, off_t frame) if(frame <= 0) return 0; for(f=0; fntom_step; + ntm += fr->spf*fr->ntom_step; soff += ntm/NTOM_MUL; ntm -= (ntm/NTOM_MUL)*NTOM_MUL; } #else - soff = (ntm + frame*(off_t)spf(fr)*(off_t)fr->ntom_step)/(off_t)NTOM_MUL; + soff = (ntm + frame*(off_t)fr->spf*(off_t)fr->ntom_step)/(off_t)NTOM_MUL; #endif return soff; } @@ -107,7 +107,7 @@ off_t ntom_ins2outs(mpg123_handle *fr, off_t ins) off_t ntm = ntom_val(fr,0); #ifdef SAFE_NTOM { - off_t block = spf(fr); + off_t block = fr->spf; if(ins <= 0) return 0; do { @@ -135,7 +135,7 @@ off_t ntom_frameoff(mpg123_handle *fr, off_t soff) if(soff <= 0) return 0; for(ioff=0; 1; ++ioff) { - ntm += spf(fr)*fr->ntom_step; + ntm += fr->spf*fr->ntom_step; if(ntm/NTOM_MUL > soff) break; soff -= ntm/NTOM_MUL; ntm -= (ntm/NTOM_MUL)*NTOM_MUL; @@ -143,6 +143,6 @@ off_t ntom_frameoff(mpg123_handle *fr, off_t soff) return ioff; #else ioff = (soff*(off_t)NTOM_MUL-ntm)/(off_t)fr->ntom_step; - return ioff/(off_t)spf(fr); + return ioff/(off_t)fr->spf; #endif } diff --git a/deps/mpg123/src/libmpg123/optimize.c b/deps/mpg123/src/libmpg123/optimize.c index e3c651f..e5cce21 100644 --- a/deps/mpg123/src/libmpg123/optimize.c +++ b/deps/mpg123/src/libmpg123/optimize.c @@ -8,48 +8,11 @@ Currently, this file contains the struct and function to choose an optimization variant and works only when OPT_MULTI is in effect. */ +#define I_AM_OPTIMIZE #include "mpg123lib_intern.h" /* includes optimize.h */ #include "debug.h" -/* Must match the enum dectype! */ - -/* - It SUCKS having to define these names that way, but compile-time intialization of string arrays is a bitch. - GCC doesn't see constant stuff when it's wiggling in front of it! - Anyhow: Have a script for that: -names="generic generic_dither i386 i486 i586 i586_dither MMX 3DNow 3DNowExt AltiVec SSE x86-64" -for i in $names; do echo "##define dn_${i/-/_} \"$i\""; done -echo -n "static const char* decname[] = -{ - \"auto\" - " -for i in $names; do echo -n ", dn_${i/-/_}"; done -echo " - , \"nodec\" -};" -*/ -#define dn_generic "generic" -#define dn_generic_dither "generic_dither" -#define dn_i386 "i386" -#define dn_i486 "i486" -#define dn_i586 "i586" -#define dn_i586_dither "i586_dither" -#define dn_MMX "MMX" -#define dn_3DNow "3DNow" -#define dn_3DNowExt "3DNowExt" -#define dn_AltiVec "AltiVec" -#define dn_SSE "SSE" -#define dn_x86_64 "x86-64" -#define dn_ARM "ARM" -#define dn_NEON "NEON" -static const char* decname[] = -{ - "auto" - , dn_generic, dn_generic_dither, dn_i386, dn_i486, dn_i586, dn_i586_dither, dn_MMX, dn_3DNow, dn_3DNowExt, dn_AltiVec, dn_SSE, dn_x86_64, dn_ARM, dn_NEON - , "nodec" -}; - -#if (defined OPT_X86) && (defined OPT_MULTI) +#if ((defined OPT_X86) || (defined OPT_X86_64) || (defined OPT_NEON) || (defined OPT_NEON64)) && (defined OPT_MULTI) #include "getcpuflags.h" static struct cpuflags cpu_flags; #else @@ -64,6 +27,8 @@ static struct cpuflags cpu_flags; #define cpu_sse(s) 1 #define cpu_sse2(s) 1 #define cpu_sse3(s) 1 +#define cpu_avx(s) 1 +#define cpu_neon(s) 1 #endif /* Ugly macros to build conditional synth function array values. */ @@ -74,6 +39,8 @@ static struct cpuflags cpu_flags; #define IF8(synth) #endif +#ifndef NO_SYNTH32 + #ifndef NO_REAL #define IFREAL(synth) synth, #else @@ -86,6 +53,13 @@ static struct cpuflags cpu_flags; #define IF32(synth) #endif +#else + +#define IFREAL(synth) +#define IF32(synth) + +#endif + #ifndef NO_16BIT # define OUT_SYNTHS(synth_16, synth_8, synth_real, synth_32) { synth_16, IF8(synth_8) IFREAL(synth_real) IF32(synth_32) } #else @@ -166,10 +140,20 @@ enum optdec defdec(void){ return defopt; } enum optcla decclass(const enum optdec type) { - return (type == mmx || type == sse || type == dreidnowext || type == x86_64 || type == neon) ? mmxsse : normal; + return + ( + type == mmx + || type == sse + || type == sse_vintage + || type == dreidnowext + || type == dreidnowext_vintage + || type == x86_64 + || type == neon + || type == neon64 + || type == avx + ) ? mmxsse : normal; } - static int find_synth(func_synth synth, const func_synth synths[r_limit][f_limit]) { enum synth_resample ri; @@ -182,6 +166,25 @@ static int find_synth(func_synth synth, const func_synth synths[r_limit][f_limi return FALSE; } + +#if defined(OPT_SSE) || defined(OPT_SSE_VINTAGE) +/* After knowing that it is either vintage or current SSE, + this separates the two. In case of non-OPT_MULTI, only one + of OPT_SSE and OPT_SSE_VINTAGE is active. */ +static enum optdec sse_or_vintage(mpg123_handle *fr) +{ + enum optdec type; + type = sse_vintage; +# ifdef OPT_SSE +# ifdef OPT_MULTI + if(fr->cpu_opts.the_dct36 == dct36_sse) +# endif + type = sse; +# endif + return type; +} +#endif + /* Determine what kind of decoder is actually active This depends on runtime choices which may cause fallback to i386 or generic code. */ static int find_dectype(mpg123_handle *fr) @@ -199,14 +202,35 @@ static int find_dectype(mpg123_handle *fr) if(FALSE) ; /* Just to initialize the else if ladder. */ #ifndef NO_16BIT -#ifdef OPT_3DNOWEXT - else if(basic_synth == synth_1to1_3dnowext) type = dreidnowext; +#if defined(OPT_3DNOWEXT) || defined(OPT_3DNOWEXT_VINTAGE) + else if(basic_synth == synth_1to1_3dnowext) + { + type = dreidnowext; +# ifdef OPT_3DNOWEXT_VINTAGE +# ifdef OPT_MULTI + if(fr->cpu_opts.the_dct36 == dct36_3dnowext) +# endif + type = dreidnowext_vintage; +# endif + } #endif -#ifdef OPT_SSE - else if(basic_synth == synth_1to1_sse) type = sse; +#if defined(OPT_SSE) || defined(OPT_SSE_VINTAGE) + else if(basic_synth == synth_1to1_sse) + { + type = sse_or_vintage(fr); + } #endif -#ifdef OPT_3DNOW - else if(basic_synth == synth_1to1_3dnow) type = dreidnow; +#if defined(OPT_3DNOW) || defined(OPT_3DNOW_VINTAGE) + else if(basic_synth == synth_1to1_3dnow) + { + type = dreidnow; +# ifdef OPT_3DNOW_VINTAGE +# ifdef OPT_MULTI + if(fr->cpu_opts.the_dct36 == dct36_3dnow) +# endif + type = dreidnow_vintage; +# endif + } #endif #ifdef OPT_MMX else if(basic_synth == synth_1to1_mmx) type = mmx; @@ -223,12 +247,18 @@ static int find_dectype(mpg123_handle *fr) #ifdef OPT_X86_64 else if(basic_synth == synth_1to1_x86_64) type = x86_64; #endif +#ifdef OPT_AVX + else if(basic_synth == synth_1to1_avx) type = avx; +#endif #ifdef OPT_ARM else if(basic_synth == synth_1to1_arm) type = arm; #endif #ifdef OPT_NEON else if(basic_synth == synth_1to1_neon) type = neon; #endif +#ifdef OPT_NEON64 + else if(basic_synth == synth_1to1_neon64) type = neon64; +#endif #ifdef OPT_GENERIC_DITHER else if(basic_synth == synth_1to1_dither) type = generic_dither; #endif @@ -243,37 +273,59 @@ static int find_dectype(mpg123_handle *fr) #endif #endif /* 16bit */ +#ifndef NO_SYNTH32 + #ifndef NO_REAL -#ifdef OPT_SSE - else if(basic_synth == synth_1to1_real_sse) type = sse; +#if defined(OPT_SSE) || defined(OPT_SSE_VINTAGE) + else if(basic_synth == synth_1to1_real_sse) + { + type = sse_or_vintage(fr); + } #endif #ifdef OPT_X86_64 else if(basic_synth == synth_1to1_real_x86_64) type = x86_64; #endif +#ifdef OPT_AVX + else if(basic_synth == synth_1to1_real_avx) type = avx; +#endif #ifdef OPT_ALTIVEC else if(basic_synth == synth_1to1_real_altivec) type = altivec; #endif #ifdef OPT_NEON else if(basic_synth == synth_1to1_real_neon) type = neon; #endif +#ifdef OPT_NEON64 + else if(basic_synth == synth_1to1_real_neon64) type = neon64; +#endif #endif /* real */ #ifndef NO_32BIT -#ifdef OPT_SSE - else if(basic_synth == synth_1to1_s32_sse) type = sse; +#if defined(OPT_SSE) || defined(OPT_SSE_VINTAGE) + else if(basic_synth == synth_1to1_s32_sse) + { + type = sse_or_vintage(fr); + } #endif #ifdef OPT_X86_64 else if(basic_synth == synth_1to1_s32_x86_64) type = x86_64; #endif +#ifdef OPT_AVX + else if(basic_synth == synth_1to1_s32_avx) type = avx; +#endif #ifdef OPT_ALTIVEC else if(basic_synth == synth_1to1_s32_altivec) type = altivec; #endif #ifdef OPT_NEON else if(basic_synth == synth_1to1_s32_neon) type = neon; #endif +#ifdef OPT_NEON64 + else if(basic_synth == synth_1to1_s32_neon64) type = neon64; +#endif #endif /* 32bit */ +#endif /* any 32 bit synth */ + #ifdef OPT_X86 else if(find_synth(basic_synth, plain_i386)) type = idrei; @@ -316,20 +368,20 @@ int set_synth_functions(mpg123_handle *fr) /* Select the basic output format, different from 16bit: 8bit, real. */ if(FALSE){} #ifndef NO_16BIT - else if(fr->af.encoding & MPG123_ENC_16) + else if(fr->af.dec_enc & MPG123_ENC_16) basic_format = f_16; #endif #ifndef NO_8BIT - else if(fr->af.encoding & MPG123_ENC_8) + else if(fr->af.dec_enc & MPG123_ENC_8) basic_format = f_8; #endif #ifndef NO_REAL - else if(fr->af.encoding & MPG123_ENC_FLOAT) + else if(fr->af.dec_enc & MPG123_ENC_FLOAT) basic_format = f_real; #endif #ifndef NO_32BIT /* 24 bit integer means decoding to 32 bit first. */ - else if(fr->af.encoding & MPG123_ENC_32 || fr->af.encoding & MPG123_ENC_24) + else if(fr->af.dec_enc & MPG123_ENC_32 || fr->af.dec_enc & MPG123_ENC_24) basic_format = f_32; #endif @@ -407,8 +459,11 @@ int set_synth_functions(mpg123_handle *fr) # endif # ifdef ACCURATE_ROUNDING && fr->cpu_opts.type != sse + && fr->cpu_opts.type != sse_vintage && fr->cpu_opts.type != x86_64 && fr->cpu_opts.type != neon + && fr->cpu_opts.type != neon64 + && fr->cpu_opts.type != avx # endif ) { @@ -464,28 +519,31 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) #endif fr->cpu_opts.type = nodec; - /* covers any i386+ cpu; they actually differ only in the synth_1to1 function, mostly... */ -#ifdef OPT_X86 - #ifdef OPT_MULTI #ifndef NO_LAYER3 -#if (defined OPT_3DNOW || defined OPT_3DNOWEXT) +#if (defined OPT_3DNOW_VINTAGE || defined OPT_3DNOWEXT_VINTAGE || defined OPT_SSE || defined OPT_X86_64 || defined OPT_AVX || defined OPT_NEON || defined OPT_NEON64) fr->cpu_opts.the_dct36 = dct36; #endif #endif #endif - + /* covers any i386+ cpu; they actually differ only in the synth_1to1 function, mostly... */ +#ifdef OPT_X86 if(cpu_i586(cpu_flags)) { # ifdef OPT_MULTI debug2("standard flags: 0x%08x\textended flags: 0x%08x", cpu_flags.std, cpu_flags.ext); # endif - #ifdef OPT_SSE +# ifdef OPT_SSE if( !done && (auto_choose || want_dec == sse) && cpu_sse(cpu_flags) && cpu_mmx(cpu_flags) ) { - chosen = "SSE"; + chosen = dn_sse; fr->cpu_opts.type = sse; +#ifdef OPT_MULTI +# ifndef NO_LAYER3 + /* if(cpu_fast_sse(cpu_flags)) */ fr->cpu_opts.the_dct36 = dct36_sse; +# endif +#endif # ifndef NO_16BIT fr->synths.plain[r_1to1][f_16] = synth_1to1_sse; # ifdef ACCURATE_ROUNDING @@ -502,19 +560,55 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) # endif done = 1; } - #endif +# endif +# ifdef OPT_SSE_VINTAGE + if( !done && (auto_choose || want_dec == sse_vintage) + && cpu_sse(cpu_flags) && cpu_mmx(cpu_flags) ) + { + chosen = dn_sse_vintage; + fr->cpu_opts.type = sse_vintage; +# ifndef NO_16BIT + fr->synths.plain[r_1to1][f_16] = synth_1to1_sse; +# ifdef ACCURATE_ROUNDING + fr->synths.stereo[r_1to1][f_16] = synth_1to1_stereo_sse; +# endif +# endif +# ifndef NO_REAL + fr->synths.plain[r_1to1][f_real] = synth_1to1_real_sse; + fr->synths.stereo[r_1to1][f_real] = synth_1to1_real_stereo_sse; +# endif +# ifndef NO_32BIT + fr->synths.plain[r_1to1][f_32] = synth_1to1_s32_sse; + fr->synths.stereo[r_1to1][f_32] = synth_1to1_s32_stereo_sse; +# endif + done = 1; + } +# endif # ifdef OPT_3DNOWEXT - if( !done && (auto_choose || want_dec == dreidnowext ) + if( !done && (auto_choose || want_dec == dreidnowext) && cpu_3dnow(cpu_flags) && cpu_3dnowext(cpu_flags) && cpu_mmx(cpu_flags) ) { - chosen = "3DNowExt"; + chosen = dn_dreidnowext; fr->cpu_opts.type = dreidnowext; +# ifndef NO_16BIT + fr->synths.plain[r_1to1][f_16] = synth_1to1_3dnowext; +# endif + done = 1; + } +# endif +# ifdef OPT_3DNOWEXT_VINTAGE + if( !done && (auto_choose || want_dec == dreidnowext_vintage) + && cpu_3dnow(cpu_flags) + && cpu_3dnowext(cpu_flags) + && cpu_mmx(cpu_flags) ) + { + chosen = dn_dreidnowext_vintage; + fr->cpu_opts.type = dreidnowext_vintage; #ifdef OPT_MULTI # ifndef NO_LAYER3 -/* The DCT36 is _bad_, at least compared to gcc 4.4-built C code. */ -/* fr->cpu_opts.the_dct36 = dct36_3dnowext; */ + fr->cpu_opts.the_dct36 = dct36_3dnowext; # endif #endif # ifndef NO_16BIT @@ -522,17 +616,28 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) # endif done = 1; } - #endif - #ifdef OPT_3DNOW +# endif +# ifdef OPT_3DNOW if( !done && (auto_choose || want_dec == dreidnow) && cpu_3dnow(cpu_flags) && cpu_mmx(cpu_flags) ) { - chosen = "3DNow"; + chosen = dn_dreidnow; fr->cpu_opts.type = dreidnow; +# ifndef NO_16BIT + fr->synths.plain[r_1to1][f_16] = synth_1to1_3dnow; +# endif + done = 1; + } +# endif +# ifdef OPT_3DNOW_VINTAGE + if( !done && (auto_choose || want_dec == dreidnow_vintage) + && cpu_3dnow(cpu_flags) && cpu_mmx(cpu_flags) ) + { + chosen = dn_dreidnow_vintage; + fr->cpu_opts.type = dreidnow_vintage; #ifdef OPT_MULTI # ifndef NO_LAYER3 -/* The DCT36 is _bad_, at least compared to gcc 4.4-built C code. */ -/* fr->cpu_opts.the_dct36 = dct36_3dnow; */ + fr->cpu_opts.the_dct36 = dct36_3dnow; # endif #endif # ifndef NO_16BIT @@ -540,12 +645,12 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) # endif done = 1; } - #endif +# endif #ifdef OPT_MMX if( !done && (auto_choose || want_dec == mmx) && cpu_mmx(cpu_flags) ) { - chosen = "MMX"; + chosen = dn_mmx; fr->cpu_opts.type = mmx; # ifndef NO_16BIT fr->synths.plain[r_1to1][f_16] = synth_1to1_mmx; @@ -586,7 +691,7 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) But still... here it is... maybe for real use in future. */ if(!done && (auto_choose || want_dec == ivier)) { - chosen = "i486"; + chosen = dn_ivier; fr->cpu_opts.type = ivier; done = 1; } @@ -594,7 +699,7 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) #ifdef OPT_I386 if(!done && (auto_choose || want_dec == idrei)) { - chosen = "i386"; + chosen = dn_idrei; fr->cpu_opts.type = idrei; done = 1; } @@ -629,11 +734,42 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) #endif /* OPT_X86 */ +#ifdef OPT_AVX + if(!done && (auto_choose || want_dec == avx) && cpu_avx(cpu_flags)) + { + chosen = "x86-64 (AVX)"; + fr->cpu_opts.type = avx; +#ifdef OPT_MULTI +# ifndef NO_LAYER3 + fr->cpu_opts.the_dct36 = dct36_avx; +# endif +#endif +# ifndef NO_16BIT + fr->synths.plain[r_1to1][f_16] = synth_1to1_avx; + fr->synths.stereo[r_1to1][f_16] = synth_1to1_stereo_avx; +# endif +# ifndef NO_REAL + fr->synths.plain[r_1to1][f_real] = synth_1to1_real_avx; + fr->synths.stereo[r_1to1][f_real] = synth_1to1_fltst_avx; +# endif +# ifndef NO_32BIT + fr->synths.plain[r_1to1][f_32] = synth_1to1_s32_avx; + fr->synths.stereo[r_1to1][f_32] = synth_1to1_s32_stereo_avx; +# endif + done = 1; + } +#endif + #ifdef OPT_X86_64 if(!done && (auto_choose || want_dec == x86_64)) { chosen = "x86-64 (SSE)"; fr->cpu_opts.type = x86_64; +#ifdef OPT_MULTI +# ifndef NO_LAYER3 + fr->cpu_opts.the_dct36 = dct36_x86_64; +# endif +#endif # ifndef NO_16BIT fr->synths.plain[r_1to1][f_16] = synth_1to1_x86_64; fr->synths.stereo[r_1to1][f_16] = synth_1to1_stereo_x86_64; @@ -650,27 +786,10 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) } #endif -#ifdef OPT_GENERIC_DITHER - if(!done && (auto_choose || want_dec == generic_dither)) - { - chosen = "dithered generic"; - fr->cpu_opts.type = generic_dither; - dithered = TRUE; -# ifndef NO_16BIT - fr->synths.plain[r_1to1][f_16] = synth_1to1_dither; -# ifndef NO_DOWNSAMPLE - fr->synths.plain[r_2to1][f_16] = synth_2to1_dither; - fr->synths.plain[r_4to1][f_16] = synth_4to1_dither; -# endif -# endif - done = 1; - } -#endif - # ifdef OPT_ALTIVEC if(!done && (auto_choose || want_dec == altivec)) { - chosen = "AltiVec"; + chosen = dn_altivec; fr->cpu_opts.type = altivec; # ifndef NO_16BIT fr->synths.plain[r_1to1][f_16] = synth_1to1_altivec; @@ -678,7 +797,7 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) # endif # ifndef NO_REAL fr->synths.plain[r_1to1][f_real] = synth_1to1_real_altivec; - fr->synths.stereo[r_1to1][f_real] = synth_1to1_real_stereo_altivec; + fr->synths.stereo[r_1to1][f_real] = synth_1to1_fltst_altivec; # endif # ifndef NO_32BIT fr->synths.plain[r_1to1][f_32] = synth_1to1_s32_altivec; @@ -689,10 +808,15 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) # endif # ifdef OPT_NEON - if(!done && (auto_choose || want_dec == neon)) + if(!done && (auto_choose || want_dec == neon) && cpu_neon(cpu_flags)) { - chosen = "NEON"; + chosen = dn_neon; fr->cpu_opts.type = neon; +#ifdef OPT_MULTI +# ifndef NO_LAYER3 + fr->cpu_opts.the_dct36 = dct36_neon; +# endif +#endif # ifndef NO_16BIT fr->synths.plain[r_1to1][f_16] = synth_1to1_neon; fr->synths.stereo[r_1to1][f_16] = synth_1to1_stereo_neon; @@ -712,7 +836,7 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) # ifdef OPT_ARM if(!done && (auto_choose || want_dec == arm)) { - chosen = "ARM"; + chosen = dn_arm; fr->cpu_opts.type = arm; # ifndef NO_16BIT fr->synths.plain[r_1to1][f_16] = synth_1to1_arm; @@ -721,15 +845,58 @@ int frame_cpu_opt(mpg123_handle *fr, const char* cpu) } # endif +# ifdef OPT_NEON64 + if(!done && (auto_choose || want_dec == neon64) && cpu_neon(cpu_flags)) + { + chosen = dn_neon64; + fr->cpu_opts.type = neon64; +#ifdef OPT_MULTI +# ifndef NO_LAYER3 + fr->cpu_opts.the_dct36 = dct36_neon64; +# endif +#endif +# ifndef NO_16BIT + fr->synths.plain[r_1to1][f_16] = synth_1to1_neon64; + fr->synths.stereo[r_1to1][f_16] = synth_1to1_stereo_neon64; +# endif +# ifndef NO_REAL + fr->synths.plain[r_1to1][f_real] = synth_1to1_real_neon64; + fr->synths.stereo[r_1to1][f_real] = synth_1to1_fltst_neon64; +# endif +# ifndef NO_32BIT + fr->synths.plain[r_1to1][f_32] = synth_1to1_s32_neon64; + fr->synths.stereo[r_1to1][f_32] = synth_1to1_s32st_neon64; +# endif + done = 1; + } +# endif + # ifdef OPT_GENERIC if(!done && (auto_choose || want_dec == generic)) { - chosen = "generic"; + chosen = dn_generic; fr->cpu_opts.type = generic; done = 1; } # endif +#ifdef OPT_GENERIC_DITHER + if(!done && (auto_choose || want_dec == generic_dither)) + { + chosen = "dithered generic"; + fr->cpu_opts.type = generic_dither; + dithered = TRUE; +# ifndef NO_16BIT + fr->synths.plain[r_1to1][f_16] = synth_1to1_dither; +# ifndef NO_DOWNSAMPLE + fr->synths.plain[r_2to1][f_16] = synth_2to1_dither; + fr->synths.plain[r_4to1][f_16] = synth_4to1_dither; +# endif +# endif + done = 1; + } +#endif + fr->cpu_opts.class = decclass(fr->cpu_opts.type); # ifndef NO_8BIT @@ -791,12 +958,21 @@ static const char *mpg123_supported_decoder_list[] = #ifdef OPT_SSE NULL, #endif + #ifdef OPT_SSE_VINTAGE + NULL, + #endif #ifdef OPT_3DNOWEXT NULL, #endif + #ifdef OPT_3DNOWEXT_VINTAGE + NULL, + #endif #ifdef OPT_3DNOW NULL, #endif + #ifdef OPT_3DNOW_VINTAGE + NULL, + #endif #ifdef OPT_MMX NULL, #endif @@ -815,6 +991,9 @@ static const char *mpg123_supported_decoder_list[] = #ifdef OPT_ALTIVEC NULL, #endif + #ifdef OPT_AVX + NULL, + #endif #ifdef OPT_X86_64 NULL, #endif @@ -824,6 +1003,9 @@ static const char *mpg123_supported_decoder_list[] = #ifdef OPT_NEON NULL, #endif + #ifdef OPT_NEON64 + NULL, + #endif #ifdef OPT_GENERIC_FLOAT NULL, #endif @@ -840,40 +1022,55 @@ static const char *mpg123_supported_decoder_list[] = static const char *mpg123_decoder_list[] = { #ifdef OPT_SSE - dn_SSE, + dn_sse, + #endif + #ifdef OPT_SSE_VINTAGE + dn_sse_vintage, #endif #ifdef OPT_3DNOWEXT - dn_3DNowExt, + dn_dreidnowext, + #endif + #ifdef OPT_3DNOWEXT_VINTAGE + dn_dreidnowext_vintage, #endif #ifdef OPT_3DNOW - dn_3DNow, + dn_dreidnow, + #endif + #ifdef OPT_3DNOW_VINTAGE + dn_dreidnow_vintage, #endif #ifdef OPT_MMX - dn_MMX, + dn_mmx, #endif #ifdef OPT_I586 - dn_i586, + dn_ifuenf, #endif #ifdef OPT_I586_DITHER - dn_i586_dither, + dn_ifuenf_dither, #endif #ifdef OPT_I486 - dn_i486, + dn_ivier, #endif #ifdef OPT_I386 - dn_i386, + dn_idrei, #endif #ifdef OPT_ALTIVEC - dn_AltiVec, + dn_altivec, + #endif + #ifdef OPT_AVX + dn_avx, #endif #ifdef OPT_X86_64 dn_x86_64, #endif #ifdef OPT_ARM - dn_ARM, + dn_arm, #endif #ifdef OPT_NEON - dn_NEON, + dn_neon, + #endif + #ifdef OPT_NEON64 + dn_neon64, #endif #ifdef OPT_GENERIC dn_generic, @@ -891,57 +1088,74 @@ void check_decoders(void ) return; #else const char **d = mpg123_supported_decoder_list; -#ifdef OPT_X86 +#if (defined OPT_X86) || (defined OPT_X86_64) || (defined OPT_NEON) || (defined OPT_NEON64) getcpuflags(&cpu_flags); +#endif +#ifdef OPT_X86 if(cpu_i586(cpu_flags)) { /* not yet: if(cpu_sse2(cpu_flags)) printf(" SSE2"); if(cpu_sse3(cpu_flags)) printf(" SSE3"); */ #ifdef OPT_SSE - if(cpu_sse(cpu_flags)) *(d++) = decname[sse]; + if(cpu_sse(cpu_flags)) *(d++) = dn_sse; +#endif +#ifdef OPT_SSE_VINTAGE + if(cpu_sse(cpu_flags)) *(d++) = dn_sse_vintage; #endif #ifdef OPT_3DNOWEXT - if(cpu_3dnowext(cpu_flags)) *(d++) = decname[dreidnowext]; + if(cpu_3dnowext(cpu_flags)) *(d++) = dn_dreidnowext; +#endif +#ifdef OPT_3DNOWEXT_VINTAGE + if(cpu_3dnowext(cpu_flags)) *(d++) = dn_dreidnowext_vintage; #endif #ifdef OPT_3DNOW - if(cpu_3dnow(cpu_flags)) *(d++) = decname[dreidnow]; + if(cpu_3dnow(cpu_flags)) *(d++) = dn_dreidnow; +#endif +#ifdef OPT_3DNOW_VINTAGE + if(cpu_3dnow(cpu_flags)) *(d++) = dn_dreidnow_vintage; #endif #ifdef OPT_MMX - if(cpu_mmx(cpu_flags)) *(d++) = decname[mmx]; + if(cpu_mmx(cpu_flags)) *(d++) = dn_mmx; #endif #ifdef OPT_I586 - *(d++) = decname[ifuenf]; + *(d++) = dn_ifuenf; #endif #ifdef OPT_I586_DITHER - *(d++) = decname[ifuenf_dither]; + *(d++) = dn_ifuenf_dither; #endif } #endif /* just assume that the i486 built is run on a i486 cpu... */ #ifdef OPT_I486 - *(d++) = decname[ivier]; + *(d++) = dn_ivier; #endif #ifdef OPT_ALTIVEC - *(d++) = decname[altivec]; + *(d++) = dn_altivec; #endif /* every supported x86 can do i386, any cpu can do generic */ #ifdef OPT_I386 - *(d++) = decname[idrei]; + *(d++) = dn_idrei; +#endif +#ifdef OPT_AVX + if(cpu_avx(cpu_flags)) *(d++) = dn_avx; #endif #ifdef OPT_X86_64 - *(d++) = decname[x86_64]; + *(d++) = dn_x86_64; #endif #ifdef OPT_ARM - *(d++) = decname[arm]; + *(d++) = dn_arm; #endif #ifdef OPT_NEON - *(d++) = decname[neon]; + if(cpu_neon(cpu_flags)) *(d++) = dn_neon; +#endif +#ifdef OPT_NEON64 + if(cpu_neon(cpu_flags)) *(d++) = dn_neon64; #endif #ifdef OPT_GENERIC - *(d++) = decname[generic]; + *(d++) = dn_generic; #endif #ifdef OPT_GENERIC_DITHER - *(d++) = decname[generic_dither]; + *(d++) = dn_generic_dither; #endif #endif /* ndef OPT_MULTI */ } diff --git a/deps/mpg123/src/libmpg123/optimize.h b/deps/mpg123/src/libmpg123/optimize.h index 0d0affb..1cb88af 100644 --- a/deps/mpg123/src/libmpg123/optimize.h +++ b/deps/mpg123/src/libmpg123/optimize.h @@ -3,7 +3,7 @@ /* optimize: get a grip on the different optimizations - copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 2007-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Thomas Orgis, taking from mpg123.[hc] @@ -16,9 +16,14 @@ OPT_I586_DITHER (Intel Pentium with dithering/noise shaping for enhanced quality) OPT_MMX (Intel Pentium and compatibles with MMX, fast, but not the best accuracy) OPT_3DNOW (AMD 3DNow!, K6-2/3, Athlon, compatibles...) + OPT_3DNOW_VINTAGE OPT_3DNOWEXT (AMD 3DNow! extended, generally Athlon, compatibles...) + OPT_3DNOWEXT_VINTAGE + OPT_SSE + OPT_SSE_VINTAGE OPT_ALTIVEC (Motorola/IBM PPC with AltiVec under MacOSX) OPT_X86_64 (x86-64 / AMD64 / Intel 64) + OPT_AVX or you define OPT_MULTI and give a combination which makes sense (do not include i486, do not mix altivec and x86). @@ -33,13 +38,131 @@ /* Runtime optimization interface now here: */ +/* Nedit inline Perl script to generate decoder list and name mapping in one place + optimize.c defining I_AM_OPTIMIZE to get the names + +perl <<'EOT' +## order is important (autodec first, nodec last) +@names= +( + ['autodec', 'auto'] +,['generic', 'generic'] +,['generic_dither', 'generic_dither'] +,['idrei', 'i386'] +,['ivier', 'i486'] +,['ifuenf', 'i586'] +,['ifuenf_dither', 'i586_dither'] +,['mmx', 'MMX'] +,['dreidnow', '3DNow'] +,['dreidnowext', '3DNowExt'] +,['altivec', 'AltiVec'] +,['sse', 'SSE'] +,['x86_64', 'x86-64'] +,['arm','ARM'] +,['neon','NEON'] +,['avx','AVX'] +,['dreidnow_vintage', '3DNow_vintage'] +,['dreidnowext_vintage', '3DNowExt_vintage'] +,['sse_vintage', 'SSE_vintage'] +,['nodec', 'nodec'] +); + +print "enum optdec\n{\n"; +for my $n (@names) +{ + $name = $n->[0]; + $enum = $name eq 'autodec' ? $name = " $name=0" : ",$name"; + print "\t$enum\n" +} +print "};\n"; +print "##ifdef I_AM_OPTIMIZE\n"; +for my $n (@names) +{ + my $key = $n->[0]; + my $val = $n->[1]; + print "static const char dn_$key\[\] = \"$val\";\n"; +} +print "static const char* decname[] =\n{\n"; +for my $n (@names) +{ + my $key = $n->[0]; + print "\t".($key eq 'autodec' ? ' ' : ',')."dn_$key\n"; +} +print "};\n##endif" +EOT +*/ enum optdec -{ /* autodec needs to be =0 and the first, nodec needs to be the last -- for loops! */ - autodec=0, generic, generic_dither, idrei, - ivier, ifuenf, ifuenf_dither, mmx, - dreidnow, dreidnowext, altivec, sse, x86_64, arm, neon, - nodec +{ + autodec=0 + ,generic + ,generic_dither + ,idrei + ,ivier + ,ifuenf + ,ifuenf_dither + ,mmx + ,dreidnow + ,dreidnowext + ,altivec + ,sse + ,x86_64 + ,arm + ,neon + ,neon64 + ,avx + ,dreidnow_vintage + ,dreidnowext_vintage + ,sse_vintage + ,nodec +}; +#ifdef I_AM_OPTIMIZE +static const char dn_autodec[] = "auto"; +static const char dn_generic[] = "generic"; +static const char dn_generic_dither[] = "generic_dither"; +static const char dn_idrei[] = "i386"; +static const char dn_ivier[] = "i486"; +static const char dn_ifuenf[] = "i586"; +static const char dn_ifuenf_dither[] = "i586_dither"; +static const char dn_mmx[] = "MMX"; +static const char dn_dreidnow[] = "3DNow"; +static const char dn_dreidnowext[] = "3DNowExt"; +static const char dn_altivec[] = "AltiVec"; +static const char dn_sse[] = "SSE"; +static const char dn_x86_64[] = "x86-64"; +static const char dn_arm[] = "ARM"; +static const char dn_neon[] = "NEON"; +static const char dn_neon64[] = "NEON64"; +static const char dn_avx[] = "AVX"; +static const char dn_dreidnow_vintage[] = "3DNow_vintage"; +static const char dn_dreidnowext_vintage[] = "3DNowExt_vintage"; +static const char dn_sse_vintage[] = "SSE_vintage"; +static const char dn_nodec[] = "nodec"; +static const char* decname[] = +{ + dn_autodec + ,dn_generic + ,dn_generic_dither + ,dn_idrei + ,dn_ivier + ,dn_ifuenf + ,dn_ifuenf_dither + ,dn_mmx + ,dn_dreidnow + ,dn_dreidnowext + ,dn_altivec + ,dn_sse + ,dn_x86_64 + ,dn_arm + ,dn_neon + ,dn_neon64 + ,dn_avx + ,dn_dreidnow_vintage + ,dn_dreidnowext_vintage + ,dn_sse_vintage + ,dn_nodec }; +#endif + enum optcla { nocla=0, normal, mmxsse }; /* - Set up the table of synth functions for current decoder choice. */ @@ -68,7 +191,10 @@ enum optcla decclass(const enum optdec); #if (defined OPT_I486) || (defined OPT_I586) || (defined OPT_I586_DITHER) \ || (defined OPT_MMX) || (defined OPT_SSE) || (defined_OPT_ALTIVEC) \ || (defined OPT_3DNOW) || (defined OPT_3DNOWEXT) || (defined OPT_X86_64) \ - || (defined OPT_NEON) || (defined OPT_GENERIC_DITHER) + || (defined OPT_3DNOW_VINTAGE) || (defined OPT_3DNOWEXT_VINTAGE) \ + || (defined OPT_SSE_VINTAGE) \ + || (defined OPT_NEON) || (defined OPT_NEON64) || (defined OPT_AVX) \ + || (defined OPT_GENERIC_DITHER) #error "Bad decoder choice together with fixed point math!" #endif #endif @@ -139,6 +265,16 @@ enum optcla decclass(const enum optdec); #define OPT_X86 #ifndef OPT_MULTI # define defopt sse +# define opt_dct36(fr) dct36_sse +#endif +#endif + +#ifdef OPT_SSE_VINTAGE +#define OPT_MMXORSSE +#define OPT_MPLAYER +#define OPT_X86 +#ifndef OPT_MULTI +# define defopt sse #endif #endif @@ -148,6 +284,16 @@ enum optcla decclass(const enum optdec); #define OPT_X86 #ifndef OPT_MULTI # define defopt dreidnowext +#endif +#endif + +/* same as above but also using 3DNowExt dct36 */ +#ifdef OPT_3DNOWEXT_VINTAGE +#define OPT_MMXORSSE +#define OPT_MPLAYER +#define OPT_X86 +#ifndef OPT_MULTI +# define defopt dreidnowext_vintage # define opt_dct36(fr) dct36_3dnowext #endif #endif @@ -162,6 +308,14 @@ extern const int costab_mmxsse[]; #define OPT_X86 #ifndef OPT_MULTI # define defopt dreidnow +#endif +#endif + +/* same as above but also using 3DNow dct36 */ +#ifdef OPT_3DNOW_VINTAGE +#define OPT_X86 +#ifndef OPT_MULTI +# define defopt dreidnow_vintage # define opt_dct36(fr) dct36_3dnow #endif #endif @@ -176,6 +330,15 @@ extern const int costab_mmxsse[]; #define OPT_MMXORSSE #ifndef OPT_MULTI # define defopt x86_64 +# define opt_dct36(fr) dct36_x86_64 +#endif +#endif + +#ifdef OPT_AVX +#define OPT_MMXORSSE +#ifndef OPT_MULTI +# define defopt avx +# define opt_dct36(fr) dct36_avx #endif #endif @@ -189,6 +352,15 @@ extern const int costab_mmxsse[]; #define OPT_MMXORSSE #ifndef OPT_MULTI # define defopt neon +# define opt_dct36(fr) dct36_neon +#endif +#endif + +#ifdef OPT_NEON64 +#define OPT_MMXORSSE +#ifndef OPT_MULTI +# define defopt neon64 +# define opt_dct36(fr) dct36_neon64 #endif #endif @@ -205,7 +377,7 @@ void check_decoders(void); # define defopt nodec -# if (defined OPT_3DNOW || defined OPT_3DNOWEXT) +# if (defined OPT_3DNOW_VINTAGE || defined OPT_3DNOWEXT_VINTAGE || defined OPT_SSE || defined OPT_X86_64 || defined OPT_AVX || defined OPT_NEON || defined OPT_NEON64) # define opt_dct36(fr) ((fr)->cpu_opts.the_dct36) # endif diff --git a/deps/mpg123/src/libmpg123/parse.c b/deps/mpg123/src/libmpg123/parse.c index 97aa95e..e0059a7 100644 --- a/deps/mpg123/src/libmpg123/parse.c +++ b/deps/mpg123/src/libmpg123/parse.c @@ -1,7 +1,7 @@ /* parse: spawned from common; clustering around stream/frame parsing - copyright ?-2012 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright ?-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Michael Hipp & Thomas Orgis */ @@ -108,277 +108,320 @@ static int head_check(unsigned long head) } } +/* This is moderately sized buffers. Int offset is enough. */ +static unsigned long bit_read_long(unsigned char *buf, int *offset) +{ + unsigned long val = /* 32 bit value */ + (((unsigned long) buf[*offset]) << 24) + | (((unsigned long) buf[*offset+1]) << 16) + | (((unsigned long) buf[*offset+2]) << 8) + | ((unsigned long) buf[*offset+3]); + *offset += 4; + return val; +} + +static unsigned short bit_read_short(unsigned char *buf, int *offset) +{ + unsigned short val = /* 16 bit value */ + (((unsigned short) buf[*offset] ) << 8) + | ((unsigned short) buf[*offset+1]); + *offset += 2; + return val; +} + static int check_lame_tag(mpg123_handle *fr) { + int i; + unsigned long xing_flags; + unsigned long long_tmp; /* going to look for Xing or Info at some position after the header MPEG 1 MPEG 2/2.5 (LSF) Stereo, Joint Stereo, Dual Channel 32 17 Mono 17 9 + */ + int lame_offset = (fr->stereo == 2) + ? (fr->lsf ? 17 : 32) + : (fr->lsf ? 9 : 17); + + if(fr->p.flags & MPG123_IGNORE_INFOFRAME) goto check_lame_tag_no; - Also, how to avoid false positives? I guess I should interpret more of the header to rule that out(?). - I hope that ensuring all zeros until tag start is enough. + debug("do we have lame tag?"); + /* + Note: CRC or not, that does not matter here. + But, there is any combination of Xing flags in the wild. There are headers + without the search index table! I cannot assume a reasonable minimal size + for the actual data, have to check if each byte of information is present. + But: 4 B Info/Xing + 4 B flags is bare minimum. */ - int lame_offset = (fr->stereo == 2) ? (fr->lsf ? 17 : 32 ) : (fr->lsf ? 9 : 17); + if(fr->framesize < lame_offset+8) goto check_lame_tag_no; - if(fr->p.flags & MPG123_IGNORE_INFOFRAME) return 0; + /* only search for tag when all zero before it (apart from checksum) */ + for(i=2; i < lame_offset; ++i) if(fr->bsbuf[i] != 0) goto check_lame_tag_no; - /* Note: CRC or not, that does not matter here. */ - if(fr->framesize >= 120+lame_offset) /* traditional Xing header is 120 bytes */ + debug("possibly..."); + if + ( + (fr->bsbuf[lame_offset] == 'I') + && (fr->bsbuf[lame_offset+1] == 'n') + && (fr->bsbuf[lame_offset+2] == 'f') + && (fr->bsbuf[lame_offset+3] == 'o') + ) { - int i; - int lame_type = 0; - debug("do we have lame tag?"); - /* only search for tag when all zero before it (apart from checksum) */ - for(i=2; i < lame_offset; ++i) if(fr->bsbuf[i] != 0) break; - if(i == lame_offset) + /* We still have to see what there is */ + } + else if + ( + (fr->bsbuf[lame_offset] == 'X') + && (fr->bsbuf[lame_offset+1] == 'i') + && (fr->bsbuf[lame_offset+2] == 'n') + && (fr->bsbuf[lame_offset+3] == 'g') + ) + { + fr->vbr = MPG123_VBR; /* Xing header means always VBR */ + } + else goto check_lame_tag_no; + + /* we have one of these headers... */ + if(VERBOSE2) fprintf(stderr, "Note: Xing/Lame/Info header detected\n"); + lame_offset += 4; + xing_flags = bit_read_long(fr->bsbuf, &lame_offset); + debug1("Xing: flags 0x%08lx", xing_flags); + + /* From now on, I have to carefully check if the announced data is actually + there! I'm always returning 'yes', though. */ + #define check_bytes_left(n) if(fr->framesize < lame_offset+n) \ + goto check_lame_tag_yes + if(xing_flags & 1) /* total bitstream frames */ + { + check_bytes_left(4); long_tmp = bit_read_long(fr->bsbuf, &lame_offset); + if(fr->p.flags & MPG123_IGNORE_STREAMLENGTH) { - debug("possibly..."); - if - ( - (fr->bsbuf[lame_offset] == 'I') - && (fr->bsbuf[lame_offset+1] == 'n') - && (fr->bsbuf[lame_offset+2] == 'f') - && (fr->bsbuf[lame_offset+3] == 'o') - ) - { - lame_type = 1; /* We still have to see what there is */ - } - else if - ( - (fr->bsbuf[lame_offset] == 'X') - && (fr->bsbuf[lame_offset+1] == 'i') - && (fr->bsbuf[lame_offset+2] == 'n') - && (fr->bsbuf[lame_offset+3] == 'g') - ) - { - lame_type = 2; - fr->vbr = MPG123_VBR; /* Xing header means always VBR */ - } - if(lame_type) - { - unsigned long xing_flags; - - /* we have one of these headers... */ - if(VERBOSE2) fprintf(stderr, "Note: Xing/Lame/Info header detected\n"); - /* now interpret the Xing part, I have 120 bytes total for sure */ - /* there are 4 bytes for flags, but only the last byte contains known ones */ - lame_offset += 4; /* now first byte after Xing/Name */ - /* 4 bytes dword for flags */ - #define make_long(a, o) ((((unsigned long) a[o]) << 24) | (((unsigned long) a[o+1]) << 16) | (((unsigned long) a[o+2]) << 8) | ((unsigned long) a[o+3])) - /* 16 bit */ - #define make_short(a,o) ((((unsigned short) a[o]) << 8) | ((unsigned short) a[o+1])) - xing_flags = make_long(fr->bsbuf, lame_offset); - lame_offset += 4; - debug1("Xing: flags 0x%08lx", xing_flags); - if(xing_flags & 1) /* frames */ - { - if(fr->p.flags & MPG123_IGNORE_STREAMLENGTH) - { - if(VERBOSE3) - fprintf(stderr, "Note: Ignoring Xing frames because of MPG123_IGNORE_STREAMLENGTH\n"); - } - else - { - fr->track_frames = (off_t) make_long(fr->bsbuf, lame_offset); - if(fr->track_frames > TRACK_MAX_FRAMES) fr->track_frames = 0; /* endless stream? */ + if(VERBOSE3) fprintf(stderr + , "Note: Ignoring Xing frames because of MPG123_IGNORE_STREAMLENGTH\n"); + } + else + { + /* Check for endless stream, but: TRACK_MAX_FRAMES sensible at all? */ + fr->track_frames = long_tmp > TRACK_MAX_FRAMES ? 0 : (off_t) long_tmp; #ifdef GAPLESS - /* All or nothing: Only if encoder delay/padding is known we'll cut samples for gapless. */ - if(fr->p.flags & MPG123_GAPLESS) - frame_gapless_init(fr, fr->track_frames, 0, 0); + /* All or nothing: Only if encoder delay/padding is known, we'll cut + samples for gapless. */ + if(fr->p.flags & MPG123_GAPLESS) + frame_gapless_init(fr, fr->track_frames, 0, 0); #endif - if(VERBOSE3) fprintf(stderr, "Note: Xing: %lu frames\n", (long unsigned)fr->track_frames); - } - - lame_offset += 4; - } - if(xing_flags & 0x2) /* bytes */ - { - if(fr->p.flags & MPG123_IGNORE_STREAMLENGTH) - { - if(VERBOSE3) - fprintf(stderr, "Note: Ignoring Xing bytes because of MPG123_IGNORE_STREAMLENGTH\n"); - } - else - { - unsigned long xing_bytes = make_long(fr->bsbuf, lame_offset); /* We assume that this is the _total_ size of the file, including Xing frame ... and ID3 frames... - It's not that clearly documented... */ - if(fr->rdat.filelen < 1) - fr->rdat.filelen = (off_t) xing_bytes; /* One could start caring for overflow here. */ - else - { - if((off_t) xing_bytes != fr->rdat.filelen && NOQUIET) - { - double diff = 1.0/fr->rdat.filelen * (fr->rdat.filelen - (off_t)xing_bytes); - if(diff < 0.) diff = -diff; - - if(VERBOSE3) - fprintf(stderr, "Note: Xing stream size %lu differs by %f%% from determined/given file size!\n", xing_bytes, diff); - - if(diff > 1.) - fprintf(stderr, "Warning: Xing stream size off by more than 1%%, fuzzy seeking may be even more fuzzy than by design!\n"); - } - } - - if(VERBOSE3) - fprintf(stderr, "Note: Xing: %lu bytes\n", (long unsigned)xing_bytes); - } - - lame_offset += 4; - } - if(xing_flags & 0x4) /* TOC */ - { - frame_fill_toc(fr, fr->bsbuf+lame_offset); - lame_offset += 100; /* just skip */ - } - if(xing_flags & 0x8) /* VBR quality */ - { - if(VERBOSE3) - { - unsigned long xing_quality = make_long(fr->bsbuf, lame_offset); - fprintf(stderr, "Note: Xing: quality = %lu\n", (long unsigned)xing_quality); - } - lame_offset += 4; + if(VERBOSE3) fprintf(stderr, "Note: Xing: %lu frames\n", long_tmp); + } + } + if(xing_flags & 0x2) /* total bitstream bytes */ + { + check_bytes_left(4); long_tmp = bit_read_long(fr->bsbuf, &lame_offset); + if(fr->p.flags & MPG123_IGNORE_STREAMLENGTH) + { + if(VERBOSE3) fprintf(stderr + , "Note: Ignoring Xing bytes because of MPG123_IGNORE_STREAMLENGTH\n"); + } + else + { + /* The Xing bitstream length, at least as interpreted by the Lame + encoder, encompasses all data from the Xing header frame on, + ignoring leading ID3v2 data. Trailing tags (ID3v1) seem to be + included, though. */ + if(fr->rdat.filelen < 1) + fr->rdat.filelen = (off_t) long_tmp + fr->audio_start; /* Overflow? */ + else + { + if((off_t)long_tmp != fr->rdat.filelen - fr->audio_start && NOQUIET) + { /* 1/filelen instead of 1/(filelen-start), my decision */ + double diff = 100.0/fr->rdat.filelen + * ( fr->rdat.filelen - fr->audio_start + - (off_t)long_tmp ); + if(diff < 0.) diff = -diff; + + if(VERBOSE3) fprintf(stderr + , "Note: Xing stream size %lu differs by %f%% from determined/given file size!\n" + , long_tmp, diff); + + if(diff > 1. && NOQUIET) fprintf(stderr + , "Warning: Xing stream size off by more than 1%%, fuzzy seeking may be even more fuzzy than by design!\n"); } - /* I guess that either 0 or LAME extra data follows */ - if(fr->bsbuf[lame_offset] != 0) + } + + if(VERBOSE3) fprintf(stderr, "Note: Xing: %lu bytes\n", long_tmp); + } + } + if(xing_flags & 0x4) /* TOC */ + { + check_bytes_left(100); + frame_fill_toc(fr, fr->bsbuf+lame_offset); + lame_offset += 100; + } + if(xing_flags & 0x8) /* VBR quality */ + { + check_bytes_left(4); long_tmp = bit_read_long(fr->bsbuf, &lame_offset); + if(VERBOSE3) fprintf(stderr, "Note: Xing: quality = %lu\n", long_tmp); + } + /* + Either zeros/nothing, or: + 0-8: LAME3.90a + 9: revision/VBR method + 10: lowpass + 11-18: ReplayGain + 19: encoder flags + 20: ABR + 21-23: encoder delays + */ + check_bytes_left(24); /* I'm interested in 24 B of extra info. */ + if(fr->bsbuf[lame_offset] != 0) + { + unsigned char lame_vbr; + float replay_gain[2] = {0,0}; + float peak = 0; + float gain_offset = 0; /* going to be +6 for old lame that used 83dB */ + char nb[10]; + off_t pad_in; + off_t pad_out; + memcpy(nb, fr->bsbuf+lame_offset, 9); + nb[9] = 0; + if(VERBOSE3) fprintf(stderr, "Note: Info: Encoder: %s\n", nb); + if(!strncmp("LAME", nb, 4)) + { + /* Lame versions before 3.95.1 used 83 dB reference level, later + versions 89 dB. We stick with 89 dB as being "normal", adding + 6 dB. */ + unsigned int major, minor; + char rest[6]; + rest[0] = 0; + if(sscanf(nb+4, "%u.%u%s", &major, &minor, rest) >= 2) + { + debug3("LAME: %u/%u/%s", major, minor, rest); + /* We cannot detect LAME 3.95 reliably (same version string as + 3.95.1), so this is a blind spot. Everything < 3.95 is safe, + though. */ + if(major < 3 || (major == 3 && minor < 95)) { - unsigned char lame_vbr; - float replay_gain[2] = {0,0}; - float peak = 0; - float gain_offset = 0; /* going to be +6 for old lame that used 83dB */ - char nb[10]; - memcpy(nb, fr->bsbuf+lame_offset, 9); - nb[9] = 0; - if(VERBOSE3) fprintf(stderr, "Note: Info: Encoder: %s\n", nb); - if(!strncmp("LAME", nb, 4)) - { - /* Lame versions before 3.95.1 used 83 dB reference level, later versions 89 dB. - We stick with 89 dB as being "normal", adding 6 dB. */ - unsigned int major, minor; - char rest[6]; - rest[0] = 0; - if(sscanf(nb+4, "%u.%u%s", &major, &minor, rest) >= 2) - { - debug3("LAME: %u/%u/%s", major, minor, rest); - /* We cannot detect LAME 3.95 reliably (same version string as 3.95.1), so this is a blind spot. - Everything < 3.95 is safe, though. */ - if(major < 3 || (major == 3 && minor < 95)) /* || (major == 3 && minor == 95 && rest[0] == 0)) */ - { - gain_offset = 6; - if(VERBOSE3) fprintf(stderr, "Note: Info: Old LAME detected, using ReplayGain preamp of %f dB.\n", gain_offset); - } - } - else if(VERBOSE3) fprintf(stderr, "Note: Info: Cannot determine LAME version.\n"); - } - lame_offset += 9; - /* the 4 big bits are tag revision, the small bits vbr method */ - lame_vbr = fr->bsbuf[lame_offset] & 15; - if(VERBOSE3) - { - fprintf(stderr, "Note: Info: rev %u\n", fr->bsbuf[lame_offset] >> 4); - fprintf(stderr, "Note: Info: vbr mode %u\n", lame_vbr); - } - lame_offset += 1; - switch(lame_vbr) - { - /* from rev1 proposal... not sure if all good in practice */ - case 1: - case 8: fr->vbr = MPG123_CBR; break; - case 2: - case 9: fr->vbr = MPG123_ABR; break; - default: fr->vbr = MPG123_VBR; /* 00==unknown is taken as VBR */ - } - /* skipping: lowpass filter value */ - lame_offset += 1; - /* replaygain */ - /* 32bit float: peak amplitude -- why did I parse it as int before??*/ - /* Ah, yes, lame seems to store it as int since some day in 2003; I've only seen zeros anyway until now, bah! */ - if - ( - (fr->bsbuf[lame_offset] != 0) - || (fr->bsbuf[lame_offset+1] != 0) - || (fr->bsbuf[lame_offset+2] != 0) - || (fr->bsbuf[lame_offset+3] != 0) - ) - { - debug("Wow! Is there _really_ a non-zero peak value? Now is it stored as float or int - how should I know?"); - /* byte*peak_bytes = (byte*) &peak; - ... endianess ... just copy bytes to avoid floating point operation on unaligned memory? - peak_bytes[0] = ... - peak = *(float*) (fr->bsbuf+lame_offset); */ - } - if(VERBOSE3) fprintf(stderr, "Note: Info: peak = %f (I won't use this)\n", peak); - peak = 0; /* until better times arrived */ - lame_offset += 4; - /* - ReplayGain values - lame only writes radio mode gain... - 16bit gain, 3 bits name, 3 bits originator, sign (1=-, 0=+), dB value*10 in 9 bits (fixed point) - ignore the setting if name or originator == 000! - radio 0 0 1 0 1 1 1 0 0 1 1 1 1 1 0 1 - audiophile 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 - */ - - for(i =0; i < 2; ++i) - { - unsigned char origin = (fr->bsbuf[lame_offset] >> 2) & 0x7; /* the 3 bits after that... */ - if(origin != 0) - { - unsigned char gt = fr->bsbuf[lame_offset] >> 5; /* only first 3 bits */ - if(gt == 1) gt = 0; /* radio */ - else if(gt == 2) gt = 1; /* audiophile */ - else continue; - /* get the 9 bits into a number, divide by 10, multiply sign... happy bit banging */ - replay_gain[gt] = (float) ((fr->bsbuf[lame_offset] & 0x2) ? -0.1 : 0.1) * (make_short(fr->bsbuf, lame_offset) & 0x1ff); - /* If this is an automatic value from LAME (or whatever), the automatic gain offset applies. - If a user or whoever set the value, do not touch it! 011 is automatic origin. */ - if(origin == 3) replay_gain[gt] += gain_offset; - } - lame_offset += 2; - } - if(VERBOSE3) - { - fprintf(stderr, "Note: Info: Radio Gain = %03.1fdB\n", replay_gain[0]); - fprintf(stderr, "Note: Info: Audiophile Gain = %03.1fdB\n", replay_gain[1]); - } - for(i=0; i < 2; ++i) - { - if(fr->rva.level[i] <= 0) - { - fr->rva.peak[i] = 0; /* at some time the parsed peak should be used */ - fr->rva.gain[i] = replay_gain[i]; - fr->rva.level[i] = 0; - } - } - lame_offset += 1; /* skipping encoding flags byte */ - if(fr->vbr == MPG123_ABR) - { - fr->abr_rate = fr->bsbuf[lame_offset]; - if(VERBOSE3) fprintf(stderr, "Note: Info: ABR rate = %u\n", fr->abr_rate); - } - lame_offset += 1; - /* encoder delay and padding, two 12 bit values... lame does write them from int ...*/ - if(VERBOSE3) - fprintf(stderr, "Note: Encoder delay = %i; padding = %i\n", - ((((int) fr->bsbuf[lame_offset]) << 4) | (((int) fr->bsbuf[lame_offset+1]) >> 4)), - (((((int) fr->bsbuf[lame_offset+1]) << 8) | (((int) fr->bsbuf[lame_offset+2]))) & 0xfff) ); - #ifdef GAPLESS - if(fr->p.flags & MPG123_GAPLESS) - { - off_t skipbegin = ((((int) fr->bsbuf[lame_offset]) << 4) | (((int) fr->bsbuf[lame_offset+1]) >> 4)); - off_t skipend = (((((int) fr->bsbuf[lame_offset+1]) << 8) | (((int) fr->bsbuf[lame_offset+2]))) & 0xfff); - frame_gapless_init(fr, fr->track_frames, skipbegin, skipend); - } - #endif + gain_offset = 6; + if(VERBOSE3) fprintf(stderr + , "Note: Info: Old LAME detected, using ReplayGain preamp of %f dB.\n" + , gain_offset); } - /* switch buffer back ... */ - fr->bsbuf = fr->bsspace[fr->bsnum]+512; - fr->bsnum = (fr->bsnum + 1) & 1; - return 1; /* got it! */ } + else if(VERBOSE3) fprintf(stderr + , "Note: Info: Cannot determine LAME version.\n"); + } + lame_offset += 9; /* 9 in */ + + /* The 4 big bits are tag revision, the small bits vbr method. */ + lame_vbr = fr->bsbuf[lame_offset] & 15; + lame_offset += 1; /* 10 in */ + if(VERBOSE3) + { + fprintf(stderr, "Note: Info: rev %u\n", fr->bsbuf[lame_offset] >> 4); + fprintf(stderr, "Note: Info: vbr mode %u\n", lame_vbr); + } + switch(lame_vbr) + { + /* from rev1 proposal... not sure if all good in practice */ + case 1: + case 8: fr->vbr = MPG123_CBR; break; + case 2: + case 9: fr->vbr = MPG123_ABR; break; + default: fr->vbr = MPG123_VBR; /* 00==unknown is taken as VBR */ + } + lame_offset += 1; /* 11 in, skipping lowpass filter value */ + + /* ReplayGain peak ampitude, 32 bit float -- why did I parse it as int + before?? Ah, yes, Lame seems to store it as int since some day in 2003; + I've only seen zeros anyway until now, bah! */ + if + ( + (fr->bsbuf[lame_offset] != 0) + || (fr->bsbuf[lame_offset+1] != 0) + || (fr->bsbuf[lame_offset+2] != 0) + || (fr->bsbuf[lame_offset+3] != 0) + ) + { + debug("Wow! Is there _really_ a non-zero peak value? Now is it stored as float or int - how should I know?"); + /* byte*peak_bytes = (byte*) &peak; + ... endianess ... just copy bytes to avoid floating point operation on unaligned memory? + peak_bytes[0] = ... + peak = *(float*) (fr->bsbuf+lame_offset); */ + } + if(VERBOSE3) fprintf(stderr + , "Note: Info: peak = %f (I won't use this)\n", peak); + peak = 0; /* until better times arrived */ + lame_offset += 4; /* 15 in */ + + /* ReplayGain values - lame only writes radio mode gain... + 16bit gain, 3 bits name, 3 bits originator, sign (1=-, 0=+), + dB value*10 in 9 bits (fixed point) ignore the setting if name or + originator == 000! + radio 0 0 1 0 1 1 1 0 0 1 1 1 1 1 0 1 + audiophile 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 */ + for(i =0; i < 2; ++i) + { + unsigned char gt = fr->bsbuf[lame_offset] >> 5; + unsigned char origin = (fr->bsbuf[lame_offset] >> 2) & 0x7; + float factor = (fr->bsbuf[lame_offset] & 0x2) ? -0.1f : 0.1f; + unsigned short gain = bit_read_short(fr->bsbuf, &lame_offset) & 0x1ff; /* 19 in (2 cycles) */ + if(origin == 0 || gt < 1 || gt > 2) continue; + + --gt; + replay_gain[gt] = factor * (float) gain; + /* Apply gain offset for automatic origin. */ + if(origin == 3) replay_gain[gt] += gain_offset; + } + if(VERBOSE3) + { + fprintf(stderr, "Note: Info: Radio Gain = %03.1fdB\n" + , replay_gain[0]); + fprintf(stderr, "Note: Info: Audiophile Gain = %03.1fdB\n" + , replay_gain[1]); + } + for(i=0; i < 2; ++i) + { + if(fr->rva.level[i] <= 0) + { + fr->rva.peak[i] = 0; /* TODO: use parsed peak? */ + fr->rva.gain[i] = replay_gain[i]; + fr->rva.level[i] = 0; + } + } + + lame_offset += 1; /* 20 in, skipping encoding flags byte */ + + /* ABR rate */ + if(fr->vbr == MPG123_ABR) + { + fr->abr_rate = fr->bsbuf[lame_offset]; + if(VERBOSE3) fprintf(stderr, "Note: Info: ABR rate = %u\n" + , fr->abr_rate); } + lame_offset += 1; /* 21 in */ + + /* Encoder delay and padding, two 12 bit values + ... lame does write them from int. */ + pad_in = ( (((int) fr->bsbuf[lame_offset]) << 4) + | (((int) fr->bsbuf[lame_offset+1]) >> 4) ); + pad_out = ( (((int) fr->bsbuf[lame_offset+1]) << 8) + | ((int) fr->bsbuf[lame_offset+2]) ) & 0xfff; + lame_offset += 3; /* 24 in */ + if(VERBOSE3) fprintf(stderr, "Note: Encoder delay = %i; padding = %i\n" + , (int)pad_in, (int)pad_out); + #ifdef GAPLESS + if(fr->p.flags & MPG123_GAPLESS) + frame_gapless_init(fr, fr->track_frames, pad_in, pad_out); + #endif + /* final: 24 B LAME data */ } - return 0; /* no lame tag */ + +check_lame_tag_yes: + /* switch buffer back ... */ + fr->bsbuf = fr->bsspace[fr->bsnum]+512; + fr->bsnum = (fr->bsnum + 1) & 1; + return 1; +check_lame_tag_no: + return 0; } /* Just tell if the header is some mono. */ @@ -387,6 +430,13 @@ static int header_mono(unsigned long newhead) return HDR_CHANNEL_VAL(newhead) == MPG_MD_MONO ? TRUE : FALSE; } +/* true if the two headers will work with the same decoding routines */ +static int head_compatible(unsigned long fred, unsigned long bret) +{ + return ( (fred & HDR_CMPMASK) == (bret & HDR_CMPMASK) + && header_mono(fred) == header_mono(bret) ); +} + static void halfspeed_prepare(mpg123_handle *fr) { /* save for repetition */ @@ -432,7 +482,7 @@ static int halfspeed_do(mpg123_handle *fr) if(ret < 0){ debug1("%s", ret == MPG123_NEED_MORE ? "need more" : "read error"); goto read_frame_bad; } \ else if(ret == PARSE_AGAIN) goto read_again; \ else if(ret == PARSE_RESYNC) goto init_resync; \ -else if(ret == PARSE_END) goto read_frame_bad; \ +else if(ret == PARSE_END){ ret=0; goto read_frame_bad; } \ } /* @@ -469,21 +519,6 @@ int read_frame(mpg123_handle *fr) init_resync: - fr->header_change = 2; /* output format change is possible... */ - if(fr->oldhead) /* check a following header for change */ - { - if(fr->oldhead == newhead) fr->header_change = 0; - else - /* If they have the same sample rate. Note that only is _not_ the case for the first header, as we enforce sample rate match for following frames. - So, during one stream, only change of stereoness is possible and indicated by header_change == 2. */ - if((fr->oldhead & HDR_SAMPMASK) == (newhead & HDR_SAMPMASK)) - { - /* Now if both channel modes are mono or both stereo, it's no big deal. */ - if( header_mono(fr->oldhead) == header_mono(newhead)) - fr->header_change = 1; - } - } - #ifdef SKIP_JUNK if(!fr->firsthead && !head_check(newhead)) { @@ -600,6 +635,41 @@ int read_frame(mpg123_handle *fr) fr->to_decode = fr->to_ignore = TRUE; if(fr->error_protection) fr->crc = getbits(fr, 16); /* skip crc */ + /* + Let's check for header change after deciding that the new one is good + and actually having read a frame. + + header_change > 1: decoder structure has to be updated + Preserve header_change value from previous runs if it is serious. + If we still have a big change pending, it should be dealt with outside, + fr->header_change set to zero afterwards. + */ + if(fr->header_change < 2) + { + fr->header_change = 2; /* output format change is possible... */ + if(fr->oldhead) /* check a following header for change */ + { + if(fr->oldhead == newhead) fr->header_change = 0; + else + /* Headers that match in this test behave the same for the outside world. + namely: same decoding routines, same amount of decoded data. */ + if(head_compatible(fr->oldhead, newhead)) + fr->header_change = 1; + else + { + fr->state_flags |= FRAME_FRANKENSTEIN; + if(NOQUIET) + fprintf(stderr, "\nWarning: Big change (MPEG version, layer, rate). Frankenstein stream?\n"); + } + } + else if(fr->firsthead && !head_compatible(fr->firsthead, newhead)) + { + fr->state_flags |= FRAME_FRANKENSTEIN; + if(NOQUIET) + fprintf(stderr, "\nWarning: Big change from first (MPEG version, layer, rate). Frankenstein stream?\n"); + } + } + fr->oldhead = newhead; return 1; @@ -624,7 +694,7 @@ int read_frame(mpg123_handle *fr) * <0: error codes, possibly from feeder buffer (NEED_MORE) * PARSE_BAD: cannot get the framesize for some reason and shall silentry try the next possible header (if this is no free format stream after all...) */ -static int guess_freeformat_framesize(mpg123_handle *fr) +static int guess_freeformat_framesize(mpg123_handle *fr, unsigned long oldhead) { long i; int ret; @@ -644,7 +714,7 @@ static int guess_freeformat_framesize(mpg123_handle *fr) if((ret=fr->rd->head_shift(fr,&head))<=0) return ret; /* No head_check needed, the mask contains all relevant bits. */ - if((head & HDR_SAMEMASK) == (fr->oldhead & HDR_SAMEMASK)) + if((head & HDR_SAMEMASK) == (oldhead & HDR_SAMEMASK)) { fr->rd->back_bytes(fr,i+1); fr->framesize = i-3; @@ -673,29 +743,22 @@ static int decode_header(mpg123_handle *fr,unsigned long newhead, int *freeforma error1("trying to decode obviously invalid header 0x%08lx", newhead); } #endif + /* For some reason, the layer and sampling freq settings used to be wrapped + in a weird conditional including MPG123_NO_RESYNC. What was I thinking? + This information has to be consistent. */ + fr->lay = 4 - HDR_LAYER_VAL(newhead); + if(HDR_VERSION_VAL(newhead) & 0x2) { fr->lsf = (HDR_VERSION_VAL(newhead) & 0x1) ? 0 : 1; fr->mpeg25 = 0; + fr->sampling_frequency = HDR_SAMPLERATE_VAL(newhead) + (fr->lsf*3); } else { fr->lsf = 1; fr->mpeg25 = 1; - } - - if( (fr->p.flags & MPG123_NO_RESYNC) || !fr->oldhead - || (HDR_VERSION_VAL(fr->oldhead) != HDR_VERSION_VAL(newhead)) ) - { - /* If "tryresync" is false, assume that certain - parameters do not change within the stream! - Force an update if lsf or mpeg25 settings - have changed. */ - fr->lay = 4 - HDR_LAYER_VAL(newhead); - if(fr->mpeg25) fr->sampling_frequency = 6 + HDR_SAMPLERATE_VAL(newhead); - else - fr->sampling_frequency = HDR_SAMPLERATE_VAL(newhead) + (fr->lsf*3); } #ifdef DEBUG @@ -728,7 +791,7 @@ static int decode_header(mpg123_handle *fr,unsigned long newhead, int *freeforma if(VERBOSE3) error("You fooled me too often. Refusing to guess free format frame size _again_."); return PARSE_BAD; } - ret = guess_freeformat_framesize(fr); + ret = guess_freeformat_framesize(fr, newhead); if(ret == PARSE_GOOD) { fr->freeformat_framesize = fr->framesize - fr->padding; @@ -756,6 +819,7 @@ static int decode_header(mpg123_handle *fr,unsigned long newhead, int *freeforma { #ifndef NO_LAYER1 case 1: + fr->spf = 384; fr->do_layer = do_layer1; if(!fr->freeformat) { @@ -767,6 +831,7 @@ static int decode_header(mpg123_handle *fr,unsigned long newhead, int *freeforma #endif #ifndef NO_LAYER2 case 2: + fr->spf = 1152; fr->do_layer = do_layer2; if(!fr->freeformat) { @@ -779,6 +844,7 @@ static int decode_header(mpg123_handle *fr,unsigned long newhead, int *freeforma #endif #ifndef NO_LAYER3 case 3: + fr->spf = fr->lsf ? 576 : 1152; /* MPEG 2.5 implies LSF.*/ fr->do_layer = do_layer3; if(fr->lsf) fr->ssize = (fr->stereo == 1) ? 9 : 17; @@ -823,40 +889,21 @@ void set_pointer(mpg123_handle *fr, long backstep) double compute_bpf(mpg123_handle *fr) { - double bpf; - - switch(fr->lay) - { - case 1: - bpf = tabsel_123[fr->lsf][0][fr->bitrate_index]; - bpf *= 12000.0 * 4.0; - bpf /= freqs[fr->sampling_frequency] <<(fr->lsf); - break; - case 2: - case 3: - bpf = tabsel_123[fr->lsf][fr->lay-1][fr->bitrate_index]; - bpf *= 144000; - bpf /= freqs[fr->sampling_frequency] << (fr->lsf); - break; - default: - bpf = 1.0; - } - - return bpf; + return (fr->framesize > 0) ? fr->framesize + 4.0 : 1.0; } int attribute_align_arg mpg123_spf(mpg123_handle *mh) { if(mh == NULL) return MPG123_ERR; - return spf(mh); + return mh->firsthead ? mh->spf : MPG123_ERR; } double attribute_align_arg mpg123_tpf(mpg123_handle *fr) { static int bs[4] = { 0,384,1152,1152 }; double tpf; - if(fr == NULL) return -1; + if(fr == NULL || !fr->firsthead) return MPG123_ERR; tpf = (double) bs[fr->lay]; tpf /= freqs[fr->sampling_frequency] << (fr->lsf); @@ -872,11 +919,7 @@ int attribute_align_arg mpg123_position(mpg123_handle *fr, off_t no, off_t buffs off_t cur, left; double curs, lefts; - if(!fr || !fr->rd) /* Isn't this too paranoid? */ - { - debug("reader troubles!"); - return MPG123_ERR; - } + if(!fr || !fr->rd) return MPG123_ERR; no += fr->num; /* no starts out as offset */ cur = no; @@ -986,7 +1029,7 @@ static int do_readahead(mpg123_handle *fr, unsigned long newhead) } debug2("does next header 0x%08lx match first 0x%08lx?", nexthead, newhead); - if(!head_check(nexthead) || (nexthead & HDR_CMPMASK) != (newhead & HDR_CMPMASK)) + if(!head_check(nexthead) || !head_compatible(newhead, nexthead)) { debug("No, the header was not valid, start from beginning..."); fr->oldhead = 0; /* start over */ @@ -1015,6 +1058,67 @@ static int handle_id3v2(mpg123_handle *fr, unsigned long newhead) return PARSE_AGAIN; } +static int handle_apetag(mpg123_handle *fr, unsigned long newhead) +{ + unsigned char apebuf[28]; + unsigned long val; + int i, ret; + + fr->oldhead = 0; + + /* Apetag headers are 32 bytes, newhead contains 4, read the rest */ + if((ret=fr->rd->fullread(fr,apebuf,28)) < 0) return ret; + + /* Apetags start with "APETAGEX", "APET" is already tested. */ + if(strncmp((char *)apebuf,"AGEX",4) != 0) + goto apetag_bad; + + /* Version must be 2.000 / 2000 */ + val = (apebuf[7]<<24)|(apebuf[6]<<16)|(apebuf[5]<<8)|apebuf[4]; + if(val != 2000) + goto apetag_bad; + + /* Last 8 bytes must be 0 */ + for(i=20; i<28; i++) + if(apebuf[i]) + goto apetag_bad; + + /* Looks good, skip the rest. */ + val = (apebuf[11]<<24)|(apebuf[10]<<16)|(apebuf[9]<<8)|apebuf[8]; + if((ret=fr->rd->skip_bytes(fr,val)) < 0) return ret; + + return PARSE_AGAIN; + +apetag_bad: + if(fr->rd->back_bytes(fr,31) < 0 && NOQUIET) + error("Cannot seek 31 bytes back!"); + + return PARSE_AGAIN; /* Give the resync code a chance to fix things */ +} + +/* Advance a byte in stream to get next possible header and forget + buffered data if possible (for feed reader). */ +#define FORGET_INTERVAL 1024 /* Used by callers to set forget flag each bytes. */ +static int forget_head_shift(mpg123_handle *fr, unsigned long *newheadp, int forget) +{ + int ret; + if((ret=fr->rd->head_shift(fr,newheadp))<=0) return ret; + /* Try to forget buffered data as early as possible to speed up parsing where + new data needs to be added for resync (and things would be re-parsed again + and again because of the start from beginning after hitting end). */ + if(forget && fr->rd->forget != NULL) + { + /* Ensure that the last 4 bytes stay in buffers for reading the header + anew. */ + if(!fr->rd->back_bytes(fr, 4)) + { + fr->rd->forget(fr); + fr->rd->back_bytes(fr, -4); + } + } + return ret; /* No surprise here, error already triggered early return. */ +} + /* watch out for junk/tags on beginning of stream by invalid header */ static int skip_junk(mpg123_handle *fr, unsigned long *newheadp, long *headcount) { @@ -1022,6 +1126,7 @@ static int skip_junk(mpg123_handle *fr, unsigned long *newheadp, long *headcount int freeformat_count = 0; long limit = 65536; unsigned long newhead = *newheadp; + unsigned int forgetcount = 0; /* check for id3v2; first three bytes (of 4) are "ID3" */ if((newhead & (unsigned long) 0xffffff00) == (unsigned long) 0x49443300) { @@ -1038,7 +1143,8 @@ static int skip_junk(mpg123_handle *fr, unsigned long *newheadp, long *headcount while(newhead != ('d'<<24)+('a'<<16)+('t'<<8)+'a') { - if((ret=fr->rd->head_shift(fr,&newhead))<=0) return ret; + if(++forgetcount > FORGET_INTERVAL) forgetcount = 0; + if((ret=forget_head_shift(fr,&newhead,!forgetcount))<=0) return ret; } if((ret=fr->rd->head_read(fr,&newhead))<=0) return ret; @@ -1067,7 +1173,8 @@ static int skip_junk(mpg123_handle *fr, unsigned long *newheadp, long *headcount ++(*headcount); if(limit >= 0 && *headcount >= limit) break; - if((ret=fr->rd->head_shift(fr,&newhead))<=0) return ret; + if(++forgetcount > FORGET_INTERVAL) forgetcount = 0; + if((ret=forget_head_shift(fr, &newhead, !forgetcount))<=0) return ret; if(head_check(newhead) && (ret=decode_header(fr, newhead, &freeformat_count))) break; } while(1); @@ -1114,6 +1221,11 @@ static int wetwork(mpg123_handle *fr, unsigned long *newheadp) { return handle_id3v2(fr, newhead); } + /* Check for an apetag header */ + if(newhead == ('A'<<24)+('P'<<16)+('E'<<8)+'T') + { + return handle_apetag(fr, newhead); + } else if(NOQUIET && fr->silent_resync == 0) { fprintf(stderr,"Note: Illegal Audio-MPEG-Header 0x%08lx at offset %"OFF_P".\n", @@ -1128,6 +1240,7 @@ static int wetwork(mpg123_handle *fr, unsigned long *newheadp) { long try = 0; long limit = fr->p.resync_limit; + unsigned int forgetcount = 0; /* If a resync is needed the bitreservoir of previous frames is no longer valid */ fr->bitreservoir = 0; @@ -1139,7 +1252,8 @@ static int wetwork(mpg123_handle *fr, unsigned long *newheadp) ++try; if(limit >= 0 && try >= limit) break; - if((ret=fr->rd->head_shift(fr,&newhead)) <= 0) + if(++forgetcount > FORGET_INTERVAL) forgetcount = 0; + if((ret=forget_head_shift(fr,&newhead,!forgetcount)) <= 0) { *newheadp = newhead; if(NOQUIET) fprintf (stderr, "Note: Hit end of (available) data during resync.\n"); @@ -1163,8 +1277,8 @@ static int wetwork(mpg123_handle *fr, unsigned long *newheadp) } else { - debug1("Found possibly valid header 0x%lx... unsetting firsthead to reinit stream.", newhead); - fr->firsthead = 0; + debug1("Found possibly valid header 0x%lx... unsetting oldhead to reinit stream.", newhead); + fr->oldhead = 0; return PARSE_RESYNC; } } diff --git a/deps/mpg123/src/libmpg123/readers.c b/deps/mpg123/src/libmpg123/readers.c index 4a1009d..58dad6d 100644 --- a/deps/mpg123/src/libmpg123/readers.c +++ b/deps/mpg123/src/libmpg123/readers.c @@ -531,7 +531,7 @@ static struct buffy* bc_alloc(struct bufferchain *bc, size_t size) buf->next = NULL; /* That shall be set to a sensible value later. */ buf->size = 0; --bc->pool_fill; - debug2("bc_alloc: picked %p from pool (fill now %"SIZE_P")", buf, (size_p)bc->pool_fill); + debug2("bc_alloc: picked %p from pool (fill now %"SIZE_P")", (void*)buf, (size_p)bc->pool_fill); return buf; } else return buffy_new(size, bc->bufblock); @@ -617,7 +617,7 @@ static int bc_append(struct bufferchain *bc, ssize_t size) else if(bc->first == NULL) bc->first = newbuf; bc->last = newbuf; - debug3("bc_append: new last buffer %p with %"SSIZE_P" B (really %"SSIZE_P")", bc->last, (ssize_p)bc->last->size, (ssize_p)bc->last->realsize); + debug3("bc_append: new last buffer %p with %"SSIZE_P" B (really %"SSIZE_P")", (void*)bc->last, (ssize_p)bc->last->size, (ssize_p)bc->last->realsize); return 0; } @@ -637,7 +637,7 @@ static int bc_add(struct bufferchain *bc, const unsigned char *data, ssize_t siz part = bc->last->realsize - bc->last->size; if(part > size) part = size; - debug2("bc_add: adding %"SSIZE_P" B to existing block %p", (ssize_p)part, bc->last); + debug2("bc_add: adding %"SSIZE_P" B to existing block %p", (ssize_p)part, (void*)bc->last); memcpy(bc->last->data+bc->last->size, data, part); bc->last->size += part; size -= part; @@ -1049,8 +1049,10 @@ static int default_init(mpg123_handle *fr) if(fr->p.icy_interval > 0) fr->rdat.lseek = nix_lseek; #endif - fr->rdat.filelen = get_fileinfo(fr); + fr->rdat.filelen = fr->p.flags & MPG123_NO_PEEK_END ? -1 : get_fileinfo(fr); fr->rdat.filepos = 0; + if(fr->p.flags & MPG123_FORCE_SEEKABLE) + fr->rdat.flags |= READER_SEEKABLE; /* Don't enable seeking on ICY streams, just plain normal files. This check is necessary since the client can enforce ICY parsing on files that would otherwise be seekable. diff --git a/deps/mpg123/src/libmpg123/sample.h b/deps/mpg123/src/libmpg123/sample.h index d021b89..2e6cbff 100644 --- a/deps/mpg123/src/libmpg123/sample.h +++ b/deps/mpg123/src/libmpg123/sample.h @@ -14,11 +14,11 @@ /* Special case is fixed point math... which does work, but not that nice yet. */ #ifdef REAL_IS_FIXED -static inline short idiv_signed_rounded(long x, int shift) +static inline int16_t idiv_signed_rounded(int32_t x, int shift) { x >>= (shift - 1); x += (x & 1); - return (short)(x >> 1); + return (int16_t)(x >> 1); } # define REAL_PLUS_32767 ( 32767 << 15 ) # define REAL_MINUS_32768 ( -32768 << 15 ) @@ -32,11 +32,12 @@ static inline short idiv_signed_rounded(long x, int shift) /* From now on for single precision float... double precision is a possible option once we added some bits. But, it would be rather insane. */ #ifndef REAL_TO_SHORT +#if (defined FORCE_ACCURATE) || (defined ACCURATE_ROUNDING) /* Define the accurate rounding function. */ # if (defined REAL_IS_FLOAT) && (defined IEEE_FLOAT) /* This function is only available for IEEE754 single-precision values This is nearly identical to proper rounding, just -+0.5 is rounded to 0 */ -static inline short ftoi16(float x) +static inline int16_t ftoi16(float x) { union { @@ -44,13 +45,14 @@ static inline short ftoi16(float x) int32_t i; } u_fi; u_fi.f = x + 12582912.0f; /* Magic Number: 2^23 + 2^22 */ - return (short)u_fi.i; + return (int16_t)u_fi.i; } # define REAL_TO_SHORT_ACCURATE(x) ftoi16(x) # else /* The "proper" rounding, plain C, a bit slow. */ # define REAL_TO_SHORT_ACCURATE(x) (short)((x)>0.0?(x)+0.5:(x)-0.5) # endif +#endif /* Now define the normal rounding. */ # ifdef ACCURATE_ROUNDING @@ -139,7 +141,7 @@ static inline short ftoi16(float x) /* Produce an 8bit sample, via 16bit intermediate. */ #define WRITE_8BIT_SAMPLE(samples,sum,clip) \ { \ - short write_8bit_tmp; \ + int16_t write_8bit_tmp; \ if( (sum) > REAL_PLUS_32767) { write_8bit_tmp = 0x7fff; (clip)++; } \ else if( (sum) < REAL_MINUS_32768) { write_8bit_tmp = -0x8000; (clip)++; } \ else { write_8bit_tmp = REAL_TO_SHORT(sum); } \ diff --git a/deps/mpg123/src/libmpg123/stringbuf.c b/deps/mpg123/src/libmpg123/stringbuf.c index 40d0d4e..b1cecc9 100644 --- a/deps/mpg123/src/libmpg123/stringbuf.c +++ b/deps/mpg123/src/libmpg123/stringbuf.c @@ -1,7 +1,8 @@ /* stringbuf: mimicking a bit of C++ to more safely handle strings - copyright 2006-10 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 2006-17 by the mpg123 project + - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Thomas Orgis */ @@ -15,6 +16,7 @@ void attribute_align_arg mpg123_init_string(mpg123_string* sb) { + /* Handing in NULL here is a fatal mistake and rightfully so. */ sb->p = NULL; sb->size = 0; sb->fill = 0; @@ -22,18 +24,24 @@ void attribute_align_arg mpg123_init_string(mpg123_string* sb) void attribute_align_arg mpg123_free_string(mpg123_string* sb) { + if(!sb) + return; if(sb->p != NULL) free(sb->p); mpg123_init_string(sb); } int attribute_align_arg mpg123_grow_string(mpg123_string* sb, size_t new) { + if(!sb) + return 0; if(sb->size < new) return mpg123_resize_string(sb, new); else return 1; } int attribute_align_arg mpg123_resize_string(mpg123_string* sb, size_t new) { + if(!sb) + return 0; debug3("resizing string pointer %p from %lu to %lu", (void*) sb->p, (unsigned long)sb->size, (unsigned long)new); if(new == 0) { @@ -62,9 +70,10 @@ int attribute_align_arg mpg123_copy_string(mpg123_string* from, mpg123_string* t { size_t fill; char *text; - if(to == NULL) return -1; debug2("called copy_string with %p -> %p", (void*)from, (void*)to); + if(to == NULL) + return 0; if(from == NULL) { fill = 0; @@ -78,7 +87,8 @@ int attribute_align_arg mpg123_copy_string(mpg123_string* from, mpg123_string* t if(mpg123_resize_string(to, fill)) { - memcpy(to->p, text, fill); + if(fill) /* Avoid memcpy(NULL, NULL, 0) */ + memcpy(to->p, text, fill); to->fill = fill; return 1; } @@ -88,12 +98,14 @@ int attribute_align_arg mpg123_copy_string(mpg123_string* from, mpg123_string* t int attribute_align_arg mpg123_add_string(mpg123_string* sb, const char* stuff) { debug1("adding %s", stuff); - return mpg123_add_substring(sb, stuff, 0, strlen(stuff)); + return mpg123_add_substring(sb, stuff, 0, stuff ? strlen(stuff) : 0); } int attribute_align_arg mpg123_add_substring(mpg123_string *sb, const char *stuff, size_t from, size_t count) { debug("adding a substring"); + if(!sb || !stuff) + return 0; if(sb->fill) /* includes zero byte... */ { if( (SIZE_MAX - sb->fill >= count) /* Avoid overflow. */ @@ -120,12 +132,16 @@ int attribute_align_arg mpg123_add_substring(mpg123_string *sb, const char *stuf int attribute_align_arg mpg123_set_substring(mpg123_string* sb, const char* stuff, size_t from, size_t count) { + if(!sb) + return 0; sb->fill = 0; return mpg123_add_substring(sb, stuff, from, count); } int attribute_align_arg mpg123_set_string(mpg123_string* sb, const char* stuff) { + if(!sb) + return 0; sb->fill = 0; return mpg123_add_string(sb, stuff); } @@ -136,7 +152,7 @@ size_t attribute_align_arg mpg123_strlen(mpg123_string *sb, int utf8) size_t bytelen; /* Notions of empty string. If there's only a single character, it has to be the trailing zero, and if the first is the trailing zero anyway, we got empty. */ - if(sb->fill < 2 || sb->p[0] == 0) return 0; + if(!sb || sb->fill < 2 || sb->p[0] == 0) return 0; /* Find the first non-null character from the back. We already established that the first character is non-null @@ -161,3 +177,26 @@ size_t attribute_align_arg mpg123_strlen(mpg123_string *sb, int utf8) return len; } } + +int attribute_align_arg mpg123_chomp_string(mpg123_string *sb) +{ + ssize_t i; + if(!sb || !sb->fill) return 0; + + /* Ensure that it is zero-terminated. */ + sb->p[sb->fill-1] = 0; + for(i=sb->fill-2; i>=0; --i) + { + char *c = sb->p+i; + /* Stop at the first proper character. */ + if(*c && *c != '\r' && *c != '\n') break; + else *c = 0; + } + /* initial fill at least 1, so i at least -1, + +2 means nothing happened for fill=1 . + With i=0, we got one non-null character, fill shall be 2 + to accomodate the trailing zero. */ + sb->fill = (size_t)i+2; + + return 1; +} diff --git a/deps/mpg123/src/libmpg123/synth.c b/deps/mpg123/src/libmpg123/synth.c index 582e099..ed927d9 100644 --- a/deps/mpg123/src/libmpg123/synth.c +++ b/deps/mpg123/src/libmpg123/synth.c @@ -7,6 +7,9 @@ */ #include "mpg123lib_intern.h" +#ifdef OPT_GENERIC_DITHER +#define FORCE_ACCURATE +#endif #include "sample.h" #include "debug.h" @@ -75,8 +78,9 @@ int synth_1to1_i586_asm(real *bandPtr, int channel, unsigned char *out, unsigned int synth_1to1_i586(real *bandPtr, int channel, mpg123_handle *fr, int final) { int ret; +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif ret = synth_1to1_i586_asm(bandPtr, channel, fr->buffer.data+fr->buffer.fill, fr->rawbuffs, &fr->bo, fr->decwin); if(final) fr->buffer.fill += 128; return ret; @@ -91,8 +95,9 @@ int synth_1to1_i586_dither(real *bandPtr, int channel, mpg123_handle *fr, int fi { int ret; int bo_dither[2]; /* Temporary workaround? Could expand the asm code. */ +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif /* Applying this hack, to change the asm only bit by bit (adding dithernoise pointer). */ bo_dither[0] = fr->bo; bo_dither[1] = fr->ditherindex; @@ -105,7 +110,7 @@ int synth_1to1_i586_dither(real *bandPtr, int channel, mpg123_handle *fr, int fi } #endif -#ifdef OPT_3DNOW +#if defined(OPT_3DNOW) || defined(OPT_3DNOW_VINTAGE) /* Those are defined in assembler. */ void do_equalizer_3dnow(real *bandPtr,int channel, real equalizer[2][32]); int synth_1to1_3dnow_asm(real *bandPtr, int channel, unsigned char *out, unsigned char *buffs, int *bo, real *decwin); @@ -113,9 +118,9 @@ int synth_1to1_3dnow_asm(real *bandPtr, int channel, unsigned char *out, unsigne int synth_1to1_3dnow(real *bandPtr, int channel, mpg123_handle *fr, int final) { int ret; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer_3dnow(bandPtr,channel,fr->equalizer); - +#endif /* this is in asm, can be dither or not */ /* uh, is this return from pointer correct? */ ret = (int) synth_1to1_3dnow_asm(bandPtr, channel, fr->buffer.data+fr->buffer.fill, fr->rawbuffs, &fr->bo, fr->decwin); @@ -130,8 +135,9 @@ int synth_1to1_MMX(real *bandPtr, int channel, short *out, short *buffs, int *bo /* This is just a hull to use the mpg123 handle. */ int synth_1to1_mmx(real *bandPtr, int channel, mpg123_handle *fr, int final) { +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif /* in asm */ synth_1to1_MMX(bandPtr, channel, (short*) (fr->buffer.data+fr->buffer.fill), (short *) fr->rawbuffs, &fr->bo, fr->decwins); if(final) fr->buffer.fill += 128; @@ -139,7 +145,7 @@ int synth_1to1_mmx(real *bandPtr, int channel, mpg123_handle *fr, int final) } #endif -#ifdef OPT_SSE +#if defined(OPT_SSE) || defined(OPT_SSE_VINTAGE) #ifdef ACCURATE_ROUNDING /* This is defined in assembler. */ int synth_1to1_sse_accurate_asm(real *window, real *b0, short *samples, int bo1); @@ -152,9 +158,9 @@ int synth_1to1_sse(real *bandPtr,int channel, mpg123_handle *fr, int final) real *b0, **buf; int clip; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -194,13 +200,13 @@ int synth_1to1_stereo_sse(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr) real *b0l, *b0r, **bufl, **bufr; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; @@ -235,8 +241,9 @@ void synth_1to1_sse_asm(real *bandPtr, int channel, short *samples, short *buffs /* This is just a hull to use the mpg123 handle. */ int synth_1to1_sse(real *bandPtr, int channel, mpg123_handle *fr, int final) { +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif synth_1to1_sse_asm(bandPtr, channel, (short*) (fr->buffer.data+fr->buffer.fill), (short *) fr->rawbuffs, &fr->bo, fr->decwins); if(final) fr->buffer.fill += 128; return 0; @@ -244,14 +251,15 @@ int synth_1to1_sse(real *bandPtr, int channel, mpg123_handle *fr, int final) #endif #endif -#ifdef OPT_3DNOWEXT +#if defined(OPT_3DNOWEXT) || defined(OPT_3DNOWEXT_VINTAGE) /* This is defined in assembler. */ void synth_1to1_3dnowext_asm(real *bandPtr, int channel, short *samples, short *buffs, int *bo, real *decwin); /* This is just a hull to use the mpg123 handle. */ int synth_1to1_3dnowext(real *bandPtr, int channel, mpg123_handle *fr, int final) { +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif synth_1to1_3dnowext_asm(bandPtr, channel, (short*) (fr->buffer.data+fr->buffer.fill), (short *) fr->rawbuffs, &fr->bo, fr->decwins); if(final) fr->buffer.fill += 128; return 0; @@ -272,9 +280,9 @@ int synth_1to1_x86_64(real *bandPtr,int channel, mpg123_handle *fr, int final) real *b0, **buf; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -314,13 +322,13 @@ int synth_1to1_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr real *b0l, *b0r, **bufl, **bufr; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; @@ -361,9 +369,9 @@ int synth_1to1_x86_64(real *bandPtr,int channel, mpg123_handle *fr, int final) short *b0, **buf; int clip; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -402,13 +410,13 @@ int synth_1to1_stereo_x86_64(real *bandPtr_l,real *bandPtr_r, mpg123_handle *fr) short *b0l, *b0r, **bufl, **bufr; int clip; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->short_buffs[0]; @@ -440,6 +448,192 @@ int synth_1to1_stereo_x86_64(real *bandPtr_l,real *bandPtr_r, mpg123_handle *fr) #endif #endif +#ifdef OPT_AVX +#ifdef ACCURATE_ROUNDING +/* Assembler routines. */ +#ifndef OPT_X86_64 +int synth_1to1_x86_64_accurate_asm(real *window, real *b0, short *samples, int bo1); +#endif +int synth_1to1_s_avx_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1); +void dct64_real_avx(real *out0, real *out1, real *samples); +/* Hull for C mpg123 API */ +int synth_1to1_avx(real *bandPtr,int channel, mpg123_handle *fr, int final) +{ + short *samples = (short *) (fr->buffer.data+fr->buffer.fill); + + real *b0, **buf; + int bo1; + int clip; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); +#endif + if(!channel) + { + fr->bo--; + fr->bo &= 0xf; + buf = fr->real_buffs[0]; + } + else + { + samples++; + buf = fr->real_buffs[1]; + } + + if(fr->bo & 0x1) + { + b0 = buf[0]; + bo1 = fr->bo; + dct64_real_avx(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr); + } + else + { + b0 = buf[1]; + bo1 = fr->bo+1; + dct64_real_avx(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr); + } + + clip = synth_1to1_x86_64_accurate_asm(fr->decwin, b0, samples, bo1); + + if(final) fr->buffer.fill += 128; + + return clip; +} + +int synth_1to1_stereo_avx(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr) +{ + short *samples = (short *) (fr->buffer.data+fr->buffer.fill); + + real *b0l, *b0r, **bufl, **bufr; + int bo1; + int clip; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) + { + do_equalizer(bandPtr_l,0,fr->equalizer); + do_equalizer(bandPtr_r,1,fr->equalizer); + } +#endif + fr->bo--; + fr->bo &= 0xf; + bufl = fr->real_buffs[0]; + bufr = fr->real_buffs[1]; + + if(fr->bo & 0x1) + { + b0l = bufl[0]; + b0r = bufr[0]; + bo1 = fr->bo; + dct64_real_avx(bufl[1]+((fr->bo+1)&0xf),bufl[0]+fr->bo,bandPtr_l); + dct64_real_avx(bufr[1]+((fr->bo+1)&0xf),bufr[0]+fr->bo,bandPtr_r); + } + else + { + b0l = bufl[1]; + b0r = bufr[1]; + bo1 = fr->bo+1; + dct64_real_avx(bufl[0]+fr->bo,bufl[1]+fr->bo+1,bandPtr_l); + dct64_real_avx(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); + } + + clip = synth_1to1_s_avx_accurate_asm(fr->decwin, b0l, b0r, samples, bo1); + + fr->buffer.fill += 128; + + return clip; +} +#else +/* This is defined in assembler. */ +#ifndef OPT_X86_64 +int synth_1to1_x86_64_asm(short *window, short *b0, short *samples, int bo1); +#endif +int synth_1to1_s_avx_asm(short *window, short *b0l, short *b0r, short *samples, int bo1); +void dct64_avx(short *out0, short *out1, real *samples); +/* This is just a hull to use the mpg123 handle. */ +int synth_1to1_avx(real *bandPtr,int channel, mpg123_handle *fr, int final) +{ + short *samples = (short *) (fr->buffer.data+fr->buffer.fill); + short *b0, **buf; + int clip; + int bo1; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); +#endif + if(!channel) + { + fr->bo--; + fr->bo &= 0xf; + buf = fr->short_buffs[0]; + } + else + { + samples++; + buf = fr->short_buffs[1]; + } + + if(fr->bo & 0x1) + { + b0 = buf[0]; + bo1 = fr->bo; + dct64_avx(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr); + } + else + { + b0 = buf[1]; + bo1 = fr->bo+1; + dct64_avx(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr); + } + + clip = synth_1to1_x86_64_asm((short *)fr->decwins, b0, samples, bo1); + + if(final) fr->buffer.fill += 128; + + return clip; +} + +int synth_1to1_stereo_avx(real *bandPtr_l,real *bandPtr_r, mpg123_handle *fr) +{ + short *samples = (short *) (fr->buffer.data+fr->buffer.fill); + short *b0l, *b0r, **bufl, **bufr; + int clip; + int bo1; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) + { + do_equalizer(bandPtr_l,0,fr->equalizer); + do_equalizer(bandPtr_r,1,fr->equalizer); + } +#endif + fr->bo--; + fr->bo &= 0xf; + bufl = fr->short_buffs[0]; + bufr = fr->short_buffs[1]; + + if(fr->bo & 0x1) + { + b0l = bufl[0]; + b0r = bufr[0]; + bo1 = fr->bo; + dct64_avx(bufl[1]+((fr->bo+1)&0xf),bufl[0]+fr->bo,bandPtr_l); + dct64_avx(bufr[1]+((fr->bo+1)&0xf),bufr[0]+fr->bo,bandPtr_r); + } + else + { + b0l = bufl[1]; + b0r = bufr[1]; + bo1 = fr->bo+1; + dct64_avx(bufl[0]+fr->bo,bufl[1]+fr->bo+1,bandPtr_l); + dct64_avx(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); + } + + clip = synth_1to1_s_avx_asm((short *)fr->decwins, b0l, b0r, samples, bo1); + + fr->buffer.fill += 128; + + return clip; +} +#endif +#endif + #ifdef OPT_ARM #ifdef ACCURATE_ROUNDING /* Assembler routines. */ @@ -452,9 +646,9 @@ int synth_1to1_arm(real *bandPtr,int channel, mpg123_handle *fr, int final) real *b0, **buf; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -497,9 +691,9 @@ int synth_1to1_arm(real *bandPtr,int channel, mpg123_handle *fr, int final) real *b0, **buf; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -548,9 +742,9 @@ int synth_1to1_neon(real *bandPtr,int channel, mpg123_handle *fr, int final) real *b0, **buf; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -590,13 +784,13 @@ int synth_1to1_stereo_neon(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr) real *b0l, *b0r, **bufl, **bufr; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; @@ -637,9 +831,9 @@ int synth_1to1_neon(real *bandPtr,int channel, mpg123_handle *fr, int final) short *b0, **buf; int clip; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -678,13 +872,13 @@ int synth_1to1_stereo_neon(real *bandPtr_l,real *bandPtr_r, mpg123_handle *fr) short *b0l, *b0r, **bufl, **bufr; int clip; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->short_buffs[0]; @@ -716,6 +910,188 @@ int synth_1to1_stereo_neon(real *bandPtr_l,real *bandPtr_r, mpg123_handle *fr) #endif #endif +#ifdef OPT_NEON64 +#ifdef ACCURATE_ROUNDING +/* This is defined in assembler. */ +int synth_1to1_neon64_accurate_asm(real *window, real *b0, short *samples, int bo1); +int synth_1to1_s_neon64_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1); +void dct64_real_neon64(real *out0, real *out1, real *samples); +/* Hull for C mpg123 API */ +int synth_1to1_neon64(real *bandPtr,int channel, mpg123_handle *fr, int final) +{ + short *samples = (short *) (fr->buffer.data+fr->buffer.fill); + + real *b0, **buf; + int bo1; + int clip; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); +#endif + if(!channel) + { + fr->bo--; + fr->bo &= 0xf; + buf = fr->real_buffs[0]; + } + else + { + samples++; + buf = fr->real_buffs[1]; + } + + if(fr->bo & 0x1) + { + b0 = buf[0]; + bo1 = fr->bo; + dct64_real_neon64(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr); + } + else + { + b0 = buf[1]; + bo1 = fr->bo+1; + dct64_real_neon64(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr); + } + + clip = synth_1to1_neon64_accurate_asm(fr->decwin, b0, samples, bo1); + + if(final) fr->buffer.fill += 128; + + return clip; +} + +int synth_1to1_stereo_neon64(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr) +{ + short *samples = (short *) (fr->buffer.data+fr->buffer.fill); + + real *b0l, *b0r, **bufl, **bufr; + int bo1; + int clip; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) + { + do_equalizer(bandPtr_l,0,fr->equalizer); + do_equalizer(bandPtr_r,1,fr->equalizer); + } +#endif + fr->bo--; + fr->bo &= 0xf; + bufl = fr->real_buffs[0]; + bufr = fr->real_buffs[1]; + + if(fr->bo & 0x1) + { + b0l = bufl[0]; + b0r = bufr[0]; + bo1 = fr->bo; + dct64_real_neon64(bufl[1]+((fr->bo+1)&0xf),bufl[0]+fr->bo,bandPtr_l); + dct64_real_neon64(bufr[1]+((fr->bo+1)&0xf),bufr[0]+fr->bo,bandPtr_r); + } + else + { + b0l = bufl[1]; + b0r = bufr[1]; + bo1 = fr->bo+1; + dct64_real_neon64(bufl[0]+fr->bo,bufl[1]+fr->bo+1,bandPtr_l); + dct64_real_neon64(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); + } + + clip = synth_1to1_s_neon64_accurate_asm(fr->decwin, b0l, b0r, samples, bo1); + + fr->buffer.fill += 128; + + return clip; +} +#else +/* This is defined in assembler. */ +int synth_1to1_neon64_asm(short *window, short *b0, short *samples, int bo1); +int synth_1to1_s_neon64_asm(short *window, short *b0l, short *b0r, short *samples, int bo1); +void dct64_neon64(short *out0, short *out1, real *samples); +/* Hull for C mpg123 API */ +int synth_1to1_neon64(real *bandPtr,int channel, mpg123_handle *fr, int final) +{ + short *samples = (short *) (fr->buffer.data+fr->buffer.fill); + short *b0, **buf; + int clip; + int bo1; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); +#endif + if(!channel) + { + fr->bo--; + fr->bo &= 0xf; + buf = fr->short_buffs[0]; + } + else + { + samples++; + buf = fr->short_buffs[1]; + } + + if(fr->bo & 0x1) + { + b0 = buf[0]; + bo1 = fr->bo; + dct64_neon64(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr); + } + else + { + b0 = buf[1]; + bo1 = fr->bo+1; + dct64_neon64(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr); + } + + clip = synth_1to1_neon64_asm((short *)fr->decwins, b0, samples, bo1); + + if(final) fr->buffer.fill += 128; + + return clip; +} + +int synth_1to1_stereo_neon64(real *bandPtr_l,real *bandPtr_r, mpg123_handle *fr) +{ + short *samples = (short *) (fr->buffer.data+fr->buffer.fill); + short *b0l, *b0r, **bufl, **bufr; + int clip; + int bo1; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) + { + do_equalizer(bandPtr_l,0,fr->equalizer); + do_equalizer(bandPtr_r,1,fr->equalizer); + } +#endif + fr->bo--; + fr->bo &= 0xf; + bufl = fr->short_buffs[0]; + bufr = fr->short_buffs[1]; + + if(fr->bo & 0x1) + { + b0l = bufl[0]; + b0r = bufr[0]; + bo1 = fr->bo; + dct64_neon64(bufl[1]+((fr->bo+1)&0xf),bufl[0]+fr->bo,bandPtr_l); + dct64_neon64(bufr[1]+((fr->bo+1)&0xf),bufr[0]+fr->bo,bandPtr_r); + } + else + { + b0l = bufl[1]; + b0r = bufr[1]; + bo1 = fr->bo+1; + dct64_neon64(bufl[0]+fr->bo,bufl[1]+fr->bo+1,bandPtr_l); + dct64_neon64(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); + } + + clip = synth_1to1_s_neon64_asm((short *)fr->decwins, b0l, b0r, samples, bo1); + + fr->buffer.fill += 128; + + return clip; +} +#endif +#endif + #ifndef NO_DOWNSAMPLE /* diff --git a/deps/mpg123/src/libmpg123/synth.h b/deps/mpg123/src/libmpg123/synth.h index 6cdac58..87dd007 100644 --- a/deps/mpg123/src/libmpg123/synth.h +++ b/deps/mpg123/src/libmpg123/synth.h @@ -36,9 +36,9 @@ int SYNTH_NAME(real *bandPtr, int channel, mpg123_handle *fr, int final) real *b0, **buf; /* (*buf)[0x110]; */ int clip = 0; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; diff --git a/deps/mpg123/src/libmpg123/synth_3dnow.S b/deps/mpg123/src/libmpg123/synth_3dnow.S index 7032439..0aa4746 100644 --- a/deps/mpg123/src/libmpg123/synth_3dnow.S +++ b/deps/mpg123/src/libmpg123/synth_3dnow.S @@ -71,7 +71,18 @@ ASM_NAME(synth_1to1_3dnow_asm): #define DECWIN 64(%esp) #define LOCAL0 16(%esp) #define LOCAL1 20(%esp) +#define EBXSAVE 24(%esp) #define LOCAL5 36(%esp) + +#ifdef ACCURATE_ROUNDING + #undef _EBX_ + #define _EBX_ %eax + GET_GOT + /* FIXME */ +#if PIC + movl _EBX_, EBXSAVE +#endif +#endif movl OUT,%esi movl %esi,LOCAL0 /* save buffer start (samples pointer) to another local var */ movl CHANNEL,%ebx @@ -111,7 +122,7 @@ ASM_NAME(synth_1to1_3dnow_asm): leal 1088(,%eax,4),%eax addl %ebx,%eax pushl %eax - call ASM_NAME(dct64_3dnow) + call FUNC(dct64_3dnow) addl $12,%esp jmp .L29 .L28: @@ -125,7 +136,7 @@ ASM_NAME(synth_1to1_3dnow_asm): sall $2,%esi leal (%ecx,%edx,4),%eax pushl %eax - call ASM_NAME(dct64_3dnow) + call FUNC(dct64_3dnow) addl $12,%esp movl %esi,LOCAL1 .L29: @@ -141,6 +152,9 @@ ASM_NAME(synth_1to1_3dnow_asm): movq (%ebx),%mm1 ALIGN32 .L33: +#if defined(ACCURATE_ROUNDING) && defined(PIC) + movl EBXSAVE, _EBX_ +#endif movq 8(%edx),%mm3 pfmul %mm1,%mm0 movq 8(%ebx),%mm4 @@ -179,9 +193,9 @@ ASM_NAME(synth_1to1_3dnow_asm): pfsub %mm3,%mm2 incl %ebp #ifdef ACCURATE_ROUNDING - pfmin (max_s16),%mm2 - pfmax (min_s16),%mm2 - pfadd (ftoi_magic),%mm2 + pfmin LOCAL_VAR(max_s16),%mm2 + pfmax LOCAL_VAR(min_s16),%mm2 + pfadd LOCAL_VAR(ftoi_magic),%mm2 #else pf2id %mm2,%mm2 packssdw %mm2,%mm2 @@ -192,6 +206,9 @@ ASM_NAME(synth_1to1_3dnow_asm): decl %ecx jnz .L33 +#if defined(ACCURATE_ROUNDING) && defined(PIC) + movl EBXSAVE, _EBX_ +#endif movd (%ebx),%mm0 movd (%edx),%mm1 punpckldq 8(%ebx),%mm0 @@ -217,9 +234,9 @@ ASM_NAME(synth_1to1_3dnow_asm): pfadd %mm1,%mm0 pfacc %mm1,%mm0 #ifdef ACCURATE_ROUNDING - pfmin (max_s16),%mm0 - pfmax (min_s16),%mm0 - pfadd (ftoi_magic),%mm0 + pfmin LOCAL_VAR(max_s16),%mm0 + pfmax LOCAL_VAR(min_s16),%mm0 + pfadd LOCAL_VAR(ftoi_magic),%mm0 #else pf2id %mm0,%mm0 packssdw %mm0,%mm0 @@ -240,6 +257,9 @@ ASM_NAME(synth_1to1_3dnow_asm): punpckldq -8(%edx),%mm1 ALIGN32 .L46: +#if defined(ACCURATE_ROUNDING) && defined(PIC) + movl EBXSAVE, _EBX_ +#endif movd 8(%ebx),%mm3 movd -12(%edx),%mm4 pfmul %mm1,%mm0 @@ -293,9 +313,9 @@ ASM_NAME(synth_1to1_3dnow_asm): incl %ebp pxor %mm7,%mm3 #ifdef ACCURATE_ROUNDING - pfmin (max_s16),%mm3 - pfmax (min_s16),%mm3 - pfadd (ftoi_magic),%mm3 + pfmin LOCAL_VAR(max_s16),%mm3 + pfmax LOCAL_VAR(min_s16),%mm3 + pfadd LOCAL_VAR(ftoi_magic),%mm3 #else pf2id %mm3,%mm3 packssdw %mm3,%mm3 @@ -315,4 +335,11 @@ ASM_NAME(synth_1to1_3dnow_asm): addl $24,%esp ret +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 +L_dct64_3dnow: + .indirect_symbol ASM_NAME(dct64_3dnow) + hlt ; hlt ; hlt ; hlt ; hlt +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_3dnowext.S b/deps/mpg123/src/libmpg123/synth_3dnowext.S index 3dab8e8..77eff75 100644 --- a/deps/mpg123/src/libmpg123/synth_3dnowext.S +++ b/deps/mpg123/src/libmpg123/synth_3dnowext.S @@ -1,6 +1,13 @@ #include "mangle.h" -#define MPL_DCT64 ASM_NAME(dct64_3dnowext) +#define MPL_DCT64 FUNC(dct64_3dnowext) #define SYNTH_NAME ASM_NAME(synth_1to1_3dnowext_asm) #include "synth_sse3d.h" +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 +L_dct64_3dnowext: + .indirect_symbol ASM_NAME(dct64_3dnowext) + hlt ; hlt ; hlt ; hlt ; hlt +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_altivec.c b/deps/mpg123/src/libmpg123/synth_altivec.c index f17631b..e1f3ea1 100644 --- a/deps/mpg123/src/libmpg123/synth_altivec.c +++ b/deps/mpg123/src/libmpg123/synth_altivec.c @@ -262,9 +262,9 @@ int synth_1to1_altivec(real *bandPtr,int channel,mpg123_handle *fr, int final) real *b0, **buf; int clip; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -393,13 +393,13 @@ int synth_1to1_stereo_altivec(real *bandPtr_l, real *bandPtr_r, mpg123_handle *f real *b0l, *b0r, **bufl, **bufr; int clip; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; @@ -543,9 +543,9 @@ int synth_1to1_real_altivec(real *bandPtr,int channel,mpg123_handle *fr, int fin real *b0, **buf; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -653,19 +653,19 @@ int synth_1to1_real_altivec(real *bandPtr,int channel,mpg123_handle *fr, int fin return 0; } -int synth_1to1_real_stereo_altivec(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr) +int synth_1to1_fltst_altivec(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr) { real *samples = (real *) (fr->buffer.data+fr->buffer.fill); real *b0l, *b0r, **bufl, **bufr; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; @@ -772,9 +772,9 @@ int synth_1to1_s32_altivec(real *bandPtr,int channel,mpg123_handle *fr, int fina real *b0, **buf; int clip; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -914,13 +914,13 @@ int synth_1to1_s32_stereo_altivec(real *bandPtr_l, real *bandPtr_r, mpg123_handl real *b0l, *b0r, **bufl, **bufr; int clip; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; diff --git a/deps/mpg123/src/libmpg123/synth_arm.S b/deps/mpg123/src/libmpg123/synth_arm.S index e6d9e2e..c5ea88c 100644 --- a/deps/mpg123/src/libmpg123/synth_arm.S +++ b/deps/mpg123/src/libmpg123/synth_arm.S @@ -19,9 +19,14 @@ return value: number of clipped samples */ + .code 32 + .text ALIGN4 .globl ASM_NAME(synth_1to1_arm_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_arm_asm), %function +#endif ASM_NAME(synth_1to1_arm_asm): stmfd sp!, {r4, r5, r6, r7, r8, r9, r10, lr} @@ -35,7 +40,7 @@ ASM_NAME(synth_1to1_arm_asm): ldr r5, [WINDOW], #4 ldr r6, [B0], #4 -.Loop_start_1: +1: ldr r8, [WINDOW], #4 ldr r9, [B0], #4 mul r7, r5, r6 @@ -98,7 +103,7 @@ ASM_NAME(synth_1to1_arm_asm): strh r7, [SAMPLES], #4 subs r3, r3, #1 - bne .Loop_start_1 + bne 1b add WINDOW, WINDOW, #4 add B0, B0, #4 @@ -142,7 +147,7 @@ ASM_NAME(synth_1to1_arm_asm): mov r3, #14 -.Loop_start_2: +1: ldr r8, [WINDOW], #4 ldr r9, [B0], #4 mul r7, r5, r6 @@ -205,7 +210,7 @@ ASM_NAME(synth_1to1_arm_asm): strh r7, [SAMPLES], #4 subs r3, r3, #1 - bne .Loop_start_2 + bne 1b ldr r8, [WINDOW], #4 ldr r9, [B0], #4 @@ -269,3 +274,5 @@ ASM_NAME(synth_1to1_arm_asm): mov r0, REG_CLIP ldmfd sp!, {r4, r5, r6, r7, r8, r9, r10, pc} + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_arm_accurate.S b/deps/mpg123/src/libmpg123/synth_arm_accurate.S index 073f778..481aa1b 100644 --- a/deps/mpg123/src/libmpg123/synth_arm_accurate.S +++ b/deps/mpg123/src/libmpg123/synth_arm_accurate.S @@ -19,9 +19,14 @@ return value: number of clipped samples */ + .code 32 + .text ALIGN4 .globl ASM_NAME(synth_1to1_arm_accurate_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_arm_accurate_asm), %function +#endif ASM_NAME(synth_1to1_arm_accurate_asm): stmfd sp!, {r4, r5, r6, r7, r8, r9, r10, r11, lr} @@ -35,7 +40,7 @@ ASM_NAME(synth_1to1_arm_accurate_asm): ldr r5, [WINDOW], #4 ldr r6, [B0], #4 -.Loop_start_1: +1: ldr r9, [WINDOW], #4 ldr r10, [B0], #4 smull r8, r7, r5, r6 @@ -102,7 +107,7 @@ ASM_NAME(synth_1to1_arm_accurate_asm): strh r8, [SAMPLES], #4 subs r3, r3, #1 - bne .Loop_start_1 + bne 1b add WINDOW, WINDOW, #4 add B0, B0, #4 @@ -150,7 +155,7 @@ ASM_NAME(synth_1to1_arm_accurate_asm): mov r3, #14 -.Loop_start_2: +1: ldr r9, [WINDOW], #4 ldr r10, [B0], #4 smull r8, r7, r5, r6 @@ -217,7 +222,7 @@ ASM_NAME(synth_1to1_arm_accurate_asm): strh r8, [SAMPLES], #4 subs r3, r3, #1 - bne .Loop_start_2 + bne 1b ldr r9, [WINDOW], #4 ldr r10, [B0], #4 @@ -285,3 +290,5 @@ ASM_NAME(synth_1to1_arm_accurate_asm): mov r0, REG_CLIP ldmfd sp!, {r4, r5, r6, r7, r8, r9, r10, r11, pc} + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_i586.S b/deps/mpg123/src/libmpg123/synth_i586.S index 4f125f0..ad3fc4f 100644 --- a/deps/mpg123/src/libmpg123/synth_i586.S +++ b/deps/mpg123/src/libmpg123/synth_i586.S @@ -96,7 +96,7 @@ ASM_NAME(synth_1to1_i586_asm): leal (%ecx,%ebp,4),%eax .L74: pushl %eax - call ASM_NAME(dct64_i386) + call FUNC(dct64_i386) addl $12,%esp /* stack now back on track */ movl 16(%esp),%edx @@ -333,4 +333,11 @@ ASM_NAME(synth_1to1_i586_asm): addl $12,%esp ret +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 +L_dct64_i386: + .indirect_symbol ASM_NAME(dct64_i386) + hlt ; hlt ; hlt ; hlt ; hlt +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_i586_dither.S b/deps/mpg123/src/libmpg123/synth_i586_dither.S index 831e604..c8c69ab 100644 --- a/deps/mpg123/src/libmpg123/synth_i586_dither.S +++ b/deps/mpg123/src/libmpg123/synth_i586_dither.S @@ -98,7 +98,7 @@ ASM_NAME(synth_1to1_i586_asm_dither): leal (%ecx,%ebp,4),%eax .L74: pushl %eax - call ASM_NAME(dct64_i386) + call FUNC(dct64_i386) addl $12,%esp /* Now removed the parameters. stack: 0(%esp)=%ebx 4=esi 8=edi 12=ebp 16,20,24,28=local 32=back 36=bandptr 40=channel 44=out 48=buffs 52=bo 56=decwin 60=dithernoise */ @@ -372,4 +372,11 @@ ASM_NAME(synth_1to1_i586_asm_dither): /* The stack must be now: 0=back 4=bandptr 8=channel 12=out 16=buffs 20=bo */ ret +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 +L_dct64_i386: + .indirect_symbol ASM_NAME(dct64_i386) + hlt ; hlt ; hlt ; hlt ; hlt +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_mmx.S b/deps/mpg123/src/libmpg123/synth_mmx.S index fda4464..e57e4f0 100644 --- a/deps/mpg123/src/libmpg123/synth_mmx.S +++ b/deps/mpg123/src/libmpg123/synth_mmx.S @@ -1,14 +1,23 @@ -/* - decode_MMX.s: MMX optimized synth + /* + synth_mmx: MMX optimized synth copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by the mysterious higway (apparently) - Thomas' words about a note: - Initially, I found the note "this code comes under GPL" in this file. - After asking Michael about legal status of the MMX files, he said that he got them without any comment and thus I believe that the GPL comment was made by Michael, since he made mpg123 GPL at some time - and marked some files that way, but not all. - Based on that thought, I now consider this file along with the other parts of higway's MMX optimization to be licensed under LGPL 2.1 by Michael's decision. + Thomas' notes about the LGPL transition: + + Initially, I found the note "this code comes under GPL" in this file. + After asking Michael Hipp about legal status of the MMX files, he said + that he received them without any comment and thus I believe that the GPL + comment was made by Michael, since he made mpg123 GPL at some time - and + marked some files that way, but not all. The contributer accepted the + license terms of mpg123 back then, which included Michael deciding on + license issues. + + Based on that thought, I now consider this file along with the other parts + of higway's MMX optimisation to be licensed under LGPL 2.1 by Michael's + decision. */ #include "mangle.h" @@ -31,12 +40,12 @@ ASM_NAME(synth_1to1_MMX): decl %ecx movl 32(%esp),%esi movl (%edx),%eax - jecxz .L1 + jecxz 1f decl %eax andl %ebx,%eax leal 1088(%esi),%esi movl %eax,(%edx) -.L1: +1: leal (%esi,%eax,2),%edx movl %eax,%ebp incl %eax @@ -45,14 +54,14 @@ ASM_NAME(synth_1to1_MMX): leal 544(%esi,%eax,2),%ecx incl %ebx testl $1, %eax - jnz .L2 + jnz 2f xchgl %edx,%ecx incl %ebp leal 544(%esi),%esi -.L2: +2: pushl %edx pushl %ecx - call ASM_NAME(dct64_MMX) + call FUNC(dct64_MMX) addl $12,%esp /* stack like before, pushed 3, incremented again */ leal 1(%ebx), %ecx @@ -61,7 +70,7 @@ ASM_NAME(synth_1to1_MMX): movl 44(%esp),%eax /* decwins */ leal (%eax,%ebx,2), %edx popl %eax -.L3: +3: movq (%edx),%mm0 pmaddwd (%esi),%mm0 movq 8(%edx),%mm1 @@ -84,12 +93,12 @@ ASM_NAME(synth_1to1_MMX): leal 32(%esi),%esi leal 64(%edx),%edx leal 4(%edi),%edi - loop .L3 + loop 3b subl $64,%esi movl $15,%ecx -.L4: +4: movq (%edx),%mm0 pmaddwd (%esi),%mm0 movq 8(%edx),%mm1 @@ -114,7 +123,7 @@ ASM_NAME(synth_1to1_MMX): subl $32,%esi addl $64,%edx leal 4(%edi),%edi - loop .L4 + loop 4b emms popl %ebx popl %esi @@ -122,4 +131,11 @@ ASM_NAME(synth_1to1_MMX): popl %ebp ret +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 +L_dct64_MMX: + .indirect_symbol ASM_NAME(dct64_MMX) + hlt ; hlt ; hlt ; hlt ; hlt +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_neon.S b/deps/mpg123/src/libmpg123/synth_neon.S index 604e866..eace315 100644 --- a/deps/mpg123/src/libmpg123/synth_neon.S +++ b/deps/mpg123/src/libmpg123/synth_neon.S @@ -17,8 +17,18 @@ return value: number of clipped samples */ +#ifndef _M_ARM + .code 32 +#endif +#ifndef __APPLE__ + .fpu neon +#endif + .text - .globl ASM_NAME(synth_1to1_neon_asm) + GLOBAL_SYMBOL ASM_NAME(synth_1to1_neon_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_neon_asm), %function +#endif ALIGN4 ASM_NAME(synth_1to1_neon_asm): push {r4-r5, lr} @@ -29,7 +39,7 @@ ASM_NAME(synth_1to1_neon_asm): mov r3, #4 mov r4, #64 -.Loop_start_1: +1: vld1.16 {d0-d3}, [WINDOW], r4 vld1.16 {d4-d7}, [B0, :128]! vld1.16 {d8-d11}, [WINDOW], r4 @@ -66,15 +76,15 @@ ASM_NAME(synth_1to1_neon_asm): vpadd.i32 d1, d16, d24 vld2.16 {d2,d3}, [SAMPLES] - vqshrn.s32 d1, q0, #13 + vqrshrn.s32 d1, q0, #13 vst2.16 {d1,d3}, [SAMPLES]! subs r3, r3, #1 - bne .Loop_start_1 + bne 1b mov r3, #4 mov r5, #-32 -.Loop_start_2: +1: vld1.16 {d0-d3}, [WINDOW], r4 vld1.16 {d4-d7}, [B0, :128], r5 vld1.16 {d8-d11}, [WINDOW], r4 @@ -111,13 +121,15 @@ ASM_NAME(synth_1to1_neon_asm): vpadd.i32 d1, d16, d24 vld2.16 {d2,d3}, [SAMPLES] - vqshrn.s32 d1, q0, #13 + vqrshrn.s32 d1, q0, #13 vst2.16 {d1,d3}, [SAMPLES]! subs r3, r3, #1 - bne .Loop_start_2 + bne 1b mov r0, #0 vpop {q4-q7} pop {r4-r5, pc} + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_neon64.S b/deps/mpg123/src/libmpg123/synth_neon64.S new file mode 100644 index 0000000..68d43a5 --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_neon64.S @@ -0,0 +1,127 @@ +/* + synth_neon64: NEON optimized synth for AArch64 + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +maxmin_s16: + .word 32767 + .word -32768 + .text + ALIGN4 + .globl ASM_NAME(synth_1to1_neon64_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_neon64_asm), %function +#endif +ASM_NAME(synth_1to1_neon64_asm): + add x0, x0, #32 + sub x0, x0, x3, lsl #1 + eor v31.16b, v31.16b, v31.16b + adrp x5, AARCH64_PCREL_HI(maxmin_s16) + add x5, x5, AARCH64_PCREL_LO(maxmin_s16) + ld2r {v28.4s,v29.4s}, [x5] + + mov w4, #4 + mov x5, #64 +1: + ld1 {v0.8h,v1.8h}, [x0], x5 + ld1 {v2.8h,v3.8h}, [x0], x5 + ld1 {v4.8h,v5.8h}, [x0], x5 + ld1 {v6.8h,v7.8h}, [x0], x5 + ld1 {v16.8h,v17.8h,v18.8h,v19.8h}, [x1], #64 + ld1 {v20.8h,v21.8h,v22.8h,v23.8h}, [x1], #64 + + smull v24.4s, v0.4h, v16.4h + smull v25.4s, v2.4h, v18.4h + smull v26.4s, v4.4h, v20.4h + smull v27.4s, v6.4h, v22.4h + smlal2 v24.4s, v0.8h, v16.8h + smlal2 v25.4s, v2.8h, v18.8h + smlal2 v26.4s, v4.8h, v20.8h + smlal2 v27.4s, v6.8h, v22.8h + smlal v24.4s, v1.4h, v17.4h + smlal v25.4s, v3.4h, v19.4h + smlal v26.4s, v5.4h, v21.4h + smlal v27.4s, v7.4h, v23.4h + smlal2 v24.4s, v1.8h, v17.8h + smlal2 v25.4s, v3.8h, v19.8h + smlal2 v26.4s, v5.8h, v21.8h + smlal2 v27.4s, v7.8h, v23.8h + + addp v0.4s, v24.4s, v25.4s + addp v1.4s, v26.4s, v27.4s + addp v0.4s, v0.4s, v1.4s + ld2 {v4.4h,v5.4h}, [x2] + sqrshrn v4.4h, v0.4s, #13 + cmgt v2.4s, v0.4s, v28.4s + cmgt v3.4s, v29.4s, v0.4s + add v2.4s, v2.4s, v3.4s + add v31.4s, v31.4s, v2.4s + st2 {v4.4h,v5.4h}, [x2], #16 + + subs w4, w4, #1 + b.ne 1b + + mov w4, #4 + mov x6, #-32 +2: + ld1 {v0.8h,v1.8h}, [x0], x5 + ld1 {v2.8h,v3.8h}, [x0], x5 + ld1 {v4.8h,v5.8h}, [x0], x5 + ld1 {v6.8h,v7.8h}, [x0], x5 + ld1 {v16.8h,v17.8h}, [x1], x6 + ld1 {v18.8h,v19.8h}, [x1], x6 + ld1 {v20.8h,v21.8h}, [x1], x6 + ld1 {v22.8h,v23.8h}, [x1], x6 + + smull v24.4s, v0.4h, v16.4h + smull v25.4s, v2.4h, v18.4h + smull v26.4s, v4.4h, v20.4h + smull v27.4s, v6.4h, v22.4h + smlal2 v24.4s, v0.8h, v16.8h + smlal2 v25.4s, v2.8h, v18.8h + smlal2 v26.4s, v4.8h, v20.8h + smlal2 v27.4s, v6.8h, v22.8h + smlal v24.4s, v1.4h, v17.4h + smlal v25.4s, v3.4h, v19.4h + smlal v26.4s, v5.4h, v21.4h + smlal v27.4s, v7.4h, v23.4h + smlal2 v24.4s, v1.8h, v17.8h + smlal2 v25.4s, v3.8h, v19.8h + smlal2 v26.4s, v5.8h, v21.8h + smlal2 v27.4s, v7.8h, v23.8h + + addp v0.4s, v24.4s, v25.4s + addp v1.4s, v26.4s, v27.4s + addp v0.4s, v0.4s, v1.4s + ld2 {v4.4h,v5.4h}, [x2] + sqrshrn v4.4h, v0.4s, #13 + cmgt v2.4s, v0.4s, v28.4s + cmgt v3.4s, v29.4s, v0.4s + add v2.4s, v2.4s, v3.4s + add v31.4s, v31.4s, v2.4s + st2 {v4.4h,v5.4h}, [x2], #16 + + subs w4, w4, #1 + b.ne 2b + + AARCH64_DUP_2D(v0, v31, 1) + add v0.4s, v0.4s, v31.4s + AARCH64_DUP_4S(v1, v0, 1) + add v0.4s, v0.4s, v1.4s + umov w0, v0.s[0] + neg w0, w0 + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_neon64_accurate.S b/deps/mpg123/src/libmpg123/synth_neon64_accurate.S new file mode 100644 index 0000000..3cbb317 --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_neon64_accurate.S @@ -0,0 +1,135 @@ +/* + synth_neon64_accurate: NEON optimized synth for AArch64 (MPEG compliant 16-bit output version) + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +maxmin_s16: + .word 1191181824 + .word -956301312 + .text + ALIGN4 + .globl ASM_NAME(synth_1to1_neon64_accurate_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_neon64_accurate_asm), %function +#endif +ASM_NAME(synth_1to1_neon64_accurate_asm): + add x0, x0, #64 + sub x0, x0, x3, lsl #2 + eor v31.16b, v31.16b, v31.16b + adrp x5, AARCH64_PCREL_HI(maxmin_s16) + add x5, x5, AARCH64_PCREL_LO(maxmin_s16) + ld2r {v28.4s,v29.4s}, [x5] + + mov w4, #4 + mov x5, #128 +1: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], #64 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v4.4s, v20.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v5.4s, v21.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v6.4s, v22.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v7.4s, v23.4s + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], #64 + + fmul v26.4s, v0.4s, v16.4s + fmul v27.4s, v4.4s, v20.4s + fmla v26.4s, v1.4s, v17.4s + fmla v27.4s, v5.4s, v21.4s + fmla v26.4s, v2.4s, v18.4s + fmla v27.4s, v6.4s, v22.4s + fmla v26.4s, v3.4s, v19.4s + fmla v27.4s, v7.4s, v23.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + ld2 {v4.4h,v5.4h}, [x2] + fcvtns v1.4s, v0.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + sqxtn v4.4h, v1.4s + add v2.4s, v2.4s, v3.4s + add v31.4s, v31.4s, v2.4s + st2 {v4.4h,v5.4h}, [x2], #16 + + subs w4, w4, #1 + b.ne 1b + + mov w4, #4 + mov x6, #-64 +2: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], x6 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v4.4s, v20.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v5.4s, v21.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v6.4s, v22.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v7.4s, v23.4s + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], x6 + + fmul v26.4s, v0.4s, v16.4s + fmul v27.4s, v4.4s, v20.4s + fmla v26.4s, v1.4s, v17.4s + fmla v27.4s, v5.4s, v21.4s + fmla v26.4s, v2.4s, v18.4s + fmla v27.4s, v6.4s, v22.4s + fmla v26.4s, v3.4s, v19.4s + fmla v27.4s, v7.4s, v23.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + ld2 {v4.4h,v5.4h}, [x2] + fcvtns v1.4s, v0.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + sqxtn v4.4h, v1.4s + add v2.4s, v2.4s, v3.4s + add v31.4s, v31.4s, v2.4s + st2 {v4.4h,v5.4h}, [x2], #16 + + subs w4, w4, #1 + b.ne 2b + + AARCH64_DUP_2D(v0, v31, 1) + add v0.4s, v0.4s, v31.4s + AARCH64_DUP_4S(v1, v0, 1) + add v0.4s, v0.4s, v1.4s + umov w0, v0.s[0] + neg w0, w0 + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_neon64_float.S b/deps/mpg123/src/libmpg123/synth_neon64_float.S new file mode 100644 index 0000000..0cedae3 --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_neon64_float.S @@ -0,0 +1,118 @@ +/* + synth_neon64_float: NEON optimized synth for AArch64 (float output version) + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +scale: + .word 939524096 + .text + ALIGN4 + .globl ASM_NAME(synth_1to1_real_neon64_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_real_neon64_asm), %function +#endif +ASM_NAME(synth_1to1_real_neon64_asm): + add x0, x0, #64 + sub x0, x0, x3, lsl #2 + adrp x5, AARCH64_PCREL_HI(scale) + add x5, x5, AARCH64_PCREL_LO(scale) + ld1r {v28.4s}, [x5] + + mov w4, #4 + mov x5, #128 +1: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], #64 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v4.4s, v20.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v5.4s, v21.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v6.4s, v22.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v7.4s, v23.4s + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], #64 + + fmul v26.4s, v0.4s, v16.4s + fmul v27.4s, v4.4s, v20.4s + fmla v26.4s, v1.4s, v17.4s + fmla v27.4s, v5.4s, v21.4s + fmla v26.4s, v2.4s, v18.4s + fmla v27.4s, v6.4s, v22.4s + fmla v26.4s, v3.4s, v19.4s + fmla v27.4s, v7.4s, v23.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + ld2 {v4.4s,v5.4s}, [x2] + fmul v4.4s, v0.4s, v28.4s + st2 {v4.4s,v5.4s}, [x2], #32 + + subs w4, w4, #1 + b.ne 1b + + mov w4, #4 + mov x6, #-64 +2: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], x6 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v4.4s, v20.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v5.4s, v21.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v6.4s, v22.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v7.4s, v23.4s + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], x6 + + fmul v26.4s, v0.4s, v16.4s + fmul v27.4s, v4.4s, v20.4s + fmla v26.4s, v1.4s, v17.4s + fmla v27.4s, v5.4s, v21.4s + fmla v26.4s, v2.4s, v18.4s + fmla v27.4s, v6.4s, v22.4s + fmla v26.4s, v3.4s, v19.4s + fmla v27.4s, v7.4s, v23.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + ld2 {v4.4s,v5.4s}, [x2] + fmul v4.4s, v0.4s, v28.4s + st2 {v4.4s,v5.4s}, [x2], #32 + + subs w4, w4, #1 + b.ne 2b + + eor w0, w0, w0 + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_neon64_s32.S b/deps/mpg123/src/libmpg123/synth_neon64_s32.S new file mode 100644 index 0000000..917c946 --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_neon64_s32.S @@ -0,0 +1,136 @@ +/* + synth_neon64_s32: NEON optimized synth for AArch64 (32-bit output version) + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +maxmin_s32: + .word 1191182335 + .word -956301312 + .word 1199570944 + .text + ALIGN4 + .globl ASM_NAME(synth_1to1_s32_neon64_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_s32_neon64_asm), %function +#endif +ASM_NAME(synth_1to1_s32_neon64_asm): + add x0, x0, #64 + sub x0, x0, x3, lsl #2 + eor v31.16b, v31.16b, v31.16b + adrp x5, AARCH64_PCREL_HI(maxmin_s32) + add x5, x5, AARCH64_PCREL_LO(maxmin_s32) + ld3r {v28.4s,v29.4s,v30.4s}, [x5] + + mov w4, #4 + mov x5, #128 +1: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], #64 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v4.4s, v20.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v5.4s, v21.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v6.4s, v22.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v7.4s, v23.4s + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], #64 + + fmul v26.4s, v0.4s, v16.4s + fmul v27.4s, v4.4s, v20.4s + fmla v26.4s, v1.4s, v17.4s + fmla v27.4s, v5.4s, v21.4s + fmla v26.4s, v2.4s, v18.4s + fmla v27.4s, v6.4s, v22.4s + fmla v26.4s, v3.4s, v19.4s + fmla v27.4s, v7.4s, v23.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fmul v1.4s, v0.4s, v30.4s + ld2 {v4.4s,v5.4s}, [x2] + fcvtns v4.4s, v1.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + add v2.4s, v2.4s, v3.4s + add v31.4s, v31.4s, v2.4s + st2 {v4.4s,v5.4s}, [x2], #32 + + subs w4, w4, #1 + b.ne 1b + + mov w4, #4 + mov x6, #-64 +2: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], x6 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v4.4s, v20.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v5.4s, v21.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v6.4s, v22.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v7.4s, v23.4s + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], x6 + + fmul v26.4s, v0.4s, v16.4s + fmul v27.4s, v4.4s, v20.4s + fmla v26.4s, v1.4s, v17.4s + fmla v27.4s, v5.4s, v21.4s + fmla v26.4s, v2.4s, v18.4s + fmla v27.4s, v6.4s, v22.4s + fmla v26.4s, v3.4s, v19.4s + fmla v27.4s, v7.4s, v23.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fmul v1.4s, v0.4s, v30.4s + ld2 {v4.4s,v5.4s}, [x2] + fcvtns v4.4s, v1.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + add v2.4s, v2.4s, v3.4s + add v31.4s, v31.4s, v2.4s + st2 {v4.4s,v5.4s}, [x2], #32 + + subs w4, w4, #1 + b.ne 2b + + AARCH64_DUP_2D(v0, v31, 1) + add v0.4s, v0.4s, v31.4s + AARCH64_DUP_4S(v1, v0, 1) + add v0.4s, v0.4s, v1.4s + umov w0, v0.s[0] + neg w0, w0 + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_neon_accurate.S b/deps/mpg123/src/libmpg123/synth_neon_accurate.S index 5fd3b55..501223f 100644 --- a/deps/mpg123/src/libmpg123/synth_neon_accurate.S +++ b/deps/mpg123/src/libmpg123/synth_neon_accurate.S @@ -17,8 +17,16 @@ return value: number of clipped samples (0) */ + .code 32 +#ifndef __APPLE__ + .fpu neon +#endif + .text .globl ASM_NAME(synth_1to1_neon_accurate_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_neon_accurate_asm), %function +#endif ASM_NAME(synth_1to1_neon_accurate_asm): push {r4-r6, lr} vpush {q4-q7} @@ -32,7 +40,7 @@ ASM_NAME(synth_1to1_neon_accurate_asm): mov r3, #4 mov r4, #128 mov r5, #64 -.Loop_start_1: +1: vld1.32 {q0,q1}, [WINDOW], r4 vld1.32 {q2,q3}, [WINDOW], r4 vld1.32 {q4,q5}, [WINDOW], r4 @@ -94,11 +102,11 @@ ASM_NAME(synth_1to1_neon_accurate_asm): vst1.32 {q5}, [sp, :128] subs r3, r3, #1 - bne .Loop_start_1 + bne 1b mov r3, #4 mov r5, #-64 -.Loop_start_2: +1: vld1.32 {q0,q1}, [WINDOW], r4 vld1.32 {q2,q3}, [WINDOW], r4 vld1.32 {q4,q5}, [WINDOW], r4 @@ -161,7 +169,7 @@ ASM_NAME(synth_1to1_neon_accurate_asm): vst1.32 {q5}, [sp, :128] subs r3, r3, #1 - bne .Loop_start_2 + bne 1b vld1.32 {q0}, [sp, :128] vpadd.i32 d0, d0, d1 @@ -171,3 +179,5 @@ ASM_NAME(synth_1to1_neon_accurate_asm): mov sp, r6 vpop {q4-q7} pop {r4-r6, pc} + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_neon_float.S b/deps/mpg123/src/libmpg123/synth_neon_float.S index 278246e..15ead4e 100644 --- a/deps/mpg123/src/libmpg123/synth_neon_float.S +++ b/deps/mpg123/src/libmpg123/synth_neon_float.S @@ -17,8 +17,18 @@ return value: number of clipped samples (0) */ +#ifndef _M_ARM + .code 32 +#endif +#ifndef __APPLE__ + .fpu neon +#endif + .text - .globl ASM_NAME(synth_1to1_real_neon_asm) + GLOBAL_SYMBOL ASM_NAME(synth_1to1_real_neon_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_real_neon_asm), %function +#endif ALIGN4 ASM_NAME(synth_1to1_real_neon_asm): push {r4-r5, lr} @@ -30,7 +40,7 @@ ASM_NAME(synth_1to1_real_neon_asm): mov r3, #4 mov r4, #128 mov r5, #64 -.Loop_start_1: +1: vld1.32 {q0,q1}, [WINDOW], r4 vld1.32 {q2,q3}, [WINDOW], r4 vld1.32 {q4,q5}, [WINDOW], r4 @@ -83,11 +93,11 @@ ASM_NAME(synth_1to1_real_neon_asm): vst2.32 {q4,q5}, [SAMPLES]! subs r3, r3, #1 - bne .Loop_start_1 + bne 1b mov r3, #4 mov r5, #-64 -.Loop_start_2: +1: vld1.32 {q0,q1}, [WINDOW], r4 vld1.32 {q2,q3}, [WINDOW], r4 vld1.32 {q4,q5}, [WINDOW], r4 @@ -141,9 +151,11 @@ ASM_NAME(synth_1to1_real_neon_asm): vst2.32 {q4,q5}, [SAMPLES]! subs r3, r3, #1 - bne .Loop_start_2 + bne 1b mov r0, #0 vpop {q4-q7} pop {r4-r5, pc} + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_neon_s32.S b/deps/mpg123/src/libmpg123/synth_neon_s32.S index a3e6ea9..7068baf 100644 --- a/deps/mpg123/src/libmpg123/synth_neon_s32.S +++ b/deps/mpg123/src/libmpg123/synth_neon_s32.S @@ -17,15 +17,27 @@ return value: number of clipped samples (0) */ +#ifndef _M_ARM + .code 32 +#endif +#ifndef __APPLE__ + .fpu neon +#endif + .text - .globl ASM_NAME(synth_1to1_s32_neon_asm) + GLOBAL_SYMBOL ASM_NAME(synth_1to1_s32_neon_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_s32_neon_asm), %function +#endif ALIGN4 ASM_NAME(synth_1to1_s32_neon_asm): push {r4-r6, lr} vpush {q4-q7} mov r6, sp sub sp, sp, #16 - bic sp, #0xff + mov r5, sp + and r5, r5, #0xf + sub sp, sp, r5 add WINDOW, WINDOW, #64 sub WINDOW, WINDOW, r3, lsl #2 @@ -33,7 +45,7 @@ ASM_NAME(synth_1to1_s32_neon_asm): mov r3, #4 mov r4, #128 mov r5, #64 -.Loop_start_1: +1: vld1.32 {q0,q1}, [WINDOW], r4 vld1.32 {q2,q3}, [WINDOW], r4 vld1.32 {q4,q5}, [WINDOW], r4 @@ -92,11 +104,11 @@ ASM_NAME(synth_1to1_s32_neon_asm): vst1.32 {q5}, [sp, :128] subs r3, r3, #1 - bne .Loop_start_1 + bne 1b mov r3, #4 mov r5, #-64 -.Loop_start_2: +1: vld1.32 {q0,q1}, [WINDOW], r4 vld1.32 {q2,q3}, [WINDOW], r4 vld1.32 {q4,q5}, [WINDOW], r4 @@ -156,7 +168,7 @@ ASM_NAME(synth_1to1_s32_neon_asm): vst1.32 {q5}, [sp, :128] subs r3, r3, #1 - bne .Loop_start_2 + bne 1b vld1.32 {q0}, [sp, :128] vpadd.i32 d0, d0, d1 @@ -166,3 +178,5 @@ ASM_NAME(synth_1to1_s32_neon_asm): mov sp, r6 vpop {q4-q7} pop {r4-r6, pc} + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_ntom.h b/deps/mpg123/src/libmpg123/synth_ntom.h index 6142778..4554d21 100644 --- a/deps/mpg123/src/libmpg123/synth_ntom.h +++ b/deps/mpg123/src/libmpg123/synth_ntom.h @@ -72,9 +72,9 @@ int SYNTH_NAME(real *bandPtr,int channel, mpg123_handle *fr, int final) int clip = 0; int bo1; int ntom; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; diff --git a/deps/mpg123/src/libmpg123/synth_real.c b/deps/mpg123/src/libmpg123/synth_real.c index 3d73bc1..fe8cf86 100644 --- a/deps/mpg123/src/libmpg123/synth_real.c +++ b/deps/mpg123/src/libmpg123/synth_real.c @@ -62,9 +62,9 @@ int synth_1to1_real_x86_64(real *bandPtr,int channel, mpg123_handle *fr, int fin real *b0, **buf; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -103,13 +103,13 @@ int synth_1to1_real_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handl real *b0l, *b0r, **bufl, **bufr; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; @@ -140,7 +140,99 @@ int synth_1to1_real_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handl } #endif -#ifdef OPT_SSE +#ifdef OPT_AVX +/* Assembler routines. */ +#ifndef OPT_X86_64 +int synth_1to1_real_x86_64_asm(real *window, real *b0, real *samples, int bo1); +#endif +int synth_1to1_real_s_avx_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); +void dct64_real_avx(real *out0, real *out1, real *samples); +/* Hull for C mpg123 API */ +int synth_1to1_real_avx(real *bandPtr,int channel, mpg123_handle *fr, int final) +{ + real *samples = (real *) (fr->buffer.data+fr->buffer.fill); + + real *b0, **buf; + int bo1; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); +#endif + if(!channel) + { + fr->bo--; + fr->bo &= 0xf; + buf = fr->real_buffs[0]; + } + else + { + samples++; + buf = fr->real_buffs[1]; + } + + if(fr->bo & 0x1) + { + b0 = buf[0]; + bo1 = fr->bo; + dct64_real_avx(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr); + } + else + { + b0 = buf[1]; + bo1 = fr->bo+1; + dct64_real_avx(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr); + } + + synth_1to1_real_x86_64_asm(fr->decwin, b0, samples, bo1); + + if(final) fr->buffer.fill += 256; + + return 0; +} + +int synth_1to1_fltst_avx(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr) +{ + real *samples = (real *) (fr->buffer.data+fr->buffer.fill); + + real *b0l, *b0r, **bufl, **bufr; + int bo1; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) + { + do_equalizer(bandPtr_l,0,fr->equalizer); + do_equalizer(bandPtr_r,1,fr->equalizer); + } +#endif + fr->bo--; + fr->bo &= 0xf; + bufl = fr->real_buffs[0]; + bufr = fr->real_buffs[1]; + + if(fr->bo & 0x1) + { + b0l = bufl[0]; + b0r = bufr[0]; + bo1 = fr->bo; + dct64_real_avx(bufl[1]+((fr->bo+1)&0xf),bufl[0]+fr->bo,bandPtr_l); + dct64_real_avx(bufr[1]+((fr->bo+1)&0xf),bufr[0]+fr->bo,bandPtr_r); + } + else + { + b0l = bufl[1]; + b0r = bufr[1]; + bo1 = fr->bo+1; + dct64_real_avx(bufl[0]+fr->bo,bufl[1]+fr->bo+1,bandPtr_l); + dct64_real_avx(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); + } + + synth_1to1_real_s_avx_asm(fr->decwin, b0l, b0r, samples, bo1); + + fr->buffer.fill += 256; + + return 0; +} +#endif + +#if defined(OPT_SSE) || defined(OPT_SSE_VINTAGE) /* Assembler routines. */ int synth_1to1_real_sse_asm(real *window, real *b0, real *samples, int bo1); int synth_1to1_real_s_sse_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); @@ -152,9 +244,9 @@ int synth_1to1_real_sse(real *bandPtr,int channel, mpg123_handle *fr, int final) real *b0, **buf; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -193,13 +285,13 @@ int synth_1to1_real_stereo_sse(real *bandPtr_l, real *bandPtr_r, mpg123_handle * real *b0l, *b0r, **bufl, **bufr; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; @@ -242,9 +334,9 @@ int synth_1to1_real_neon(real *bandPtr,int channel, mpg123_handle *fr, int final real *b0, **buf; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -282,13 +374,13 @@ int synth_1to1_real_stereo_neon(real *bandPtr_l, real *bandPtr_r, mpg123_handle real *b0l, *b0r, **bufl, **bufr; int bo1; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; @@ -319,6 +411,95 @@ int synth_1to1_real_stereo_neon(real *bandPtr_l, real *bandPtr_r, mpg123_handle } #endif +#ifdef OPT_NEON64 +/* Assembler routines. */ +int synth_1to1_real_neon64_asm(real *window, real *b0, real *samples, int bo1); +int synth_1to1_real_s_neon64_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); +void dct64_real_neon64(real *out0, real *out1, real *samples); +/* Hull for C mpg123 API */ +int synth_1to1_real_neon64(real *bandPtr,int channel, mpg123_handle *fr, int final) +{ + real *samples = (real *) (fr->buffer.data+fr->buffer.fill); + + real *b0, **buf; + int bo1; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); +#endif + if(!channel) + { + fr->bo--; + fr->bo &= 0xf; + buf = fr->real_buffs[0]; + } + else + { + samples++; + buf = fr->real_buffs[1]; + } + + if(fr->bo & 0x1) + { + b0 = buf[0]; + bo1 = fr->bo; + dct64_real_neon64(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr); + } + else + { + b0 = buf[1]; + bo1 = fr->bo+1; + dct64_real_neon64(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr); + } + + synth_1to1_real_neon64_asm(fr->decwin, b0, samples, bo1); + + if(final) fr->buffer.fill += 256; + + return 0; +} +int synth_1to1_fltst_neon64(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr) +{ + real *samples = (real *) (fr->buffer.data+fr->buffer.fill); + + real *b0l, *b0r, **bufl, **bufr; + int bo1; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) + { + do_equalizer(bandPtr_l,0,fr->equalizer); + do_equalizer(bandPtr_r,1,fr->equalizer); + } +#endif + fr->bo--; + fr->bo &= 0xf; + bufl = fr->real_buffs[0]; + bufr = fr->real_buffs[1]; + + if(fr->bo & 0x1) + { + b0l = bufl[0]; + b0r = bufr[0]; + bo1 = fr->bo; + dct64_real_neon64(bufl[1]+((fr->bo+1)&0xf),bufl[0]+fr->bo,bandPtr_l); + dct64_real_neon64(bufr[1]+((fr->bo+1)&0xf),bufr[0]+fr->bo,bandPtr_r); + } + else + { + b0l = bufl[1]; + b0r = bufr[1]; + bo1 = fr->bo+1; + dct64_real_neon64(bufl[0]+fr->bo,bufl[1]+fr->bo+1,bandPtr_l); + dct64_real_neon64(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); + } + + synth_1to1_real_s_neon64_asm(fr->decwin, b0l, b0r, samples, bo1); + + fr->buffer.fill += 256; + + return 0; +} +#endif + #ifndef NO_DOWNSAMPLE /* diff --git a/deps/mpg123/src/libmpg123/synth_s32.c b/deps/mpg123/src/libmpg123/synth_s32.c index 93f4105..b44d8e1 100644 --- a/deps/mpg123/src/libmpg123/synth_s32.c +++ b/deps/mpg123/src/libmpg123/synth_s32.c @@ -59,9 +59,9 @@ int synth_1to1_s32_x86_64(real *bandPtr,int channel, mpg123_handle *fr, int fina real *b0, **buf; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -102,13 +102,13 @@ int synth_1to1_s32_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handle real *b0l, *b0r, **bufl, **bufr; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; @@ -139,7 +139,102 @@ int synth_1to1_s32_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handle } #endif -#ifdef OPT_SSE +#ifdef OPT_AVX +/* Assembler routines. */ +#ifndef OPT_x86_64 +int synth_1to1_s32_x86_64_asm(real *window, real *b0, int32_t *samples, int bo1); +#endif +int synth_1to1_s32_s_avx_asm(real *window, real *b0l, real *b0r, int32_t *samples, int bo1); +void dct64_real_avx(real *out0, real *out1, real *samples); +/* Hull for C mpg123 API */ +int synth_1to1_s32_avx(real *bandPtr,int channel, mpg123_handle *fr, int final) +{ + int32_t *samples = (int32_t *) (fr->buffer.data+fr->buffer.fill); + + real *b0, **buf; + int bo1; + int clip; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); +#endif + if(!channel) + { + fr->bo--; + fr->bo &= 0xf; + buf = fr->real_buffs[0]; + } + else + { + samples++; + buf = fr->real_buffs[1]; + } + + if(fr->bo & 0x1) + { + b0 = buf[0]; + bo1 = fr->bo; + dct64_real_avx(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr); + } + else + { + b0 = buf[1]; + bo1 = fr->bo+1; + dct64_real_avx(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr); + } + + clip = synth_1to1_s32_x86_64_asm(fr->decwin, b0, samples, bo1); + + if(final) fr->buffer.fill += 256; + + return clip; +} + + +int synth_1to1_s32_stereo_avx(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr) +{ + int32_t *samples = (int32_t *) (fr->buffer.data+fr->buffer.fill); + + real *b0l, *b0r, **bufl, **bufr; + int bo1; + int clip; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) + { + do_equalizer(bandPtr_l,0,fr->equalizer); + do_equalizer(bandPtr_r,1,fr->equalizer); + } +#endif + fr->bo--; + fr->bo &= 0xf; + bufl = fr->real_buffs[0]; + bufr = fr->real_buffs[1]; + + if(fr->bo & 0x1) + { + b0l = bufl[0]; + b0r = bufr[0]; + bo1 = fr->bo; + dct64_real_avx(bufl[1]+((fr->bo+1)&0xf),bufl[0]+fr->bo,bandPtr_l); + dct64_real_avx(bufr[1]+((fr->bo+1)&0xf),bufr[0]+fr->bo,bandPtr_r); + } + else + { + b0l = bufl[1]; + b0r = bufr[1]; + bo1 = fr->bo+1; + dct64_real_avx(bufl[0]+fr->bo,bufl[1]+fr->bo+1,bandPtr_l); + dct64_real_avx(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); + } + + clip = synth_1to1_s32_s_avx_asm(fr->decwin, b0l, b0r, samples, bo1); + + fr->buffer.fill += 256; + + return clip; +} +#endif + +#if defined(OPT_SSE) || defined(OPT_SSE_VINTAGE) /* Assembler routines. */ int synth_1to1_s32_sse_asm(real *window, real *b0, int32_t *samples, int bo1); int synth_1to1_s32_s_sse_asm(real *window, real *b0l, real *b0r, int32_t *samples, int bo1); @@ -152,9 +247,9 @@ int synth_1to1_s32_sse(real *bandPtr,int channel, mpg123_handle *fr, int final) real *b0, **buf; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -195,13 +290,13 @@ int synth_1to1_s32_stereo_sse(real *bandPtr_l, real *bandPtr_r, mpg123_handle *f real *b0l, *b0r, **bufl, **bufr; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; @@ -245,9 +340,9 @@ int synth_1to1_s32_neon(real *bandPtr,int channel, mpg123_handle *fr, int final) real *b0, **buf; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); - +#endif if(!channel) { fr->bo--; @@ -287,13 +382,13 @@ int synth_1to1_s32_stereo_neon(real *bandPtr_l, real *bandPtr_r, mpg123_handle * real *b0l, *b0r, **bufl, **bufr; int bo1; int clip; - +#ifndef NO_EQUALIZER if(fr->have_eq_settings) { do_equalizer(bandPtr_l,0,fr->equalizer); do_equalizer(bandPtr_r,1,fr->equalizer); } - +#endif fr->bo--; fr->bo &= 0xf; bufl = fr->real_buffs[0]; @@ -324,6 +419,98 @@ int synth_1to1_s32_stereo_neon(real *bandPtr_l, real *bandPtr_r, mpg123_handle * } #endif +#ifdef OPT_NEON64 +/* Assembler routines. */ +int synth_1to1_s32_neon64_asm(real *window, real *b0, int32_t *samples, int bo1); +int synth_1to1_s32_s_neon64_asm(real *window, real *b0l, real *b0r, int32_t *samples, int bo1); +void dct64_real_neon64(real *out0, real *out1, real *samples); +/* Hull for C mpg123 API */ +int synth_1to1_s32_neon64(real *bandPtr,int channel, mpg123_handle *fr, int final) +{ + int32_t *samples = (int32_t *) (fr->buffer.data+fr->buffer.fill); + + real *b0, **buf; + int bo1; + int clip; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer); +#endif + if(!channel) + { + fr->bo--; + fr->bo &= 0xf; + buf = fr->real_buffs[0]; + } + else + { + samples++; + buf = fr->real_buffs[1]; + } + + if(fr->bo & 0x1) + { + b0 = buf[0]; + bo1 = fr->bo; + dct64_real_neon64(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr); + } + else + { + b0 = buf[1]; + bo1 = fr->bo+1; + dct64_real_neon64(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr); + } + + clip = synth_1to1_s32_neon64_asm(fr->decwin, b0, samples, bo1); + + if(final) fr->buffer.fill += 256; + + return clip; +} + +int synth_1to1_s32st_neon64(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr) +{ + int32_t *samples = (int32_t *) (fr->buffer.data+fr->buffer.fill); + + real *b0l, *b0r, **bufl, **bufr; + int bo1; + int clip; +#ifndef NO_EQUALIZER + if(fr->have_eq_settings) + { + do_equalizer(bandPtr_l,0,fr->equalizer); + do_equalizer(bandPtr_r,1,fr->equalizer); + } +#endif + fr->bo--; + fr->bo &= 0xf; + bufl = fr->real_buffs[0]; + bufr = fr->real_buffs[1]; + + if(fr->bo & 0x1) + { + b0l = bufl[0]; + b0r = bufr[0]; + bo1 = fr->bo; + dct64_real_neon64(bufl[1]+((fr->bo+1)&0xf),bufl[0]+fr->bo,bandPtr_l); + dct64_real_neon64(bufr[1]+((fr->bo+1)&0xf),bufr[0]+fr->bo,bandPtr_r); + } + else + { + b0l = bufl[1]; + b0r = bufr[1]; + bo1 = fr->bo+1; + dct64_real_neon64(bufl[0]+fr->bo,bufl[1]+fr->bo+1,bandPtr_l); + dct64_real_neon64(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); + } + + clip = synth_1to1_s32_s_neon64_asm(fr->decwin, b0l, b0r, samples, bo1); + + fr->buffer.fill += 256; + + return clip; +} +#endif + #undef BLOCK #ifndef NO_DOWNSAMPLE diff --git a/deps/mpg123/src/libmpg123/synth_sse.S b/deps/mpg123/src/libmpg123/synth_sse.S index a438413..d01178b 100644 --- a/deps/mpg123/src/libmpg123/synth_sse.S +++ b/deps/mpg123/src/libmpg123/synth_sse.S @@ -1,6 +1,13 @@ #include "mangle.h" -#define MPL_DCT64 ASM_NAME(dct64_sse) +#define MPL_DCT64 FUNC(dct64_sse) #define SYNTH_NAME ASM_NAME(synth_1to1_sse_asm) #include "synth_sse3d.h" +#if defined(PIC) && defined(__APPLE__) + .section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 +L_dct64_sse: + .indirect_symbol ASM_NAME(dct64_sse) + hlt ; hlt ; hlt ; hlt ; hlt +#endif + NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_sse3d.h b/deps/mpg123/src/libmpg123/synth_sse3d.h index 47a1ba9..5ebbd94 100644 --- a/deps/mpg123/src/libmpg123/synth_sse3d.h +++ b/deps/mpg123/src/libmpg123/synth_sse3d.h @@ -15,11 +15,12 @@ That's not memory efficient since there's doubled code, but it's easier than giving another function pointer. Maybe I'll change it in future, but now I need something that works. - Original comment from MPlayer source follows: + Original comment from MPlayer source follows. Regarding the license history see + synth_mmx.S, which the original comment about this being licensed under GPL is + relating to. */ /* - * this code comes under GPL * This code was taken from http://www.mpg123.org * See ChangeLog of mpg123-0.59s-pre.1 for detail * Applied to mplayer by Nick Kurshev @@ -48,11 +49,25 @@ pushl %ebp /* stack:0=ebp 4=back 8=bandptr 12=channel 16=samples 20=buffs 24=bo 28=decwins */ movl %esp, %ebp + /* Now the old stack addresses are preserved via %epb. */ +#ifdef PIC + subl $8,%esp /* What has been called temp before. */ +#else subl $4,%esp /* What has been called temp before. */ +#endif pushl %edi pushl %esi pushl %ebx + +#ifdef PIC + #undef _EBX_ + #define _EBX_ %eax + GET_GOT +#define EBXSAVE -4(%ebp) + movl _EBX_, EBXSAVE /* save PIC register */ +#endif + #define TEMP 12(%esp) /* APP */ movl 12(%ebp),%ecx @@ -63,12 +78,12 @@ decl %ecx movl 20(%ebp),%esi movl (%edx),%eax - jecxz .L01 + jecxz 1f decl %eax andl %ebx,%eax leal 1088(%esi),%esi movl %eax,(%edx) - .L01: +1: leal (%esi,%eax,2),%edx movl %eax,TEMP incl %eax @@ -76,11 +91,11 @@ leal 544(%esi,%eax,2),%ecx incl %ebx testl $1, %eax - jnz .L02 + jnz 2f xchgl %edx,%ecx incl TEMP leal 544(%esi),%esi - .L02: +2: pushl 8(%ebp) pushl %edx pushl %ecx @@ -94,8 +109,11 @@ leal (%ecx,%ebx,2), %edx movl (%esp),%ecx /* restore, but leave value on stack */ shrl $1, %ecx +#ifdef PIC + movl EBXSAVE, _EBX_ +#endif ALIGN16 - .L03: +3: movq (%edx),%mm0 movq 64(%edx),%mm4 pmaddwd (%esi),%mm0 @@ -130,18 +148,18 @@ packssdw %mm4,%mm4 movq (%edi), %mm1 punpckldq %mm4, %mm0 - pand one_null, %mm1 - pand null_one, %mm0 + pand LOCAL_VAR(one_null), %mm1 + pand LOCAL_VAR(null_one), %mm0 por %mm0, %mm1 movq %mm1,(%edi) leal 64(%esi),%esi leal 128(%edx),%edx leal 8(%edi),%edi decl %ecx - jnz .L03 + jnz 3b popl %ecx andl $1, %ecx - jecxz .next_loop + jecxz 4f movq (%edx),%mm0 pmaddwd (%esi),%mm0 movq 8(%edx),%mm1 @@ -163,11 +181,15 @@ leal 32(%esi),%esi leal 64(%edx),%edx leal 4(%edi),%edi - .next_loop: +4: subl $64,%esi movl $7,%ecx + +#ifdef PIC + movl EBXSAVE, _EBX_ +#endif ALIGN16 - .L04: +5: movq (%edx),%mm0 movq 64(%edx),%mm4 pmaddwd (%esi),%mm0 @@ -206,15 +228,15 @@ psubsw %mm5,%mm4 movq (%edi), %mm1 punpckldq %mm4, %mm0 - pand one_null, %mm1 - pand null_one, %mm0 + pand LOCAL_VAR(one_null), %mm1 + pand LOCAL_VAR(null_one), %mm0 por %mm0, %mm1 movq %mm1,(%edi) subl $64,%esi addl $128,%edx leal 8(%edi),%edi decl %ecx - jnz .L04 + jnz 5b movq (%edx),%mm0 pmaddwd (%esi),%mm0 movq 8(%edx),%mm1 @@ -241,6 +263,6 @@ popl %ebx popl %esi popl %edi - addl $4,%esp + mov %ebp, %esp popl %ebp ret diff --git a/deps/mpg123/src/libmpg123/synth_sse_accurate.S b/deps/mpg123/src/libmpg123/synth_sse_accurate.S index 43ad9b9..7906b93 100644 --- a/deps/mpg123/src/libmpg123/synth_sse_accurate.S +++ b/deps/mpg123/src/libmpg123/synth_sse_accurate.S @@ -28,7 +28,7 @@ .data #endif ALIGN32 -ASM_NAME(maxmin_s16): +maxmin_s16: .long 1191181824 /* 32767.0 */ .long 1191181824 .long 1191181824 @@ -56,11 +56,15 @@ ASM_NAME(synth_1to1_sse_accurate_asm): leal 64(WINDOW), WINDOW subl %eax, WINDOW + + #undef _EBX_ + #define _EBX_ %eax + GET_GOT movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -137,8 +141,8 @@ Loop_start_1: movaps %xmm0, %xmm2 pshufw $0xdd, (SAMPLES), %mm2 pshufw $0xdd, 8(SAMPLES), %mm3 - cmpnleps ASM_NAME(maxmin_s16), %xmm1 - cmpltps ASM_NAME(maxmin_s16)+16, %xmm2 + cmpnleps LOCAL_VAR(maxmin_s16), %xmm1 + cmpltps 16+LOCAL_VAR(maxmin_s16), %xmm2 cvtps2pi %xmm0, %mm0 movhlps %xmm0, %xmm0 cvtps2pi %xmm0, %mm1 @@ -164,12 +168,12 @@ Loop_start_1: leal 16(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -246,8 +250,8 @@ Loop_start_2: movaps %xmm0, %xmm2 pshufw $0xdd, (SAMPLES), %mm2 pshufw $0xdd, 8(SAMPLES), %mm3 - cmpnleps ASM_NAME(maxmin_s16), %xmm1 - cmpltps ASM_NAME(maxmin_s16)+16, %xmm2 + cmpnleps LOCAL_VAR(maxmin_s16), %xmm1 + cmpltps 16+LOCAL_VAR(maxmin_s16), %xmm2 cvtps2pi %xmm0, %mm0 movhlps %xmm0, %xmm0 cvtps2pi %xmm0, %mm1 @@ -273,7 +277,7 @@ Loop_start_2: leal 16(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_2 + jnz 1b pshufw $0xee, MMREG_CLIP, %mm0 paddw MMREG_CLIP, %mm0 @@ -281,7 +285,7 @@ Loop_start_2: paddw %mm1, %mm0 movd %mm0, %eax andl $0xffff, %eax - + popl %esi popl %ebx movl %ebp, %esp diff --git a/deps/mpg123/src/libmpg123/synth_sse_float.S b/deps/mpg123/src/libmpg123/synth_sse_float.S index c1068b3..529ed94 100644 --- a/deps/mpg123/src/libmpg123/synth_sse_float.S +++ b/deps/mpg123/src/libmpg123/synth_sse_float.S @@ -26,7 +26,7 @@ .data #endif ALIGN32 -ASM_NAME(scale_sse): +scale_sse: .long 939524096 .long 939524096 .long 939524096 @@ -48,11 +48,15 @@ ASM_NAME(synth_1to1_real_sse_asm): leal 64(WINDOW), WINDOW subl %eax, WINDOW + + #undef _EBX_ + #define _EBX_ %eax + GET_GOT movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -127,7 +131,7 @@ Loop_start_1: movups (SAMPLES), %xmm1 movups 16(SAMPLES), %xmm2 - mulps ASM_NAME(scale_sse), %xmm0 + mulps LOCAL_VAR(scale_sse), %xmm0 shufps $0xdd, %xmm2, %xmm1 movaps %xmm0, %xmm2 unpcklps %xmm1, %xmm0 @@ -137,12 +141,12 @@ Loop_start_1: leal 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -217,7 +221,7 @@ Loop_start_2: movups (SAMPLES), %xmm1 movups 16(SAMPLES), %xmm2 - mulps ASM_NAME(scale_sse), %xmm0 + mulps LOCAL_VAR(scale_sse), %xmm0 shufps $0xdd, %xmm2, %xmm1 movaps %xmm0, %xmm2 unpcklps %xmm1, %xmm0 @@ -227,10 +231,10 @@ Loop_start_2: leal 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_2 + jnz 1b xorl %eax, %eax - + popl %esi popl %ebx movl %ebp, %esp diff --git a/deps/mpg123/src/libmpg123/synth_sse_s32.S b/deps/mpg123/src/libmpg123/synth_sse_s32.S index 5fe3dd9..b23293f 100644 --- a/deps/mpg123/src/libmpg123/synth_sse_s32.S +++ b/deps/mpg123/src/libmpg123/synth_sse_s32.S @@ -28,13 +28,13 @@ .data #endif ALIGN32 -ASM_NAME(scale_s32): +scale_s32: .long 1199570944 /* 65536.0 */ .long 1199570944 .long 1199570944 .long 1199570944 ALIGN16 -ASM_NAME(maxmin_s32): +maxmin_s32: .long 1191182335 /* 32767.999 */ .long 1191182335 .long 1191182335 @@ -51,7 +51,7 @@ ASM_NAME(synth_1to1_s32_sse_asm): movl %esp, %ebp pushl %ebx pushl %esi - + pxor MMREG_CLIP, MMREG_CLIP movl 8(%ebp), WINDOW @@ -62,11 +62,15 @@ ASM_NAME(synth_1to1_s32_sse_asm): leal 64(WINDOW), WINDOW subl %eax, WINDOW + + #undef _EBX_ + #define _EBX_ %eax + GET_GOT movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -141,9 +145,9 @@ Loop_start_1: movaps %xmm0, %xmm1 movaps %xmm0, %xmm2 - mulps ASM_NAME(scale_s32), %xmm0 - cmpnleps ASM_NAME(maxmin_s32), %xmm1 - cmpltps ASM_NAME(maxmin_s32)+16, %xmm2 + mulps LOCAL_VAR(scale_s32), %xmm0 + cmpnleps LOCAL_VAR(maxmin_s32), %xmm1 + cmpltps 16+LOCAL_VAR(maxmin_s32), %xmm2 cvtps2pi %xmm0, %mm0 movhlps %xmm0, %xmm0 cvtps2pi %xmm0, %mm1 @@ -173,12 +177,12 @@ Loop_start_1: leal 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -253,9 +257,9 @@ Loop_start_2: movaps %xmm0, %xmm1 movaps %xmm0, %xmm2 - mulps ASM_NAME(scale_s32), %xmm0 - cmpnleps ASM_NAME(maxmin_s32), %xmm1 - cmpltps ASM_NAME(maxmin_s32)+16, %xmm2 + mulps LOCAL_VAR(scale_s32), %xmm0 + cmpnleps LOCAL_VAR(maxmin_s32), %xmm1 + cmpltps 16+LOCAL_VAR(maxmin_s32), %xmm2 cvtps2pi %xmm0, %mm0 movhlps %xmm0, %xmm0 cvtps2pi %xmm0, %mm1 @@ -285,7 +289,7 @@ Loop_start_2: leal 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_2 + jnz 1b pshufw $0xee, MMREG_CLIP, %mm0 paddw MMREG_CLIP, %mm0 @@ -293,7 +297,7 @@ Loop_start_2: paddw %mm1, %mm0 movd %mm0, %eax andl $0xffff, %eax - + popl %esi popl %ebx movl %ebp, %esp diff --git a/deps/mpg123/src/libmpg123/synth_stereo_avx.S b/deps/mpg123/src/libmpg123/synth_stereo_avx.S new file mode 100644 index 0000000..79fb670 --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_stereo_avx.S @@ -0,0 +1,256 @@ +/* + synth_stereo_avx: AVX optimized synth for x86-64 (stereo specific version) + + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifdef IS_MSABI +/* short *window; */ +#define WINDOW %r10 +/* short *b0l; */ +#define B0L %rdx +/* short *b0r; */ +#define B0R %r8 +/* short *samples; */ +#define SAMPLES %r9 +#else +/* short *window; */ +#define WINDOW %rdi +/* short *b0l; */ +#define B0L %rsi +/* short *b0r; */ +#define B0R %rdx +/* short *samples; */ +#define SAMPLES %r9 +#endif + +/* + int synth_1to1_s_avx_asm(short *window, short *b0l, short *b0r, short *samples, int bo1); + return value: number of clipped samples +*/ + + ALIGN16 +.globl ASM_NAME(synth_1to1_s_avx_asm) +ASM_NAME(synth_1to1_s_avx_asm): +#ifdef IS_MSABI /* should save xmm6-15 */ + push %rbp + mov %rsp, %rbp + sub $144, %rsp + movaps %xmm6, (%rsp) + movaps %xmm7, 16(%rsp) + movaps %xmm8, 32(%rsp) + movaps %xmm9, 48(%rsp) + movaps %xmm10, 64(%rsp) + movaps %xmm11, 80(%rsp) + movaps %xmm12, 96(%rsp) + movaps %xmm13, 112(%rsp) + movaps %xmm14, 128(%rsp) + movl 48(%rbp), %eax /* 5th argument; placed after 32-byte shadow space */ +#endif + +#ifdef IS_MSABI + shl $1, %eax + mov %rcx, WINDOW +#else + mov %r8d, %eax + shl $1, %eax + movq %rcx, SAMPLES +#endif + add $32, WINDOW + sub %rax, WINDOW + + mov $64, %rax + movl $4, %ecx + vpxor %xmm14, %xmm14, %xmm14 + + ALIGN16 +1: + movups (WINDOW), %xmm8 + movups 16(WINDOW), %xmm9 + movups (WINDOW,%rax), %xmm10 + movups 16(WINDOW,%rax), %xmm11 + vpmaddwd (B0L), %xmm8, %xmm0 + vpmaddwd 16(B0L), %xmm9, %xmm1 + vpmaddwd (B0R), %xmm8, %xmm2 + vpmaddwd 16(B0R), %xmm9, %xmm3 + vpmaddwd 32(B0L), %xmm10, %xmm4 + vpmaddwd 48(B0L), %xmm11, %xmm5 + vpmaddwd 32(B0R), %xmm10, %xmm6 + vpmaddwd 48(B0R), %xmm11, %xmm7 + vpaddd %xmm1, %xmm0, %xmm8 + vpaddd %xmm3, %xmm2, %xmm0 + vpaddd %xmm5, %xmm4, %xmm9 + vpaddd %xmm7, %xmm6, %xmm1 + lea (WINDOW,%rax,2), WINDOW + add %rax, B0L + add %rax, B0R + + movups (WINDOW), %xmm10 + movups 16(WINDOW), %xmm11 + movups (WINDOW,%rax), %xmm12 + movups 16(WINDOW,%rax), %xmm13 + vpmaddwd (B0L), %xmm10, %xmm2 + vpmaddwd 16(B0L), %xmm11, %xmm3 + vpmaddwd (B0R), %xmm10, %xmm4 + vpmaddwd 16(B0R), %xmm11, %xmm5 + vpmaddwd 32(B0L), %xmm12, %xmm6 + vpmaddwd 48(B0L), %xmm13, %xmm10 + vpmaddwd 32(B0R), %xmm12, %xmm7 + vpmaddwd 48(B0R), %xmm13, %xmm11 + vpaddd %xmm3, %xmm2, %xmm2 + vpaddd %xmm5, %xmm4, %xmm3 + vpaddd %xmm6, %xmm10, %xmm4 + vpaddd %xmm7, %xmm11, %xmm5 + lea (WINDOW,%rax,2), WINDOW + add %rax, B0L + add %rax, B0R + + vpunpckldq %xmm0, %xmm8, %xmm6 + vpunpckhdq %xmm0, %xmm8, %xmm0 + vpunpckldq %xmm1, %xmm9, %xmm7 + vpunpckhdq %xmm1, %xmm9, %xmm1 + vpaddd %xmm6, %xmm0, %xmm0 + vpaddd %xmm7, %xmm1, %xmm1 + vpunpckldq %xmm3, %xmm2, %xmm6 + vpunpckhdq %xmm3, %xmm2, %xmm2 + vpunpckldq %xmm5, %xmm4, %xmm7 + vpunpckhdq %xmm5, %xmm4, %xmm3 + vpaddd %xmm6, %xmm2, %xmm2 + vpaddd %xmm7, %xmm3, %xmm3 + + vpunpcklqdq %xmm1, %xmm0, %xmm4 + vpunpckhqdq %xmm1, %xmm0, %xmm0 + vpunpcklqdq %xmm3, %xmm2, %xmm5 + vpunpckhqdq %xmm3, %xmm2, %xmm1 + vpaddd %xmm0, %xmm4, %xmm0 + vpaddd %xmm1, %xmm5, %xmm1 + vpsrad $13, %xmm0, %xmm0 + vpsrad $13, %xmm1, %xmm1 + vpackssdw %xmm1, %xmm0, %xmm2 + vpcmpeqd %xmm3, %xmm3, %xmm3 + vpslld $16, %xmm0, %xmm0 + vpslld $16, %xmm1, %xmm1 + vpsrld $16, %xmm0, %xmm0 + vpsrld $16, %xmm1, %xmm1 + vpackusdw %xmm1, %xmm0, %xmm0 + vpcmpeqw %xmm2, %xmm0, %xmm0 + vpxor %xmm3, %xmm0, %xmm0 + vpaddw %xmm0, %xmm14, %xmm14 + + movups %xmm2, (SAMPLES) + add $16, SAMPLES + dec %ecx + jnz 1b + + movl $4, %ecx + + ALIGN16 +1: + movups (WINDOW), %xmm8 + movups 16(WINDOW), %xmm9 + movups (WINDOW,%rax), %xmm10 + movups 16(WINDOW,%rax), %xmm11 + vpmaddwd (B0L), %xmm8, %xmm0 + vpmaddwd 16(B0L), %xmm9, %xmm1 + vpmaddwd (B0R), %xmm8, %xmm2 + vpmaddwd 16(B0R), %xmm9, %xmm3 + vpmaddwd -32(B0L), %xmm10, %xmm4 + vpmaddwd -16(B0L), %xmm11, %xmm5 + vpmaddwd -32(B0R), %xmm10, %xmm6 + vpmaddwd -16(B0R), %xmm11, %xmm7 + vpaddd %xmm1, %xmm0, %xmm8 + vpaddd %xmm3, %xmm2, %xmm0 + vpaddd %xmm5, %xmm4, %xmm9 + vpaddd %xmm7, %xmm6, %xmm1 + lea (WINDOW,%rax,2), WINDOW + sub %rax, B0L + sub %rax, B0R + + movups (WINDOW), %xmm10 + movups 16(WINDOW), %xmm11 + movups (WINDOW,%rax), %xmm12 + movups 16(WINDOW,%rax), %xmm13 + vpmaddwd (B0L), %xmm10, %xmm2 + vpmaddwd 16(B0L), %xmm11, %xmm3 + vpmaddwd (B0R), %xmm10, %xmm4 + vpmaddwd 16(B0R), %xmm11, %xmm5 + vpmaddwd -32(B0L), %xmm12, %xmm6 + vpmaddwd -16(B0L), %xmm13, %xmm10 + vpmaddwd -32(B0R), %xmm12, %xmm7 + vpmaddwd -16(B0R), %xmm13, %xmm11 + vpaddd %xmm3, %xmm2, %xmm2 + vpaddd %xmm5, %xmm4, %xmm3 + vpaddd %xmm6, %xmm10, %xmm4 + vpaddd %xmm7, %xmm11, %xmm5 + lea (WINDOW,%rax,2), WINDOW + sub %rax, B0L + sub %rax, B0R + + vpunpckldq %xmm0, %xmm8, %xmm6 + vpunpckhdq %xmm0, %xmm8, %xmm0 + vpunpckldq %xmm1, %xmm9, %xmm7 + vpunpckhdq %xmm1, %xmm9, %xmm1 + vpaddd %xmm6, %xmm0, %xmm0 + vpaddd %xmm7, %xmm1, %xmm1 + vpunpckldq %xmm3, %xmm2, %xmm6 + vpunpckhdq %xmm3, %xmm2, %xmm2 + vpunpckldq %xmm5, %xmm4, %xmm7 + vpunpckhdq %xmm5, %xmm4, %xmm3 + vpaddd %xmm6, %xmm2, %xmm2 + vpaddd %xmm7, %xmm3, %xmm3 + + vpunpcklqdq %xmm1, %xmm0, %xmm4 + vpunpckhqdq %xmm1, %xmm0, %xmm0 + vpunpcklqdq %xmm3, %xmm2, %xmm5 + vpunpckhqdq %xmm3, %xmm2, %xmm1 + vpaddd %xmm0, %xmm4, %xmm0 + vpaddd %xmm1, %xmm5, %xmm1 + vpsrad $13, %xmm0, %xmm0 + vpsrad $13, %xmm1, %xmm1 + vpackssdw %xmm1, %xmm0, %xmm2 + vpcmpeqd %xmm3, %xmm3, %xmm3 + vpslld $16, %xmm0, %xmm0 + vpslld $16, %xmm1, %xmm1 + vpsrld $16, %xmm0, %xmm0 + vpsrld $16, %xmm1, %xmm1 + vpackusdw %xmm1, %xmm0, %xmm0 + vpcmpeqw %xmm2, %xmm0, %xmm0 + vpxor %xmm3, %xmm0, %xmm0 + vpaddw %xmm0, %xmm14, %xmm14 + + movups %xmm2, (SAMPLES) + add $16, SAMPLES + dec %ecx + jnz 1b + + pxor %xmm1, %xmm1 + psubw %xmm14, %xmm1 + pshufd $0x4e, %xmm1, %xmm0 + paddw %xmm1, %xmm0 + pshuflw $0x4e, %xmm0, %xmm1 + paddw %xmm1, %xmm0 + pshuflw $0x11, %xmm0, %xmm1 + paddw %xmm1, %xmm0 + movd %xmm0, %eax + and $0x7f, %eax + +#ifdef IS_MSABI + movaps (%rsp), %xmm6 + movaps 16(%rsp), %xmm7 + movaps 32(%rsp), %xmm8 + movaps 48(%rsp), %xmm9 + movaps 64(%rsp), %xmm10 + movaps 80(%rsp), %xmm11 + movaps 96(%rsp), %xmm12 + movaps 112(%rsp), %xmm13 + movaps 128(%rsp), %xmm14 + mov %rbp, %rsp + pop %rbp +#endif + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_avx_accurate.S b/deps/mpg123/src/libmpg123/synth_stereo_avx_accurate.S new file mode 100644 index 0000000..6ba0251 --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_stereo_avx_accurate.S @@ -0,0 +1,286 @@ +/* + synth_stereo_avx_accurate: AVX optimized synth for x86-64 (stereo specific, MPEG-compliant 16bit output version) + + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifdef IS_MSABI +/* real *window; */ +#define WINDOW %r10 +/* real *b0l; */ +#define B0L %rdx +/* real *b0r; */ +#define B0R %r8 +/* real *samples; */ +#define SAMPLES %r9 +#else +/* real *window; */ +#define WINDOW %rdi +/* real *b0l; */ +#define B0L %rsi +/* real *b0r; */ +#define B0R %rdx +/* real *samples; */ +#define SAMPLES %r9 +#endif + +/* + int synth_1to1_s_avx_accurate_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); + return value: number of clipped samples +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN32 +maxmin_avx: + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long -956301312 + .long -956301312 + .long -956301312 + .long -956301312 + .long -956301312 + .long -956301312 + .long -956301312 + .long -956301312 + .text + ALIGN16 + .globl ASM_NAME(synth_1to1_s_avx_accurate_asm) +ASM_NAME(synth_1to1_s_avx_accurate_asm): +#ifdef IS_MSABI /* should save xmm6-15 */ + push %rbp + mov %rsp, %rbp + sub $144, %rsp + movaps %xmm6, (%rsp) + movaps %xmm7, 16(%rsp) + movaps %xmm8, 32(%rsp) + movaps %xmm9, 48(%rsp) + movaps %xmm10, 64(%rsp) + movaps %xmm11, 80(%rsp) + movaps %xmm12, 96(%rsp) + movaps %xmm13, 112(%rsp) + movaps %xmm14, 128(%rsp) + movl 48(%rbp), %eax /* 5th argument; placed after 32-byte shadow space */ +#endif + +#ifdef IS_MSABI + shl $2, %eax + mov %rcx, WINDOW +#else + mov %r8d, %eax + shl $2, %eax + mov %rcx, SAMPLES +#endif + add $64, WINDOW + sub %rax, WINDOW + + mov $128, %rax + mov $4, %ecx + vpxor %xmm14, %xmm14, %xmm14 + + ALIGN16 +1: + vmovups (WINDOW), %ymm8 + vmovups 32(WINDOW), %ymm9 + vmovups (WINDOW,%rax), %ymm10 + vmovups 32(WINDOW,%rax), %ymm11 + vmulps (B0L), %ymm8, %ymm0 + vmulps 32(B0L), %ymm9, %ymm1 + vmulps (B0R), %ymm8, %ymm2 + vmulps 32(B0R), %ymm9, %ymm3 + vmulps 64(B0L), %ymm10, %ymm4 + vmulps 96(B0L), %ymm11, %ymm5 + vmulps 64(B0R), %ymm10, %ymm6 + vmulps 96(B0R), %ymm11, %ymm7 + vaddps %ymm1, %ymm0, %ymm8 + vaddps %ymm3, %ymm2, %ymm0 + vaddps %ymm5, %ymm4, %ymm9 + vaddps %ymm7, %ymm6, %ymm1 + lea (WINDOW,%rax,2), WINDOW + add %rax, B0L + add %rax, B0R + + vmovups (WINDOW), %ymm10 + vmovups 32(WINDOW), %ymm11 + vmovups (WINDOW,%rax), %ymm12 + vmovups 32(WINDOW,%rax), %ymm13 + vmulps (B0L), %ymm10, %ymm2 + vmulps 32(B0L), %ymm11, %ymm3 + vmulps (B0R), %ymm10, %ymm4 + vmulps 32(B0R), %ymm11, %ymm5 + vmulps 64(B0L), %ymm12, %ymm6 + vmulps 96(B0L), %ymm13, %ymm10 + vmulps 64(B0R), %ymm12, %ymm7 + vmulps 96(B0R), %ymm13, %ymm11 + vaddps %ymm3, %ymm2, %ymm2 + vaddps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm10, %ymm4 + vaddps %ymm7, %ymm11, %ymm5 + lea (WINDOW,%rax,2), WINDOW + add %rax, B0L + add %rax, B0R + + vunpcklps %ymm0, %ymm8, %ymm6 + vunpckhps %ymm0, %ymm8, %ymm0 + vunpcklps %ymm1, %ymm9, %ymm7 + vunpckhps %ymm1, %ymm9, %ymm1 + vaddps %ymm6, %ymm0, %ymm0 + vaddps %ymm7, %ymm1, %ymm1 + vunpcklps %ymm3, %ymm2, %ymm6 + vunpckhps %ymm3, %ymm2, %ymm2 + vunpcklps %ymm5, %ymm4, %ymm7 + vunpckhps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm2, %ymm2 + vaddps %ymm7, %ymm3, %ymm3 + + vunpcklpd %ymm1, %ymm0, %ymm4 + vunpckhpd %ymm1, %ymm0, %ymm0 + vunpcklpd %ymm3, %ymm2, %ymm5 + vunpckhpd %ymm3, %ymm2, %ymm1 + vsubps %ymm0, %ymm4, %ymm0 + vsubps %ymm1, %ymm5, %ymm1 + vperm2f128 $0x20, %ymm1, %ymm0, %ymm2 + vperm2f128 $0x31, %ymm1, %ymm0, %ymm3 + vaddps %ymm3, %ymm2, %ymm0 + vcmpnleps maxmin_avx(%rip), %ymm0, %ymm1 + vcmpltps 32+maxmin_avx(%rip), %ymm0, %ymm2 + vextractf128 $0x1, %ymm1, %xmm3 + vextractf128 $0x1, %ymm2, %xmm4 + vpackssdw %xmm2, %xmm1, %xmm1 + vpackssdw %xmm4, %xmm3, %xmm3 + vpaddw %xmm3, %xmm1, %xmm1 + vpaddw %xmm1, %xmm14, %xmm14 + vcvtps2dq %ymm0, %ymm0 + vextractf128 $0x1, %ymm0, %xmm1 + vpackssdw %xmm1, %xmm0, %xmm0 + + vmovups %xmm0, (SAMPLES) + add $16, SAMPLES + dec %ecx + jnz 1b + + mov $4, %ecx + + ALIGN16 +1: + vmovups (WINDOW), %ymm8 + vmovups 32(WINDOW), %ymm9 + vmovups (WINDOW,%rax), %ymm10 + vmovups 32(WINDOW,%rax), %ymm11 + vmulps (B0L), %ymm8, %ymm0 + vmulps 32(B0L), %ymm9, %ymm1 + vmulps (B0R), %ymm8, %ymm2 + vmulps 32(B0R), %ymm9, %ymm3 + vmulps -64(B0L), %ymm10, %ymm4 + vmulps -32(B0L), %ymm11, %ymm5 + vmulps -64(B0R), %ymm10, %ymm6 + vmulps -32(B0R), %ymm11, %ymm7 + vaddps %ymm1, %ymm0, %ymm8 + vaddps %ymm3, %ymm2, %ymm0 + vaddps %ymm5, %ymm4, %ymm9 + vaddps %ymm7, %ymm6, %ymm1 + lea (WINDOW,%rax,2), WINDOW + sub %rax, B0L + sub %rax, B0R + + vmovups (WINDOW), %ymm10 + vmovups 32(WINDOW), %ymm11 + vmovups (WINDOW,%rax), %ymm12 + vmovups 32(WINDOW,%rax), %ymm13 + vmulps (B0L), %ymm10, %ymm2 + vmulps 32(B0L), %ymm11, %ymm3 + vmulps (B0R), %ymm10, %ymm4 + vmulps 32(B0R), %ymm11, %ymm5 + vmulps -64(B0L), %ymm12, %ymm6 + vmulps -32(B0L), %ymm13, %ymm10 + vmulps -64(B0R), %ymm12, %ymm7 + vmulps -32(B0R), %ymm13, %ymm11 + vaddps %ymm3, %ymm2, %ymm2 + vaddps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm10, %ymm4 + vaddps %ymm7, %ymm11, %ymm5 + lea (WINDOW,%rax,2), WINDOW + sub %rax, B0L + sub %rax, B0R + + vunpcklps %ymm0, %ymm8, %ymm6 + vunpckhps %ymm0, %ymm8, %ymm0 + vunpcklps %ymm1, %ymm9, %ymm7 + vunpckhps %ymm1, %ymm9, %ymm1 + vaddps %ymm6, %ymm0, %ymm0 + vaddps %ymm7, %ymm1, %ymm1 + vunpcklps %ymm3, %ymm2, %ymm6 + vunpckhps %ymm3, %ymm2, %ymm2 + vunpcklps %ymm5, %ymm4, %ymm7 + vunpckhps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm2, %ymm2 + vaddps %ymm7, %ymm3, %ymm3 + + vunpcklpd %ymm1, %ymm0, %ymm4 + vunpckhpd %ymm1, %ymm0, %ymm0 + vunpcklpd %ymm3, %ymm2, %ymm5 + vunpckhpd %ymm3, %ymm2, %ymm1 + vaddps %ymm0, %ymm4, %ymm0 + vaddps %ymm1, %ymm5, %ymm1 + vperm2f128 $0x20, %ymm1, %ymm0, %ymm2 + vperm2f128 $0x31, %ymm1, %ymm0, %ymm3 + vaddps %ymm3, %ymm2, %ymm0 + vcmpnleps maxmin_avx(%rip), %ymm0, %ymm1 + vcmpltps 32+maxmin_avx(%rip), %ymm0, %ymm2 + vextractf128 $0x1, %ymm1, %xmm3 + vextractf128 $0x1, %ymm2, %xmm4 + vpackssdw %xmm2, %xmm1, %xmm1 + vpackssdw %xmm4, %xmm3, %xmm3 + vpaddw %xmm3, %xmm1, %xmm1 + vpaddw %xmm1, %xmm14, %xmm14 + vcvtps2dq %ymm0, %ymm0 + vextractf128 $0x1, %ymm0, %xmm1 + vpackssdw %xmm1, %xmm0, %xmm0 + + vmovups %xmm0, (SAMPLES) + add $16, SAMPLES + dec %ecx + jnz 1b + + vzeroupper + + pxor %xmm1, %xmm1 + psubw %xmm14, %xmm1 + pshufd $0x4e, %xmm1, %xmm0 + paddw %xmm1, %xmm0 + pshuflw $0x4e, %xmm0, %xmm1 + paddw %xmm1, %xmm0 + pshuflw $0x11, %xmm0, %xmm1 + paddw %xmm1, %xmm0 + movd %xmm0, %eax + and $0x7f, %eax + +#ifdef IS_MSABI + movaps (%rsp), %xmm6 + movaps 16(%rsp), %xmm7 + movaps 32(%rsp), %xmm8 + movaps 48(%rsp), %xmm9 + movaps 64(%rsp), %xmm10 + movaps 80(%rsp), %xmm11 + movaps 96(%rsp), %xmm12 + movaps 112(%rsp), %xmm13 + movaps 128(%rsp), %xmm14 + mov %rbp, %rsp + pop %rbp +#endif + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_avx_float.S b/deps/mpg123/src/libmpg123/synth_stereo_avx_float.S new file mode 100644 index 0000000..955ec71 --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_stereo_avx_float.S @@ -0,0 +1,243 @@ +/* + synth_stereo_avx_float: AVX optimized synth for x86-64 (stereo specific, float output version) + + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifdef IS_MSABI +/* real *window; */ +#define WINDOW %r10 +/* real *b0l; */ +#define B0L %rdx +/* real *b0r; */ +#define B0R %r8 +/* real *samples; */ +#define SAMPLES %r9 +#else +/* real *window; */ +#define WINDOW %rdi +/* real *b0l; */ +#define B0L %rsi +/* real *b0r; */ +#define B0R %rdx +/* real *samples; */ +#define SAMPLES %r9 +#endif + +/* + int synth_1to1_real_s_avx_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); + return value: number of clipped samples (0) +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +scale_avx: + .long 939524096 + .text + ALIGN16 + .globl ASM_NAME(synth_1to1_real_s_avx_asm) +ASM_NAME(synth_1to1_real_s_avx_asm): +#ifdef IS_MSABI /* should save xmm6-15 */ + push %rbp + mov %rsp, %rbp + sub $144, %rsp + movaps %xmm6, (%rsp) + movaps %xmm7, 16(%rsp) + movaps %xmm8, 32(%rsp) + movaps %xmm9, 48(%rsp) + movaps %xmm10, 64(%rsp) + movaps %xmm11, 80(%rsp) + movaps %xmm12, 96(%rsp) + movaps %xmm13, 112(%rsp) + movaps %xmm14, 128(%rsp) + movl 48(%rbp), %eax /* 5th argument; placed after 32-byte shadow space */ +#endif + + vbroadcastss scale_avx(%rip), %ymm14 + +#ifdef IS_MSABI + shl $2, %eax + mov %rcx, WINDOW +#else + mov %r8d, %eax + shl $2, %eax + mov %rcx, SAMPLES +#endif + add $64, WINDOW + sub %rax, WINDOW + + mov $128, %rax + mov $4, %ecx + + ALIGN16 +1: + vmovups (WINDOW), %ymm8 + vmovups 32(WINDOW), %ymm9 + vmovups (WINDOW,%rax), %ymm10 + vmovups 32(WINDOW,%rax), %ymm11 + vmulps (B0L), %ymm8, %ymm0 + vmulps 32(B0L), %ymm9, %ymm1 + vmulps (B0R), %ymm8, %ymm2 + vmulps 32(B0R), %ymm9, %ymm3 + vmulps 64(B0L), %ymm10, %ymm4 + vmulps 96(B0L), %ymm11, %ymm5 + vmulps 64(B0R), %ymm10, %ymm6 + vmulps 96(B0R), %ymm11, %ymm7 + vaddps %ymm1, %ymm0, %ymm8 + vaddps %ymm3, %ymm2, %ymm0 + vaddps %ymm5, %ymm4, %ymm9 + vaddps %ymm7, %ymm6, %ymm1 + lea (WINDOW,%rax,2), WINDOW + add %rax, B0L + add %rax, B0R + + vmovups (WINDOW), %ymm10 + vmovups 32(WINDOW), %ymm11 + vmovups (WINDOW,%rax), %ymm12 + vmovups 32(WINDOW,%rax), %ymm13 + vmulps (B0L), %ymm10, %ymm2 + vmulps 32(B0L), %ymm11, %ymm3 + vmulps (B0R), %ymm10, %ymm4 + vmulps 32(B0R), %ymm11, %ymm5 + vmulps 64(B0L), %ymm12, %ymm6 + vmulps 96(B0L), %ymm13, %ymm10 + vmulps 64(B0R), %ymm12, %ymm7 + vmulps 96(B0R), %ymm13, %ymm11 + vaddps %ymm3, %ymm2, %ymm2 + vaddps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm10, %ymm4 + vaddps %ymm7, %ymm11, %ymm5 + lea (WINDOW,%rax,2), WINDOW + add %rax, B0L + add %rax, B0R + + vunpcklps %ymm0, %ymm8, %ymm6 + vunpckhps %ymm0, %ymm8, %ymm0 + vunpcklps %ymm1, %ymm9, %ymm7 + vunpckhps %ymm1, %ymm9, %ymm1 + vaddps %ymm6, %ymm0, %ymm0 + vaddps %ymm7, %ymm1, %ymm1 + vunpcklps %ymm3, %ymm2, %ymm6 + vunpckhps %ymm3, %ymm2, %ymm2 + vunpcklps %ymm5, %ymm4, %ymm7 + vunpckhps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm2, %ymm2 + vaddps %ymm7, %ymm3, %ymm3 + + vunpcklpd %ymm1, %ymm0, %ymm4 + vunpckhpd %ymm1, %ymm0, %ymm0 + vunpcklpd %ymm3, %ymm2, %ymm5 + vunpckhpd %ymm3, %ymm2, %ymm1 + vsubps %ymm0, %ymm4, %ymm0 + vsubps %ymm1, %ymm5, %ymm1 + vperm2f128 $0x20, %ymm1, %ymm0, %ymm2 + vperm2f128 $0x31, %ymm1, %ymm0, %ymm3 + vaddps %ymm3, %ymm2, %ymm0 + vmulps %ymm14, %ymm0, %ymm0 + + vmovups %ymm0, (SAMPLES) + add $32, SAMPLES + dec %ecx + jnz 1b + + mov $4, %ecx + + ALIGN16 +1: + vmovups (WINDOW), %ymm8 + vmovups 32(WINDOW), %ymm9 + vmovups (WINDOW,%rax), %ymm10 + vmovups 32(WINDOW,%rax), %ymm11 + vmulps (B0L), %ymm8, %ymm0 + vmulps 32(B0L), %ymm9, %ymm1 + vmulps (B0R), %ymm8, %ymm2 + vmulps 32(B0R), %ymm9, %ymm3 + vmulps -64(B0L), %ymm10, %ymm4 + vmulps -32(B0L), %ymm11, %ymm5 + vmulps -64(B0R), %ymm10, %ymm6 + vmulps -32(B0R), %ymm11, %ymm7 + vaddps %ymm1, %ymm0, %ymm8 + vaddps %ymm3, %ymm2, %ymm0 + vaddps %ymm5, %ymm4, %ymm9 + vaddps %ymm7, %ymm6, %ymm1 + lea (WINDOW,%rax,2), WINDOW + sub %rax, B0L + sub %rax, B0R + + vmovups (WINDOW), %ymm10 + vmovups 32(WINDOW), %ymm11 + vmovups (WINDOW,%rax), %ymm12 + vmovups 32(WINDOW,%rax), %ymm13 + vmulps (B0L), %ymm10, %ymm2 + vmulps 32(B0L), %ymm11, %ymm3 + vmulps (B0R), %ymm10, %ymm4 + vmulps 32(B0R), %ymm11, %ymm5 + vmulps -64(B0L), %ymm12, %ymm6 + vmulps -32(B0L), %ymm13, %ymm10 + vmulps -64(B0R), %ymm12, %ymm7 + vmulps -32(B0R), %ymm13, %ymm11 + vaddps %ymm3, %ymm2, %ymm2 + vaddps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm10, %ymm4 + vaddps %ymm7, %ymm11, %ymm5 + lea (WINDOW,%rax,2), WINDOW + sub %rax, B0L + sub %rax, B0R + + vunpcklps %ymm0, %ymm8, %ymm6 + vunpckhps %ymm0, %ymm8, %ymm0 + vunpcklps %ymm1, %ymm9, %ymm7 + vunpckhps %ymm1, %ymm9, %ymm1 + vaddps %ymm6, %ymm0, %ymm0 + vaddps %ymm7, %ymm1, %ymm1 + vunpcklps %ymm3, %ymm2, %ymm6 + vunpckhps %ymm3, %ymm2, %ymm2 + vunpcklps %ymm5, %ymm4, %ymm7 + vunpckhps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm2, %ymm2 + vaddps %ymm7, %ymm3, %ymm3 + + vunpcklpd %ymm1, %ymm0, %ymm4 + vunpckhpd %ymm1, %ymm0, %ymm0 + vunpcklpd %ymm3, %ymm2, %ymm5 + vunpckhpd %ymm3, %ymm2, %ymm1 + vaddps %ymm0, %ymm4, %ymm0 + vaddps %ymm1, %ymm5, %ymm1 + vperm2f128 $0x20, %ymm1, %ymm0, %ymm2 + vperm2f128 $0x31, %ymm1, %ymm0, %ymm3 + vaddps %ymm3, %ymm2, %ymm0 + vmulps %ymm14, %ymm0, %ymm0 + + vmovups %ymm0, (SAMPLES) + add $32, SAMPLES + dec %ecx + jnz 1b + + vzeroupper + + xor %eax, %eax + +#ifdef IS_MSABI + movaps (%rsp), %xmm6 + movaps 16(%rsp), %xmm7 + movaps 32(%rsp), %xmm8 + movaps 48(%rsp), %xmm9 + movaps 64(%rsp), %xmm10 + movaps 80(%rsp), %xmm11 + movaps 96(%rsp), %xmm12 + movaps 112(%rsp), %xmm13 + movaps 128(%rsp), %xmm14 + mov %rbp, %rsp + pop %rbp +#endif + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_avx_s32.S b/deps/mpg123/src/libmpg123/synth_stereo_avx_s32.S new file mode 100644 index 0000000..8f1e9a6 --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_stereo_avx_s32.S @@ -0,0 +1,292 @@ +/* + synth_stereo_avx_s32: AVX optimized synth for x86-64 (stereo specific, s32 output version) + + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifdef IS_MSABI +/* real *window; */ +#define WINDOW %r10 +/* real *b0l; */ +#define B0L %rdx +/* real *b0r; */ +#define B0R %r8 +/* real *samples; */ +#define SAMPLES %r9 +#else +/* real *window; */ +#define WINDOW %rdi +/* real *b0l; */ +#define B0L %rsi +/* real *b0r; */ +#define B0R %rdx +/* real *samples; */ +#define SAMPLES %r9 +#endif + +/* + int synth_1to1_s32_s_avx_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); + return value: number of clipped samples +*/ + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN32 +maxmin_avx: + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long 1191182335 + .long -956301312 + .long -956301312 + .long -956301312 + .long -956301312 + .long -956301312 + .long -956301312 + .long -956301312 + .long -956301312 +scale_avx: + .long 1199570944 + .text + ALIGN16 + .globl ASM_NAME(synth_1to1_s32_s_avx_asm) +ASM_NAME(synth_1to1_s32_s_avx_asm): +#ifdef IS_MSABI /* should save xmm6-15 */ + push %rbp + mov %rsp, %rbp + sub $160, %rsp + movaps %xmm6, (%rsp) + movaps %xmm7, 16(%rsp) + movaps %xmm8, 32(%rsp) + movaps %xmm9, 48(%rsp) + movaps %xmm10, 64(%rsp) + movaps %xmm11, 80(%rsp) + movaps %xmm12, 96(%rsp) + movaps %xmm13, 112(%rsp) + movaps %xmm14, 128(%rsp) + movaps %xmm15, 144(%rsp) + movl 48(%rbp), %eax /* 5th argument; placed after 32-byte shadow space */ +#endif + + vbroadcastss scale_avx(%rip), %ymm14 + +#ifdef IS_MSABI + shl $2, %eax + mov %rcx, WINDOW +#else + mov %r8d, %eax + shl $2, %eax + mov %rcx, SAMPLES +#endif + add $64, WINDOW + sub %rax, WINDOW + + mov $128, %rax + mov $4, %ecx + vpxor %xmm15, %xmm15, %xmm15 + + ALIGN16 +1: + vmovups (WINDOW), %ymm8 + vmovups 32(WINDOW), %ymm9 + vmovups (WINDOW,%rax), %ymm10 + vmovups 32(WINDOW,%rax), %ymm11 + vmulps (B0L), %ymm8, %ymm0 + vmulps 32(B0L), %ymm9, %ymm1 + vmulps (B0R), %ymm8, %ymm2 + vmulps 32(B0R), %ymm9, %ymm3 + vmulps 64(B0L), %ymm10, %ymm4 + vmulps 96(B0L), %ymm11, %ymm5 + vmulps 64(B0R), %ymm10, %ymm6 + vmulps 96(B0R), %ymm11, %ymm7 + vaddps %ymm1, %ymm0, %ymm8 + vaddps %ymm3, %ymm2, %ymm0 + vaddps %ymm5, %ymm4, %ymm9 + vaddps %ymm7, %ymm6, %ymm1 + lea (WINDOW,%rax,2), WINDOW + add %rax, B0L + add %rax, B0R + + vmovups (WINDOW), %ymm10 + vmovups 32(WINDOW), %ymm11 + vmovups (WINDOW,%rax), %ymm12 + vmovups 32(WINDOW,%rax), %ymm13 + vmulps (B0L), %ymm10, %ymm2 + vmulps 32(B0L), %ymm11, %ymm3 + vmulps (B0R), %ymm10, %ymm4 + vmulps 32(B0R), %ymm11, %ymm5 + vmulps 64(B0L), %ymm12, %ymm6 + vmulps 96(B0L), %ymm13, %ymm10 + vmulps 64(B0R), %ymm12, %ymm7 + vmulps 96(B0R), %ymm13, %ymm11 + vaddps %ymm3, %ymm2, %ymm2 + vaddps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm10, %ymm4 + vaddps %ymm7, %ymm11, %ymm5 + lea (WINDOW,%rax,2), WINDOW + add %rax, B0L + add %rax, B0R + + vunpcklps %ymm0, %ymm8, %ymm6 + vunpckhps %ymm0, %ymm8, %ymm0 + vunpcklps %ymm1, %ymm9, %ymm7 + vunpckhps %ymm1, %ymm9, %ymm1 + vaddps %ymm6, %ymm0, %ymm0 + vaddps %ymm7, %ymm1, %ymm1 + vunpcklps %ymm3, %ymm2, %ymm6 + vunpckhps %ymm3, %ymm2, %ymm2 + vunpcklps %ymm5, %ymm4, %ymm7 + vunpckhps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm2, %ymm2 + vaddps %ymm7, %ymm3, %ymm3 + + vunpcklpd %ymm1, %ymm0, %ymm4 + vunpckhpd %ymm1, %ymm0, %ymm0 + vunpcklpd %ymm3, %ymm2, %ymm5 + vunpckhpd %ymm3, %ymm2, %ymm1 + vsubps %ymm0, %ymm4, %ymm0 + vsubps %ymm1, %ymm5, %ymm1 + vperm2f128 $0x20, %ymm1, %ymm0, %ymm2 + vperm2f128 $0x31, %ymm1, %ymm0, %ymm3 + vaddps %ymm3, %ymm2, %ymm0 + vcmpnleps maxmin_avx(%rip), %ymm0, %ymm1 + vcmpltps 32+maxmin_avx(%rip), %ymm0, %ymm2 + vmulps %ymm14, %ymm0, %ymm0 + vextractf128 $0x1, %ymm1, %xmm3 + vextractf128 $0x1, %ymm2, %xmm4 + vpackssdw %xmm2, %xmm1, %xmm5 + vpackssdw %xmm4, %xmm3, %xmm3 + vcvtps2dq %ymm0, %ymm0 + vpaddw %xmm3, %xmm5, %xmm5 + vpaddw %xmm5, %xmm15, %xmm15 + vxorps %ymm1, %ymm0, %ymm0 + + vmovups %ymm0, (SAMPLES) + add $32, SAMPLES + dec %ecx + jnz 1b + + mov $4, %ecx + + ALIGN16 +1: + vmovups (WINDOW), %ymm8 + vmovups 32(WINDOW), %ymm9 + vmovups (WINDOW,%rax), %ymm10 + vmovups 32(WINDOW,%rax), %ymm11 + vmulps (B0L), %ymm8, %ymm0 + vmulps 32(B0L), %ymm9, %ymm1 + vmulps (B0R), %ymm8, %ymm2 + vmulps 32(B0R), %ymm9, %ymm3 + vmulps -64(B0L), %ymm10, %ymm4 + vmulps -32(B0L), %ymm11, %ymm5 + vmulps -64(B0R), %ymm10, %ymm6 + vmulps -32(B0R), %ymm11, %ymm7 + vaddps %ymm1, %ymm0, %ymm8 + vaddps %ymm3, %ymm2, %ymm0 + vaddps %ymm5, %ymm4, %ymm9 + vaddps %ymm7, %ymm6, %ymm1 + lea (WINDOW,%rax,2), WINDOW + sub %rax, B0L + sub %rax, B0R + + vmovups (WINDOW), %ymm10 + vmovups 32(WINDOW), %ymm11 + vmovups (WINDOW,%rax), %ymm12 + vmovups 32(WINDOW,%rax), %ymm13 + vmulps (B0L), %ymm10, %ymm2 + vmulps 32(B0L), %ymm11, %ymm3 + vmulps (B0R), %ymm10, %ymm4 + vmulps 32(B0R), %ymm11, %ymm5 + vmulps -64(B0L), %ymm12, %ymm6 + vmulps -32(B0L), %ymm13, %ymm10 + vmulps -64(B0R), %ymm12, %ymm7 + vmulps -32(B0R), %ymm13, %ymm11 + vaddps %ymm3, %ymm2, %ymm2 + vaddps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm10, %ymm4 + vaddps %ymm7, %ymm11, %ymm5 + lea (WINDOW,%rax,2), WINDOW + sub %rax, B0L + sub %rax, B0R + + vunpcklps %ymm0, %ymm8, %ymm6 + vunpckhps %ymm0, %ymm8, %ymm0 + vunpcklps %ymm1, %ymm9, %ymm7 + vunpckhps %ymm1, %ymm9, %ymm1 + vaddps %ymm6, %ymm0, %ymm0 + vaddps %ymm7, %ymm1, %ymm1 + vunpcklps %ymm3, %ymm2, %ymm6 + vunpckhps %ymm3, %ymm2, %ymm2 + vunpcklps %ymm5, %ymm4, %ymm7 + vunpckhps %ymm5, %ymm4, %ymm3 + vaddps %ymm6, %ymm2, %ymm2 + vaddps %ymm7, %ymm3, %ymm3 + + vunpcklpd %ymm1, %ymm0, %ymm4 + vunpckhpd %ymm1, %ymm0, %ymm0 + vunpcklpd %ymm3, %ymm2, %ymm5 + vunpckhpd %ymm3, %ymm2, %ymm1 + vaddps %ymm0, %ymm4, %ymm0 + vaddps %ymm1, %ymm5, %ymm1 + vperm2f128 $0x20, %ymm1, %ymm0, %ymm2 + vperm2f128 $0x31, %ymm1, %ymm0, %ymm3 + vaddps %ymm3, %ymm2, %ymm0 + vcmpnleps maxmin_avx(%rip), %ymm0, %ymm1 + vcmpltps 32+maxmin_avx(%rip), %ymm0, %ymm2 + vmulps %ymm14, %ymm0, %ymm0 + vextractf128 $0x1, %ymm1, %xmm3 + vextractf128 $0x1, %ymm2, %xmm4 + vpackssdw %xmm2, %xmm1, %xmm5 + vpackssdw %xmm4, %xmm3, %xmm3 + vcvtps2dq %ymm0, %ymm0 + vpaddw %xmm3, %xmm5, %xmm5 + vpaddw %xmm5, %xmm15, %xmm15 + vxorps %ymm1, %ymm0, %ymm0 + + vmovups %ymm0, (SAMPLES) + add $32, SAMPLES + dec %ecx + jnz 1b + + vzeroupper + + pxor %xmm1, %xmm1 + psubw %xmm15, %xmm1 + pshufd $0x4e, %xmm1, %xmm0 + paddw %xmm1, %xmm0 + pshuflw $0x4e, %xmm0, %xmm1 + paddw %xmm1, %xmm0 + pshuflw $0x11, %xmm0, %xmm1 + paddw %xmm1, %xmm0 + movd %xmm0, %eax + and $0x7f, %eax + +#ifdef IS_MSABI + movaps (%rsp), %xmm6 + movaps 16(%rsp), %xmm7 + movaps 32(%rsp), %xmm8 + movaps 48(%rsp), %xmm9 + movaps 64(%rsp), %xmm10 + movaps 80(%rsp), %xmm11 + movaps 96(%rsp), %xmm12 + movaps 112(%rsp), %xmm13 + movaps 128(%rsp), %xmm14 + movaps 144(%rsp), %xmm15 + mov %rbp, %rsp + pop %rbp +#endif + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_neon.S b/deps/mpg123/src/libmpg123/synth_stereo_neon.S index 6253891..abb2747 100644 --- a/deps/mpg123/src/libmpg123/synth_stereo_neon.S +++ b/deps/mpg123/src/libmpg123/synth_stereo_neon.S @@ -18,8 +18,18 @@ return value: number of clipped samples */ +#ifndef _M_ARM + .code 32 +#endif +#ifndef __APPLE__ + .fpu neon +#endif + .text - .globl ASM_NAME(synth_1to1_s_neon_asm) + GLOBAL_SYMBOL ASM_NAME(synth_1to1_s_neon_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_s_neon_asm), %function +#endif ALIGN4 ASM_NAME(synth_1to1_s_neon_asm): push {r4-r6, lr} @@ -31,7 +41,7 @@ ASM_NAME(synth_1to1_s_neon_asm): mov r4, #4 mov r5, #64 -.Loop_start_1: +1: vld1.16 {d0-d3}, [WINDOW], r5 vld1.16 {d4-d7}, [WINDOW], r5 vld1.16 {d8-d11}, [B0L, :128]! @@ -61,7 +71,7 @@ ASM_NAME(synth_1to1_s_neon_asm): vpadd.i32 d30, d30, d31 vpadd.i32 d24, d24, d26 vpadd.i32 d25, d28, d30 - vqshrn.s32 d0, q12, #13 + vqrshrn.s32 d0, q12, #13 vst1.16 {d0}, [SAMPLES]! vld1.16 {d0-d3}, [WINDOW], r5 @@ -93,15 +103,15 @@ ASM_NAME(synth_1to1_s_neon_asm): vpadd.i32 d30, d30, d31 vpadd.i32 d24, d24, d26 vpadd.i32 d25, d28, d30 - vqshrn.s32 d0, q12, #13 + vqrshrn.s32 d0, q12, #13 vst1.16 {d0}, [SAMPLES]! subs r4, r4, #1 - bne .Loop_start_1 + bne 1b mov r4, #4 mov r6, #-32 -.Loop_start_2: +1: vld1.16 {d0-d3}, [WINDOW], r5 vld1.16 {d4-d7}, [WINDOW], r5 vld1.16 {d8-d11}, [B0L, :128], r6 @@ -131,7 +141,7 @@ ASM_NAME(synth_1to1_s_neon_asm): vpadd.i32 d30, d30, d31 vpadd.i32 d24, d24, d26 vpadd.i32 d25, d28, d30 - vqshrn.s32 d0, q12, #13 + vqrshrn.s32 d0, q12, #13 vst1.16 {d0}, [SAMPLES]! vld1.16 {d0-d3}, [WINDOW], r5 @@ -163,13 +173,15 @@ ASM_NAME(synth_1to1_s_neon_asm): vpadd.i32 d30, d30, d31 vpadd.i32 d24, d24, d26 vpadd.i32 d25, d28, d30 - vqshrn.s32 d0, q12, #13 + vqrshrn.s32 d0, q12, #13 vst1.16 {d0}, [SAMPLES]! subs r4, r4, #1 - bne .Loop_start_2 + bne 1b mov r0, #0 vpop {q4-q7} pop {r4-r6, pc} + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_neon64.S b/deps/mpg123/src/libmpg123/synth_stereo_neon64.S new file mode 100644 index 0000000..aeffa6c --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_stereo_neon64.S @@ -0,0 +1,185 @@ +/* + synth_stereo_neon64: NEON optimized synth for AArch64 (stereo specific version) + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +maxmin_s16: + .word 32767 + .word -32768 + .text + ALIGN4 + .globl ASM_NAME(synth_1to1_s_neon64_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_s_neon64_asm), %function +#endif +ASM_NAME(synth_1to1_s_neon64_asm): + add x0, x0, #32 + sub x0, x0, x4, lsl #1 + eor v30.16b, v30.16b, v30.16b + adrp x5, AARCH64_PCREL_HI(maxmin_s16) + add x5, x5, AARCH64_PCREL_LO(maxmin_s16) + ld2r {v28.4s,v29.4s}, [x5] + + mov w4, #4 + mov x5, #64 +1: + ld1 {v0.8h,v1.8h}, [x0], x5 + ld1 {v2.8h,v3.8h}, [x0], x5 + ld1 {v4.8h,v5.8h,v6.8h,v7.8h}, [x1], #64 + ld1 {v16.8h,v17.8h,v18.8h,v19.8h}, [x2], #64 + + smull v24.4s, v0.4h, v4.4h + smull v25.4s, v0.4h, v16.4h + smull v26.4s, v2.4h, v6.4h + smull v27.4s, v2.4h, v18.4h + smlal2 v24.4s, v0.8h, v4.8h + smlal2 v25.4s, v0.8h, v16.8h + smlal2 v26.4s, v2.8h, v6.8h + smlal2 v27.4s, v2.8h, v18.8h + smlal v24.4s, v1.4h, v5.4h + smlal v25.4s, v1.4h, v17.4h + smlal v26.4s, v3.4h, v7.4h + smlal v27.4s, v3.4h, v19.4h + smlal2 v24.4s, v1.8h, v5.8h + smlal2 v25.4s, v1.8h, v17.8h + smlal2 v26.4s, v3.8h, v7.8h + smlal2 v27.4s, v3.8h, v19.8h + + addp v0.4s, v24.4s, v25.4s + addp v1.4s, v26.4s, v27.4s + addp v0.4s, v0.4s, v1.4s + sqrshrn v31.4h, v0.4s, #13 + cmgt v2.4s, v0.4s, v28.4s + cmgt v3.4s, v29.4s, v0.4s + add v2.4s, v2.4s, v3.4s + add v30.4s, v30.4s, v2.4s + + ld1 {v0.8h,v1.8h}, [x0], x5 + ld1 {v2.8h,v3.8h}, [x0], x5 + ld1 {v4.8h,v5.8h,v6.8h,v7.8h}, [x1], #64 + ld1 {v16.8h,v17.8h,v18.8h,v19.8h}, [x2], #64 + + smull v24.4s, v0.4h, v4.4h + smull v25.4s, v0.4h, v16.4h + smull v26.4s, v2.4h, v6.4h + smull v27.4s, v2.4h, v18.4h + smlal2 v24.4s, v0.8h, v4.8h + smlal2 v25.4s, v0.8h, v16.8h + smlal2 v26.4s, v2.8h, v6.8h + smlal2 v27.4s, v2.8h, v18.8h + smlal v24.4s, v1.4h, v5.4h + smlal v25.4s, v1.4h, v17.4h + smlal v26.4s, v3.4h, v7.4h + smlal v27.4s, v3.4h, v19.4h + smlal2 v24.4s, v1.8h, v5.8h + smlal2 v25.4s, v1.8h, v17.8h + smlal2 v26.4s, v3.8h, v7.8h + smlal2 v27.4s, v3.8h, v19.8h + + addp v0.4s, v24.4s, v25.4s + addp v1.4s, v26.4s, v27.4s + addp v0.4s, v0.4s, v1.4s + sqrshrn2 v31.8h, v0.4s, #13 + cmgt v2.4s, v0.4s, v28.4s + cmgt v3.4s, v29.4s, v0.4s + add v2.4s, v2.4s, v3.4s + add v30.4s, v30.4s, v2.4s + st1 {v31.4s}, [x3], #16 + + subs w4, w4, #1 + b.ne 1b + + mov w4, #4 + mov x6, #-32 +2: + ld1 {v0.8h,v1.8h}, [x0], x5 + ld1 {v2.8h,v3.8h}, [x0], x5 + ld1 {v4.8h,v5.8h}, [x1], x6 + ld1 {v6.8h,v7.8h}, [x1], x6 + ld1 {v16.8h,v17.8h}, [x2], x6 + ld1 {v18.8h,v19.8h}, [x2], x6 + + smull v24.4s, v0.4h, v4.4h + smull v25.4s, v0.4h, v16.4h + smull v26.4s, v2.4h, v6.4h + smull v27.4s, v2.4h, v18.4h + smlal2 v24.4s, v0.8h, v4.8h + smlal2 v25.4s, v0.8h, v16.8h + smlal2 v26.4s, v2.8h, v6.8h + smlal2 v27.4s, v2.8h, v18.8h + smlal v24.4s, v1.4h, v5.4h + smlal v25.4s, v1.4h, v17.4h + smlal v26.4s, v3.4h, v7.4h + smlal v27.4s, v3.4h, v19.4h + smlal2 v24.4s, v1.8h, v5.8h + smlal2 v25.4s, v1.8h, v17.8h + smlal2 v26.4s, v3.8h, v7.8h + smlal2 v27.4s, v3.8h, v19.8h + + addp v0.4s, v24.4s, v25.4s + addp v1.4s, v26.4s, v27.4s + addp v0.4s, v0.4s, v1.4s + sqrshrn v31.4h, v0.4s, #13 + cmgt v2.4s, v0.4s, v28.4s + cmgt v3.4s, v29.4s, v0.4s + add v2.4s, v2.4s, v3.4s + add v30.4s, v30.4s, v2.4s + + ld1 {v0.8h,v1.8h}, [x0], x5 + ld1 {v2.8h,v3.8h}, [x0], x5 + ld1 {v4.8h,v5.8h}, [x1], x6 + ld1 {v6.8h,v7.8h}, [x1], x6 + ld1 {v16.8h,v17.8h}, [x2], x6 + ld1 {v18.8h,v19.8h}, [x2], x6 + + smull v24.4s, v0.4h, v4.4h + smull v25.4s, v0.4h, v16.4h + smull v26.4s, v2.4h, v6.4h + smull v27.4s, v2.4h, v18.4h + smlal2 v24.4s, v0.8h, v4.8h + smlal2 v25.4s, v0.8h, v16.8h + smlal2 v26.4s, v2.8h, v6.8h + smlal2 v27.4s, v2.8h, v18.8h + smlal v24.4s, v1.4h, v5.4h + smlal v25.4s, v1.4h, v17.4h + smlal v26.4s, v3.4h, v7.4h + smlal v27.4s, v3.4h, v19.4h + smlal2 v24.4s, v1.8h, v5.8h + smlal2 v25.4s, v1.8h, v17.8h + smlal2 v26.4s, v3.8h, v7.8h + smlal2 v27.4s, v3.8h, v19.8h + + addp v0.4s, v24.4s, v25.4s + addp v1.4s, v26.4s, v27.4s + addp v0.4s, v0.4s, v1.4s + sqrshrn2 v31.8h, v0.4s, #13 + cmgt v2.4s, v0.4s, v28.4s + cmgt v3.4s, v29.4s, v0.4s + add v2.4s, v2.4s, v3.4s + add v30.4s, v30.4s, v2.4s + st1 {v31.4s}, [x3], #16 + + subs w4, w4, #1 + b.ne 2b + + AARCH64_DUP_2D(v0, v30, 1) + add v0.4s, v0.4s, v30.4s + AARCH64_DUP_4S(v1, v0, 1) + add v0.4s, v0.4s, v1.4s + umov w0, v0.s[0] + neg w0, w0 + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_neon64_accurate.S b/deps/mpg123/src/libmpg123/synth_stereo_neon64_accurate.S new file mode 100644 index 0000000..2e79fc6 --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_stereo_neon64_accurate.S @@ -0,0 +1,200 @@ +/* + synth_stereo_neon64_accurate: NEON optimized synth for AArch64 (stereo specific, MPEG-compliant 16bit output version) + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +maxmin_s16: + .word 1191181824 + .word -956301312 + .text + ALIGN4 + .globl ASM_NAME(synth_1to1_s_neon64_accurate_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_s_neon64_accurate_asm), %function +#endif +ASM_NAME(synth_1to1_s_neon64_accurate_asm): + add x0, x0, #64 + sub x0, x0, x4, lsl #2 + eor v30.16b, v30.16b, v30.16b + adrp x5, AARCH64_PCREL_HI(maxmin_s16) + add x5, x5, AARCH64_PCREL_LO(maxmin_s16) + ld2r {v28.4s,v29.4s}, [x5] + sub sp, sp, #32 + st1 {v8.2s,v9.2s,v10.2s,v11.2s}, [sp] + sub sp, sp, #32 + st1 {v12.2s,v13.2s,v14.2s,v15.2s}, [sp] + + mov w4, #4 + mov x5, #128 +1: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], #64 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], #64 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], #64 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fcvtns v1.4s, v0.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + sqxtn v31.4h, v1.4s + add v2.4s, v2.4s, v3.4s + add v30.4s, v30.4s, v2.4s + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], #64 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], #64 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], #64 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fcvtns v1.4s, v0.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + AARCH64_SQXTN2_8H(v31, v1) + add v2.4s, v2.4s, v3.4s + add v30.4s, v30.4s, v2.4s + st1 {v31.4s}, [x3], #16 + + subs w4, w4, #1 + b.ne 1b + + mov w4, #4 + mov x6, #-64 +2: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], x6 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], x6 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], x6 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fcvtns v1.4s, v0.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + sqxtn v31.4h, v1.4s + add v2.4s, v2.4s, v3.4s + add v30.4s, v30.4s, v2.4s + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], x6 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], x6 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], x6 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fcvtns v1.4s, v0.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + AARCH64_SQXTN2_8H(v31, v1) + add v2.4s, v2.4s, v3.4s + add v30.4s, v30.4s, v2.4s + st1 {v31.4s}, [x3], #16 + + subs w4, w4, #1 + b.ne 2b + + AARCH64_DUP_2D(v0, v30, 1) + add v0.4s, v0.4s, v30.4s + AARCH64_DUP_4S(v1, v0, 1) + add v0.4s, v0.4s, v1.4s + umov w0, v0.s[0] + neg w0, w0 + + ld1 {v12.2s,v13.2s,v14.2s,v15.2s}, [sp], #32 + ld1 {v8.2s,v9.2s,v10.2s,v11.2s}, [sp], #32 + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_neon64_float.S b/deps/mpg123/src/libmpg123/synth_stereo_neon64_float.S new file mode 100644 index 0000000..aec656c --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_stereo_neon64_float.S @@ -0,0 +1,174 @@ +/* + synth_stereo_neon64_float: NEON optimized synth for AArch64 (stereo specific, float output version) + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +scale: + .word 939524096 + .text + ALIGN4 + .globl ASM_NAME(synth_1to1_real_s_neon64_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_real_s_neon64_asm), %function +#endif +ASM_NAME(synth_1to1_real_s_neon64_asm): + add x0, x0, #64 + sub x0, x0, x4, lsl #2 + adrp x5, AARCH64_PCREL_HI(scale) + add x5, x5, AARCH64_PCREL_LO(scale) + ld1r {v28.4s}, [x5] + sub sp, sp, #32 + st1 {v8.2s,v9.2s,v10.2s,v11.2s}, [sp] + sub sp, sp, #32 + st1 {v12.2s,v13.2s,v14.2s,v15.2s}, [sp] + + mov w4, #4 + mov x5, #128 +1: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], #64 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], #64 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], #64 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fmul v0.4s, v0.4s, v28.4s + st1 {v0.4s}, [x3], #16 + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], #64 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], #64 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], #64 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fmul v0.4s, v0.4s, v28.4s + st1 {v0.4s}, [x3], #16 + + subs w4, w4, #1 + b.ne 1b + + mov w4, #4 + mov x6, #-64 +2: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], x6 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], x6 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], x6 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fmul v0.4s, v0.4s, v28.4s + st1 {v0.4s}, [x3], #16 + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], x6 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], x6 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], x6 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fmul v0.4s, v0.4s, v28.4s + st1 {v0.4s}, [x3], #16 + + subs w4, w4, #1 + b.ne 2b + + eor w0, w0, w0 + ld1 {v12.2s,v13.2s,v14.2s,v15.2s}, [sp], #32 + ld1 {v8.2s,v9.2s,v10.2s,v11.2s}, [sp], #32 + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_neon64_s32.S b/deps/mpg123/src/libmpg123/synth_stereo_neon64_s32.S new file mode 100644 index 0000000..52e1d66 --- /dev/null +++ b/deps/mpg123/src/libmpg123/synth_stereo_neon64_s32.S @@ -0,0 +1,203 @@ +/* + synth_stereo_neon64_s32: NEON optimized synth for AArch64 (stereo specific, 32bit output version) + + copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Taihei Monma +*/ + +#include "mangle.h" + +#ifndef __APPLE__ + .section .rodata +#else + .data +#endif + ALIGN16 +maxmin_s32: + .word 1191181824 + .word -956301312 + .word 1199570944 + .text + ALIGN4 + .globl ASM_NAME(synth_1to1_s32_s_neon64_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_s32_s_neon64_asm), %function +#endif +ASM_NAME(synth_1to1_s32_s_neon64_asm): + add x0, x0, #64 + sub x0, x0, x4, lsl #2 + eor v31.16b, v31.16b, v31.16b + adrp x5, AARCH64_PCREL_HI(maxmin_s32) + add x5, x5, AARCH64_PCREL_LO(maxmin_s32) + ld3r {v28.4s,v29.4s,v30.4s}, [x5] + sub sp, sp, #32 + st1 {v8.2s,v9.2s,v10.2s,v11.2s}, [sp] + sub sp, sp, #32 + st1 {v12.2s,v13.2s,v14.2s,v15.2s}, [sp] + + mov w4, #4 + mov x5, #128 +1: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], #64 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], #64 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], #64 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fmul v1.4s, v0.4s, v30.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + fcvtns v1.4s, v1.4s + add v2.4s, v2.4s, v3.4s + add v31.4s, v31.4s, v2.4s + st1 {v1.4s}, [x3], #16 + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], #64 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], #64 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], #64 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fmul v1.4s, v0.4s, v30.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + fcvtns v1.4s, v1.4s + add v2.4s, v2.4s, v3.4s + add v31.4s, v31.4s, v2.4s + st1 {v1.4s}, [x3], #16 + + subs w4, w4, #1 + b.ne 1b + + mov w4, #4 + mov x6, #-64 +2: + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], x6 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], x6 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], x6 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fmul v1.4s, v0.4s, v30.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + fcvtns v1.4s, v1.4s + add v2.4s, v2.4s, v3.4s + add v31.4s, v31.4s, v2.4s + st1 {v1.4s}, [x3], #16 + + ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5 + ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5 + ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6 + ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x2], x6 + ld1 {v8.4s,v9.4s,v10.4s,v11.4s}, [x1], x6 + ld1 {v12.4s,v13.4s,v14.4s,v15.4s}, [x2], x6 + + fmul v24.4s, v0.4s, v16.4s + fmul v25.4s, v0.4s, v20.4s + fmul v26.4s, v4.4s, v8.4s + fmul v27.4s, v4.4s, v12.4s + fmla v24.4s, v1.4s, v17.4s + fmla v25.4s, v1.4s, v21.4s + fmla v26.4s, v5.4s, v9.4s + fmla v27.4s, v5.4s, v13.4s + fmla v24.4s, v2.4s, v18.4s + fmla v25.4s, v2.4s, v22.4s + fmla v26.4s, v6.4s, v10.4s + fmla v27.4s, v6.4s, v14.4s + fmla v24.4s, v3.4s, v19.4s + fmla v25.4s, v3.4s, v23.4s + fmla v26.4s, v7.4s, v11.4s + fmla v27.4s, v7.4s, v15.4s + + faddp v0.4s, v24.4s, v25.4s + faddp v1.4s, v26.4s, v27.4s + faddp v0.4s, v0.4s, v1.4s + fmul v1.4s, v0.4s, v30.4s + fcmgt v2.4s, v0.4s, v28.4s + fcmgt v3.4s, v29.4s, v0.4s + fcvtns v1.4s, v1.4s + add v2.4s, v2.4s, v3.4s + add v31.4s, v31.4s, v2.4s + st1 {v1.4s}, [x3], #16 + + subs w4, w4, #1 + b.ne 2b + + AARCH64_DUP_2D(v0, v31, 1) + add v0.4s, v0.4s, v31.4s + AARCH64_DUP_4S(v1, v0, 1) + add v0.4s, v0.4s, v1.4s + umov w0, v0.s[0] + neg w0, w0 + + ld1 {v12.2s,v13.2s,v14.2s,v15.2s}, [sp], #32 + ld1 {v8.2s,v9.2s,v10.2s,v11.2s}, [sp], #32 + + ret + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_neon_accurate.S b/deps/mpg123/src/libmpg123/synth_stereo_neon_accurate.S index b14f9f4..37a051c 100644 --- a/deps/mpg123/src/libmpg123/synth_stereo_neon_accurate.S +++ b/deps/mpg123/src/libmpg123/synth_stereo_neon_accurate.S @@ -18,8 +18,16 @@ return value: number of clipped samples */ + .code 32 +#ifndef __APPLE__ + .fpu neon +#endif + .text .globl ASM_NAME(synth_1to1_s_neon_accurate_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_s_neon_accurate_asm), %function +#endif ASM_NAME(synth_1to1_s_neon_accurate_asm): push {r4-r7, lr} vpush {q4-q7} @@ -34,7 +42,7 @@ ASM_NAME(synth_1to1_s_neon_accurate_asm): mov r4, #4 mov r5, #128 mov r6, #64 -.Loop_start_1: +1: vld1.32 {q0,q1}, [WINDOW], r5 vld1.32 {q2,q3}, [WINDOW] vld1.32 {q4,q5}, [B0L, :128], r6 @@ -138,11 +146,11 @@ ASM_NAME(synth_1to1_s_neon_accurate_asm): vst1.16 {d26}, [SAMPLES]! subs r4, r4, #1 - bne .Loop_start_1 + bne 1b mov r4, #4 mov r6, #-64 -.Loop_start_2: +1: vld1.32 {q0,q1}, [WINDOW], r5 vld1.32 {q2,q3}, [WINDOW] vld1.32 {q4,q5}, [B0L, :128], r6 @@ -250,7 +258,7 @@ ASM_NAME(synth_1to1_s_neon_accurate_asm): vst1.16 {d26}, [SAMPLES]! subs r4, r4, #1 - bne .Loop_start_2 + bne 1b vld1.32 {q0}, [sp, :128] vpadd.i32 d0, d0, d1 @@ -260,3 +268,5 @@ ASM_NAME(synth_1to1_s_neon_accurate_asm): mov sp, r7 vpop {q4-q7} pop {r4-r7, pc} + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_neon_float.S b/deps/mpg123/src/libmpg123/synth_stereo_neon_float.S index 37509d4..405fa28 100644 --- a/deps/mpg123/src/libmpg123/synth_stereo_neon_float.S +++ b/deps/mpg123/src/libmpg123/synth_stereo_neon_float.S @@ -18,8 +18,18 @@ return value: number of clipped samples (0) */ +#ifndef _M_ARM + .code 32 +#endif +#ifndef __APPLE__ + .fpu neon +#endif + .text - .globl ASM_NAME(synth_1to1_real_s_neon_asm) + GLOBAL_SYMBOL ASM_NAME(synth_1to1_real_s_neon_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_real_s_neon_asm), %function +#endif ALIGN4 ASM_NAME(synth_1to1_real_s_neon_asm): push {r4-r6, lr} @@ -32,7 +42,7 @@ ASM_NAME(synth_1to1_real_s_neon_asm): mov r4, #4 mov r5, #128 mov r6, #64 -.Loop_start_1: +1: vld1.32 {q0,q1}, [WINDOW], r5 vld1.32 {q2,q3}, [WINDOW] vld1.32 {q4,q5}, [B0L, :128], r6 @@ -118,11 +128,11 @@ ASM_NAME(synth_1to1_real_s_neon_asm): vst1.32 {q12}, [SAMPLES]! subs r4, r4, #1 - bne .Loop_start_1 + bne 1b mov r4, #4 mov r6, #-64 -.Loop_start_2: +1: vld1.32 {q0,q1}, [WINDOW], r5 vld1.32 {q2,q3}, [WINDOW] vld1.32 {q4,q5}, [B0L, :128], r6 @@ -212,9 +222,11 @@ ASM_NAME(synth_1to1_real_s_neon_asm): vst1.32 {q12}, [SAMPLES]! subs r4, r4, #1 - bne .Loop_start_2 + bne 1b mov r0, #0 vpop {q4-q7} pop {r4-r6, pc} + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_neon_s32.S b/deps/mpg123/src/libmpg123/synth_stereo_neon_s32.S index bb3d4ef..dfb4114 100644 --- a/deps/mpg123/src/libmpg123/synth_stereo_neon_s32.S +++ b/deps/mpg123/src/libmpg123/synth_stereo_neon_s32.S @@ -18,8 +18,18 @@ return value: number of clipped samples */ +#ifndef _M_ARM + .code 32 +#endif +#ifndef __APPLE__ + .fpu neon +#endif + .text - .globl ASM_NAME(synth_1to1_s32_s_neon_asm) + GLOBAL_SYMBOL ASM_NAME(synth_1to1_s32_s_neon_asm) +#ifdef __ELF__ + .type ASM_NAME(synth_1to1_s32_s_neon_asm), %function +#endif ALIGN4 ASM_NAME(synth_1to1_s32_s_neon_asm): push {r4-r7, lr} @@ -27,7 +37,9 @@ ASM_NAME(synth_1to1_s32_s_neon_asm): ldr r4, [sp, #84] mov r7, sp sub sp, sp, #16 - bic sp, #0xff + mov r5, sp + and r5, r5, #0xf + sub sp, sp, r5 add WINDOW, WINDOW, #64 sub WINDOW, WINDOW, r4, lsl #2 @@ -35,7 +47,7 @@ ASM_NAME(synth_1to1_s32_s_neon_asm): mov r4, #4 mov r5, #128 mov r6, #64 -.Loop_start_1: +1: vld1.32 {q0,q1}, [WINDOW], r5 vld1.32 {q2,q3}, [WINDOW] vld1.32 {q4,q5}, [B0L, :128], r6 @@ -131,11 +143,11 @@ ASM_NAME(synth_1to1_s32_s_neon_asm): vst1.32 {q14}, [sp, :128] subs r4, r4, #1 - bne .Loop_start_1 + bne 1b mov r4, #4 mov r6, #-64 -.Loop_start_2: +1: vld1.32 {q0,q1}, [WINDOW], r5 vld1.32 {q2,q3}, [WINDOW] vld1.32 {q4,q5}, [B0L, :128], r6 @@ -235,7 +247,7 @@ ASM_NAME(synth_1to1_s32_s_neon_asm): vst1.32 {q14}, [sp, :128] subs r4, r4, #1 - bne .Loop_start_2 + bne 1b vld1.32 {q0}, [sp, :128] vpadd.i32 d0, d0, d1 @@ -245,3 +257,5 @@ ASM_NAME(synth_1to1_s32_s_neon_asm): mov sp, r7 vpop {q4-q7} pop {r4-r7, pc} + +NONEXEC_STACK diff --git a/deps/mpg123/src/libmpg123/synth_stereo_sse_accurate.S b/deps/mpg123/src/libmpg123/synth_stereo_sse_accurate.S index 617fbe9..e861257 100644 --- a/deps/mpg123/src/libmpg123/synth_stereo_sse_accurate.S +++ b/deps/mpg123/src/libmpg123/synth_stereo_sse_accurate.S @@ -31,7 +31,7 @@ .data #endif ALIGN32 -ASM_NAME(maxmin_s16): +maxmin_s16: .long 1191181824 /* 32767.0 */ .long 1191181824 .long 1191181824 @@ -64,10 +64,14 @@ ASM_NAME(synth_1to1_s_sse_accurate_asm): leal 64(WINDOW), WINDOW subl %eax, WINDOW + #undef _EBX_ + #define _EBX_ %eax + GET_GOT + movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -229,10 +233,10 @@ Loop_start_1: movaps %xmm5, %xmm2 movaps %xmm0, %xmm3 movaps %xmm0, %xmm4 - cmpnleps ASM_NAME(maxmin_s16), %xmm1 - cmpltps ASM_NAME(maxmin_s16)+16, %xmm2 - cmpnleps ASM_NAME(maxmin_s16), %xmm3 - cmpltps ASM_NAME(maxmin_s16)+16, %xmm4 + cmpnleps LOCAL_VAR(maxmin_s16), %xmm1 + cmpltps 16+LOCAL_VAR(maxmin_s16), %xmm2 + cmpnleps LOCAL_VAR(maxmin_s16), %xmm3 + cmpltps 16+LOCAL_VAR(maxmin_s16), %xmm4 cvtps2pi %xmm5, %mm0 cvtps2pi %xmm0, %mm1 movhlps %xmm5, %xmm5 @@ -274,12 +278,12 @@ Loop_start_1: leal 16(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -441,10 +445,10 @@ Loop_start_2: movaps %xmm5, %xmm2 movaps %xmm0, %xmm3 movaps %xmm0, %xmm4 - cmpnleps ASM_NAME(maxmin_s16), %xmm1 - cmpltps ASM_NAME(maxmin_s16)+16, %xmm2 - cmpnleps ASM_NAME(maxmin_s16), %xmm3 - cmpltps ASM_NAME(maxmin_s16)+16, %xmm4 + cmpnleps LOCAL_VAR(maxmin_s16), %xmm1 + cmpltps 16+LOCAL_VAR(maxmin_s16), %xmm2 + cmpnleps LOCAL_VAR(maxmin_s16), %xmm3 + cmpltps 16+LOCAL_VAR(maxmin_s16), %xmm4 cvtps2pi %xmm5, %mm0 cvtps2pi %xmm0, %mm1 movhlps %xmm5, %xmm5 @@ -486,7 +490,7 @@ Loop_start_2: leal 16(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_2 + jnz 1b pshufw $0xee, MMREG_CLIP, %mm0 paddw MMREG_CLIP, %mm0 diff --git a/deps/mpg123/src/libmpg123/synth_stereo_sse_float.S b/deps/mpg123/src/libmpg123/synth_stereo_sse_float.S index f63aede..ee658fb 100644 --- a/deps/mpg123/src/libmpg123/synth_stereo_sse_float.S +++ b/deps/mpg123/src/libmpg123/synth_stereo_sse_float.S @@ -30,7 +30,7 @@ .data #endif ALIGN32 -ASM_NAME(scale_sse): +scale_sse: .long 939524096 .long 939524096 .long 939524096 @@ -57,10 +57,14 @@ ASM_NAME(synth_1to1_real_s_sse_asm): leal 64(WINDOW), WINDOW subl %eax, WINDOW + #undef _EBX_ + #define _EBX_ %eax + GET_GOT + movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -218,8 +222,8 @@ Loop_start_1: subps %xmm1, %xmm0 addps %xmm4, %xmm0 - mulps ASM_NAME(scale_sse), %xmm5 - mulps ASM_NAME(scale_sse), %xmm0 + mulps LOCAL_VAR(scale_sse), %xmm5 + mulps LOCAL_VAR(scale_sse), %xmm0 movaps %xmm5, %xmm1 unpcklps %xmm0, %xmm5 unpckhps %xmm0, %xmm1 @@ -228,12 +232,12 @@ Loop_start_1: leal 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -391,8 +395,8 @@ Loop_start_2: addps %xmm1, %xmm0 addps %xmm4, %xmm0 - mulps ASM_NAME(scale_sse), %xmm5 - mulps ASM_NAME(scale_sse), %xmm0 + mulps LOCAL_VAR(scale_sse), %xmm5 + mulps LOCAL_VAR(scale_sse), %xmm0 movaps %xmm5, %xmm1 unpcklps %xmm0, %xmm5 unpckhps %xmm0, %xmm1 @@ -401,7 +405,7 @@ Loop_start_2: leal 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_2 + jnz 1b xorl %eax, %eax diff --git a/deps/mpg123/src/libmpg123/synth_stereo_sse_s32.S b/deps/mpg123/src/libmpg123/synth_stereo_sse_s32.S index 664e70a..60e7522 100644 --- a/deps/mpg123/src/libmpg123/synth_stereo_sse_s32.S +++ b/deps/mpg123/src/libmpg123/synth_stereo_sse_s32.S @@ -31,13 +31,13 @@ .data #endif ALIGN32 -ASM_NAME(scale_s32): +scale_s32: .long 1199570944 /* 65536.0 */ .long 1199570944 .long 1199570944 .long 1199570944 ALIGN16 -ASM_NAME(maxmin_s32): +maxmin_s32: .long 1191182335 /* 32767.999 */ .long 1191182335 .long 1191182335 @@ -70,10 +70,14 @@ ASM_NAME(synth_1to1_s32_s_sse_asm): leal 64(WINDOW), WINDOW subl %eax, WINDOW + #undef _EBX_ + #define _EBX_ %eax + GET_GOT + movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -235,12 +239,12 @@ Loop_start_1: movaps %xmm5, %xmm2 movaps %xmm0, %xmm3 movaps %xmm0, %xmm4 - mulps ASM_NAME(scale_s32), %xmm5 - mulps ASM_NAME(scale_s32), %xmm0 - cmpnleps ASM_NAME(maxmin_s32), %xmm1 - cmpltps ASM_NAME(maxmin_s32)+16, %xmm2 - cmpnleps ASM_NAME(maxmin_s32), %xmm3 - cmpltps ASM_NAME(maxmin_s32)+16, %xmm4 + mulps LOCAL_VAR(scale_s32), %xmm5 + mulps LOCAL_VAR(scale_s32), %xmm0 + cmpnleps LOCAL_VAR(maxmin_s32), %xmm1 + cmpltps 16+LOCAL_VAR(maxmin_s32), %xmm2 + cmpnleps LOCAL_VAR(maxmin_s32), %xmm3 + cmpltps 16+LOCAL_VAR(maxmin_s32), %xmm4 cvtps2pi %xmm5, %mm0 cvtps2pi %xmm0, %mm1 cvtps2pi %xmm1, %mm2 @@ -293,12 +297,12 @@ Loop_start_1: leal 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -460,12 +464,12 @@ Loop_start_2: movaps %xmm5, %xmm2 movaps %xmm0, %xmm3 movaps %xmm0, %xmm4 - mulps ASM_NAME(scale_s32), %xmm5 - mulps ASM_NAME(scale_s32), %xmm0 - cmpnleps ASM_NAME(maxmin_s32), %xmm1 - cmpltps ASM_NAME(maxmin_s32)+16, %xmm2 - cmpnleps ASM_NAME(maxmin_s32), %xmm3 - cmpltps ASM_NAME(maxmin_s32)+16, %xmm4 + mulps LOCAL_VAR(scale_s32), %xmm5 + mulps LOCAL_VAR(scale_s32), %xmm0 + cmpnleps LOCAL_VAR(maxmin_s32), %xmm1 + cmpltps 16+LOCAL_VAR(maxmin_s32), %xmm2 + cmpnleps LOCAL_VAR(maxmin_s32), %xmm3 + cmpltps 16+LOCAL_VAR(maxmin_s32), %xmm4 cvtps2pi %xmm5, %mm0 cvtps2pi %xmm0, %mm1 cvtps2pi %xmm1, %mm2 @@ -518,7 +522,7 @@ Loop_start_2: leal 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_2 + jnz 1b pshufw $0xee, MMREG_CLIP, %mm0 paddw MMREG_CLIP, %mm0 diff --git a/deps/mpg123/src/libmpg123/synth_stereo_x86_64.S b/deps/mpg123/src/libmpg123/synth_stereo_x86_64.S index c959b02..3aa4dfe 100644 --- a/deps/mpg123/src/libmpg123/synth_stereo_x86_64.S +++ b/deps/mpg123/src/libmpg123/synth_stereo_x86_64.S @@ -8,7 +8,7 @@ #include "mangle.h" -#ifdef _WIN64 +#ifdef IS_MSABI /* short *window; */ #define WINDOW %r10 /* short *b0l; */ @@ -57,7 +57,7 @@ ASM_NAME(maxmin_x86_64): ALIGN16 .globl ASM_NAME(synth_1to1_s_x86_64_asm) ASM_NAME(synth_1to1_s_x86_64_asm): -#ifdef _WIN64 /* should save xmm6-15 */ +#ifdef IS_MSABI /* should save xmm6-15 */ movl 40(%rsp), %eax /* 5th argument; placed after 32-byte shadow space */ subq $168, %rsp /* stack alignment + 10 xmm registers */ movaps %xmm6, (%rsp) @@ -72,7 +72,7 @@ ASM_NAME(synth_1to1_s_x86_64_asm): movaps %xmm15, 144(%rsp) #endif -#ifdef _WIN64 +#ifdef IS_MSABI shlq $32, %rax shrq $31, %rax movq %rcx, %r10 @@ -94,7 +94,7 @@ ASM_NAME(synth_1to1_s_x86_64_asm): movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 64(WINDOW), %xmm2 @@ -196,12 +196,12 @@ Loop_start_1: leaq 16(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (WINDOW), %xmm0 movups 16(WINDOW), %xmm1 movups 64(WINDOW), %xmm2 @@ -303,7 +303,7 @@ Loop_start_2: leaq 16(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_2 + jnz 1b movhlps XMMREG_CLIP, %xmm0 paddw XMMREG_CLIP, %xmm0 @@ -317,7 +317,7 @@ Loop_start_2: movd %xmm0, %eax andl $0xffff, %eax -#ifdef _WIN64 +#ifdef IS_MSABI movaps (%rsp), %xmm6 movaps 16(%rsp), %xmm7 movaps 32(%rsp), %xmm8 diff --git a/deps/mpg123/src/libmpg123/synth_stereo_x86_64_accurate.S b/deps/mpg123/src/libmpg123/synth_stereo_x86_64_accurate.S index c55143b..7e35bff 100644 --- a/deps/mpg123/src/libmpg123/synth_stereo_x86_64_accurate.S +++ b/deps/mpg123/src/libmpg123/synth_stereo_x86_64_accurate.S @@ -8,7 +8,7 @@ #include "mangle.h" -#ifdef _WIN64 +#ifdef IS_MSABI /* short *window; */ #define WINDOW %rsi /* short *b0l; */ @@ -56,7 +56,7 @@ ASM_NAME(maxmin_s16): ALIGN16 .globl ASM_NAME(synth_1to1_s_x86_64_accurate_asm) ASM_NAME(synth_1to1_s_x86_64_accurate_asm): -#ifdef _WIN64 /* should save xmm6-15 */ +#ifdef IS_MSABI /* should save xmm6-15 */ movl 40(%rsp), %eax /* 5th argument; placed after 32-byte shadow space */ pushq %rsi subq $176, %rsp /* 10 xmm registers + temp */ @@ -79,7 +79,7 @@ ASM_NAME(synth_1to1_s_x86_64_accurate_asm): xorps %xmm0, %xmm0 movaps %xmm0, TEMP_CLIP -#ifdef _WIN64 +#ifdef IS_MSABI shlq $32, %rax shrq $30, %rax movq %rcx, %rbx @@ -95,7 +95,7 @@ ASM_NAME(synth_1to1_s_x86_64_accurate_asm): movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (WINDOW), %xmm8 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -254,12 +254,12 @@ Loop_start_1: leaq 16(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (WINDOW), %xmm8 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -418,7 +418,7 @@ Loop_start_2: leaq 16(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_2 + jnz 1b movaps TEMP_CLIP, %xmm4 movhlps %xmm4, %xmm0 @@ -433,7 +433,7 @@ Loop_start_2: movd %xmm0, %eax andl $0xffff, %eax -#ifdef _WIN64 +#ifdef IS_MSABI movaps (%rsp), %xmm6 movaps 16(%rsp), %xmm7 movaps 32(%rsp), %xmm8 diff --git a/deps/mpg123/src/libmpg123/synth_stereo_x86_64_float.S b/deps/mpg123/src/libmpg123/synth_stereo_x86_64_float.S index b19cccb..a1b381a 100644 --- a/deps/mpg123/src/libmpg123/synth_stereo_x86_64_float.S +++ b/deps/mpg123/src/libmpg123/synth_stereo_x86_64_float.S @@ -8,7 +8,7 @@ #include "mangle.h" -#ifdef _WIN64 +#ifdef IS_MSABI /* short *window; */ #define WINDOW %r10 /* short *b0l; */ @@ -50,7 +50,7 @@ ASM_NAME(scale_x86_64): ALIGN16 .globl ASM_NAME(synth_1to1_real_s_x86_64_asm) ASM_NAME(synth_1to1_real_s_x86_64_asm): -#ifdef _WIN64 /* should save xmm6-15 */ +#ifdef IS_MSABI /* should save xmm6-15 */ movl 40(%rsp), %eax /* 5th argument; placed after 32-byte shadow space */ subq $168, %rsp /* stack alignment + 10 xmm registers */ movaps %xmm6, (%rsp) @@ -67,7 +67,7 @@ ASM_NAME(synth_1to1_real_s_x86_64_asm): leaq ASM_NAME(scale_x86_64)(%rip), %r11 -#ifdef _WIN64 +#ifdef IS_MSABI shlq $32, %rax shrq $30, %rax movq %rcx, %r10 @@ -83,7 +83,7 @@ ASM_NAME(synth_1to1_real_s_x86_64_asm): movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (WINDOW), %xmm8 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -226,12 +226,12 @@ Loop_start_1: leaq 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (WINDOW), %xmm8 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -374,11 +374,11 @@ Loop_start_2: leaq 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_2 + jnz 1b xorl %eax, %eax -#ifdef _WIN64 +#ifdef IS_MSABI movaps (%rsp), %xmm6 movaps 16(%rsp), %xmm7 movaps 32(%rsp), %xmm8 diff --git a/deps/mpg123/src/libmpg123/synth_stereo_x86_64_s32.S b/deps/mpg123/src/libmpg123/synth_stereo_x86_64_s32.S index 8ffcc04..c48b1b4 100644 --- a/deps/mpg123/src/libmpg123/synth_stereo_x86_64_s32.S +++ b/deps/mpg123/src/libmpg123/synth_stereo_x86_64_s32.S @@ -8,7 +8,7 @@ #include "mangle.h" -#ifdef _WIN64 +#ifdef IS_MSABI /* short *window; */ #define WINDOW %rsi /* short *b0l; */ @@ -63,7 +63,7 @@ ASM_NAME(maxmin_s32): ALIGN16 .globl ASM_NAME(synth_1to1_s32_s_x86_64_asm) ASM_NAME(synth_1to1_s32_s_x86_64_asm): -#ifdef _WIN64 /* should save xmm6-15 */ +#ifdef IS_MSABI /* should save xmm6-15 */ movl 40(%rsp), %eax /* 5th argument; placed after 32-byte shadow space */ pushq %rsi pushq %rdi @@ -82,7 +82,7 @@ ASM_NAME(synth_1to1_s32_s_x86_64_asm): subq $24, %rsp /* stack alignment + temp */ #endif -#ifdef _WIN64 +#ifdef IS_MSABI shlq $32, %rax shrq $30, %rax movq %rcx, %rsi @@ -105,7 +105,7 @@ ASM_NAME(synth_1to1_s32_s_x86_64_asm): movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (WINDOW), %xmm8 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -268,12 +268,12 @@ Loop_start_1: leaq 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (WINDOW), %xmm8 movups 16(WINDOW), %xmm1 movups 32(WINDOW), %xmm2 @@ -436,7 +436,7 @@ Loop_start_2: leaq 32(SAMPLES), SAMPLES decl %ecx - jnz Loop_start_2 + jnz 1b movaps TEMP_CLIP, %xmm4 movhlps %xmm4, %xmm0 @@ -451,7 +451,7 @@ Loop_start_2: movd %xmm0, %eax andl $0xffff, %eax -#ifdef _WIN64 +#ifdef IS_MSABI movaps (%rsp), %xmm6 movaps 16(%rsp), %xmm7 movaps 32(%rsp), %xmm8 diff --git a/deps/mpg123/src/libmpg123/synth_x86_64.S b/deps/mpg123/src/libmpg123/synth_x86_64.S index 94931df..eac7237 100644 --- a/deps/mpg123/src/libmpg123/synth_x86_64.S +++ b/deps/mpg123/src/libmpg123/synth_x86_64.S @@ -8,7 +8,7 @@ #include "mangle.h" -#ifdef _WIN64 +#ifdef IS_MSABI /* short *window; */ #define ARG0 %r10 /* short *b0; */ @@ -57,7 +57,7 @@ ASM_NAME(maxmin_x86_64): ALIGN16 .globl ASM_NAME(synth_1to1_x86_64_asm) ASM_NAME(synth_1to1_x86_64_asm): -#ifdef _WIN64 /* should save xmm6-15 */ +#ifdef IS_MSABI /* should save xmm6-15 */ movq %rcx, ARG0 subq $104, %rsp /* stack alignment + 6 xmm registers */ movaps %xmm6, (%rsp) @@ -82,7 +82,7 @@ ASM_NAME(synth_1to1_x86_64_asm): movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (ARG0), %xmm0 movups 16(ARG0), %xmm1 movups 64(ARG0), %xmm2 @@ -148,12 +148,12 @@ Loop_start_1: leaq 16(ARG2), ARG2 decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (ARG0), %xmm0 movups 16(ARG0), %xmm1 movups 64(ARG0), %xmm2 @@ -219,7 +219,7 @@ Loop_start_2: leaq 16(ARG2), ARG2 decl %ecx - jnz Loop_start_2 + jnz 1b pshuflw $0xee, XMMREG_CLIP, %xmm0 movhlps XMMREG_CLIP, %xmm1 @@ -230,7 +230,7 @@ Loop_start_2: movd XMMREG_CLIP, %eax -#ifdef _WIN64 +#ifdef IS_MSABI movaps (%rsp), %xmm6 movaps 16(%rsp), %xmm7 movaps 32(%rsp), %xmm12 diff --git a/deps/mpg123/src/libmpg123/synth_x86_64_accurate.S b/deps/mpg123/src/libmpg123/synth_x86_64_accurate.S index 50c5b17..d841e8e 100644 --- a/deps/mpg123/src/libmpg123/synth_x86_64_accurate.S +++ b/deps/mpg123/src/libmpg123/synth_x86_64_accurate.S @@ -8,7 +8,7 @@ #include "mangle.h" -#ifdef _WIN64 +#ifdef IS_MSABI /* short *window; */ #define ARG0 %r10 /* short *b0; */ @@ -56,7 +56,7 @@ ASM_NAME(maxmin_s16): ALIGN16 .globl ASM_NAME(synth_1to1_x86_64_accurate_asm) ASM_NAME(synth_1to1_x86_64_accurate_asm): -#ifdef _WIN64 /* should save xmm6-15 */ +#ifdef IS_MSABI /* should save xmm6-15 */ movq %rcx, ARG0 subq $152, %rsp /* stack alignment + 9 xmm registers */ movaps %xmm6, (%rsp) @@ -84,7 +84,7 @@ ASM_NAME(synth_1to1_x86_64_accurate_asm): movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (ARG0), %xmm8 movups 16(ARG0), %xmm1 movups 32(ARG0), %xmm2 @@ -176,12 +176,12 @@ Loop_start_1: leaq 16(ARG2), ARG2 decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (ARG0), %xmm8 movups 16(ARG0), %xmm1 movups 32(ARG0), %xmm2 @@ -273,7 +273,7 @@ Loop_start_2: leaq 16(ARG2), ARG2 decl %ecx - jnz Loop_start_2 + jnz 1b pshuflw $0xee, XMMREG_CLIP, %xmm0 movhlps XMMREG_CLIP, %xmm1 @@ -284,7 +284,7 @@ Loop_start_2: movd XMMREG_CLIP, %eax -#ifdef _WIN64 +#ifdef IS_MSABI movaps (%rsp), %xmm6 movaps 16(%rsp), %xmm7 movaps 32(%rsp), %xmm8 diff --git a/deps/mpg123/src/libmpg123/synth_x86_64_float.S b/deps/mpg123/src/libmpg123/synth_x86_64_float.S index 36f2e32..a26ee6b 100644 --- a/deps/mpg123/src/libmpg123/synth_x86_64_float.S +++ b/deps/mpg123/src/libmpg123/synth_x86_64_float.S @@ -8,7 +8,7 @@ #include "mangle.h" -#ifdef _WIN64 +#ifdef IS_MSABI /* short *window; */ #define ARG0 %r10 /* short *b0; */ @@ -50,7 +50,7 @@ ASM_NAME(scale_x86_64): ALIGN16 .globl ASM_NAME(synth_1to1_real_x86_64_asm) ASM_NAME(synth_1to1_real_x86_64_asm): -#ifdef _WIN64 /* should save xmm6-15 */ +#ifdef IS_MSABI /* should save xmm6-15 */ movq %rcx, ARG0 subq $120, %rsp /* stack alignment + 7 xmm registers */ movaps %xmm6, (%rsp) @@ -73,7 +73,7 @@ ASM_NAME(synth_1to1_real_x86_64_asm): movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (ARG0), %xmm8 movups 16(ARG0), %xmm1 movups 32(ARG0), %xmm2 @@ -154,12 +154,12 @@ Loop_start_1: leaq 32(ARG2), ARG2 decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (ARG0), %xmm8 movups 16(ARG0), %xmm1 movups 32(ARG0), %xmm2 @@ -240,11 +240,11 @@ Loop_start_2: leaq 32(ARG2), ARG2 decl %ecx - jnz Loop_start_2 + jnz 1b xorl %eax, %eax -#ifdef _WIN64 +#ifdef IS_MSABI movaps (%rsp), %xmm6 movaps 16(%rsp), %xmm7 movaps 32(%rsp), %xmm8 diff --git a/deps/mpg123/src/libmpg123/synth_x86_64_s32.S b/deps/mpg123/src/libmpg123/synth_x86_64_s32.S index c445c9d..7f964a8 100644 --- a/deps/mpg123/src/libmpg123/synth_x86_64_s32.S +++ b/deps/mpg123/src/libmpg123/synth_x86_64_s32.S @@ -8,7 +8,7 @@ #include "mangle.h" -#ifdef _WIN64 +#ifdef IS_MSABI /* short *window; */ #define ARG0 %r10 /* short *b0; */ @@ -63,7 +63,7 @@ ASM_NAME(maxmin_s32): ALIGN16 .globl ASM_NAME(synth_1to1_s32_x86_64_asm) ASM_NAME(synth_1to1_s32_x86_64_asm): -#ifdef _WIN64 /* should save xmm6-15 */ +#ifdef IS_MSABI /* should save xmm6-15 */ movq %rcx, ARG0 subq $168, %rsp /* stack alignment + 10 xmm registers */ movaps %xmm6, (%rsp) @@ -94,7 +94,7 @@ ASM_NAME(synth_1to1_s32_x86_64_asm): movl $4, %ecx ALIGN16 -Loop_start_1: +1: movups (ARG0), %xmm8 movups 16(ARG0), %xmm1 movups 32(ARG0), %xmm2 @@ -186,12 +186,12 @@ Loop_start_1: leaq 32(ARG2), ARG2 decl %ecx - jnz Loop_start_1 + jnz 1b movl $4, %ecx ALIGN16 -Loop_start_2: +1: movups (ARG0), %xmm8 movups 16(ARG0), %xmm1 movups 32(ARG0), %xmm2 @@ -283,7 +283,7 @@ Loop_start_2: leaq 32(ARG2), ARG2 decl %ecx - jnz Loop_start_2 + jnz 1b pshuflw $0xee, XMMREG_CLIP, %xmm0 movhlps XMMREG_CLIP, %xmm1 @@ -294,7 +294,7 @@ Loop_start_2: movd XMMREG_CLIP, %eax -#ifdef _WIN64 +#ifdef IS_MSABI movaps (%rsp), %xmm6 movaps 16(%rsp), %xmm7 movaps 32(%rsp), %xmm8 diff --git a/deps/mpg123/src/libmpg123/tabinit.c b/deps/mpg123/src/libmpg123/tabinit.c index 548da5c..c21d2f3 100644 --- a/deps/mpg123/src/libmpg123/tabinit.c +++ b/deps/mpg123/src/libmpg123/tabinit.c @@ -90,7 +90,7 @@ void prepare_decode_tables() } #ifdef OPT_MMXORSSE -#if !defined(OPT_X86_64) && !defined(OPT_NEON) +#if !defined(OPT_X86_64) && !defined(OPT_NEON) && !defined(OPT_NEON64) && !defined(OPT_AVX) void make_decode_tables_mmx_asm(long scaleval, float* decwin_mmx, float *decwins); void make_decode_tables_mmx(mpg123_handle *fr) { @@ -163,21 +163,51 @@ void make_decode_tables_mmx(mpg123_handle *fr) #endif #endif +#ifdef REAL_IS_FIXED +/* Need saturating multiplication that keeps table values in 32 bit range, + with the option to swap sign at will (so -2**31 is out). + This code is far from the decoder core and so assembly optimization might + be overkill. */ +static int32_t sat_mul32(int32_t a, int32_t b) +{ + int64_t prod = (int64_t)a * (int64_t)b; + /* TODO: record the clipping? An extra flag? */ + if(prod > 2147483647L) return 2147483647L; + if(prod < -2147483647L) return -2147483647L; + return (int32_t)prod; +} +#endif + void make_decode_tables(mpg123_handle *fr) { int i,j; int idx = 0; + double scaleval; +#ifdef REAL_IS_FIXED + real scaleval_long; +#endif /* Scale is always based on 1.0 . */ - double scaleval = -0.5*(fr->lastscale < 0 ? fr->p.outscale : fr->lastscale); + scaleval = -0.5*(fr->lastscale < 0 ? fr->p.outscale : fr->lastscale); debug1("decode tables with scaleval %g", scaleval); #ifdef REAL_IS_FIXED - long scaleval_long = DOUBLE_TO_REAL_15(scaleval); + scaleval_long = DOUBLE_TO_REAL_15(scaleval); + debug1("decode table with fixed scaleval %li", (long)scaleval_long); + if(scaleval_long > 28618 || scaleval_long < -28618) + { + /* TODO: Limit the scaleval itself or limit the multiplication afterwards? + The former basically disables significant amplification for fixed-point + decoders, but avoids (possibly subtle) distortion. */ + /* This would limit the amplification instead: + scaleval_long = scaleval_long < 0 ? -28618 : 28618; */ + if(NOQUIET) warning("Desired amplification may introduce distortion."); + } #endif for(i=0,j=0;i<256;i++,j++,idx+=32) { if(idx < 512+16) #ifdef REAL_IS_FIXED - fr->decwin[idx+16] = fr->decwin[idx] = REAL_SCALE_WINDOW(intwinbase[j] * scaleval_long); + fr->decwin[idx+16] = fr->decwin[idx] = + REAL_SCALE_WINDOW(sat_mul32(intwinbase[j],scaleval_long)); #else fr->decwin[idx+16] = fr->decwin[idx] = DOUBLE_TO_REAL((double) intwinbase[j] * scaleval); #endif @@ -196,7 +226,8 @@ void make_decode_tables(mpg123_handle *fr) { if(idx < 512+16) #ifdef REAL_IS_FIXED - fr->decwin[idx+16] = fr->decwin[idx] = REAL_SCALE_WINDOW(intwinbase[j] * scaleval_long); + fr->decwin[idx+16] = fr->decwin[idx] = + REAL_SCALE_WINDOW(sat_mul32(intwinbase[j],scaleval_long)); #else fr->decwin[idx+16] = fr->decwin[idx] = DOUBLE_TO_REAL((double) intwinbase[j] * scaleval); #endif @@ -210,8 +241,15 @@ void make_decode_tables(mpg123_handle *fr) scaleval = - scaleval; #endif } -#if defined(OPT_X86_64) || defined(OPT_ALTIVEC) || defined(OPT_SSE) || defined(OPT_ARM) || defined(OPT_NEON) - if(fr->cpu_opts.type == x86_64 || fr->cpu_opts.type == altivec || fr->cpu_opts.type == sse || fr->cpu_opts.type == arm || fr->cpu_opts.type == neon) +#if defined(OPT_X86_64) || defined(OPT_ALTIVEC) || defined(OPT_SSE) || defined(OPT_SSE_VINTAGE) || defined(OPT_ARM) || defined(OPT_NEON) || defined(OPT_NEON64) || defined(OPT_AVX) + if( fr->cpu_opts.type == x86_64 + || fr->cpu_opts.type == altivec + || fr->cpu_opts.type == sse + || fr->cpu_opts.type == sse_vintage + || fr->cpu_opts.type == arm + || fr->cpu_opts.type == neon + || fr->cpu_opts.type == neon64 + || fr->cpu_opts.type == avx ) { /* for float SSE / AltiVec / ARM decoder */ for(i=512; i<512+32; i++) { @@ -221,8 +259,8 @@ void make_decode_tables(mpg123_handle *fr) { fr->decwin[512+32+i] = -fr->decwin[511-i]; } -#ifdef OPT_NEON - if(fr->cpu_opts.type == neon) +#if defined(OPT_NEON) || defined(OPT_NEON64) + if(fr->cpu_opts.type == neon || fr->cpu_opts.type == neon64) { for(i=0; i<512; i+=2) { @@ -239,7 +277,7 @@ void make_decode_tables(mpg123_handle *fr) int make_conv16to8_table(mpg123_handle *fr) { int i; - int mode = fr->af.encoding; + int mode = fr->af.dec_enc; /* * ????: 8.0 is right but on SB cards '2.0' is a better value ??? @@ -256,38 +294,94 @@ int make_conv16to8_table(mpg123_handle *fr) fr->conv16to8 = fr->conv16to8_buf + 4096; } - if(fr->af.encoding == MPG123_ENC_ULAW_8){ - double m=127.0 / log(256.0); - int c1; + switch(mode) + { + case MPG123_ENC_ULAW_8: + { + double m=127.0 / log(256.0); + int c1; + + for(i=-4096;i<4096;i++) + { + /* dunno whether this is a valid transformation rule ?!?!? */ + if(i < 0) + c1 = 127 - (int) (log( 1.0 - 255.0 * (double) i*mul / 32768.0 ) * m); + else + c1 = 255 - (int) (log( 1.0 + 255.0 * (double) i*mul / 32768.0 ) * m); + if(c1 < 0 || c1 > 255) + { + if(NOQUIET) error2("Converror %d %d",i,c1); + return -1; + } + if(c1 == 0) + c1 = 2; + fr->conv16to8[i] = (unsigned char) c1; + } + } + break; + case MPG123_ENC_SIGNED_8: + for(i=-4096;i<4096;i++) + fr->conv16to8[i] = i>>5; + break; + case MPG123_ENC_UNSIGNED_8: + for(i=-4096;i<4096;i++) + fr->conv16to8[i] = (i>>5)+128; + break; + case MPG123_ENC_ALAW_8: + { + /* + Let's believe Wikipedia (http://en.wikipedia.org/wiki/G.711) that this + is the correct table: + + s0000000wxyza... n000wxyz [0-31] -> [0-15] + s0000001wxyza... n001wxyz [32-63] -> [16-31] + s000001wxyzab... n010wxyz [64-127] -> [32-47] + s00001wxyzabc... n011wxyz [128-255] -> [48-63] + s0001wxyzabcd... n100wxyz [256-511] -> [64-79] + s001wxyzabcde... n101wxyz [512-1023] -> [80-95] + s01wxyzabcdef... n110wxyz [1024-2047] -> [96-111] + s1wxyzabcdefg... n111wxyz [2048-4095] -> [112-127] - for(i=-4096;i<4096;i++) { -/* dunno whether this is a valid transformation rule ?!?!? */ - if(i < 0) - c1 = 127 - (int) (log( 1.0 - 255.0 * (double) i*mul / 32768.0 ) * m); - else - c1 = 255 - (int) (log( 1.0 + 255.0 * (double) i*mul / 32768.0 ) * m); - if((c1 < 0 || c1 > 255) && NOQUIET) error2("Converror %d %d",i,c1); + Let's extend to -4096, too. + Also, bytes are xored with 0x55 for transmission. + + Since it sounds OK, I assume it is fine;-) + */ + for(i=0; i<64; ++i) + fr->conv16to8[i] = ((unsigned int)i)>>1; + for(i=64; i<128; ++i) + fr->conv16to8[i] = ((((unsigned int)i)>>2) & 0xf) | (2<<4); + for(i=128; i<256; ++i) + fr->conv16to8[i] = ((((unsigned int)i)>>3) & 0xf) | (3<<4); + for(i=256; i<512; ++i) + fr->conv16to8[i] = ((((unsigned int)i)>>4) & 0xf) | (4<<4); + for(i=512; i<1024; ++i) + fr->conv16to8[i] = ((((unsigned int)i)>>5) & 0xf) | (5<<4); + for(i=1024; i<2048; ++i) + fr->conv16to8[i] = ((((unsigned int)i)>>6) & 0xf) | (6<<4); + for(i=2048; i<4096; ++i) + fr->conv16to8[i] = ((((unsigned int)i)>>7) & 0xf) | (7<<4); + + for(i=-4095; i<0; ++i) + fr->conv16to8[i] = fr->conv16to8[-i] | 0x80; + + fr->conv16to8[-4096] = fr->conv16to8[-4095]; + + for(i=-4096;i<4096;i++) + { + /* fr->conv16to8[i] = - i>>5; */ + /* fprintf(stderr, "table %i %i\n", i<conv16to8[i]); */ + fr->conv16to8[i] ^= 0x55; + } + } + break; + default: + fr->err = MPG123_ERR_16TO8TABLE; + if(NOQUIET) error("Unknown 8 bit encoding choice."); + return -1; + break; + } - if(c1 == 0) - c1 = 2; - fr->conv16to8[i] = (unsigned char) c1; - } - } - else if(mode == MPG123_ENC_SIGNED_8) { - for(i=-4096;i<4096;i++) { - fr->conv16to8[i] = i>>5; - } - } - else if(mode == MPG123_ENC_UNSIGNED_8) { - for(i=-4096;i<4096;i++) { - fr->conv16to8[i] = (i>>5)+128; - } - } - else { - for(i=-4096;i<4096;i++) { - fr->conv16to8[i] = 0; - } - } return 0; } #endif diff --git a/deps/mpg123/src/libmpg123/tabinit_mmx.S b/deps/mpg123/src/libmpg123/tabinit_mmx.S index 9ebab87..63586a7 100644 --- a/deps/mpg123/src/libmpg123/tabinit_mmx.S +++ b/deps/mpg123/src/libmpg123/tabinit_mmx.S @@ -4,6 +4,8 @@ copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by the mysterious higway (apparently) + + See synth_mmx.S about license history. */ #include "mangle.h" @@ -86,37 +88,53 @@ intwindiv: /* void make_decode_tables_mmx_asm(long scaleval, float* decwin_mmx, float *decwins); */ .globl ASM_NAME(make_decode_tables_mmx_asm) ASM_NAME(make_decode_tables_mmx_asm): + pushl %ebp + mov %esp,%ebp + sub $12,%esp pushl %edi pushl %esi pushl %ebx -/* stack: 0=ebx, 4=esi, 8=edi, 12=back, 16=scaleval, 20=decwin_mmx, 24=decwins */ + GET_GOT + lea LOCAL_VAR(intwinbase),%edi + mov LOCAL_VAR(intwindiv),%ecx + mov %edi,-4(%ebp) + lea 444(%edi),%eax + mov %eax,-8(%ebp) + mov %ecx,-12(%ebp) + +/* stack: -12(%ebp)=*intwindiv, -8(%ebp)=intwinbase+444, -4(%ebp)=intwinbase, ... , + 4(%ebp)=back, 8(%ebp)=scaleval, 12(%ebp)=decwin_mmx, 16(%ebp)=decwins */ +#define INTWINDIV -12(%ebp) +#define INTWINBASE_PLUS_444 -8(%ebp) +#define INTWINBASE -4(%ebp) +#define SCALEVAL 8(%ebp) +#define DECWIN_MMX 12(%ebp) +#define DECWINS 16(%ebp) + xorl %ecx,%ecx xorl %ebx,%ebx movl $32,%esi - movl $intwinbase,%edi - negl 16(%esp) /* scaleval */ + + negl SCALEVAL /* scaleval */ pushl $2 /* intwinbase step */ -/* stack: 20=scaleval 24=decwin_mmx, 28=decwins */ .L00: cmpl $528,%ecx jnc .L02 movswl (%edi),%eax - cmpl $intwinbase+444,%edi + cmpl INTWINBASE_PLUS_444,%edi jc .L01 addl $60000,%eax .L01: pushl %eax -/* stack: 24=scaleval 28=decwin_mmx, 32=decwins */ fildl (%esp) - fdivs intwindiv - fimull 24(%esp) /* scaleval */ + fdivs INTWINDIV + fimull SCALEVAL /* scaleval */ /* eax used to be popped the line before... I'll just use it here a bit */ - movl 28(%esp),%eax /* decwin_mmx */ + movl DECWIN_MMX,%eax /* decwin_mmx */ fsts (%eax,%ecx,4) fstps 64(%eax,%ecx,4) popl %eax -/* stack: 20=scaleval 24=decwin_mmx, 28=decwins */ .L02: leal -1(%esi),%edx andl %ebx,%edx @@ -125,12 +143,12 @@ ASM_NAME(make_decode_tables_mmx_asm): addl $-1023,%ecx testl %esi,%ebx jz .L03 - negl 20(%esp) + negl SCALEVAL .L03: addl %esi,%ecx addl (%esp),%edi incl %ebx - cmpl $intwinbase,%edi + cmpl INTWINBASE,%edi jz .L04 cmpl $256,%ebx jnz .L00 @@ -146,12 +164,12 @@ ASM_NAME(make_decode_tables_mmx_asm): cmpl $528,%ecx jnc .L11 movswl (%edi),%eax - cmpl $intwinbase+444,%edi + cmpl INTWINBASE_PLUS_444,%edi jc .L06 addl $60000,%eax .L06: cltd - imull 20(%esp) + imull SCALEVAL shrdl $17,%edx,%eax cmpl $32767,%eax movl $1055,%edx @@ -165,8 +183,7 @@ ASM_NAME(make_decode_tables_mmx_asm): .L08: /* going to use ebx for decwins, watch the jumps */ pushl %ebx -/* stack: 24=scaleval 28=decwin_mmx, 32=decwins */ - movl 32(%esp),%ebx + movl DECWINS,%ebx cmpl $512,%ecx jnc .L09 subl %ecx,%edx @@ -188,12 +205,12 @@ ASM_NAME(make_decode_tables_mmx_asm): addl $-1023,%ecx testl %esi,%ebx jz .L12 - negl 20(%esp) + negl SCALEVAL .L12: addl %esi,%ecx addl (%esp),%edi incl %ebx - cmpl $intwinbase,%edi + cmpl INTWINBASE,%edi jz .L13 cmpl $256,%ebx jnz .L05 @@ -205,6 +222,8 @@ ASM_NAME(make_decode_tables_mmx_asm): popl %ebx popl %esi popl %edi + mov %ebp,%esp + pop %ebp ret NONEXEC_STACK diff --git a/deps/mpg123/src/metaprint.c b/deps/mpg123/src/metaprint.c index 57db8d2..4fffb89 100644 --- a/deps/mpg123/src/metaprint.c +++ b/deps/mpg123/src/metaprint.c @@ -1,16 +1,41 @@ /* id3print: display routines for ID3 tags (including filtering of UTF8 to ASCII) - copyright 2006-2010 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 2006-2016 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Thomas Orgis */ +/* Need snprintf(). */ +#define _DEFAULT_SOURCE +#define _BSD_SOURCE #include "mpg123app.h" +#include "common.h" #include "genre.h" #include "debug.h" -const char joker_symbol = '*'; +static const char joker_symbol = '*'; + +/* Metadata name field texts with index enumeration. */ +enum tagcode { TITLE=0, ARTIST, ALBUM, COMMENT, YEAR, GENRE, FIELDS }; +static const char* name[FIELDS] = +{ + "Title" +, "Artist" +, "Album" +, "Comment" +, "Year" +, "Genre" +}; + +/* Two-column printing: max length of left and right name strings. + see print_id3 for what goes left or right. + Choose namelen[0] >= namelen[1]! */ +static const int namelen[2] = {7, 6}; +/* Overhead is Name + ": " and also plus " " for right column. */ +/* pedantic C89 does not like: +const int overhead[2] = { namelen[0]+2, namelen[1]+4 }; */ +static const int overhead[2] = { 9, 10 }; static void utf8_ascii(mpg123_string *dest, mpg123_string *source); /* Copy UTF-8 string or melt it down to ASCII, also returning the character length. */ @@ -48,17 +73,76 @@ static void id3_gap(mpg123_string *dest, size_t count, char *v1, size_t *len) } } -/* print tags... limiting the UTF-8 to ASCII */ +/* Print one metadata entry on a line, aligning the beginning. */ +static void print_oneline( FILE* out +, const mpg123_string *tag, enum tagcode fi, int long_mode ) +{ + char fmt[14]; /* "%s:%-XXXs%s\n" plus one null */ + if(!tag[fi].fill && !long_mode) + return; + + if(long_mode) + fprintf(out, "\t"); + snprintf( fmt, sizeof(fmt)-1, "%%s:%%-%ds%%s\n" + , 1+namelen[0]-(int)strlen(name[fi]) ); + fprintf(out, fmt, name[fi], " ", tag[fi].fill ? tag[fi].p : ""); +} + +/* + Print a pair of tag name-value pairs along each other in two columns or + each on a line if that is not sensible. + This takes a given length (in columns) into account, not just bytes. + If that length would be computed taking grapheme clusters into account, things + could be fine for the whole world of Unicode. So far we ride only on counting + possibly multibyte characters (unless mpg123_strlen() got adapted meanwhile). +*/ +static void print_pair +( + FILE* out /* Output stream. */ +, const int *climit /* Maximum width of columns (two values). */ +, const mpg123_string *tag /* array of tag value strings */ +, const size_t *len /* array of character/column lengths */ +, enum tagcode f0, enum tagcode f1 /* field indices for column 0 and 1 */ +){ + /* Two-column printout if things match, dumb printout otherwise. */ + if( tag[f0].fill && tag[f1].fill + && len[f0] <= (size_t)climit[0] && len[f1] <= (size_t)climit[1] ) + { + char cfmt[35]; /* "%s:%-XXXs%-XXXs %s:%-XXXs%-XXXs\n" plus one extra null from snprintf */ + int chardiff[2]; + size_t bytelen; + + /* difference between character length and byte length */ + bytelen = strlen(tag[f0].p); + chardiff[0] = len[f0] < bytelen ? bytelen-len[f0] : 0; + bytelen = strlen(tag[f1].p); + chardiff[1] = len[f1] < bytelen ? bytelen-len[f1] : 0; + + /* Two-column format string with added padding for multibyte chars. */ + snprintf( cfmt, sizeof(cfmt)-1, "%%s:%%-%ds%%-%ds %%s:%%-%ds%%-%ds\n" + , 1+namelen[0]-(int)strlen(name[f0]), climit[0]+chardiff[0] + , 1+namelen[1]-(int)strlen(name[f1]), climit[1]+chardiff[1] ); + /* Actual printout of name and value pairs. */ + fprintf(out, cfmt, name[f0], " ", tag[f0].p, name[f1], " ", tag[f1].p); + } + else + { + print_oneline(out, tag, f0, FALSE); + print_oneline(out, tag, f1, FALSE); + } +} + +/* Print tags... limiting the UTF-8 to ASCII, if necessary. */ void print_id3_tag(mpg123_handle *mh, int long_id3, FILE *out) { char genre_from_v1 = 0; - enum { TITLE=0, ARTIST, ALBUM, COMMENT, YEAR, GENRE, FIELDS } ti; + enum tagcode ti; mpg123_string tag[FIELDS]; size_t len[FIELDS]; mpg123_id3v1 *v1; mpg123_id3v2 *v2; /* no memory allocated here, so return is safe */ - for(ti=0; ti 200) + linelimit = 200; /* Not too wide. Also for format string safety. */ + /* Divide the space between the two columns, not wasting any. */ + climit[1] = linelimit/2-overhead[0]; + climit[0] = linelimit-linelimit/2-overhead[1]; + debug3("linelimits: %i < %i | %i >", linelimit, climit[0], climit[1]); + + if(climit[0] <= 0 || climit[1] <= 0) { - if(tag[YEAR].fill) - fprintf(out,"Year: %s\n", tag[YEAR].p); - if(tag[GENRE].fill) - fprintf(out,"Genre: %s\n", tag[GENRE].p); + /* Ensure disabled column printing, no play with signedness in comparisons. */ + climit[0] = 0; + climit[1] = 0; } + fprintf(out,"\n"); /* Still use one separator line. Too ugly without. */ + print_pair(out, climit, tag, len, TITLE, ARTIST); + print_pair(out, climit, tag, len, COMMENT, ALBUM ); + print_pair(out, climit, tag, len, YEAR, GENRE ); } for(ti=0; ti -#include -#include -#include -#include -#include - -#include "mpg123app.h" -#include "debug.h" - -#ifndef HAVE_LTDL -#error Cannot build without LTDL library support -#endif - -#define MODULE_SYMBOL_PREFIX "mpg123_" -#define MODULE_SYMBOL_SUFFIX "_module_info" - -/* It's nasty to hardcode that here... - also it does need hacking around libtool's hardcoded .la paths: - When the .la file is in the same dir as .so file, you need libdir='.' in there. */ -static const char* modulesearch[] = -{ - "../lib/mpg123" - ,"plugins" -}; - -static char *get_the_cwd(); /* further down... */ -static char *get_module_dir() -{ - /* Either PKGLIBDIR is accessible right away or we search for some possible plugin dirs relative to binary path. */ - DIR* dir = NULL; - char *moddir = NULL; - const char *defaultdir; - /* Compiled-in default module dir or environment variable MPG123_MODDIR. */ - defaultdir = getenv("MPG123_MODDIR"); - if(defaultdir == NULL) - defaultdir=PKGLIBDIR; - - dir = opendir(defaultdir); - if(dir != NULL) - { - size_t l = strlen(defaultdir); - - if(param.verbose > 1) fprintf(stderr, "Using default module dir: %s\n", defaultdir); - moddir = malloc(l+1); - if(moddir != NULL) - { - strcpy(moddir, defaultdir); - moddir[l] = 0; - } - closedir(dir); - } - else /* Search relative to binary. */ - { - size_t i; - for(i=0; i 1) fprintf(stderr, "Looking for module dir: %s\n", moddir); - - dir = opendir(moddir); - closedir(dir); - - if(dir != NULL) break; /* found it! */ - else{ free(moddir); moddir=NULL; } - } - } - } - if(param.verbose > 1) fprintf(stderr, "Module dir: %s\n", moddir != NULL ? moddir : ""); - return moddir; -} - -/* Open a module */ -mpg123_module_t* -open_module( const char* type, const char* name ) -{ - lt_dlhandle handle = NULL; - mpg123_module_t *module = NULL; - char* module_path = NULL; - size_t module_path_len = 0; - char* module_symbol = NULL; - size_t module_symbol_len = 0; - char *workdir = NULL; - char *moddir = NULL; - workdir = get_the_cwd(); - moddir = get_module_dir(); - if(workdir == NULL || moddir == NULL) - { - error("Failure getting workdir or moddir!"); - if(workdir == NULL) fprintf(stderr, "Hint: I need to know the current working directory to be able to come back after hunting modules. I will not leave because I do not know where I am.\n"); - - if(workdir != NULL) free(workdir); - if(moddir != NULL) free(moddir); - return NULL; - } - - /* Initialize libltdl */ - if (lt_dlinit()) error( "Failed to initialise libltdl" ); - - if(chdir(moddir) != 0) - { - error2("Failed to enter module directory %s: %s", moddir, strerror(errno)); - goto om_bad; - } - /* Work out the path of the module to open */ - /* Note that we need to open ./file, not just file! */ - module_path_len = 2 + strlen(type) + 1 + strlen(name) + strlen(MODULE_FILE_SUFFIX) + 1; - module_path = malloc( module_path_len ); - if (module_path == NULL) { - error1( "Failed to allocate memory for module name: %s", strerror(errno) ); - goto om_bad; - } - snprintf( module_path, module_path_len, "./%s_%s%s", type, name, MODULE_FILE_SUFFIX ); - /* Display the path of the module created */ - if(param.verbose > 1) fprintf(stderr, "Module path: %s\n", module_path ); - - /* Open the module */ - handle = lt_dlopen( module_path ); - free( module_path ); - if (handle==NULL) { - error2( "Failed to open module %s: %s", name, lt_dlerror() ); - if(param.verbose > 1) - fprintf(stderr, "Note: This could be because of braindead path in the .la file...\n"); - - goto om_bad; - } - - /* Work out the symbol name */ - module_symbol_len = strlen( MODULE_SYMBOL_PREFIX ) + - strlen( type ) + - strlen( MODULE_SYMBOL_SUFFIX ) + 1; - module_symbol = malloc(module_symbol_len); - snprintf( module_symbol, module_symbol_len, "%s%s%s", MODULE_SYMBOL_PREFIX, type, MODULE_SYMBOL_SUFFIX ); - debug1( "Module symbol: %s", module_symbol ); - - /* Get the information structure from the module */ - module = (mpg123_module_t*)lt_dlsym(handle, module_symbol ); - free( module_symbol ); - if (module==NULL) { - error1( "Failed to get module symbol: %s", lt_dlerror() ); - goto om_latebad; - } - - /* Check the API version */ - if (MPG123_MODULE_API_VERSION > module->api_version) { - error( "API version of module is too old" ); - goto om_latebad; - } else if (MPG123_MODULE_API_VERSION > module->api_version) { - error( "API version of module is too new" ); - goto om_latebad; - } - - /* Store handle in the data structure */ - module->handle = handle; - - goto om_end; -om_latebad: - lt_dlclose( handle ); -om_bad: - module = NULL; -om_end: - chdir(workdir); - free(moddir); - free(workdir); - return module; -} - - -void close_module( mpg123_module_t* module ) -{ - lt_dlhandle handle = module->handle; - int err = lt_dlclose( handle ); - - if (err) error1("Failed to close module: %s", lt_dlerror() ); - -} - -#define PATH_STEP 50 -static char *get_the_cwd() -{ - size_t bs = PATH_STEP; - char *buf = malloc(bs); - errno = 0; - while((buf != NULL) && getcwd(buf, bs) == NULL) - { - char *buf2; - if(errno != ERANGE) - { - error1("getcwd returned unexpected error: %s", strerror(errno)); - free(buf); - return NULL; - } - buf2 = realloc(buf, bs+=PATH_STEP); - if(buf2 == NULL){ free(buf); buf = NULL; } - else debug1("pwd: increased buffer to %lu", (unsigned long)bs); - - buf = buf2; - } - return buf; -} - -void list_modules() -{ - DIR* dir = NULL; - struct dirent *dp = NULL; - char *workdir = NULL; - char *moddir = NULL; - - moddir = get_module_dir(); - /* Open the module directory */ - dir = opendir(moddir); - if (dir==NULL) { - error2("Failed to open the module directory (%s): %s\n", PKGLIBDIR, strerror(errno)); - free(moddir); - exit(-1); - } - - workdir = get_the_cwd(); - if(chdir(moddir) != 0) - { - error2("Failed to enter module directory (%s): %s\n", PKGLIBDIR, strerror(errno)); - closedir( dir ); - free(workdir); - free(moddir); - exit(-1); - } - /* Display the program title */ - /* print_title(stderr); */ - - /* List the output modules */ - printf("\n"); - printf("Available modules\n"); - printf("-----------------\n"); - - while( (dp = readdir(dir)) != NULL ) { - struct stat fst; - if(stat(dp->d_name, &fst) != 0) continue; - if(S_ISREG(fst.st_mode)) /* Allow links? */ - { - char* ext = dp->d_name + strlen( dp->d_name ) - strlen( MODULE_FILE_SUFFIX ); - if (strcmp(ext, MODULE_FILE_SUFFIX) == 0) - { - char *module_name = NULL; - char *module_type = NULL; - char *uscore_pos = NULL; - mpg123_module_t *module = NULL; - - /* Extract the module type */ - module_type = strdup( dp->d_name ); - uscore_pos = strchr( module_type, '_' ); - if (uscore_pos==NULL || (uscore_pos>=module_type+strlen(module_type)+1) ) - { - free(module_type); - continue; - } - - *uscore_pos = '\0'; - - /* Extract the short name of the module */ - module_name = strdup( dp->d_name + strlen( module_type ) + 1 ); - module_name[ strlen( module_name ) - strlen( MODULE_FILE_SUFFIX ) ] = '\0'; - - /* Open the module */ - module = open_module( module_type, module_name ); - if (module) { - printf("%-15s%s %s\n", module->name, module_type, module->description ); - - /* Close the module again */ - close_module( module ); - } - - free( module_name ); - free( module_type ); - } - } - } - - chdir(workdir); - free(workdir); - closedir( dir ); - free(moddir); - exit(0); -} - - diff --git a/deps/mpg123/src/module.h b/deps/mpg123/src/module.h deleted file mode 100644 index b2e5ffb..0000000 --- a/deps/mpg123/src/module.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - module: module loading and listing interface - - copyright ?-2007 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org -*/ - -#ifndef _MPG123_MODULE_H_ -#define _MPG123_MODULE_H_ - -/* Pulled in by mpg123app.h! */ - -#ifdef HAVE_LTDL -#include -#endif - -#define MPG123_MODULE_API_VERSION (1) - -/* The full structure is delared in audio.h */ -struct audio_output_struct; - -typedef struct mpg123_module_struct { - const int api_version; /* module API version number */ - - const char* name; /* short name of the module */ - const char* description; /* description of what the module does */ - const char* revision; /* source code revision */ - -#ifdef HAVE_LTDL - lt_dlhandle handle; /* ltdl handle - set by open_module */ -#else - void* handle; -#endif - - /* Initialisers - set to NULL if unsupported by module */ - int (*init_output)(struct audio_output_struct* ao); /* audio output - returns 0 on success */ - -} mpg123_module_t; - - - -/* ------ Declarations from "module.c" ------ */ - -mpg123_module_t* open_module( const char* type, const char* name ); -void close_module( mpg123_module_t* module ); -void list_modules(); - -#endif diff --git a/deps/mpg123/src/mpg123-id3dump.c b/deps/mpg123/src/mpg123-id3dump.c new file mode 100644 index 0000000..214297b --- /dev/null +++ b/deps/mpg123/src/mpg123-id3dump.c @@ -0,0 +1,422 @@ +/* + id3dump: Print ID3 tags of files, scanned using libmpg123. + + copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +/* Need snprintf(). */ +#define _DEFAULT_SOURCE +#define _BSD_SOURCE +#include "config.h" +#include "compat.h" +#include "mpg123.h" +#include "getlopt.h" +#include +#include +#include "debug.h" +#include "win32_support.h" + +static int errors = 0; + +static struct +{ + int store_pics; + int do_scan; +} param = +{ + FALSE + , TRUE +}; + +static const char* progname; + +static void usage(int err) +{ + FILE* o = stdout; + if(err) + { + o = stderr; + fprintf(o, "You made some mistake in program usage... let me briefly remind you:\n\n"); + } + fprintf(o, "Tool to dump ID3 meta data from MPEG audio files using libmpg123\n"); + fprintf(o, "\tversion %s; written and copyright by Thomas Orgis and the mpg123 project\n", PACKAGE_VERSION); + fprintf(o,"\nusage: %s [option(s)] file(s)\n", progname); + fprintf(o,"\noptions:\n"); + fprintf(o," -h --help give usage help\n"); + fprintf(o," -n --no-scan do not scan entire file (just beginning)\n"); + fprintf(o," -p --store-pics write APIC frames (album art pictures) to files\n"); + fprintf(o," file names using whole input file name as prefix\n"); + fprintf(o,"\nNote that text output will always be in UTF-8, regardless of locale.\n"); + exit(err); +} +static void want_usage(char* bla) +{ + usage(0); +} + +static topt opts[] = +{ + {'h', "help", 0, want_usage, 0, 0} + ,{'n', "no-scan", GLO_INT, 0, ¶m.do_scan, FALSE} + ,{'p', "store-pics", GLO_INT, 0, ¶m.store_pics, TRUE} + ,{0, 0, 0, 0, 0, 0} +}; + +/* Helper for v1 printing, get these strings their zero byte. */ +void safe_print(char* name, char *data, size_t size) +{ + char safe[31]; + if(size>30) return; + + memcpy(safe, data, size); + safe[size] = 0; + printf("%s: %s\n", name, safe); +} + +/* Print out ID3v1 info. */ +void print_v1(mpg123_id3v1 *v1) +{ + safe_print("Title", v1->title, sizeof(v1->title)); + safe_print("Artist", v1->artist, sizeof(v1->artist)); + safe_print("Album", v1->album, sizeof(v1->album)); + safe_print("Year", v1->year, sizeof(v1->year)); + safe_print("Comment", v1->comment, sizeof(v1->comment)); + printf("Genre: %i", v1->genre); +} + +/* Split up a number of lines separated by \n, \r, both or just zero byte + and print out each line with specified prefix. */ +void print_lines(const char* prefix, mpg123_string *inlines) +{ + size_t i; + int hadcr = 0, hadlf = 0; + char *lines = NULL; + char *line = NULL; + size_t len = 0; + + if(inlines != NULL && inlines->fill) + { + lines = inlines->p; + len = inlines->fill; + } + else return; + + line = lines; + for(i=0; ititle); + print_lines("Artist: ", v2->artist); + print_lines("Album: ", v2->album); + print_lines("Year: ", v2->year); + print_lines("Comment: ", v2->comment); + print_lines("Genre: ", v2->genre); +} + +/* Easy conversion to string via lookup. */ +const char* pic_types[] = +{ + "other" + ,"icon" + ,"other icon" + ,"front cover" + ,"back cover" + ,"leaflet" + ,"media" + ,"lead" + ,"artist" + ,"conductor" + ,"orchestra" + ,"composer" + ,"lyricist" + ,"location" + ,"recording" + ,"performance" + ,"video" + ,"fish" + ,"illustration" + ,"artist logo" + ,"publisher logo" +}; +static const char* pic_type(int id) +{ + return (id >= 0 && id < (sizeof(pic_types)/sizeof(char*))) + ? pic_types[id] + : "invalid type"; +} + +/* Print out all stored ID3v2 fields with their 4-character IDs. */ +void print_raw_v2(mpg123_id3v2 *v2) +{ + size_t i; + for(i=0; itexts; ++i) + { + char id[5]; + char lang[4]; + memcpy(id, v2->text[i].id, 4); + id[4] = 0; + memcpy(lang, v2->text[i].lang, 3); + lang[3] = 0; + if(v2->text[i].description.fill) + printf("%s language(%s) description(%s)\n", id, lang, v2->text[i].description.p); + else printf("%s language(%s)\n", id, lang); + + print_lines(" ", &v2->text[i].text); + } + for(i=0; iextras; ++i) + { + char id[5]; + memcpy(id, v2->extra[i].id, 4); + id[4] = 0; + printf( "%s description(%s)\n", + id, + v2->extra[i].description.fill ? v2->extra[i].description.p : "" ); + print_lines(" ", &v2->extra[i].text); + } + for(i=0; icomments; ++i) + { + char id[5]; + char lang[4]; + memcpy(id, v2->comment_list[i].id, 4); + id[4] = 0; + memcpy(lang, v2->comment_list[i].lang, 3); + lang[3] = 0; + printf( "%s description(%s) language(%s):\n", + id, + v2->comment_list[i].description.fill ? v2->comment_list[i].description.p : "", + lang ); + print_lines(" ", &v2->comment_list[i].text); + } + for(i=0; ipictures; ++i) + { + mpg123_picture* pic; + + pic = &v2->picture[i]; + fprintf(stderr, "APIC type(%i, %s) mime(%s) size(%"SIZE_P")\n", + pic->type, pic_type(pic->type), pic->mime_type.p, (size_p)pic->size); + print_lines(" ", &pic->description); + } +} + +const char* unknown_end = "picture"; + +static char* mime2end(mpg123_string* mime) +{ + size_t len; + char* end; + if(strncasecmp("image/",mime->p,6)) + { + len = strlen(unknown_end)+1; + end = malloc(len); + memcpy(end, unknown_end, len); + return end; + } + + /* Else, use fmt out of image/fmt ... but make sure that usage stops at + non-alphabetic character, as MIME can have funny stuff following a ";". */ + for(len=1; lenfill-6; ++len) + { + if(!isalnum(mime->p[len-1+6])) break; + } + /* len now containing the number of bytes after the "/" up to the next + invalid char or null */ + if(len < 1) return "picture"; + + end = malloc(len); + if(!end) exit(11); /* Come on, is it worth wasting lines for a message? + If we're so broke, fprintf will also likely fail. */ + + memcpy(end, mime->p+6,len-1); + end[len-1] = 0; + return end; +} + +/* Construct a sane file name without introducing spaces, then open. + Example: /some/where/some.mp3.front_cover.jpeg + If multiple ones are there: some.mp3.front_cover2.jpeg */ +int open_picfile(const char* prefix, mpg123_picture* pic) +{ + char *end, *typestr, *pfn; + const char* pictype; + size_t i, len; + int fd; + unsigned long count = 1; + + pictype = pic_type(pic->type); + len = strlen(pictype); + if(!(typestr = malloc(len+1))) exit(11); + memcpy(typestr, pictype, len); + for(i=0; imime_type); + len = strlen(prefix)+1+strlen(typestr)+1+strlen(end); + if(!(pfn = malloc(len+1))) exit(11); + + sprintf(pfn, "%s.%s.%s", prefix, typestr, end); + pfn[len] = 0; + + errno = 0; + fd = compat_open(pfn, O_CREAT|O_WRONLY|O_EXCL); + while(fd < 0 && errno == EEXIST && ++count < ULONG_MAX) + { + char dum; + size_t digits; + + digits = snprintf(&dum, 1, "%lu", count); + if(!(pfn=safe_realloc(pfn, len+digits+1))) exit(11); + + sprintf(pfn, "%s.%s%lu.%s", prefix, typestr, count, end); + pfn[len+digits] = 0; + errno = 0; + fd = compat_open(pfn, O_CREAT|O_WRONLY|O_EXCL); + } + printf("writing %s\n", pfn); + if(fd < 0) + { + error("Cannot open for writing (counter exhaust? permissions?)."); + ++errors; + } + + free(end); + free(typestr); + free(pfn); + return fd; +} + +static void store_pictures(const char* prefix, mpg123_id3v2 *v2) +{ + int i; + + for(i=0; ipictures; ++i) + { + int fd; + mpg123_picture* pic; + + pic = &v2->picture[i]; + fd = open_picfile(prefix, pic); + if(fd >= 0) + { /* stream I/O for not having to care about interruptions */ + FILE* picfile = compat_fdopen(fd, "w"); + if(picfile) + { + if(fwrite(pic->data, pic->size, 1, picfile) != 1) + { + error("Failure to write data."); + ++errors; + } + if(fclose(picfile)) + { + error("Failure to close (flush?)."); + ++errors; + } + } + else + { + error1("Unable to fdopen output: %s)", strerror(errno)); + ++errors; + } + } + } +} + +int main(int argc, char **argv) +{ + int i, result; + mpg123_handle* m; +#if defined(WANT_WIN32_UNICODE) + win32_cmdline_utf8(&argc,&argv); +#endif + progname = argv[0]; + + while ((result = getlopt(argc, argv, opts))) + switch (result) { + case GLO_UNKNOWN: + fprintf (stderr, "%s: Unknown option \"%s\".\n", + progname, loptarg); + usage(1); + case GLO_NOARG: + fprintf (stderr, "%s: Missing argument for option \"%s\".\n", + progname, loptarg); + usage(1); + } + +#ifdef WIN32 + fprintf(stderr, "WARNING: This tool is not yet adapted to run on Windows (file I/O, unicode arguments)!\n"); +#endif + if(loptind >= argc) usage(1); + + mpg123_init(); + m = mpg123_new(NULL, NULL); + mpg123_param(m, MPG123_ADD_FLAGS, MPG123_PICTURE, 0.); + + for(i=loptind; i < argc; ++i) + { + mpg123_id3v1 *v1; + mpg123_id3v2 *v2; + int meta; + if(mpg123_open(m, argv[i]) != MPG123_OK) + { + fprintf(stderr, "Cannot open %s: %s\n", argv[i], mpg123_strerror(m)); + continue; + } + if(param.do_scan) mpg123_scan(m); + mpg123_seek(m, 0, SEEK_SET); + meta = mpg123_meta_check(m); + if(meta & MPG123_ID3 && mpg123_id3(m, &v1, &v2) == MPG123_OK) + { + printf("FILE: %s\n", argv[i]); + printf("\n==== ID3v1 ====\n"); + if(v1 != NULL) print_v1(v1); + + printf("\n==== ID3v2 ====\n"); + if(v2 != NULL) print_v2(v2); + + printf("\n==== ID3v2 Raw frames ====\n"); + if(v2 != NULL) + { + print_raw_v2(v2); + if(param.store_pics) + store_pictures(argv[i], v2); + } + } + else printf("Nothing found for %s.\n", argv[i]); + + mpg123_close(m); + } + mpg123_delete(m); + mpg123_exit(); + + if(errors) error1("Encountered %i errors along the way.", errors); + return errors != 0; +#if defined(WANT_WIN32_UNICODE) + win32_cmdline_free(argc,argv); +#endif +} diff --git a/deps/mpg123/src/mpg123-strip.c b/deps/mpg123/src/mpg123-strip.c new file mode 100644 index 0000000..5399b93 --- /dev/null +++ b/deps/mpg123/src/mpg123-strip.c @@ -0,0 +1,160 @@ +/* + extract_frams: utlize the framebyframe API and mpg123_framedata to extract the MPEG frames out of a stream (strip off anything else). + + copyright 2011-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis +*/ + +#include "config.h" +#include "compat.h" +#include + +#include "getlopt.h" + + +static struct +{ + int info; + long icy_interval; + int verbose; +} param = +{ + TRUE + ,0 + ,0 +}; + +static const char* progname; + +static void usage(int err) +{ + FILE* o = stdout; + if(err) + { + o = stderr; + fprintf(o, "You made some mistake in program usage... let me briefly remind you:\n\n"); + } + fprintf(o, "Extract only MPEG frames from a stream using libmpg123 (stdin to stdout)\n"); + fprintf(o, "\tversion %s; written and copyright by Thomas Orgis and the mpg123 project\n", PACKAGE_VERSION); + fprintf(o,"\nusage: %s [option(s)] < input > output\n", progname); + fprintf(o,"\noptions:\n"); + fprintf(o," -h --help give usage help\n"); + fprintf(o," -i --icy-interval stream has ICY metadata present with this interval\n"); + fprintf(o," -n --no-info also strip info frame at beginning\n"); + fprintf(o," -v[*] --verbose increase verbosity level\n"); + exit(err); +} + +static void want_usage(char* bla) +{ + usage(0); +} + +static void set_verbose (char *arg) +{ + param.verbose++; +} + +static topt opts[] = +{ + {'h', "help", 0, want_usage, 0, 0} + ,{'i', "icy-interval", GLO_ARG|GLO_LONG, 0, ¶m.icy_interval, 0} + ,{'n', "no-info", GLO_INT, 0, ¶m.info, FALSE} + ,{'v', "verbose", 0, set_verbose, 0, 0} + ,{0, 0, 0, 0, 0, 0} +}; + +int do_work(mpg123_handle *m); + +int main(int argc, char **argv) +{ + int ret = 0; + mpg123_handle *m; + + progname = argv[0]; + + while ((ret = getlopt(argc, argv, opts))) + switch (ret) { + case GLO_UNKNOWN: + fprintf (stderr, "%s: Unknown option \"%s\".\n", + progname, loptarg); + usage(1); + case GLO_NOARG: + fprintf (stderr, "%s: Missing argument for option \"%s\".\n", + progname, loptarg); + usage(1); + } + + mpg123_init(); + m = mpg123_new(NULL, &ret); + + if(m == NULL) + { + fprintf(stderr, "Cannot create handle: %s", mpg123_plain_strerror(ret)); + } + else + { + ret = mpg123_param(m, MPG123_VERBOSE, param.verbose, 0.); + if(ret == MPG123_OK) + { + if(param.verbose) + fprintf(stderr, "Info frame handling: %s\n", + param.info ? "pass-through" : "remove"); + ret = param.info /* If info frame is ignored, it is treated as MPEG data. */ + ? mpg123_param(m, MPG123_ADD_FLAGS, MPG123_IGNORE_INFOFRAME, 0.) + : mpg123_param(m, MPG123_REMOVE_FLAGS, MPG123_IGNORE_INFOFRAME, 0.); + } + if(ret == MPG123_OK && param.icy_interval > 0) + { + if(param.verbose) fprintf(stderr, "ICY interval: %li\n", param.icy_interval); + ret = mpg123_param(m, MPG123_ICY_INTERVAL, param.icy_interval, 0); + } + + if(ret == MPG123_OK) ret = do_work(m); + + if(ret != MPG123_OK) fprintf(stderr, "Some error occured: %s\n", mpg123_strerror(m)); + + mpg123_delete(m); /* Closes, too. */ + } + mpg123_exit(); + + return ret; +} + +int do_work(mpg123_handle *m) +{ + int ret; + size_t count = 0; + ret = mpg123_open_fd(m, STDIN_FILENO); + if(ret != MPG123_OK) return ret; + + while( (ret = mpg123_framebyframe_next(m)) == MPG123_OK || ret == MPG123_NEW_FORMAT ) + { + unsigned long header; + unsigned char *bodydata; + size_t bodybytes; + if(mpg123_framedata(m, &header, &bodydata, &bodybytes) == MPG123_OK) + { + /* Need to extract the 4 header bytes from the native storage in the correct order. */ + unsigned char hbuf[4]; + int i; + for(i=0; i<4; ++i) hbuf[i] = (unsigned char) ((header >> ((3-i)*8)) & 0xff); + + /* Now write out both header and data, fire and forget. */ + write(STDOUT_FILENO, hbuf, 4); + write(STDOUT_FILENO, bodydata, bodybytes); + if(param.verbose) + fprintf(stderr, "%"SIZE_P": header 0x%08lx, %"SIZE_P" body bytes\n" + , (size_p)++count, header, (size_p)bodybytes); + } + } + + if(ret != MPG123_DONE) + fprintf(stderr, "Some error occured (non-fatal?): %s\n", mpg123_strerror(m)); + + if(param.verbose) fprintf(stderr, "Done with %"SIZE_P" MPEG frames.\n" + , (size_p)count); + + return MPG123_OK; +} diff --git a/deps/mpg123/src/mpg123.c b/deps/mpg123/src/mpg123.c index b3e2bc1..e1955d1 100644 --- a/deps/mpg123/src/mpg123.c +++ b/deps/mpg123/src/mpg123.c @@ -1,7 +1,7 @@ /* mpg123: main code of the program (not of the decoder...) - copyright 1995-2010 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2013 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Michael Hipp */ @@ -9,6 +9,7 @@ #define ME "main" #include "mpg123app.h" #include "mpg123.h" +#include "out123.h" #include "local.h" #ifdef HAVE_SYS_WAIT_H @@ -20,7 +21,6 @@ #include #include -#include #include #ifdef HAVE_SCHED_H @@ -33,8 +33,8 @@ #endif #include "common.h" +#include "sysutil.h" #include "getlopt.h" -#include "buffer.h" #include "term.h" #include "playlist.h" #include "httpget.h" @@ -56,7 +56,6 @@ struct parameter param = { FALSE , /* shuffle */ FALSE , /* remote */ FALSE , /* remote to stderr */ - DECODE_AUDIO , /* write samples to audio device */ FALSE , /* silent operation */ FALSE , /* xterm title on/off */ 0 , /* second level buffer size */ @@ -65,7 +64,8 @@ struct parameter param = { NULL, /* output device */ 0, /* destination (headphones, ...) */ #ifdef HAVE_TERMIOS - FALSE , /* term control */ + FALSE, /* term control */ + TRUE, /* term visuals */ MPG123_TERM_USR1, MPG123_TERM_USR2, #endif @@ -77,7 +77,6 @@ struct parameter param = { #ifdef HAVE_WINDOWS_H 0, /* win32 process priority */ #endif - NULL, /* wav,cdr,au Filename */ 0, /* default is to play all titles in playlist */ NULL, /* no playlist per default */ 0 /* condensed id3 per default */ @@ -110,30 +109,29 @@ struct parameter param = { ,0 /* force_utf8 */ ,INDEX_SIZE ,NULL /* force_encoding */ - ,1. /* preload */ + ,0.2 /* preload */ ,-1 /* preframes */ ,-1 /* gain */ ,NULL /* stream dump file */ ,0 /* ICY interval */ + ,"mpg123" /* name */ + ,0. /* device buffer */ }; mpg123_handle *mh = NULL; off_t framenum; off_t frames_left; -audio_output_t *ao = NULL; -txfermem *buffermem = NULL; +out123_handle *ao = NULL; +static long output_propflags = 0; char *prgName = NULL; /* ThOr: pointers are not TRUE or FALSE */ char *equalfile = NULL; struct httpdata htd; int fresh = TRUE; -int have_output = FALSE; /* If we are past the output init step. */ +FILE* aux_out = NULL; /* Output for interesting information, normally on stdout to be parseable. */ -int buffer_fd[2]; -int buffer_pid; -size_t bufferblock = 0; - -static int intflag = FALSE; +int intflag = FALSE; +int deathflag = FALSE; static int skip_tracks = 0; int OutputDescriptor; @@ -141,6 +139,7 @@ static int filept = -1; static int network_sockets_used = 0; /* Win32 socket open/close Support */ +char *fullprogname = NULL; /* Copy of argv[0]. */ char *binpath; /* Path to myself. */ /* File-global storage of command line arguments. @@ -151,6 +150,12 @@ static int argc = 0; /* Cleanup marker to know that we intiialized libmpg123 already. */ static int cleanup_mpg123 = FALSE; +static long new_header = FALSE; +static char *prebuffer = NULL; +static size_t prebuffer_size = 0; +static size_t prebuffer_fill = 0; +static size_t minbytes = 0; + void set_intflag() { debug("set_intflag TRUE"); @@ -163,33 +168,115 @@ static void catch_interrupt(void) { intflag = TRUE; } +static void handle_fatal_msg(const char *msg, size_t n) +{ + if(msg && !param.quiet) + write(STDERR_FILENO, msg, n); + intflag = TRUE; + deathflag = TRUE; +} +static void catch_fatal_term(void) +{ + const char msg[] = "\nmpg123: death by SIGTERM\n"; + handle_fatal_msg(msg, sizeof(msg)); +} +static void catch_fatal_pipe(void) +{ + /* If the SIGPIPE is because of piped stderr, trying to write + in the signal handler hangs the program. */ + handle_fatal_msg(NULL, 0); +} #endif -/* oh, what a mess... */ -void next_track(void) +static void skip_track(void) { intflag = TRUE; ++skip_tracks; } +void next_track(void) +{ + playlist_jump(+1); + skip_track(); +} + void prev_track(void) { - if(pl.pos > 2) pl.pos -= 2; - else pl.pos = 0; + playlist_jump(-1); + skip_track(); +} - next_track(); +void next_dir(void) +{ + playlist_next_dir(); + skip_track(); +} + +void prev_dir(void) +{ + playlist_prev_dir(); + skip_track(); +} + +void safe_exit(int code); + +static void play_prebuffer(void) +{ + /* Ensure that the prebuffer bit has been posted. */ + if(prebuffer_fill) + { + if(out123_play(ao, prebuffer, prebuffer_fill) < prebuffer_fill) + { + error("Deep trouble! Cannot flush to my output anymore!"); + safe_exit(133); + } + prebuffer_fill = 0; + } +} + +/* Drain output device/buffer, but still give the option to interrupt things. */ +static void controlled_drain(void) +{ + int framesize; + size_t drain_block; + + play_prebuffer(); + + if(intflag || !out123_buffered(ao)) + return; + if(out123_getformat(ao, NULL, NULL, NULL, &framesize)) + return; + drain_block = 1152*framesize; + if(param.verbose) + fprintf(stderr, "\n"); + do + { + out123_ndrain(ao, drain_block); + if(param.verbose) + print_buf("Draining buffer: ", ao); +#ifdef HAVE_TERMIOS + if(param.term_ctrl) + term_control(mh, ao); +#endif + } + while(!intflag && out123_buffered(ao)); + if(param.verbose) + fprintf(stderr, "\n"); } void safe_exit(int code) { char *dummy, *dammy; + if(prebuffer) + free(prebuffer); + dump_close(); -#ifdef HAVE_TERMIOS - if(param.term_ctrl) - term_restore(); -#endif - if(have_output) exit_output(ao, intflag); + if(!code) + controlled_drain(); + if(intflag) + out123_drop(ao); + out123_del(ao); if(mh != NULL) mpg123_delete(mh); @@ -205,10 +292,25 @@ void safe_exit(int code) #endif /* It's ugly... but let's just fix this still-reachable memory chunk of static char*. */ split_dir_file("", &dummy, &dammy); + if(fullprogname) free(fullprogname); + +#ifdef HAVE_TERMIOS + term_exit(); +#endif exit(code); } -/* returns 1 if reset_audio needed instead */ +static void check_fatal_output(int code) +{ + if(code) + { + if(!param.quiet) + error2( "out123 error %i: %s" + , out123_errcode(ao), out123_strerror(ao) ); + safe_exit(code); + } +} + static void set_output_module( char *arg ) { unsigned int i; @@ -235,17 +337,17 @@ static void set_output_flag(int flag) static void set_output_h(char *a) { - set_output_flag(AUDIO_OUT_HEADPHONES); + set_output_flag(OUT123_HEADPHONES); } static void set_output_s(char *a) { - set_output_flag(AUDIO_OUT_INTERNAL_SPEAKER); + set_output_flag(OUT123_INTERNAL_SPEAKER); } static void set_output_l(char *a) { - set_output_flag(AUDIO_OUT_LINE_OUT); + set_output_flag(OUT123_LINE_OUT); } static void set_output(char *arg) @@ -277,65 +379,44 @@ static void set_quiet (char *arg) static void set_out_wav(char *arg) { - param.outmode = DECODE_WAV; - param.filename = arg; + param.output_module = "wav"; + param.output_device = arg; } void set_out_cdr(char *arg) { - param.outmode = DECODE_CDR; - param.filename = arg; + param.output_module = "cdr"; + param.output_device = arg; } void set_out_au(char *arg) { - param.outmode = DECODE_AU; - param.filename = arg; + param.output_module = "au"; + param.output_device = arg; +} + +void set_out_test(char *arg) +{ + param.output_module = "test"; + param.output_device = NULL; } static void set_out_file(char *arg) { - param.outmode=DECODE_FILE; - #ifdef WIN32 - #ifdef WANT_WIN32_UNICODE - wchar_t *argw = NULL; - OutputDescriptor = win32_utf8_wide(arg, &argw, NULL); - if(argw != NULL) - { - OutputDescriptor=_wopen(argw,_O_CREAT|_O_WRONLY|_O_BINARY|_O_TRUNC,0666); - free(argw); - } - #else - OutputDescriptor=_open(arg,_O_CREAT|_O_WRONLY|_O_BINARY|_O_TRUNC,0666); - #endif /*WANT_WIN32_UNICODE*/ - #else /*WIN32*/ - OutputDescriptor=open(arg,O_CREAT|O_WRONLY|O_TRUNC,0666); - #endif /*WIN32*/ - if(OutputDescriptor==-1) - { - error2("Can't open %s for writing (%s).\n",arg,strerror(errno)); - safe_exit(1); - } + param.output_module = "raw"; + param.output_device = arg; } static void set_out_stdout(char *arg) { - param.outmode=DECODE_FILE; - param.remote_err=TRUE; - OutputDescriptor=STDOUT_FILENO; - #ifdef WIN32 - _setmode(STDOUT_FILENO, _O_BINARY); - #endif + param.output_module = "raw"; + param.output_device = NULL; } static void set_out_stdout1(char *arg) { - param.outmode=DECODE_AUDIOFILE; - param.remote_err=TRUE; - OutputDescriptor=STDOUT_FILENO; - #ifdef WIN32 - _setmode(STDOUT_FILENO, _O_BINARY); - #endif + param.output_module = "raw"; + param.output_device = NULL; } #if !defined (HAVE_SCHED_SETSCHEDULER) && !defined (HAVE_WINDOWS_H) @@ -362,6 +443,44 @@ static void set_appflag(char *arg) { param.appflags |= appflag; } + +static void list_output_modules(char *arg) +{ + char **names = NULL; + char **descr = NULL; + int count = -1; + out123_handle *lao; + + if((lao=out123_new())) + { + printf("\n"); + printf("Available modules\n"); + printf("-----------------\n"); + out123_param_string(lao, OUT123_BINDIR, binpath); + out123_param_int(lao, OUT123_VERBOSE, param.verbose); + if(param.quiet) + out123_param_int(lao, OUT123_FLAGS, OUT123_QUIET); + if((count=out123_drivers(lao, &names, &descr)) >= 0) + { + int i; + for(i=0; i= 0 ? 0 : 1); +} + + /* static void unset_appflag(char *arg) { param.appflags &= ~appflag; @@ -382,9 +501,9 @@ topt opts[] = { {'k', "skip", GLO_ARG | GLO_LONG, 0, ¶m.start_frame, 0}, {'2', "2to1", GLO_INT, 0, ¶m.down_sample, 1}, {'4', "4to1", GLO_INT, 0, ¶m.down_sample, 2}, - {'t', "test", GLO_INT, 0, ¶m.outmode, DECODE_TEST}, - {'s', "stdout", GLO_INT, set_out_stdout, ¶m.outmode, DECODE_FILE}, - {'S', "STDOUT", GLO_INT, set_out_stdout1, ¶m.outmode,DECODE_AUDIOFILE}, + {'t', "test", GLO_INT, set_out_test, NULL, 0}, + {'s', "stdout", GLO_INT, set_out_stdout, NULL, 0}, + {'S', "STDOUT", GLO_INT, set_out_stdout1, NULL, 0}, {'O', "outfile", GLO_ARG | GLO_CHAR, set_out_file, NULL, 0}, {'c', "check", GLO_INT, 0, ¶m.checkrange, TRUE}, {'v', "verbose", 0, set_verbose, 0, 0}, @@ -409,24 +528,28 @@ topt opts[] = { {0, "speaker", 0, set_output_s, 0,0}, {0, "lineout", 0, set_output_l, 0,0}, {'o', "output", GLO_ARG | GLO_CHAR, set_output, 0, 0}, - {0, "list-modules",0, list_modules, NULL, 0}, + {0, "list-modules",0, list_output_modules, NULL, 0}, {'a', "audiodevice", GLO_ARG | GLO_CHAR, 0, ¶m.output_device, 0}, {'f', "scale", GLO_ARG | GLO_LONG, 0, ¶m.outscale, 0}, {'n', "frames", GLO_ARG | GLO_LONG, 0, ¶m.frame_number, 0}, - #ifdef HAVE_TERMIOS +#ifdef HAVE_TERMIOS {'C', "control", GLO_INT, 0, ¶m.term_ctrl, TRUE}, + {0, "no-control", GLO_INT, 0, ¶m.term_ctrl, FALSE}, {0, "ctrlusr1", GLO_ARG | GLO_CHAR, 0, ¶m.term_usr1, 0}, {0, "ctrlusr2", GLO_ARG | GLO_CHAR, 0, ¶m.term_usr2, 0}, - #endif +#endif #ifndef NOXFERMEM {'b', "buffer", GLO_ARG | GLO_LONG, 0, ¶m.usebuffer, 0}, {0, "smooth", GLO_INT, 0, ¶m.smooth, 1}, + {0, "preload", GLO_ARG|GLO_DOUBLE, 0, ¶m.preload, 0}, #endif {'R', "remote", GLO_INT, 0, ¶m.remote, TRUE}, {0, "remote-err", GLO_INT, 0, ¶m.remote_err, TRUE}, {'d', "doublespeed", GLO_ARG | GLO_LONG, 0, ¶m.doublespeed, 0}, {'h', "halfspeed", GLO_ARG | GLO_LONG, 0, ¶m.halfspeed, 0}, +#ifdef NETWORK {'p', "proxy", GLO_ARG | GLO_CHAR, 0, ¶m.proxyurl, 0}, +#endif {'@', "list", GLO_ARG | GLO_CHAR, 0, ¶m.listname, 0}, /* 'z' comes from the the german word 'zufall' (eng: random) */ {'z', "shuffle", GLO_INT, 0, ¶m.shuffle, 1}, @@ -445,9 +568,9 @@ topt opts[] = { {0, "cpu", GLO_ARG | GLO_CHAR, 0, ¶m.cpu, 0}, {0, "test-cpu", GLO_INT, 0, ¶m.test_cpu, TRUE}, {0, "list-cpu", GLO_INT, 0, ¶m.list_cpu , 1}, - #ifdef NETWORK +#ifdef NETWORK {'u', "auth", GLO_ARG | GLO_CHAR, 0, &httpauth, 0}, - #endif +#endif #if defined (HAVE_SCHED_SETSCHEDULER) || defined (HAVE_WINDOWS_H) /* check why this should be a long variable instead of int! */ {'T', "realtime", GLO_LONG, 0, ¶m.realtime, TRUE }, @@ -463,10 +586,12 @@ topt opts[] = { {0, "au", GLO_ARG | GLO_CHAR, set_out_au, 0, 0 }, {0, "gapless", GLO_INT, set_frameflag, &frameflag, MPG123_GAPLESS}, {0, "no-gapless", GLO_INT, unset_frameflag, &frameflag, MPG123_GAPLESS}, + {0, "no-infoframe", GLO_INT, set_frameflag, &frameflag, MPG123_IGNORE_INFOFRAME}, {'?', "help", 0, want_usage, 0, 0 }, {0 , "longhelp" , 0, want_long_usage, 0, 0 }, {0 , "version" , 0, give_version, 0, 0 }, {'l', "listentry", GLO_ARG | GLO_LONG, 0, ¶m.listentry, 0 }, + {0, "continue", GLO_INT, set_appflag, &appflag, MPG123APP_CONTINUE }, {0, "rva-mix", GLO_INT, 0, ¶m.rva, 1 }, {0, "rva-radio", GLO_INT, 0, ¶m.rva, 1 }, {0, "rva-album", GLO_INT, 0, ¶m.rva, 2 }, @@ -482,7 +607,9 @@ topt opts[] = { {'D', "delay", GLO_ARG | GLO_INT, 0, ¶m.delay, 0}, {0, "resync-limit", GLO_ARG | GLO_LONG, 0, ¶m.resync_limit, 0}, {0, "pitch", GLO_ARG|GLO_DOUBLE, 0, ¶m.pitch, 0}, +#ifdef NETWORK {0, "ignore-mime", GLO_INT, set_appflag, &appflag, MPG123APP_IGNORE_MIME }, +#endif {0, "lyrics", GLO_INT, set_appflag, &appflag, MPG123APP_LYRICS}, {0, "keep-open", GLO_INT, 0, ¶m.keep_open, 1}, {0, "utf8", GLO_INT, 0, ¶m.force_utf8, 1}, @@ -490,63 +617,16 @@ topt opts[] = { {0, "index-size", GLO_ARG|GLO_LONG, 0, ¶m.index_size, 0}, {0, "no-seekbuffer", GLO_INT, unset_frameflag, &frameflag, MPG123_SEEKBUFFER}, {'e', "encoding", GLO_ARG|GLO_CHAR, 0, ¶m.force_encoding, 0}, - {0, "preload", GLO_ARG|GLO_DOUBLE, 0, ¶m.preload, 0}, {0, "preframes", GLO_ARG|GLO_LONG, 0, ¶m.preframes, 0}, {0, "skip-id3v2", GLO_INT, set_frameflag, &frameflag, MPG123_SKIP_ID3V2}, {0, "streamdump", GLO_ARG|GLO_CHAR, 0, ¶m.streamdump, 0}, {0, "icy-interval", GLO_ARG|GLO_LONG, 0, ¶m.icy_interval, 0}, {0, "ignore-streamlength", GLO_INT, set_frameflag, &frameflag, MPG123_IGNORE_STREAMLENGTH}, + {0, "name", GLO_ARG|GLO_CHAR, 0, ¶m.name, 0}, + {0, "devbuffer", GLO_ARG|GLO_DOUBLE, 0, ¶m.device_buffer, 0}, {0, 0, 0, 0, 0, 0} }; -/* - * Change the playback sample rate. - * Consider that changing it after starting playback is not covered by gapless code! - */ -static void reset_audio(long rate, int channels, int format) -{ -#ifndef NOXFERMEM - if (param.usebuffer) { - /* wait until the buffer is empty, - * then tell the buffer process to - * change the sample rate. [OF] - */ - while (xfermem_get_usedspace(buffermem) > 0) - if (xfermem_block(XF_WRITER, buffermem) == XF_CMD_TERMINATE) { - intflag = TRUE; - break; - } - buffermem->freeindex = -1; - buffermem->readindex = 0; /* I know what I'm doing! ;-) */ - buffermem->freeindex = 0; - if (intflag) - return; - buffermem->rate = pitch_rate(rate); - buffermem->channels = channels; - buffermem->format = format; - buffer_reset(); - } - else - { -#endif - if(ao == NULL) - { - error("Audio handle should not be NULL here!"); - safe_exit(98); - } - ao->rate = pitch_rate(rate); - ao->channels = channels; - ao->format = format; - if(reset_output(ao) < 0) - { - error1("failed to reset audio device: %s", strerror(errno)); - safe_exit(1); - } -#ifndef NOXFERMEM - } -#endif -} - static int open_track_fd (void) { /* Let reader handle invalid filept */ @@ -574,7 +654,6 @@ int open_track(char *fname) #ifdef WIN32 _setmode(STDIN_FILENO, _O_BINARY); #endif - return open_track_fd(); } else if (!strncmp(fname, "http://", 7)) /* http stream */ { @@ -620,7 +699,7 @@ int open_track(char *fname) debug("OK... going to finally open."); /* Now hook up the decoder on the opened stream or the file. */ - if(network_sockets_used) + if(filept > -1) { return open_track_fd(); } @@ -655,10 +734,11 @@ int play_frame(void) { unsigned char *audio; int mc; - size_t bytes; + size_t bytes = 0; debug("play_frame"); - /* The first call will not decode anything but return MPG123_NEW_FORMAT! */ mc = mpg123_decode_frame(mh, &framenum, &audio, &bytes); + mpg123_getstate(mh, MPG123_FRESH_DECODER, &new_header, NULL); + /* Play what is there to play (starting with second decode_frame call!) */ if(bytes) { @@ -667,16 +747,67 @@ int play_frame(void) { fresh = FALSE; } - /* Normal flushing of data, includes buffer decoding. */ - if(flush_output(ao, audio, bytes) < (int)bytes && !intflag) + if(bytes < minbytes && !prebuffer_fill) { - error("Deep trouble! Cannot flush to my output anymore!"); - safe_exit(133); + /* Postpone playback of little buffers until large buffers can + follow them right away, preventing underruns. */ + if(prebuffer_size < minbytes) + { + if(prebuffer) + free(prebuffer); + if(!(prebuffer = malloc(minbytes))) + safe_exit(11); + prebuffer_size = minbytes; + } + memcpy(prebuffer, audio, bytes); + prebuffer_fill = bytes; + bytes = 0; + debug1("prebuffered %"SIZE_P" bytes", prebuffer_fill); } if(param.checkrange) { long clip = mpg123_clip(mh); - if(clip > 0) fprintf(stderr,"%ld samples clipped\n", clip); + if(clip > 0) fprintf(stderr,"\n%ld samples clipped\n", clip); + } + } + /* The bytes could have been postponed to later. */ + if(bytes) + { + unsigned char *playbuf = audio; + if(prebuffer_fill) + { + size_t missing; + /* This is tricky: The small piece needs to be filled up. Playing 10 + pcm frames will always trigger underruns with ALSA, dammit! + This grabs some data from current frame, unless it itself would + end up smaller than the prebuffer. Ending up empty is fine. */ + if( prebuffer_fill < prebuffer_size + && ( bytes <= (missing=prebuffer_size-prebuffer_fill) + || bytes >= missing+prebuffer_size ) ) + { + if(bytes < missing) + missing=bytes; + memcpy(prebuffer+prebuffer_fill, playbuf, missing); + playbuf += missing; + bytes -= missing; + prebuffer_fill += missing; + } + if( out123_play(ao, prebuffer, prebuffer_fill) < prebuffer_fill + && !intflag ) + { + error("Deep trouble! Cannot flush to my output anymore!"); + safe_exit(133); + } + prebuffer_fill = 0; + } + /* Interrupt here doesn't necessarily interrupt out123_play(). + I wonder if that makes us miss errors. Actual issues should + just be postponed. */ + if(bytes && !intflag) /* Previous piece could already be interrupted. */ + if(out123_play(ao, playbuf, bytes) < bytes && !intflag) + { + error("Deep trouble! Cannot flush to my output anymore!"); + safe_exit(133); } } /* Special actions and errors. */ @@ -695,44 +826,50 @@ int play_frame(void) if(mc == MPG123_NEW_FORMAT) { long rate; - int channels, format; - mpg123_getformat(mh, &rate, &channels, &format); - if(param.verbose > 2) fprintf(stderr, "\nNote: New output format %liHz %ich, format %i\n", rate, channels, format); - - if(!param.quiet) + int channels; + int encoding; + play_prebuffer(); /* Make sure we got rid of old data. */ + mpg123_getformat(mh, &rate, &channels, &encoding); + /* A layer I frame duration at minimum for live outputs. */ + if(output_propflags & OUT123_PROP_LIVE) + minbytes = out123_encsize(encoding)*channels*384; + else + minbytes = 0; + if(param.verbose > 2) { - fprintf(stderr, "\n"); - if(param.verbose) print_header(mh); - else print_header_compact(mh); + const char* encname = out123_enc_name(encoding); + fprintf( stderr + , "\nNote: New output format with %li Hz, %i channels, encoding %s.\n" + , rate, channels, encname ? encname : "???" ); } - reset_audio(rate, channels, format); + new_header = TRUE; + check_fatal_output(out123_start(ao, rate, channels, encoding)); + /* We may take some time feeding proper data, so pause by default. */ + out123_pause(ao); } } - return 1; -} - -void buffer_drain(void) -{ -#ifndef NOXFERMEM - int s; - while ((s = xfermem_get_usedspace(buffermem))) + if(new_header && !param.quiet) { - struct timeval wait170 = {0, 170000}; - if(intflag) break; - buffer_ignore_lowmem(); - if(param.verbose) print_stat(mh,0,s); - #ifdef HAVE_TERMIOS - if(param.term_ctrl) term_control(mh, ao); - #endif - select(0, NULL, NULL, NULL, &wait170); + new_header = FALSE; + fprintf(stderr, "\n"); + if(param.verbose > 1) + print_header(mh); + else + print_header_compact(mh); } -#endif + return 1; } /* Return TRUE if we should continue (second interrupt happens quickly), skipping tracks, or FALSE if we should die. */ #if !defined(WIN32) && !defined(GENERIC) int skip_or_die(struct timeval *start_time) { + /* Death is fatal right away. */ + if(deathflag) + { + debug("The world wants me to die."); + return FALSE; + } /* * When HAVE_TERMIOS is defined, there is 'q' to terminate a list of songs, so * no pressing need to keep up this first second SIGINT hack that was too @@ -780,6 +917,7 @@ int skip_or_die(struct timeval *start_time) int main(int sys_argc, char ** sys_argv) { int result; + char end_of_files = FALSE; long parr; char *fname; int libpar = 0; @@ -787,7 +925,7 @@ int main(int sys_argc, char ** sys_argv) #if !defined(WIN32) && !defined(GENERIC) struct timeval start_time; #endif - + aux_out = stdout; /* Need to initialize here because stdout is not a constant?! */ #if defined (WANT_WIN32_UNICODE) if(win32_cmdline_utf8(&argc, &argv) != 0) { @@ -802,17 +940,33 @@ int main(int sys_argc, char ** sys_argv) win32_net_init(); #endif +#ifdef WIN32 + /* Despite in Unicode form, the path munging backend is still in ANSI/ASCII + * so using _wpgmptr with unicode paths after UTF8 conversion is broken on Windows + */ + + fullprogname = compat_strdup(_pgmptr); +#else + fullprogname = compat_strdup(argv[0]); +#endif + + if(!fullprogname) + { + error("OOM"); /* Out Of Memory. Don't waste bytes on that error. */ + safe_exit(1); + } /* Extract binary and path, take stuff before/after last / or \ . */ - if((prgName = strrchr(argv[0], '/')) || (prgName = strrchr(argv[0], '\\'))) + if( (prgName = strrchr(fullprogname, '/')) + || (prgName = strrchr(fullprogname, '\\'))) { /* There is some explicit path. */ prgName[0] = 0; /* End byte for path. */ prgName++; - binpath = argv[0]; + binpath = fullprogname; } else { - prgName = argv[0]; /* No path separators there. */ + prgName = fullprogname; /* No path separators there. */ binpath = NULL; /* No path at all. */ } @@ -846,11 +1000,20 @@ int main(int sys_argc, char ** sys_argv) param.flags |= MPG123_SEEKBUFFER; /* Default on, for HTTP streams. */ mpg123_getpar(mp, MPG123_RESYNC_LIMIT, ¶m.resync_limit, NULL); mpg123_getpar(mp, MPG123_PREFRAMES, ¶m.preframes, NULL); + /* Also need proper default flags from libout123. */ + { + out123_handle *paro = out123_new(); + out123_getparam_int(paro, OUT123_FLAGS, ¶m.output_flags); + out123_del(paro); + } #ifdef OS2 _wildcard(&argc,&argv); #endif - +#ifdef HAVE_TERMIOS + /* Detect terminal on input side, enable control by default. */ + param.term_ctrl = !(term_width(STDIN_FILENO) < 0); +#endif while ((result = getlopt(argc, argv, opts))) switch (result) { case GLO_UNKNOWN: @@ -891,14 +1054,6 @@ int main(int sys_argc, char ** sys_argv) if (loptind >= argc && !param.listname && !param.remote) usage(1); /* Init audio as early as possible. If there is the buffer process to be spawned, it shouldn't carry the mpg123_handle with it. */ - bufferblock = mpg123_safe_buffer(); /* Can call that before mpg123_init(), it's stateless. */ - if(init_output(&ao) < 0) - { - error("Failed to initialize output, goodbye."); - mpg123_delete_pars(mp); - return 99; /* It's safe here... nothing nasty happened yet. */ - } - have_output = TRUE; /* ========================================================================================================= */ /* Enterning the leaking zone... we start messing with stuff here that should be taken care of when leaving. */ @@ -908,16 +1063,16 @@ int main(int sys_argc, char ** sys_argv) httpdata_init(&htd); #if !defined(WIN32) && !defined(GENERIC) - if (param.remote) - { - param.verbose = 0; + if(param.remote && !param.verbose) param.quiet = 1; - param.flags |= MPG123_QUIET; - } #endif /* Set the frame parameters from command line options */ - if(param.quiet) param.flags |= MPG123_QUIET; + if(param.quiet) + { + param.flags |= MPG123_QUIET; + param.output_flags |= OUT123_QUIET; + } #ifdef OPT_3DNOW if(dnow != 0) param.cpu = (dnow == SET_3DNOW) ? "3dnow" : "i586"; @@ -978,15 +1133,14 @@ int main(int sys_argc, char ** sys_argv) /* Prepare stream dumping, possibly replacing mpg123 reader. */ if(dump_open(mh) != 0) safe_exit(78); - /* Now either check caps myself or query buffer for that. */ - audio_capabilities(ao, mh); - load_equalizer(mh); #ifdef HAVE_SETPRIORITY if(param.aggressive) { /* tst */ int mypid = getpid(); - setpriority(PRIO_PROCESS,mypid,-20); + if(!param.quiet) fprintf(stderr,"Aggressively trying to increase priority.\n"); + if(setpriority(PRIO_PROCESS,mypid,-20)) + error("Failed to aggressively increase priority.\n"); } #endif @@ -999,23 +1153,63 @@ int main(int sys_argc, char ** sys_argv) memset(&sp, 0, sizeof(struct sched_param)); sp.sched_priority = sched_get_priority_min(SCHED_FIFO); if (sched_setscheduler(0, SCHED_RR, &sp) == -1) - fprintf(stderr,"Can't get real-time priority\n"); + error("Can't get realtime priority\n"); } #endif -#ifdef HAVE_WINDOWS_H +/* make sure not Cygwin, it doesn't need it */ +#if defined(WIN32) && defined(HAVE_WINDOWS_H) /* argument "3" is equivalent to realtime priority class */ win32_set_priority( param.realtime ? 3 : param.w32_priority); #endif + /* TODO: There's some memory leaking on fatal safe_exits(). + This is a cosmetic issue, though. */ + + + /* Initializing output after the priority stuff, might influence + buffer process. */ + ao = out123_new(); + if(!ao) + { + if(!param.quiet) + error("Failed to allocate output."); + safe_exit(97); + } + if + ( 0 + || out123_param_int(ao, OUT123_FLAGS, param.output_flags) + || out123_param_float(ao, OUT123_PRELOAD, param.preload) + || out123_param_int(ao, OUT123_GAIN, param.gain) + || out123_param_int(ao, OUT123_VERBOSE, param.verbose) + || out123_param_string(ao, OUT123_NAME, param.name) + || out123_param_string(ao, OUT123_BINDIR, binpath) + || out123_param_float(ao, OUT123_DEVICEBUFFER, param.device_buffer) + ) + { + if(!param.quiet) + error("Error setting output parameters. Do you need a usage reminder?"); + safe_exit(98); + } + check_fatal_output(out123_set_buffer(ao, param.usebuffer*1024)); + check_fatal_output(out123_open( ao + , param.output_module, param.output_device )); + out123_getparam_int(ao, OUT123_PROPFLAGS, &output_propflags); + if(!param.remote) prepare_playlist(argc, argv); #if !defined(WIN32) && !defined(GENERIC) /* Remote mode is special... but normal console and terminal-controlled operation needs to catch the SIGINT. For one it serves for track skip when not in terminal control mode. The more important use being a graceful exit, including telling the buffer process what's going on. */ - if(!param.remote) catchsignal (SIGINT, catch_interrupt); + if(!param.remote) + catchsignal(SIGINT, catch_interrupt); + /* Need to catch things to exit cleanly, not messing up the terminal. */ + catchsignal(SIGTERM, catch_fatal_term); + catchsignal(SIGPIPE, catch_fatal_pipe); #endif + /* Now either check caps myself or query buffer for that. */ + audio_capabilities(ao, mh); if(param.remote) { int ret; @@ -1023,13 +1217,14 @@ int main(int sys_argc, char ** sys_argv) safe_exit(ret); } #ifdef HAVE_TERMIOS - debug1("param.term_ctrl: %i", param.term_ctrl); - if(param.term_ctrl) term_init(); #endif + if(APPFLAG(MPG123APP_CONTINUE)) frames_left = param.frame_number; + while ((fname = get_next_file())) { char *dirname, *filename; + int newdir; /* skip_tracks includes the previous one. */ if(skip_tracks) --skip_tracks; if(skip_tracks) @@ -1039,17 +1234,17 @@ int main(int sys_argc, char ** sys_argv) } if(param.delay > 0) { + controlled_drain(); /* One should enable terminal control during that sleeping phase! */ if(param.verbose > 2) fprintf(stderr, "Note: pausing %i seconds before next track.\n", param.delay); - output_pause(ao); #ifdef WIN32 Sleep(param.delay*1000); #else sleep(param.delay); #endif - output_unpause(ao); } - frames_left = param.frame_number; + if(!APPFLAG(MPG123APP_CONTINUE)) frames_left = param.frame_number; + debug1("Going to play %s", strcmp(fname, "-") ? fname : "standard input"); if(intflag || !open_track(fname)) @@ -1057,10 +1252,13 @@ int main(int sys_argc, char ** sys_argv) #ifdef HAVE_TERMIOS /* We need the opportunity to cancel in case of --loop -1 . */ if(param.term_ctrl) term_control(mh, ao); + else #endif /* No wait for a second interrupt before we started playing. */ if(intflag) break; + /* We already interrupted this cycle, start fresh with the next one. */ + intflag = FALSE; continue; } @@ -1079,6 +1277,8 @@ int main(int sys_argc, char ** sys_argv) if(param.start_frame > 0) framenum = mpg123_seek_frame(mh, param.start_frame, SEEK_SET); + if(APPFLAG(MPG123APP_CONTINUE)) param.start_frame = 0; + if(framenum < 0) { error1("Initial seek failed: %s", mpg123_strerror(mh)); @@ -1092,35 +1292,53 @@ int main(int sys_argc, char ** sys_argv) continue; } + /* Prinout and xterm title need this, possibly independently. */ + newdir = split_dir_file(fname ? fname : "standard input", &dirname, &filename); + if (!param.quiet) { - if (split_dir_file(fname ? fname : "standard input", - &dirname, &filename)) - fprintf(stderr, "Directory: %s\n", dirname); + size_t plpos; + size_t plfill; + long plloop; + plpos = playlist_pos(&plfill, &plloop); + if(newdir) fprintf(stderr, "Directory: %s\n", dirname); #ifdef HAVE_TERMIOS /* Reminder about terminal usage. */ if(param.term_ctrl) term_hint(); #endif - - fprintf(stderr, "Playing MPEG stream %lu of %lu: %s ...\n", (unsigned long)pl.pos, (unsigned long)pl.fill, filename); + if(param.verbose) + { + if(plloop < 0) + fprintf(stderr, "Repeating endlessly.\n"); + else if(plloop > 1) + fprintf( stderr, "Repeating %ld %s.\n" + , plloop-1, plloop > 2 ? "times" : "time" ); + } + fprintf( stderr, "Playing MPEG stream %"SIZE_P" of %"SIZE_P": %s ...\n" + , (size_p)plpos, (size_p)plfill, filename ); if(htd.icy_name.fill) fprintf(stderr, "ICY-NAME: %s\n", htd.icy_name.p); if(htd.icy_url.fill) fprintf(stderr, "ICY-URL: %s\n", htd.icy_url.p); - + } #if !defined(GENERIC) { const char *term_type; term_type = getenv("TERM"); - if (term_type && param.xterm_title && - (!strncmp(term_type,"xterm",5) || !strncmp(term_type,"rxvt",4))) + if(term_type && param.xterm_title) { + if(!strncmp(term_type,"xterm",5) || !strncmp(term_type,"rxvt",4)) fprintf(stderr, "\033]0;%s\007", filename); + else if(!strncmp(term_type,"screen",6)) + fprintf(stderr, "\033k%s\033\\", filename); + else if(!strncmp(term_type,"iris-ansi",9)) + fprintf(stderr, "\033P1.y %s\033\\\033P3.y%s\033\\", filename, filename); + + fflush(stderr); /* Paranoia: will the buffer buffer the escapes? */ } } #endif - } /* Rethink that SIGINT logic... */ #if !defined(WIN32) && !defined(GENERIC) #ifdef HAVE_TERMIOS @@ -1135,7 +1353,12 @@ int main(int sys_argc, char ** sys_argv) if(param.frame_number > -1) { debug1("frames left: %li", (long) frames_left); - if(!frames_left) break; + if(!frames_left) + { + if(APPFLAG(MPG123APP_CONTINUE)) end_of_files = TRUE; + + break; + } } if(!play_frame()) break; if(!param.quiet) @@ -1146,17 +1369,15 @@ int main(int sys_argc, char ** sys_argv) if(meta & MPG123_NEW_ID3) print_id3_tag(mh, param.long_id3, stderr); if(meta & MPG123_NEW_ICY) print_icy(mh, stderr); +#ifdef HAVE_TERMIOS + if(!param.term_ctrl) /* Terminal user can query meta data again. */ +#endif mpg123_meta_free(mh); /* Do not waste memory after delivering. */ } } if(!fresh && param.verbose) { -#ifndef NOXFERMEM - if (param.verbose > 1 || !(framenum & 0x7)) - print_stat(mh,0,xfermem_get_usedspace(buffermem)); -#else - if(param.verbose > 1 || !(framenum & 0x7)) print_stat(mh,0,0); -#endif + if(param.verbose > 1 || !(framenum & 0x7)) print_stat(mh,0,ao,1); } #ifdef HAVE_TERMIOS if(!param.term_ctrl) continue; @@ -1164,8 +1385,9 @@ int main(int sys_argc, char ** sys_argv) #endif } - if(!param.smooth && param.usebuffer) buffer_drain(); - if(param.verbose) print_stat(mh,0,xfermem_get_usedspace(buffermem)); + if(!param.smooth && !intflag) + controlled_drain(); + if(param.verbose) print_stat(mh,0,ao,0); if(!param.quiet) { @@ -1180,7 +1402,7 @@ int main(int sys_argc, char ** sys_argv) } else if(param.verbose) fprintf(stderr, "\n"); - mpg123_close(mh); + close_track(); if (intflag) { @@ -1188,17 +1410,18 @@ int main(int sys_argc, char ** sys_argv) intflag = FALSE; -#ifndef NOXFERMEM - if(!param.smooth && param.usebuffer) buffer_resync(); -#endif - } - } /* end of loop over input files */ - /* Ensure we played everything. */ - if(param.smooth && param.usebuffer) + if(!param.smooth) + out123_drop(ao); + } + + if(end_of_files) break; + } /* end of loop over input files */ + + if(APPFLAG(MPG123APP_CONTINUE)) { - buffer_drain(); - buffer_resync(); + continue_msg("CONTINUE"); } + /* Free up memory used by playlist */ if(!param.remote) free_playlist(); @@ -1210,7 +1433,7 @@ static void print_title(FILE *o) { fprintf(o, "High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3\n"); fprintf(o, "\tversion %s; written and copyright by Michael Hipp and others\n", PACKAGE_VERSION); - fprintf(o, "\tfree software (LGPL/GPL) without any warranty but with best wishes\n"); + fprintf(o, "\tfree software (LGPL) without any warranty but with best wishes\n"); } static void usage(int err) /* print syntax & exit */ @@ -1226,23 +1449,20 @@ static void usage(int err) /* print syntax & exit */ fprintf(o,"supported options [defaults in brackets]:\n"); fprintf(o," -v increase verbosity level -q quiet (don't print title)\n"); fprintf(o," -t testmode (no output) -s write to stdout\n"); - fprintf(o," -w write Output as WAV file\n"); + fprintf(o," -w f write output as WAV file\n"); fprintf(o," -k n skip first n frames [0] -n n decode only n frames [all]\n"); fprintf(o," -c check range violations -y DISABLE resync on errors\n"); fprintf(o," -b n output buffer: n Kbytes [0] -f n change scalefactor [%li]\n", param.outscale); fprintf(o," -r n set/force samplerate [auto]\n"); - fprintf(o," -os,-ol,-oh output to built-in speaker,line-out connector,headphones\n"); - #ifdef NAS - fprintf(o," -a d set NAS server\n"); - #elif defined(SGI) - fprintf(o," -a [1..4] set RAD device\n"); - #else - fprintf(o," -a d set audio device\n"); - #endif + fprintf(o," -o m select output module -a d set audio device\n"); fprintf(o," -2 downsample 1:2 (22 kHz) -4 downsample 1:4 (11 kHz)\n"); fprintf(o," -d n play every n'th frame only -h n play every frame n times\n"); fprintf(o," -0 decode channel 0 (left) only -1 decode channel 1 (right) only\n"); +#ifdef NETWORK fprintf(o," -m mix both channels (mono) -p p use HTTP proxy p [$HTTP_PROXY]\n"); +#else + fprintf(o," -m mix both channels (mono)\n"); +#endif #ifdef HAVE_SCHED_SETSCHEDULER fprintf(o," -@ f read filenames/URLs from f -T get realtime priority\n"); #else @@ -1250,9 +1470,13 @@ static void usage(int err) /* print syntax & exit */ #endif fprintf(o," -z shuffle play (with wildcards) -Z random play\n"); fprintf(o," -u a HTTP authentication string -E f Equalizer, data from file\n"); +#ifdef HAVE_TERMIOS fprintf(o," -C enable control keys --no-gapless not skip junk/padding in mp3s\n"); +#else + fprintf(o," --no-gapless not skip junk/padding in mp3s\n"); +#endif fprintf(o," -? this help --version print name + version\n"); - fprintf(o,"See the manpage %s(1) or call %s with --longhelp for more parameters and information.\n", prgName,prgName); + fprintf(o,"See the manpage "PACKAGE_NAME"(1) or call %s with --longhelp for more parameters and information.\n", prgName); safe_exit(err); } @@ -1263,13 +1487,14 @@ static void want_usage(char* arg) static void long_usage(int err) { - char *enclist; + mpg123_string *enclist; FILE* o = stdout; if(err) { o = stderr; fprintf(o, "You made some mistake in program usage... let me remind you:\n\n"); } + enclist = audio_enclist(); print_title(o); fprintf(o,"\nusage: %s [option(s)] [file(s) | URL(s) | -]\n", prgName); @@ -1279,11 +1504,15 @@ static void long_usage(int err) fprintf(o," -n --frames play only frames of every stream\n"); fprintf(o," --fuzzy Enable fuzzy seeks (guessing byte offsets or using approximate seek points from Xing TOC)\n"); fprintf(o," -y --no-resync DISABLES resync on error (--resync is deprecated)\n"); +#ifdef NETWORK fprintf(o," -p --proxy set WWW proxy\n"); fprintf(o," -u --auth set auth values for HTTP access\n"); fprintf(o," --ignore-mime ignore HTTP MIME types (content-type)\n"); +#endif + fprintf(o," --no-seekbuffer disable seek buffer\n"); fprintf(o," -@ --list play songs in playlist (plain list, m3u, pls (shoutcast))\n"); fprintf(o," -l --listentry play nth title in playlist; show whole playlist for n < 0\n"); + fprintf(o," --continue playlist continuation mode (see man page)\n"); fprintf(o," --loop loop track(s) times, < 0 means infinite loop (not with --random!)\n"); fprintf(o," --keep-open (--remote mode only) keep loaded file open after reaching end\n"); fprintf(o," --timeout Timeout in seconds before declaring a stream dead (if <= 0, wait forever)\n"); @@ -1300,7 +1529,7 @@ static void long_usage(int err) fprintf(o,"\noutput/processing options\n\n"); fprintf(o," -o --output select audio output module\n"); fprintf(o," --list-modules list the available modules\n"); - fprintf(o," -a --audiodevice select audio device\n"); + fprintf(o," -a --audiodevice select audio device (depending on chosen module)\n"); fprintf(o," -s --stdout write raw audio to stdout (host native format)\n"); fprintf(o," -S --STDOUT play AND output stream (not implemented yet)\n"); fprintf(o," -w --wav write samples as WAV file in (- is stdout)\n"); @@ -1333,14 +1562,15 @@ static void long_usage(int err) fprintf(o," --pitch set hardware pitch (speedup/down, 0 is neutral; 0.05 is 5%%)\n"); fprintf(o," --8bit force 8 bit output\n"); fprintf(o," --float force floating point output (internal precision)\n"); - audio_enclist(&enclist); - fprintf(o," -e --encoding force a specific encoding (%s)\n", enclist != NULL ? enclist : "OOM!"); + fprintf(o," -e --encoding force a specific encoding (%s)\n" + , enclist != NULL ? enclist->p : "OOM!"); fprintf(o," -d n --doublespeed n play only every nth frame\n"); fprintf(o," -h n --halfspeed n play every frame n times\n"); fprintf(o," --equalizer exp.: scales freq. bands acrd. to 'equalizer.dat'\n"); fprintf(o," --gapless remove padding/junk on mp3s (best with Lame tag)\n"); fprintf(o," This is on by default when libmpg123 supports it.\n"); fprintf(o," --no-gapless disable gapless mode, not remove padding/junk\n"); + fprintf(o," --no-infoframe disable parsing of Xing/Lame/VBR/Info frame\n"); fprintf(o," -D n --delay n insert a delay of n seconds before each track\n"); fprintf(o," -o h --headphones (aix/hp/sun) output on headphones\n"); fprintf(o," -o s --speaker (aix/hp/sun) output on speaker\n"); @@ -1350,6 +1580,7 @@ static void long_usage(int err) fprintf(o," --preload fraction of buffer to fill before playback\n"); fprintf(o," --smooth keep buffer over track boundaries\n"); #endif + fprintf(o," --devbuffer set device buffer in seconds; <= 0 means default\n"); fprintf(o,"\nmisc options\n\n"); fprintf(o," -t --test only decode, no output (benchmark)\n"); @@ -1357,15 +1588,17 @@ static void long_usage(int err) fprintf(o," -v[*] --verbose increase verboselevel\n"); fprintf(o," -q --quiet quiet mode\n"); #ifdef HAVE_TERMIOS - fprintf(o," -C --control enable terminal control keys\n"); + fprintf(o," -C --control enable terminal control keys (else auto detect)\n"); + fprintf(o," --no-control disable terminal control keys (disable auto detect)\n"); fprintf(o," --ctrlusr1 control key (characer) to map to SIGUSR1\n"); fprintf(o," (default is for stop/start)\n"); fprintf(o," --ctrlusr2 control key (characer) to map to SIGUSR2\n"); fprintf(o," (default is for next track)\n"); #endif #ifndef GENERIC - fprintf(o," --title set xterm/rxvt title to filename\n"); + fprintf(o," --title set terminal title to filename\n"); #endif + fprintf(o," --name set instance name (used in various places)\n"); fprintf(o," --long-tag spacy id3 display with every item on a separate line\n"); fprintf(o," --lyrics show lyrics (from ID3v2 USLT frame)\n"); fprintf(o," --utf8 Regardless of environment, print metadata in UTF-8.\n"); @@ -1389,7 +1622,9 @@ static void long_usage(int err) fprintf(o," --longhelp give this long help listing\n"); fprintf(o," --version give name / version string\n"); - fprintf(o,"\nSee the manpage %s(1) for more information.\n", prgName); + fprintf(o,"\nSee the manpage "PACKAGE_NAME"(1) for more information.\n"); + mpg123_free_string(enclist); + free(enclist); safe_exit(err); } @@ -1403,3 +1638,9 @@ static void give_version(char* arg) fprintf(stdout, PACKAGE_NAME" "PACKAGE_VERSION"\n"); safe_exit(0); } + +void continue_msg(const char *name) +{ + fprintf( aux_out, "\n[%s] track %"SIZE_P" frame %"OFF_P"\n", name + , (size_p)playlist_pos(NULL, NULL), (off_p)framenum ); +} diff --git a/deps/mpg123/src/mpg123app.h b/deps/mpg123/src/mpg123app.h index b61bd94..ffefefe 100644 --- a/deps/mpg123/src/mpg123app.h +++ b/deps/mpg123/src/mpg123app.h @@ -1,7 +1,7 @@ /* mpg123: main code of the program (not of the decoder...) - copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1 + copyright 1995-2015 by the mpg123 project - free software under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org initially written by Michael Hipp @@ -17,9 +17,8 @@ #include "compat.h" /* import DLL symbols on windows */ -#include "xfermem.h" #include "httpget.h" -#ifndef BUILDING_OUTPUT_MODULES +#if WIN32 #include "win32_support.h" #endif @@ -37,11 +36,8 @@ #define INLINE #endif -#include "audio.h" #include "local.h" -extern size_t bufferblock; - #define VERBOSE_MAX 3 extern char* binpath; /* argv[0], actually... */ @@ -52,16 +48,16 @@ struct parameter int shuffle; /* shuffle/random play */ int remote; /* remote operation */ int remote_err; /* remote operation to stderr */ - int outmode; /* where to out the decoded sampels */ int quiet; /* shut up! */ int xterm_title; /* Change xterm title to song names? */ long usebuffer; /* second level buffer size */ int verbose; /* verbose level */ - char* output_module; /* audio output module to use */ - char* output_device; /* audio output device to use */ - int output_flags; /* legacy output destination for AIX/HP/Sun */ + const char* output_module; /* audio output module to use */ + const char* output_device; /* audio output device to use */ + long output_flags; /* out123 flags */ #ifdef HAVE_TERMIOS int term_ctrl; + int term_visual; /* Those are supposed to be single characters. */ char* term_usr1; char* term_usr2; @@ -73,7 +69,6 @@ struct parameter #ifdef HAVE_WINDOWS_H int w32_priority; #endif - char *filename; long listentry; /* possibility to choose playback of one entry in playlist (0: off, > 0 : select, < 0; just show list*/ char* listname; /* name of playlist */ int long_id3; @@ -111,12 +106,15 @@ struct parameter long gain; /* audio output gain, for selected outputs */ char* streamdump; long icy_interval; + const char* name; /* name for this player instance */ + double device_buffer; /* output device buffer */ }; enum mpg123app_flags { MPG123APP_IGNORE_MIME = 0x01 ,MPG123APP_LYRICS = 0x02 + ,MPG123APP_CONTINUE = 0x04 }; /* shortcut to check application flags */ @@ -126,41 +124,27 @@ extern char *equalfile; extern off_t framenum; extern struct httpdata htd; -extern int buffer_fd[2]; -extern txfermem *buffermem; -extern int buffer_pid; - -#ifndef NOXFERMEM -extern void buffer_loop(audio_output_t *ao,sigset_t *oldsigset); -#endif - extern int OutputDescriptor; +extern int intflag; + #ifdef VARMODESUPPORT extern int varmode; extern int playlimit; #endif /* why extern? */ -extern void prepare_audioinfo(mpg123_handle *mh, audio_output_t *ao); extern int play_frame(void); extern int control_generic(mpg123_handle *fr); -/* Eh... I see duplicated definitions. Clean up after merge! */ -extern int cdr_open(audio_output_t *); -extern int au_open(audio_output_t *); -extern int wav_open(audio_output_t *); -extern int wav_write(unsigned char *buf,int len); -extern int cdr_close(void); -extern int au_close(void); -extern int wav_close(void); - extern struct parameter param; /* avoid the SIGINT in terminal control */ void next_track(void); void prev_track(void); +void next_dir(void); +void prev_dir(void); int open_track(char *fname); void close_track(void); void set_intflag(void); @@ -168,4 +152,6 @@ void set_intflag(void); /* equalizer... success is 0, failure -1 */ int load_equalizer(mpg123_handle *mh); +void continue_msg(const char *name); + #endif diff --git a/deps/mpg123/src/out123.c b/deps/mpg123/src/out123.c new file mode 100644 index 0000000..e5432a8 --- /dev/null +++ b/deps/mpg123/src/out123.c @@ -0,0 +1,950 @@ +/* + out123: simple program to stream data to an audio output device + + copyright 1995-2016 by the mpg123 project - free software under the terms of the LGPL 2.1 + see COPYING and AUTHORS files in distribution or http://mpg123.org + initially written by Thomas Orgis (extracted from mpg123.c) + + This is a stripped down mpg123 that only uses libout123 to write standard input + to an audio device. + + TODO: Add basic parsing of WAV headers to be able to pipe in WAV files, especially + from something like mpg123 -w -. +*/ + +#define ME "out123" +#include "config.h" +#include "compat.h" +#if WIN32 +#include "win32_support.h" +#endif +#include "out123.h" + +#ifdef HAVE_SYS_WAIT_H +#include +#endif +#ifdef HAVE_SYS_RESOURCE_H +#include +#endif + +#include +#include +#include + +#ifdef HAVE_SCHED_H +#include +#endif + +#include "sysutil.h" +#include "getlopt.h" + +#include "waves.h" + +#include "debug.h" + +/* be paranoid about setpriority support */ +#ifndef PRIO_PROCESS +#undef HAVE_SETPRIORITY +#endif + +static int intflag = FALSE; + +static void usage(int err); +static void want_usage(char* arg); +static void long_usage(int err); +static void want_long_usage(char* arg); +static void print_title(FILE* o); +static void give_version(char* arg); + +static int verbose = 0; +static int quiet = FALSE; + +static FILE* input = NULL; +static char *encoding_name = NULL; +static int encoding = MPG123_ENC_SIGNED_16; +static int channels = 2; +static long rate = 44100; +static char *driver = NULL; +static char *device = NULL; +size_t buffer_kb = 0; +static int realtime = FALSE; +#ifdef HAVE_WINDOWS_H +static int w32_priority = 0; +#endif +static int aggressive = FALSE; +static double preload = 0.2; +static long outflags = 0; +static long gain = -1; +static const char *name = NULL; /* Let the out123 library choose "out123". */ +static double device_buffer; /* output device buffer */ +long timelimit = -1; +off_t offset = 0; + +char *wave_patterns = NULL; +char *wave_freqs = NULL; +char *wave_phases = NULL; +/* Default to around 2 MiB memory for the table. */ +long wave_limit = 300000; + +size_t pcmblock = 1152; /* samples (pcm frames) we treat en bloc */ +/* To be set after settling format. */ +size_t pcmframe = 0; +unsigned char *audio = NULL; + +/* Option to play some oscillatory test signals. */ +struct wave_table *waver = NULL; + +out123_handle *ao = NULL; +char *cmd_name = NULL; +/* ThOr: pointers are not TRUE or FALSE */ +char *equalfile = NULL; +int fresh = TRUE; + +size_t bufferblock = 4096; + +int OutputDescriptor; + +char *fullprogname = NULL; /* Copy of argv[0]. */ +char *binpath; /* Path to myself. */ + +/* File-global storage of command line arguments. + They may be needed for cleanup after charset conversion. */ +static char **argv = NULL; +static int argc = 0; + +/* Drain output device/buffer, but still give the option to interrupt things. */ +static void controlled_drain(void) +{ + int framesize; + long rate; + size_t drain_block; + + if(intflag || !out123_buffered(ao)) + return; + if(out123_getformat(ao, &rate, NULL, NULL, &framesize)) + return; + drain_block = 1024*framesize; + if(!quiet) + fprintf( stderr + , "\n"ME": draining buffer of %.1f s (you may interrupt)\n" + , (double)out123_buffered(ao)/framesize/rate ); + do { + out123_ndrain(ao, drain_block); + } while(!intflag && out123_buffered(ao)); +} + +static void safe_exit(int code) +{ + char *dummy, *dammy; + + if(!code) + controlled_drain(); + if(intflag || code) + out123_drop(ao); + out123_del(ao); +#ifdef WANT_WIN32_UNICODE + win32_cmdline_free(argc, argv); /* This handles the premature argv == NULL, too. */ +#endif + /* It's ugly... but let's just fix this still-reachable memory chunk of static char*. */ + split_dir_file("", &dummy, &dammy); + if(fullprogname) free(fullprogname); + if(audio) free(audio); + wave_table_del(waver); + exit(code); +} + +static void check_fatal_output(int code) +{ + if(code) + { + if(!quiet) + error2( "out123 error %i: %s" + , out123_errcode(ao), out123_strerror(ao) ); + safe_exit(code); + } +} + +static void set_output_module( char *arg ) +{ + unsigned int i; + + /* Search for a colon and set the device if found */ + for(i=0; i< strlen( arg ); i++) { + if (arg[i] == ':') { + arg[i] = 0; + device = &arg[i+1]; + debug1("Setting output device: %s", device); + break; + } + } + /* Set the output module */ + driver = arg; + debug1("Setting output module: %s", driver ); +} + +static void set_output_flag(int flag) +{ + if(outflags <= 0) outflags = flag; + else outflags |= flag; +} + +static void set_output_h(char *a) +{ + set_output_flag(OUT123_HEADPHONES); +} + +static void set_output_s(char *a) +{ + set_output_flag(OUT123_INTERNAL_SPEAKER); +} + +static void set_output_l(char *a) +{ + set_output_flag(OUT123_LINE_OUT); +} + +static void set_output(char *arg) +{ + /* If single letter, it's the legacy output switch for AIX/HP/Sun. + If longer, it's module[:device] . If zero length, it's rubbish. */ + if(strlen(arg) <= 1) switch(arg[0]) + { + case 'h': set_output_h(arg); break; + case 's': set_output_s(arg); break; + case 'l': set_output_l(arg); break; + default: + error1("\"%s\" is no valid output", arg); + safe_exit(1); + } + else set_output_module(arg); +} + +static void set_verbose (char *arg) +{ + verbose++; +} + +static void set_quiet (char *arg) +{ + verbose=0; + quiet=TRUE; +} + +static void set_out_wav(char *arg) +{ + driver = "wav"; + device = arg; +} + +void set_out_cdr(char *arg) +{ + driver = "cdr"; + device = arg; +} + +void set_out_au(char *arg) +{ + driver = "au"; + device = arg; +} + +void set_out_test(char *arg) +{ + driver = "test"; + device = NULL; +} + +static void set_out_file(char *arg) +{ + driver = "raw"; + device = arg; +} + +static void set_out_stdout(char *arg) +{ + driver = "raw"; + device = NULL; +} + +static void set_out_stdout1(char *arg) +{ + driver = "raw"; + device = NULL; +} + +#if !defined (HAVE_SCHED_SETSCHEDULER) && !defined (HAVE_WINDOWS_H) +static void realtime_not_compiled(char *arg) +{ + fprintf(stderr, ME": Option '-T / --realtime' not compiled into this binary.\n"); +} +#endif + +static void list_output_modules(char *arg) +{ + char **names = NULL; + char **descr = NULL; + int count = -1; + out123_handle *lao; + + if((lao=out123_new())) + { + out123_param_string(lao, OUT123_BINDIR, binpath); + out123_param_int(lao, OUT123_VERBOSE, verbose); + if(quiet) + out123_param_int(lao, OUT123_FLAGS, OUT123_QUIET); + if((count=out123_drivers(lao, &names, &descr)) >= 0) + { + int i; + for(i=0; i= 0 ? 0 : 1); +} + +static void list_encodings(char *arg) +{ + int i; + int enc_count = 0; + int *enc_codes = NULL; + + enc_count = out123_enc_list(&enc_codes); + /* All of the returned encodings have to have proper names! + It is a libout123 bug if not, and it should be quickly caught. */ + for(i=0;i 0 && fmts[0].encoding > 0) + { + const char *encname = out123_enc_name(fmts[0].encoding); + printf( "--rate %li --channels %i --encoding %s\n" + , fmts[0].rate, fmts[0].channels + , encname ? encname : "???" ); + } + else + { + if(verbose) + fprintf(stderr, ME": no default format found\n"); + } + free(fmts); + } + else if(!quiet) + error1("cannot open driver: %s", out123_strerror(lao)); + out123_del(lao); + } + else if(!quiet) + error("Failed to create an out123 handle."); + exit(0); +} + +/* Please note: GLO_NUM expects point to LONG! */ +/* ThOr: + * Yeah, and despite that numerous addresses to int variables were +passed. + * That's not good on my Alpha machine with int=32bit and long=64bit! + * Introduced GLO_INT and GLO_LONG as different bits to make that clear. + * GLO_NUM no longer exists. + */ +topt opts[] = { + {'t', "test", GLO_INT, set_out_test, NULL, 0}, + {'s', "stdout", GLO_INT, set_out_stdout, NULL, 0}, + {'S', "STDOUT", GLO_INT, set_out_stdout1, NULL, 0}, + {'O', "outfile", GLO_ARG | GLO_CHAR, set_out_file, NULL, 0}, + {'v', "verbose", 0, set_verbose, 0, 0}, + {'q', "quiet", 0, set_quiet, 0, 0}, + {'m', "mono", GLO_INT, 0, &channels, 1}, + {0, "stereo", GLO_INT, 0, &channels, 2}, + {'c', "channels", GLO_ARG | GLO_INT, 0, &channels, 0}, + {'r', "rate", GLO_ARG | GLO_LONG, 0, &rate, 0}, + {0, "headphones", 0, set_output_h, 0,0}, + {0, "speaker", 0, set_output_s, 0,0}, + {0, "lineout", 0, set_output_l, 0,0}, + {'o', "output", GLO_ARG | GLO_CHAR, set_output, 0, 0}, + {0, "list-modules",0, list_output_modules, NULL, 0}, + {'a', "audiodevice", GLO_ARG | GLO_CHAR, 0, &device, 0}, +#ifndef NOXFERMEM + {'b', "buffer", GLO_ARG | GLO_LONG, 0, &buffer_kb, 0}, + {0, "preload", GLO_ARG|GLO_DOUBLE, 0, &preload, 0}, +#endif +#ifdef HAVE_SETPRIORITY + {0, "aggressive", GLO_INT, 0, &aggressive, 2}, +#endif +#if defined (HAVE_SCHED_SETSCHEDULER) || defined (HAVE_WINDOWS_H) + /* check why this should be a long variable instead of int! */ + {'T', "realtime", GLO_INT, 0, &realtime, TRUE }, +#else + {'T', "realtime", 0, realtime_not_compiled, 0, 0 }, +#endif +#ifdef HAVE_WINDOWS_H + {0, "priority", GLO_ARG | GLO_INT, 0, &w32_priority, 0}, +#endif + {'w', "wav", GLO_ARG | GLO_CHAR, set_out_wav, 0, 0 }, + {0, "cdr", GLO_ARG | GLO_CHAR, set_out_cdr, 0, 0 }, + {0, "au", GLO_ARG | GLO_CHAR, set_out_au, 0, 0 }, + {'?', "help", 0, want_usage, 0, 0 }, + {0 , "longhelp" , 0, want_long_usage, 0, 0 }, + {0 , "version" , 0, give_version, 0, 0 }, + {'e', "encoding", GLO_ARG|GLO_CHAR, 0, &encoding_name, 0}, + {0, "list-encodings", 0, list_encodings, 0, 0 }, + {0, "test-format", 0, test_format, 0, 0 }, + {0, "test-encodings", 0, test_encodings, 0, 0}, + {0, "query-format", 0, query_format, 0, 0}, + {0, "name", GLO_ARG|GLO_CHAR, 0, &name, 0}, + {0, "devbuffer", GLO_ARG|GLO_DOUBLE, 0, &device_buffer, 0}, + {0, "timelimit", GLO_ARG|GLO_LONG, 0, &timelimit, 0}, + {0, "wave-pat", GLO_ARG|GLO_CHAR, 0, &wave_patterns, 0}, + {0, "wave-freq", GLO_ARG|GLO_CHAR, 0, &wave_freqs, 0}, + {0, "wave-phase", GLO_ARG|GLO_CHAR, 0, &wave_phases, 0}, + {0, "wave-limit", GLO_ARG|GLO_LONG, 0, &wave_limit, 0}, + {0, 0, 0, 0, 0, 0} +}; + +/* An strtok() that also returns empty tokens on multiple separators. */ + +static size_t mytok_count(const char *choppy) +{ + size_t count = 0; + if(choppy) + { + count = 1; + do { + if(*choppy == ',') + ++count; + } while(*(++choppy)); + } + return count; +} + +static char *mytok(char **choppy) +{ + char *tok; + if(!*choppy) + return NULL; + tok = *choppy; + while(**choppy && **choppy != ',') + ++(*choppy); + /* Another token follows if we found a separator. */ + if(**choppy == ',') + *(*choppy)++ = 0; + else + *choppy = NULL; /* Nothing left. */ + return tok; +} + +static void setup_wavegen(void) +{ + size_t count = 0; + size_t i; + double *freq = NULL; + double *phase = NULL; + const char **pat = NULL; + + if(wave_freqs) + { + char *tok; + char *next; + count = mytok_count(wave_freqs); + freq = malloc(sizeof(double)*count); + if(!freq){ error("OOM!"); safe_exit(1); } + next = wave_freqs; + for(i=0; isamples); + /* TODO: There is a crash here! pat being optimised away ... */ + for(i=0; ifreq[i] + , phase ? phase[i] : 0 ); + } + + if(phase) + free(phase); + if(pat) + free(pat); + if(freq) + free(freq); +} + +/* return 1 on success, 0 on failure */ +int play_frame(void) +{ + size_t got_samples; + size_t get_samples = pcmblock; + if(timelimit >= 0) + { + if(offset >= timelimit) + return 0; + else if(timelimit < offset+get_samples) + get_samples = (off_t)timelimit-offset; + } + if(waver) + got_samples = wave_table_extract(waver, audio, get_samples); + else + got_samples = fread(audio, pcmframe, get_samples, input); + /* Play what is there to play (starting with second decode_frame call!) */ + if(got_samples) + { + size_t got_bytes = pcmframe * got_samples; + if(out123_play(ao, audio, got_bytes) < (int)got_bytes) + { + if(!quiet) + { + error2( "out123 error %i: %s" + , out123_errcode(ao), out123_strerror(ao) ); + } + safe_exit(133); + } + offset += got_samples; + return 1; + } + else return 0; +} + +#if !defined(WIN32) && !defined(GENERIC) +static void catch_interrupt(void) +{ + intflag = TRUE; +} +#endif + +int main(int sys_argc, char ** sys_argv) +{ + int result; +#if defined(WIN32) + _setmode(STDIN_FILENO, _O_BINARY); +#endif + +#if defined (WANT_WIN32_UNICODE) + if(win32_cmdline_utf8(&argc, &argv) != 0) + { + error("Cannot convert command line to UTF8!"); + safe_exit(76); + } +#else + argv = sys_argv; + argc = sys_argc; +#endif + + if(!(fullprogname = compat_strdup(argv[0]))) + { + error("OOM"); /* Out Of Memory. Don't waste bytes on that error. */ + safe_exit(1); + } + /* Extract binary and path, take stuff before/after last / or \ . */ + if( (cmd_name = strrchr(fullprogname, '/')) + || (cmd_name = strrchr(fullprogname, '\\'))) + { + /* There is some explicit path. */ + cmd_name[0] = 0; /* End byte for path. */ + cmd_name++; + binpath = fullprogname; + } + else + { + cmd_name = fullprogname; /* No path separators there. */ + binpath = NULL; /* No path at all. */ + } + + /* Get default flags. */ + { + out123_handle *paro = out123_new(); + out123_getparam_int(paro, OUT123_FLAGS, &outflags); + out123_del(paro); + } + +#ifdef OS2 + _wildcard(&argc,&argv); +#endif + + while ((result = getlopt(argc, argv, opts))) + switch (result) { + case GLO_UNKNOWN: + fprintf (stderr, ME": invalid argument: %s\n", loptarg); + usage(1); + case GLO_NOARG: + fprintf (stderr, ME": missing argument for parameter: %s\n", loptarg); + usage(1); + } + + if(quiet) + verbose = 0; + + /* Ensure cleanup before we cause too much mess. */ +#if !defined(WIN32) && !defined(GENERIC) + catchsignal(SIGINT, catch_interrupt); + catchsignal(SIGTERM, catch_interrupt); +#endif + ao = out123_new(); + if(!ao){ error("Failed to allocate output."); exit(1); } + + if + ( 0 + || out123_param_int(ao, OUT123_FLAGS, outflags) + || out123_param_float(ao, OUT123_PRELOAD, preload) + || out123_param_int(ao, OUT123_GAIN, gain) + || out123_param_int(ao, OUT123_VERBOSE, verbose) + || out123_param_string(ao, OUT123_NAME, name) + || out123_param_string(ao, OUT123_BINDIR, binpath) + || out123_param_float(ao, OUT123_DEVICEBUFFER, device_buffer) + ) + { + error("Error setting output parameters. Do you need a usage reminder?"); + usage(1); + } + +#ifdef HAVE_SETPRIORITY + if(aggressive) { /* tst */ + int mypid = getpid(); + if(!quiet) fprintf(stderr, ME": Aggressively trying to increase priority.\n"); + if(setpriority(PRIO_PROCESS,mypid,-20)) + error("Failed to aggressively increase priority.\n"); + } +#endif + +#if defined (HAVE_SCHED_SETSCHEDULER) && !defined (__CYGWIN__) && !defined (HAVE_WINDOWS_H) +/* Cygwin --realtime seems to fail when accessing network, using win32 set priority instead */ +/* MinGW may have pthread installed, we prefer win32API */ + if(realtime) + { /* Get real-time priority */ + struct sched_param sp; + if(!quiet) fprintf(stderr, ME": Getting real-time priority\n"); + memset(&sp, 0, sizeof(struct sched_param)); + sp.sched_priority = sched_get_priority_min(SCHED_FIFO); + if (sched_setscheduler(0, SCHED_RR, &sp) == -1) + error("Can't get realtime priority\n"); + } +#endif + +/* make sure not Cygwin, it doesn't need it */ +#if defined(WIN32) && defined(HAVE_WINDOWS_H) + /* argument "3" is equivalent to realtime priority class */ + win32_set_priority(realtime ? 3 : w32_priority); +#endif + + if(encoding_name) + { + encoding = out123_enc_byname(encoding_name); + if(!encoding) + { + error1("Unknown encoding '%s' given!\n", encoding_name); + safe_exit(1); + } + } + pcmframe = out123_encsize(encoding)*channels; + bufferblock = pcmblock*pcmframe; + audio = (unsigned char*) malloc(bufferblock); + + check_fatal_output(out123_set_buffer(ao, buffer_kb*1024)); + /* This needs bufferblock set! */ + check_fatal_output(out123_open(ao, driver, device)); + + if(verbose) + { + long props = 0; + const char *encname; + char *realname = NULL; + encname = out123_enc_name(encoding); + fprintf(stderr, ME": format: %li Hz, %i channels, %s\n" + , rate, channels, encname ? encname : "???" ); + out123_getparam_string(ao, OUT123_NAME, &realname); + if(realname) + fprintf(stderr, ME": output real name: %s\n", realname); + out123_getparam_int(ao, OUT123_PROPFLAGS, &props); + if(props & OUT123_PROP_LIVE) + fprintf(stderr, ME": This is a live sink.\n"); + } + check_fatal_output(out123_start(ao, rate, channels, encoding)); + + input = stdin; + if(wave_freqs) + setup_wavegen(); + + while(play_frame() && !intflag) + { + /* be happy */ + } + if(intflag) /* Make it quick! */ + { + if(!quiet) + fprintf(stderr, ME": Interrupted. Dropping the ball.\n"); + out123_drop(ao); + } + + safe_exit(0); /* That closes output and restores terminal, too. */ + return 0; +} + +static char* output_enclist(void) +{ + int i; + char *list = NULL; + char *pos; + size_t len = 0; + int enc_count = 0; + int *enc_codes = NULL; + + enc_count = out123_enc_list(&enc_codes); + for(i=0;i0) + *(pos++) = ' '; + strcpy(pos, name); + pos+=strlen(name); + } + free(enc_codes); + return list; +} + +static void print_title(FILE *o) +{ + fprintf(o, "Simple audio output with raw PCM input\n"); + fprintf(o, "\tversion %s; derived from mpg123 by Michael Hipp and others\n", PACKAGE_VERSION); + fprintf(o, "\tfree software (LGPL) without any warranty but with best wishes\n"); +} + +static void usage(int err) /* print syntax & exit */ +{ + FILE* o = stdout; + if(err) + { + o = stderr; + fprintf(o, ME": You made some mistake in program usage... let me briefly remind you:\n\n"); + } + print_title(o); + fprintf(o,"\nusage: %s [option(s)] [file(s) | URL(s) | -]\n", cmd_name); + fprintf(o,"supported options [defaults in brackets]:\n"); + fprintf(o," -v increase verbosity level -q quiet (only print errors)\n"); + fprintf(o," -t testmode (no output) -s write to stdout\n"); + fprintf(o," -w f write output as WAV file\n"); + fprintf(o," -b n output buffer: n Kbytes [0] \n"); + fprintf(o," -r n set samplerate [44100]\n"); + fprintf(o," -o m select output module -a d set audio device\n"); + fprintf(o," -m single-channel (mono) instead of stereo\n"); + #ifdef HAVE_SCHED_SETSCHEDULER + fprintf(o," -T get realtime priority\n"); + #endif + fprintf(o," -? this help --version print name + version\n"); + fprintf(o,"See the manpage out123(1) or call %s with --longhelp for more parameters and information.\n", cmd_name); + safe_exit(err); +} + +static void want_usage(char* arg) +{ + usage(0); +} + +static void long_usage(int err) +{ + char *enclist; + FILE* o = stdout; + if(err) + { + o = stderr; + fprintf(o, "You made some mistake in program usage... let me remind you:\n\n"); + } + enclist = output_enclist(); + print_title(o); + fprintf(o,"\nusage: %s [option(s)] [file(s) | URL(s) | -]\n", cmd_name); + + fprintf(o," --name set instance name (p.ex. JACK client)\n"); + fprintf(o," -o --output select audio output module\n"); + fprintf(o," --list-modules list the available modules\n"); + fprintf(o," -a --audiodevice select audio device (for files, empty or - is stdout)\n"); + fprintf(o," -s --stdout write raw audio to stdout (-o raw -a -)\n"); + fprintf(o," -S --STDOUT play AND output stream (not implemented yet)\n"); + fprintf(o," -O --output raw output to given file (-o raw -a )\n"); + fprintf(o," -w --wav write samples as WAV file in (-o wav -a )\n"); + fprintf(o," --au write samples as Sun AU file in (-o au -a )\n"); + fprintf(o," --cdr write samples as raw CD audio file in (-o cdr -a )\n"); + fprintf(o," -r --rate set the audio output rate in Hz (default 44100)\n"); + fprintf(o," -c --channels set channel count to \n"); + fprintf(o," -e --encoding set output encoding (%s)\n" + , enclist != NULL ? enclist : "OOM!"); + fprintf(o," -m --mono set channel count to 1\n"); + fprintf(o," --stereo set channel count to 2 (default)\n"); + fprintf(o," --list-encodings list of encoding short and long names\n"); + fprintf(o," --test-format return 0 if configued audio format is supported\n"); + fprintf(o," --test-encodings print out possible encodings with given channels/rate\n"); + fprintf(o," --query-format print out default format for given device, if any\n"); + fprintf(o," -o h --headphones (aix/hp/sun) output on headphones\n"); + fprintf(o," -o s --speaker (aix/hp/sun) output on speaker\n"); + fprintf(o," -o l --lineout (aix/hp/sun) output to lineout\n"); +#ifndef NOXFERMEM + fprintf(o," -b --buffer set play buffer (\"output cache\")\n"); + fprintf(o," --preload fraction of buffer to fill before playback\n"); +#endif + fprintf(o," --devbuffer set device buffer in seconds; <= 0 means default\n"); + fprintf(o," --timelimit set time limit in PCM samples if >= 0\n"); + fprintf(o," --wave-freq set wave generator frequency or list of those\n"); + fprintf(o," with comma separation for enabling a generated\n"); + fprintf(o," test signal instead of standard input,\n"); + fprintf(o," empty value repeating the previous\n"); + fprintf(o," --wave-pat

set wave pattern(s) (out of those:\n"); + fprintf(o," %s),\n", wave_pattern_list); + fprintf(o," empty value repeating the previous\n"); + fprintf(o," --wave-phase

set wave phase shift(s), negative values\n"); + fprintf(o," inverting the pattern in time and\n"); + fprintf(o," empty value repeating the previous\n"); + fprintf(o," --wave-limit soft limit on wave table size\n"); + fprintf(o," -t --test no output, just read and discard data (-o test)\n"); + fprintf(o," -v[*] --verbose increase verboselevel\n"); + #ifdef HAVE_SETPRIORITY + fprintf(o," --aggressive tries to get higher priority (nice)\n"); + #endif + #if defined (HAVE_SCHED_SETSCHEDULER) || defined (HAVE_WINDOWS_H) + fprintf(o," -T --realtime tries to get realtime priority\n"); + #endif + #ifdef HAVE_WINDOWS_H + fprintf(o," --priority use specified process priority\n"); + fprintf(o," accepts -2 to 3 as integer arguments\n"); + fprintf(o," -2 as idle, 0 as normal and 3 as realtime.\n"); + #endif + fprintf(o," -? --help give compact help\n"); + fprintf(o," --longhelp give this long help listing\n"); + fprintf(o," --version give name / version string\n"); + + fprintf(o,"\nSee the manpage out123(1) for more information.\n"); + free(enclist); + safe_exit(err); +} + +static void want_long_usage(char* arg) +{ + long_usage(0); +} + +static void give_version(char* arg) +{ + fprintf(stdout, "out123 "PACKAGE_VERSION"\n"); + safe_exit(0); +} diff --git a/deps/mpg123/src/output/Makefile.am b/deps/mpg123/src/output/Makefile.am deleted file mode 100644 index afa89e7..0000000 --- a/deps/mpg123/src/output/Makefile.am +++ /dev/null @@ -1,213 +0,0 @@ -## Makefile.am: produce Makefile.in from this - -## copyright by the mpg123 project - free software under the terms of the LGPL 2.1 -## see COPYING and AUTHORS files in distribution or http://www.mpg123.org -## initially written by Nicholas J. Humfrey - -#AM_CPPFLAGS = -I$(top_srcdir)/src/libmpg123 -I$(top_srcdir)/src -INCLUDES = $(LTDLINCL) -I$(top_builddir)/src -I$(top_builddir)/src/libmpg123 -I$(top_srcdir)/src -I$(top_srcdir)/src/libmpg123 - -#Do not include uneeded headers from mpg123app.h -AM_CPPFLAGS = -DBUILDING_OUTPUT_MODULES=1 - -if HAVE_MODULES - -pkglib_LTLIBRARIES = - -# These are not tested and _very_ likely need work: aix alib hp os2 sgi mint - -# Use that sh/perl script to generate the module entries: -#for i in alsa coreaudio esd jack nas oss portaudio pulse sdl sndio sun win32 aix alib arts hp os2 sgi mint openal dummy; do echo $i; done | -#perl -ne 'chomp; $big = uc($_); print </dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -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@ - -# These are not tested and _very_ likely need work: aix alib hp os2 sgi mint - -# Use that sh/perl script to generate the module entries: -#for i in alsa coreaudio esd jack nas oss portaudio pulse sdl sndio sun win32 aix alib arts hp os2 sgi mint openal dummy; do echo $i; done | -#perl -ne 'chomp; $big = uc($_); print </dev/null 2>&1;; \ - esac -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_CFLAGS = @AIX_CFLAGS@ -AIX_LDFLAGS = @AIX_LDFLAGS@ -AIX_LIBS = @AIX_LIBS@ -ALIB_CFLAGS = @ALIB_CFLAGS@ -ALIB_LDFLAGS = @ALIB_LDFLAGS@ -ALIB_LIBS = @ALIB_LIBS@ -ALSA_CFLAGS = @ALSA_CFLAGS@ -ALSA_LDFLAGS = @ALSA_LDFLAGS@ -ALSA_LIBS = @ALSA_LIBS@ -AMTAR = @AMTAR@ -API_VERSION = @API_VERSION@ -AR = @AR@ -ARTS_CFLAGS = @ARTS_CFLAGS@ -ARTS_LDFLAGS = @ARTS_LDFLAGS@ -ARTS_LIBS = @ARTS_LIBS@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COREAUDIO_CFLAGS = @COREAUDIO_CFLAGS@ -COREAUDIO_LDFLAGS = @COREAUDIO_LDFLAGS@ -COREAUDIO_LIBS = @COREAUDIO_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DECODER_LOBJ = @DECODER_LOBJ@ -DECODER_OBJ = @DECODER_OBJ@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMMY_CFLAGS = @DUMMY_CFLAGS@ -DUMMY_LDFLAGS = @DUMMY_LDFLAGS@ -DUMMY_LIBS = @DUMMY_LIBS@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ESD_CFLAGS = @ESD_CFLAGS@ -ESD_LDFLAGS = @ESD_LDFLAGS@ -ESD_LIBS = @ESD_LIBS@ -EXEC_LT_LDFLAGS = @EXEC_LT_LDFLAGS@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HP_CFLAGS = @HP_CFLAGS@ -HP_LDFLAGS = @HP_LDFLAGS@ -HP_LIBS = @HP_LIBS@ -INCLUDE_STDIO_H = @INCLUDE_STDIO_H@ -INCLUDE_STDLIB_H = @INCLUDE_STDLIB_H@ -INCLUDE_SYS_TYPE_H = @INCLUDE_SYS_TYPE_H@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -JACK_CFLAGS = @JACK_CFLAGS@ -JACK_LDFLAGS = @JACK_LDFLAGS@ -JACK_LIBS = @JACK_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LFS_LOBJ = @LFS_LOBJ@ -LIBMPG123_VERSION = @LIBMPG123_VERSION@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_LDFLAGS = @LT_LDFLAGS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MINT_CFLAGS = @MINT_CFLAGS@ -MINT_LDFLAGS = @MINT_LDFLAGS@ -MINT_LIBS = @MINT_LIBS@ -MKDIR_P = @MKDIR_P@ -MODULE_OBJ = @MODULE_OBJ@ -NAS_CFLAGS = @NAS_CFLAGS@ -NAS_LDFLAGS = @NAS_LDFLAGS@ -NAS_LIBS = @NAS_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENAL_CFLAGS = @OPENAL_CFLAGS@ -OPENAL_LDFLAGS = @OPENAL_LDFLAGS@ -OPENAL_LIBS = @OPENAL_LIBS@ -OS2_CFLAGS = @OS2_CFLAGS@ -OS2_LDFLAGS = @OS2_LDFLAGS@ -OS2_LIBS = @OS2_LIBS@ -OSS_CFLAGS = @OSS_CFLAGS@ -OSS_LDFLAGS = @OSS_LDFLAGS@ -OSS_LIBS = @OSS_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -OUTPUT_CFLAGS = @OUTPUT_CFLAGS@ -OUTPUT_LDFLAGS = @OUTPUT_LDFLAGS@ -OUTPUT_LIBS = @OUTPUT_LIBS@ -OUTPUT_MOD = @OUTPUT_MOD@ -OUTPUT_OBJ = @OUTPUT_OBJ@ -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@ -PKG_CONFIG = @PKG_CONFIG@ -PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ -PORTAUDIO_LDFLAGS = @PORTAUDIO_LDFLAGS@ -PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ -PULSE_CFLAGS = @PULSE_CFLAGS@ -PULSE_LDFLAGS = @PULSE_LDFLAGS@ -PULSE_LIBS = @PULSE_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LDFLAGS = @SDL_LDFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SGI_CFLAGS = @SGI_CFLAGS@ -SGI_LDFLAGS = @SGI_LDFLAGS@ -SGI_LIBS = @SGI_LIBS@ -SHELL = @SHELL@ -SNDIO_CFLAGS = @SNDIO_CFLAGS@ -SNDIO_LDFLAGS = @SNDIO_LDFLAGS@ -SNDIO_LIBS = @SNDIO_LIBS@ -STRIP = @STRIP@ -SUN_CFLAGS = @SUN_CFLAGS@ -SUN_LDFLAGS = @SUN_LDFLAGS@ -SUN_LIBS = @SUN_LIBS@ -VERSION = @VERSION@ -WIN32_CFLAGS = @WIN32_CFLAGS@ -WIN32_LDFLAGS = @WIN32_LDFLAGS@ -WIN32_LIBS = @WIN32_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -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@ -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@ - -#AM_CPPFLAGS = -I$(top_srcdir)/src/libmpg123 -I$(top_srcdir)/src -INCLUDES = $(LTDLINCL) -I$(top_builddir)/src -I$(top_builddir)/src/libmpg123 -I$(top_srcdir)/src -I$(top_srcdir)/src/libmpg123 - -#Do not include uneeded headers from mpg123app.h -AM_CPPFLAGS = -DBUILDING_OUTPUT_MODULES=1 -@HAVE_MODULES_TRUE@pkglib_LTLIBRARIES = $(am__append_1) \ -@HAVE_MODULES_TRUE@ $(am__append_2) $(am__append_3) \ -@HAVE_MODULES_TRUE@ $(am__append_4) $(am__append_5) \ -@HAVE_MODULES_TRUE@ $(am__append_6) $(am__append_7) \ -@HAVE_MODULES_TRUE@ $(am__append_8) $(am__append_9) \ -@HAVE_MODULES_TRUE@ $(am__append_10) $(am__append_11) \ -@HAVE_MODULES_TRUE@ $(am__append_12) $(am__append_13) \ -@HAVE_MODULES_TRUE@ $(am__append_14) $(am__append_15) \ -@HAVE_MODULES_TRUE@ $(am__append_16) $(am__append_17) \ -@HAVE_MODULES_TRUE@ $(am__append_18) $(am__append_19) \ -@HAVE_MODULES_TRUE@ $(am__append_20) $(am__append_21) -@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@output_alsa_la_SOURCES = alsa.c -@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@output_alsa_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @ALSA_LDFLAGS@ -@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@output_alsa_la_CFLAGS = @ALSA_CFLAGS@ -@HAVE_ALSA_TRUE@@HAVE_MODULES_TRUE@output_alsa_la_LIBADD = @ALSA_LIBS@ -@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@output_coreaudio_la_SOURCES = coreaudio.c -@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@output_coreaudio_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @COREAUDIO_LDFLAGS@ -@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@output_coreaudio_la_CFLAGS = @COREAUDIO_CFLAGS@ -@HAVE_COREAUDIO_TRUE@@HAVE_MODULES_TRUE@output_coreaudio_la_LIBADD = @COREAUDIO_LIBS@ -@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@output_esd_la_SOURCES = esd.c -@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@output_esd_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @ESD_LDFLAGS@ -@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@output_esd_la_CFLAGS = @ESD_CFLAGS@ -@HAVE_ESD_TRUE@@HAVE_MODULES_TRUE@output_esd_la_LIBADD = @ESD_LIBS@ -@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@output_jack_la_SOURCES = jack.c -@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@output_jack_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @JACK_LDFLAGS@ -@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@output_jack_la_CFLAGS = @JACK_CFLAGS@ -@HAVE_JACK_TRUE@@HAVE_MODULES_TRUE@output_jack_la_LIBADD = @JACK_LIBS@ -@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@output_nas_la_SOURCES = nas.c -@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@output_nas_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @NAS_LDFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@output_nas_la_CFLAGS = @NAS_CFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_NAS_TRUE@output_nas_la_LIBADD = @NAS_LIBS@ -@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@output_oss_la_SOURCES = oss.c -@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@output_oss_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @OSS_LDFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@output_oss_la_CFLAGS = @OSS_CFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_OSS_TRUE@output_oss_la_LIBADD = @OSS_LIBS@ -@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@output_portaudio_la_SOURCES = portaudio.c -@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@output_portaudio_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @PORTAUDIO_LDFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@output_portaudio_la_CFLAGS = @PORTAUDIO_CFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_PORTAUDIO_TRUE@output_portaudio_la_LIBADD = @PORTAUDIO_LIBS@ -@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@output_pulse_la_SOURCES = pulse.c -@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@output_pulse_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @PULSE_LDFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@output_pulse_la_CFLAGS = @PULSE_CFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_PULSE_TRUE@output_pulse_la_LIBADD = @PULSE_LIBS@ -@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@output_sdl_la_SOURCES = sdl.c -@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@output_sdl_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @SDL_LDFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@output_sdl_la_CFLAGS = @SDL_CFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_SDL_TRUE@output_sdl_la_LIBADD = @SDL_LIBS@ -@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@output_sndio_la_SOURCES = sndio.c -@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@output_sndio_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @SNDIO_LDFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@output_sndio_la_CFLAGS = @SNDIO_CFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_SNDIO_TRUE@output_sndio_la_LIBADD = @SNDIO_LIBS@ -@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@output_sun_la_SOURCES = sun.c -@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@output_sun_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @SUN_LDFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@output_sun_la_CFLAGS = @SUN_CFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_SUN_TRUE@output_sun_la_LIBADD = @SUN_LIBS@ -@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@output_win32_la_SOURCES = win32.c -@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@output_win32_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @WIN32_LDFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@output_win32_la_CFLAGS = @WIN32_CFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_WIN32_TRUE@output_win32_la_LIBADD = @WIN32_LIBS@ -@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@output_aix_la_SOURCES = aix.c -@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@output_aix_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @AIX_LDFLAGS@ -@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@output_aix_la_CFLAGS = @AIX_CFLAGS@ -@HAVE_AIX_TRUE@@HAVE_MODULES_TRUE@output_aix_la_LIBADD = @AIX_LIBS@ -@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@output_alib_la_SOURCES = alib.c -@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@output_alib_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @ALIB_LDFLAGS@ -@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@output_alib_la_CFLAGS = @ALIB_CFLAGS@ -@HAVE_ALIB_TRUE@@HAVE_MODULES_TRUE@output_alib_la_LIBADD = @ALIB_LIBS@ -@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@output_arts_la_SOURCES = arts.c -@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@output_arts_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @ARTS_LDFLAGS@ -@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@output_arts_la_CFLAGS = @ARTS_CFLAGS@ -@HAVE_ARTS_TRUE@@HAVE_MODULES_TRUE@output_arts_la_LIBADD = @ARTS_LIBS@ -@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@output_hp_la_SOURCES = hp.c -@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@output_hp_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @HP_LDFLAGS@ -@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@output_hp_la_CFLAGS = @HP_CFLAGS@ -@HAVE_HP_TRUE@@HAVE_MODULES_TRUE@output_hp_la_LIBADD = @HP_LIBS@ -@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@output_os2_la_SOURCES = os2.c -@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@output_os2_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @OS2_LDFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@output_os2_la_CFLAGS = @OS2_CFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_OS2_TRUE@output_os2_la_LIBADD = @OS2_LIBS@ -@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@output_sgi_la_SOURCES = sgi.c -@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@output_sgi_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @SGI_LDFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@output_sgi_la_CFLAGS = @SGI_CFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_SGI_TRUE@output_sgi_la_LIBADD = @SGI_LIBS@ -@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@output_mint_la_SOURCES = mint.c -@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@output_mint_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @MINT_LDFLAGS@ -@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@output_mint_la_CFLAGS = @MINT_CFLAGS@ -@HAVE_MINT_TRUE@@HAVE_MODULES_TRUE@output_mint_la_LIBADD = @MINT_LIBS@ -@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@output_openal_la_SOURCES = openal.c -@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@output_openal_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @OPENAL_LDFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@output_openal_la_CFLAGS = @OPENAL_CFLAGS@ -@HAVE_MODULES_TRUE@@HAVE_OPENAL_TRUE@output_openal_la_LIBADD = @OPENAL_LIBS@ -@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@output_dummy_la_SOURCES = dummy.c -@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@output_dummy_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @DUMMY_LDFLAGS@ -@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@output_dummy_la_CFLAGS = @DUMMY_CFLAGS@ -@HAVE_DUMMY_TRUE@@HAVE_MODULES_TRUE@output_dummy_la_LIBADD = @DUMMY_LIBS@ - -# Static build of one module only. -@HAVE_MODULES_FALSE@AM_CFLAGS = @OUTPUT_CFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/output/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/output/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ - } - -uninstall-pkglibLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ - done - -clean-pkglibLTLIBRARIES: - -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) - @list='$(pkglib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } -output_aix.la: $(output_aix_la_OBJECTS) $(output_aix_la_DEPENDENCIES) $(EXTRA_output_aix_la_DEPENDENCIES) - $(output_aix_la_LINK) $(am_output_aix_la_rpath) $(output_aix_la_OBJECTS) $(output_aix_la_LIBADD) $(LIBS) -output_alib.la: $(output_alib_la_OBJECTS) $(output_alib_la_DEPENDENCIES) $(EXTRA_output_alib_la_DEPENDENCIES) - $(output_alib_la_LINK) $(am_output_alib_la_rpath) $(output_alib_la_OBJECTS) $(output_alib_la_LIBADD) $(LIBS) -output_alsa.la: $(output_alsa_la_OBJECTS) $(output_alsa_la_DEPENDENCIES) $(EXTRA_output_alsa_la_DEPENDENCIES) - $(output_alsa_la_LINK) $(am_output_alsa_la_rpath) $(output_alsa_la_OBJECTS) $(output_alsa_la_LIBADD) $(LIBS) -output_arts.la: $(output_arts_la_OBJECTS) $(output_arts_la_DEPENDENCIES) $(EXTRA_output_arts_la_DEPENDENCIES) - $(output_arts_la_LINK) $(am_output_arts_la_rpath) $(output_arts_la_OBJECTS) $(output_arts_la_LIBADD) $(LIBS) -output_coreaudio.la: $(output_coreaudio_la_OBJECTS) $(output_coreaudio_la_DEPENDENCIES) $(EXTRA_output_coreaudio_la_DEPENDENCIES) - $(output_coreaudio_la_LINK) $(am_output_coreaudio_la_rpath) $(output_coreaudio_la_OBJECTS) $(output_coreaudio_la_LIBADD) $(LIBS) -output_dummy.la: $(output_dummy_la_OBJECTS) $(output_dummy_la_DEPENDENCIES) $(EXTRA_output_dummy_la_DEPENDENCIES) - $(output_dummy_la_LINK) $(am_output_dummy_la_rpath) $(output_dummy_la_OBJECTS) $(output_dummy_la_LIBADD) $(LIBS) -output_esd.la: $(output_esd_la_OBJECTS) $(output_esd_la_DEPENDENCIES) $(EXTRA_output_esd_la_DEPENDENCIES) - $(output_esd_la_LINK) $(am_output_esd_la_rpath) $(output_esd_la_OBJECTS) $(output_esd_la_LIBADD) $(LIBS) -output_hp.la: $(output_hp_la_OBJECTS) $(output_hp_la_DEPENDENCIES) $(EXTRA_output_hp_la_DEPENDENCIES) - $(output_hp_la_LINK) $(am_output_hp_la_rpath) $(output_hp_la_OBJECTS) $(output_hp_la_LIBADD) $(LIBS) -output_jack.la: $(output_jack_la_OBJECTS) $(output_jack_la_DEPENDENCIES) $(EXTRA_output_jack_la_DEPENDENCIES) - $(output_jack_la_LINK) $(am_output_jack_la_rpath) $(output_jack_la_OBJECTS) $(output_jack_la_LIBADD) $(LIBS) -output_mint.la: $(output_mint_la_OBJECTS) $(output_mint_la_DEPENDENCIES) $(EXTRA_output_mint_la_DEPENDENCIES) - $(output_mint_la_LINK) $(am_output_mint_la_rpath) $(output_mint_la_OBJECTS) $(output_mint_la_LIBADD) $(LIBS) -output_nas.la: $(output_nas_la_OBJECTS) $(output_nas_la_DEPENDENCIES) $(EXTRA_output_nas_la_DEPENDENCIES) - $(output_nas_la_LINK) $(am_output_nas_la_rpath) $(output_nas_la_OBJECTS) $(output_nas_la_LIBADD) $(LIBS) -output_openal.la: $(output_openal_la_OBJECTS) $(output_openal_la_DEPENDENCIES) $(EXTRA_output_openal_la_DEPENDENCIES) - $(output_openal_la_LINK) $(am_output_openal_la_rpath) $(output_openal_la_OBJECTS) $(output_openal_la_LIBADD) $(LIBS) -output_os2.la: $(output_os2_la_OBJECTS) $(output_os2_la_DEPENDENCIES) $(EXTRA_output_os2_la_DEPENDENCIES) - $(output_os2_la_LINK) $(am_output_os2_la_rpath) $(output_os2_la_OBJECTS) $(output_os2_la_LIBADD) $(LIBS) -output_oss.la: $(output_oss_la_OBJECTS) $(output_oss_la_DEPENDENCIES) $(EXTRA_output_oss_la_DEPENDENCIES) - $(output_oss_la_LINK) $(am_output_oss_la_rpath) $(output_oss_la_OBJECTS) $(output_oss_la_LIBADD) $(LIBS) -output_portaudio.la: $(output_portaudio_la_OBJECTS) $(output_portaudio_la_DEPENDENCIES) $(EXTRA_output_portaudio_la_DEPENDENCIES) - $(output_portaudio_la_LINK) $(am_output_portaudio_la_rpath) $(output_portaudio_la_OBJECTS) $(output_portaudio_la_LIBADD) $(LIBS) -output_pulse.la: $(output_pulse_la_OBJECTS) $(output_pulse_la_DEPENDENCIES) $(EXTRA_output_pulse_la_DEPENDENCIES) - $(output_pulse_la_LINK) $(am_output_pulse_la_rpath) $(output_pulse_la_OBJECTS) $(output_pulse_la_LIBADD) $(LIBS) -output_sdl.la: $(output_sdl_la_OBJECTS) $(output_sdl_la_DEPENDENCIES) $(EXTRA_output_sdl_la_DEPENDENCIES) - $(output_sdl_la_LINK) $(am_output_sdl_la_rpath) $(output_sdl_la_OBJECTS) $(output_sdl_la_LIBADD) $(LIBS) -output_sgi.la: $(output_sgi_la_OBJECTS) $(output_sgi_la_DEPENDENCIES) $(EXTRA_output_sgi_la_DEPENDENCIES) - $(output_sgi_la_LINK) $(am_output_sgi_la_rpath) $(output_sgi_la_OBJECTS) $(output_sgi_la_LIBADD) $(LIBS) -output_sndio.la: $(output_sndio_la_OBJECTS) $(output_sndio_la_DEPENDENCIES) $(EXTRA_output_sndio_la_DEPENDENCIES) - $(output_sndio_la_LINK) $(am_output_sndio_la_rpath) $(output_sndio_la_OBJECTS) $(output_sndio_la_LIBADD) $(LIBS) -output_sun.la: $(output_sun_la_OBJECTS) $(output_sun_la_DEPENDENCIES) $(EXTRA_output_sun_la_DEPENDENCIES) - $(output_sun_la_LINK) $(am_output_sun_la_rpath) $(output_sun_la_OBJECTS) $(output_sun_la_LIBADD) $(LIBS) -output_win32.la: $(output_win32_la_OBJECTS) $(output_win32_la_DEPENDENCIES) $(EXTRA_output_win32_la_DEPENDENCIES) - $(output_win32_la_LINK) $(am_output_win32_la_rpath) $(output_win32_la_OBJECTS) $(output_win32_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_aix_la-aix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_alib_la-alib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_alsa_la-alsa.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_arts_la-arts.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_coreaudio_la-coreaudio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_dummy_la-dummy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_esd_la-esd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_hp_la-hp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_jack_la-jack.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_mint_la-mint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_nas_la-nas.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_openal_la-openal.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_os2_la-os2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_oss_la-oss.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_portaudio_la-portaudio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_pulse_la-pulse.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_sdl_la-sdl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_sgi_la-sgi.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_sndio_la-sndio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_sun_la-sun.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_win32_la-win32.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -output_aix_la-aix.lo: aix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_aix_la_CFLAGS) $(CFLAGS) -MT output_aix_la-aix.lo -MD -MP -MF $(DEPDIR)/output_aix_la-aix.Tpo -c -o output_aix_la-aix.lo `test -f 'aix.c' || echo '$(srcdir)/'`aix.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_aix_la-aix.Tpo $(DEPDIR)/output_aix_la-aix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='aix.c' object='output_aix_la-aix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_aix_la_CFLAGS) $(CFLAGS) -c -o output_aix_la-aix.lo `test -f 'aix.c' || echo '$(srcdir)/'`aix.c - -output_alib_la-alib.lo: alib.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_alib_la_CFLAGS) $(CFLAGS) -MT output_alib_la-alib.lo -MD -MP -MF $(DEPDIR)/output_alib_la-alib.Tpo -c -o output_alib_la-alib.lo `test -f 'alib.c' || echo '$(srcdir)/'`alib.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_alib_la-alib.Tpo $(DEPDIR)/output_alib_la-alib.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='alib.c' object='output_alib_la-alib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_alib_la_CFLAGS) $(CFLAGS) -c -o output_alib_la-alib.lo `test -f 'alib.c' || echo '$(srcdir)/'`alib.c - -output_alsa_la-alsa.lo: alsa.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_alsa_la_CFLAGS) $(CFLAGS) -MT output_alsa_la-alsa.lo -MD -MP -MF $(DEPDIR)/output_alsa_la-alsa.Tpo -c -o output_alsa_la-alsa.lo `test -f 'alsa.c' || echo '$(srcdir)/'`alsa.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_alsa_la-alsa.Tpo $(DEPDIR)/output_alsa_la-alsa.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='alsa.c' object='output_alsa_la-alsa.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_alsa_la_CFLAGS) $(CFLAGS) -c -o output_alsa_la-alsa.lo `test -f 'alsa.c' || echo '$(srcdir)/'`alsa.c - -output_arts_la-arts.lo: arts.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_arts_la_CFLAGS) $(CFLAGS) -MT output_arts_la-arts.lo -MD -MP -MF $(DEPDIR)/output_arts_la-arts.Tpo -c -o output_arts_la-arts.lo `test -f 'arts.c' || echo '$(srcdir)/'`arts.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_arts_la-arts.Tpo $(DEPDIR)/output_arts_la-arts.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='arts.c' object='output_arts_la-arts.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_arts_la_CFLAGS) $(CFLAGS) -c -o output_arts_la-arts.lo `test -f 'arts.c' || echo '$(srcdir)/'`arts.c - -output_coreaudio_la-coreaudio.lo: coreaudio.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_coreaudio_la_CFLAGS) $(CFLAGS) -MT output_coreaudio_la-coreaudio.lo -MD -MP -MF $(DEPDIR)/output_coreaudio_la-coreaudio.Tpo -c -o output_coreaudio_la-coreaudio.lo `test -f 'coreaudio.c' || echo '$(srcdir)/'`coreaudio.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_coreaudio_la-coreaudio.Tpo $(DEPDIR)/output_coreaudio_la-coreaudio.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='coreaudio.c' object='output_coreaudio_la-coreaudio.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_coreaudio_la_CFLAGS) $(CFLAGS) -c -o output_coreaudio_la-coreaudio.lo `test -f 'coreaudio.c' || echo '$(srcdir)/'`coreaudio.c - -output_dummy_la-dummy.lo: dummy.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_dummy_la_CFLAGS) $(CFLAGS) -MT output_dummy_la-dummy.lo -MD -MP -MF $(DEPDIR)/output_dummy_la-dummy.Tpo -c -o output_dummy_la-dummy.lo `test -f 'dummy.c' || echo '$(srcdir)/'`dummy.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_dummy_la-dummy.Tpo $(DEPDIR)/output_dummy_la-dummy.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dummy.c' object='output_dummy_la-dummy.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_dummy_la_CFLAGS) $(CFLAGS) -c -o output_dummy_la-dummy.lo `test -f 'dummy.c' || echo '$(srcdir)/'`dummy.c - -output_esd_la-esd.lo: esd.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_esd_la_CFLAGS) $(CFLAGS) -MT output_esd_la-esd.lo -MD -MP -MF $(DEPDIR)/output_esd_la-esd.Tpo -c -o output_esd_la-esd.lo `test -f 'esd.c' || echo '$(srcdir)/'`esd.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_esd_la-esd.Tpo $(DEPDIR)/output_esd_la-esd.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='esd.c' object='output_esd_la-esd.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_esd_la_CFLAGS) $(CFLAGS) -c -o output_esd_la-esd.lo `test -f 'esd.c' || echo '$(srcdir)/'`esd.c - -output_hp_la-hp.lo: hp.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_hp_la_CFLAGS) $(CFLAGS) -MT output_hp_la-hp.lo -MD -MP -MF $(DEPDIR)/output_hp_la-hp.Tpo -c -o output_hp_la-hp.lo `test -f 'hp.c' || echo '$(srcdir)/'`hp.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_hp_la-hp.Tpo $(DEPDIR)/output_hp_la-hp.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hp.c' object='output_hp_la-hp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_hp_la_CFLAGS) $(CFLAGS) -c -o output_hp_la-hp.lo `test -f 'hp.c' || echo '$(srcdir)/'`hp.c - -output_jack_la-jack.lo: jack.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_jack_la_CFLAGS) $(CFLAGS) -MT output_jack_la-jack.lo -MD -MP -MF $(DEPDIR)/output_jack_la-jack.Tpo -c -o output_jack_la-jack.lo `test -f 'jack.c' || echo '$(srcdir)/'`jack.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_jack_la-jack.Tpo $(DEPDIR)/output_jack_la-jack.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jack.c' object='output_jack_la-jack.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_jack_la_CFLAGS) $(CFLAGS) -c -o output_jack_la-jack.lo `test -f 'jack.c' || echo '$(srcdir)/'`jack.c - -output_mint_la-mint.lo: mint.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_mint_la_CFLAGS) $(CFLAGS) -MT output_mint_la-mint.lo -MD -MP -MF $(DEPDIR)/output_mint_la-mint.Tpo -c -o output_mint_la-mint.lo `test -f 'mint.c' || echo '$(srcdir)/'`mint.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_mint_la-mint.Tpo $(DEPDIR)/output_mint_la-mint.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mint.c' object='output_mint_la-mint.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_mint_la_CFLAGS) $(CFLAGS) -c -o output_mint_la-mint.lo `test -f 'mint.c' || echo '$(srcdir)/'`mint.c - -output_nas_la-nas.lo: nas.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_nas_la_CFLAGS) $(CFLAGS) -MT output_nas_la-nas.lo -MD -MP -MF $(DEPDIR)/output_nas_la-nas.Tpo -c -o output_nas_la-nas.lo `test -f 'nas.c' || echo '$(srcdir)/'`nas.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_nas_la-nas.Tpo $(DEPDIR)/output_nas_la-nas.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nas.c' object='output_nas_la-nas.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_nas_la_CFLAGS) $(CFLAGS) -c -o output_nas_la-nas.lo `test -f 'nas.c' || echo '$(srcdir)/'`nas.c - -output_openal_la-openal.lo: openal.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_openal_la_CFLAGS) $(CFLAGS) -MT output_openal_la-openal.lo -MD -MP -MF $(DEPDIR)/output_openal_la-openal.Tpo -c -o output_openal_la-openal.lo `test -f 'openal.c' || echo '$(srcdir)/'`openal.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_openal_la-openal.Tpo $(DEPDIR)/output_openal_la-openal.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='openal.c' object='output_openal_la-openal.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_openal_la_CFLAGS) $(CFLAGS) -c -o output_openal_la-openal.lo `test -f 'openal.c' || echo '$(srcdir)/'`openal.c - -output_os2_la-os2.lo: os2.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_os2_la_CFLAGS) $(CFLAGS) -MT output_os2_la-os2.lo -MD -MP -MF $(DEPDIR)/output_os2_la-os2.Tpo -c -o output_os2_la-os2.lo `test -f 'os2.c' || echo '$(srcdir)/'`os2.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_os2_la-os2.Tpo $(DEPDIR)/output_os2_la-os2.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os2.c' object='output_os2_la-os2.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_os2_la_CFLAGS) $(CFLAGS) -c -o output_os2_la-os2.lo `test -f 'os2.c' || echo '$(srcdir)/'`os2.c - -output_oss_la-oss.lo: oss.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_oss_la_CFLAGS) $(CFLAGS) -MT output_oss_la-oss.lo -MD -MP -MF $(DEPDIR)/output_oss_la-oss.Tpo -c -o output_oss_la-oss.lo `test -f 'oss.c' || echo '$(srcdir)/'`oss.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_oss_la-oss.Tpo $(DEPDIR)/output_oss_la-oss.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oss.c' object='output_oss_la-oss.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_oss_la_CFLAGS) $(CFLAGS) -c -o output_oss_la-oss.lo `test -f 'oss.c' || echo '$(srcdir)/'`oss.c - -output_portaudio_la-portaudio.lo: portaudio.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_portaudio_la_CFLAGS) $(CFLAGS) -MT output_portaudio_la-portaudio.lo -MD -MP -MF $(DEPDIR)/output_portaudio_la-portaudio.Tpo -c -o output_portaudio_la-portaudio.lo `test -f 'portaudio.c' || echo '$(srcdir)/'`portaudio.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_portaudio_la-portaudio.Tpo $(DEPDIR)/output_portaudio_la-portaudio.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='portaudio.c' object='output_portaudio_la-portaudio.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_portaudio_la_CFLAGS) $(CFLAGS) -c -o output_portaudio_la-portaudio.lo `test -f 'portaudio.c' || echo '$(srcdir)/'`portaudio.c - -output_pulse_la-pulse.lo: pulse.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_pulse_la_CFLAGS) $(CFLAGS) -MT output_pulse_la-pulse.lo -MD -MP -MF $(DEPDIR)/output_pulse_la-pulse.Tpo -c -o output_pulse_la-pulse.lo `test -f 'pulse.c' || echo '$(srcdir)/'`pulse.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_pulse_la-pulse.Tpo $(DEPDIR)/output_pulse_la-pulse.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulse.c' object='output_pulse_la-pulse.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_pulse_la_CFLAGS) $(CFLAGS) -c -o output_pulse_la-pulse.lo `test -f 'pulse.c' || echo '$(srcdir)/'`pulse.c - -output_sdl_la-sdl.lo: sdl.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_sdl_la_CFLAGS) $(CFLAGS) -MT output_sdl_la-sdl.lo -MD -MP -MF $(DEPDIR)/output_sdl_la-sdl.Tpo -c -o output_sdl_la-sdl.lo `test -f 'sdl.c' || echo '$(srcdir)/'`sdl.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_sdl_la-sdl.Tpo $(DEPDIR)/output_sdl_la-sdl.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sdl.c' object='output_sdl_la-sdl.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_sdl_la_CFLAGS) $(CFLAGS) -c -o output_sdl_la-sdl.lo `test -f 'sdl.c' || echo '$(srcdir)/'`sdl.c - -output_sgi_la-sgi.lo: sgi.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_sgi_la_CFLAGS) $(CFLAGS) -MT output_sgi_la-sgi.lo -MD -MP -MF $(DEPDIR)/output_sgi_la-sgi.Tpo -c -o output_sgi_la-sgi.lo `test -f 'sgi.c' || echo '$(srcdir)/'`sgi.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_sgi_la-sgi.Tpo $(DEPDIR)/output_sgi_la-sgi.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sgi.c' object='output_sgi_la-sgi.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_sgi_la_CFLAGS) $(CFLAGS) -c -o output_sgi_la-sgi.lo `test -f 'sgi.c' || echo '$(srcdir)/'`sgi.c - -output_sndio_la-sndio.lo: sndio.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_sndio_la_CFLAGS) $(CFLAGS) -MT output_sndio_la-sndio.lo -MD -MP -MF $(DEPDIR)/output_sndio_la-sndio.Tpo -c -o output_sndio_la-sndio.lo `test -f 'sndio.c' || echo '$(srcdir)/'`sndio.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_sndio_la-sndio.Tpo $(DEPDIR)/output_sndio_la-sndio.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sndio.c' object='output_sndio_la-sndio.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_sndio_la_CFLAGS) $(CFLAGS) -c -o output_sndio_la-sndio.lo `test -f 'sndio.c' || echo '$(srcdir)/'`sndio.c - -output_sun_la-sun.lo: sun.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_sun_la_CFLAGS) $(CFLAGS) -MT output_sun_la-sun.lo -MD -MP -MF $(DEPDIR)/output_sun_la-sun.Tpo -c -o output_sun_la-sun.lo `test -f 'sun.c' || echo '$(srcdir)/'`sun.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_sun_la-sun.Tpo $(DEPDIR)/output_sun_la-sun.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sun.c' object='output_sun_la-sun.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_sun_la_CFLAGS) $(CFLAGS) -c -o output_sun_la-sun.lo `test -f 'sun.c' || echo '$(srcdir)/'`sun.c - -output_win32_la-win32.lo: win32.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_win32_la_CFLAGS) $(CFLAGS) -MT output_win32_la-win32.lo -MD -MP -MF $(DEPDIR)/output_win32_la-win32.Tpo -c -o output_win32_la-win32.lo `test -f 'win32.c' || echo '$(srcdir)/'`win32.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/output_win32_la-win32.Tpo $(DEPDIR)/output_win32_la-win32.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='win32.c' object='output_win32_la-win32.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(output_win32_la_CFLAGS) $(CFLAGS) -c -o output_win32_la-win32.lo `test -f 'win32.c' || echo '$(srcdir)/'`win32.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -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" - -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @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 -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(pkglibdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -@HAVE_MODULES_TRUE@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: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -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) - -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-generic clean-libtool clean-pkglibLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-pkglibLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -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-pkglibLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibLTLIBRARIES cscopelist ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am 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-man install-pdf install-pdf-am \ - install-pkglibLTLIBRARIES 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-pkglibLTLIBRARIES - - -@HAVE_MODULES_FALSE@all: @OUTPUT_MOD@.$(OBJEXT) - -# No installation happening from here -@HAVE_MODULES_FALSE@install: all - -# 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/deps/mpg123/src/output/aix.c b/deps/mpg123/src/output/aix.c deleted file mode 100644 index 72f379b..0000000 --- a/deps/mpg123/src/output/aix.c +++ /dev/null @@ -1,300 +0,0 @@ -/* - aix: Driver for IBM RS/6000 with AIX Ultimedia Services - - copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Juergen Schoew and Tomas Oegren -*/ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "mpg123app.h" -#include "debug.h" - -/* use AUDIO_BSIZE to set the msec for audio buffering in Ultimedia library - */ -/* #define AUDIO_BSIZE AUDIO_IGNORE */ -#define AUDIO_BSIZE 200 - -static int rate_best_match(audio_output_t *ao) -{ - static long valid [ ] = { 5510, 6620, 8000, 9600, 11025, 16000, 18900, - 22050, 27420, 32000, 33075, 37800, 44100, 48000, 0 }; - int i = 0; - long best = 8000; - - if(!ai || ao->fn < 0 || ao->rate < 0) { - return -1; - } - - while (valid [i]) { - if (abs(valid[i] - ao->rate) < abs(best - ao->rate)) - { - best = valid [i]; - } - i = i + 1; - } - - ao->rate = best; - return best; -} - -static int reset_parameters(audio_output_t *ao) -{ - audio_control acontrol; - audio_change achange; - audio_init ainit; - int ret; - - memset ( & achange, '\0', sizeof (achange)); - memset ( & acontrol, '\0', sizeof (acontrol)); - - achange.balance = 0x3fff0000; - achange.balance_delay = 0; - achange.volume = (long) (0x7fff << 16); - achange.volume_delay = 0; - achange.input = AUDIO_IGNORE; - if (ao->flags == -1) achange.output = INTERNAL_SPEAKER; - else achange.output = 0; - - if(ao->flags & AUDIO_OUT_INTERNAL_SPEAKER) - achange.output |= INTERNAL_SPEAKER; - if(ao->flags & AUDIO_OUT_HEADPHONES) - achange.output |= EXTERNAL_SPEAKER; - if(ao->flags & AUDIO_OUT_LINE_OUT) - achange.output |= OUTPUT_1; - if(ao->flags == 0) - achange.output = AUDIO_IGNORE; - - achange.treble = AUDIO_IGNORE; - achange.bass = AUDIO_IGNORE; - achange.pitch = AUDIO_IGNORE; - achange.monitor = AUDIO_IGNORE; - achange.dev_info = (char *) NULL; - - acontrol.ioctl_request = AUDIO_CHANGE; - acontrol.position = 0; - acontrol.request_info = (char *) & achange; - - ret = ioctl (ao->fn, AUDIO_CONTROL, & acontrol); - if (ret < 0) - return ret; - - /* Init Device for new values */ - if (ao->rate >0) { - memset ( & ainit, '\0', sizeof (ainit)); - ainit.srate = rate_best_match(ai); - if (ao->channels > 0) - ainit.channels = ao->channels; - else - ainit.channels = 1; - switch (ao->format) { - default : - ainit.mode = PCM; - ainit.bits_per_sample = 8; - ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT; - break; - case MPG123_ENC_SIGNED_16: - ainit.mode = PCM; - ainit.bits_per_sample = 16; - ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT; - break; - case MPG123_ENC_SIGNED_8: - ainit.mode = PCM; - ainit.bits_per_sample = 8; - ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT; - break; - case MPG123_ENC_UNSIGNED_16: - ainit.mode = PCM; - ainit.bits_per_sample = 16; - ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT | SIGNED; - break; - case MPG123_ENC_UNSIGNED_8: - ainit.mode = PCM; - ainit.bits_per_sample = 8; - ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT | SIGNED; - break; - case MPG123_ENC_ULAW_8: - ainit.mode = MU_LAW; - ainit.bits_per_sample = 8; - ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT; - break; - case MPG123_ENC_ALAW_8: - ainit.mode = A_LAW; - ainit.bits_per_sample = 8; - ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT; - break; - } - ainit.operation = PLAY; - ainit.bsize = AUDIO_BSIZE; - - ret = ioctl (ao->fn, AUDIO_INIT, & ainit); - if (ret < 0) { - error("Can't set new audio parameters!"); - return ret; - } - } - - acontrol.ioctl_request = AUDIO_START; - acontrol.request_info = NULL; - acontrol.position = 0; - - ret = ioctl (ao->fn, AUDIO_CONTROL, & acontrol); - if (ret < 0) { - error("Can't reset audio!"); - return ret; - } - return 0; -} - -static int open_aix(audio_output_t *ao) -{ - audio_init ainit; - int ret; - - if(!ao->device) { - if(getenv("AUDIODEV")) { - ao->device = getenv("AUDIODEV"); - ao->fn = open(ao->device,O_WRONLY); - } else { - ao->device = "/dev/paud0/1"; /* paud0 for PCI */ - ao->fn = open(ao->device,O_WRONLY); - if ((ao->fn == -1) & (errno == ENOENT)) { - ao->device = "/dev/baud0/1"; /* baud0 for MCA */ - ao->fn = open(ao->device,O_WRONLY); - } - } - } else ao->fn = open(ao->device,O_WRONLY); - - if(ao->fn < 0) { - error("Can't open audio device!"); - return ao->fn; - } - - /* Init to default values */ - memset ( & ainit, '\0', sizeof (ainit)); - ainit.srate = 44100; - ainit.channels = 2; - ainit.mode = PCM; - ainit.bits_per_sample = 16; - ainit.flags = BIG_ENDIAN | TWOS_COMPLEMENT; - ainit.operation = PLAY; - ainit.bsize = AUDIO_BSIZE; - - ret = ioctl (ao->fn, AUDIO_INIT, & ainit); - if (ret < 0) return ret; - - reset_parameters(ai); - return ao->fn; -} - - - -static int get_formats_aix(audio_output_t *ao) -{ - /* ULTIMEDIA DOCUMENTATION SAYS: - The Ultimedia Audio Adapter supports fourteen sample rates you can use to - capture and playback audio data. The rates are (in kHz): 5.51, 6.62, 8.0, - 9.6, 11.025, 16.0, 18.9, 22.050, 27.42, 32.0, 33.075, 37.8, 44.1, and 48.0. - These rates are supported for mono and stereo PCM (8- and 16-bit), mu-law, - and A-law. - */ - - long rate; - - rate = ao->rate; - rate_best_match(ai); - if (ao->rate == rate) - return (MPG123_ENC_SIGNED_16|MPG123_ENC_UNSIGNED_16| - MPG123_ENC_UNSIGNED_8|MPG123_ENC_SIGNED_8| - MPG123_ENC_ULAW_8|MPG123_ENC_ALAW_8); - else - return 0; -} - -static int write_aix(audio_output_t *ao,unsigned char *buf,int len) -{ - return write(ao->fn,buf,len); -} - -static int close_aix(audio_output_t *ao) -{ - audio_control acontrol; - audio_buffer abuffer; - int ret,i; - - /* Don't close the audio-device until it's played all its contents */ - memset ( & acontrol, '\0', sizeof ( acontrol ) ); - acontrol.request_info = &abuffer; - acontrol.position = 0; - i=50; /* Don't do this forever on a bad day :-) */ - - while (i-- > 0) { - if ((ioctl(ao->fn, AUDIO_BUFFER, &acontrol))< 0) { - error1("buffer read failed: %d", errno); - break; - } else { - if (abuffer.flags <= 0) break; - } - usleep(200000); /* sleep 0.2 sec */ - } - - memset ( & acontrol, '\0', sizeof ( acontrol ) ); - acontrol.ioctl_request = AUDIO_STOP; - acontrol.request_info = NULL; - acontrol.position = 0; - - ret = ioctl ( ao->fn, AUDIO_CONTROL, & acontrol ); - if (ret < 0) error("Can't close audio!"); - - ret = close (ao->fn); - if (ret < 0) error("Can't close audio!"); - - return 0; -} - -static void flush_aix(audio_output_t *ao) -{ -} - -static int init_aix(audio_output_t* ao) -{ - if (ao==NULL) return -1; - - /* Set callbacks */ - ao->open = open_aix; - ao->flush = flush_aix; - ao->write = write_aix; - ao->get_formats = get_formats_aix; - ao->close = close_aix; - - /* Success */ - return 0; -} - - - -/* - Module information data structure -*/ -mpg123_module_t mpg123_output_module_info = { - /* api_version */ MPG123_MODULE_API_VERSION, - /* name */ "AIX", - /* description */ "Output audio on IBM RS/6000 with AIX Ultimedia Services.", - /* revision */ "$Rev: 932 $", - /* handle */ NULL, - - /* init_output */ init_aix, -}; - diff --git a/deps/mpg123/src/output/alib.c b/deps/mpg123/src/output/alib.c deleted file mode 100644 index 635382d..0000000 --- a/deps/mpg123/src/output/alib.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - alib: audio output for HP-UX using alib - - copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Erwan Ducroquet - based on source code from HP (Audio SDK) -*/ - -/* - * - * for mpg123 : - * hpux: - * $(MAKE) \ - * CC=cc \ - * LDFLAGS=-L/opt/audio/lib \ - * AUDIO_LIB=-lAlib \ - * OBJECTS=decode.o dct64.o \ - * CFLAGS=-Ae +O3 -DREAL_IS_FLOAT -D_HPUX_SOURCE -DHPUX -I/opt/audio/include \ - * mpg123 - */ - - -/* - * For the user : - * If you launch mpg123 on a XTerm with sound capabilities, it's OK - * Else, you have to set the environment variable "AUDIO" to the name of - * an HP Xterm with sound card. - */ - -/**************************************************************************/ - -#include "mpg123app.h" - -#include - -#include -#include -#include -#include -#include - - -#include /* /opt/audio/include */ -#include /* /opt/audio/include */ - -#include "debug.h" - -/**************************************************************************/ - - -/* FIXME: These globals should be moved into a structure */ -static Audio *audioServer = (Audio *) NULL; -static struct protoent *tcpProtocolEntry; -static ATransID xid; - -static void printAudioError(Audio *audio,char *message,int errorCode) { - char errorbuff[132]; - AGetErrorText(audio, errorCode, errorbuff, 131); - error2("%s: %s", message, errorbuff); -} -static long myHandler(Audio *audio,AErrorEvent *err_event) { - printAudioError( audio, "Audio error", err_event->error_code ); - /* we cannot just do random exists, that messes terminal up - need proper error propagation in that case for future, setting intflag or such */ - /* exit(1); */ -} - -/**************************************************************************/ - -/* - * Set the fn element of ai - * Use ao->rate and ao->channels - * Doesn't set any volume - */ - -/* return on error leaves stuff dirty here... */ -static int open_alib(audio_output_t *ao) -{ - AudioAttributes Attribs; - AudioAttrMask AttribsMask; - AGainEntry gainEntry[4]; - SSPlayParams playParams; - SStream audioStream; - AErrorHandler prevHandler; - char server[1]; - int i; - long status; - - if (audioServer) { - error("openAudio: audio already open"); - return -1; - } - - prevHandler = ASetErrorHandler(myHandler); - - server[0] = '\0'; - audioServer = AOpenAudio( server, NULL ); - if (audioServer==NULL) { - error("Error: could not open audio\n"); - return -1; - } - - ao->fn = socket( AF_INET, SOCK_STREAM, 0 ); - if(ao->fn<0) { - error("Socket creation failed"); - return -1; - } - - Attribs.type = ATSampled; - Attribs.attr.sampled_attr.sampling_rate = ao->rate; - Attribs.attr.sampled_attr.channels = ao->channels; - Attribs.attr.sampled_attr.data_format = ADFLin16; - AttribsMask = ASSamplingRateMask | ASChannelsMask | ASDataFormatMask; - - gainEntry[0].gain = AUnityGain; - gainEntry[0].u.o.out_ch = AOCTMono; - gainEntry[0].u.o.out_dst = AODTDefaultOutput; - - playParams.gain_matrix.type = AGMTOutput; /* gain matrix */ - playParams.gain_matrix.num_entries = 1; - playParams.gain_matrix.gain_entries = gainEntry; - playParams.play_volume = AUnityGain; /* play volume */ - playParams.priority = APriorityNormal; /* normal priority */ - playParams.event_mask = 0; /* don't solicit any events */ - - xid=APlaySStream(audioServer,AttribsMask,&Attribs, - &playParams,&audioStream,NULL); - - status=connect(ao->fn, - (struct sockaddr *) &audioStream.tcp_sockaddr, - sizeof(struct sockaddr_in) ); - if (status<0) { - error("Connect failed"); - return -1; - } - - i=-1; - tcpProtocolEntry=getprotobyname("tcp"); - setsockopt(ao->fn,tcpProtocolEntry->p_proto,TCP_NODELAY,&i,sizeof(i)); - - return ao->fn; -} - -/**************************************************************************/ - -static int close_alib(audio_output_t *ao) -{ - close(ao->fn); - ASetCloseDownMode( audioServer, AKeepTransactions, NULL ); - ACloseAudio( audioServer, NULL ); - audioServer = (Audio *) NULL; - return 0; -} - -/**************************************************************************/ - -/* - * very simple - * deserv to be inline - */ - -static int write_alib(audio_output_t *ao,unsigned char *buf,int len) -{ - return write(ao->fn,buf,len*2); -} - -/**************************************************************************/ - -static int get_formats_alib(audio_output_t *ao) -{ - return MPG123_ENC_SIGNED_16; -} - -static void flush_alib(audio_output_t *ao) -{ -} - - -static int init_alib(audio_output_t* ao) -{ - if (ao==NULL) return -1; - - /* Set callbacks */ - ao->open = open_alib; - ao->flush = flush_alib; - ao->write = write_alib; - ao->get_formats = get_formats_alib; - ao->close = close_alib; - - /* Success */ - return 0; -} - - - -/* - Module information data structure -*/ -mpg123_module_t mpg123_output_module_info = { - /* api_version */ MPG123_MODULE_API_VERSION, - /* name */ "alib", - /* description */ "Output audio HP-UX using alib.", - /* revision */ "$Rev:$", - /* handle */ NULL, - - /* init_output */ init_alib, -}; - diff --git a/deps/mpg123/src/output/alsa.c b/deps/mpg123/src/output/alsa.c deleted file mode 100644 index e77befb..0000000 --- a/deps/mpg123/src/output/alsa.c +++ /dev/null @@ -1,297 +0,0 @@ -/* - alsa: sound output with Advanced Linux Sound Architecture 1.x API - - copyright 2006-8 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - - initially written by Clemens Ladisch -*/ - -#include "mpg123app.h" -#include "audio.h" -#include "module.h" -#include - -/* make ALSA 0.9.x compatible to the 1.0.x API */ -#define ALSA_PCM_NEW_HW_PARAMS_API -#define ALSA_PCM_NEW_SW_PARAMS_API - -#include - -#include "debug.h" - -/* My laptop has probs playing low-sampled files with only 0.5s buffer... this should be a user setting -- ThOr */ -#define BUFFER_LENGTH 0.5 /* in seconds */ - -static const struct { - snd_pcm_format_t alsa; - int mpg123; -} format_map[] = { - { SND_PCM_FORMAT_S16, MPG123_ENC_SIGNED_16 }, - { SND_PCM_FORMAT_U16, MPG123_ENC_UNSIGNED_16 }, - { SND_PCM_FORMAT_U8, MPG123_ENC_UNSIGNED_8 }, - { SND_PCM_FORMAT_S8, MPG123_ENC_SIGNED_8 }, - { SND_PCM_FORMAT_A_LAW, MPG123_ENC_ALAW_8 }, - { SND_PCM_FORMAT_MU_LAW, MPG123_ENC_ULAW_8 }, - { SND_PCM_FORMAT_S32, MPG123_ENC_SIGNED_32 }, - { SND_PCM_FORMAT_U32, MPG123_ENC_UNSIGNED_32 }, -#ifdef WORDS_BIGENDIAN - { SND_PCM_FORMAT_S24_3BE, MPG123_ENC_SIGNED_24 }, - { SND_PCM_FORMAT_U24_3BE, MPG123_ENC_UNSIGNED_24 }, -#else - { SND_PCM_FORMAT_S24_3LE, MPG123_ENC_SIGNED_24 }, - { SND_PCM_FORMAT_U24_3LE, MPG123_ENC_UNSIGNED_24 }, -#endif - { SND_PCM_FORMAT_FLOAT, MPG123_ENC_FLOAT_32 }, - { SND_PCM_FORMAT_FLOAT64, MPG123_ENC_FLOAT_64 } -}; -#define NUM_FORMATS (sizeof format_map / sizeof format_map[0]) - - -static int rates_match(long int desired, unsigned int actual) -{ - return actual * 100 > desired * (100 - AUDIO_RATE_TOLERANCE) && - actual * 100 < desired * (100 + AUDIO_RATE_TOLERANCE); -} - -static int initialize_device(audio_output_t *ao) -{ - snd_pcm_hw_params_t *hw=NULL; - snd_pcm_sw_params_t *sw=NULL; - snd_pcm_uframes_t buffer_size; - snd_pcm_uframes_t period_size; - snd_pcm_format_t format; - snd_pcm_t *pcm=(snd_pcm_t*)ao->userptr; - unsigned int rate; - int i; - - snd_pcm_hw_params_alloca(&hw); /* Ignore GCC warning here... alsa-lib>=1.0.16 doesn't trigger that anymore, too. */ - if (snd_pcm_hw_params_any(pcm, hw) < 0) { - if(!AOQUIET) error("initialize_device(): no configuration available"); - return -1; - } - if (snd_pcm_hw_params_set_access(pcm, hw, SND_PCM_ACCESS_RW_INTERLEAVED) < 0) { - if(!AOQUIET) error("initialize_device(): device does not support interleaved access"); - return -1; - } - format = SND_PCM_FORMAT_UNKNOWN; - for (i = 0; i < NUM_FORMATS; ++i) { - if (ao->format == format_map[i].mpg123) { - format = format_map[i].alsa; - break; - } - } - if (format == SND_PCM_FORMAT_UNKNOWN) { - if(!AOQUIET) error1("initialize_device(): invalid sample format %d", ao->format); - errno = EINVAL; - return -1; - } - if (snd_pcm_hw_params_set_format(pcm, hw, format) < 0) { - if(!AOQUIET) error1("initialize_device(): cannot set format %s", snd_pcm_format_name(format)); - return -1; - } - if (snd_pcm_hw_params_set_channels(pcm, hw, ao->channels) < 0) { - if(!AOQUIET) error1("initialize_device(): cannot set %d channels", ao->channels); - return -1; - } - rate = ao->rate; - if (snd_pcm_hw_params_set_rate_near(pcm, hw, &rate, NULL) < 0) { - if(!AOQUIET) error1("initialize_device(): cannot set rate %u", rate); - return -1; - } - if (!rates_match(ao->rate, rate)) { - if(!AOQUIET) error2("initialize_device(): rate %ld not available, using %u", ao->rate, rate); - /* return -1; */ - } - buffer_size = rate * BUFFER_LENGTH; - if (snd_pcm_hw_params_set_buffer_size_near(pcm, hw, &buffer_size) < 0) { - if(!AOQUIET) error("initialize_device(): cannot set buffer size"); - return -1; - } - period_size = buffer_size / 4; - if (snd_pcm_hw_params_set_period_size_near(pcm, hw, &period_size, NULL) < 0) { - if(!AOQUIET) error("initialize_device(): cannot set period size"); - return -1; - } - if (snd_pcm_hw_params(pcm, hw) < 0) { - if(!AOQUIET) error("initialize_device(): cannot set hw params"); - return -1; - } - - snd_pcm_sw_params_alloca(&sw); - if (snd_pcm_sw_params_current(pcm, sw) < 0) { - if(!AOQUIET) error("initialize_device(): cannot get sw params"); - return -1; - } - /* start playing after the first write */ - if (snd_pcm_sw_params_set_start_threshold(pcm, sw, 1) < 0) { - if(!AOQUIET) error("initialize_device(): cannot set start threshold"); - return -1; - } - /* wake up on every interrupt */ - if (snd_pcm_sw_params_set_avail_min(pcm, sw, 1) < 0) { - if(!AOQUIET) error("initialize_device(): cannot set min available"); - return -1; - } -#if SND_LIB_VERSION < ((1<<16)|16) - /* Always write as many frames as possible (deprecated since alsa-lib 1.0.16) */ - if (snd_pcm_sw_params_set_xfer_align(pcm, sw, 1) < 0) { - if(!AOQUIET) error("initialize_device(): cannot set transfer alignment"); - return -1; - } -#endif - if (snd_pcm_sw_params(pcm, sw) < 0) { - if(!AOQUIET) error("initialize_device(): cannot set sw params"); - return -1; - } - return 0; -} - -static void error_ignorer(const char *file, int line, const char *function, int err, const char *fmt,...) -{ - /* I can make ALSA silent. */ -} - -static int open_alsa(audio_output_t *ao) -{ - const char *pcm_name; - snd_pcm_t *pcm=NULL; - debug1("open_alsa with %p", ao->userptr); - - if(AOQUIET) snd_lib_error_set_handler(error_ignorer); - - pcm_name = ao->device ? ao->device : "default"; - if (snd_pcm_open(&pcm, pcm_name, SND_PCM_STREAM_PLAYBACK, 0) < 0) { - if(!AOQUIET) error1("cannot open device %s", pcm_name); - return -1; - } - ao->userptr = pcm; - if (ao->format != -1) { - /* we're going to play: initalize sample format */ - return initialize_device(ao); - } else { - /* query mode; sample format will be set for each query */ - return 0; - } -} - - -static int get_formats_alsa(audio_output_t *ao) -{ - snd_pcm_t *pcm=(snd_pcm_t*)ao->userptr; - snd_pcm_hw_params_t *hw; - unsigned int rate; - int supported_formats, i; - - snd_pcm_hw_params_alloca(&hw); - if (snd_pcm_hw_params_any(pcm, hw) < 0) { - if(!AOQUIET) error("get_formats_alsa(): no configuration available"); - return -1; - } - if (snd_pcm_hw_params_set_access(pcm, hw, SND_PCM_ACCESS_RW_INTERLEAVED) < 0) - return -1; - if (snd_pcm_hw_params_set_channels(pcm, hw, ao->channels) < 0) - return 0; - rate = ao->rate; - if (snd_pcm_hw_params_set_rate_near(pcm, hw, &rate, NULL) < 0) - return -1; - if (!rates_match(ao->rate, rate)) - return 0; - supported_formats = 0; - for (i = 0; i < NUM_FORMATS; ++i) { - if (snd_pcm_hw_params_test_format(pcm, hw, format_map[i].alsa) == 0) - supported_formats |= format_map[i].mpg123; - } - return supported_formats; -} - -static int write_alsa(audio_output_t *ao, unsigned char *buf, int bytes) -{ - snd_pcm_t *pcm=(snd_pcm_t*)ao->userptr; - snd_pcm_uframes_t frames; - snd_pcm_sframes_t written; - - frames = snd_pcm_bytes_to_frames(pcm, bytes); - written = snd_pcm_writei(pcm, buf, frames); - if (written == -EINTR) /* interrupted system call */ - written = 0; - else if (written == -EPIPE) { /* underrun */ - if (snd_pcm_prepare(pcm) >= 0) - written = snd_pcm_writei(pcm, buf, frames); - } - if (written >= 0) - return snd_pcm_frames_to_bytes(pcm, written); - else - { - if(snd_pcm_state(pcm) == SND_PCM_STATE_SUSPENDED) - { - /* Iamnothappyabouthisnothappyreallynot. */ - snd_pcm_resume(pcm); - if(snd_pcm_state(pcm) == SND_PCM_STATE_SUSPENDED) - { - error("device still suspended after resume hackery... giving up"); - return -1; - } - } - return 0; - } -} - -static void flush_alsa(audio_output_t *ao) -{ - snd_pcm_t *pcm=(snd_pcm_t*)ao->userptr; - - /* is this the optimal solution? - we should figure out what we really whant from this function */ - -debug("alsa drop"); - snd_pcm_drop(pcm); -debug("alsa prepare"); - snd_pcm_prepare(pcm); -debug("alsa flush done"); -} - -static int close_alsa(audio_output_t *ao) -{ - snd_pcm_t *pcm=(snd_pcm_t*)ao->userptr; - debug1("close_alsa with %p", ao->userptr); - if(pcm != NULL) /* be really generous for being called without any device opening */ - { - if (snd_pcm_state(pcm) == SND_PCM_STATE_RUNNING) - snd_pcm_drain(pcm); - ao->userptr = NULL; /* Should alsa do this or the module wrapper? */ - return snd_pcm_close(pcm); - } - else return 0; -} - - -static int init_alsa(audio_output_t* ao) -{ - if (ao==NULL) return -1; - - /* Set callbacks */ - ao->open = open_alsa; - ao->flush = flush_alsa; - ao->write = write_alsa; - ao->get_formats = get_formats_alsa; - ao->close = close_alsa; - - /* Success */ - return 0; -} - - - -/* - Module information data structure -*/ -mpg123_module_t mpg123_output_module_info = { - /* api_version */ MPG123_MODULE_API_VERSION, - /* name */ "alsa", - /* description */ "Output audio using Advanced Linux Sound Architecture (ALSA).", - /* revision */ "$Rev:$", - /* handle */ NULL, - - /* init_output */ init_alsa, -}; - diff --git a/deps/mpg123/src/output/arts.c b/deps/mpg123/src/output/arts.c deleted file mode 100644 index 04ee02f..0000000 --- a/deps/mpg123/src/output/arts.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - arts: audio output via aRts Sound Daemon - - copyright 2007-8 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - - initially written by Stefan Lenselink (Stefan@lenselink.org) -*/ - - -#include "mpg123app.h" -#include -#include "debug.h" - -typedef struct -{ - arts_stream_t arse; /* That's short for ARts StrEam;-) */ -} mpg123_arts_t; - -static int open_arts(audio_output_t *ao) -{ - short bits = 0; - if(!ao) return -1; - - if(ao->format < 0) - { - ao->format = MPG123_ENC_SIGNED_16; - ao->rate = 44100; - ao->channels = 2; - } - /* Trial and error revealed these two formats to work with aRts. */ - if(ao->format == MPG123_ENC_SIGNED_16) bits = 16; - else if(ao->format == MPG123_ENC_UNSIGNED_8) bits = 8; - else return -1; - - /* Initialize the aRts lib*/ - arts_init(); - /* Open a stream to the aRts server */ - ((mpg123_arts_t*)ao->userptr)->arse = arts_play_stream( ao->rate, bits, ao->channels, "mpg123" ); - /* Yeah, black box and all... it's still a pointer that is NULL on error. */ - return (void*)((mpg123_arts_t*)ao->userptr)->arse == NULL ? -1 : 0; -} - -static int get_formats_arts(audio_output_t *ao) -{ - /* aRts runs not everything, but any rate. */ - return MPG123_ENC_SIGNED_16|MPG123_ENC_UNSIGNED_8; -} - -static int write_arts(audio_output_t *ao,unsigned char *buf,int len) -{ - /* PIPE the PCM forward to the aRts Sound Daemon */ - return arts_write( ((mpg123_arts_t*)ao->userptr)->arse , buf, len); -} - -static int close_arts(audio_output_t *ao) -{ - /* Close the connection! */ - arts_close_stream( ((mpg123_arts_t*)ao->userptr)->arse ); - /* Free the memory allocated*/ - arts_free(); - return 0; -} - -static void flush_arts(audio_output_t *ao) -{ - /* aRts doesn't have a flush statement! */ -} - -static int deinit_arts(audio_output_t* ao) -{ - if(ao->userptr) - { - free(ao->userptr); - ao->userptr = NULL; - } - arts_free(); - return 0; -} - -static int init_arts(audio_output_t* ao) -{ - if (ao==NULL) return -1; - - ao->userptr = malloc(sizeof(mpg123_arts_t)); - if(ao->userptr == NULL) - { - error("Out of memory!"); - return -1; - } - /* clear it to have a consistent state */ - memset(ao->userptr, 0, sizeof(mpg123_arts_t)); - /* Set callbacks */ - ao->open = open_arts; - ao->flush = flush_arts; - ao->write = write_arts; - ao->get_formats = get_formats_arts; - ao->close = close_arts; - ao->deinit = deinit_arts; - /* Success */ - return 0; -} - -/* - Module information data structure -*/ -mpg123_module_t mpg123_output_module_info = { - /* api_version */ MPG123_MODULE_API_VERSION, - /* name */ "arts", - /* description */ "Output audio using aRts Sound Daemon", - /* revision */ "$Rev: $", - /* handle */ NULL, - - /* init_output */ init_arts, -}; - - diff --git a/deps/mpg123/src/output/coreaudio.c b/deps/mpg123/src/output/coreaudio.c deleted file mode 100644 index 125ad8c..0000000 --- a/deps/mpg123/src/output/coreaudio.c +++ /dev/null @@ -1,370 +0,0 @@ -/* - coreaudio: audio output on MacOS X - - copyright ?-2006 by the mpg123 project - free software under the terms of the GPL 2 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Guillaume Outters - modified by Nicholas J Humfrey to use SFIFO code - modified by Taihei Monma to use AudioUnit and AudioConverter APIs -*/ - - -#include "mpg123app.h" - -#include -#include -#include -#include - -/* Including the sfifo code locally, to avoid module linkage issues. */ -#define SFIFO_STATIC -#include "sfifo.c" - -#include "debug.h" - -#define FIFO_DURATION (0.5f) /* Duration of the ring buffer in seconds */ - - -typedef struct mpg123_coreaudio -{ - AudioConverterRef converter; - AudioUnit outputUnit; - int open; - char play; - int channels; - int bps; - int last_buffer; - int play_done; - int decode_done; - - /* Convertion buffer */ - unsigned char * buffer; - size_t buffer_size; - - /* Ring buffer */ - sfifo_t fifo; - -} mpg123_coreaudio_t; - - - -static OSStatus playProc(AudioConverterRef inAudioConverter, - UInt32 *ioNumberDataPackets, - AudioBufferList *outOutputData, - AudioStreamPacketDescription **outDataPacketDescription, - void* inClientData) -{ - mpg123_coreaudio_t *ca = (mpg123_coreaudio_t *)inClientData; - long n; - - - if(ca->last_buffer) { - ca->play_done = 1; - return noErr; - } - - for(n = 0; n < outOutputData->mNumberBuffers; n++) - { - unsigned int wanted = *ioNumberDataPackets * ca->channels * ca->bps; - unsigned char *dest; - unsigned int read; - if(ca->buffer_size < wanted) { - debug1("Allocating %d byte sample conversion buffer", wanted); - ca->buffer = realloc( ca->buffer, wanted); - ca->buffer_size = wanted; - } - dest = ca->buffer; - - /* Only play if we have data left */ - if ( sfifo_used( &ca->fifo ) < wanted ) { - if(!ca->decode_done) { - warning("Didn't have any audio data in callback (buffer underflow)"); - return -1; - } - wanted = sfifo_used( &ca->fifo ); - ca->last_buffer = 1; - } - - /* Read audio from FIFO to SDL's buffer */ - read = sfifo_read( &ca->fifo, dest, wanted ); - - if (wanted!=read) - warning2("Error reading from the ring buffer (wanted=%u, read=%u).\n", wanted, read); - - outOutputData->mBuffers[n].mDataByteSize = read; - outOutputData->mBuffers[n].mData = dest; - } - - return noErr; -} - -static OSStatus convertProc(void *inRefCon, AudioUnitRenderActionFlags *inActionFlags, - const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, - UInt32 inNumFrames, AudioBufferList *ioData) -{ - AudioStreamPacketDescription* outPacketDescription = NULL; - mpg123_coreaudio_t* ca = (mpg123_coreaudio_t*)inRefCon; - OSStatus err= noErr; - - err = AudioConverterFillComplexBuffer(ca->converter, playProc, inRefCon, &inNumFrames, ioData, outPacketDescription); - - return err; -} - -static int open_coreaudio(audio_output_t *ao) -{ - mpg123_coreaudio_t* ca = (mpg123_coreaudio_t*)ao->userptr; - UInt32 size; - ComponentDescription desc; - Component comp; - AudioStreamBasicDescription inFormat; - AudioStreamBasicDescription outFormat; - AURenderCallbackStruct renderCallback; - Boolean outWritable; - - /* Initialize our environment */ - ca->play = 0; - ca->buffer = NULL; - ca->buffer_size = 0; - ca->last_buffer = 0; - ca->play_done = 0; - ca->decode_done = 0; - - - /* Get the default audio output unit */ - desc.componentType = kAudioUnitType_Output; - desc.componentSubType = kAudioUnitSubType_DefaultOutput; - desc.componentManufacturer = kAudioUnitManufacturer_Apple; - desc.componentFlags = 0; - desc.componentFlagsMask = 0; - comp = FindNextComponent(NULL, &desc); - if(comp == NULL) { - error("FindNextComponent failed"); - return(-1); - } - - if(OpenAComponent(comp, &(ca->outputUnit))) { - error("OpenAComponent failed"); - return (-1); - } - - if(AudioUnitInitialize(ca->outputUnit)) { - error("AudioUnitInitialize failed"); - return (-1); - } - - /* Specify the output PCM format */ - AudioUnitGetPropertyInfo(ca->outputUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0, &size, &outWritable); - if(AudioUnitGetProperty(ca->outputUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0, &outFormat, &size)) { - error("AudioUnitGetProperty(kAudioUnitProperty_StreamFormat) failed"); - return (-1); - } - - if(AudioUnitSetProperty(ca->outputUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &outFormat, size)) { - error("AudioUnitSetProperty(kAudioUnitProperty_StreamFormat) failed"); - return (-1); - } - - /* Specify the input PCM format */ - ca->channels = ao->channels; - inFormat.mSampleRate = ao->rate; - inFormat.mChannelsPerFrame = ao->channels; - inFormat.mFormatID = kAudioFormatLinearPCM; -#ifdef _BIG_ENDIAN - inFormat.mFormatFlags = kLinearPCMFormatFlagIsPacked | kLinearPCMFormatFlagIsBigEndian; -#else - inFormat.mFormatFlags = kLinearPCMFormatFlagIsPacked; -#endif - - switch(ao->format) - { - case MPG123_ENC_SIGNED_16: - inFormat.mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger; - ca->bps = 2; - break; - case MPG123_ENC_SIGNED_8: - inFormat.mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger; - ca->bps = 1; - break; - case MPG123_ENC_UNSIGNED_8: - ca->bps = 1; - break; - case MPG123_ENC_SIGNED_32: - inFormat.mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger; - ca->bps = 4; - break; - case MPG123_ENC_FLOAT_32: - inFormat.mFormatFlags |= kLinearPCMFormatFlagIsFloat; - ca->bps = 4; - break; - } - - inFormat.mBitsPerChannel = ca->bps << 3; - inFormat.mBytesPerPacket = ca->bps*inFormat.mChannelsPerFrame; - inFormat.mFramesPerPacket = 1; - inFormat.mBytesPerFrame = ca->bps*inFormat.mChannelsPerFrame; - - /* Add our callback - but don't start it yet */ - memset(&renderCallback, 0, sizeof(AURenderCallbackStruct)); - renderCallback.inputProc = convertProc; - renderCallback.inputProcRefCon = ao->userptr; - if(AudioUnitSetProperty(ca->outputUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &renderCallback, sizeof(AURenderCallbackStruct))) { - error("AudioUnitSetProperty(kAudioUnitProperty_SetRenderCallback) failed"); - return(-1); - } - - - /* Open an audio I/O stream and create converter */ - if (ao->rate > 0 && ao->channels >0 ) { - int ringbuffer_len; - - if(AudioConverterNew(&inFormat, &outFormat, &(ca->converter))) { - error("AudioConverterNew failed"); - return(-1); - } - if(ao->channels == 1) { - SInt32 channelMap[2] = { 0, 0 }; - if(AudioConverterSetProperty(ca->converter, kAudioConverterChannelMap, sizeof(channelMap), channelMap)) { - error("AudioConverterSetProperty(kAudioConverterChannelMap) failed"); - return(-1); - } - } - - /* Initialise FIFO */ - ringbuffer_len = ao->rate * FIFO_DURATION * ca->bps * ao->channels; - debug2( "Allocating %d byte ring-buffer (%f seconds)", ringbuffer_len, (float)FIFO_DURATION); - sfifo_init( &ca->fifo, ringbuffer_len ); - } - - return(0); -} - -static int get_formats_coreaudio(audio_output_t *ao) -{ - return MPG123_ENC_SIGNED_16|MPG123_ENC_SIGNED_8|MPG123_ENC_UNSIGNED_8|MPG123_ENC_SIGNED_32|MPG123_ENC_FLOAT_32; -} - -static int write_coreaudio(audio_output_t *ao, unsigned char *buf, int len) -{ - mpg123_coreaudio_t* ca = (mpg123_coreaudio_t*)ao->userptr; - int written; - - /* If there is no room, then sleep for half the length of the FIFO */ - while (sfifo_space( &ca->fifo ) < len ) { - usleep( (FIFO_DURATION/2) * 1000000 ); - } - - /* Store converted audio in ring buffer */ - written = sfifo_write( &ca->fifo, (char*)buf, len); - if (written != len) { - warning( "Failed to write audio to ring buffer" ); - return -1; - } - - /* Start playback now that we have something to play */ - if(!ca->play) - { - if(AudioOutputUnitStart(ca->outputUnit)) { - error("AudioOutputUnitStart failed"); - return(-1); - } - ca->play = 1; - } - - return len; -} - -static int close_coreaudio(audio_output_t *ao) -{ - mpg123_coreaudio_t* ca = (mpg123_coreaudio_t*)ao->userptr; - - if (ca) { - ca->decode_done = 1; - while(!ca->play_done && ca->play) usleep(10000); - - /* No matter the error code, we want to close it (by brute force if necessary) */ - AudioConverterDispose(ca->converter); - AudioOutputUnitStop(ca->outputUnit); - AudioUnitUninitialize(ca->outputUnit); - CloseComponent(ca->outputUnit); - - /* Free the ring buffer */ - sfifo_close( &ca->fifo ); - - /* Free the conversion buffer */ - if (ca->buffer) { - free( ca->buffer ); - ca->buffer = NULL; - } - - } - - return 0; -} - -static void flush_coreaudio(audio_output_t *ao) -{ - mpg123_coreaudio_t* ca = (mpg123_coreaudio_t*)ao->userptr; - - /* Stop playback */ - if(AudioOutputUnitStop(ca->outputUnit)) { - error("AudioOutputUnitStop failed"); - } - ca->play=0; - - /* Empty out the ring buffer */ - sfifo_flush( &ca->fifo ); -} - -static int deinit_coreaudio(audio_output_t* ao) -{ - /* Free up memory */ - if (ao->userptr) { - free( ao->userptr ); - ao->userptr = NULL; - } - - /* Success */ - return 0; -} - -static int init_coreaudio(audio_output_t* ao) -{ - if (ao==NULL) return -1; - - /* Set callbacks */ - ao->open = open_coreaudio; - ao->flush = flush_coreaudio; - ao->write = write_coreaudio; - ao->get_formats = get_formats_coreaudio; - ao->close = close_coreaudio; - ao->deinit = deinit_coreaudio; - - /* Allocate memory for data structure */ - ao->userptr = malloc( sizeof( mpg123_coreaudio_t ) ); - if (ao->userptr==NULL) { - error("failed to malloc memory for 'mpg123_coreaudio_t'"); - return -1; - } - memset( ao->userptr, 0, sizeof(mpg123_coreaudio_t) ); - - /* Success */ - return 0; -} - - - -/* - Module information data structure -*/ -mpg123_module_t mpg123_output_module_info = { - /* api_version */ MPG123_MODULE_API_VERSION, - /* name */ "coreaudio", - /* description */ "Output audio using Mac OS X's CoreAudio.", - /* revision */ "$Rev:$", - /* handle */ NULL, - - /* init_output */ init_coreaudio, -}; - - diff --git a/deps/mpg123/src/output/dummy.c b/deps/mpg123/src/output/dummy.c deleted file mode 100644 index 9f78292..0000000 --- a/deps/mpg123/src/output/dummy.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - dummy: dummy audio output - - copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org -*/ - -#include "mpg123app.h" -#include "debug.h" - -static int open_dummy(audio_output_t *ao) -{ - debug("open_dummy()"); - return 0; -} - -static int get_formats_dummy(audio_output_t *ao) -{ - debug("get_formats_dummy()"); - return MPG123_ENC_SIGNED_16; -} - -static int write_dummy(audio_output_t *ao,unsigned char *buf,int len) -{ - debug("write_dummy()"); - return len; -} - -static void flush_dummy(audio_output_t *ao) -{ - debug("flush_dummy()"); -} - -static int close_dummy(audio_output_t *ao) -{ - debug("close_dummy()"); - return 0; -} - -static int deinit_dummy(audio_output_t *ao) -{ - debug("deinit_dummy()"); - return 0; -} - - -static int init_dummy(audio_output_t* ao) -{ - if (ao==NULL) return -1; - debug("init_dummy()"); - - /* Set callbacks */ - ao->open = open_dummy; - ao->flush = flush_dummy; - ao->write = write_dummy; - ao->get_formats = get_formats_dummy; - ao->close = close_dummy; - ao->deinit = deinit_dummy; - - /* Success */ - return 0; -} - - - -/* - Module information data structure -*/ -mpg123_module_t mpg123_output_module_info = { - /* api_version */ MPG123_MODULE_API_VERSION, - /* name */ "dummy", - /* description */ "Dummy audio output - does not output audio.", - /* revision */ "$Rev:$", - /* handle */ NULL, - - /* init_output */ init_dummy, -}; - diff --git a/deps/mpg123/src/output/esd.c b/deps/mpg123/src/output/esd.c deleted file mode 100644 index 651ebc7..0000000 --- a/deps/mpg123/src/output/esd.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - esd: audio output for ESounD (highly untested nowadays (?)) - - copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Eric B. Mitchell ("esd port" should be this file...) -*/ - -/* First the common header, including config.h - ...this is important for stuff like _FILE_OFFSET_BITS */ -#include "mpg123app.h" - -#include -#include -#include - -#ifdef SOLARIS -#include -#include -#endif -#ifdef NETBSD -#include -#include -#endif -#include "debug.h" - -static unsigned esd_rate = 0, esd_format = 0, esd_channels = 0; - - -static int open_esound(audio_output_t *ao) -{ - esd_format_t format = ESD_STREAM | ESD_PLAY; - - if (!esd_rate) - { - int esd; - esd_server_info_t *info; - esd_format_t fmt; - - if ((esd = esd_open_sound(NULL)) >= 0) - { - info = esd_get_server_info(esd); - esd_rate = info->rate; - fmt = info->format; - esd_free_server_info(info); - esd_close(esd); - } - else - { - esd_rate = esd_audio_rate; - fmt = esd_audio_format; - } - esd_format = MPG123_ENC_UNSIGNED_8; - - if ((fmt & ESD_MASK_BITS) == ESD_BITS16) - esd_format |= MPG123_ENC_SIGNED_16; - esd_channels = fmt & ESD_MASK_CHAN; - } - - if (ao->format == -1) - ao->format = esd_format; - else if (!(ao->format & esd_format)) - { - error1("Unsupported audio format: %d\n", ao->format); - errno = EINVAL; - return -1; - } - - - if (ao->format & MPG123_ENC_SIGNED_16) - format |= ESD_BITS16; - else if (ao->format & MPG123_ENC_UNSIGNED_8) - format |= ESD_BITS8; - else assert(0); - - if (ao->channels == -1) ao->channels = 2; - else if (ao->channels <= 0 || ao->channels > esd_channels) - { - error1("Unsupported no of channels: %d\n", ao->channels); - errno = EINVAL; - return -1; - } - if (ao->channels == 1) - format |= ESD_MONO; - else if (ao->channels == 2) - format |= ESD_STEREO; - else assert(0); - - if (ao->rate == -1) ao->rate = esd_rate; - else if (ao->rate > esd_rate) - return -1; - - ao->fn = esd_play_stream_fallback(format, ao->rate, ao->device, "mpg123"); - return (ao->fn); -} - -static int get_formats_esound (audio_output_t *ao) -{ - if (0 < ao->channels && ao->channels <= esd_channels - && 0 < ao->rate && ao->rate <= esd_rate) - { - return esd_format; - } else { - return -1; - } -} - -static int write_esound(audio_output_t *ao,unsigned char *buf,int len) -{ - return write(ao->fn,buf,len); -} - -static int close_esound(audio_output_t *ao) -{ - close (ao->fn); - return 0; -} - -#ifdef SOLARIS -static void flush_esound (audio_output_t *ao) -{ - ioctl (ao->fn, I_FLUSH, FLUSHRW); -} -#else -#ifdef NETBSD -static void flush_esound (audio_output_t *ao) -{ - ioctl (ao->fn, AUDIO_FLUSH, 0); -} -#else -/* Dunno what to do on Linux and Cygwin, but the func must be at least defined! */ -static void flush_esound (audio_output_t *ao) -{ -} -#endif -#endif - - -static int init_esound(audio_output_t* ao) -{ - if (ao==NULL) return -1; - - /* Set callbacks */ - ao->open = open_esound; - ao->flush = flush_esound; - ao->write = write_esound; - ao->get_formats = get_formats_esound; - ao->close = close_esound; - - /* Success */ - return 0; -} - - - -/* - Module information data structure -*/ -mpg123_module_t mpg123_output_module_info = { - /* api_version */ MPG123_MODULE_API_VERSION, - /* name */ "esd", - /* description */ "Output audio using ESounD (The Enlightened Sound Daemon).", - /* revision */ "$Rev: 1698 $", - /* handle */ NULL, - - /* init_output */ init_esound, -}; diff --git a/deps/mpg123/src/output/hp.c b/deps/mpg123/src/output/hp.c deleted file mode 100644 index 475ed03..0000000 --- a/deps/mpg123/src/output/hp.c +++ /dev/null @@ -1,184 +0,0 @@ -/* - hp: audio output for HP-UX - - copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Michael Hipp -*/ - -#include "mpg123app.h" -#include -#include -#include "debug.h" - - -static int set_rate(audio_output_t *ao) -{ - if(ao->rate >= 0) { - return ioctl(ao->fn,AUDIO_SET_SAMPLE_RATE,ao->rate); - } else { - return 0; - } -} - -static int set_channels(audio_output_t *ao) -{ - if(ao->channels<0) return 0; - return ioctl(ao->fn,AUDIO_SET_CHANNELS,ao->channels); -} - -static int set_format(audio_output_t *ao) -{ - int fmt; - - switch(ao->format) { - case -1: - case MPG123_ENC_SIGNED_16: - default: - fmt = MPG123_ENC_LINEAR16BIT; - break; - case MPG123_ENC_UNSIGNED_8: - error("unsigned 8 bit linear not supported"); - return -1; - case MPG123_ENC_SIGNED_8: - error("signed 8 bit linear not supported"); - return -1; - case MPG123_ENC_ALAW_8: - fmt = MPG123_ENC_ALAW; - break; - case MPG123_ENC_ULAW_8: - fmt = MPG123_ENC_ULAW; - break; - } - return ioctl(ao->fn,AUDIO_SET_DATA_FORMAT,fmt); -} - -static int get_formats(audio_output_t *ao) -{ - return MPG123_ENC_SIGNED_16; -} - -static int reset_parameters(audio_output_t *ao) -{ - int ret; - ret = set_format(ai); - if(ret >= 0) - ret = set_channels_hp(ai); - if(ret >= 0) - ret = set_rate_hp(ai); - return ret; -} - - -static int open_hp(audio_output_t *ao) -{ - struct audio_describe ades; - struct audio_gain again; - int i,audio; - - ao->fn = open("/dev/audio",O_RDWR); - - if(ao->fn < 0) - return -1; - - - ioctl(ao->fn,AUDIO_DESCRIBE,&ades); - - if(ao->gain != -1) - { - if(ao->gain > ades.max_transmit_gain) - { - error("your gainvalue was to high -> set to maximum."); - ao->gain = ades.max_transmit_gain; - } - if(ao->gain < ades.min_transmit_gain) - { - error("your gainvalue was to low -> set to minimum."); - ao->gain = ades.min_transmit_gain; - } - again.channel_mask = AUDIO_CHANNEL_0 | AUDIO_CHANNEL_1; - ioctl(ao->fn,AUDIO_GET_GAINS,&again); - again.cgain[0].transmit_gain = ao->gain; - again.cgain[1].transmit_gain = ao->gain; - again.channel_mask = AUDIO_CHANNEL_0 | AUDIO_CHANNEL_1; - ioctl(ao->fn,AUDIO_SET_GAINS,&again); - } - - if(ao->flags != -1) - { - if(ao->flags & AUDIO_OUT_INTERNAL_SPEAKER) - ioctl(ao->fn,AUDIO_SET_OUTPUT,AUDIO_OUT_SPEAKER); - else if(ao->flags & AUDIO_OUT_HEADPHONES) - ioctl(ao->fn,AUDIO_SET_OUTPUT,AUDIO_OUT_HEADPHONE); - else if(ao->flags & AUDIO_OUT_LINE_OUT) - ioctl(ao->fn,AUDIO_SET_OUTPUT,AUDIO_OUT_LINE); - } - - if(ao->rate == -1) - ao->rate = 44100; - - for(i=0;irate == ades.sample_rate[i]) - break; - } - if(i == ades.nrates) - { - error1("Can't set sample-rate to %ld.\n",ao->rate); - i = 0; - } - - if(reset_parameters(ai) < 0) - return -1; - - return ao->fn; -} - - - -static int write_hp(audio_output_t *ao,unsigned char *buf,int len) -{ - return write(ao->fn,buf,len); -} - -static int close_hp(audio_output_t *ao) -{ - close (ao->fn); - return 0; -} - -static void flush_hp(audio_output_t *ao) -{ -} - - - -static int init_hp(audio_output_t* ao) -{ - if (ao==NULL) return -1; - - /* Set callbacks */ - ao->open = open_hp; - ao->flush = flush_hp; - ao->write = write_hp; - ao->get_formats = get_formats_hp; - ao->close = close_hp; - - /* Success */ - return 0; -} - - - -/* - Module information data structure -*/ -mpg123_module_t mpg123_output_module_info = { - /* api_version */ MPG123_MODULE_API_VERSION, - /* name */ "hp", - /* description */ "Output audio HP-UX", - /* revision */ "$Rev:$", - /* handle */ NULL, - - /* init_output */ init_hp, -}; diff --git a/deps/mpg123/src/output/jack.c b/deps/mpg123/src/output/jack.c deleted file mode 100644 index 95871c4..0000000 --- a/deps/mpg123/src/output/jack.c +++ /dev/null @@ -1,450 +0,0 @@ -/* - jack: audio output via JACK Audio Connection Kit - - copyright 2006 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Nicholas J. Humfrey -*/ - -#include - -#include -#include -#include - -#include "mpg123app.h" -#include "debug.h" - -#define MAX_CHANNELS (2) - -typedef struct { - int channels; - jack_port_t *ports[MAX_CHANNELS]; - jack_ringbuffer_t * rb[MAX_CHANNELS]; - size_t rb_size; - jack_client_t *client; - jack_default_audio_sample_t *tmp_buffer; -} jack_handle_t, *jack_handle_ptr; - - -static jack_handle_t* alloc_jack_handle() -{ - jack_handle_t *handle=NULL; - - handle = malloc(sizeof(jack_handle_t)); - if (!handle) { - error("Failed to allocate memory for our handle."); - return NULL; - } - - /* Initialise the handle, and store for later*/ - handle->rb[0] = NULL; - handle->rb[1] = NULL; - handle->ports[0] = NULL; - handle->ports[1] = NULL; - handle->client = NULL; - handle->tmp_buffer = NULL; - handle->rb_size = 0; - - - return handle; -} - - -static void free_jack_handle( jack_handle_t* handle ) -{ - int i; - - warning("FIXME: One needs to wait or write some silence here to prevent the last bits of audio to vanish out of the ringbuffer."); - - for(i=0; iports[i] ) - jack_port_unregister( handle->client, handle->ports[i] ); - - /* Free up the ring buffer for channel*/ - if ( handle->rb[i] ) - jack_ringbuffer_free( handle->rb[i] ); - } - - if (handle->client) - jack_client_close(handle->client); - - if (handle->tmp_buffer) - free(handle->tmp_buffer); - - free(handle); -} - - -static int process_callback( jack_nframes_t nframes, void *arg ) -{ - jack_handle_t* handle = (jack_handle_t*)arg; - size_t to_read = sizeof (jack_default_audio_sample_t) * nframes; - unsigned int c; - - - /* copy data to ringbuffer; one per channel*/ - for (c=0; c < handle->channels; c++) - { - char *buf = (char*)jack_port_get_buffer(handle->ports[c], nframes); - size_t len = jack_ringbuffer_read(handle->rb[c], buf, to_read); - - /* If we don't have enough audio, fill it up with silence*/ - /* (this is to deal with pausing etc.)*/ - if (to_read > len) - bzero( buf+len, to_read - len ); - - /*if (len < to_read)*/ - /* error1("failed to read from ring buffer %d",c);*/ - } - - /* Success*/ - return 0; -} - -static void shutdown_callback( void *arg ) -{ -/* jack_handle_t* handle = (jack_handle_t*)arg; */ - - debug("shutdown_callback()"); - -} - -/* connect to jack ports named in the NULL-terminated wishlist */ -static int real_connect_jack_ports( jack_handle_t* handle, const char** wishlist) -{ - const char **wish = wishlist; - int ch, err; - - if(wish != NULL && *wish == NULL) return 1; /* success, nothing connected as wanted */ - - for(ch=0; chchannels; ++ch) - { - const char* in = jack_port_name( handle->ports[ch] ); - - if ((err = jack_connect(handle->client, in, *wish)) != 0 && err != EEXIST) { - error1("connect_jack_ports(): failed to jack_connect() ports: %d",err); - return 0; - } - /* Increment wish only if there is another one. Otherwise simply connect to the same port multiple times. */ - if(*(wish+1) != NULL) ++wish; - } - - return 1; -} - -/* crude way of automatically connecting up jack ports */ -/* 0 on error */ -static int autoconnect_jack_ports( jack_handle_t* handle) -{ - const char **all_ports; - unsigned int ch=0; - int err,i; - - /* Get a list of all the jack ports*/ - all_ports = jack_get_ports (handle->client, NULL, NULL, JackPortIsInput); - if (!all_ports) { - error("connect_jack_ports(): jack_get_ports() returned NULL."); - return 0; - } - - /* Step through each port name*/ - for (i = 0; all_ports[i]; ++i) { - - const char* in = jack_port_name( handle->ports[ch] ); - const char* out = all_ports[i]; - - if ((err = jack_connect(handle->client, in, out)) != 0 && err != EEXIST) { - error1("connect_jack_ports(): failed to jack_connect() ports: %d",err); - return 0; - } - - /* Found enough ports ?*/ - if (++ch >= handle->channels) break; - } - - free( all_ports ); - return 1; -} - - -static int connect_jack_ports( jack_handle_t* handle, const char *dev ) -{ - if (dev==NULL || strcmp(dev, "auto")==0) { - return autoconnect_jack_ports( handle ); - } - else - { - const char* wishlist[] = { NULL, NULL, NULL }; /* Two channels and end marker. */ - char *devcopy; - int ret; - size_t len = strlen(dev); - devcopy = malloc(len+1); - if(devcopy == NULL){ error("OOM"); return 0; } - - /* We just look out for a possible second port, comma separated - This is really crude cruft, but it's enough. Can be replaced by something sensible later. */ - memcpy(devcopy, dev, len+1); - if( len > 0 && strcmp(dev, "none")!=0 ) - { - size_t i=0; - wishlist[0] = devcopy; - while(devcopy[i] != 0 && devcopy[i] != ',') ++i; - - if(devcopy[i] == ',') - { - devcopy[i] = 0; - wishlist[1] = devcopy+i+1; - } - } - if(wishlist[0] == NULL) warning("Not connecting up jack ports as requested."); - - ret = real_connect_jack_ports(handle, wishlist); - free(devcopy); - return ret; - } - return 1; -} - - -static int close_jack(audio_output_t *ao) -{ - jack_handle_t *handle = (jack_handle_t*)ao->userptr; - - debug("close_jack()."); - - /* Close and shutdown*/ - if (handle) { - free_jack_handle( handle ); - ao->userptr = NULL; - } - - return 0; -} - - -static int open_jack(audio_output_t *ao) -{ - char client_name[255]; - jack_handle_t *handle=NULL; - jack_options_t jopt = JackNullOption; - jack_status_t jstat = 0; - unsigned int i; - - debug("jack open"); - if(!ao) return -1; - - /* Return if already open*/ - if (ao->userptr) { - error("audio device is already open."); - return -1; - } - - /* Create some storage for ourselves*/ - if((handle = alloc_jack_handle()) == NULL) return -1; - - ao->userptr = (void*)handle; - - /* Register with Jack*/ - snprintf(client_name, 255, "mpg123-%d", getpid()); - if ((handle->client = jack_client_open(client_name, jopt, &jstat)) == 0) { - error1("Failed to open jack client: 0x%x", jstat); - close_jack(ao); - return -1; - } - - /* Display the unique client name allocated to us */ - fprintf(stderr,"Registered as JACK client %s.\n", - jack_get_client_name( handle->client ) ); - - /* The initial open lets me choose the settings. */ - if (ao->format==-1) - { - ao->format = MPG123_ENC_16; - ao->rate = jack_get_sample_rate(handle->client); - ao->channels = 2; - } - - /* Check the sample rate is correct*/ - if (jack_get_sample_rate( handle->client ) != (jack_nframes_t)ao->rate) { - error("JACK Sample Rate is different to sample rate of file."); - close_jack(ao); - return -1; - } - - /* Register ports with Jack*/ - handle->channels = ao->channels; - if (handle->channels == 1) { - if (!(handle->ports[0] = jack_port_register(handle->client, "mono", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0))) - { - error("Cannot register JACK output port 'mono'."); - close_jack(ao); - return -1; - } - } else if (handle->channels == 2) { - if (!(handle->ports[0] = jack_port_register(handle->client, "left", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0))) - { - error("Cannot register JACK output port 'left'."); - close_jack(ao); - return -1; - } - if (!(handle->ports[1] = jack_port_register(handle->client, "right", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0))) - { - error("Cannot register JACK output port 'right'."); - close_jack(ao); - return -1; - } - } else { - error1("invalid number of output channels (%d).", handle->channels); - close_jack(ao); - return -1; - } - - /* Create the ring buffers (one seconds audio)*/ - handle->rb_size = jack_get_sample_rate(handle->client) * sizeof(jack_default_audio_sample_t); - for(i=0;ichannels;i++){ - handle->rb[i]=jack_ringbuffer_create(handle->rb_size); - } - - /* Set the callbacks*/ - jack_set_process_callback(handle->client, process_callback, (void*)handle); - jack_on_shutdown(handle->client, shutdown_callback, (void*)handle); - - /* Activate client*/ - if (jack_activate(handle->client)) { - error("Can't activate client."); - } - - /* Connect up the portsm, return */ - if(!connect_jack_ports( handle, ao->device )) - { - /* deregistering of ports will not work but should just fail, then, and let the rest clean up */ - close_jack(ao); - return -1; - } - - debug("Jack open successful.\n"); - return 0; -} - - -/* Jack prefers floats, I actually assume it does _only_ float/double (as it is nowadays)! */ -static int get_formats_jack(audio_output_t *ao) -{ - if(jack_get_sample_rate( ((jack_handle_t*)(ao->userptr))->client ) != (jack_nframes_t)ao->rate) return 0; - else return MPG123_ENC_FLOAT_32|MPG123_ENC_FLOAT_64|MPG123_ENC_SIGNED_16; -} - - -static int write_jack(audio_output_t *ao, unsigned char *buf, int len) -{ - int c,n = 0; - jack_handle_t *handle = (jack_handle_t*)ao->userptr; - jack_nframes_t samples; - size_t tmp_size; - /* Only float or double is used. - Note: I still need the tmp buffer because of de-interleaving the channels. */ - samples = len / - (ao->format == MPG123_ENC_FLOAT_64 ? 8 : (ao->format == MPG123_ENC_SIGNED_16 ? 2 : 4)) - / handle->channels; - tmp_size = samples * sizeof( jack_default_audio_sample_t ); - - - /* Sanity check that ring buffer is at least twice the size of the audio we just got*/ - if (handle->rb_size/2 < len) { - error("ring buffer is less than twice the size of audio given."); - return -1; - } - - - /* Wait until there is space in the ring buffer*/ - while (jack_ringbuffer_write_space( handle->rb[0] ) < tmp_size) { - /* Sleep for a quarter of the ring buffer size (1/4 second)*/ - usleep(250000); - } - - - /* Ensure the temporary buffer is big enough*/ - handle->tmp_buffer = (jack_default_audio_sample_t*)realloc( handle->tmp_buffer, tmp_size); - if (!handle->tmp_buffer) { - error("failed to realloc temporary buffer."); - return -1; - } - - - for(c=0; cchannels; c++) { - size_t len = 0; - - /* Hm, is that optimal? Anyhow, deinterleaving float or double ... or short. With/without conversion. */ - if(ao->format == MPG123_ENC_SIGNED_16) - { - short* src = (short*)buf; - for(n=0; ntmp_buffer[n] = src[(n*handle->channels)+c] / 32768.0f; - } - else if(ao->format == MPG123_ENC_FLOAT_32) - { - float* src = (float*)buf; - for(n=0; ntmp_buffer[n] = src[(n*handle->channels)+c]; - } - else /* MPG123_ENC_FLOAT_64 */ - { - double* src = (double*)buf; - for(n=0; ntmp_buffer[n] = src[(n*handle->channels)+c]; - } - /* Copy temporary buffer into ring buffer*/ - len = jack_ringbuffer_write(handle->rb[c], (char*)handle->tmp_buffer, tmp_size); - if (len < tmp_size) - { - error("failed to write to ring ruffer."); - return -1; - } - } - - - return len; -} - -static void flush_jack(audio_output_t *ao) -{ - jack_handle_t *handle = (jack_handle_t*)ao->userptr; - int c; - - warning("This way, we drop audio on pausing... there must be a better way."); - /* Reset the ring buffers*/ - for(c=0; cchannels; c++) { - jack_ringbuffer_reset(handle->rb[c]); - } -} - -static int init_jack(audio_output_t* ao) -{ - if (ao==NULL) return -1; - - /* Set callbacks */ - ao->open = open_jack; - ao->flush = flush_jack; - ao->write = write_jack; - ao->get_formats = get_formats_jack; - ao->close = close_jack; - - /* Success */ - return 0; -} - - -/* - Module information data structure -*/ -mpg123_module_t mpg123_output_module_info = { - /* api_version */ MPG123_MODULE_API_VERSION, - /* name */ "jack", - /* description */ "Output audio using JACK (JACK Audio Connection Kit).", - /* revision */ "$Rev:$", - /* handle */ NULL, - - /* init_output */ init_jack, -}; diff --git a/deps/mpg123/src/output/mint.c b/deps/mpg123/src/output/mint.c deleted file mode 100644 index 7210293..0000000 --- a/deps/mpg123/src/output/mint.c +++ /dev/null @@ -1,197 +0,0 @@ -/* - mint: audio output for MINT - - copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Petr Stehlik -*/ - -/* derived from LINUX, VOXWARE and SUN for MiNT Audio Device by Petr Stehlik */ -#include -#include "mpg123app.h" -#include -#include -#include "debug.h" - -/* Globals */ -extern int outburst; -int real_rate_printed = 0; - - - -static int rate_best_match(audio_output_t *ao) -{ - int ret,dsp_rate; - - if(!ai || ao->fn < 0 || ao->rate < 0) - return -1; - - dsp_rate = ao->rate; - ret = ioctl(ao->fn,AIOCSSPEED, (void *)dsp_rate); - ret = ioctl(ao->fn,AIOCGSPEED,&dsp_rate); - if(ret < 0) return ret; - ao->rate = dsp_rate; - return 0; -} - -static int set_rate(audio_output_t *ao) -{ - int dsp_rate = ao->rate; - - if(ao->rate >= 0) { - int ret, real_rate; - ret = ioctl(ao->fn, AIOCSSPEED, (void *)dsp_rate); - if (ret >= 0 && !real_rate_printed) { - ioctl(ao->fn,AIOCGSPEED,&real_rate); - if (real_rate != dsp_rate) { - fprintf(stderr, "Replay rate: %d Hz\n", real_rate); - real_rate_printed = 1; - } - } - return ret; - } - - return 0; -} - -static int set_channels(audio_output_t *ao) -{ - int chan = ao->channels; - - if(ao->channels < 1) return 0; - - return ioctl(ao->fn, AIOCSCHAN, (void *)chan); -} - -static int set_format(audio_output_t *ao) -{ - int fmts; - - if(ao->format == -1) - return 0; - - switch(ao->format) { - case MPG123_ENC_SIGNED_16: - default: - fmts = AFMT_S16; - break; - case MPG123_ENC_UNSIGNED_8: - fmts = AFMT_U8; - break; - case MPG123_ENC_SIGNED_8: - fmts = AFMT_S8; - break; - case MPG123_ENC_ULAW_8: - fmts = AFMT_ULAW; - break; - } - - return ioctl(ao->fn, AIOCSFMT, (void *)fmts); -} - -static int reset_parameters(audio_output_t *ao) -{ - int ret; - ret = ioctl(ao->fn,AIOCRESET,NULL); - if(ret >= 0) ret = set_format(ai); - if(ret >= 0) ret = set_channels(ai); - if(ret >= 0) ret = set_rate(ai); - return ret; -} - - - -static int open_mint(audio_output_t *ao) -{ - if(!ai) return -1; - - if(!ao->device) - ao->device = "/dev/audio"; - - ao->fn = open(ao->device,O_WRONLY); - - if(ao->fn < 0) - { - error1("Can't open %s!",ao->device); - return -1; - } - ioctl(ao->fn, AIOCGBLKSIZE, &outburst); - if(outburst > MAXOUTBURST) - outburst = MAXOUTBURST; - if(audio_reset_parameters(ai) < 0) { - close(ao->fn); - return -1; - } - - return ao->fn; -} - -static int get_formats_mint(audio_output_t *ao) -{ - int ret = 0; - int fmts; - - if(ioctl(ao->fn,AIOCGFMTS,&fmts) < 0) - return -1; - - if(fmts & AFMT_ULAW) - ret |= MPG123_ENC_ULAW_8; - if(fmts & AFMT_S16) - ret |= MPG123_ENC_SIGNED_16; - if(fmts & AFMT_U8) - ret |= MPG123_ENC_UNSIGNED_8; - if(fmts & AFMT_S8) - ret |= MPG123_ENC_SIGNED_8; - - return ret; -} - -static int write_mint(audio_output_t *ao,unsigned char *buf,int len) -{ - return write(ao->fn,buf,len); -} - -static int close_mint(audio_output_t *ao) -{ - close (ao->fn); - return 0; -} - -static void flush_mint(audio_output_t *ao) -{ -} - - -static int init_mint(audio_output_t* ao) -{ - if (ao==NULL) return -1; - - /* Set callbacks */ - ao->open = open_mint; - ao->flush = flush_mint; - ao->write = write_mint; - ao->get_formats = get_formats_mint; - ao->close = close_mint; - - /* Success */ - return 0; -} - - - - - -/* - Module information data structure -*/ -mpg123_module_t mpg123_output_module_info = { - /* api_version */ MPG123_MODULE_API_VERSION, - /* name */ "mint", - /* description */ "Audio output for MINT.", - /* revision */ "$Rev:$", - /* handle */ NULL, - - /* init_output */ init_mint, -}; - - diff --git a/deps/mpg123/src/output/nas.c b/deps/mpg123/src/output/nas.c deleted file mode 100644 index ad69b19..0000000 --- a/deps/mpg123/src/output/nas.c +++ /dev/null @@ -1,335 +0,0 @@ -/* - nas: audio output via NAS - - copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 - see COPYING and AUTHORS files in distribution or http://mpg123.org - initially written by Martin Denn -*/ - -#include "mpg123app.h" -#include -#include